@deepdesk/deepdesk-sdk 10.10.1 → 10.10.2
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 +7 -7
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +13 -13
- package/package.json +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var DC=Object.create;var Xa=Object.defineProperty;var FC=Object.getOwnPropertyDescriptor;var jC=Object.getOwnPropertyNames;var HC=Object.getPrototypeOf,BC=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pe=(e,t)=>{for(var n in t)Xa(e,n,{get:t[n],enumerable:!0})},Hh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jC(t))!BC.call(e,o)&&o!==n&&Xa(e,o,{get:()=>t[o],enumerable:!(r=FC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?DC(HC(e)):{},Hh(t||!e||!e.__esModule?Xa(n,"default",{value:e,enumerable:!0}):n,e)),UC=e=>Hh(Xa({},"__esModule",{value:!0}),e);var q=me((IA,Qa)=>{"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 Qa<"u"&&Qa.exports?(n.default=n,Qa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ya=me((LA,Uh)=>{"use strict";var Bh=Object.getOwnPropertySymbols,zC=Object.prototype.hasOwnProperty,KC=Object.prototype.propertyIsEnumerable;function VC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function WC(){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}}Uh.exports=WC()?Object.assign:function(e,t){for(var n,r=VC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)zC.call(n,s)&&(r[s]=n[s]);if(Bh){o=Bh(n);for(var a=0;a<o.length;a++)KC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var ry=me(W=>{"use strict";var zd=Ya(),Eo=60103,Vh=60106;W.Fragment=60107;W.StrictMode=60108;W.Profiler=60114;var Wh=60109,$h=60110,qh=60112;W.Suspense=60113;var Gh=60115,Xh=60116;typeof Symbol=="function"&&Symbol.for&&(ht=Symbol.for,Eo=ht("react.element"),Vh=ht("react.portal"),W.Fragment=ht("react.fragment"),W.StrictMode=ht("react.strict_mode"),W.Profiler=ht("react.profiler"),Wh=ht("react.provider"),$h=ht("react.context"),qh=ht("react.forward_ref"),W.Suspense=ht("react.suspense"),Gh=ht("react.memo"),Xh=ht("react.lazy"));var ht,zh=typeof Symbol=="function"&&Symbol.iterator;function $C(e){return e===null||typeof e!="object"?null:(e=zh&&e[zh]||e["@@iterator"],typeof e=="function"?e:null)}function qi(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 Qh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yh={};function To(e,t,n){this.props=e,this.context=t,this.refs=Yh,this.updater=n||Qh}To.prototype.isReactComponent={};To.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(qi(85));this.updater.enqueueSetState(this,e,t,"setState")};To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Zh(){}Zh.prototype=To.prototype;function Kd(e,t,n){this.props=e,this.context=t,this.refs=Yh,this.updater=n||Qh}var Vd=Kd.prototype=new Zh;Vd.constructor=Kd;zd(Vd,To.prototype);Vd.isPureReactComponent=!0;var Wd={current:null},Jh=Object.prototype.hasOwnProperty,ey={key:!0,ref:!0,__self:!0,__source:!0};function ty(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)Jh.call(t,r)&&!ey.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:Eo,type:e,key:i,ref:s,props:o,_owner:Wd.current}}function qC(e,t){return{$$typeof:Eo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $d(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eo}function GC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Kh=/\/+/g;function Ud(e,t){return typeof e=="object"&&e!==null&&e.key!=null?GC(""+e.key):t.toString(36)}function Ja(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 Eo:case Vh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Ud(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Kh,"$&/")+"/"),Ja(o,t,n,"",function(u){return u})):o!=null&&($d(o)&&(o=qC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Kh,"$&/")+"/")+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+Ud(i,a);s+=Ja(i,t,n,l,o)}else if(l=$C(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Ud(i,a++),s+=Ja(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(qi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Za(e,t,n){if(e==null)return e;var r=[],o=0;return Ja(e,r,"","",function(i){return t.call(n,i,o++)}),r}function XC(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 ny={current:null};function dn(){var e=ny.current;if(e===null)throw Error(qi(321));return e}var QC={ReactCurrentDispatcher:ny,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Wd,IsSomeRendererActing:{current:!1},assign:zd};W.Children={map:Za,forEach:function(e,t,n){Za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Za(e,function(){t++}),t},toArray:function(e){return Za(e,function(t){return t})||[]},only:function(e){if(!$d(e))throw Error(qi(143));return e}};W.Component=To;W.PureComponent=Kd;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QC;W.cloneElement=function(e,t,n){if(e==null)throw Error(qi(267,e));var r=zd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Wd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Jh.call(t,l)&&!ey.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:Eo,type:e.type,key:o,ref:i,props:r,_owner:s}};W.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:$h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Wh,_context:e},e.Consumer=e};W.createElement=ty;W.createFactory=function(e){var t=ty.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:qh,render:e}};W.isValidElement=$d;W.lazy=function(e){return{$$typeof:Xh,_payload:{_status:-1,_result:e},_init:XC}};W.memo=function(e,t){return{$$typeof:Gh,type:e,compare:t===void 0?null:t}};W.useCallback=function(e,t){return dn().useCallback(e,t)};W.useContext=function(e,t){return dn().useContext(e,t)};W.useDebugValue=function(){};W.useEffect=function(e,t){return dn().useEffect(e,t)};W.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};W.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};W.useMemo=function(e,t){return dn().useMemo(e,t)};W.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};W.useRef=function(e){return dn().useRef(e)};W.useState=function(e){return dn().useState(e)};W.version="17.0.2"});var O=me((OA,oy)=>{"use strict";oy.exports=ry()});var uy=me(Xi=>{"use strict";Ya();var YC=O(),ay=60103;Xi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(qd=Symbol.for,ay=qd("react.element"),Xi.Fragment=qd("react.fragment"));var qd,ZC=YC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,JC=Object.prototype.hasOwnProperty,eE={key:!0,ref:!0,__self:!0,__source:!0};function ly(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)JC.call(t,r)&&!eE.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:ay,type:e,key:i,ref:s,props:o,_owner:ZC.current}}Xi.jsx=ly;Xi.jsxs=ly});var w=me((BA,cy)=>{"use strict";cy.exports=uy()});var Ny=me(G=>{"use strict";var Ao,Ji,pl,rp;typeof performance=="object"&&typeof performance.now=="function"?(Ry=performance,G.unstable_now=function(){return Ry.now()}):(Yd=Date,Iy=Yd.now(),G.unstable_now=function(){return Yd.now()-Iy});var Ry,Yd,Iy;typeof window>"u"||typeof MessageChannel!="function"?(Lo=null,Zd=null,Jd=function(){if(Lo!==null)try{var e=G.unstable_now();Lo(!0,e),Lo=null}catch(t){throw setTimeout(Jd,0),t}},Ao=function(e){Lo!==null?setTimeout(Ao,0,e):(Lo=e,setTimeout(Jd,0))},Ji=function(e,t){Zd=setTimeout(e,t)},pl=function(){clearTimeout(Zd)},G.unstable_shouldYield=function(){return!1},rp=G.unstable_forceFrameRate=function(){}):(Ly=window.setTimeout,Ay=window.clearTimeout,typeof console<"u"&&(Oy=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 Oy!="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")),Yi=!1,Zi=null,ul=-1,ep=5,tp=0,G.unstable_shouldYield=function(){return G.unstable_now()>=tp},rp=function(){},G.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"):ep=0<e?Math.floor(1e3/e):5},np=new MessageChannel,cl=np.port2,np.port1.onmessage=function(){if(Zi!==null){var e=G.unstable_now();tp=e+ep;try{Zi(!0,e)?cl.postMessage(null):(Yi=!1,Zi=null)}catch(t){throw cl.postMessage(null),t}}else Yi=!1},Ao=function(e){Zi=e,Yi||(Yi=!0,cl.postMessage(null))},Ji=function(e,t){ul=Ly(function(){e(G.unstable_now())},t)},pl=function(){Ay(ul),ul=-1});var Lo,Zd,Jd,Ly,Ay,Oy,Yi,Zi,ul,ep,tp,np,cl;function op(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<dl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Dt(e){return e=e[0],e===void 0?null:e}function fl(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>dl(s,n))l!==void 0&&0>dl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>dl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function dl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Qt=[],Wn=[],gE=1,_t=null,Oe=3,ml=!1,Br=!1,es=!1;function ip(e){for(var t=Dt(Wn);t!==null;){if(t.callback===null)fl(Wn);else if(t.startTime<=e)fl(Wn),t.sortIndex=t.expirationTime,op(Qt,t);else break;t=Dt(Wn)}}function sp(e){if(es=!1,ip(e),!Br)if(Dt(Qt)!==null)Br=!0,Ao(ap);else{var t=Dt(Wn);t!==null&&Ji(sp,t.startTime-e)}}function ap(e,t){Br=!1,es&&(es=!1,pl()),ml=!0;var n=Oe;try{for(ip(t),_t=Dt(Qt);_t!==null&&(!(_t.expirationTime>t)||e&&!G.unstable_shouldYield());){var r=_t.callback;if(typeof r=="function"){_t.callback=null,Oe=_t.priorityLevel;var o=r(_t.expirationTime<=t);t=G.unstable_now(),typeof o=="function"?_t.callback=o:_t===Dt(Qt)&&fl(Qt),ip(t)}else fl(Qt);_t=Dt(Qt)}if(_t!==null)var i=!0;else{var s=Dt(Wn);s!==null&&Ji(sp,s.startTime-t),i=!1}return i}finally{_t=null,Oe=n,ml=!1}}var hE=rp;G.unstable_IdlePriority=5;G.unstable_ImmediatePriority=1;G.unstable_LowPriority=4;G.unstable_NormalPriority=3;G.unstable_Profiling=null;G.unstable_UserBlockingPriority=2;G.unstable_cancelCallback=function(e){e.callback=null};G.unstable_continueExecution=function(){Br||ml||(Br=!0,Ao(ap))};G.unstable_getCurrentPriorityLevel=function(){return Oe};G.unstable_getFirstCallbackNode=function(){return Dt(Qt)};G.unstable_next=function(e){switch(Oe){case 1:case 2:case 3:var t=3;break;default:t=Oe}var n=Oe;Oe=t;try{return e()}finally{Oe=n}};G.unstable_pauseExecution=function(){};G.unstable_requestPaint=hE;G.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Oe;Oe=e;try{return t()}finally{Oe=n}};G.unstable_scheduleCallback=function(e,t,n){var r=G.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:gE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,op(Wn,e),Dt(Qt)===null&&e===Dt(Wn)&&(es?pl():es=!0,Ji(sp,n-r))):(e.sortIndex=o,op(Qt,e),Br||ml||(Br=!0,Ao(ap))),e};G.unstable_wrapCallback=function(e){var t=Oe;return function(){var n=Oe;Oe=t;try{return e.apply(this,arguments)}finally{Oe=n}}}});var Dy=me((tN,My)=>{"use strict";My.exports=Ny()});var w0=me(kt=>{"use strict";var au=O(),ae=Ya(),Ce=Dy();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(!au)throw Error(T(227));var Xv=new Set,Is={};function Yr(e,t){Jo(e,t),Jo(e+"Capture",t)}function Jo(e,t){for(Is[e]=t,e=0;e<t.length;e++)Xv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Fy=Object.prototype.hasOwnProperty,jy={},Hy={};function vE(e){return Fy.call(Hy,e)?!0:Fy.call(jy,e)?!1:yE.test(e)?Hy[e]=!0:(jy[e]=!0,!1)}function SE(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 xE(e,t,n,r){if(t===null||typeof t>"u"||SE(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 We(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 Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new We(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){Le[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var yf=/[\-:]([a-z])/g;function vf(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(yf,vf);Le[t]=new We(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(yf,vf);Le[t]=new We(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(yf,vf);Le[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sf(e,t,n,r){var o=Le.hasOwnProperty(t)?Le[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||(xE(t,n,o,r)&&(n=null),r||o===null?vE(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 Zr=au.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fs=60103,zr=60106,qn=60107,xf=60108,vs=60114,_f=60109,wf=60110,lu=60112,Ss=60113,jl=60120,uu=60115,bf=60116,Cf=60121,Ef=60128,Qv=60129,Tf=60130,Ip=60131;typeof Symbol=="function"&&Symbol.for&&(ve=Symbol.for,fs=ve("react.element"),zr=ve("react.portal"),qn=ve("react.fragment"),xf=ve("react.strict_mode"),vs=ve("react.profiler"),_f=ve("react.provider"),wf=ve("react.context"),lu=ve("react.forward_ref"),Ss=ve("react.suspense"),jl=ve("react.suspense_list"),uu=ve("react.memo"),bf=ve("react.lazy"),Cf=ve("react.block"),ve("react.scope"),Ef=ve("react.opaque.id"),Qv=ve("react.debug_trace_mode"),Tf=ve("react.offscreen"),Ip=ve("react.legacy_hidden"));var ve,By=typeof Symbol=="function"&&Symbol.iterator;function ts(e){return e===null||typeof e!="object"?null:(e=By&&e[By]||e["@@iterator"],typeof e=="function"?e:null)}var lp;function ms(e){if(lp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);lp=t&&t[1]||""}return`
|
|
2
|
-
`+
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var MC=Object.create;var Xa=Object.defineProperty;var DC=Object.getOwnPropertyDescriptor;var FC=Object.getOwnPropertyNames;var jC=Object.getPrototypeOf,BC=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pe=(e,t)=>{for(var n in t)Xa(e,n,{get:t[n],enumerable:!0})},jh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of FC(t))!BC.call(e,o)&&o!==n&&Xa(e,o,{get:()=>t[o],enumerable:!(r=DC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?MC(jC(e)):{},jh(t||!e||!e.__esModule?Xa(n,"default",{value:e,enumerable:!0}):n,e)),HC=e=>jh(Xa({},"__esModule",{value:!0}),e);var q=me((PA,Qa)=>{"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 Qa<"u"&&Qa.exports?(n.default=n,Qa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ya=me((RA,Hh)=>{"use strict";var Bh=Object.getOwnPropertySymbols,UC=Object.prototype.hasOwnProperty,zC=Object.prototype.propertyIsEnumerable;function KC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function VC(){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}}Hh.exports=VC()?Object.assign:function(e,t){for(var n,r=KC(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(Bh){o=Bh(n);for(var a=0;a<o.length;a++)zC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var ny=me(W=>{"use strict";var Ud=Ya(),Eo=60103,Kh=60106;W.Fragment=60107;W.StrictMode=60108;W.Profiler=60114;var Vh=60109,Wh=60110,$h=60112;W.Suspense=60113;var qh=60115,Gh=60116;typeof Symbol=="function"&&Symbol.for&&(ht=Symbol.for,Eo=ht("react.element"),Kh=ht("react.portal"),W.Fragment=ht("react.fragment"),W.StrictMode=ht("react.strict_mode"),W.Profiler=ht("react.profiler"),Vh=ht("react.provider"),Wh=ht("react.context"),$h=ht("react.forward_ref"),W.Suspense=ht("react.suspense"),qh=ht("react.memo"),Gh=ht("react.lazy"));var ht,Uh=typeof Symbol=="function"&&Symbol.iterator;function WC(e){return e===null||typeof e!="object"?null:(e=Uh&&e[Uh]||e["@@iterator"],typeof e=="function"?e:null)}function qi(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 Xh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qh={};function To(e,t,n){this.props=e,this.context=t,this.refs=Qh,this.updater=n||Xh}To.prototype.isReactComponent={};To.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(qi(85));this.updater.enqueueSetState(this,e,t,"setState")};To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yh(){}Yh.prototype=To.prototype;function zd(e,t,n){this.props=e,this.context=t,this.refs=Qh,this.updater=n||Xh}var Kd=zd.prototype=new Yh;Kd.constructor=zd;Ud(Kd,To.prototype);Kd.isPureReactComponent=!0;var Vd={current:null},Zh=Object.prototype.hasOwnProperty,Jh={key:!0,ref:!0,__self:!0,__source:!0};function ey(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Zh.call(t,r)&&!Jh.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:Eo,type:e,key:i,ref:s,props:o,_owner:Vd.current}}function $C(e,t){return{$$typeof:Eo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eo}function qC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zh=/\/+/g;function Hd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qC(""+e.key):t.toString(36)}function Ja(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 Eo:case Kh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Hd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(zh,"$&/")+"/"),Ja(o,t,n,"",function(u){return u})):o!=null&&(Wd(o)&&(o=$C(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(zh,"$&/")+"/")+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+Hd(i,a);s+=Ja(i,t,n,l,o)}else if(l=WC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Hd(i,a++),s+=Ja(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(qi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Za(e,t,n){if(e==null)return e;var r=[],o=0;return Ja(e,r,"","",function(i){return t.call(n,i,o++)}),r}function GC(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 ty={current:null};function dn(){var e=ty.current;if(e===null)throw Error(qi(321));return e}var XC={ReactCurrentDispatcher:ty,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Vd,IsSomeRendererActing:{current:!1},assign:Ud};W.Children={map:Za,forEach:function(e,t,n){Za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Za(e,function(){t++}),t},toArray:function(e){return Za(e,function(t){return t})||[]},only:function(e){if(!Wd(e))throw Error(qi(143));return e}};W.Component=To;W.PureComponent=zd;W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XC;W.cloneElement=function(e,t,n){if(e==null)throw Error(qi(267,e));var r=Ud({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Vd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Zh.call(t,l)&&!Jh.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:Eo,type:e.type,key:o,ref:i,props:r,_owner:s}};W.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Wh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Vh,_context:e},e.Consumer=e};W.createElement=ey;W.createFactory=function(e){var t=ey.bind(null,e);return t.type=e,t};W.createRef=function(){return{current:null}};W.forwardRef=function(e){return{$$typeof:$h,render:e}};W.isValidElement=Wd;W.lazy=function(e){return{$$typeof:Gh,_payload:{_status:-1,_result:e},_init:GC}};W.memo=function(e,t){return{$$typeof:qh,type:e,compare:t===void 0?null:t}};W.useCallback=function(e,t){return dn().useCallback(e,t)};W.useContext=function(e,t){return dn().useContext(e,t)};W.useDebugValue=function(){};W.useEffect=function(e,t){return dn().useEffect(e,t)};W.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};W.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};W.useMemo=function(e,t){return dn().useMemo(e,t)};W.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};W.useRef=function(e){return dn().useRef(e)};W.useState=function(e){return dn().useState(e)};W.version="17.0.2"});var O=me((LA,ry)=>{"use strict";ry.exports=ny()});var ly=me(Xi=>{"use strict";Ya();var QC=O(),sy=60103;Xi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&($d=Symbol.for,sy=$d("react.element"),Xi.Fragment=$d("react.fragment"));var $d,YC=QC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ZC=Object.prototype.hasOwnProperty,JC={key:!0,ref:!0,__self:!0,__source:!0};function ay(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)ZC.call(t,r)&&!JC.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:sy,type:e,key:i,ref:s,props:o,_owner:YC.current}}Xi.jsx=ay;Xi.jsxs=ay});var w=me((jA,uy)=>{"use strict";uy.exports=ly()});var Oy=me(G=>{"use strict";var Ao,Ji,pl,np;typeof performance=="object"&&typeof performance.now=="function"?(Py=performance,G.unstable_now=function(){return Py.now()}):(Qd=Date,Ry=Qd.now(),G.unstable_now=function(){return Qd.now()-Ry});var Py,Qd,Ry;typeof window>"u"||typeof MessageChannel!="function"?(Lo=null,Yd=null,Zd=function(){if(Lo!==null)try{var e=G.unstable_now();Lo(!0,e),Lo=null}catch(t){throw setTimeout(Zd,0),t}},Ao=function(e){Lo!==null?setTimeout(Ao,0,e):(Lo=e,setTimeout(Zd,0))},Ji=function(e,t){Yd=setTimeout(e,t)},pl=function(){clearTimeout(Yd)},G.unstable_shouldYield=function(){return!1},np=G.unstable_forceFrameRate=function(){}):(Iy=window.setTimeout,Ly=window.clearTimeout,typeof console<"u"&&(Ay=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 Ay!="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")),Yi=!1,Zi=null,ul=-1,Jd=5,ep=0,G.unstable_shouldYield=function(){return G.unstable_now()>=ep},np=function(){},G.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"):Jd=0<e?Math.floor(1e3/e):5},tp=new MessageChannel,cl=tp.port2,tp.port1.onmessage=function(){if(Zi!==null){var e=G.unstable_now();ep=e+Jd;try{Zi(!0,e)?cl.postMessage(null):(Yi=!1,Zi=null)}catch(t){throw cl.postMessage(null),t}}else Yi=!1},Ao=function(e){Zi=e,Yi||(Yi=!0,cl.postMessage(null))},Ji=function(e,t){ul=Iy(function(){e(G.unstable_now())},t)},pl=function(){Ly(ul),ul=-1});var Lo,Yd,Zd,Iy,Ly,Ay,Yi,Zi,ul,Jd,ep,tp,cl;function rp(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<dl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Dt(e){return e=e[0],e===void 0?null:e}function fl(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>dl(s,n))l!==void 0&&0>dl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>dl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function dl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Qt=[],Wn=[],mE=1,_t=null,Oe=3,ml=!1,Hr=!1,es=!1;function op(e){for(var t=Dt(Wn);t!==null;){if(t.callback===null)fl(Wn);else if(t.startTime<=e)fl(Wn),t.sortIndex=t.expirationTime,rp(Qt,t);else break;t=Dt(Wn)}}function ip(e){if(es=!1,op(e),!Hr)if(Dt(Qt)!==null)Hr=!0,Ao(sp);else{var t=Dt(Wn);t!==null&&Ji(ip,t.startTime-e)}}function sp(e,t){Hr=!1,es&&(es=!1,pl()),ml=!0;var n=Oe;try{for(op(t),_t=Dt(Qt);_t!==null&&(!(_t.expirationTime>t)||e&&!G.unstable_shouldYield());){var r=_t.callback;if(typeof r=="function"){_t.callback=null,Oe=_t.priorityLevel;var o=r(_t.expirationTime<=t);t=G.unstable_now(),typeof o=="function"?_t.callback=o:_t===Dt(Qt)&&fl(Qt),op(t)}else fl(Qt);_t=Dt(Qt)}if(_t!==null)var i=!0;else{var s=Dt(Wn);s!==null&&Ji(ip,s.startTime-t),i=!1}return i}finally{_t=null,Oe=n,ml=!1}}var gE=np;G.unstable_IdlePriority=5;G.unstable_ImmediatePriority=1;G.unstable_LowPriority=4;G.unstable_NormalPriority=3;G.unstable_Profiling=null;G.unstable_UserBlockingPriority=2;G.unstable_cancelCallback=function(e){e.callback=null};G.unstable_continueExecution=function(){Hr||ml||(Hr=!0,Ao(sp))};G.unstable_getCurrentPriorityLevel=function(){return Oe};G.unstable_getFirstCallbackNode=function(){return Dt(Qt)};G.unstable_next=function(e){switch(Oe){case 1:case 2:case 3:var t=3;break;default:t=Oe}var n=Oe;Oe=t;try{return e()}finally{Oe=n}};G.unstable_pauseExecution=function(){};G.unstable_requestPaint=gE;G.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Oe;Oe=e;try{return t()}finally{Oe=n}};G.unstable_scheduleCallback=function(e,t,n){var r=G.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:mE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,rp(Wn,e),Dt(Qt)===null&&e===Dt(Wn)&&(es?pl():es=!0,Ji(ip,n-r))):(e.sortIndex=o,rp(Qt,e),Hr||ml||(Hr=!0,Ao(sp))),e};G.unstable_wrapCallback=function(e){var t=Oe;return function(){var n=Oe;Oe=t;try{return e.apply(this,arguments)}finally{Oe=n}}}});var My=me((JO,Ny)=>{"use strict";Ny.exports=Oy()});var _0=me(kt=>{"use strict";var au=O(),ae=Ya(),Ce=My();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(!au)throw Error(T(227));var Gv=new Set,Is={};function Yr(e,t){Jo(e,t),Jo(e+"Capture",t)}function Jo(e,t){for(Is[e]=t,e=0;e<t.length;e++)Gv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hE=/^[: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]*$/,Dy=Object.prototype.hasOwnProperty,Fy={},jy={};function yE(e){return Dy.call(jy,e)?!0:Dy.call(Fy,e)?!1:hE.test(e)?jy[e]=!0:(Fy[e]=!0,!1)}function vE(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 SE(e,t,n,r){if(t===null||typeof t>"u"||vE(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 We(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 Le={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Le[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Le[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Le[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Le[e]=new We(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){Le[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Le[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Le[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Le[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Le[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var hf=/[\-:]([a-z])/g;function yf(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(hf,yf);Le[t]=new We(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(hf,yf);Le[t]=new We(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(hf,yf);Le[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Le[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Le.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Le[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function vf(e,t,n,r){var o=Le.hasOwnProperty(t)?Le[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||(SE(t,n,o,r)&&(n=null),r||o===null?yE(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 Zr=au.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fs=60103,zr=60106,qn=60107,Sf=60108,vs=60114,xf=60109,_f=60110,lu=60112,Ss=60113,jl=60120,uu=60115,wf=60116,bf=60121,Cf=60128,Xv=60129,Ef=60130,Rp=60131;typeof Symbol=="function"&&Symbol.for&&(ve=Symbol.for,fs=ve("react.element"),zr=ve("react.portal"),qn=ve("react.fragment"),Sf=ve("react.strict_mode"),vs=ve("react.profiler"),xf=ve("react.provider"),_f=ve("react.context"),lu=ve("react.forward_ref"),Ss=ve("react.suspense"),jl=ve("react.suspense_list"),uu=ve("react.memo"),wf=ve("react.lazy"),bf=ve("react.block"),ve("react.scope"),Cf=ve("react.opaque.id"),Xv=ve("react.debug_trace_mode"),Ef=ve("react.offscreen"),Rp=ve("react.legacy_hidden"));var ve,By=typeof Symbol=="function"&&Symbol.iterator;function ts(e){return e===null||typeof e!="object"?null:(e=By&&e[By]||e["@@iterator"],typeof e=="function"?e:null)}var ap;function ms(e){if(ap===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ap=t&&t[1]||""}return`
|
|
2
|
+
`+ap+e}var lp=!1;function gl(e,t){if(!e||lp)return"";lp=!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{up=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ms(e):""}function _E(e){switch(e.tag){case 5:return ms(e.type);case 16:return ms("Lazy");case 13:return ms("Suspense");case 19:return ms("SuspenseList");case 0:case 2:case 15:return e=gl(e.type,!1),e;case 11:return e=gl(e.type.render,!1),e;case 22:return e=gl(e.type._render,!1),e;case 1:return e=gl(e.type,!0),e;default:return""}}function Ko(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 qn:return"Fragment";case zr:return"Portal";case vs:return"Profiler";case xf:return"StrictMode";case Ss:return"Suspense";case jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wf:return(e.displayName||"Context")+".Consumer";case _f:return(e._context.displayName||"Context")+".Provider";case lu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case uu:return Ko(e.type);case Cf:return Ko(e._render);case bf:t=e._payload,e=e._init;try{return Ko(e(t))}catch{}}return null}function ir(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Yv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wE(e){var t=Yv(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 hl(e){e._valueTracker||(e._valueTracker=wE(e))}function Zv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hl(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 Lp(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ir(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 Jv(e,t){t=t.checked,t!=null&&Sf(e,"checked",t,!1)}function Ap(e,t){Jv(e,t);var n=ir(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")?Op(e,t.type,n):t.hasOwnProperty("defaultValue")&&Op(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zy(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 Op(e,t,n){(t!=="number"||Hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function bE(e){var t="";return au.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Np(e,t){return e=ae({children:void 0},t),(t=bE(t.children))&&(e.children=t),e}function Vo(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=""+ir(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 Mp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ky(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:ir(n)}}function eS(e,t){var n=ir(t.value),r=ir(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 Vy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Dp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function tS(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 Fp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yl,nS=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!==Dp.svg||"innerHTML"in e)e.innerHTML=t;else{for(yl=yl||document.createElement("div"),yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ls(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xs={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},CE=["Webkit","ms","Moz","O"];Object.keys(xs).forEach(function(e){CE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xs[t]=xs[e]})});function rS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xs.hasOwnProperty(e)&&xs[e]?(""+t).trim():t+"px"}function oS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=rS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var EE=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 jp(e,t){if(t){if(EE[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 Hp(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 kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bp=null,Wo=null,$o=null;function Wy(e){if(e=Ws(e)){if(typeof Bp!="function")throw Error(T(280));var t=e.stateNode;t&&(t=gu(t),Bp(e.stateNode,e.type,t))}}function iS(e){Wo?$o?$o.push(e):$o=[e]:Wo=e}function sS(){if(Wo){var e=Wo,t=$o;if($o=Wo=null,Wy(e),t)for(e=0;e<t.length;e++)Wy(t[e])}}function Pf(e,t){return e(t)}function aS(e,t,n,r,o){return e(t,n,r,o)}function Rf(){}var lS=Pf,Kr=!1,cp=!1;function If(){(Wo!==null||$o!==null)&&(Rf(),sS())}function TE(e,t,n){if(cp)return e(t,n);cp=!0;try{return lS(e,t,n)}finally{cp=!1,If()}}function As(e,t){var n=e.stateNode;if(n===null)return null;var r=gu(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 Up=!1;if(yn)try{Oo={},Object.defineProperty(Oo,"passive",{get:function(){Up=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Up=!1}var Oo;function kE(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 _s=!1,Bl=null,Ul=!1,zp=null,PE={onError:function(e){_s=!0,Bl=e}};function RE(e,t,n,r,o,i,s,a,l){_s=!1,Bl=null,kE.apply(PE,arguments)}function IE(e,t,n,r,o,i,s,a,l){if(RE.apply(this,arguments),_s){if(_s){var u=Bl;_s=!1,Bl=null}else throw Error(T(198));Ul||(Ul=!0,zp=u)}}function Jr(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 uS(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 $y(e){if(Jr(e)!==e)throw Error(T(188))}function LE(e){var t=e.alternate;if(!t){if(t=Jr(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 $y(o),e;if(i===r)return $y(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 cS(e){if(e=LE(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 qy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var dS,Lf,pS,fS,Kp=!1,Yt=[],Yn=null,Zn=null,Jn=null,Os=new Map,Ns=new Map,ns=[],Gy="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 Vp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Xy(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":Os.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function rs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Vp(t,n,r,o,i),t!==null&&(t=Ws(t),t!==null&&Lf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function AE(e,t,n,r,o){switch(t){case"focusin":return Yn=rs(Yn,e,t,n,r,o),!0;case"dragenter":return Zn=rs(Zn,e,t,n,r,o),!0;case"mouseover":return Jn=rs(Jn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Os.set(i,rs(Os.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ns.set(i,rs(Ns.get(i)||null,e,t,n,r,o)),!0}return!1}function OE(e){var t=Vr(e.target);if(t!==null){var n=Jr(t);if(n!==null){if(t=n.tag,t===13){if(t=uS(n),t!==null){e.blockedOn=t,fS(e.lanePriority,function(){Ce.unstable_runWithPriority(e.priority,function(){pS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Mf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Ws(n),t!==null&&Lf(t),e.blockedOn=n,!1;t.shift()}return!0}function Qy(e,t,n){Pl(e)&&n.delete(t)}function NE(){for(Kp=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=Ws(e.blockedOn),e!==null&&dS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Mf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Yt.shift()}Yn!==null&&Pl(Yn)&&(Yn=null),Zn!==null&&Pl(Zn)&&(Zn=null),Jn!==null&&Pl(Jn)&&(Jn=null),Os.forEach(Qy),Ns.forEach(Qy)}function os(e,t){e.blockedOn===t&&(e.blockedOn=null,Kp||(Kp=!0,Ce.unstable_scheduleCallback(Ce.unstable_NormalPriority,NE)))}function mS(e){function t(o){return os(o,e)}if(0<Yt.length){os(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yn!==null&&os(Yn,e),Zn!==null&&os(Zn,e),Jn!==null&&os(Jn,e),Os.forEach(t),Ns.forEach(t),n=0;n<ns.length;n++)r=ns[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ns.length&&(n=ns[0],n.blockedOn===null);)OE(n),n.blockedOn===null&&ns.shift()}function vl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fo={animationend:vl("Animation","AnimationEnd"),animationiteration:vl("Animation","AnimationIteration"),animationstart:vl("Animation","AnimationStart"),transitionend:vl("Transition","TransitionEnd")},dp={},gS={};yn&&(gS=document.createElement("div").style,"AnimationEvent"in window||(delete Fo.animationend.animation,delete Fo.animationiteration.animation,delete Fo.animationstart.animation),"TransitionEvent"in window||delete Fo.transitionend.transition);function cu(e){if(dp[e])return dp[e];if(!Fo[e])return e;var t=Fo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gS)return dp[e]=t[n];return e}var hS=cu("animationend"),yS=cu("animationiteration"),vS=cu("animationstart"),SS=cu("transitionend"),xS=new Map,Af=new Map,ME=["abort","abort",hS,"animationEnd",yS,"animationIteration",vS,"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",SS,"transitionEnd","waiting","waiting"];function Of(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)),Af.set(r,t),xS.set(r,o),Yr(o,[r])}}var DE=Ce.unstable_now;DE();var re=8;function Mo(e){if(1&e)return re=15,1;if(2&e)return re=14,2;if(4&e)return re=13,4;var t=24&e;return t!==0?(re=12,t):e&32?(re=11,32):(t=192&e,t!==0?(re=10,t):e&256?(re=9,256):(t=3584&e,t!==0?(re=8,t):e&4096?(re=7,4096):(t=4186112&e,t!==0?(re=6,t):(t=62914560&e,t!==0?(re=5,t):e&67108864?(re=4,67108864):e&134217728?(re=3,134217728):(t=805306368&e,t!==0?(re=2,t):1073741824&e?(re=1,1073741824):(re=8,e))))))}function FE(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 jE(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 Ms(e,t){var n=e.pendingLanes;if(n===0)return re=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=re=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Mo(l),o=re):(a&=i,a!==0&&(r=Mo(a),o=re))}else i=n&~s,i!==0?(r=Mo(i),o=re):a!==0&&(r=Mo(a),o=re);if(r===0)return 0;if(r=31-sr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Mo(t),o<=re)return t;re=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-sr(t),o=1<<n,r|=e[n],t&=~o;return r}function _S(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Do(24&~t),e===0?zl(10,t):e;case 10:return e=Do(192&~t),e===0?zl(8,t):e;case 8:return e=Do(3584&~t),e===0&&(e=Do(4186112&~t),e===0&&(e=512)),e;case 2:return t=Do(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Do(e){return e&-e}function pp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function du(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-sr(t),e[t]=n}var sr=Math.clz32?Math.clz32:UE,HE=Math.log,BE=Math.LN2;function UE(e){return e===0?32:31-(HE(e)/BE|0)|0}var zE=Ce.unstable_UserBlockingPriority,KE=Ce.unstable_runWithPriority,Rl=!0;function VE(e,t,n,r){Kr||Rf();var o=Nf,i=Kr;Kr=!0;try{aS(o,e,t,n,r)}finally{(Kr=i)||If()}}function WE(e,t,n,r){KE(zE,Nf.bind(null,e,t,n,r))}function Nf(e,t,n,r){if(Rl){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<Gy.indexOf(e))e=Vp(null,e,t,n,r),Yt.push(e);else{var i=Mf(e,t,n,r);if(i===null)o&&Xy(e,r);else{if(o){if(-1<Gy.indexOf(e)){e=Vp(i,e,t,n,r),Yt.push(e);return}if(AE(i,e,t,n,r))return;Xy(e,r)}NS(e,t,r,null,n)}}}}function Mf(e,t,n,r){var o=kf(r);if(o=Vr(o),o!==null){var i=Jr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=uS(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 NS(e,t,r,o,n),null}var Gn=null,Df=null,Il=null;function wS(){if(Il)return Il;var e,t=Df,n=t.length,r,o="value"in Gn?Gn.value:Gn.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 Il=o.slice(e,1<r?1-r:void 0)}function Ll(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 Sl(){return!0}function Yy(){return!1}function at(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)?Sl:Yy,this.isPropagationStopped=Yy,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=Sl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sl)},persist:function(){},isPersistent:Sl}),t}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ff=at(ri),Vs=ae({},ri,{view:0,detail:0}),$E=at(Vs),fp,mp,is,pu=ae({},Vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jf,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!==is&&(is&&e.type==="mousemove"?(fp=e.screenX-is.screenX,mp=e.screenY-is.screenY):mp=fp=0,is=e),fp)},movementY:function(e){return"movementY"in e?e.movementY:mp}}),Zy=at(pu),qE=ae({},pu,{dataTransfer:0}),GE=at(qE),XE=ae({},Vs,{relatedTarget:0}),gp=at(XE),QE=ae({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),YE=at(QE),ZE=ae({},ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),JE=at(ZE),eT=ae({},ri,{data:0}),Jy=at(eT),tT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nT={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"},rT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rT[e])?!!t[e]:!1}function jf(){return oT}var iT=ae({},Vs,{key:function(e){if(e.key){var t=tT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?nT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jf,charCode:function(e){return e.type==="keypress"?Ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sT=at(iT),aT=ae({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ev=at(aT),lT=ae({},Vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jf}),uT=at(lT),cT=ae({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),dT=at(cT),pT=ae({},pu,{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}),fT=at(pT),mT=[9,13,27,32],Hf=yn&&"CompositionEvent"in window,ws=null;yn&&"documentMode"in document&&(ws=document.documentMode);var gT=yn&&"TextEvent"in window&&!ws,bS=yn&&(!Hf||ws&&8<ws&&11>=ws),tv=String.fromCharCode(32),nv=!1;function CS(e,t){switch(e){case"keyup":return mT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ES(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jo=!1;function hT(e,t){switch(e){case"compositionend":return ES(t);case"keypress":return t.which!==32?null:(nv=!0,tv);case"textInput":return e=t.data,e===tv&&nv?null:e;default:return null}}function yT(e,t){if(jo)return e==="compositionend"||!Hf&&CS(e,t)?(e=wS(),Il=Df=Gn=null,jo=!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 bS&&t.locale!=="ko"?null:t.data;default:return null}}var vT={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 rv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vT[e.type]:t==="textarea"}function TS(e,t,n,r){iS(r),t=Kl(t,"onChange"),0<t.length&&(n=new Ff("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bs=null,Ds=null;function ST(e){LS(e,0)}function fu(e){var t=Bo(e);if(Zv(t))return e}function xT(e,t){if(e==="change")return t}var kS=!1;yn&&(yn?(_l="oninput"in document,_l||(hp=document.createElement("div"),hp.setAttribute("oninput","return;"),_l=typeof hp.oninput=="function"),xl=_l):xl=!1,kS=xl&&(!document.documentMode||9<document.documentMode));var xl,_l,hp;function ov(){bs&&(bs.detachEvent("onpropertychange",PS),Ds=bs=null)}function PS(e){if(e.propertyName==="value"&&fu(Ds)){var t=[];if(TS(t,Ds,e,kf(e)),e=ST,Kr)e(t);else{Kr=!0;try{Pf(e,t)}finally{Kr=!1,If()}}}}function _T(e,t,n){e==="focusin"?(ov(),bs=t,Ds=n,bs.attachEvent("onpropertychange",PS)):e==="focusout"&&ov()}function wT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fu(Ds)}function bT(e,t){if(e==="click")return fu(t)}function CT(e,t){if(e==="input"||e==="change")return fu(t)}function ET(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:ET,TT=Object.prototype.hasOwnProperty;function Fs(e,t){if(wt(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(!TT.call(t,n[r])||!wt(e[n[r]],t[n[r]]))return!1;return!0}function iv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sv(e,t){var n=iv(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=iv(n)}}function RS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?RS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function av(){for(var e=window,t=Hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hl(e.document)}return t}function Wp(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 kT=yn&&"documentMode"in document&&11>=document.documentMode,Ho=null,$p=null,Cs=null,qp=!1;function lv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qp||Ho==null||Ho!==Hl(r)||(r=Ho,"selectionStart"in r&&Wp(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}),Cs&&Fs(Cs,r)||(Cs=r,r=Kl($p,"onSelect"),0<r.length&&(t=new Ff("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ho)))}Of("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);Of("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);Of(ME,2);for(yp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),wl=0;wl<yp.length;wl++)Af.set(yp[wl],0);var yp,wl;Jo("onMouseEnter",["mouseout","mouseover"]);Jo("onMouseLeave",["mouseout","mouseover"]);Jo("onPointerEnter",["pointerout","pointerover"]);Jo("onPointerLeave",["pointerout","pointerover"]);Yr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),IS=new Set("cancel close invalid load scroll toggle".split(" ").concat(gs));function uv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,IE(r,t,void 0,e),e.currentTarget=null}function LS(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;uv(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;uv(o,a,u),i=l}}}if(Ul)throw e=zp,Ul=!1,zp=null,e}function ie(e,t){var n=DS(t),r=e+"__bubble";n.has(r)||(OS(t,e,2,!1),n.add(r))}var cv="_reactListening"+Math.random().toString(36).slice(2);function AS(e){e[cv]||(e[cv]=!0,Xv.forEach(function(t){IS.has(t)||dv(t,!1,e,null),dv(t,!0,e,null)}))}function dv(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&&IS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=DS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),OS(i,e,o,t),s.add(a))}function OS(e,t,n,r){var o=Af.get(t);switch(o===void 0?2:o){case 0:o=VE;break;case 1:o=WE;break;default:o=Nf}n=o.bind(null,t,n,e),o=void 0,!Up||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 NS(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=Vr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}TE(function(){var u=i,c=kf(n),p=[];e:{var d=xS.get(e);if(d!==void 0){var g=Ff,y=e;switch(e){case"keypress":if(Ll(n)===0)break e;case"keydown":case"keyup":g=sT;break;case"focusin":y="focus",g=gp;break;case"focusout":y="blur",g=gp;break;case"beforeblur":case"afterblur":g=gp;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":g=Zy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=GE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=uT;break;case hS:case yS:case vS:g=YE;break;case SS:g=dT;break;case"scroll":g=$E;break;case"wheel":g=fT;break;case"copy":case"cut":case"paste":g=JE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=ev}var v=(t&4)!==0,m=!v&&e==="scroll",h=v?d!==null?d+"Capture":null:d;v=[];for(var f=u,x;f!==null;){x=f;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,h!==null&&(_=As(f,h),_!=null&&v.push(js(f,_,x)))),m)break;f=f.return}0<v.length&&(d=new g(d,y,null,n,c),p.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(Vr(y)||y[oi]))break e;if((g||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=u,y=y?Vr(y):null,y!==null&&(m=Jr(y),y!==m||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(v=Zy,_="onMouseLeave",h="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(v=ev,_="onPointerLeave",h="onPointerEnter",f="pointer"),m=g==null?d:Bo(g),x=y==null?d:Bo(y),d=new v(_,f+"leave",g,n,c),d.target=m,d.relatedTarget=x,_=null,Vr(c)===u&&(v=new v(h,f+"enter",y,n,c),v.target=x,v.relatedTarget=m,_=v),m=_,g&&y)t:{for(v=g,h=y,f=0,x=v;x;x=No(x))f++;for(x=0,_=h;_;_=No(_))x++;for(;0<f-x;)v=No(v),f--;for(;0<x-f;)h=No(h),x--;for(;f--;){if(v===h||h!==null&&v===h.alternate)break t;v=No(v),h=No(h)}v=null}else v=null;g!==null&&pv(p,d,g,v,!1),y!==null&&m!==null&&pv(p,m,y,v,!0)}}e:{if(d=u?Bo(u):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var b=xT;else if(rv(d))if(kS)b=CT;else{b=wT;var C=_T}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=bT);if(b&&(b=b(e,u))){TS(p,b,n,c);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Op(d,"number",d.value)}switch(C=u?Bo(u):window,e){case"focusin":(rv(C)||C.contentEditable==="true")&&(Ho=C,$p=u,Cs=null);break;case"focusout":Cs=$p=Ho=null;break;case"mousedown":qp=!0;break;case"contextmenu":case"mouseup":case"dragend":qp=!1,lv(p,n,c);break;case"selectionchange":if(kT)break;case"keydown":case"keyup":lv(p,n,c)}var E;if(Hf)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else jo?CS(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(bS&&n.locale!=="ko"&&(jo||I!=="onCompositionStart"?I==="onCompositionEnd"&&jo&&(E=wS()):(Gn=c,Df="value"in Gn?Gn.value:Gn.textContent,jo=!0)),C=Kl(u,I),0<C.length&&(I=new Jy(I,e,null,n,c),p.push({event:I,listeners:C}),E?I.data=E:(E=ES(n),E!==null&&(I.data=E)))),(E=gT?hT(e,n):yT(e,n))&&(u=Kl(u,"onBeforeInput"),0<u.length&&(c=new Jy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=E))}LS(p,t)})}function js(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=As(e,n),i!=null&&r.unshift(js(e,i,o)),i=As(e,t),i!=null&&r.push(js(e,i,o))),e=e.return}return r}function No(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pv(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=As(n,i),l!=null&&s.unshift(js(n,l,a))):o||(l=As(n,i),l!=null&&s.push(js(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Vl(){}var vp=null,Sp=null;function MS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Gp(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 fv=typeof setTimeout=="function"?setTimeout:void 0,PT=typeof clearTimeout=="function"?clearTimeout:void 0;function Bf(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function qo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function mv(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 xp=0;function RT(e){return{$$typeof:Ef,toString:e,valueOf:e}}var mu=Math.random().toString(36).slice(2),Xn="__reactFiber$"+mu,Wl="__reactProps$"+mu,oi="__reactContainer$"+mu,gv="__reactEvents$"+mu;function Vr(e){var t=e[Xn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oi]||n[Xn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mv(e);e!==null;){if(n=e[Xn])return n;e=mv(e)}return t}e=n,n=e.parentNode}return null}function Ws(e){return e=e[Xn]||e[oi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Bo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function gu(e){return e[Wl]||null}function DS(e){var t=e[gv];return t===void 0&&(t=e[gv]=new Set),t}var Xp=[],Uo=-1;function cr(e){return{current:e}}function se(e){0>Uo||(e.current=Xp[Uo],Xp[Uo]=null,Uo--)}function pe(e,t){Uo++,Xp[Uo]=e.current,e.current=t}var ar={},Fe=cr(ar),et=cr(!1),Gr=ar;function ei(e,t){var n=e.type.contextTypes;if(!n)return ar;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 tt(e){return e=e.childContextTypes,e!=null}function $l(){se(et),se(Fe)}function hv(e,t,n){if(Fe.current!==ar)throw Error(T(168));pe(Fe,t),pe(et,n)}function FS(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,Ko(t)||"Unknown",o));return ae({},n,r)}function Al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Gr=Fe.current,pe(Fe,e),pe(et,et.current),!0}function yv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=FS(e,t,Gr),r.__reactInternalMemoizedMergedChildContext=e,se(et),se(Fe),pe(Fe,e)):se(et),pe(et,n)}var Uf=null,qr=null,IT=Ce.unstable_runWithPriority,zf=Ce.unstable_scheduleCallback,Qp=Ce.unstable_cancelCallback,LT=Ce.unstable_shouldYield,vv=Ce.unstable_requestPaint,Yp=Ce.unstable_now,AT=Ce.unstable_getCurrentPriorityLevel,hu=Ce.unstable_ImmediatePriority,jS=Ce.unstable_UserBlockingPriority,HS=Ce.unstable_NormalPriority,BS=Ce.unstable_LowPriority,US=Ce.unstable_IdlePriority,_p={},OT=vv!==void 0?vv:function(){},pn=null,Ol=null,wp=!1,Sv=Yp(),Me=1e4>Sv?Yp:function(){return Yp()-Sv};function ti(){switch(AT()){case hu:return 99;case jS:return 98;case HS:return 97;case BS:return 96;case US:return 95;default:throw Error(T(332))}}function zS(e){switch(e){case 99:return hu;case 98:return jS;case 97:return HS;case 96:return BS;case 95:return US;default:throw Error(T(332))}}function Xr(e,t){return e=zS(e),IT(e,t)}function Hs(e,t,n){return e=zS(e),zf(e,t,n)}function nn(){if(Ol!==null){var e=Ol;Ol=null,Qp(e)}KS()}function KS(){if(!wp&&pn!==null){wp=!0;var e=0;try{var t=pn;Xr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),pn=null}catch(n){throw pn!==null&&(pn=pn.slice(e+1)),zf(hu,nn),n}finally{wp=!1}}}var NT=Zr.ReactCurrentBatchConfig;function Ft(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 ql=cr(null),Gl=null,zo=null,Xl=null;function Kf(){Xl=zo=Gl=null}function Vf(e){var t=ql.current;se(ql),e.type._context._currentValue=t}function VS(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 Go(e,t){Gl=e,Xl=zo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function Et(e,t){if(Xl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Xl=e,t=1073741823),t={context:e,observedBits:t,next:null},zo===null){if(Gl===null)throw Error(T(308));zo=t,Gl.dependencies={lanes:0,firstContext:t,responders:null}}else zo=zo.next=t;return e._currentValue}var $n=!1;function Wf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function WS(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 er(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(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 xv(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;$n=!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 g=e,y=i;switch(a=t,d=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){p=g.call(d,p,a);break e}p=g;break e;case 3:g.flags=g.flags&-4097|64;case 0:if(g=y.payload,a=typeof g=="function"?g.call(d,p,a):g,a==null)break e;p=ae({},p,a);break e;case 2:$n=!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,qs|=s,e.lanes=s,e.memoizedState=p}}function _v(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 $S=new au.Component().refs;function Ql(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 yu={isMounted:function(e){return(e=e._reactInternals)?Jr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=st(),o=nr(e),i=er(r,o);i.payload=t,n!=null&&(i.callback=n),tr(e,i),rr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=st(),o=nr(e),i=er(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),tr(e,i),rr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=st(),r=nr(e),o=er(n,r);o.tag=2,t!=null&&(o.callback=t),tr(e,o),rr(e,r,n)}};function wv(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?!Fs(n,r)||!Fs(o,i):!0}function qS(e,t,n){var r=!1,o=ar,i=t.contextType;return typeof i=="object"&&i!==null?i=Et(i):(o=tt(t)?Gr:Fe.current,r=t.contextTypes,i=(r=r!=null)?ei(e,o):ar),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function bv(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&&yu.enqueueReplaceState(t,t.state,null)}function Zp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=$S,Wf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Et(i):(i=tt(t)?Gr:Fe.current,o.context=ei(e,i)),Bs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ql(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&&yu.enqueueReplaceState(o,o.state,null),Bs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var bl=Array.isArray;function ss(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===$S&&(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 Cl(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 GS(e){function t(m,h){if(e){var f=m.lastEffect;f!==null?(f.nextEffect=h,m.lastEffect=h):m.firstEffect=m.lastEffect=h,h.nextEffect=null,h.flags=8}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function r(m,h){for(m=new Map;h!==null;)h.key!==null?m.set(h.key,h):m.set(h.index,h),h=h.sibling;return m}function o(m,h){return m=ur(m,h),m.index=0,m.sibling=null,m}function i(m,h,f){return m.index=f,e?(f=m.alternate,f!==null?(f=f.index,f<h?(m.flags=2,h):f):(m.flags=2,h)):h}function s(m){return e&&m.alternate===null&&(m.flags=2),m}function a(m,h,f,x){return h===null||h.tag!==6?(h=kp(f,m.mode,x),h.return=m,h):(h=o(h,f),h.return=m,h)}function l(m,h,f,x){return h!==null&&h.elementType===f.type?(x=o(h,f.props),x.ref=ss(m,h,f),x.return=m,x):(x=Fl(f.type,f.key,f.props,null,m.mode,x),x.ref=ss(m,h,f),x.return=m,x)}function u(m,h,f,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==f.containerInfo||h.stateNode.implementation!==f.implementation?(h=Pp(f,m.mode,x),h.return=m,h):(h=o(h,f.children||[]),h.return=m,h)}function c(m,h,f,x,_){return h===null||h.tag!==7?(h=Zo(f,m.mode,x,_),h.return=m,h):(h=o(h,f),h.return=m,h)}function p(m,h,f){if(typeof h=="string"||typeof h=="number")return h=kp(""+h,m.mode,f),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case fs:return f=Fl(h.type,h.key,h.props,null,m.mode,f),f.ref=ss(m,null,h),f.return=m,f;case zr:return h=Pp(h,m.mode,f),h.return=m,h}if(bl(h)||ts(h))return h=Zo(h,m.mode,f,null),h.return=m,h;Cl(m,h)}return null}function d(m,h,f,x){var _=h!==null?h.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(m,h,""+f,x);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case fs:return f.key===_?f.type===qn?c(m,h,f.props.children,x,_):l(m,h,f,x):null;case zr:return f.key===_?u(m,h,f,x):null}if(bl(f)||ts(f))return _!==null?null:c(m,h,f,x,null);Cl(m,f)}return null}function g(m,h,f,x,_){if(typeof x=="string"||typeof x=="number")return m=m.get(f)||null,a(h,m,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fs:return m=m.get(x.key===null?f:x.key)||null,x.type===qn?c(h,m,x.props.children,_,x.key):l(h,m,x,_);case zr:return m=m.get(x.key===null?f:x.key)||null,u(h,m,x,_)}if(bl(x)||ts(x))return m=m.get(f)||null,c(h,m,x,_,null);Cl(h,x)}return null}function y(m,h,f,x){for(var _=null,b=null,C=h,E=h=0,I=null;C!==null&&E<f.length;E++){C.index>E?(I=C,C=null):I=C.sibling;var P=d(m,C,f[E],x);if(P===null){C===null&&(C=I);break}e&&C&&P.alternate===null&&t(m,C),h=i(P,h,E),b===null?_=P:b.sibling=P,b=P,C=I}if(E===f.length)return n(m,C),_;if(C===null){for(;E<f.length;E++)C=p(m,f[E],x),C!==null&&(h=i(C,h,E),b===null?_=C:b.sibling=C,b=C);return _}for(C=r(m,C);E<f.length;E++)I=g(C,m,E,f[E],x),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?E:I.key),h=i(I,h,E),b===null?_=I:b.sibling=I,b=I);return e&&C.forEach(function(K){return t(m,K)}),_}function v(m,h,f,x){var _=ts(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var b=_=null,C=h,E=h=0,I=null,P=f.next();C!==null&&!P.done;E++,P=f.next()){C.index>E?(I=C,C=null):I=C.sibling;var K=d(m,C,P.value,x);if(K===null){C===null&&(C=I);break}e&&C&&K.alternate===null&&t(m,C),h=i(K,h,E),b===null?_=K:b.sibling=K,b=K,C=I}if(P.done)return n(m,C),_;if(C===null){for(;!P.done;E++,P=f.next())P=p(m,P.value,x),P!==null&&(h=i(P,h,E),b===null?_=P:b.sibling=P,b=P);return _}for(C=r(m,C);!P.done;E++,P=f.next())P=g(C,m,E,P.value,x),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?E:P.key),h=i(P,h,E),b===null?_=P:b.sibling=P,b=P);return e&&C.forEach(function(D){return t(m,D)}),_}return function(m,h,f,x){var _=typeof f=="object"&&f!==null&&f.type===qn&&f.key===null;_&&(f=f.props.children);var b=typeof f=="object"&&f!==null;if(b)switch(f.$$typeof){case fs:e:{for(b=f.key,_=h;_!==null;){if(_.key===b){switch(_.tag){case 7:if(f.type===qn){n(m,_.sibling),h=o(_,f.props.children),h.return=m,m=h;break e}break;default:if(_.elementType===f.type){n(m,_.sibling),h=o(_,f.props),h.ref=ss(m,_,f),h.return=m,m=h;break e}}n(m,_);break}else t(m,_);_=_.sibling}f.type===qn?(h=Zo(f.props.children,m.mode,x,f.key),h.return=m,m=h):(x=Fl(f.type,f.key,f.props,null,m.mode,x),x.ref=ss(m,h,f),x.return=m,m=x)}return s(m);case zr:e:{for(_=f.key;h!==null;){if(h.key===_)if(h.tag===4&&h.stateNode.containerInfo===f.containerInfo&&h.stateNode.implementation===f.implementation){n(m,h.sibling),h=o(h,f.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Pp(f,m.mode,x),h.return=m,m=h}return s(m)}if(typeof f=="string"||typeof f=="number")return f=""+f,h!==null&&h.tag===6?(n(m,h.sibling),h=o(h,f),h.return=m,m=h):(n(m,h),h=kp(f,m.mode,x),h.return=m,m=h),s(m);if(bl(f))return y(m,h,f,x);if(ts(f))return v(m,h,f,x);if(b&&Cl(m,f),typeof f>"u"&&!_)switch(m.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ko(m.type)||"Component"))}return n(m,h)}}var Yl=GS(!0),XS=GS(!1),$s={},en=cr($s),Us=cr($s),zs=cr($s);function Wr(e){if(e===$s)throw Error(T(174));return e}function Jp(e,t){switch(pe(zs,t),pe(Us,e),pe(en,$s),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fp(t,e)}se(en),pe(en,t)}function ni(){se(en),se(Us),se(zs)}function Cv(e){Wr(zs.current);var t=Wr(en.current),n=Fp(t,e.type);t!==n&&(pe(Us,e),pe(en,n))}function $f(e){Us.current===e&&(se(en),se(Us))}var de=cr(0);function Zl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Qn=null,tn=!1;function QS(e,t){var n=bt(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 Ev(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 ef(e){if(tn){var t=Qn;if(t){var n=t;if(!Ev(e,t)){if(t=qo(n.nextSibling),!t||!Ev(e,t)){e.flags=e.flags&-1025|2,tn=!1,mn=e;return}QS(mn,n)}mn=e,Qn=qo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,mn=e}}function Tv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function El(e){if(e!==mn)return!1;if(!tn)return Tv(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Gp(t,e.memoizedProps))for(t=Qn;t;)QS(e,t),t=qo(t.nextSibling);if(Tv(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=qo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qn=null}}else Qn=mn?qo(e.stateNode.nextSibling):null;return!0}function bp(){Qn=mn=null,tn=!1}var Xo=[];function qf(){for(var e=0;e<Xo.length;e++)Xo[e]._workInProgressVersionPrimary=null;Xo.length=0}var Es=Zr.ReactCurrentDispatcher,Ct=Zr.ReactCurrentBatchConfig,Ks=0,he=null,Ne=null,Re=null,Jl=!1,Ts=!1;function Ze(){throw Error(T(321))}function Gf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Xf(e,t,n,r,o,i){if(Ks=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Es.current=e===null||e.memoizedState===null?DT:FT,e=n(r,o),Ts){i=0;do{if(Ts=!1,!(25>i))throw Error(T(301));i+=1,Re=Ne=null,t.updateQueue=null,Es.current=jT,e=n(r,o)}while(Ts)}if(Es.current=ru,t=Ne!==null&&Ne.next!==null,Ks=0,Re=Ne=he=null,Jl=!1,t)throw Error(T(300));return e}function $r(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?he.memoizedState=Re=e:Re=Re.next=e,Re}function eo(){if(Ne===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Re===null?he.memoizedState:Re.next;if(t!==null)Re=t,Ne=e;else{if(e===null)throw Error(T(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Re===null?he.memoizedState=Re=e:Re=Re.next=e}return Re}function Zt(e,t){return typeof t=="function"?t(e):t}function as(e){var t=eo(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Ne,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((Ks&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,he.lanes|=u,qs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,wt(r,t.memoizedState)||(jt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ls(e){var t=eo(),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);wt(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function kv(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=(Ks&e)===e)&&(t._workInProgressVersionPrimary=r,Xo.push(t))),e)return n(t._source);throw Xo.push(t),Error(T(350))}function YS(e,t,n,r){var o=Ve;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Es.current,l=a.useState(function(){return kv(o,t,n)}),u=l[1],c=l[0];l=Re;var p=e.memoizedState,d=p.refs,g=d.getSnapshot,y=p.source;p=p.subscribe;var v=he;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var m=i(t._source);if(!wt(s,m)){m=n(t._source),wt(c,m)||(u(m),m=nr(v),o.mutableReadLanes|=m&o.pendingLanes),m=o.mutableReadLanes,o.entangledLanes|=m;for(var h=o.entanglements,f=m;0<f;){var x=31-sr(f),_=1<<x;h[x]|=m,f&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var m=d.getSnapshot,h=d.setSnapshot;try{h(m(t._source));var f=nr(v);o.mutableReadLanes|=f&o.pendingLanes}catch(x){h(function(){throw x})}})},[t,r]),wt(g,n)&&wt(y,t)&&wt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Zf.bind(null,he,e),l.queue=e,l.baseQueue=null,c=kv(o,t,n),l.memoizedState=l.baseState=c),c}function ZS(e,t,n){var r=eo();return YS(r,e,t,n)}function us(e){var t=$r();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Zf.bind(null,he,e),[t.memoizedState,e]}function eu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null},he.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Pv(e){var t=$r();return e={current:e},t.memoizedState=e}function tu(){return eo().memoizedState}function tf(e,t,n,r){var o=$r();he.flags|=e,o.memoizedState=eu(1|t,n,void 0,r===void 0?null:r)}function Qf(e,t,n,r){var o=eo();r=r===void 0?null:r;var i=void 0;if(Ne!==null){var s=Ne.memoizedState;if(i=s.destroy,r!==null&&Gf(r,s.deps)){eu(t,n,i,r);return}}he.flags|=e,o.memoizedState=eu(1|t,n,i,r)}function Rv(e,t){return tf(516,4,e,t)}function nu(e,t){return Qf(516,4,e,t)}function JS(e,t){return Qf(4,2,e,t)}function e0(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 t0(e,t,n){return n=n!=null?n.concat([e]):null,Qf(4,2,e0.bind(null,t,e),n)}function Yf(){}function n0(e,t){var n=eo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function r0(e,t){var n=eo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Gf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function MT(e,t){var n=ti();Xr(98>n?98:n,function(){e(!0)}),Xr(97<n?97:n,function(){var r=Ct.transition;Ct.transition=1;try{e(!1),t()}finally{Ct.transition=r}})}function Zf(e,t,n){var r=st(),o=nr(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===he||s!==null&&s===he)Ts=Jl=!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,wt(l,a))return}catch{}finally{}rr(e,o,r)}}var ru={readContext:Et,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useOpaqueIdentifier:Ze,unstable_isNewReconciler:!1},DT={readContext:Et,useCallback:function(e,t){return $r().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Rv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,tf(4,2,e0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tf(4,2,e,t)},useMemo:function(e,t){var n=$r();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$r();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=Zf.bind(null,he,e),[r.memoizedState,e]},useRef:Pv,useState:us,useDebugValue:Yf,useDeferredValue:function(e){var t=us(e),n=t[0],r=t[1];return Rv(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=us(!1),t=e[0];return e=MT.bind(null,e[1]),Pv(e),[e,t]},useMutableSource:function(e,t,n){var r=$r();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},YS(r,e,t,n)},useOpaqueIdentifier:function(){if(tn){var e=!1,t=RT(function(){throw e||(e=!0,n("r:"+(xp++).toString(36))),Error(T(355))}),n=us(t)[1];return!(he.mode&2)&&(he.flags|=516,eu(5,function(){n("r:"+(xp++).toString(36))},void 0,null)),t}return t="r:"+(xp++).toString(36),us(t),t},unstable_isNewReconciler:!1},FT={readContext:Et,useCallback:n0,useContext:Et,useEffect:nu,useImperativeHandle:t0,useLayoutEffect:JS,useMemo:r0,useReducer:as,useRef:tu,useState:function(){return as(Zt)},useDebugValue:Yf,useDeferredValue:function(e){var t=as(Zt),n=t[0],r=t[1];return nu(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=as(Zt)[0];return[tu().current,e]},useMutableSource:ZS,useOpaqueIdentifier:function(){return as(Zt)[0]},unstable_isNewReconciler:!1},jT={readContext:Et,useCallback:n0,useContext:Et,useEffect:nu,useImperativeHandle:t0,useLayoutEffect:JS,useMemo:r0,useReducer:ls,useRef:tu,useState:function(){return ls(Zt)},useDebugValue:Yf,useDeferredValue:function(e){var t=ls(Zt),n=t[0],r=t[1];return nu(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=ls(Zt)[0];return[tu().current,e]},useMutableSource:ZS,useOpaqueIdentifier:function(){return ls(Zt)[0]},unstable_isNewReconciler:!1},HT=Zr.ReactCurrentOwner,jt=!1;function Je(e,t,n,r){t.child=e===null?XS(t,null,n,r):Yl(t,e.child,n,r)}function Iv(e,t,n,r,o){n=n.render;var i=t.ref;return Go(t,o),r=Xf(e,t,n,r,i,o),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Je(e,t,r,o),t.child)}function Lv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!om(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,o0(e,t,s,r,o,i)):(e=Fl(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:Fs,n(o,r)&&e.ref===t.ref)?gn(e,t,i):(t.flags|=1,e=ur(s,r),e.ref=t.ref,e.return=t,t.child=e)}function o0(e,t,n,r,o,i){if(e!==null&&Fs(e.memoizedProps,r)&&e.ref===t.ref)if(jt=!1,(i&o)!==0)e.flags&16384&&(jt=!0);else return t.lanes=e.lanes,gn(e,t,i);return nf(e,t,n,r,i)}function Cp(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},kl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},kl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},kl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,kl(t,r);return Je(e,t,o,n),t.child}function i0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function nf(e,t,n,r,o){var i=tt(n)?Gr:Fe.current;return i=ei(t,i),Go(t,o),n=Xf(e,t,n,r,i,o),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Je(e,t,n,o),t.child)}function Av(e,t,n,r,o){if(tt(n)){var i=!0;Al(t)}else i=!1;if(Go(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),qS(t,n,r),Zp(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Et(u):(u=tt(n)?Gr:Fe.current,u=ei(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)&&bv(t,s,r,u),$n=!1;var d=t.memoizedState;s.state=d,Bs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||et.current||$n?(typeof c=="function"&&(Ql(t,n,c,r),l=t.memoizedState),(a=$n||wv(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,WS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ft(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=tt(n)?Gr:Fe.current,l=ei(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&bv(t,s,r,l),$n=!1,d=t.memoizedState,s.state=d,Bs(t,r,s,o);var y=t.memoizedState;a!==p||d!==y||et.current||$n?(typeof g=="function"&&(Ql(t,n,g,r),y=t.memoizedState),(u=$n||wv(t,n,u,r,d,y,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,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=y),s.props=r,s.state=y,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 rf(e,t,n,r,i,o)}function rf(e,t,n,r,o,i){i0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&yv(t,n,!1),gn(e,t,i);r=t.stateNode,HT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Yl(t,e.child,null,i),t.child=Yl(t,null,a,i)):Je(e,t,a,i),t.memoizedState=r.state,o&&yv(t,n,!0),t.child}function Ov(e){var t=e.stateNode;t.pendingContext?hv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hv(e,t.context,!1),Jp(e,t.containerInfo)}var Tl={dehydrated:null,retryLane:0};function Nv(e,t,n){var r=t.pendingProps,o=de.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),pe(de,o&1),e===null?(r.fallback!==void 0&&ef(t),e=r.children,o=r.fallback,i?(e=Mv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Tl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Mv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Tl,t.lanes=33554432,e):(n=im({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Fv(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=Tl,r):(n=Dv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Fv(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=Tl,r):(n=Dv(e,t,r.children,n),t.memoizedState=null,n)}function Mv(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=im(t,o,0,null),n=Zo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Dv(e,t,n,r){var o=e.child;return e=o.sibling,n=ur(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 Fv(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=ur(s,a),e!==null?r=ur(e,r):(r=Zo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function jv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),VS(e.return,t)}function Ep(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 Hv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Je(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jv(e,n);else if(e.tag===19)jv(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pe(de,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Zl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ep(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&&Zl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ep(t,!0,n,null,i,t.lastEffect);break;case"together":Ep(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qs|=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=ur(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ur(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var s0,of,a0,l0;s0=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}};of=function(){};a0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Wr(en.current);var i=null;switch(n){case"input":o=Lp(e,o),r=Lp(e,r),i=[];break;case"option":o=Np(e,o),r=Np(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Mp(e,o),r=Mp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vl)}jp(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"&&(Is.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"&&(Is.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===Ef?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};l0=function(e,t,n,r){n!==r&&(t.flags|=4)};function cs(e,t){if(!tn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function BT(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 tt(t.type)&&$l(),null;case 3:return ni(),se(et),se(Fe),qf(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(El(t)?t.flags|=4:r.hydrate||(t.flags|=256)),of(t),null;case 5:$f(t);var o=Wr(zs.current);if(n=t.type,e!==null&&t.stateNode!=null)a0(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=Wr(en.current),El(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Xn]=t,r[Wl]=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<gs.length;e++)ie(gs[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":Uy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ky(r,i),ie("invalid",r)}jp(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]):Is.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":hl(r),zy(r,i,!0);break;case"textarea":hl(r),Vy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Vl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Dp.html&&(e=tS(n)),e===Dp.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[Xn]=t,e[Wl]=r,s0(e,t,!1,!1),t.stateNode=e,s=Hp(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<gs.length;o++)ie(gs[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":Uy(e,r),o=Lp(e,r),ie("invalid",e);break;case"option":o=Np(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ky(e,r),o=Mp(e,r),ie("invalid",e);break;default:o=r}jp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?oS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&nS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ls(e,l):typeof l=="number"&&Ls(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Is.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&Sf(e,i,l,s))}switch(n){case"input":hl(e),zy(e,r,!1);break;case"textarea":hl(e),Vy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ir(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Vo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Vo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Vl)}MS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)l0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Wr(zs.current),Wr(en.current),El(t)?(r=t.stateNode,n=t.memoizedProps,r[Xn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xn]=t,t.stateNode=r)}return null;case 13:return se(de),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&El(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||de.current&1?Ie===0&&(Ie=3):((Ie===0||Ie===3)&&(Ie=4),Ve===null||!(qs&134217727)&&!(si&134217727)||Qo(Ve,De))),(r||n)&&(t.flags|=4),null);case 4:return ni(),of(t),e===null&&AS(t.stateNode.containerInfo),null;case 10:return Vf(t),null;case 17:return tt(t.type)&&$l(),null;case 19:if(se(de),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)cs(r,!1);else{if(Ie!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Zl(e),s!==null){for(t.flags|=64,cs(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pe(de,de.current&1|2),t.child}e=e.sibling}r.tail!==null&&Me()>df&&(t.flags|=64,i=!0,cs(r,!1),t.lanes=33554432)}else{if(!i)if(e=Zl(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Me()-r.renderingStartTime>df&&n!==1073741824&&(t.flags|=64,i=!0,cs(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=Me(),n.sibling=null,t=de.current,pe(de,i?t&1|2:t&1),n):null;case 23:case 24:return rm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function UT(e){switch(e.tag){case 1:tt(e.type)&&$l();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ni(),se(et),se(Fe),qf(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return $f(e),null;case 13:return se(de),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(de),null;case 4:return ni(),null;case 10:return Vf(e),null;case 23:case 24:return rm(),null;default:return null}}function Jf(e,t){try{var n="",r=t;do n+=_E(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{lp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ms(e):""}function xE(e){switch(e.tag){case 5:return ms(e.type);case 16:return ms("Lazy");case 13:return ms("Suspense");case 19:return ms("SuspenseList");case 0:case 2:case 15:return e=gl(e.type,!1),e;case 11:return e=gl(e.type.render,!1),e;case 22:return e=gl(e.type._render,!1),e;case 1:return e=gl(e.type,!0),e;default:return""}}function Ko(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 qn:return"Fragment";case zr:return"Portal";case vs:return"Profiler";case Sf:return"StrictMode";case Ss:return"Suspense";case jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _f:return(e.displayName||"Context")+".Consumer";case xf:return(e._context.displayName||"Context")+".Provider";case lu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case uu:return Ko(e.type);case bf:return Ko(e._render);case wf:t=e._payload,e=e._init;try{return Ko(e(t))}catch{}}return null}function ir(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _E(e){var t=Qv(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 hl(e){e._valueTracker||(e._valueTracker=_E(e))}function Yv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Bl(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 Ip(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ir(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zv(e,t){t=t.checked,t!=null&&vf(e,"checked",t,!1)}function Lp(e,t){Zv(e,t);var n=ir(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")?Ap(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ap(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Uy(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 Ap(e,t,n){(t!=="number"||Bl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function wE(e){var t="";return au.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Op(e,t){return e=ae({children:void 0},t),(t=wE(t.children))&&(e.children=t),e}function Vo(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=""+ir(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 Np(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zy(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:ir(n)}}function Jv(e,t){var n=ir(t.value),r=ir(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 Ky(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Mp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function eS(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 Dp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?eS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yl,tS=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!==Mp.svg||"innerHTML"in e)e.innerHTML=t;else{for(yl=yl||document.createElement("div"),yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ls(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xs={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},bE=["Webkit","ms","Moz","O"];Object.keys(xs).forEach(function(e){bE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xs[t]=xs[e]})});function nS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xs.hasOwnProperty(e)&&xs[e]?(""+t).trim():t+"px"}function rS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=nS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var CE=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 Fp(e,t){if(t){if(CE[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 jp(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 Tf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bp=null,Wo=null,$o=null;function Vy(e){if(e=Ws(e)){if(typeof Bp!="function")throw Error(T(280));var t=e.stateNode;t&&(t=gu(t),Bp(e.stateNode,e.type,t))}}function oS(e){Wo?$o?$o.push(e):$o=[e]:Wo=e}function iS(){if(Wo){var e=Wo,t=$o;if($o=Wo=null,Vy(e),t)for(e=0;e<t.length;e++)Vy(t[e])}}function kf(e,t){return e(t)}function sS(e,t,n,r,o){return e(t,n,r,o)}function Pf(){}var aS=kf,Kr=!1,up=!1;function Rf(){(Wo!==null||$o!==null)&&(Pf(),iS())}function EE(e,t,n){if(up)return e(t,n);up=!0;try{return aS(e,t,n)}finally{up=!1,Rf()}}function As(e,t){var n=e.stateNode;if(n===null)return null;var r=gu(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 Hp=!1;if(yn)try{Oo={},Object.defineProperty(Oo,"passive",{get:function(){Hp=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Hp=!1}var Oo;function TE(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 _s=!1,Hl=null,Ul=!1,Up=null,kE={onError:function(e){_s=!0,Hl=e}};function PE(e,t,n,r,o,i,s,a,l){_s=!1,Hl=null,TE.apply(kE,arguments)}function RE(e,t,n,r,o,i,s,a,l){if(PE.apply(this,arguments),_s){if(_s){var u=Hl;_s=!1,Hl=null}else throw Error(T(198));Ul||(Ul=!0,Up=u)}}function Jr(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 lS(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 Wy(e){if(Jr(e)!==e)throw Error(T(188))}function IE(e){var t=e.alternate;if(!t){if(t=Jr(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 Wy(o),e;if(i===r)return Wy(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 uS(e){if(e=IE(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 $y(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var cS,If,dS,pS,zp=!1,Yt=[],Yn=null,Zn=null,Jn=null,Os=new Map,Ns=new Map,ns=[],qy="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 Kp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Gy(e,t){switch(e){case"focusin":case"focusout":Yn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Jn=null;break;case"pointerover":case"pointerout":Os.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function rs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Kp(t,n,r,o,i),t!==null&&(t=Ws(t),t!==null&&If(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function LE(e,t,n,r,o){switch(t){case"focusin":return Yn=rs(Yn,e,t,n,r,o),!0;case"dragenter":return Zn=rs(Zn,e,t,n,r,o),!0;case"mouseover":return Jn=rs(Jn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Os.set(i,rs(Os.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ns.set(i,rs(Ns.get(i)||null,e,t,n,r,o)),!0}return!1}function AE(e){var t=Vr(e.target);if(t!==null){var n=Jr(t);if(n!==null){if(t=n.tag,t===13){if(t=lS(n),t!==null){e.blockedOn=t,pS(e.lanePriority,function(){Ce.unstable_runWithPriority(e.priority,function(){dS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Ws(n),t!==null&&If(t),e.blockedOn=n,!1;t.shift()}return!0}function Xy(e,t,n){Pl(e)&&n.delete(t)}function OE(){for(zp=!1;0<Yt.length;){var e=Yt[0];if(e.blockedOn!==null){e=Ws(e.blockedOn),e!==null&&cS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Nf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Yt.shift()}Yn!==null&&Pl(Yn)&&(Yn=null),Zn!==null&&Pl(Zn)&&(Zn=null),Jn!==null&&Pl(Jn)&&(Jn=null),Os.forEach(Xy),Ns.forEach(Xy)}function os(e,t){e.blockedOn===t&&(e.blockedOn=null,zp||(zp=!0,Ce.unstable_scheduleCallback(Ce.unstable_NormalPriority,OE)))}function fS(e){function t(o){return os(o,e)}if(0<Yt.length){os(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yn!==null&&os(Yn,e),Zn!==null&&os(Zn,e),Jn!==null&&os(Jn,e),Os.forEach(t),Ns.forEach(t),n=0;n<ns.length;n++)r=ns[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ns.length&&(n=ns[0],n.blockedOn===null);)AE(n),n.blockedOn===null&&ns.shift()}function vl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Fo={animationend:vl("Animation","AnimationEnd"),animationiteration:vl("Animation","AnimationIteration"),animationstart:vl("Animation","AnimationStart"),transitionend:vl("Transition","TransitionEnd")},cp={},mS={};yn&&(mS=document.createElement("div").style,"AnimationEvent"in window||(delete Fo.animationend.animation,delete Fo.animationiteration.animation,delete Fo.animationstart.animation),"TransitionEvent"in window||delete Fo.transitionend.transition);function cu(e){if(cp[e])return cp[e];if(!Fo[e])return e;var t=Fo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in mS)return cp[e]=t[n];return e}var gS=cu("animationend"),hS=cu("animationiteration"),yS=cu("animationstart"),vS=cu("transitionend"),SS=new Map,Lf=new Map,NE=["abort","abort",gS,"animationEnd",hS,"animationIteration",yS,"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",vS,"transitionEnd","waiting","waiting"];function Af(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)),Lf.set(r,t),SS.set(r,o),Yr(o,[r])}}var ME=Ce.unstable_now;ME();var re=8;function Mo(e){if(1&e)return re=15,1;if(2&e)return re=14,2;if(4&e)return re=13,4;var t=24&e;return t!==0?(re=12,t):e&32?(re=11,32):(t=192&e,t!==0?(re=10,t):e&256?(re=9,256):(t=3584&e,t!==0?(re=8,t):e&4096?(re=7,4096):(t=4186112&e,t!==0?(re=6,t):(t=62914560&e,t!==0?(re=5,t):e&67108864?(re=4,67108864):e&134217728?(re=3,134217728):(t=805306368&e,t!==0?(re=2,t):1073741824&e?(re=1,1073741824):(re=8,e))))))}function DE(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 FE(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 Ms(e,t){var n=e.pendingLanes;if(n===0)return re=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=re=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Mo(l),o=re):(a&=i,a!==0&&(r=Mo(a),o=re))}else i=n&~s,i!==0?(r=Mo(i),o=re):a!==0&&(r=Mo(a),o=re);if(r===0)return 0;if(r=31-sr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Mo(t),o<=re)return t;re=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-sr(t),o=1<<n,r|=e[n],t&=~o;return r}function xS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function zl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Do(24&~t),e===0?zl(10,t):e;case 10:return e=Do(192&~t),e===0?zl(8,t):e;case 8:return e=Do(3584&~t),e===0&&(e=Do(4186112&~t),e===0&&(e=512)),e;case 2:return t=Do(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Do(e){return e&-e}function dp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function du(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-sr(t),e[t]=n}var sr=Math.clz32?Math.clz32:HE,jE=Math.log,BE=Math.LN2;function HE(e){return e===0?32:31-(jE(e)/BE|0)|0}var UE=Ce.unstable_UserBlockingPriority,zE=Ce.unstable_runWithPriority,Rl=!0;function KE(e,t,n,r){Kr||Pf();var o=Of,i=Kr;Kr=!0;try{sS(o,e,t,n,r)}finally{(Kr=i)||Rf()}}function VE(e,t,n,r){zE(UE,Of.bind(null,e,t,n,r))}function Of(e,t,n,r){if(Rl){var o;if((o=(t&4)===0)&&0<Yt.length&&-1<qy.indexOf(e))e=Kp(null,e,t,n,r),Yt.push(e);else{var i=Nf(e,t,n,r);if(i===null)o&&Gy(e,r);else{if(o){if(-1<qy.indexOf(e)){e=Kp(i,e,t,n,r),Yt.push(e);return}if(LE(i,e,t,n,r))return;Gy(e,r)}OS(e,t,r,null,n)}}}}function Nf(e,t,n,r){var o=Tf(r);if(o=Vr(o),o!==null){var i=Jr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=lS(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 OS(e,t,r,o,n),null}var Gn=null,Mf=null,Il=null;function _S(){if(Il)return Il;var e,t=Mf,n=t.length,r,o="value"in Gn?Gn.value:Gn.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 Il=o.slice(e,1<r?1-r:void 0)}function Ll(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 Sl(){return!0}function Qy(){return!1}function at(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)?Sl:Qy,this.isPropagationStopped=Qy,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=Sl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sl)},persist:function(){},isPersistent:Sl}),t}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Df=at(ri),Vs=ae({},ri,{view:0,detail:0}),WE=at(Vs),pp,fp,is,pu=ae({},Vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ff,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!==is&&(is&&e.type==="mousemove"?(pp=e.screenX-is.screenX,fp=e.screenY-is.screenY):fp=pp=0,is=e),pp)},movementY:function(e){return"movementY"in e?e.movementY:fp}}),Yy=at(pu),$E=ae({},pu,{dataTransfer:0}),qE=at($E),GE=ae({},Vs,{relatedTarget:0}),mp=at(GE),XE=ae({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),QE=at(XE),YE=ae({},ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ZE=at(YE),JE=ae({},ri,{data:0}),Zy=at(JE),eT={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tT={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"},nT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nT[e])?!!t[e]:!1}function Ff(){return rT}var oT=ae({},Vs,{key:function(e){if(e.key){var t=eT[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tT[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ff,charCode:function(e){return e.type==="keypress"?Ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iT=at(oT),sT=ae({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jy=at(sT),aT=ae({},Vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ff}),lT=at(aT),uT=ae({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),cT=at(uT),dT=ae({},pu,{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}),pT=at(dT),fT=[9,13,27,32],jf=yn&&"CompositionEvent"in window,ws=null;yn&&"documentMode"in document&&(ws=document.documentMode);var mT=yn&&"TextEvent"in window&&!ws,wS=yn&&(!jf||ws&&8<ws&&11>=ws),ev=String.fromCharCode(32),tv=!1;function bS(e,t){switch(e){case"keyup":return fT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jo=!1;function gT(e,t){switch(e){case"compositionend":return CS(t);case"keypress":return t.which!==32?null:(tv=!0,ev);case"textInput":return e=t.data,e===ev&&tv?null:e;default:return null}}function hT(e,t){if(jo)return e==="compositionend"||!jf&&bS(e,t)?(e=_S(),Il=Mf=Gn=null,jo=!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 wS&&t.locale!=="ko"?null:t.data;default:return null}}var yT={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 nv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!yT[e.type]:t==="textarea"}function ES(e,t,n,r){oS(r),t=Kl(t,"onChange"),0<t.length&&(n=new Df("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bs=null,Ds=null;function vT(e){IS(e,0)}function fu(e){var t=Ho(e);if(Yv(t))return e}function ST(e,t){if(e==="change")return t}var TS=!1;yn&&(yn?(_l="oninput"in document,_l||(gp=document.createElement("div"),gp.setAttribute("oninput","return;"),_l=typeof gp.oninput=="function"),xl=_l):xl=!1,TS=xl&&(!document.documentMode||9<document.documentMode));var xl,_l,gp;function rv(){bs&&(bs.detachEvent("onpropertychange",kS),Ds=bs=null)}function kS(e){if(e.propertyName==="value"&&fu(Ds)){var t=[];if(ES(t,Ds,e,Tf(e)),e=vT,Kr)e(t);else{Kr=!0;try{kf(e,t)}finally{Kr=!1,Rf()}}}}function xT(e,t,n){e==="focusin"?(rv(),bs=t,Ds=n,bs.attachEvent("onpropertychange",kS)):e==="focusout"&&rv()}function _T(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fu(Ds)}function wT(e,t){if(e==="click")return fu(t)}function bT(e,t){if(e==="input"||e==="change")return fu(t)}function CT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:CT,ET=Object.prototype.hasOwnProperty;function Fs(e,t){if(wt(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(!ET.call(t,n[r])||!wt(e[n[r]],t[n[r]]))return!1;return!0}function ov(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function iv(e,t){var n=ov(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=ov(n)}}function PS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sv(){for(var e=window,t=Bl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bl(e.document)}return t}function Vp(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 TT=yn&&"documentMode"in document&&11>=document.documentMode,Bo=null,Wp=null,Cs=null,$p=!1;function av(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$p||Bo==null||Bo!==Bl(r)||(r=Bo,"selectionStart"in r&&Vp(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}),Cs&&Fs(Cs,r)||(Cs=r,r=Kl(Wp,"onSelect"),0<r.length&&(t=new Df("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Bo)))}Af("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);Af("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);Af(NE,2);for(hp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),wl=0;wl<hp.length;wl++)Lf.set(hp[wl],0);var hp,wl;Jo("onMouseEnter",["mouseout","mouseover"]);Jo("onMouseLeave",["mouseout","mouseover"]);Jo("onPointerEnter",["pointerout","pointerover"]);Jo("onPointerLeave",["pointerout","pointerover"]);Yr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Yr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Yr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Yr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Yr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Yr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(gs));function lv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,RE(r,t,void 0,e),e.currentTarget=null}function IS(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;lv(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;lv(o,a,u),i=l}}}if(Ul)throw e=Up,Ul=!1,Up=null,e}function ie(e,t){var n=MS(t),r=e+"__bubble";n.has(r)||(AS(t,e,2,!1),n.add(r))}var uv="_reactListening"+Math.random().toString(36).slice(2);function LS(e){e[uv]||(e[uv]=!0,Gv.forEach(function(t){RS.has(t)||cv(t,!1,e,null),cv(t,!0,e,null)}))}function cv(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&&RS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=MS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),AS(i,e,o,t),s.add(a))}function AS(e,t,n,r){var o=Lf.get(t);switch(o===void 0?2:o){case 0:o=KE;break;case 1:o=VE;break;default:o=Of}n=o.bind(null,t,n,e),o=void 0,!Hp||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 OS(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=Vr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}EE(function(){var u=i,c=Tf(n),p=[];e:{var d=SS.get(e);if(d!==void 0){var g=Df,y=e;switch(e){case"keypress":if(Ll(n)===0)break e;case"keydown":case"keyup":g=iT;break;case"focusin":y="focus",g=mp;break;case"focusout":y="blur",g=mp;break;case"beforeblur":case"afterblur":g=mp;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":g=Yy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=qE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=lT;break;case gS:case hS:case yS:g=QE;break;case vS:g=cT;break;case"scroll":g=WE;break;case"wheel":g=pT;break;case"copy":case"cut":case"paste":g=ZE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Jy}var v=(t&4)!==0,f=!v&&e==="scroll",h=v?d!==null?d+"Capture":null:d;v=[];for(var m=u,x;m!==null;){x=m;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,h!==null&&(_=As(m,h),_!=null&&v.push(js(m,_,x)))),f)break;m=m.return}0<v.length&&(d=new g(d,y,null,n,c),p.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(Vr(y)||y[oi]))break e;if((g||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=u,y=y?Vr(y):null,y!==null&&(f=Jr(y),y!==f||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(v=Yy,_="onMouseLeave",h="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=Jy,_="onPointerLeave",h="onPointerEnter",m="pointer"),f=g==null?d:Ho(g),x=y==null?d:Ho(y),d=new v(_,m+"leave",g,n,c),d.target=f,d.relatedTarget=x,_=null,Vr(c)===u&&(v=new v(h,m+"enter",y,n,c),v.target=x,v.relatedTarget=f,_=v),f=_,g&&y)t:{for(v=g,h=y,m=0,x=v;x;x=No(x))m++;for(x=0,_=h;_;_=No(_))x++;for(;0<m-x;)v=No(v),m--;for(;0<x-m;)h=No(h),x--;for(;m--;){if(v===h||h!==null&&v===h.alternate)break t;v=No(v),h=No(h)}v=null}else v=null;g!==null&&dv(p,d,g,v,!1),y!==null&&f!==null&&dv(p,f,y,v,!0)}}e:{if(d=u?Ho(u):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var b=ST;else if(nv(d))if(TS)b=bT;else{b=_T;var C=xT}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(b=wT);if(b&&(b=b(e,u))){ES(p,b,n,c);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&Ap(d,"number",d.value)}switch(C=u?Ho(u):window,e){case"focusin":(nv(C)||C.contentEditable==="true")&&(Bo=C,Wp=u,Cs=null);break;case"focusout":Cs=Wp=Bo=null;break;case"mousedown":$p=!0;break;case"contextmenu":case"mouseup":case"dragend":$p=!1,av(p,n,c);break;case"selectionchange":if(TT)break;case"keydown":case"keyup":av(p,n,c)}var E;if(jf)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else jo?bS(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(wS&&n.locale!=="ko"&&(jo||I!=="onCompositionStart"?I==="onCompositionEnd"&&jo&&(E=_S()):(Gn=c,Mf="value"in Gn?Gn.value:Gn.textContent,jo=!0)),C=Kl(u,I),0<C.length&&(I=new Zy(I,e,null,n,c),p.push({event:I,listeners:C}),E?I.data=E:(E=CS(n),E!==null&&(I.data=E)))),(E=mT?gT(e,n):hT(e,n))&&(u=Kl(u,"onBeforeInput"),0<u.length&&(c=new Zy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=E))}IS(p,t)})}function js(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Kl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=As(e,n),i!=null&&r.unshift(js(e,i,o)),i=As(e,t),i!=null&&r.push(js(e,i,o))),e=e.return}return r}function No(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function dv(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=As(n,i),l!=null&&s.unshift(js(n,l,a))):o||(l=As(n,i),l!=null&&s.push(js(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Vl(){}var yp=null,vp=null;function NS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function qp(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 pv=typeof setTimeout=="function"?setTimeout:void 0,kT=typeof clearTimeout=="function"?clearTimeout:void 0;function Bf(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function qo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function fv(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 Sp=0;function PT(e){return{$$typeof:Cf,toString:e,valueOf:e}}var mu=Math.random().toString(36).slice(2),Xn="__reactFiber$"+mu,Wl="__reactProps$"+mu,oi="__reactContainer$"+mu,mv="__reactEvents$"+mu;function Vr(e){var t=e[Xn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oi]||n[Xn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fv(e);e!==null;){if(n=e[Xn])return n;e=fv(e)}return t}e=n,n=e.parentNode}return null}function Ws(e){return e=e[Xn]||e[oi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ho(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function gu(e){return e[Wl]||null}function MS(e){var t=e[mv];return t===void 0&&(t=e[mv]=new Set),t}var Gp=[],Uo=-1;function cr(e){return{current:e}}function se(e){0>Uo||(e.current=Gp[Uo],Gp[Uo]=null,Uo--)}function pe(e,t){Uo++,Gp[Uo]=e.current,e.current=t}var ar={},Fe=cr(ar),et=cr(!1),Gr=ar;function ei(e,t){var n=e.type.contextTypes;if(!n)return ar;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 tt(e){return e=e.childContextTypes,e!=null}function $l(){se(et),se(Fe)}function gv(e,t,n){if(Fe.current!==ar)throw Error(T(168));pe(Fe,t),pe(et,n)}function DS(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,Ko(t)||"Unknown",o));return ae({},n,r)}function Al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Gr=Fe.current,pe(Fe,e),pe(et,et.current),!0}function hv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=DS(e,t,Gr),r.__reactInternalMemoizedMergedChildContext=e,se(et),se(Fe),pe(Fe,e)):se(et),pe(et,n)}var Hf=null,qr=null,RT=Ce.unstable_runWithPriority,Uf=Ce.unstable_scheduleCallback,Xp=Ce.unstable_cancelCallback,IT=Ce.unstable_shouldYield,yv=Ce.unstable_requestPaint,Qp=Ce.unstable_now,LT=Ce.unstable_getCurrentPriorityLevel,hu=Ce.unstable_ImmediatePriority,FS=Ce.unstable_UserBlockingPriority,jS=Ce.unstable_NormalPriority,BS=Ce.unstable_LowPriority,HS=Ce.unstable_IdlePriority,xp={},AT=yv!==void 0?yv:function(){},pn=null,Ol=null,_p=!1,vv=Qp(),Me=1e4>vv?Qp:function(){return Qp()-vv};function ti(){switch(LT()){case hu:return 99;case FS:return 98;case jS:return 97;case BS:return 96;case HS:return 95;default:throw Error(T(332))}}function US(e){switch(e){case 99:return hu;case 98:return FS;case 97:return jS;case 96:return BS;case 95:return HS;default:throw Error(T(332))}}function Xr(e,t){return e=US(e),RT(e,t)}function Bs(e,t,n){return e=US(e),Uf(e,t,n)}function nn(){if(Ol!==null){var e=Ol;Ol=null,Xp(e)}zS()}function zS(){if(!_p&&pn!==null){_p=!0;var e=0;try{var t=pn;Xr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),pn=null}catch(n){throw pn!==null&&(pn=pn.slice(e+1)),Uf(hu,nn),n}finally{_p=!1}}}var OT=Zr.ReactCurrentBatchConfig;function Ft(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 ql=cr(null),Gl=null,zo=null,Xl=null;function zf(){Xl=zo=Gl=null}function Kf(e){var t=ql.current;se(ql),e.type._context._currentValue=t}function KS(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 Go(e,t){Gl=e,Xl=zo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function Et(e,t){if(Xl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Xl=e,t=1073741823),t={context:e,observedBits:t,next:null},zo===null){if(Gl===null)throw Error(T(308));zo=t,Gl.dependencies={lanes:0,firstContext:t,responders:null}}else zo=zo.next=t;return e._currentValue}var $n=!1;function Vf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function VS(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 er(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tr(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 Sv(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;$n=!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 g=e,y=i;switch(a=t,d=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){p=g.call(d,p,a);break e}p=g;break e;case 3:g.flags=g.flags&-4097|64;case 0:if(g=y.payload,a=typeof g=="function"?g.call(d,p,a):g,a==null)break e;p=ae({},p,a);break e;case 2:$n=!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,qs|=s,e.lanes=s,e.memoizedState=p}}function xv(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 WS=new au.Component().refs;function Ql(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 yu={isMounted:function(e){return(e=e._reactInternals)?Jr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=st(),o=nr(e),i=er(r,o);i.payload=t,n!=null&&(i.callback=n),tr(e,i),rr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=st(),o=nr(e),i=er(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),tr(e,i),rr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=st(),r=nr(e),o=er(n,r);o.tag=2,t!=null&&(o.callback=t),tr(e,o),rr(e,r,n)}};function _v(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?!Fs(n,r)||!Fs(o,i):!0}function $S(e,t,n){var r=!1,o=ar,i=t.contextType;return typeof i=="object"&&i!==null?i=Et(i):(o=tt(t)?Gr:Fe.current,r=t.contextTypes,i=(r=r!=null)?ei(e,o):ar),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wv(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&&yu.enqueueReplaceState(t,t.state,null)}function Yp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=WS,Vf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Et(i):(i=tt(t)?Gr:Fe.current,o.context=ei(e,i)),Hs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ql(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&&yu.enqueueReplaceState(o,o.state,null),Hs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var bl=Array.isArray;function ss(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===WS&&(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 Cl(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 qS(e){function t(f,h){if(e){var m=f.lastEffect;m!==null?(m.nextEffect=h,f.lastEffect=h):f.firstEffect=f.lastEffect=h,h.nextEffect=null,h.flags=8}}function n(f,h){if(!e)return null;for(;h!==null;)t(f,h),h=h.sibling;return null}function r(f,h){for(f=new Map;h!==null;)h.key!==null?f.set(h.key,h):f.set(h.index,h),h=h.sibling;return f}function o(f,h){return f=ur(f,h),f.index=0,f.sibling=null,f}function i(f,h,m){return f.index=m,e?(m=f.alternate,m!==null?(m=m.index,m<h?(f.flags=2,h):m):(f.flags=2,h)):h}function s(f){return e&&f.alternate===null&&(f.flags=2),f}function a(f,h,m,x){return h===null||h.tag!==6?(h=Tp(m,f.mode,x),h.return=f,h):(h=o(h,m),h.return=f,h)}function l(f,h,m,x){return h!==null&&h.elementType===m.type?(x=o(h,m.props),x.ref=ss(f,h,m),x.return=f,x):(x=Fl(m.type,m.key,m.props,null,f.mode,x),x.ref=ss(f,h,m),x.return=f,x)}function u(f,h,m,x){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=kp(m,f.mode,x),h.return=f,h):(h=o(h,m.children||[]),h.return=f,h)}function c(f,h,m,x,_){return h===null||h.tag!==7?(h=Zo(m,f.mode,x,_),h.return=f,h):(h=o(h,m),h.return=f,h)}function p(f,h,m){if(typeof h=="string"||typeof h=="number")return h=Tp(""+h,f.mode,m),h.return=f,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case fs:return m=Fl(h.type,h.key,h.props,null,f.mode,m),m.ref=ss(f,null,h),m.return=f,m;case zr:return h=kp(h,f.mode,m),h.return=f,h}if(bl(h)||ts(h))return h=Zo(h,f.mode,m,null),h.return=f,h;Cl(f,h)}return null}function d(f,h,m,x){var _=h!==null?h.key:null;if(typeof m=="string"||typeof m=="number")return _!==null?null:a(f,h,""+m,x);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case fs:return m.key===_?m.type===qn?c(f,h,m.props.children,x,_):l(f,h,m,x):null;case zr:return m.key===_?u(f,h,m,x):null}if(bl(m)||ts(m))return _!==null?null:c(f,h,m,x,null);Cl(f,m)}return null}function g(f,h,m,x,_){if(typeof x=="string"||typeof x=="number")return f=f.get(m)||null,a(h,f,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fs:return f=f.get(x.key===null?m:x.key)||null,x.type===qn?c(h,f,x.props.children,_,x.key):l(h,f,x,_);case zr:return f=f.get(x.key===null?m:x.key)||null,u(h,f,x,_)}if(bl(x)||ts(x))return f=f.get(m)||null,c(h,f,x,_,null);Cl(h,x)}return null}function y(f,h,m,x){for(var _=null,b=null,C=h,E=h=0,I=null;C!==null&&E<m.length;E++){C.index>E?(I=C,C=null):I=C.sibling;var P=d(f,C,m[E],x);if(P===null){C===null&&(C=I);break}e&&C&&P.alternate===null&&t(f,C),h=i(P,h,E),b===null?_=P:b.sibling=P,b=P,C=I}if(E===m.length)return n(f,C),_;if(C===null){for(;E<m.length;E++)C=p(f,m[E],x),C!==null&&(h=i(C,h,E),b===null?_=C:b.sibling=C,b=C);return _}for(C=r(f,C);E<m.length;E++)I=g(C,f,E,m[E],x),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?E:I.key),h=i(I,h,E),b===null?_=I:b.sibling=I,b=I);return e&&C.forEach(function(K){return t(f,K)}),_}function v(f,h,m,x){var _=ts(m);if(typeof _!="function")throw Error(T(150));if(m=_.call(m),m==null)throw Error(T(151));for(var b=_=null,C=h,E=h=0,I=null,P=m.next();C!==null&&!P.done;E++,P=m.next()){C.index>E?(I=C,C=null):I=C.sibling;var K=d(f,C,P.value,x);if(K===null){C===null&&(C=I);break}e&&C&&K.alternate===null&&t(f,C),h=i(K,h,E),b===null?_=K:b.sibling=K,b=K,C=I}if(P.done)return n(f,C),_;if(C===null){for(;!P.done;E++,P=m.next())P=p(f,P.value,x),P!==null&&(h=i(P,h,E),b===null?_=P:b.sibling=P,b=P);return _}for(C=r(f,C);!P.done;E++,P=m.next())P=g(C,f,E,P.value,x),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?E:P.key),h=i(P,h,E),b===null?_=P:b.sibling=P,b=P);return e&&C.forEach(function(D){return t(f,D)}),_}return function(f,h,m,x){var _=typeof m=="object"&&m!==null&&m.type===qn&&m.key===null;_&&(m=m.props.children);var b=typeof m=="object"&&m!==null;if(b)switch(m.$$typeof){case fs:e:{for(b=m.key,_=h;_!==null;){if(_.key===b){switch(_.tag){case 7:if(m.type===qn){n(f,_.sibling),h=o(_,m.props.children),h.return=f,f=h;break e}break;default:if(_.elementType===m.type){n(f,_.sibling),h=o(_,m.props),h.ref=ss(f,_,m),h.return=f,f=h;break e}}n(f,_);break}else t(f,_);_=_.sibling}m.type===qn?(h=Zo(m.props.children,f.mode,x,m.key),h.return=f,f=h):(x=Fl(m.type,m.key,m.props,null,f.mode,x),x.ref=ss(f,h,m),x.return=f,f=x)}return s(f);case zr:e:{for(_=m.key;h!==null;){if(h.key===_)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(f,h.sibling),h=o(h,m.children||[]),h.return=f,f=h;break e}else{n(f,h);break}else t(f,h);h=h.sibling}h=kp(m,f.mode,x),h.return=f,f=h}return s(f)}if(typeof m=="string"||typeof m=="number")return m=""+m,h!==null&&h.tag===6?(n(f,h.sibling),h=o(h,m),h.return=f,f=h):(n(f,h),h=Tp(m,f.mode,x),h.return=f,f=h),s(f);if(bl(m))return y(f,h,m,x);if(ts(m))return v(f,h,m,x);if(b&&Cl(f,m),typeof m>"u"&&!_)switch(f.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ko(f.type)||"Component"))}return n(f,h)}}var Yl=qS(!0),GS=qS(!1),$s={},en=cr($s),Us=cr($s),zs=cr($s);function Wr(e){if(e===$s)throw Error(T(174));return e}function Zp(e,t){switch(pe(zs,t),pe(Us,e),pe(en,$s),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dp(t,e)}se(en),pe(en,t)}function ni(){se(en),se(Us),se(zs)}function bv(e){Wr(zs.current);var t=Wr(en.current),n=Dp(t,e.type);t!==n&&(pe(Us,e),pe(en,n))}function Wf(e){Us.current===e&&(se(en),se(Us))}var de=cr(0);function Zl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mn=null,Qn=null,tn=!1;function XS(e,t){var n=bt(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 Cv(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 Jp(e){if(tn){var t=Qn;if(t){var n=t;if(!Cv(e,t)){if(t=qo(n.nextSibling),!t||!Cv(e,t)){e.flags=e.flags&-1025|2,tn=!1,mn=e;return}XS(mn,n)}mn=e,Qn=qo(t.firstChild)}else e.flags=e.flags&-1025|2,tn=!1,mn=e}}function Ev(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function El(e){if(e!==mn)return!1;if(!tn)return Ev(e),tn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!qp(t,e.memoizedProps))for(t=Qn;t;)XS(e,t),t=qo(t.nextSibling);if(Ev(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=qo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qn=null}}else Qn=mn?qo(e.stateNode.nextSibling):null;return!0}function wp(){Qn=mn=null,tn=!1}var Xo=[];function $f(){for(var e=0;e<Xo.length;e++)Xo[e]._workInProgressVersionPrimary=null;Xo.length=0}var Es=Zr.ReactCurrentDispatcher,Ct=Zr.ReactCurrentBatchConfig,Ks=0,he=null,Ne=null,Re=null,Jl=!1,Ts=!1;function Ze(){throw Error(T(321))}function qf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Gf(e,t,n,r,o,i){if(Ks=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Es.current=e===null||e.memoizedState===null?MT:DT,e=n(r,o),Ts){i=0;do{if(Ts=!1,!(25>i))throw Error(T(301));i+=1,Re=Ne=null,t.updateQueue=null,Es.current=FT,e=n(r,o)}while(Ts)}if(Es.current=ru,t=Ne!==null&&Ne.next!==null,Ks=0,Re=Ne=he=null,Jl=!1,t)throw Error(T(300));return e}function $r(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Re===null?he.memoizedState=Re=e:Re=Re.next=e,Re}function eo(){if(Ne===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Re===null?he.memoizedState:Re.next;if(t!==null)Re=t,Ne=e;else{if(e===null)throw Error(T(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Re===null?he.memoizedState=Re=e:Re=Re.next=e}return Re}function Zt(e,t){return typeof t=="function"?t(e):t}function as(e){var t=eo(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Ne,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((Ks&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,he.lanes|=u,qs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,wt(r,t.memoizedState)||(jt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ls(e){var t=eo(),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);wt(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Tv(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=(Ks&e)===e)&&(t._workInProgressVersionPrimary=r,Xo.push(t))),e)return n(t._source);throw Xo.push(t),Error(T(350))}function QS(e,t,n,r){var o=Ve;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Es.current,l=a.useState(function(){return Tv(o,t,n)}),u=l[1],c=l[0];l=Re;var p=e.memoizedState,d=p.refs,g=d.getSnapshot,y=p.source;p=p.subscribe;var v=he;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var f=i(t._source);if(!wt(s,f)){f=n(t._source),wt(c,f)||(u(f),f=nr(v),o.mutableReadLanes|=f&o.pendingLanes),f=o.mutableReadLanes,o.entangledLanes|=f;for(var h=o.entanglements,m=f;0<m;){var x=31-sr(m),_=1<<x;h[x]|=f,m&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var f=d.getSnapshot,h=d.setSnapshot;try{h(f(t._source));var m=nr(v);o.mutableReadLanes|=m&o.pendingLanes}catch(x){h(function(){throw x})}})},[t,r]),wt(g,n)&&wt(y,t)&&wt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:c},e.dispatch=u=Yf.bind(null,he,e),l.queue=e,l.baseQueue=null,c=Tv(o,t,n),l.memoizedState=l.baseState=c),c}function YS(e,t,n){var r=eo();return QS(r,e,t,n)}function us(e){var t=$r();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:e},e=e.dispatch=Yf.bind(null,he,e),[t.memoizedState,e]}function eu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=he.updateQueue,t===null?(t={lastEffect:null},he.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function kv(e){var t=$r();return e={current:e},t.memoizedState=e}function tu(){return eo().memoizedState}function ef(e,t,n,r){var o=$r();he.flags|=e,o.memoizedState=eu(1|t,n,void 0,r===void 0?null:r)}function Xf(e,t,n,r){var o=eo();r=r===void 0?null:r;var i=void 0;if(Ne!==null){var s=Ne.memoizedState;if(i=s.destroy,r!==null&&qf(r,s.deps)){eu(t,n,i,r);return}}he.flags|=e,o.memoizedState=eu(1|t,n,i,r)}function Pv(e,t){return ef(516,4,e,t)}function nu(e,t){return Xf(516,4,e,t)}function ZS(e,t){return Xf(4,2,e,t)}function JS(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 e0(e,t,n){return n=n!=null?n.concat([e]):null,Xf(4,2,JS.bind(null,t,e),n)}function Qf(){}function t0(e,t){var n=eo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function n0(e,t){var n=eo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function NT(e,t){var n=ti();Xr(98>n?98:n,function(){e(!0)}),Xr(97<n?97:n,function(){var r=Ct.transition;Ct.transition=1;try{e(!1),t()}finally{Ct.transition=r}})}function Yf(e,t,n){var r=st(),o=nr(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===he||s!==null&&s===he)Ts=Jl=!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,wt(l,a))return}catch{}finally{}rr(e,o,r)}}var ru={readContext:Et,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useOpaqueIdentifier:Ze,unstable_isNewReconciler:!1},MT={readContext:Et,useCallback:function(e,t){return $r().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:Pv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ef(4,2,JS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ef(4,2,e,t)},useMemo:function(e,t){var n=$r();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$r();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=Yf.bind(null,he,e),[r.memoizedState,e]},useRef:kv,useState:us,useDebugValue:Qf,useDeferredValue:function(e){var t=us(e),n=t[0],r=t[1];return Pv(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=us(!1),t=e[0];return e=NT.bind(null,e[1]),kv(e),[e,t]},useMutableSource:function(e,t,n){var r=$r();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},QS(r,e,t,n)},useOpaqueIdentifier:function(){if(tn){var e=!1,t=PT(function(){throw e||(e=!0,n("r:"+(Sp++).toString(36))),Error(T(355))}),n=us(t)[1];return!(he.mode&2)&&(he.flags|=516,eu(5,function(){n("r:"+(Sp++).toString(36))},void 0,null)),t}return t="r:"+(Sp++).toString(36),us(t),t},unstable_isNewReconciler:!1},DT={readContext:Et,useCallback:t0,useContext:Et,useEffect:nu,useImperativeHandle:e0,useLayoutEffect:ZS,useMemo:n0,useReducer:as,useRef:tu,useState:function(){return as(Zt)},useDebugValue:Qf,useDeferredValue:function(e){var t=as(Zt),n=t[0],r=t[1];return nu(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=as(Zt)[0];return[tu().current,e]},useMutableSource:YS,useOpaqueIdentifier:function(){return as(Zt)[0]},unstable_isNewReconciler:!1},FT={readContext:Et,useCallback:t0,useContext:Et,useEffect:nu,useImperativeHandle:e0,useLayoutEffect:ZS,useMemo:n0,useReducer:ls,useRef:tu,useState:function(){return ls(Zt)},useDebugValue:Qf,useDeferredValue:function(e){var t=ls(Zt),n=t[0],r=t[1];return nu(function(){var o=Ct.transition;Ct.transition=1;try{r(e)}finally{Ct.transition=o}},[e]),n},useTransition:function(){var e=ls(Zt)[0];return[tu().current,e]},useMutableSource:YS,useOpaqueIdentifier:function(){return ls(Zt)[0]},unstable_isNewReconciler:!1},jT=Zr.ReactCurrentOwner,jt=!1;function Je(e,t,n,r){t.child=e===null?GS(t,null,n,r):Yl(t,e.child,n,r)}function Rv(e,t,n,r,o){n=n.render;var i=t.ref;return Go(t,o),r=Gf(e,t,n,r,i,o),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Je(e,t,r,o),t.child)}function Iv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!rm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,r0(e,t,s,r,o,i)):(e=Fl(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:Fs,n(o,r)&&e.ref===t.ref)?gn(e,t,i):(t.flags|=1,e=ur(s,r),e.ref=t.ref,e.return=t,t.child=e)}function r0(e,t,n,r,o,i){if(e!==null&&Fs(e.memoizedProps,r)&&e.ref===t.ref)if(jt=!1,(i&o)!==0)e.flags&16384&&(jt=!0);else return t.lanes=e.lanes,gn(e,t,i);return tf(e,t,n,r,i)}function bp(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},kl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},kl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},kl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,kl(t,r);return Je(e,t,o,n),t.child}function o0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function tf(e,t,n,r,o){var i=tt(n)?Gr:Fe.current;return i=ei(t,i),Go(t,o),n=Gf(e,t,n,r,i,o),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,Je(e,t,n,o),t.child)}function Lv(e,t,n,r,o){if(tt(n)){var i=!0;Al(t)}else i=!1;if(Go(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),$S(t,n,r),Yp(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=Et(u):(u=tt(n)?Gr:Fe.current,u=ei(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)&&wv(t,s,r,u),$n=!1;var d=t.memoizedState;s.state=d,Hs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||et.current||$n?(typeof c=="function"&&(Ql(t,n,c,r),l=t.memoizedState),(a=$n||_v(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,VS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ft(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Et(l):(l=tt(n)?Gr:Fe.current,l=ei(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&wv(t,s,r,l),$n=!1,d=t.memoizedState,s.state=d,Hs(t,r,s,o);var y=t.memoizedState;a!==p||d!==y||et.current||$n?(typeof g=="function"&&(Ql(t,n,g,r),y=t.memoizedState),(u=$n||_v(t,n,u,r,d,y,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,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=y),s.props=r,s.state=y,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 nf(e,t,n,r,i,o)}function nf(e,t,n,r,o,i){o0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&hv(t,n,!1),gn(e,t,i);r=t.stateNode,jT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Yl(t,e.child,null,i),t.child=Yl(t,null,a,i)):Je(e,t,a,i),t.memoizedState=r.state,o&&hv(t,n,!0),t.child}function Av(e){var t=e.stateNode;t.pendingContext?gv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gv(e,t.context,!1),Zp(e,t.containerInfo)}var Tl={dehydrated:null,retryLane:0};function Ov(e,t,n){var r=t.pendingProps,o=de.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),pe(de,o&1),e===null?(r.fallback!==void 0&&Jp(t),e=r.children,o=r.fallback,i?(e=Nv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Tl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Nv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Tl,t.lanes=33554432,e):(n=om({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Dv(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=Tl,r):(n=Mv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Dv(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=Tl,r):(n=Mv(e,t,r.children,n),t.memoizedState=null,n)}function Nv(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=om(t,o,0,null),n=Zo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Mv(e,t,n,r){var o=e.child;return e=o.sibling,n=ur(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 Dv(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=ur(s,a),e!==null?r=ur(e,r):(r=Zo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Fv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),KS(e.return,t)}function Cp(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 jv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Je(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fv(e,n);else if(e.tag===19)Fv(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(pe(de,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Zl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Cp(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&&Zl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Cp(t,!0,n,null,i,t.lastEffect);break;case"together":Cp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qs|=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=ur(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ur(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var i0,rf,s0,a0;i0=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}};rf=function(){};s0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Wr(en.current);var i=null;switch(n){case"input":o=Ip(e,o),r=Ip(e,r),i=[];break;case"option":o=Op(e,o),r=Op(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Np(e,o),r=Np(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vl)}Fp(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"&&(Is.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"&&(Is.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===Cf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};a0=function(e,t,n,r){n!==r&&(t.flags|=4)};function cs(e,t){if(!tn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function BT(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 tt(t.type)&&$l(),null;case 3:return ni(),se(et),se(Fe),$f(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(El(t)?t.flags|=4:r.hydrate||(t.flags|=256)),rf(t),null;case 5:Wf(t);var o=Wr(zs.current);if(n=t.type,e!==null&&t.stateNode!=null)s0(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=Wr(en.current),El(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Xn]=t,r[Wl]=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<gs.length;e++)ie(gs[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":Hy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":zy(r,i),ie("invalid",r)}Fp(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]):Is.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":hl(r),Uy(r,i,!0);break;case"textarea":hl(r),Ky(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Vl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Mp.html&&(e=eS(n)),e===Mp.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[Xn]=t,e[Wl]=r,i0(e,t,!1,!1),t.stateNode=e,s=jp(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<gs.length;o++)ie(gs[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":Hy(e,r),o=Ip(e,r),ie("invalid",e);break;case"option":o=Op(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":zy(e,r),o=Np(e,r),ie("invalid",e);break;default:o=r}Fp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?rS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&tS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ls(e,l):typeof l=="number"&&Ls(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Is.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&vf(e,i,l,s))}switch(n){case"input":hl(e),Uy(e,r,!1);break;case"textarea":hl(e),Ky(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ir(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Vo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Vo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Vl)}NS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)a0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Wr(zs.current),Wr(en.current),El(t)?(r=t.stateNode,n=t.memoizedProps,r[Xn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xn]=t,t.stateNode=r)}return null;case 13:return se(de),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&El(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||de.current&1?Ie===0&&(Ie=3):((Ie===0||Ie===3)&&(Ie=4),Ve===null||!(qs&134217727)&&!(si&134217727)||Qo(Ve,De))),(r||n)&&(t.flags|=4),null);case 4:return ni(),rf(t),e===null&&LS(t.stateNode.containerInfo),null;case 10:return Kf(t),null;case 17:return tt(t.type)&&$l(),null;case 19:if(se(de),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)cs(r,!1);else{if(Ie!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Zl(e),s!==null){for(t.flags|=64,cs(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pe(de,de.current&1|2),t.child}e=e.sibling}r.tail!==null&&Me()>cf&&(t.flags|=64,i=!0,cs(r,!1),t.lanes=33554432)}else{if(!i)if(e=Zl(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!tn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Me()-r.renderingStartTime>cf&&n!==1073741824&&(t.flags|=64,i=!0,cs(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=Me(),n.sibling=null,t=de.current,pe(de,i?t&1|2:t&1),n):null;case 23:case 24:return nm(),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 HT(e){switch(e.tag){case 1:tt(e.type)&&$l();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ni(),se(et),se(Fe),$f(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Wf(e),null;case 13:return se(de),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(de),null;case 4:return ni(),null;case 10:return Kf(e),null;case 23:case 24:return nm(),null;default:return null}}function Zf(e,t){try{var n="",r=t;do n+=xE(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 sf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zT=typeof WeakMap=="function"?WeakMap:Map;function u0(e,t,n){n=er(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){iu||(iu=!0,pf=r),sf(e,t)},n}function c0(e,t,n){n=er(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return sf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this),sf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var KT=typeof WeakSet=="function"?WeakSet:Set;function Bv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){or(e,n)}else t.current=null}function VT(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:Ft(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Bf(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function WT(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&&(S0(n,e),JT(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:Ft(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&_v(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}_v(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&MS(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&&mS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Uv(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=rS("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 zv(e,t){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Uf,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)S0(t,n);else{r=t;try{o()}catch(i){or(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Bv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){or(t,i)}break;case 5:Bv(t);break;case 4:d0(e,t)}}function Kv(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 Vv(e){return e.tag===5||e.tag===3||e.tag===4}function Wv(e){e:{for(var t=e.return;t!==null;){if(Vv(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&&(Ls(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Vv(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?af(e,n,t):lf(e,n,t)}function af(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=Vl));else if(r!==4&&(e=e.child,e!==null))for(af(e,t,n),e=e.sibling;e!==null;)af(e,t,n),e=e.sibling}function lf(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(lf(e,t,n),e=e.sibling;e!==null;)lf(e,t,n),e=e.sibling}function d0(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(zv(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(zv(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 Tp(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[Wl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Jv(n,r),Hp(e,o),t=Hp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?oS(n,a):s==="dangerouslySetInnerHTML"?nS(n,a):s==="children"?Ls(n,a):Sf(n,s,a,t)}switch(e){case"input":Ap(n,r);break;case"textarea":eS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Vo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Vo(n,!!r.multiple,r.defaultValue,!0):Vo(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,mS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(nm=Me(),Uv(t.child,!0)),$v(t);return;case 19:$v(t);return;case 17:return;case 23:case 24:Uv(t,t.memoizedState!==null);return}throw Error(T(163))}function $v(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KT),t.forEach(function(r){var o=nk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function $T(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var qT=Math.ceil,ou=Zr.ReactCurrentDispatcher,em=Zr.ReactCurrentOwner,F=0,Ve=null,Se=null,De=0,Qr=0,uf=cr(0),Ie=0,vu=null,ii=0,qs=0,si=0,tm=0,cf=null,nm=0,df=1/0;function ai(){df=Me()+500}var A=null,iu=!1,pf=null,Jt=null,lr=!1,ks=null,hs=90,ff=[],mf=[],hn=null,Ps=0,gf=null,Nl=-1,fn=0,Ml=0,Rs=null,Dl=!1;function st(){return F&48?Me():Nl!==-1?Nl:Nl=Me()}function nr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return ti()===99?1:2;if(fn===0&&(fn=ii),NT.transition!==0){Ml!==0&&(Ml=cf!==null?cf.pendingLanes:0),e=fn;var t=4186112&~Ml;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=ti(),F&4&&e===98?e=zl(12,fn):(e=FE(e),e=zl(e,fn)),e}function rr(e,t,n){if(50<Ps)throw Ps=0,gf=null,Error(T(185));if(e=Su(e,t),e===null)return null;du(e,t,n),e===Ve&&(si|=t,Ie===4&&Qo(e,De));var r=ti();t===1?F&8&&!(F&48)?hf(e):(Tt(e,n),F===0&&(ai(),nn())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),Tt(e,n)),cf=e}function Su(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 Tt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-sr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Mo(l);var c=re;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ms(e,e===Ve?De:0),t=re,r===0)n!==null&&(n!==_p&&Qp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==_p&&Qp(n)}t===15?(n=hf.bind(null,e),pn===null?(pn=[n],Ol=zf(hu,KS)):pn.push(n),n=_p):t===14?n=Hs(99,hf.bind(null,e)):(n=jE(t),n=Hs(n,p0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function p0(e){if(Nl=-1,Ml=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(dr()&&e.callbackNode!==t)return null;var n=Ms(e,e===Ve?De:0);if(n===0)return null;var r=n,o=F;F|=16;var i=h0();(Ve!==e||De!==r)&&(ai(),Yo(e,r));do try{QT();break}catch(a){g0(e,a)}while(1);if(Kf(),ou.current=i,F=o,Se!==null?r=0:(Ve=null,De=0,r=Ie),ii&si)Yo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bf(e.containerInfo)),n=_S(e),n!==0&&(r=ys(e,n))),r===1)throw t=vu,Yo(e,0),Qo(e,n),Tt(e,Me()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Ur(e);break;case 3:if(Qo(e,n),(n&62914560)===n&&(r=nm+500-Me(),10<r)){if(Ms(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){st(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=fv(Ur.bind(null,e),r);break}Ur(e);break;case 4:if(Qo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-sr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Me()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*qT(n/1960))-n,10<n){e.timeoutHandle=fv(Ur.bind(null,e),n);break}Ur(e);break;case 5:Ur(e);break;default:throw Error(T(329))}}return Tt(e,Me()),e.callbackNode===t?p0.bind(null,e):null}function Qo(e,t){for(t&=~tm,t&=~si,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sr(t),r=1<<n;e[n]=-1,t&=~r}}function hf(e){if(F&48)throw Error(T(327));if(dr(),e===Ve&&e.expiredLanes&De){var t=De,n=ys(e,t);ii&si&&(t=Ms(e,t),n=ys(e,t))}else t=Ms(e,0),n=ys(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bf(e.containerInfo)),t=_S(e),t!==0&&(n=ys(e,t))),n===1)throw n=vu,Yo(e,0),Qo(e,t),Tt(e,Me()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ur(e),Tt(e,Me()),null}function GT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Tt(t,Me())})}nn()}function f0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}}function m0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}}function kl(e,t){pe(uf,Qr),Qr|=t,ii|=t}function rm(){Qr=uf.current,se(uf)}function Yo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,PT(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&$l();break;case 3:ni(),se(et),se(Fe),qf();break;case 5:$f(r);break;case 4:ni();break;case 13:se(de);break;case 19:se(de);break;case 10:Vf(r);break;case 23:case 24:rm()}n=n.return}Ve=e,Se=ur(e.current,null),De=Qr=ii=t,Ie=0,vu=null,tm=si=qs=0}function g0(e,t){do{var n=Se;try{if(Kf(),Es.current=ru,Jl){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Jl=!1}if(Ks=0,Re=Ne=he=null,Ts=!1,em.current=null,n===null||n.return===null){Ie=1,vu=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=De,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(de.current&1)!==0,d=s;do{var g;if(g=d.tag===13){var y=d.memoizedState;if(y!==null)g=y.dehydrated!==null;else{var v=d.memoizedProps;g=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(g){var m=d.updateQueue;if(m===null){var h=new Set;h.add(u),d.updateQueue=h}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=er(-1,1);f.tag=2,tr(a,f)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new zT,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 _=tk.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ko(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 of(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UT=typeof WeakMap=="function"?WeakMap:Map;function l0(e,t,n){n=er(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){iu||(iu=!0,df=r),of(e,t)},n}function u0(e,t,n){n=er(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return of(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Jt===null?Jt=new Set([this]):Jt.add(this),of(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var zT=typeof WeakSet=="function"?WeakSet:Set;function Bv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){or(e,n)}else t.current=null}function KT(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:Ft(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Bf(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function VT(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&&(v0(n,e),ZT(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:Ft(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&xv(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}xv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&NS(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&&fS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Hv(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=nS("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 Uv(e,t){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Hf,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)v0(t,n);else{r=t;try{o()}catch(i){or(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Bv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){or(t,i)}break;case 5:Bv(t);break;case 4:c0(e,t)}}function zv(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 Kv(e){return e.tag===5||e.tag===3||e.tag===4}function Vv(e){e:{for(var t=e.return;t!==null;){if(Kv(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&&(Ls(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Kv(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?sf(e,n,t):af(e,n,t)}function sf(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=Vl));else if(r!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}function af(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(af(e,t,n),e=e.sibling;e!==null;)af(e,t,n),e=e.sibling}function c0(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(Uv(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(Uv(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 Ep(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[Wl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Zv(n,r),jp(e,o),t=jp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?rS(n,a):s==="dangerouslySetInnerHTML"?tS(n,a):s==="children"?Ls(n,a):vf(n,s,a,t)}switch(e){case"input":Lp(n,r);break;case"textarea":Jv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Vo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Vo(n,!!r.multiple,r.defaultValue,!0):Vo(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,fS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(tm=Me(),Hv(t.child,!0)),Wv(t);return;case 19:Wv(t);return;case 17:return;case 23:case 24:Hv(t,t.memoizedState!==null);return}throw Error(T(163))}function Wv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zT),t.forEach(function(r){var o=tk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function WT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var $T=Math.ceil,ou=Zr.ReactCurrentDispatcher,Jf=Zr.ReactCurrentOwner,F=0,Ve=null,Se=null,De=0,Qr=0,lf=cr(0),Ie=0,vu=null,ii=0,qs=0,si=0,em=0,uf=null,tm=0,cf=1/0;function ai(){cf=Me()+500}var A=null,iu=!1,df=null,Jt=null,lr=!1,ks=null,hs=90,pf=[],ff=[],hn=null,Ps=0,mf=null,Nl=-1,fn=0,Ml=0,Rs=null,Dl=!1;function st(){return F&48?Me():Nl!==-1?Nl:Nl=Me()}function nr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return ti()===99?1:2;if(fn===0&&(fn=ii),OT.transition!==0){Ml!==0&&(Ml=uf!==null?uf.pendingLanes:0),e=fn;var t=4186112&~Ml;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=ti(),F&4&&e===98?e=zl(12,fn):(e=DE(e),e=zl(e,fn)),e}function rr(e,t,n){if(50<Ps)throw Ps=0,mf=null,Error(T(185));if(e=Su(e,t),e===null)return null;du(e,t,n),e===Ve&&(si|=t,Ie===4&&Qo(e,De));var r=ti();t===1?F&8&&!(F&48)?gf(e):(Tt(e,n),F===0&&(ai(),nn())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),Tt(e,n)),uf=e}function Su(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 Tt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-sr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Mo(l);var c=re;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ms(e,e===Ve?De:0),t=re,r===0)n!==null&&(n!==xp&&Xp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==xp&&Xp(n)}t===15?(n=gf.bind(null,e),pn===null?(pn=[n],Ol=Uf(hu,zS)):pn.push(n),n=xp):t===14?n=Bs(99,gf.bind(null,e)):(n=FE(t),n=Bs(n,d0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function d0(e){if(Nl=-1,Ml=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(dr()&&e.callbackNode!==t)return null;var n=Ms(e,e===Ve?De:0);if(n===0)return null;var r=n,o=F;F|=16;var i=g0();(Ve!==e||De!==r)&&(ai(),Yo(e,r));do try{XT();break}catch(a){m0(e,a)}while(1);if(zf(),ou.current=i,F=o,Se!==null?r=0:(Ve=null,De=0,r=Ie),ii&si)Yo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bf(e.containerInfo)),n=xS(e),n!==0&&(r=ys(e,n))),r===1)throw t=vu,Yo(e,0),Qo(e,n),Tt(e,Me()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Ur(e);break;case 3:if(Qo(e,n),(n&62914560)===n&&(r=tm+500-Me(),10<r)){if(Ms(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){st(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=pv(Ur.bind(null,e),r);break}Ur(e);break;case 4:if(Qo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-sr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Me()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*$T(n/1960))-n,10<n){e.timeoutHandle=pv(Ur.bind(null,e),n);break}Ur(e);break;case 5:Ur(e);break;default:throw Error(T(329))}}return Tt(e,Me()),e.callbackNode===t?d0.bind(null,e):null}function Qo(e,t){for(t&=~em,t&=~si,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sr(t),r=1<<n;e[n]=-1,t&=~r}}function gf(e){if(F&48)throw Error(T(327));if(dr(),e===Ve&&e.expiredLanes&De){var t=De,n=ys(e,t);ii&si&&(t=Ms(e,t),n=ys(e,t))}else t=Ms(e,0),n=ys(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Bf(e.containerInfo)),t=xS(e),t!==0&&(n=ys(e,t))),n===1)throw n=vu,Yo(e,0),Qo(e,t),Tt(e,Me()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ur(e),Tt(e,Me()),null}function qT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Tt(t,Me())})}nn()}function p0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}}function f0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}}function kl(e,t){pe(lf,Qr),Qr|=t,ii|=t}function nm(){Qr=lf.current,se(lf)}function Yo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kT(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&$l();break;case 3:ni(),se(et),se(Fe),$f();break;case 5:Wf(r);break;case 4:ni();break;case 13:se(de);break;case 19:se(de);break;case 10:Kf(r);break;case 23:case 24:nm()}n=n.return}Ve=e,Se=ur(e.current,null),De=Qr=ii=t,Ie=0,vu=null,em=si=qs=0}function m0(e,t){do{var n=Se;try{if(zf(),Es.current=ru,Jl){for(var r=he.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Jl=!1}if(Ks=0,Re=Ne=he=null,Ts=!1,Jf.current=null,n===null||n.return===null){Ie=1,vu=t,Se=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=De,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(de.current&1)!==0,d=s;do{var g;if(g=d.tag===13){var y=d.memoizedState;if(y!==null)g=y.dehydrated!==null;else{var v=d.memoizedProps;g=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(g){var f=d.updateQueue;if(f===null){var h=new Set;h.add(u),d.updateQueue=h}else f.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 m=er(-1,1);m.tag=2,tr(a,m)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new UT,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 _=ek.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ko(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.`)}Ie!==5&&(Ie=2),l=Jf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var b=u0(d,i,t);xv(d,b);break e;case 1:i=l;var C=d.type,E=d.stateNode;if(!(d.flags&64)&&(typeof C.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Jt===null||!Jt.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=c0(d,i,t);xv(d,I);break e}}d=d.return}while(d!==null)}v0(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function h0(){var e=ou.current;return ou.current=ru,e===null?ru:e}function ys(e,t){var n=F;F|=16;var r=h0();Ve===e&&De===t||Yo(e,t);do try{XT();break}catch(o){g0(e,o)}while(1);if(Kf(),F=n,ou.current=r,Se!==null)throw Error(T(261));return Ve=null,De=0,Ie}function XT(){for(;Se!==null;)y0(Se)}function QT(){for(;Se!==null&&!LT();)y0(Se)}function y0(e){var t=x0(e.alternate,e,Qr);e.memoizedProps=e.pendingProps,t===null?v0(e):Se=t,em.current=null}function v0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=UT(t),n!==null){n.flags&=2047,Se=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=BT(n,t,Qr),n!==null){Se=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Qr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ie===0&&(Ie=5)}function Ur(e){var t=ti();return Xr(99,YT.bind(null,e,t)),null}function YT(e,t){do dr();while(ks!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-sr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Ve&&(Se=Ve=null,De=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,em.current=null,vp=Rl,s=av(),Wp(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,g=0,y=0,v=s,m=null;t:for(;;){for(var h;v!==a||i!==0&&v.nodeType!==3||(p=c+i),v!==l||u!==0&&v.nodeType!==3||(d=c+u),v.nodeType===3&&(c+=v.nodeValue.length),(h=v.firstChild)!==null;)m=v,v=h;for(;;){if(v===s)break t;if(m===a&&++g===i&&(p=c),m===l&&++y===u&&(d=c),(h=v.nextSibling)!==null)break;v=m,m=v.parentNode}v=h}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Sp={focusedElem:s,selectionRange:a},Rl=!1,Rs=null,Dl=!1,A=r;do try{ZT()}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);Rs=null,A=r;do try{for(s=e;A!==null;){var f=A.flags;if(f&16&&Ls(A.stateNode,""),f&128){var x=A.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Wv(A),A.flags&=-3;break;case 6:Wv(A),A.flags&=-3,Tp(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,Tp(A.alternate,A);break;case 4:Tp(A.alternate,A);break;case 8:a=A,d0(s,a);var b=a.alternate;Kv(a),b!==null&&Kv(b)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);if(_=Sp,x=av(),f=_.focusedElem,s=_.selectionRange,x!==f&&f&&f.ownerDocument&&RS(f.ownerDocument.documentElement,f)){for(s!==null&&Wp(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,b=Math.min(s.start,a),s=s.end===void 0?b:Math.min(s.end,a),!_.extend&&b>s&&(a=s,s=b,b=a),a=sv(f,b),i=sv(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(),b>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}Rl=!!vp,Sp=vp=null,e.current=n,A=r;do try{for(f=e;A!==null;){var C=A.flags;if(C&36&&WT(f,A.alternate,A),C&128){x=void 0;var E=A.ref;if(E!==null){var I=A.stateNode;switch(A.tag){case 5:x=I;break;default:x=I}typeof E=="function"?E(x):E.current=x}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);A=null,OT(),F=o}else e.current=n;if(lr)lr=!1,ks=e,hs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(C=A,C.sibling=null,C.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Jt=null),r===1?e===gf?Ps++:(Ps=0,gf=e):Ps=0,n=n.stateNode,qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Uf,n,void 0,(n.current.flags&64)===64)}catch{}if(Tt(e,Me()),iu)throw iu=!1,e=pf,pf=null,e;return F&8||nn(),null}function ZT(){for(;A!==null;){var e=A.alternate;Dl||Rs===null||(A.flags&8?qy(A,Rs)&&(Dl=!0):A.tag===13&&$T(e,A)&&qy(A,Rs)&&(Dl=!0));var t=A.flags;t&256&&VT(e,A),!(t&512)||lr||(lr=!0,Hs(97,function(){return dr(),null})),A=A.nextEffect}}function dr(){if(hs!==90){var e=97<hs?97:hs;return hs=90,Xr(e,ek)}return!1}function JT(e,t){ff.push(t,e),lr||(lr=!0,Hs(97,function(){return dr(),null}))}function S0(e,t){mf.push(t,e),lr||(lr=!0,Hs(97,function(){return dr(),null}))}function ek(){if(ks===null)return!1;var e=ks;if(ks=null,F&48)throw Error(T(331));var t=F;F|=32;var n=mf;mf=[];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));or(i,l)}}for(n=ff,ff=[],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));or(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return F=t,nn(),!0}function qv(e,t,n){t=Jf(n,t),t=u0(e,t,1),tr(e,t),t=st(),e=Su(e,1),e!==null&&(du(e,1,t),Tt(e,t))}function or(e,t){if(e.tag===3)qv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){qv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=Jf(t,e);var o=c0(n,e,1);if(tr(n,o),o=st(),n=Su(n,1),n!==null)du(n,1,o),Tt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function tk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(De&n)===n&&(Ie===4||Ie===3&&(De&62914560)===De&&500>Me()-nm?Yo(e,0):tm|=n),Tt(e,t)}function nk(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=ii),t=Do(62914560&~fn),t===0&&(t=4194304)):t=ti()===99?1:2:t=1),n=st(),e=Su(e,t),e!==null&&(du(e,t,n),Tt(e,n))}var x0;x0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)jt=!0;else if(n&r)jt=!!(e.flags&16384);else{switch(jt=!1,t.tag){case 3:Ov(t),bp();break;case 5:Cv(t);break;case 1:tt(t.type)&&Al(t);break;case 4:Jp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;pe(ql,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Nv(e,t,n):(pe(de,de.current&1),t=gn(e,t,n),t!==null?t.sibling:null);pe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Hv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(de,de.current),r)break;return null;case 23:case 24:return t.lanes=0,Cp(e,t,n)}return gn(e,t,n)}else jt=!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=ei(t,Fe.current),Go(t,n),o=Xf(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,tt(r)){var i=!0;Al(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Wf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Ql(t,r,s,e),o.updater=yu,t.stateNode=o,o._reactInternals=t,Zp(t,r,e,n),t=rf(null,t,r,!0,i,n)}else t.tag=0,Je(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=ok(o),e=Ft(o,e),i){case 0:t=nf(null,t,o,e,n);break e;case 1:t=Av(null,t,o,e,n);break e;case 11:t=Iv(null,t,o,e,n);break e;case 14:t=Lv(null,t,o,Ft(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:Ft(r,o),nf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Av(e,t,r,o,n);case 3:if(Ov(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,WS(e,t),Bs(t,r,null,n),r=t.memoizedState.element,r===o)bp(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Qn=qo(t.stateNode.containerInfo.firstChild),mn=t,i=tn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Xo.push(i);for(n=XS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Je(e,t,r,n),bp();t=t.child}return t;case 5:return Cv(t),e===null&&ef(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Gp(r,o)?s=null:i!==null&&Gp(r,i)&&(t.flags|=16),i0(e,t),Je(e,t,s,n),t.child;case 6:return e===null&&ef(t),null;case 13:return Nv(e,t,n);case 4:return Jp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yl(t,null,r,n):Je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Iv(e,t,r,o,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(pe(ql,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=wt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!et.current){t=gn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=er(-1,n&-n),u.tag=2,tr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),VS(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}Je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Go(t,n),o=Et(o,i.unstable_observedBits),r=r(o),t.flags|=1,Je(e,t,r,n),t.child;case 14:return o=t.type,i=Ft(o,t.pendingProps),i=Ft(o.type,i),Lv(e,t,o,i,r,n);case 15:return o0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,tt(r)?(e=!0,Al(t)):e=!1,Go(t,n),qS(t,r,o),Zp(t,r,o,n),rf(null,t,r,!0,e,n);case 19:return Hv(e,t,n);case 23:return Cp(e,t,n);case 24:return Cp(e,t,n)}throw Error(T(156,t.tag))};function rk(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 bt(e,t,n,r){return new rk(e,t,n,r)}function om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ok(e){if(typeof e=="function")return om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lu)return 11;if(e===uu)return 14}return 2}function ur(e,t){var n=e.alternate;return n===null?(n=bt(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 Fl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")om(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case qn:return Zo(n.children,o,i,t);case Qv:s=8,o|=16;break;case xf:s=8,o|=1;break;case vs:return e=bt(12,n,t,o|8),e.elementType=vs,e.type=vs,e.lanes=i,e;case Ss:return e=bt(13,n,t,o),e.type=Ss,e.elementType=Ss,e.lanes=i,e;case jl:return e=bt(19,n,t,o),e.elementType=jl,e.lanes=i,e;case Tf:return im(n,o,i,t);case Ip:return e=bt(24,n,t,o),e.elementType=Ip,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _f:s=10;break e;case wf:s=9;break e;case lu:s=11;break e;case uu:s=14;break e;case bf:s=16,r=null;break e;case Cf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=bt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zo(e,t,n,r){return e=bt(7,e,r,t),e.lanes=n,e}function im(e,t,n,r){return e=bt(23,e,r,t),e.elementType=Tf,e.lanes=n,e}function kp(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function Pp(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ik(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=pp(0),this.expirationTimes=pp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pp(0),this.mutableSourceEagerHydrationData=null}function sk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function su(e,t,n,r){var o=t.current,i=st(),s=nr(o);e:if(n){n=n._reactInternals;t:{if(Jr(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(tt(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(tt(l)){n=FS(n,l,a);break e}}n=a}else n=ar;return t.context===null?t.context=n:t.pendingContext=n,t=er(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),tr(o,t),rr(o,s,i),s}function Rp(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 Gv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sm(e,t){Gv(e,t),(e=e.alternate)&&Gv(e,t)}function ak(){return null}function am(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new ik(e,t,n!=null&&n.hydrate===!0),t=bt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Wf(t),e[oi]=n.current,AS(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}am.prototype.render=function(e){su(e,this._internalRoot,null,null)};am.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;su(null,e,null,function(){t[oi]=null})};function Gs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lk(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 am(e,0,t?{hydrate:!0}:void 0)}function xu(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=Rp(s);a.call(u)}}su(t,s,e,o)}else{if(i=n._reactRootContainer=lk(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Rp(s);l.call(u)}}m0(function(){su(t,s,e,o)})}return Rp(s)}dS=function(e){if(e.tag===13){var t=st();rr(e,4,t),sm(e,4)}};Lf=function(e){if(e.tag===13){var t=st();rr(e,67108864,t),sm(e,67108864)}};pS=function(e){if(e.tag===13){var t=st(),n=nr(e);rr(e,n,t),sm(e,n)}};fS=function(e,t){return t()};Bp=function(e,t,n){switch(t){case"input":if(Ap(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=gu(r);if(!o)throw Error(T(90));Zv(r),Ap(r,o)}}}break;case"textarea":eS(e,n);break;case"select":t=n.value,t!=null&&Vo(e,!!n.multiple,t,!1)}};Pf=f0;aS=function(e,t,n,r,o){var i=F;F|=4;try{return Xr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(ai(),nn())}};Rf=function(){!(F&49)&&(GT(),dr())};lS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}};function _0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gs(t))throw Error(T(200));return sk(e,t,null,n)}var uk={Events:[Ws,Bo,gu,iS,sS,dr,{current:!1}]},ds={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},ck={bundleType:ds.bundleType,version:ds.version,rendererPackageName:ds.rendererPackageName,rendererConfig:ds.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=cS(e),e===null?null:e.stateNode},findFiberByHostInstance:ds.findFiberByHostInstance||ak,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ps=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ps.isDisabled&&ps.supportsFiber))try{Uf=ps.inject(ck),qr=ps}catch{}var ps;kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uk;kt.createPortal=_0;kt.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=cS(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Xr(99,e.bind(null,t))}finally{F=n,nn()}};kt.hydrate=function(e,t,n){if(!Gs(t))throw Error(T(200));return xu(null,e,t,!0,n)};kt.render=function(e,t,n){if(!Gs(t))throw Error(T(200));return xu(null,e,t,!1,n)};kt.unmountComponentAtNode=function(e){if(!Gs(e))throw Error(T(40));return e._reactRootContainer?(m0(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[oi]=null})}),!0):!1};kt.unstable_batchedUpdates=f0;kt.unstable_createPortal=function(e,t){return _0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return xu(e,t,n,!1,r)};kt.version="17.0.2"});var _u=me((rN,C0)=>{"use strict";function b0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b0)}catch(e){console.error(e)}}b0(),C0.exports=w0()});var Z0=me(Y0=>{"use strict";var fi=O();function Gk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xk=typeof Object.is=="function"?Object.is:Gk,Qk=fi.useState,Yk=fi.useEffect,Zk=fi.useLayoutEffect,Jk=fi.useDebugValue;function eP(e,t){var n=t(),r=Qk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Zk(function(){o.value=n,o.getSnapshot=t,Nm(o)&&i({inst:o})},[e,n,t]),Yk(function(){return Nm(o)&&i({inst:o}),e(function(){Nm(o)&&i({inst:o})})},[e]),Jk(n),n}function Nm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xk(e,n)}catch{return!0}}function tP(e,t){return t()}var nP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tP:eP;Y0.useSyncExternalStore=fi.useSyncExternalStore!==void 0?fi.useSyncExternalStore:nP});var Mm=me((VN,J0)=>{"use strict";J0.exports=Z0()});var tx=me(ex=>{"use strict";var Ru=O(),rP=Mm();function oP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iP=typeof Object.is=="function"?Object.is:oP,sP=rP.useSyncExternalStore,aP=Ru.useRef,lP=Ru.useEffect,uP=Ru.useMemo,cP=Ru.useDebugValue;ex.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=aP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=uP(function(){function l(g){if(!u){if(u=!0,c=g,g=r(g),o!==void 0&&s.hasValue){var y=s.value;if(o(y,g))return p=y}return p=g}if(y=p,iP(c,g))return y;var v=r(g);return o!==void 0&&o(y,v)?y:(c=g,p=v)}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=sP(e,i[0],i[1]);return lP(function(){s.hasValue=!0,s.value=a},[a]),cP(a),a}});var rx=me(($N,nx)=>{"use strict";nx.exports=tx()});var mx=me(Q=>{"use strict";var Ee=typeof Symbol=="function"&&Symbol.for,Fm=Ee?Symbol.for("react.element"):60103,jm=Ee?Symbol.for("react.portal"):60106,Ou=Ee?Symbol.for("react.fragment"):60107,Nu=Ee?Symbol.for("react.strict_mode"):60108,Mu=Ee?Symbol.for("react.profiler"):60114,Du=Ee?Symbol.for("react.provider"):60109,Fu=Ee?Symbol.for("react.context"):60110,Hm=Ee?Symbol.for("react.async_mode"):60111,ju=Ee?Symbol.for("react.concurrent_mode"):60111,Hu=Ee?Symbol.for("react.forward_ref"):60112,Bu=Ee?Symbol.for("react.suspense"):60113,mP=Ee?Symbol.for("react.suspense_list"):60120,Uu=Ee?Symbol.for("react.memo"):60115,zu=Ee?Symbol.for("react.lazy"):60116,gP=Ee?Symbol.for("react.block"):60121,hP=Ee?Symbol.for("react.fundamental"):60117,yP=Ee?Symbol.for("react.responder"):60118,vP=Ee?Symbol.for("react.scope"):60119;function ut(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Fm:switch(e=e.type,e){case Hm:case ju:case Ou:case Mu:case Nu:case Bu:return e;default:switch(e=e&&e.$$typeof,e){case Fu:case Hu:case zu:case Uu:case Du:return e;default:return t}}case jm:return t}}}function fx(e){return ut(e)===ju}Q.AsyncMode=Hm;Q.ConcurrentMode=ju;Q.ContextConsumer=Fu;Q.ContextProvider=Du;Q.Element=Fm;Q.ForwardRef=Hu;Q.Fragment=Ou;Q.Lazy=zu;Q.Memo=Uu;Q.Portal=jm;Q.Profiler=Mu;Q.StrictMode=Nu;Q.Suspense=Bu;Q.isAsyncMode=function(e){return fx(e)||ut(e)===Hm};Q.isConcurrentMode=fx;Q.isContextConsumer=function(e){return ut(e)===Fu};Q.isContextProvider=function(e){return ut(e)===Du};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fm};Q.isForwardRef=function(e){return ut(e)===Hu};Q.isFragment=function(e){return ut(e)===Ou};Q.isLazy=function(e){return ut(e)===zu};Q.isMemo=function(e){return ut(e)===Uu};Q.isPortal=function(e){return ut(e)===jm};Q.isProfiler=function(e){return ut(e)===Mu};Q.isStrictMode=function(e){return ut(e)===Nu};Q.isSuspense=function(e){return ut(e)===Bu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ou||e===ju||e===Mu||e===Nu||e===Bu||e===mP||typeof e=="object"&&e!==null&&(e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Du||e.$$typeof===Fu||e.$$typeof===Hu||e.$$typeof===hP||e.$$typeof===yP||e.$$typeof===vP||e.$$typeof===gP)};Q.typeOf=ut});var hx=me((sM,gx)=>{"use strict";gx.exports=mx()});var bx=me((aM,wx)=>{"use strict";var Bm=hx(),SP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},xP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},_P={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},xx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Um={};Um[Bm.ForwardRef]=_P;Um[Bm.Memo]=xx;function yx(e){return Bm.isMemo(e)?xx:Um[e.$$typeof]||SP}var wP=Object.defineProperty,bP=Object.getOwnPropertyNames,vx=Object.getOwnPropertySymbols,CP=Object.getOwnPropertyDescriptor,EP=Object.getPrototypeOf,Sx=Object.prototype;function _x(e,t,n){if(typeof t!="string"){if(Sx){var r=EP(t);r&&r!==Sx&&_x(e,r,n)}var o=bP(t);vx&&(o=o.concat(vx(t)));for(var i=yx(e),s=yx(t),a=0;a<o.length;++a){var l=o[a];if(!xP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=CP(t,l);try{wP(e,l,u)}catch{}}}}return e}wx.exports=_x});var Ex=me(Y=>{"use strict";var zm=Symbol.for("react.element"),Km=Symbol.for("react.portal"),Ku=Symbol.for("react.fragment"),Vu=Symbol.for("react.strict_mode"),Wu=Symbol.for("react.profiler"),$u=Symbol.for("react.provider"),qu=Symbol.for("react.context"),TP=Symbol.for("react.server_context"),Gu=Symbol.for("react.forward_ref"),Xu=Symbol.for("react.suspense"),Qu=Symbol.for("react.suspense_list"),Yu=Symbol.for("react.memo"),Zu=Symbol.for("react.lazy"),kP=Symbol.for("react.offscreen"),Cx;Cx=Symbol.for("react.module.reference");function Rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case zm:switch(e=e.type,e){case Ku:case Wu:case Vu:case Xu:case Qu:return e;default:switch(e=e&&e.$$typeof,e){case TP:case qu:case Gu:case Zu:case Yu:case $u:return e;default:return t}}case Km:return t}}}Y.ContextConsumer=qu;Y.ContextProvider=$u;Y.Element=zm;Y.ForwardRef=Gu;Y.Fragment=Ku;Y.Lazy=Zu;Y.Memo=Yu;Y.Portal=Km;Y.Profiler=Wu;Y.StrictMode=Vu;Y.Suspense=Xu;Y.SuspenseList=Qu;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Rt(e)===qu};Y.isContextProvider=function(e){return Rt(e)===$u};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===zm};Y.isForwardRef=function(e){return Rt(e)===Gu};Y.isFragment=function(e){return Rt(e)===Ku};Y.isLazy=function(e){return Rt(e)===Zu};Y.isMemo=function(e){return Rt(e)===Yu};Y.isPortal=function(e){return Rt(e)===Km};Y.isProfiler=function(e){return Rt(e)===Wu};Y.isStrictMode=function(e){return Rt(e)===Vu};Y.isSuspense=function(e){return Rt(e)===Xu};Y.isSuspenseList=function(e){return Rt(e)===Qu};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ku||e===Wu||e===Vu||e===Xu||e===Qu||e===kP||typeof e=="object"&&e!==null&&(e.$$typeof===Zu||e.$$typeof===Yu||e.$$typeof===$u||e.$$typeof===qu||e.$$typeof===Gu||e.$$typeof===Cx||e.getModuleId!==void 0)};Y.typeOf=Rt});var kx=me((uM,Tx)=>{"use strict";Tx.exports=Ex()});var E_=me((MD,C_)=>{"use strict";var vR=/["'&<>]/;C_.exports=SR;function SR(e){var t=""+e,n=vR.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 Yg=me((mF,r1)=>{"use strict";var CI="Expected a function",t1=NaN,EI="[object Symbol]",TI=/^\s+|\s+$/g,kI=/^[-+]0x[0-9a-f]+$/i,PI=/^0b[01]+$/i,RI=/^0o[0-7]+$/i,II=parseInt,LI=typeof global=="object"&&global&&global.Object===Object&&global,AI=typeof self=="object"&&self&&self.Object===Object&&self,OI=LI||AI||Function("return this")(),NI=Object.prototype,MI=NI.toString,DI=Math.max,FI=Math.min,Xg=function(){return OI.Date.now()};function jI(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(CI);t=n1(t)||0,Qg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?DI(n1(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function g(C){var E=r,I=o;return r=o=void 0,u=C,s=e.apply(I,E),s}function y(C){return u=C,a=setTimeout(h,t),c?g(C):s}function v(C){var E=C-l,I=C-u,P=t-E;return p?FI(P,i-I):P}function m(C){var E=C-l,I=C-u;return l===void 0||E>=t||E<0||p&&I>=i}function h(){var C=Xg();if(m(C))return f(C);a=setTimeout(h,v(C))}function f(C){return a=void 0,d&&r?g(C):(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(Xg())}function b(){var C=Xg(),E=m(C);if(r=arguments,o=this,l=C,E){if(a===void 0)return y(l);if(p)return a=setTimeout(h,t),g(l)}return a===void 0&&(a=setTimeout(h,t)),s}return b.cancel=x,b.flush=_,b}function Qg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function HI(e){return!!e&&typeof e=="object"}function BI(e){return typeof e=="symbol"||HI(e)&&MI.call(e)==EI}function n1(e){if(typeof e=="number")return e;if(BI(e))return t1;if(Qg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Qg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(TI,"");var n=PI.test(e);return n||RI.test(e)?II(e.slice(2),n?2:8):kI.test(e)?t1:+e}r1.exports=jI});var PA={};Pe(PA,{Card:()=>ge,ContentEditableInput:()=>_o,DeepdeskAPI:()=>Un,DeepdeskSDK:()=>$a,HTTPClient:()=>Gt,InputMediator:()=>kn,InputType:()=>Vn,KeyboardHint:()=>il,Label:()=>sl,Locale:()=>na,Section:()=>Kn,SectionList:()=>al,Sources:()=>Mt,Suggestion:()=>oe,SuggestionList:()=>xt,TextAreaInput:()=>Pn,ToggleButton:()=>Hr,attachFile:()=>NC,authenticateWithKey:()=>OC,createFullRange:()=>Ui,createOverlayContainer:()=>lo,createRangeFromOffsets:()=>Lr,escapeHTML:()=>ki,fetchPlatformConfig:()=>Hd,formatTextMarkup:()=>AC,getRangeOffsets:()=>za,getRangeText:()=>Ka,insertCKEditor:()=>LC,isSupportedInputElement:()=>Dd,updateContentEditable:()=>RC,updateTextArea:()=>PC,useStyles:()=>k,waitForElementVisibilityChange:()=>Fd});var nl=S(q()),yt=S(O());var el=S(O()),iy=S(q()),Gi=el.default.createContext({});function k(e,t){let{debug:n,...r}=(0,el.useContext)(Gi),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,iy.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var sy={root:"_root_vr71j_1"};var Fr=S(w()),tl=()=>(0,Fr.jsxs)("svg",{className:sy.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Fr.jsx)("defs",{children:(0,Fr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Fr.jsx)("title",{children:"Failed loading image"}),(0,Fr.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 Gd={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 jr=S(w()),rl=(0,yt.createContext)(Gd),tE=({title:e,src:t})=>{let n=(0,yt.useContext)(rl),[r,o]=(0,yt.useState)(!1);return(0,yt.useEffect)(()=>{o(!1)},[t]),(0,jr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,jr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,jr.jsx)(tl,{})})},nE=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,yt.useContext)(rl);return(0,jr.jsx)("div",{className:(0,nl.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},rE=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,yt.useContext)(rl);return yt.default.createElement(e,{className:(0,nl.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},ol=({children:e})=>{let t=k("Card",Gd);return(0,jr.jsx)("div",{className:(0,nl.default)(t.root),children:(0,jr.jsx)(rl.Provider,{value:t,children:e})})};ol.Image=tE;ol.Content=nE;ol.Title=rE;var ge=ol;var py=S(q());var dy={root:"_root_cq1yq_1"};var fy=S(w());var oE={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},iE=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",dy);return(0,fy.jsx)("span",{"data-key":oE[t],className:(0,py.default)(e,r.root),...n})},il=iE;var gy=S(q());var my={root:"_root_4a08n_1"};var hy=S(w()),sE=({className:e,children:t,...n})=>{let r=k("Label",my);return(0,hy.jsx)("span",{...n,className:(0,gy.default)(e,r.root),children:t})},sl=sE;var yy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ko=S(w()),aE=({title:e,children:t,type:n,...r})=>{let o=k("Section",yy);return(0,ko.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ko.jsx)("div",{className:o.subTitleContainer,children:(0,ko.jsx)("span",{className:o.subtitle,children:e})}),(0,ko.jsx)("div",{className:o.suggestions,children:t})]})},Kn=aE;var Sy=S(q()),xy=S(O());var vy={root:"_root_19wxp_1"};var _y=S(w()),lE=xy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",vy);return(0,_y.jsx)("div",{ref:n,className:(0,Sy.default)(r.root,e),children:t})}),al=lE;var Qi=S(q()),St=S(O());var Xd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var vt=S(w()),Po=(0,St.createContext)(Xd),uE=({fixed:e,children:t,...n})=>{let r=(0,St.useContext)(Po);return(0,vt.jsx)("div",{...n,className:(0,Qi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},cE=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,St.useContext)(Po);return(0,vt.jsxs)("div",{className:(0,Qi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,vt.jsx)("ul",{className:i.dropdownList,children:o})]})},dE=({index:e,label:t,onClick:n})=>{let r=(0,St.useContext)(Po);return(0,vt.jsx)("li",{className:r.dropdownItem,children:(0,vt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},pE=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,St.useContext)(Po);return(0,vt.jsx)("button",{type:"button",className:(0,Qi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Qd=({labels:e})=>{let t=(0,St.useContext)(Po);return(0,vt.jsx)("div",{className:t.labels,children:e.map(n=>(0,vt.jsx)("span",{className:t.label,children:n},n))})},Ro=St.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Xd),l=(0,St.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,vt.jsx)(o,{...i,ref:s,className:(0,Qi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,vt.jsx)(Po.Provider,{value:a,children:r})})});Ro.Labels=Qd;Ro.Actions=uE;Ro.ActionButton=pE;Ro.DropdownButton=cE;Ro.DropdownItem=dE;var oe=Ro;var by=S(q());var wy={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var Cy=S(w()),fE=({withDivider:e,children:t})=>{let n=k("SuggestionList",wy);return(0,Cy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,by.default)(n.root,{[n.isWithDivider]:e}),children:t})},xt=fE;var Ty=S(q());var Ey={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var ll=S(w()),mE=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Ey);return(0,ll.jsx)("button",{type:"button",className:(0,Ty.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,ll.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,ll.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Hr=mE;var ky=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Io=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Py=/x-deepdesk-(([a-z0-9\-_])+-version)/,Mt=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v))(Mt||{}),Vn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Vn||{});var Nt=S(_u());var A1=S(O());function Pt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vn(e){return!!e&&!!e[le]}function Ht(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)===vk}(e)||Array.isArray(e)||!!e[L0]||!!(!((t=e.constructor)===null||t===void 0)&&t[L0])||hm(e)||ym(e))}function to(e,t,n){n===void 0&&(n=!1),ci(e)===0?(n?Object.keys:ui)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function ci(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:hm(e)?2:ym(e)?3:0}function li(e,t){return ci(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function dk(e,t){return ci(e)===2?e.get(t):e[t]}function A0(e,t,n){var r=ci(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function O0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function hm(e){return hk&&e instanceof Map}function ym(e){return yk&&e instanceof Set}function pr(e){return e.o||e.t}function vm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=D0(e);delete t[le];for(var n=ui(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 Sm(e,t){return t===void 0&&(t=!1),xm(e)||vn(e)||!Ht(e)||(ci(e)>1&&(e.set=e.add=e.clear=e.delete=pk),Object.freeze(e),t&&to(e,function(n,r){return Sm(r,!0)},!0)),e}function pk(){Pt(2)}function xm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=gm[e];return t||Pt(18,e),t}function fk(e,t){gm[e]||(gm[e]=t)}function pm(){return Qs}function lm(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function wu(e){fm(e),e.p.forEach(mk),e.p=null}function fm(e){e===Qs&&(Qs=e.l)}function E0(e){return Qs={p:[],l:Qs,h:e,m:!0,_:0}}function mk(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function um(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||rn("ES5").S(t,e,r),r?(n[le].P&&(wu(t),Pt(4)),Ht(e)&&(e=bu(t,e),t.l||Cu(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=bu(t,n,[]),wu(t),t.u&&t.v(t.u,t.s),e!==M0?e:void 0}function bu(e,t,n){if(xm(t))return t;var r=t[le];if(!r)return to(t,function(a,l){return T0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Cu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=vm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),to(i,function(a,l){return T0(e,r,o,a,l,n,s)}),Cu(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function T0(e,t,n,r,o,i,s){if(vn(o)){var a=bu(e,o,i&&t&&t.i!==3&&!li(t.R,r)?i.concat(r):void 0);if(A0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Ht(o)&&!xm(o)){if(!e.h.D&&e._<1)return;bu(e,o),t&&t.A.l||Cu(e,o)}}function Cu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Sm(t,n)}function cm(e,t){var n=e[le];return(n?pr(n):e)[t]}function k0(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 fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function dm(e){e.o||(e.o=vm(e.t))}function mm(e,t,n){var r=hm(t)?rn("MapSet").F(t,n):ym(t)?rn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:pm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ys;s&&(l=[a],u=Xs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):rn("ES5").J(t,n);return(n?n.A:pm()).p.push(r),r}function gk(e){return vn(e)||Pt(22,e),function t(n){if(!Ht(n))return n;var r,o=n[le],i=ci(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=P0(n,i),o.I=!1}else r=P0(n,i);return to(r,function(s,a){o&&dk(o.t,s)===a||A0(r,s,t(a))}),i===3?new Set(r):r}(e)}function P0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return vm(e)}function N0(){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 Ys.get(u,s)},set:function(u){var c=this[le];Ys.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)&&fr(l);break;case 4:n(l)&&fr(l)}}}function n(s){for(var a=s.t,l=s.k,u=ui(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!li(a,p))return!0;var g=l[p],y=g&&g[le];if(y?y.t!==d:!O0(g,d))return!0}}var v=!!a[le];return u.length!==ui(a).length+(v?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&&Pt(3,JSON.stringify(pr(s)))}var i={};fk("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var g=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var v=D0(d);delete v[le];for(var m=ui(v),h=0;h<m.length;h++){var f=m[h];v[f]=e(f,p||!!v[f].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:pm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,g=p.k,y=p.R,v=p.i;if(v===4)to(g,function(_){_!==le&&(d[_]!==void 0||li(d,_)?y[_]||u(g[_]):(y[_]=!0,fr(p)))}),to(d,function(_){g[_]!==void 0||li(g,_)||(y[_]=!1,fr(p))});else if(v===5){if(r(p)&&(fr(p),y.length=!0),g.length<d.length)for(var m=g.length;m<d.length;m++)y[m]=!1;else for(var h=d.length;h<g.length;h++)y[h]=!0;for(var f=Math.min(g.length,d.length),x=0;x<f;x++)g.hasOwnProperty(x)||(y[x]=!0),y[x]===void 0&&u(g[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var R0,Qs,_m=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",hk=typeof Map<"u",yk=typeof Set<"u",I0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",M0=_m?Symbol.for("immer-nothing"):((R0={})["immer-nothing"]=!0,R0),L0=_m?Symbol.for("immer-draftable"):"__$immer_draftable",le=_m?Symbol.for("immer-state"):"__$immer_state";var vk=""+Object.prototype.constructor,ui=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,D0=Object.getOwnPropertyDescriptors||function(e){var t={};return ui(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},gm={},Ys={get:function(e,t){if(t===le)return e;var n=pr(e);if(!li(n,t))return function(o,i,s){var a,l=k0(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||!Ht(r)?r:r===cm(e.t,t)?(dm(e),e.o[t]=mm(e.A.h,r,e)):r},has:function(e,t){return t in pr(e)},ownKeys:function(e){return Reflect.ownKeys(pr(e))},set:function(e,t,n){var r=k0(pr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=cm(pr(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(O0(n,o)&&(n!==void 0||li(e.t,t)))return!0;dm(e),fr(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 cm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,dm(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=pr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Pt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pt(12)}},Xs={};to(Ys,function(e,t){Xs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xs.deleteProperty=function(e,t){return Xs.set.call(this,e,t,void 0)},Xs.set=function(e,t,n){return Ys.set.call(this,e[0],t,n,e[0])};var Sk=function(){function e(n){var r=this;this.O=I0,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(v){var m=this;v===void 0&&(v=a);for(var h=arguments.length,f=Array(h>1?h-1:0),x=1;x<h;x++)f[x-1]=arguments[x];return l.produce(v,function(_){var b;return(b=i).call.apply(b,[m,_].concat(f))})}}var u;if(typeof i!="function"&&Pt(6),s!==void 0&&typeof s!="function"&&Pt(7),Ht(o)){var c=E0(r),p=mm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?wu(c):fm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return lm(c,s),um(v,c)},function(v){throw wu(c),v}):(lm(c,s),um(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===M0&&(u=void 0),r.D&&Sm(u,!0),s){var g=[],y=[];rn("Patches").M(o,u,g,y),s(g,y)}return u}Pt(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(g){return o.apply(void 0,[g].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){Ht(n)||Pt(8),vn(n)&&(n=gk(n));var r=E0(this),o=mm(this,n,void 0);return o[le].C=!0,fm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return lm(i,r),um(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!I0&&Pt(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=rn("Patches").$;return vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),lt=new Sk,xk=lt.produce,oN=lt.produceWithPatches.bind(lt),iN=lt.setAutoFreeze.bind(lt),sN=lt.setUseProxies.bind(lt),aN=lt.applyPatches.bind(lt),lN=lt.createDraft.bind(lt),uN=lt.finishDraft.bind(lt),Eu=xk;function mr(e){"@babel/helpers - typeof";return mr=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},mr(e)}function wm(e,t){if(mr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(mr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bm(e){var t=wm(e,"string");return mr(t)==="symbol"?t:String(t)}function Cm(e,t,n){return t=bm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F0(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 Tu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F0(Object(n),!0).forEach(function(r){Cm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function je(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 j0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Em=function(){return Math.random().toString(36).substring(7).split("").join(".")},ku={INIT:"@@redux/INIT"+Em(),REPLACE:"@@redux/REPLACE"+Em(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Em()}};function _k(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 Tm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(je(1));return n(Tm)(e,t)}if(typeof e!="function")throw new Error(je(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(je(3));return i}function p(v){if(typeof v!="function")throw new Error(je(4));if(l)throw new Error(je(5));var m=!0;return u(),a.push(v),function(){if(m){if(l)throw new Error(je(6));m=!1,u();var f=a.indexOf(v);a.splice(f,1),s=null}}}function d(v){if(!_k(v))throw new Error(je(7));if(typeof v.type>"u")throw new Error(je(8));if(l)throw new Error(je(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var m=s=a,h=0;h<m.length;h++){var f=m[h];f()}return v}function g(v){if(typeof v!="function")throw new Error(je(10));o=v,d({type:ku.REPLACE})}function y(){var v,m=p;return v={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(je(11));function x(){f.next&&f.next(c())}x();var _=m(x);return{unsubscribe:_}}},v[j0]=function(){return this},v}return d({type:ku.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:g},r[j0]=y,r}function wk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:ku.INIT});if(typeof r>"u")throw new Error(je(12));if(typeof n(void 0,{type:ku.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Pu(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{wk(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,g={},y=0;y<i.length;y++){var v=i[y],m=n[v],h=u[v],f=m(h,c);if(typeof f>"u"){var x=c&&c.type;throw new Error(je(14))}g[v]=f,d=d||f!==h}return d=d||i.length!==Object.keys(u).length,d?g:u}}function di(){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 H0(){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(je(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=di.apply(void 0,a)(o.dispatch),Tu(Tu({},o),{},{dispatch:i})}}}function B0(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 U0=B0();U0.withExtraArgument=B0;var km=U0;var $0=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)}}(),bk=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}}},pi=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},Ck=Object.defineProperty,Ek=Object.defineProperties,Tk=Object.getOwnPropertyDescriptors,z0=Object.getOwnPropertySymbols,kk=Object.prototype.hasOwnProperty,Pk=Object.prototype.propertyIsEnumerable,K0=function(e,t,n){return t in e?Ck(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},gr=function(e,t){for(var n in t||(t={}))kk.call(t,n)&&K0(e,n,t[n]);if(z0)for(var r=0,o=z0(t);r<o.length;r++){var n=o[r];Pk.call(t,n)&&K0(e,n,t[n])}return e},Pm=function(e,t){return Ek(e,Tk(t))},Rk=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 Ik=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?di:di.apply(null,arguments)},kN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Lk(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 Ak=function(e){$0(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,pi([void 0],n[0].concat(this)))):new(t.bind.apply(t,pi([void 0],n.concat(this))))},t}(Array),Ok=function(e){$0(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,pi([void 0],n[0].concat(this)))):new(t.bind.apply(t,pi([void 0],n.concat(this))))},t}(Array);function Lm(e){return Ht(e)?Eu(e,function(){}):e}function Nk(e){return typeof e=="boolean"}function Mk(){return function(t){return Dk(t)}}function Dk(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 Ak;if(n&&(Nk(n)?a.push(km):a.push(km.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Rm=!0;function q0(e){var t=Mk(),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,g;if(typeof o=="function")g=o;else if(Lk(o))g=Pu(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 y=s;if(typeof y=="function"&&(y=y(t),!Rm&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Rm&&y.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=H0.apply(void 0,y),m=di;l&&(m=Ik(gr({trace:!Rm},typeof l=="object"&&l)));var h=new Ok(v),f=h;Array.isArray(d)?f=pi([v],d):typeof d=="function"&&(f=d(h));var x=m.apply(void 0,f);return Tm(g,c,x)}function fe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return gr(gr({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 G0(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 Fk(e){return typeof e=="function"}function jk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?G0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Fk(e))l=function(){return Lm(e())};else{var u=Lm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var g=pi([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return g.filter(function(y){return!!y}).length===0&&(g=[a]),g.reduce(function(y,v){if(v)if(vn(y)){var m=y,h=v(m,d);return h===void 0?y:h}else{if(Ht(y))return Eu(y,function(f){return v(f,d)});var h=v(y,d);if(h===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}return y},p)}return c.getInitialState=l,c}function Hk(e,t){return e+"/"+t}function U(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:Lm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=Hk(t,c),g,y;"reducer"in p?(g=p.reducer,y=p.prepare):g=p,i[c]=g,s[d]=g,a[c]=y?fe(d,y):fe(d)});function l(){var c=typeof e.extraReducers=="function"?G0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,g=c[1],y=g===void 0?[]:g,v=c[2],m=v===void 0?void 0:v,h=gr(gr({},d),s);return jk(n,function(f){for(var x in h)f.addCase(x,h[x]);for(var _=0,b=y;_<b.length;_++){var C=b[_];f.addMatcher(C.matcher,C.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 Bk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Uk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Bk[Math.random()*64|0];return t},zk=["name","message","stack","code"],Im=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),V0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Kk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=zk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,g){return{payload:c,meta:Pm(gr({},g||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:Pm(gr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,g,y){return{payload:g,error:(r&&r.serializeError||Kk)(c||"Rejected"),meta:Pm(gr({},y||{}),{arg:d,requestId:p,rejectedWithValue:!!g,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,g){var y=r!=null&&r.idGenerator?r.idGenerator(c):Uk(),v=new l,m,h=!1;function f(_){m=_,v.abort()}var x=function(){return Rk(this,null,function(){var _,b,C,E,I,P,K;return bk(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),E=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:g}),Wk(E)?[4,E]:[3,2];case 1:E=D.sent(),D.label=2;case 2:if(E===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,I=new Promise(function(B,be){return v.signal.addEventListener("abort",function(){return be({name:"AbortError",message:m||"Aborted"})})}),p(i(y,c,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:y,arg:c},{getState:d,extra:g}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:p,getState:d,extra:g,requestId:y,signal:v.signal,abort:f,rejectWithValue:function(B,be){return new Im(B,be)},fulfillWithValue:function(B,be){return new V0(B,be)}})).then(function(B){if(B instanceof Im)throw B;return B instanceof V0?o(B.payload,y,c,B.meta):o(B,y,c)})])];case 3:return C=D.sent(),[3,5];case 4:return P=D.sent(),C=P instanceof Im?s(null,y,c,P.payload,P.meta):s(P,y,c),[3,5];case 5:return K=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,K||p(C),[2,C]}})})}();return Object.assign(x,{abort:f,requestId:y,arg:c,unwrap:function(){return x.then(Vk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Vk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Wk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $k="task",X0="listener",Q0="completed",Am="cancelled",LN="task-"+Am,AN="task-"+Q0,ON=X0+"-"+Am,NN=X0+"-"+Q0,MN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=$k+" "+Am+" (reason: "+t+")"}return e}();var Om="listenerMiddleware";var DN=fe(Om+"/add"),FN=fe(Om+"/removeAll"),jN=fe(Om+"/remove");var W0,HN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(W0||(W0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},qk=function(e){return function(t){setTimeout(t,e)}},BN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:qk(10);N0();var jx=S(Mm()),Hx=S(rx());var Dm=S(_u());function dP(e){e()}var ox=dP,ix=e=>ox=e,sx=()=>ox;var mi=S(O());var ux=S(O());var Iu=S(O()),ax=Symbol.for(`react-redux-context-${Iu.version}`),lx=globalThis;function pP(){let e=lx[ax];return e||(e=(0,Iu.createContext)(null),lx[ax]=e),e}var He=new Proxy({},new Proxy({},{get(e,t){let n=pP();return(r,...o)=>Reflect[t](n,...o)}}));function Zs(e=He){return function(){return(0,ux.useContext)(e)}}var Lu=Zs();var Au=()=>{throw new Error("uSES not initialized!")};var cx=Au,dx=e=>{cx=e},fP=(e,t)=>e===t;function px(e=He){let t=e===He?Lu:Zs(e);return function(r,o={}){let{equalityFn:i=fP,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(),g=(0,mi.useRef)(!0),y=(0,mi.useCallback)({[r.name](m){return r(m)}}[r.name],[r,p,s]),v=cx(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,mi.useDebugValue)(v),v}}var R=px();function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Js(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 $m=S(bx()),ee=S(O()),Nx=S(kx());var RP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function IP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function g(f,x){return l=f,u=x,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function v(){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 h(f,x){let _=!i(x,u),b=!o(f,l,x,u);return l=f,u=x,_&&b?y():_?v():b?m():d}return function(x,_){return a?h(x,_):g(x,_)}}function Vm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Js(t,RP),s=n(e,i),a=r(e,i),l=o(e,i);return IP(s,a,l,e,i)}function Wm(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 ea(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Px(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ju(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=Px(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Px(u),u=i(a,l)),u},i}}function gi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Rx(e){return e&&typeof e=="object"?ea(t=>Wm(e,t)):e?typeof e=="function"?Ju(e,"mapDispatchToProps"):gi(e,"mapDispatchToProps"):ea(t=>({dispatch:t}))}function Ix(e){return e?typeof e=="function"?Ju(e,"mapStateToProps"):gi(e,"mapStateToProps"):ea(()=>({}))}function LP(e,t,n){return Sn({},n,e,t)}function AP(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 Lx(e){return e?typeof e=="function"?AP(e):gi(e,"mergeProps"):()=>LP}function OP(){let e=sx(),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 Ax={notify(){},get:()=>[]};function ec(e,t){let n,r=Ax;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=OP())}function u(){n&&(n(),n=void 0,r.clear(),r=Ax)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var tc=S(O()),NP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hi=NP?tc.useLayoutEffect:tc.useEffect;function Ox(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function yi(e,t){if(Ox(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])||!Ox(e[n[o]],t[n[o]]))return!1;return!0}var MP=["reactReduxForwardedRef"],Mx=Au,Dx=e=>{Mx=e};var DP=[null,null];function FP(e,t,n){hi(()=>e(...t),n)}function jP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function HP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,g=()=>{if(p||!a.current)return;let v=t.getState(),m,h;try{m=r(v,o.current)}catch(f){h=f,d=f}h||(d=null),m===i.current?s.current||u():(i.current=m,l.current=m,s.current=!0,c())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function BP(e,t){return e===t}function UP(e,t,n,{pure:r,areStatesEqual:o=BP,areOwnPropsEqual:i=yi,areStatePropsEqual:s=yi,areMergedPropsEqual:a=yi,forwardRef:l=!1,context:u=He}={}){let c=u,p=Ix(e),d=Rx(t),g=Lx(n),y=!!e;return m=>{let h=m.displayName||m.name||"Component",f=`Connect(${h})`,x={shouldHandleStateChanges:y,displayName:f,wrappedComponentName:h,WrappedComponent:m,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(E){let[I,P,K]=(0,ee.useMemo)(()=>{let{reactReduxForwardedRef:ce}=E,Dr=Js(E,MP);return[E.context,ce,Dr]},[E]),D=(0,ee.useMemo)(()=>I&&I.Consumer&&(0,Nx.isContextConsumer)(ee.default.createElement(I.Consumer,null))?I:c,[I,c]),B=(0,ee.useContext)(D),be=!!E.store&&!!E.store.getState&&!!E.store.dispatch,Ar=!!B&&!!B.store,Ye=be?E.store:B.store,Or=Ar?B.getServerState:Ye.getState,Vi=(0,ee.useMemo)(()=>Vm(Ye.dispatch,x),[Ye]),[Nr,qa]=(0,ee.useMemo)(()=>{if(!y)return DP;let ce=ec(Ye,be?void 0:B.subscription),Dr=ce.notifyNestedSubs.bind(ce);return[ce,Dr]},[Ye,be,B]),Ga=(0,ee.useMemo)(()=>be?B:Sn({},B,{subscription:Nr}),[be,B,Nr]),Wi=(0,ee.useRef)(),$i=(0,ee.useRef)(K),Mr=(0,ee.useRef)(),Co=(0,ee.useRef)(!1),Bd=(0,ee.useRef)(!1),Xt=(0,ee.useRef)(!1),L=(0,ee.useRef)();hi(()=>(Xt.current=!0,()=>{Xt.current=!1}),[]);let J=(0,ee.useMemo)(()=>()=>Mr.current&&K===$i.current?Mr.current:Vi(Ye.getState(),K),[Ye,K]),gt=(0,ee.useMemo)(()=>Dr=>Nr?HP(y,Ye,Nr,Vi,$i,Wi,Co,Xt,Mr,qa,Dr):()=>{},[Nr]);FP(jP,[$i,Wi,Co,K,Mr,qa]);let cn;try{cn=Mx(gt,J,Or?()=>Vi(Or(),K):J)}catch(ce){throw L.current&&(ce.message+=`
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Ie!==5&&(Ie=2),l=Zf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var b=l0(d,i,t);Sv(d,b);break e;case 1:i=l;var C=d.type,E=d.stateNode;if(!(d.flags&64)&&(typeof C.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Jt===null||!Jt.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=u0(d,i,t);Sv(d,I);break e}}d=d.return}while(d!==null)}y0(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function g0(){var e=ou.current;return ou.current=ru,e===null?ru:e}function ys(e,t){var n=F;F|=16;var r=g0();Ve===e&&De===t||Yo(e,t);do try{GT();break}catch(o){m0(e,o)}while(1);if(zf(),F=n,ou.current=r,Se!==null)throw Error(T(261));return Ve=null,De=0,Ie}function GT(){for(;Se!==null;)h0(Se)}function XT(){for(;Se!==null&&!IT();)h0(Se)}function h0(e){var t=S0(e.alternate,e,Qr);e.memoizedProps=e.pendingProps,t===null?y0(e):Se=t,Jf.current=null}function y0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=HT(t),n!==null){n.flags&=2047,Se=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=BT(n,t,Qr),n!==null){Se=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Qr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ie===0&&(Ie=5)}function Ur(e){var t=ti();return Xr(99,QT.bind(null,e,t)),null}function QT(e,t){do dr();while(ks!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-sr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Ve&&(Se=Ve=null,De=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,Jf.current=null,yp=Rl,s=sv(),Vp(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,g=0,y=0,v=s,f=null;t:for(;;){for(var h;v!==a||i!==0&&v.nodeType!==3||(p=c+i),v!==l||u!==0&&v.nodeType!==3||(d=c+u),v.nodeType===3&&(c+=v.nodeValue.length),(h=v.firstChild)!==null;)f=v,v=h;for(;;){if(v===s)break t;if(f===a&&++g===i&&(p=c),f===l&&++y===u&&(d=c),(h=v.nextSibling)!==null)break;v=f,f=v.parentNode}v=h}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;vp={focusedElem:s,selectionRange:a},Rl=!1,Rs=null,Dl=!1,A=r;do try{YT()}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);Rs=null,A=r;do try{for(s=e;A!==null;){var m=A.flags;if(m&16&&Ls(A.stateNode,""),m&128){var x=A.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(m&1038){case 2:Vv(A),A.flags&=-3;break;case 6:Vv(A),A.flags&=-3,Ep(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,Ep(A.alternate,A);break;case 4:Ep(A.alternate,A);break;case 8:a=A,c0(s,a);var b=a.alternate;zv(a),b!==null&&zv(b)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);if(_=vp,x=sv(),m=_.focusedElem,s=_.selectionRange,x!==m&&m&&m.ownerDocument&&PS(m.ownerDocument.documentElement,m)){for(s!==null&&Vp(m)&&(x=s.start,_=s.end,_===void 0&&(_=x),"selectionStart"in m?(m.selectionStart=x,m.selectionEnd=Math.min(_,m.value.length)):(_=(x=m.ownerDocument||document)&&x.defaultView||window,_.getSelection&&(_=_.getSelection(),a=m.textContent.length,b=Math.min(s.start,a),s=s.end===void 0?b:Math.min(s.end,a),!_.extend&&b>s&&(a=s,s=b,b=a),a=iv(m,b),i=iv(m,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(),b>s?(_.addRange(x),_.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),_.addRange(x)))))),x=[],_=m;_=_.parentNode;)_.nodeType===1&&x.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<x.length;m++)_=x[m],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Rl=!!yp,vp=yp=null,e.current=n,A=r;do try{for(m=e;A!==null;){var C=A.flags;if(C&36&&VT(m,A.alternate,A),C&128){x=void 0;var E=A.ref;if(E!==null){var I=A.stateNode;switch(A.tag){case 5:x=I;break;default:x=I}typeof E=="function"?E(x):E.current=x}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));or(A,P),A=A.nextEffect}while(A!==null);A=null,AT(),F=o}else e.current=n;if(lr)lr=!1,ks=e,hs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(C=A,C.sibling=null,C.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Jt=null),r===1?e===mf?Ps++:(Ps=0,mf=e):Ps=0,n=n.stateNode,qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Hf,n,void 0,(n.current.flags&64)===64)}catch{}if(Tt(e,Me()),iu)throw iu=!1,e=df,df=null,e;return F&8||nn(),null}function YT(){for(;A!==null;){var e=A.alternate;Dl||Rs===null||(A.flags&8?$y(A,Rs)&&(Dl=!0):A.tag===13&&WT(e,A)&&$y(A,Rs)&&(Dl=!0));var t=A.flags;t&256&&KT(e,A),!(t&512)||lr||(lr=!0,Bs(97,function(){return dr(),null})),A=A.nextEffect}}function dr(){if(hs!==90){var e=97<hs?97:hs;return hs=90,Xr(e,JT)}return!1}function ZT(e,t){pf.push(t,e),lr||(lr=!0,Bs(97,function(){return dr(),null}))}function v0(e,t){ff.push(t,e),lr||(lr=!0,Bs(97,function(){return dr(),null}))}function JT(){if(ks===null)return!1;var e=ks;if(ks=null,F&48)throw Error(T(331));var t=F;F|=32;var n=ff;ff=[];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));or(i,l)}}for(n=pf,pf=[],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));or(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return F=t,nn(),!0}function $v(e,t,n){t=Zf(n,t),t=l0(e,t,1),tr(e,t),t=st(),e=Su(e,1),e!==null&&(du(e,1,t),Tt(e,t))}function or(e,t){if(e.tag===3)$v(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){$v(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r))){e=Zf(t,e);var o=u0(n,e,1);if(tr(n,o),o=st(),n=Su(n,1),n!==null)du(n,1,o),Tt(n,o);else if(typeof r.componentDidCatch=="function"&&(Jt===null||!Jt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function ek(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&n,Ve===e&&(De&n)===n&&(Ie===4||Ie===3&&(De&62914560)===De&&500>Me()-tm?Yo(e,0):em|=n),Tt(e,t)}function tk(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=ii),t=Do(62914560&~fn),t===0&&(t=4194304)):t=ti()===99?1:2:t=1),n=st(),e=Su(e,t),e!==null&&(du(e,t,n),Tt(e,n))}var S0;S0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||et.current)jt=!0;else if(n&r)jt=!!(e.flags&16384);else{switch(jt=!1,t.tag){case 3:Av(t),wp();break;case 5:bv(t);break;case 1:tt(t.type)&&Al(t);break;case 4:Zp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;pe(ql,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Ov(e,t,n):(pe(de,de.current&1),t=gn(e,t,n),t!==null?t.sibling:null);pe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return jv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),pe(de,de.current),r)break;return null;case 23:case 24:return t.lanes=0,bp(e,t,n)}return gn(e,t,n)}else jt=!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=ei(t,Fe.current),Go(t,n),o=Gf(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,tt(r)){var i=!0;Al(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Vf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Ql(t,r,s,e),o.updater=yu,t.stateNode=o,o._reactInternals=t,Yp(t,r,e,n),t=nf(null,t,r,!0,i,n)}else t.tag=0,Je(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=rk(o),e=Ft(o,e),i){case 0:t=tf(null,t,o,e,n);break e;case 1:t=Lv(null,t,o,e,n);break e;case 11:t=Rv(null,t,o,e,n);break e;case 14:t=Iv(null,t,o,Ft(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:Ft(r,o),tf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Lv(e,t,r,o,n);case 3:if(Av(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,VS(e,t),Hs(t,r,null,n),r=t.memoizedState.element,r===o)wp(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Qn=qo(t.stateNode.containerInfo.firstChild),mn=t,i=tn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Xo.push(i);for(n=GS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Je(e,t,r,n),wp();t=t.child}return t;case 5:return bv(t),e===null&&Jp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,qp(r,o)?s=null:i!==null&&qp(r,i)&&(t.flags|=16),o0(e,t),Je(e,t,s,n),t.child;case 6:return e===null&&Jp(t),null;case 13:return Ov(e,t,n);case 4:return Zp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yl(t,null,r,n):Je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),Rv(e,t,r,o,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(pe(ql,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=wt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!et.current){t=gn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&u.observedBits&i){a.tag===1&&(u=er(-1,n&-n),u.tag=2,tr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),KS(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}Je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Go(t,n),o=Et(o,i.unstable_observedBits),r=r(o),t.flags|=1,Je(e,t,r,n),t.child;case 14:return o=t.type,i=Ft(o,t.pendingProps),i=Ft(o.type,i),Iv(e,t,o,i,r,n);case 15:return r0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ft(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,tt(r)?(e=!0,Al(t)):e=!1,Go(t,n),$S(t,r,o),Yp(t,r,o,n),nf(null,t,r,!0,e,n);case 19:return jv(e,t,n);case 23:return bp(e,t,n);case 24:return bp(e,t,n)}throw Error(T(156,t.tag))};function nk(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 bt(e,t,n,r){return new nk(e,t,n,r)}function rm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rk(e){if(typeof e=="function")return rm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lu)return 11;if(e===uu)return 14}return 2}function ur(e,t){var n=e.alternate;return n===null?(n=bt(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 Fl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")rm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case qn:return Zo(n.children,o,i,t);case Xv:s=8,o|=16;break;case Sf:s=8,o|=1;break;case vs:return e=bt(12,n,t,o|8),e.elementType=vs,e.type=vs,e.lanes=i,e;case Ss:return e=bt(13,n,t,o),e.type=Ss,e.elementType=Ss,e.lanes=i,e;case jl:return e=bt(19,n,t,o),e.elementType=jl,e.lanes=i,e;case Ef:return om(n,o,i,t);case Rp:return e=bt(24,n,t,o),e.elementType=Rp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xf:s=10;break e;case _f:s=9;break e;case lu:s=11;break e;case uu:s=14;break e;case wf:s=16,r=null;break e;case bf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=bt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Zo(e,t,n,r){return e=bt(7,e,r,t),e.lanes=n,e}function om(e,t,n,r){return e=bt(23,e,r,t),e.elementType=Ef,e.lanes=n,e}function Tp(e,t,n){return e=bt(6,e,null,t),e.lanes=n,e}function kp(e,t,n){return t=bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ok(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=dp(0),this.expirationTimes=dp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dp(0),this.mutableSourceEagerHydrationData=null}function ik(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function su(e,t,n,r){var o=t.current,i=st(),s=nr(o);e:if(n){n=n._reactInternals;t:{if(Jr(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(tt(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(tt(l)){n=DS(n,l,a);break e}}n=a}else n=ar;return t.context===null?t.context=n:t.pendingContext=n,t=er(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),tr(o,t),rr(o,s,i),s}function Pp(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 qv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function im(e,t){qv(e,t),(e=e.alternate)&&qv(e,t)}function sk(){return null}function sm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new ok(e,t,n!=null&&n.hydrate===!0),t=bt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Vf(t),e[oi]=n.current,LS(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}sm.prototype.render=function(e){su(e,this._internalRoot,null,null)};sm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;su(null,e,null,function(){t[oi]=null})};function Gs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ak(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 sm(e,0,t?{hydrate:!0}:void 0)}function xu(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=Pp(s);a.call(u)}}su(t,s,e,o)}else{if(i=n._reactRootContainer=ak(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Pp(s);l.call(u)}}f0(function(){su(t,s,e,o)})}return Pp(s)}cS=function(e){if(e.tag===13){var t=st();rr(e,4,t),im(e,4)}};If=function(e){if(e.tag===13){var t=st();rr(e,67108864,t),im(e,67108864)}};dS=function(e){if(e.tag===13){var t=st(),n=nr(e);rr(e,n,t),im(e,n)}};pS=function(e,t){return t()};Bp=function(e,t,n){switch(t){case"input":if(Lp(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=gu(r);if(!o)throw Error(T(90));Yv(r),Lp(r,o)}}}break;case"textarea":Jv(e,n);break;case"select":t=n.value,t!=null&&Vo(e,!!n.multiple,t,!1)}};kf=p0;sS=function(e,t,n,r,o){var i=F;F|=4;try{return Xr(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(ai(),nn())}};Pf=function(){!(F&49)&&(qT(),dr())};aS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(ai(),nn())}};function x0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gs(t))throw Error(T(200));return ik(e,t,null,n)}var lk={Events:[Ws,Ho,gu,oS,iS,dr,{current:!1}]},ds={findFiberByHostInstance:Vr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},uk={bundleType:ds.bundleType,version:ds.version,rendererPackageName:ds.rendererPackageName,rendererConfig:ds.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uS(e),e===null?null:e.stateNode},findFiberByHostInstance:ds.findFiberByHostInstance||sk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ps=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ps.isDisabled&&ps.supportsFiber))try{Hf=ps.inject(uk),qr=ps}catch{}var ps;kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;kt.createPortal=x0;kt.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=uS(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return Xr(99,e.bind(null,t))}finally{F=n,nn()}};kt.hydrate=function(e,t,n){if(!Gs(t))throw Error(T(200));return xu(null,e,t,!0,n)};kt.render=function(e,t,n){if(!Gs(t))throw Error(T(200));return xu(null,e,t,!1,n)};kt.unmountComponentAtNode=function(e){if(!Gs(e))throw Error(T(40));return e._reactRootContainer?(f0(function(){xu(null,null,e,!1,function(){e._reactRootContainer=null,e[oi]=null})}),!0):!1};kt.unstable_batchedUpdates=p0;kt.unstable_createPortal=function(e,t){return x0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return xu(e,t,n,!1,r)};kt.version="17.0.2"});var _u=me((tN,b0)=>{"use strict";function w0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(w0)}catch(e){console.error(e)}}w0(),b0.exports=_0()});var Y0=me(Q0=>{"use strict";var fi=O();function qk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gk=typeof Object.is=="function"?Object.is:qk,Xk=fi.useState,Qk=fi.useEffect,Yk=fi.useLayoutEffect,Zk=fi.useDebugValue;function Jk(e,t){var n=t(),r=Xk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Yk(function(){o.value=n,o.getSnapshot=t,Om(o)&&i({inst:o})},[e,n,t]),Qk(function(){return Om(o)&&i({inst:o}),e(function(){Om(o)&&i({inst:o})})},[e]),Zk(n),n}function Om(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gk(e,n)}catch{return!0}}function eP(e,t){return t()}var tP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?eP:Jk;Q0.useSyncExternalStore=fi.useSyncExternalStore!==void 0?fi.useSyncExternalStore:tP});var Nm=me((zN,Z0)=>{"use strict";Z0.exports=Y0()});var ex=me(J0=>{"use strict";var Ru=O(),nP=Nm();function rP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oP=typeof Object.is=="function"?Object.is:rP,iP=nP.useSyncExternalStore,sP=Ru.useRef,aP=Ru.useEffect,lP=Ru.useMemo,uP=Ru.useDebugValue;J0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=sP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=lP(function(){function l(g){if(!u){if(u=!0,c=g,g=r(g),o!==void 0&&s.hasValue){var y=s.value;if(o(y,g))return p=y}return p=g}if(y=p,oP(c,g))return y;var v=r(g);return o!==void 0&&o(y,v)?y:(c=g,p=v)}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=iP(e,i[0],i[1]);return aP(function(){s.hasValue=!0,s.value=a},[a]),uP(a),a}});var nx=me((VN,tx)=>{"use strict";tx.exports=ex()});var fx=me(Q=>{"use strict";var Ee=typeof Symbol=="function"&&Symbol.for,Dm=Ee?Symbol.for("react.element"):60103,Fm=Ee?Symbol.for("react.portal"):60106,Ou=Ee?Symbol.for("react.fragment"):60107,Nu=Ee?Symbol.for("react.strict_mode"):60108,Mu=Ee?Symbol.for("react.profiler"):60114,Du=Ee?Symbol.for("react.provider"):60109,Fu=Ee?Symbol.for("react.context"):60110,jm=Ee?Symbol.for("react.async_mode"):60111,ju=Ee?Symbol.for("react.concurrent_mode"):60111,Bu=Ee?Symbol.for("react.forward_ref"):60112,Hu=Ee?Symbol.for("react.suspense"):60113,fP=Ee?Symbol.for("react.suspense_list"):60120,Uu=Ee?Symbol.for("react.memo"):60115,zu=Ee?Symbol.for("react.lazy"):60116,mP=Ee?Symbol.for("react.block"):60121,gP=Ee?Symbol.for("react.fundamental"):60117,hP=Ee?Symbol.for("react.responder"):60118,yP=Ee?Symbol.for("react.scope"):60119;function ut(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dm:switch(e=e.type,e){case jm:case ju:case Ou:case Mu:case Nu:case Hu:return e;default:switch(e=e&&e.$$typeof,e){case Fu:case Bu:case zu:case Uu:case Du:return e;default:return t}}case Fm:return t}}}function px(e){return ut(e)===ju}Q.AsyncMode=jm;Q.ConcurrentMode=ju;Q.ContextConsumer=Fu;Q.ContextProvider=Du;Q.Element=Dm;Q.ForwardRef=Bu;Q.Fragment=Ou;Q.Lazy=zu;Q.Memo=Uu;Q.Portal=Fm;Q.Profiler=Mu;Q.StrictMode=Nu;Q.Suspense=Hu;Q.isAsyncMode=function(e){return px(e)||ut(e)===jm};Q.isConcurrentMode=px;Q.isContextConsumer=function(e){return ut(e)===Fu};Q.isContextProvider=function(e){return ut(e)===Du};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dm};Q.isForwardRef=function(e){return ut(e)===Bu};Q.isFragment=function(e){return ut(e)===Ou};Q.isLazy=function(e){return ut(e)===zu};Q.isMemo=function(e){return ut(e)===Uu};Q.isPortal=function(e){return ut(e)===Fm};Q.isProfiler=function(e){return ut(e)===Mu};Q.isStrictMode=function(e){return ut(e)===Nu};Q.isSuspense=function(e){return ut(e)===Hu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ou||e===ju||e===Mu||e===Nu||e===Hu||e===fP||typeof e=="object"&&e!==null&&(e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Du||e.$$typeof===Fu||e.$$typeof===Bu||e.$$typeof===gP||e.$$typeof===hP||e.$$typeof===yP||e.$$typeof===mP)};Q.typeOf=ut});var gx=me((oM,mx)=>{"use strict";mx.exports=fx()});var wx=me((iM,_x)=>{"use strict";var Bm=gx(),vP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},SP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hm={};Hm[Bm.ForwardRef]=xP;Hm[Bm.Memo]=Sx;function hx(e){return Bm.isMemo(e)?Sx:Hm[e.$$typeof]||vP}var _P=Object.defineProperty,wP=Object.getOwnPropertyNames,yx=Object.getOwnPropertySymbols,bP=Object.getOwnPropertyDescriptor,CP=Object.getPrototypeOf,vx=Object.prototype;function xx(e,t,n){if(typeof t!="string"){if(vx){var r=CP(t);r&&r!==vx&&xx(e,r,n)}var o=wP(t);yx&&(o=o.concat(yx(t)));for(var i=hx(e),s=hx(t),a=0;a<o.length;++a){var l=o[a];if(!SP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=bP(t,l);try{_P(e,l,u)}catch{}}}}return e}_x.exports=xx});var Cx=me(Y=>{"use strict";var Um=Symbol.for("react.element"),zm=Symbol.for("react.portal"),Ku=Symbol.for("react.fragment"),Vu=Symbol.for("react.strict_mode"),Wu=Symbol.for("react.profiler"),$u=Symbol.for("react.provider"),qu=Symbol.for("react.context"),EP=Symbol.for("react.server_context"),Gu=Symbol.for("react.forward_ref"),Xu=Symbol.for("react.suspense"),Qu=Symbol.for("react.suspense_list"),Yu=Symbol.for("react.memo"),Zu=Symbol.for("react.lazy"),TP=Symbol.for("react.offscreen"),bx;bx=Symbol.for("react.module.reference");function Rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Um:switch(e=e.type,e){case Ku:case Wu:case Vu:case Xu:case Qu:return e;default:switch(e=e&&e.$$typeof,e){case EP:case qu:case Gu:case Zu:case Yu:case $u:return e;default:return t}}case zm:return t}}}Y.ContextConsumer=qu;Y.ContextProvider=$u;Y.Element=Um;Y.ForwardRef=Gu;Y.Fragment=Ku;Y.Lazy=Zu;Y.Memo=Yu;Y.Portal=zm;Y.Profiler=Wu;Y.StrictMode=Vu;Y.Suspense=Xu;Y.SuspenseList=Qu;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return Rt(e)===qu};Y.isContextProvider=function(e){return Rt(e)===$u};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Um};Y.isForwardRef=function(e){return Rt(e)===Gu};Y.isFragment=function(e){return Rt(e)===Ku};Y.isLazy=function(e){return Rt(e)===Zu};Y.isMemo=function(e){return Rt(e)===Yu};Y.isPortal=function(e){return Rt(e)===zm};Y.isProfiler=function(e){return Rt(e)===Wu};Y.isStrictMode=function(e){return Rt(e)===Vu};Y.isSuspense=function(e){return Rt(e)===Xu};Y.isSuspenseList=function(e){return Rt(e)===Qu};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ku||e===Wu||e===Vu||e===Xu||e===Qu||e===TP||typeof e=="object"&&e!==null&&(e.$$typeof===Zu||e.$$typeof===Yu||e.$$typeof===$u||e.$$typeof===qu||e.$$typeof===Gu||e.$$typeof===bx||e.getModuleId!==void 0)};Y.typeOf=Rt});var Tx=me((aM,Ex)=>{"use strict";Ex.exports=Cx()});var C_=me((OD,b_)=>{"use strict";var yR=/["'&<>]/;b_.exports=vR;function vR(e){var t=""+e,n=yR.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 Qg=me((cF,n1)=>{"use strict";var wI="Expected a function",e1=NaN,bI="[object Symbol]",CI=/^\s+|\s+$/g,EI=/^[-+]0x[0-9a-f]+$/i,TI=/^0b[01]+$/i,kI=/^0o[0-7]+$/i,PI=parseInt,RI=typeof global=="object"&&global&&global.Object===Object&&global,II=typeof self=="object"&&self&&self.Object===Object&&self,LI=RI||II||Function("return this")(),AI=Object.prototype,OI=AI.toString,NI=Math.max,MI=Math.min,Gg=function(){return LI.Date.now()};function DI(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(wI);t=t1(t)||0,Xg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?NI(t1(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function g(C){var E=r,I=o;return r=o=void 0,u=C,s=e.apply(I,E),s}function y(C){return u=C,a=setTimeout(h,t),c?g(C):s}function v(C){var E=C-l,I=C-u,P=t-E;return p?MI(P,i-I):P}function f(C){var E=C-l,I=C-u;return l===void 0||E>=t||E<0||p&&I>=i}function h(){var C=Gg();if(f(C))return m(C);a=setTimeout(h,v(C))}function m(C){return a=void 0,d&&r?g(C):(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:m(Gg())}function b(){var C=Gg(),E=f(C);if(r=arguments,o=this,l=C,E){if(a===void 0)return y(l);if(p)return a=setTimeout(h,t),g(l)}return a===void 0&&(a=setTimeout(h,t)),s}return b.cancel=x,b.flush=_,b}function Xg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function FI(e){return!!e&&typeof e=="object"}function jI(e){return typeof e=="symbol"||FI(e)&&OI.call(e)==bI}function t1(e){if(typeof e=="number")return e;if(jI(e))return e1;if(Xg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(CI,"");var n=TI.test(e);return n||kI.test(e)?PI(e.slice(2),n?2:8):EI.test(e)?e1:+e}n1.exports=DI});var TA={};Pe(TA,{Card:()=>ge,ContentEditableInput:()=>_o,DeepdeskAPI:()=>Un,DeepdeskSDK:()=>$a,HTTPClient:()=>Gt,InputMediator:()=>kn,InputType:()=>Vn,KeyboardHint:()=>il,Label:()=>sl,Locale:()=>na,Section:()=>Kn,SectionList:()=>al,Sources:()=>Mt,Suggestion:()=>oe,SuggestionList:()=>xt,TextAreaInput:()=>Pn,ToggleButton:()=>Br,attachFile:()=>OC,authenticateWithKey:()=>AC,createFullRange:()=>Ui,createOverlayContainer:()=>lo,createRangeFromOffsets:()=>Lr,escapeHTML:()=>ki,fetchPlatformConfig:()=>jd,formatTextMarkup:()=>LC,getRangeOffsets:()=>za,getRangeText:()=>Ka,insertCKEditor:()=>IC,isSupportedInputElement:()=>Md,updateContentEditable:()=>PC,updateTextArea:()=>kC,useStyles:()=>k,waitForElementVisibilityChange:()=>Dd});var nl=S(q()),yt=S(O());var el=S(O()),oy=S(q()),Gi=el.default.createContext({});function k(e,t){let{debug:n,...r}=(0,el.useContext)(Gi),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,oy.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var iy={root:"_root_vr71j_1"};var Fr=S(w()),tl=()=>(0,Fr.jsxs)("svg",{className:iy.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Fr.jsx)("defs",{children:(0,Fr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Fr.jsx)("title",{children:"Failed loading image"}),(0,Fr.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 qd={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 jr=S(w()),rl=(0,yt.createContext)(qd),eE=({title:e,src:t})=>{let n=(0,yt.useContext)(rl),[r,o]=(0,yt.useState)(!1);return(0,yt.useEffect)(()=>{o(!1)},[t]),(0,jr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,jr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,jr.jsx)(tl,{})})},tE=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,yt.useContext)(rl);return(0,jr.jsx)("div",{className:(0,nl.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},nE=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,yt.useContext)(rl);return yt.default.createElement(e,{className:(0,nl.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},ol=({children:e})=>{let t=k("Card",qd);return(0,jr.jsx)("div",{className:(0,nl.default)(t.root),children:(0,jr.jsx)(rl.Provider,{value:t,children:e})})};ol.Image=eE;ol.Content=tE;ol.Title=nE;var ge=ol;var dy=S(q());var cy={root:"_root_cq1yq_1"};var py=S(w());var rE={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},oE=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",cy);return(0,py.jsx)("span",{"data-key":rE[t],className:(0,dy.default)(e,r.root),...n})},il=oE;var my=S(q());var fy={root:"_root_4a08n_1"};var gy=S(w()),iE=({className:e,children:t,...n})=>{let r=k("Label",fy);return(0,gy.jsx)("span",{...n,className:(0,my.default)(e,r.root),children:t})},sl=iE;var hy={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ko=S(w()),sE=({title:e,children:t,type:n,...r})=>{let o=k("Section",hy);return(0,ko.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ko.jsx)("div",{className:o.subTitleContainer,children:(0,ko.jsx)("span",{className:o.subtitle,children:e})}),(0,ko.jsx)("div",{className:o.suggestions,children:t})]})},Kn=sE;var vy=S(q()),Sy=S(O());var yy={root:"_root_19wxp_1"};var xy=S(w()),aE=Sy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",yy);return(0,xy.jsx)("div",{ref:n,className:(0,vy.default)(r.root,e),children:t})}),al=aE;var Qi=S(q()),St=S(O());var Gd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var vt=S(w()),Po=(0,St.createContext)(Gd),lE=({fixed:e,children:t,...n})=>{let r=(0,St.useContext)(Po);return(0,vt.jsx)("div",{...n,className:(0,Qi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},uE=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,St.useContext)(Po);return(0,vt.jsxs)("div",{className:(0,Qi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,vt.jsx)("ul",{className:i.dropdownList,children:o})]})},cE=({index:e,label:t,onClick:n})=>{let r=(0,St.useContext)(Po);return(0,vt.jsx)("li",{className:r.dropdownItem,children:(0,vt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},dE=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,St.useContext)(Po);return(0,vt.jsx)("button",{type:"button",className:(0,Qi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Xd=({labels:e})=>{let t=(0,St.useContext)(Po);return(0,vt.jsx)("div",{className:t.labels,children:e.map(n=>(0,vt.jsx)("span",{className:t.label,children:n},n))})},Ro=St.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Gd),l=(0,St.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,vt.jsx)(o,{...i,ref:s,className:(0,Qi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,vt.jsx)(Po.Provider,{value:a,children:r})})});Ro.Labels=Xd;Ro.Actions=lE;Ro.ActionButton=dE;Ro.DropdownButton=uE;Ro.DropdownItem=cE;var oe=Ro;var wy=S(q());var _y={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var by=S(w()),pE=({withDivider:e,children:t})=>{let n=k("SuggestionList",_y);return(0,by.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,wy.default)(n.root,{[n.isWithDivider]:e}),children:t})},xt=pE;var Ey=S(q());var Cy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var ll=S(w()),fE=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Cy);return(0,ll.jsx)("button",{type:"button",className:(0,Ey.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,ll.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,ll.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Br=fE;var Ty=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Io=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var ky=/x-deepdesk-(([a-z0-9\-_])+-version)/,Mt=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v))(Mt||{}),Vn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Vn||{});var Nt=S(_u());var L1=S(O());function Pt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function vn(e){return!!e&&!!e[le]}function Bt(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)===yk}(e)||Array.isArray(e)||!!e[I0]||!!(!((t=e.constructor)===null||t===void 0)&&t[I0])||gm(e)||hm(e))}function to(e,t,n){n===void 0&&(n=!1),ci(e)===0?(n?Object.keys:ui)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function ci(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:gm(e)?2:hm(e)?3:0}function li(e,t){return ci(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ck(e,t){return ci(e)===2?e.get(t):e[t]}function L0(e,t,n){var r=ci(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function A0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function gm(e){return gk&&e instanceof Map}function hm(e){return hk&&e instanceof Set}function pr(e){return e.o||e.t}function ym(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=M0(e);delete t[le];for(var n=ui(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 vm(e,t){return t===void 0&&(t=!1),Sm(e)||vn(e)||!Bt(e)||(ci(e)>1&&(e.set=e.add=e.clear=e.delete=dk),Object.freeze(e),t&&to(e,function(n,r){return vm(r,!0)},!0)),e}function dk(){Pt(2)}function Sm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rn(e){var t=mm[e];return t||Pt(18,e),t}function pk(e,t){mm[e]||(mm[e]=t)}function dm(){return Qs}function am(e,t){t&&(rn("Patches"),e.u=[],e.s=[],e.v=t)}function wu(e){pm(e),e.p.forEach(fk),e.p=null}function pm(e){e===Qs&&(Qs=e.l)}function C0(e){return Qs={p:[],l:Qs,h:e,m:!0,_:0}}function fk(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function lm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||rn("ES5").S(t,e,r),r?(n[le].P&&(wu(t),Pt(4)),Bt(e)&&(e=bu(t,e),t.l||Cu(t,e)),t.u&&rn("Patches").M(n[le].t,e,t.u,t.s)):e=bu(t,n,[]),wu(t),t.u&&t.v(t.u,t.s),e!==N0?e:void 0}function bu(e,t,n){if(Sm(t))return t;var r=t[le];if(!r)return to(t,function(a,l){return E0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Cu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=ym(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),to(i,function(a,l){return E0(e,r,o,a,l,n,s)}),Cu(e,o,!1),n&&e.u&&rn("Patches").N(r,n,e.u,e.s)}return r.o}function E0(e,t,n,r,o,i,s){if(vn(o)){var a=bu(e,o,i&&t&&t.i!==3&&!li(t.R,r)?i.concat(r):void 0);if(L0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Bt(o)&&!Sm(o)){if(!e.h.D&&e._<1)return;bu(e,o),t&&t.A.l||Cu(e,o)}}function Cu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&vm(t,n)}function um(e,t){var n=e[le];return(n?pr(n):e)[t]}function T0(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 fr(e){e.P||(e.P=!0,e.l&&fr(e.l))}function cm(e){e.o||(e.o=ym(e.t))}function fm(e,t,n){var r=gm(t)?rn("MapSet").F(t,n):hm(t)?rn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:dm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ys;s&&(l=[a],u=Xs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):rn("ES5").J(t,n);return(n?n.A:dm()).p.push(r),r}function mk(e){return vn(e)||Pt(22,e),function t(n){if(!Bt(n))return n;var r,o=n[le],i=ci(n);if(o){if(!o.P&&(o.i<4||!rn("ES5").K(o)))return o.t;o.I=!0,r=k0(n,i),o.I=!1}else r=k0(n,i);return to(r,function(s,a){o&&ck(o.t,s)===a||L0(r,s,t(a))}),i===3?new Set(r):r}(e)}function k0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ym(e)}function O0(){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 Ys.get(u,s)},set:function(u){var c=this[le];Ys.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)&&fr(l);break;case 4:n(l)&&fr(l)}}}function n(s){for(var a=s.t,l=s.k,u=ui(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!li(a,p))return!0;var g=l[p],y=g&&g[le];if(y?y.t!==d:!A0(g,d))return!0}}var v=!!a[le];return u.length!==ui(a).length+(v?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&&Pt(3,JSON.stringify(pr(s)))}var i={};pk("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var g=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var v=M0(d);delete v[le];for(var f=ui(v),h=0;h<f.length;h++){var m=f[h];v[m]=e(m,p||!!v[m].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:dm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,g=p.k,y=p.R,v=p.i;if(v===4)to(g,function(_){_!==le&&(d[_]!==void 0||li(d,_)?y[_]||u(g[_]):(y[_]=!0,fr(p)))}),to(d,function(_){g[_]!==void 0||li(g,_)||(y[_]=!1,fr(p))});else if(v===5){if(r(p)&&(fr(p),y.length=!0),g.length<d.length)for(var f=g.length;f<d.length;f++)y[f]=!1;else for(var h=d.length;h<g.length;h++)y[h]=!0;for(var m=Math.min(g.length,d.length),x=0;x<m;x++)g.hasOwnProperty(x)||(y[x]=!0),y[x]===void 0&&u(g[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var P0,Qs,xm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",gk=typeof Map<"u",hk=typeof Set<"u",R0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",N0=xm?Symbol.for("immer-nothing"):((P0={})["immer-nothing"]=!0,P0),I0=xm?Symbol.for("immer-draftable"):"__$immer_draftable",le=xm?Symbol.for("immer-state"):"__$immer_state";var yk=""+Object.prototype.constructor,ui=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,M0=Object.getOwnPropertyDescriptors||function(e){var t={};return ui(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},mm={},Ys={get:function(e,t){if(t===le)return e;var n=pr(e);if(!li(n,t))return function(o,i,s){var a,l=T0(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||!Bt(r)?r:r===um(e.t,t)?(cm(e),e.o[t]=fm(e.A.h,r,e)):r},has:function(e,t){return t in pr(e)},ownKeys:function(e){return Reflect.ownKeys(pr(e))},set:function(e,t,n){var r=T0(pr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=um(pr(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(A0(n,o)&&(n!==void 0||li(e.t,t)))return!0;cm(e),fr(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 um(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,cm(e),fr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=pr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Pt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pt(12)}},Xs={};to(Ys,function(e,t){Xs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xs.deleteProperty=function(e,t){return Xs.set.call(this,e,t,void 0)},Xs.set=function(e,t,n){return Ys.set.call(this,e[0],t,n,e[0])};var vk=function(){function e(n){var r=this;this.O=R0,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(v){var f=this;v===void 0&&(v=a);for(var h=arguments.length,m=Array(h>1?h-1:0),x=1;x<h;x++)m[x-1]=arguments[x];return l.produce(v,function(_){var b;return(b=i).call.apply(b,[f,_].concat(m))})}}var u;if(typeof i!="function"&&Pt(6),s!==void 0&&typeof s!="function"&&Pt(7),Bt(o)){var c=C0(r),p=fm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?wu(c):pm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return am(c,s),lm(v,c)},function(v){throw wu(c),v}):(am(c,s),lm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===N0&&(u=void 0),r.D&&vm(u,!0),s){var g=[],y=[];rn("Patches").M(o,u,g,y),s(g,y)}return u}Pt(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(g){return o.apply(void 0,[g].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){Bt(n)||Pt(8),vn(n)&&(n=mk(n));var r=C0(this),o=fm(this,n,void 0);return o[le].C=!0,pm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return am(i,r),lm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!R0&&Pt(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=rn("Patches").$;return vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),lt=new vk,Sk=lt.produce,nN=lt.produceWithPatches.bind(lt),rN=lt.setAutoFreeze.bind(lt),oN=lt.setUseProxies.bind(lt),iN=lt.applyPatches.bind(lt),sN=lt.createDraft.bind(lt),aN=lt.finishDraft.bind(lt),Eu=Sk;function mr(e){"@babel/helpers - typeof";return mr=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},mr(e)}function _m(e,t){if(mr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(mr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wm(e){var t=_m(e,"string");return mr(t)==="symbol"?t:String(t)}function bm(e,t,n){return t=wm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D0(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 Tu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D0(Object(n),!0).forEach(function(r){bm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function je(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 F0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Cm=function(){return Math.random().toString(36).substring(7).split("").join(".")},ku={INIT:"@@redux/INIT"+Cm(),REPLACE:"@@redux/REPLACE"+Cm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Cm()}};function xk(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 Em(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(je(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(je(1));return n(Em)(e,t)}if(typeof e!="function")throw new Error(je(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(je(3));return i}function p(v){if(typeof v!="function")throw new Error(je(4));if(l)throw new Error(je(5));var f=!0;return u(),a.push(v),function(){if(f){if(l)throw new Error(je(6));f=!1,u();var m=a.indexOf(v);a.splice(m,1),s=null}}}function d(v){if(!xk(v))throw new Error(je(7));if(typeof v.type>"u")throw new Error(je(8));if(l)throw new Error(je(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var f=s=a,h=0;h<f.length;h++){var m=f[h];m()}return v}function g(v){if(typeof v!="function")throw new Error(je(10));o=v,d({type:ku.REPLACE})}function y(){var v,f=p;return v={subscribe:function(m){if(typeof m!="object"||m===null)throw new Error(je(11));function x(){m.next&&m.next(c())}x();var _=f(x);return{unsubscribe:_}}},v[F0]=function(){return this},v}return d({type:ku.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:g},r[F0]=y,r}function _k(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:ku.INIT});if(typeof r>"u")throw new Error(je(12));if(typeof n(void 0,{type:ku.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(je(13))})}function Pu(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{_k(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,g={},y=0;y<i.length;y++){var v=i[y],f=n[v],h=u[v],m=f(h,c);if(typeof m>"u"){var x=c&&c.type;throw new Error(je(14))}g[v]=m,d=d||m!==h}return d=d||i.length!==Object.keys(u).length,d?g:u}}function di(){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 j0(){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(je(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=di.apply(void 0,a)(o.dispatch),Tu(Tu({},o),{},{dispatch:i})}}}function B0(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 H0=B0();H0.withExtraArgument=B0;var Tm=H0;var W0=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)}}(),wk=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}}},pi=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},bk=Object.defineProperty,Ck=Object.defineProperties,Ek=Object.getOwnPropertyDescriptors,U0=Object.getOwnPropertySymbols,Tk=Object.prototype.hasOwnProperty,kk=Object.prototype.propertyIsEnumerable,z0=function(e,t,n){return t in e?bk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},gr=function(e,t){for(var n in t||(t={}))Tk.call(t,n)&&z0(e,n,t[n]);if(U0)for(var r=0,o=U0(t);r<o.length;r++){var n=o[r];kk.call(t,n)&&z0(e,n,t[n])}return e},km=function(e,t){return Ck(e,Ek(t))},Pk=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 Rk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?di:di.apply(null,arguments)},EN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ik(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 Lk=function(e){W0(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,pi([void 0],n[0].concat(this)))):new(t.bind.apply(t,pi([void 0],n.concat(this))))},t}(Array),Ak=function(e){W0(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,pi([void 0],n[0].concat(this)))):new(t.bind.apply(t,pi([void 0],n.concat(this))))},t}(Array);function Im(e){return Bt(e)?Eu(e,function(){}):e}function Ok(e){return typeof e=="boolean"}function Nk(){return function(t){return Mk(t)}}function Mk(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 Lk;if(n&&(Ok(n)?a.push(Tm):a.push(Tm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var Pm=!0;function $0(e){var t=Nk(),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,g;if(typeof o=="function")g=o;else if(Ik(o))g=Pu(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 y=s;if(typeof y=="function"&&(y=y(t),!Pm&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Pm&&y.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=j0.apply(void 0,y),f=di;l&&(f=Rk(gr({trace:!Pm},typeof l=="object"&&l)));var h=new Ak(v),m=h;Array.isArray(d)?m=pi([v],d):typeof d=="function"&&(m=d(h));var x=f.apply(void 0,m);return Em(g,c,x)}function fe(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return gr(gr({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 q0(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 Dk(e){return typeof e=="function"}function Fk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?q0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Dk(e))l=function(){return Im(e())};else{var u=Im(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var g=pi([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return g.filter(function(y){return!!y}).length===0&&(g=[a]),g.reduce(function(y,v){if(v)if(vn(y)){var f=y,h=v(f,d);return h===void 0?y:h}else{if(Bt(y))return Eu(y,function(m){return v(m,d)});var h=v(y,d);if(h===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}return y},p)}return c.getInitialState=l,c}function jk(e,t){return e+"/"+t}function U(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:Im(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=jk(t,c),g,y;"reducer"in p?(g=p.reducer,y=p.prepare):g=p,i[c]=g,s[d]=g,a[c]=y?fe(d,y):fe(d)});function l(){var c=typeof e.extraReducers=="function"?q0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,g=c[1],y=g===void 0?[]:g,v=c[2],f=v===void 0?void 0:v,h=gr(gr({},d),s);return Fk(n,function(m){for(var x in h)m.addCase(x,h[x]);for(var _=0,b=y;_<b.length;_++){var C=b[_];m.addMatcher(C.matcher,C.reducer)}f&&m.addDefaultCase(f)})}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 Bk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Hk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Bk[Math.random()*64|0];return t},Uk=["name","message","stack","code"],Rm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),K0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),zk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Uk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,g){return{payload:c,meta:km(gr({},g||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:km(gr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,g,y){return{payload:g,error:(r&&r.serializeError||zk)(c||"Rejected"),meta:km(gr({},y||{}),{arg:d,requestId:p,rejectedWithValue:!!g,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,g){var y=r!=null&&r.idGenerator?r.idGenerator(c):Hk(),v=new l,f,h=!1;function m(_){f=_,v.abort()}var x=function(){return Pk(this,null,function(){var _,b,C,E,I,P,K;return wk(this,function(D){switch(D.label){case 0:return D.trys.push([0,4,,5]),E=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:g}),Vk(E)?[4,E]:[3,2];case 1:E=D.sent(),D.label=2;case 2:if(E===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,I=new Promise(function(H,be){return v.signal.addEventListener("abort",function(){return be({name:"AbortError",message:f||"Aborted"})})}),p(i(y,c,(b=r==null?void 0:r.getPendingMeta)==null?void 0:b.call(r,{requestId:y,arg:c},{getState:d,extra:g}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:p,getState:d,extra:g,requestId:y,signal:v.signal,abort:m,rejectWithValue:function(H,be){return new Rm(H,be)},fulfillWithValue:function(H,be){return new K0(H,be)}})).then(function(H){if(H instanceof Rm)throw H;return H instanceof K0?o(H.payload,y,c,H.meta):o(H,y,c)})])];case 3:return C=D.sent(),[3,5];case 4:return P=D.sent(),C=P instanceof Rm?s(null,y,c,P.payload,P.meta):s(P,y,c),[3,5];case 5:return K=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,K||p(C),[2,C]}})})}();return Object.assign(x,{abort:m,requestId:y,arg:c,unwrap:function(){return x.then(Kk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Kk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Vk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wk="task",G0="listener",X0="completed",Lm="cancelled",RN="task-"+Lm,IN="task-"+X0,LN=G0+"-"+Lm,AN=G0+"-"+X0,ON=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Wk+" "+Lm+" (reason: "+t+")"}return e}();var Am="listenerMiddleware";var NN=fe(Am+"/add"),MN=fe(Am+"/removeAll"),DN=fe(Am+"/remove");var V0,FN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(V0||(V0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},$k=function(e){return function(t){setTimeout(t,e)}},jN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:$k(10);O0();var Fx=S(Nm()),jx=S(nx());var Mm=S(_u());function cP(e){e()}var rx=cP,ox=e=>rx=e,ix=()=>rx;var mi=S(O());var lx=S(O());var Iu=S(O()),sx=Symbol.for(`react-redux-context-${Iu.version}`),ax=globalThis;function dP(){let e=ax[sx];return e||(e=(0,Iu.createContext)(null),ax[sx]=e),e}var Be=new Proxy({},new Proxy({},{get(e,t){let n=dP();return(r,...o)=>Reflect[t](n,...o)}}));function Zs(e=Be){return function(){return(0,lx.useContext)(e)}}var Lu=Zs();var Au=()=>{throw new Error("uSES not initialized!")};var ux=Au,cx=e=>{ux=e},pP=(e,t)=>e===t;function dx(e=Be){let t=e===Be?Lu:Zs(e);return function(r,o={}){let{equalityFn:i=pP,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(),g=(0,mi.useRef)(!0),y=(0,mi.useCallback)({[r.name](f){return r(f)}}[r.name],[r,p,s]),v=ux(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,mi.useDebugValue)(v),v}}var R=dx();function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Js(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 Wm=S(wx()),ee=S(O()),Ox=S(Tx());var PP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function RP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function g(m,x){return l=m,u=x,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function f(){let m=e(l,u),x=!s(m,c);return c=m,x&&(d=n(c,p,u)),d}function h(m,x){let _=!i(x,u),b=!o(m,l,x,u);return l=m,u=x,_&&b?y():_?v():b?f():d}return function(x,_){return a?h(x,_):g(x,_)}}function Km(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Js(t,PP),s=n(e,i),a=r(e,i),l=o(e,i);return RP(s,a,l,e,i)}function Vm(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 ea(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function kx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ju(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=kx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=kx(u),u=i(a,l)),u},i}}function gi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Px(e){return e&&typeof e=="object"?ea(t=>Vm(e,t)):e?typeof e=="function"?Ju(e,"mapDispatchToProps"):gi(e,"mapDispatchToProps"):ea(t=>({dispatch:t}))}function Rx(e){return e?typeof e=="function"?Ju(e,"mapStateToProps"):gi(e,"mapStateToProps"):ea(()=>({}))}function IP(e,t,n){return Sn({},n,e,t)}function LP(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 Ix(e){return e?typeof e=="function"?LP(e):gi(e,"mergeProps"):()=>IP}function AP(){let e=ix(),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 Lx={notify(){},get:()=>[]};function ec(e,t){let n,r=Lx;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=AP())}function u(){n&&(n(),n=void 0,r.clear(),r=Lx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var tc=S(O()),OP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hi=OP?tc.useLayoutEffect:tc.useEffect;function Ax(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function yi(e,t){if(Ax(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])||!Ax(e[n[o]],t[n[o]]))return!1;return!0}var NP=["reactReduxForwardedRef"],Nx=Au,Mx=e=>{Nx=e};var MP=[null,null];function DP(e,t,n){hi(()=>e(...t),n)}function FP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function jP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,g=()=>{if(p||!a.current)return;let v=t.getState(),f,h;try{f=r(v,o.current)}catch(m){h=m,d=m}h||(d=null),f===i.current?s.current||u():(i.current=f,l.current=f,s.current=!0,c())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function BP(e,t){return e===t}function HP(e,t,n,{pure:r,areStatesEqual:o=BP,areOwnPropsEqual:i=yi,areStatePropsEqual:s=yi,areMergedPropsEqual:a=yi,forwardRef:l=!1,context:u=Be}={}){let c=u,p=Rx(e),d=Px(t),g=Ix(n),y=!!e;return f=>{let h=f.displayName||f.name||"Component",m=`Connect(${h})`,x={shouldHandleStateChanges:y,displayName:m,wrappedComponentName:h,WrappedComponent:f,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(E){let[I,P,K]=(0,ee.useMemo)(()=>{let{reactReduxForwardedRef:ce}=E,Dr=Js(E,NP);return[E.context,ce,Dr]},[E]),D=(0,ee.useMemo)(()=>I&&I.Consumer&&(0,Ox.isContextConsumer)(ee.default.createElement(I.Consumer,null))?I:c,[I,c]),H=(0,ee.useContext)(D),be=!!E.store&&!!E.store.getState&&!!E.store.dispatch,Ar=!!H&&!!H.store,Ye=be?E.store:H.store,Or=Ar?H.getServerState:Ye.getState,Vi=(0,ee.useMemo)(()=>Km(Ye.dispatch,x),[Ye]),[Nr,qa]=(0,ee.useMemo)(()=>{if(!y)return MP;let ce=ec(Ye,be?void 0:H.subscription),Dr=ce.notifyNestedSubs.bind(ce);return[ce,Dr]},[Ye,be,H]),Ga=(0,ee.useMemo)(()=>be?H:Sn({},H,{subscription:Nr}),[be,H,Nr]),Wi=(0,ee.useRef)(),$i=(0,ee.useRef)(K),Mr=(0,ee.useRef)(),Co=(0,ee.useRef)(!1),Bd=(0,ee.useRef)(!1),Xt=(0,ee.useRef)(!1),L=(0,ee.useRef)();hi(()=>(Xt.current=!0,()=>{Xt.current=!1}),[]);let J=(0,ee.useMemo)(()=>()=>Mr.current&&K===$i.current?Mr.current:Vi(Ye.getState(),K),[Ye,K]),gt=(0,ee.useMemo)(()=>Dr=>Nr?jP(y,Ye,Nr,Vi,$i,Wi,Co,Xt,Mr,qa,Dr):()=>{},[Nr]);DP(FP,[$i,Wi,Co,K,Mr,qa]);let cn;try{cn=Nx(gt,J,Or?()=>Vi(Or(),K):J)}catch(ce){throw L.current&&(ce.message+=`
|
|
10
10
|
The error may be correlated with this previous error:
|
|
11
11
|
${L.current.stack}
|
|
12
12
|
|
|
13
|
-
`),ce}hi(()=>{L.current=void 0,Mr.current=void 0,Wi.current=cn});let zn=(0,ee.useMemo)(()=>ee.default.createElement(m,Sn({},cn,{ref:P})),[P,m,cn]);return(0,ee.useMemo)(()=>y?ee.default.createElement(D.Provider,{value:Ga},zn):zn,[D,zn,Ga])}let C=ee.default.memo(_);if(C.WrappedComponent=m,C.displayName=_.displayName=f,l){let I=ee.default.forwardRef(function(K,D){return ee.default.createElement(C,Sn({},K,{reactReduxForwardedRef:D}))});return I.displayName=f,I.WrappedComponent=m,(0,$m.default)(I,m)}return(0,$m.default)(C,m)}}var xn=UP;var ta=S(O());function zP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ta.useMemo)(()=>{let u=ec(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ta.useMemo)(()=>e.getState(),[e]);hi(()=>{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||He;return ta.default.createElement(l.Provider,{value:s},n)}var qm=zP;function nc(e=He){let t=e===He?Lu:Zs(e);return function(){let{store:r}=t();return r}}var Gm=nc();function Fx(e=He){let t=e===He?Gm:nc(e);return function(){return t().dispatch}}var z=Fx();dx(Hx.useSyncExternalStoreWithSelector);Dx(jx.useSyncExternalStore);ix(Dm.unstable_batchedUpdates);var na=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(na||{});var KP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!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,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},Bx=U({name:"settings",initialState:KP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ra}=Bx.actions,Xm=e=>t=>t.settings[e],N=e=>R(Xm(e)),Ux=Bx.reducer;var $w=S(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(v){return o?(setTimeout(function(){o(void 0,v)},0),!0):v}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 g(){for(var v=-1*u;v<=u;v+=2){var m=void 0,h=p[v-1],f=p[v+1],x=(f?f.newPos:0)-v;h&&(p[v-1]=void 0);var _=h&&h.newPos+1<a,b=f&&0<=x&&x<l;if(!_&&!b){p[v]=void 0;continue}if(!_||b&&h.newPos<f.newPos?(m=WP(f),i.pushComponent(m.components,void 0,!0)):(m=h,m.newPos++,i.pushComponent(m.components,!0,void 0)),x=i.extractCommon(m,n,t,v),m.newPos+1>=a&&x+1>=l)return s(VP(i,m.components,n,t,i.useLongestToken));p[v]=m}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();g()||v()},0)})();else for(;u<=c;){var y=g();if(y)return y}},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 VP(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(g,y){var v=r[l+y];return v.length>g.length?v:g}),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 WP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var $P=new _n;function Vx(e,t,n){return $P.diff(e,t,n)}var zx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Kx=/\S/,Wx=new _n;Wx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Kx.test(e)&&!Kx.test(t)};Wx.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]&&zx.test(t[n])&&zx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var $x=new _n;$x.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 qP=new _n;qP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var GP=new _n;GP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function rc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rc=function(t){return typeof t}:rc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}var XP=Object.prototype.toString,oa=new _n;oa.useLongestToken=!0;oa.tokenize=$x.tokenize;oa.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(Qm(e,null,null,o),o," ")};oa.equals=function(e,t){return _n.prototype.equals.call(oa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Qm(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(XP.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]=Qm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),rc(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]=Qm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Ym=new _n;Ym.tokenize=function(e){return e.slice()};Ym.join=Ym.removeEmpty=function(e){return e};function qx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function hr(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)=>hr(i,t[s],n-1)):qx(e)&&qx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>hr(e[s],t[s],n-1)):!1}function QP(e){return Math.max(...e.map(t=>t.length))}function YP(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 Gx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<QP(r);o++){let i=YP(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 ZP=2;function Zm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Gx(e,ZP);return n&&n.text!==t?n:e[0]}var Xx={current:null,isSupported:null},te=fe("resetConversation"),oc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},ic=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},vi=e=>e.conversation.isSupported,Jm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),sc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),ac=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),lc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ic(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),eg=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})})}),uc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ic(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),JP=[sc.rejected,ac.rejected,lc.rejected,uc.rejected].map(e=>e==null?void 0:e.toString()),eR=U({name:"conversation",initialState:Xx,reducers:{},extraReducers:e=>{e.addCase(Jm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(sc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(ac.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(eg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(lc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(uc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(te,()=>Xx).addMatcher(t=>JP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Qx=eR.reducer;var yr={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 dc(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 pc=fe("input/replaceText"),fc=fe("input/keyDown"),no=fe("input/sendMessage"),mc=fe("input/sendEditSuggestionMessage"),gc=fe("input/uiInputChange"),hc=fe("input/applyImageSuggestion"),Be=fe("input/sendEvent");function cc(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 Yx=e=>U({name:e,initialState:yr,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,{...yr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Zm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(hr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&cc(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:g,altKey:y}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=t,{text:m}=n.payload,h=Vx(v,m);v.length-m.length>1&&t.metrics.deletions.push(...h.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=v.length-m.length;break}case"C":case"V":case"X":if(!d&&!g){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}break;case"Shift":break;default:if(!d&&!g&&!y){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=yr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&cc(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"&&cc(t)},commitSuggestion(t){cc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Zm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)},setMetrics(t,{payload:n}){t.metrics=n}},extraReducers:t=>{t.addCase(te,n=>{n.tabCompletionSuggestion=yr.tabCompletionSuggestion,n.previousKeyDownEvent=yr.previousKeyDownEvent,n.textSuggestions=yr.textSuggestions,n.selectedSuggestionIndex=yr.selectedSuggestionIndex,n.metrics=yr.metrics})}}),tg=Yx("input"),Si=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),tR=e=>e.input.selection,Zx=()=>R(tR),{userInput:Jx,changeSelection:ng,initialInput:e_,mergeMetrics:t_,nextTextSuggestionIndex:n_,offeredTextSuggestion:r_,previousTextSuggestionIndex:o_,registerCut:i_,registerKeyDown:s_,registerPaste:a_,reset:l_,resetToCommitted:ia,platformInput:u_,setSelectedTextSuggestionIndex:vr,setTextSuggestions:on,stageSuggestion:Bt,commitSuggestion:wn,setMetrics:c_}=tg.actions,nt=Yx("overlay");var xi=S(O());var d_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var rg=S(w()),nR=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,xi.useRef)(null),l=(0,xi.useRef)(null),u=k("Dialog",d_);return(0,xi.useEffect)(()=>{var d,g;let c=y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),o())},p=y=>{let v=window.getSelection();v!=null&&v.toString()||y.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(g=a.current)==null||g.addEventListener("keyup",c),()=>{var y,v;(y=a.current)==null||y.removeEventListener("click",p),(v=a.current)==null||v.removeEventListener("keyup",c)}},[a,l,o,r]),(0,xi.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,rg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,rg.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},_i=nR;var zg=S(O());var og={};Pe(og,{enUS:()=>rR,nlNL:()=>oR});var rR={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?"}]},oR={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 p_={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 Ic=S(O());var ig=function(e,t){return ig=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])},ig(e,t)};function sa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ig(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ct=function(){return ct=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},ct.apply(this,arguments)};function f_(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 yc(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 vc;(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"})(vc||(vc={}));var Sc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Ut;(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"})(Ut||(Ut={}));var xc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(xc||(xc={}));function sg(e){return e.type===Ut.literal}function m_(e){return e.type===Ut.argument}function _c(e){return e.type===Ut.number}function wc(e){return e.type===Ut.date}function bc(e){return e.type===Ut.time}function Cc(e){return e.type===Ut.select}function Ec(e){return e.type===Ut.plural}function g_(e){return e.type===Ut.pound}function Tc(e){return e.type===Ut.tag}function kc(e){return!!(e&&typeof e=="object"&&e.type===xc.number)}function aa(e){return!!(e&&typeof e=="object"&&e.type===xc.dateTime)}function ag(e){e.forEach(function(t){if(delete t.location,Cc(t)||Ec(t))for(var n in t.options)delete t.options[n].location,ag(t.options[n].value);else _c(t)&&kc(t.style)||(wc(t)||bc(t))&&aa(t.style)?delete t.style.location:Tc(t)&&ag(t.children)})}function h_(e,t){t===void 0&&(t={}),t=ct({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Sc(e,t).parse();if(n.err){var r=SyntaxError(vc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||ag(n.val),n.val}function Pc(e,t){var n=t&&t.cache?t.cache:cR,r=t&&t.serializer?t.serializer:uR,o=t&&t.strategy?t.strategy:sR;return o(e,{cache:n,serializer:r})}function iR(e){return e==null||typeof e=="number"||typeof e=="boolean"}function y_(e,t,n,r){var o=iR(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function v_(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 lg(e,t,n,r,o){return n.bind(t,e,r,o)}function sR(e,t){var n=e.length===1?y_:v_;return lg(e,this,n,t.cache.create(),t.serializer)}function aR(e,t){return lg(e,this,v_,t.cache.create(),t.serializer)}function lR(e,t){return lg(e,this,y_,t.cache.create(),t.serializer)}var uR=function(){return JSON.stringify(arguments)};function ug(){this.cache=Object.create(null)}ug.prototype.get=function(e){return this.cache[e]};ug.prototype.set=function(e,t){this.cache[e]=t};var cR={create:function(){return new ug}},Rc={variadic:aR,monadic:lR};var ro;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ro||(ro={}));var la=function(e){sa(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 cg=function(e){sa(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('", "'),'"'),ro.INVALID_VALUE,i)||this}return t}(la);var S_=function(e){sa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ro.INVALID_VALUE,o)||this}return t}(la);var x_=function(e){sa(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,'"'),ro.MISSING_VALUE,r)||this}return t}(la);var Ue;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ue||(Ue={}));function dR(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ue.literal||n.type!==Ue.literal?t.push(n):r.value+=n.value,t},[])}function pR(e){return typeof e=="function"}function ua(e,t,n,r,o,i,s){if(e.length===1&&sg(e[0]))return[{type:Ue.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(sg(c)){a.push({type:Ue.literal,value:c.value});continue}if(g_(c)){typeof i=="number"&&a.push({type:Ue.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new x_(p,s);var d=o[p];if(m_(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ue.literal:Ue.object,value:d});continue}if(wc(c)){var g=typeof c.style=="string"?r.date[c.style]:aa(c.style)?c.style.parsedOptions:void 0;a.push({type:Ue.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(bc(c)){var g=typeof c.style=="string"?r.time[c.style]:aa(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ue.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(_c(c)){var g=typeof c.style=="string"?r.number[c.style]:kc(c.style)?c.style.parsedOptions:void 0;g&&g.scale&&(d=d*(g.scale||1)),a.push({type:Ue.literal,value:n.getNumberFormat(t,g).format(d)});continue}if(Tc(c)){var y=c.children,v=c.value,m=o[v];if(!pR(m))throw new S_(v,"function",s);var h=ua(y,t,n,r,o,i),f=m(h.map(function(b){return b.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(b){return{type:typeof b=="string"?Ue.literal:Ue.object,value:b}}))}if(Cc(c)){var x=c.options[d]||c.options.other;if(!x)throw new cg(c.value,d,Object.keys(c.options),s);a.push.apply(a,ua(x.value,t,n,r,o));continue}if(Ec(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new la(`Intl.PluralRules is not available in this environment.
|
|
13
|
+
`),ce}hi(()=>{L.current=void 0,Mr.current=void 0,Wi.current=cn});let zn=(0,ee.useMemo)(()=>ee.default.createElement(f,Sn({},cn,{ref:P})),[P,f,cn]);return(0,ee.useMemo)(()=>y?ee.default.createElement(D.Provider,{value:Ga},zn):zn,[D,zn,Ga])}let C=ee.default.memo(_);if(C.WrappedComponent=f,C.displayName=_.displayName=m,l){let I=ee.default.forwardRef(function(K,D){return ee.default.createElement(C,Sn({},K,{reactReduxForwardedRef:D}))});return I.displayName=m,I.WrappedComponent=f,(0,Wm.default)(I,f)}return(0,Wm.default)(C,f)}}var xn=HP;var ta=S(O());function UP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ta.useMemo)(()=>{let u=ec(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ta.useMemo)(()=>e.getState(),[e]);hi(()=>{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||Be;return ta.default.createElement(l.Provider,{value:s},n)}var $m=UP;function nc(e=Be){let t=e===Be?Lu:Zs(e);return function(){let{store:r}=t();return r}}var qm=nc();function Dx(e=Be){let t=e===Be?qm:nc(e);return function(){return t().dispatch}}var z=Dx();cx(jx.useSyncExternalStoreWithSelector);Mx(Fx.useSyncExternalStore);ox(Mm.unstable_batchedUpdates);var na=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(na||{});var zP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!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,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},Bx=U({name:"settings",initialState:zP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ra}=Bx.actions,Gm=e=>t=>t.settings[e],N=e=>R(Gm(e)),Hx=Bx.reducer;var Ww=S(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(v){return o?(setTimeout(function(){o(void 0,v)},0),!0):v}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 g(){for(var v=-1*u;v<=u;v+=2){var f=void 0,h=p[v-1],m=p[v+1],x=(m?m.newPos:0)-v;h&&(p[v-1]=void 0);var _=h&&h.newPos+1<a,b=m&&0<=x&&x<l;if(!_&&!b){p[v]=void 0;continue}if(!_||b&&h.newPos<m.newPos?(f=VP(m),i.pushComponent(f.components,void 0,!0)):(f=h,f.newPos++,i.pushComponent(f.components,!0,void 0)),x=i.extractCommon(f,n,t,v),f.newPos+1>=a&&x+1>=l)return s(KP(i,f.components,n,t,i.useLongestToken));p[v]=f}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();g()||v()},0)})();else for(;u<=c;){var y=g();if(y)return y}},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 KP(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(g,y){var v=r[l+y];return v.length>g.length?v:g}),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 VP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var WP=new _n;function Kx(e,t,n){return WP.diff(e,t,n)}var Ux=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,zx=/\S/,Vx=new _n;Vx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!zx.test(e)&&!zx.test(t)};Vx.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]&&Ux.test(t[n])&&Ux.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Wx=new _n;Wx.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 $P=new _n;$P.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var qP=new _n;qP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function rc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rc=function(t){return typeof t}:rc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rc(e)}var GP=Object.prototype.toString,oa=new _n;oa.useLongestToken=!0;oa.tokenize=Wx.tokenize;oa.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(Xm(e,null,null,o),o," ")};oa.equals=function(e,t){return _n.prototype.equals.call(oa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Xm(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(GP.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]=Xm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),rc(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]=Xm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Qm=new _n;Qm.tokenize=function(e){return e.slice()};Qm.join=Qm.removeEmpty=function(e){return e};function $x(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function hr(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)=>hr(i,t[s],n-1)):$x(e)&&$x(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>hr(e[s],t[s],n-1)):!1}function XP(e){return Math.max(...e.map(t=>t.length))}function QP(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 qx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<XP(r);o++){let i=QP(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 YP=2;function Ym(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=qx(e,YP);return n&&n.text!==t?n:e[0]}var Gx={current:null,isSupported:null},te=fe("resetConversation"),oc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},ic=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},vi=e=>e.conversation.isSupported,Zm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),sc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),ac=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),lc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ic(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Jm=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})})}),uc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=ic(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),ZP=[sc.rejected,ac.rejected,lc.rejected,uc.rejected].map(e=>e==null?void 0:e.toString()),JP=U({name:"conversation",initialState:Gx,reducers:{},extraReducers:e=>{e.addCase(Zm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(sc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(ac.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Jm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(lc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(uc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(te,()=>Gx).addMatcher(t=>ZP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),Xx=JP.reducer;var yr={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 dc(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 pc=fe("input/replaceText"),fc=fe("input/keyDown"),no=fe("input/sendMessage"),mc=fe("input/sendEditSuggestionMessage"),gc=fe("input/uiInputChange"),hc=fe("input/applyImageSuggestion"),He=fe("input/sendEvent");function cc(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 Qx=e=>U({name:e,initialState:yr,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,{...yr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Ym(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(hr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&cc(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:g,altKey:y}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=t,{text:f}=n.payload,h=Kx(v,f);v.length-f.length>1&&t.metrics.deletions.push(...h.filter(m=>m.removed).map(m=>m.value)),t.metrics.numCharsDeleted+=v.length-f.length;break}case"C":case"V":case"X":if(!d&&!g){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}break;case"Shift":break;default:if(!d&&!g&&!y){t.metrics.numCharsTyped+=1;let v=((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;v&&v.length>0&&(t.metrics.numCharsDeleted+=v.length,t.metrics.deletions.push(v))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=yr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&cc(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"&&cc(t)},commitSuggestion(t){cc(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=Ym(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)},setMetrics(t,{payload:n}){t.metrics=n}},extraReducers:t=>{t.addCase(te,n=>{n.tabCompletionSuggestion=yr.tabCompletionSuggestion,n.previousKeyDownEvent=yr.previousKeyDownEvent,n.textSuggestions=yr.textSuggestions,n.selectedSuggestionIndex=yr.selectedSuggestionIndex,n.metrics=yr.metrics})}}),eg=Qx("input"),Si=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),eR=e=>e.input.selection,Yx=()=>R(eR),{userInput:Zx,changeSelection:tg,initialInput:Jx,mergeMetrics:e_,nextTextSuggestionIndex:t_,offeredTextSuggestion:n_,previousTextSuggestionIndex:r_,registerCut:o_,registerKeyDown:i_,registerPaste:s_,reset:a_,resetToCommitted:ia,platformInput:l_,setSelectedTextSuggestionIndex:vr,setTextSuggestions:on,stageSuggestion:Ht,commitSuggestion:wn,setMetrics:u_}=eg.actions,nt=Qx("overlay");var xi=S(O());var c_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var ng=S(w()),tR=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,xi.useRef)(null),l=(0,xi.useRef)(null),u=k("Dialog",c_);return(0,xi.useEffect)(()=>{var d,g;let c=y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),o())},p=y=>{let v=window.getSelection();v!=null&&v.toString()||y.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(g=a.current)==null||g.addEventListener("keyup",c),()=>{var y,v;(y=a.current)==null||y.removeEventListener("click",p),(v=a.current)==null||v.removeEventListener("keyup",c)}},[a,l,o,r]),(0,xi.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,ng.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,ng.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},_i=tR;var Ug=S(O());var rg={};Pe(rg,{enUS:()=>nR,nlNL:()=>rR});var nR={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?"}]},rR={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 d_={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 Ic=S(O());var og=function(e,t){return og=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])},og(e,t)};function sa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");og(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ct=function(){return ct=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},ct.apply(this,arguments)};function p_(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 yc(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 vc;(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"})(vc||(vc={}));var Sc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Ut;(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"})(Ut||(Ut={}));var xc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(xc||(xc={}));function ig(e){return e.type===Ut.literal}function f_(e){return e.type===Ut.argument}function _c(e){return e.type===Ut.number}function wc(e){return e.type===Ut.date}function bc(e){return e.type===Ut.time}function Cc(e){return e.type===Ut.select}function Ec(e){return e.type===Ut.plural}function m_(e){return e.type===Ut.pound}function Tc(e){return e.type===Ut.tag}function kc(e){return!!(e&&typeof e=="object"&&e.type===xc.number)}function aa(e){return!!(e&&typeof e=="object"&&e.type===xc.dateTime)}function sg(e){e.forEach(function(t){if(delete t.location,Cc(t)||Ec(t))for(var n in t.options)delete t.options[n].location,sg(t.options[n].value);else _c(t)&&kc(t.style)||(wc(t)||bc(t))&&aa(t.style)?delete t.style.location:Tc(t)&&sg(t.children)})}function g_(e,t){t===void 0&&(t={}),t=ct({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Sc(e,t).parse();if(n.err){var r=SyntaxError(vc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||sg(n.val),n.val}function Pc(e,t){var n=t&&t.cache?t.cache:uR,r=t&&t.serializer?t.serializer:lR,o=t&&t.strategy?t.strategy:iR;return o(e,{cache:n,serializer:r})}function oR(e){return e==null||typeof e=="number"||typeof e=="boolean"}function h_(e,t,n,r){var o=oR(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function y_(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 ag(e,t,n,r,o){return n.bind(t,e,r,o)}function iR(e,t){var n=e.length===1?h_:y_;return ag(e,this,n,t.cache.create(),t.serializer)}function sR(e,t){return ag(e,this,y_,t.cache.create(),t.serializer)}function aR(e,t){return ag(e,this,h_,t.cache.create(),t.serializer)}var lR=function(){return JSON.stringify(arguments)};function lg(){this.cache=Object.create(null)}lg.prototype.get=function(e){return this.cache[e]};lg.prototype.set=function(e,t){this.cache[e]=t};var uR={create:function(){return new lg}},Rc={variadic:sR,monadic:aR};var ro;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ro||(ro={}));var la=function(e){sa(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 ug=function(e){sa(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('", "'),'"'),ro.INVALID_VALUE,i)||this}return t}(la);var v_=function(e){sa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ro.INVALID_VALUE,o)||this}return t}(la);var S_=function(e){sa(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,'"'),ro.MISSING_VALUE,r)||this}return t}(la);var Ue;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ue||(Ue={}));function cR(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ue.literal||n.type!==Ue.literal?t.push(n):r.value+=n.value,t},[])}function dR(e){return typeof e=="function"}function ua(e,t,n,r,o,i,s){if(e.length===1&&ig(e[0]))return[{type:Ue.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(ig(c)){a.push({type:Ue.literal,value:c.value});continue}if(m_(c)){typeof i=="number"&&a.push({type:Ue.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new S_(p,s);var d=o[p];if(f_(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ue.literal:Ue.object,value:d});continue}if(wc(c)){var g=typeof c.style=="string"?r.date[c.style]:aa(c.style)?c.style.parsedOptions:void 0;a.push({type:Ue.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(bc(c)){var g=typeof c.style=="string"?r.time[c.style]:aa(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ue.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(_c(c)){var g=typeof c.style=="string"?r.number[c.style]:kc(c.style)?c.style.parsedOptions:void 0;g&&g.scale&&(d=d*(g.scale||1)),a.push({type:Ue.literal,value:n.getNumberFormat(t,g).format(d)});continue}if(Tc(c)){var y=c.children,v=c.value,f=o[v];if(!dR(f))throw new v_(v,"function",s);var h=ua(y,t,n,r,o,i),m=f(h.map(function(b){return b.value}));Array.isArray(m)||(m=[m]),a.push.apply(a,m.map(function(b){return{type:typeof b=="string"?Ue.literal:Ue.object,value:b}}))}if(Cc(c)){var x=c.options[d]||c.options.other;if(!x)throw new ug(c.value,d,Object.keys(c.options),s);a.push.apply(a,ua(x.value,t,n,r,o));continue}if(Ec(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new la(`Intl.PluralRules is not available in this environment.
|
|
14
14
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
-
`,ro.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 cg(c.value,d,Object.keys(c.options),s);a.push.apply(a,ua(x.value,t,n,r,o,d-(c.offset||0)));continue}}return dR(a)}function fR(e,t){return t?ct(ct(ct({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ct(ct({},e[r]),t[r]||{}),n},{})):e}function mR(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=fR(e[r],t[r]),n},ct({},e)):e}function dg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function gR(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,yc([void 0],n,!1)))},{cache:dg(e.number),strategy:Rc.variadic}),getDateTimeFormat:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,yc([void 0],n,!1)))},{cache:dg(e.dateTime),strategy:Rc.variadic}),getPluralRules:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,yc([void 0],n,!1)))},{cache:dg(e.pluralRules),strategy:Rc.variadic})}}var __=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,g){return!d.length||g.type!==Ue.literal||typeof d[d.length-1]!="string"?d.push(g.value):d[d.length-1]+=g.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return ua(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=f_(s,["formatters"]);this.ast=e.__parse(t,ct(ct({},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=mR(e.formats,r),this.formatters=o&&o.formatters||gR(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=h_,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 hR(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var yR="dummy",pg=(0,Ic.createContext)(null);function j(e){let t=(0,Ic.useContext)(pg);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=hR(n,r);return i?new __(i).format(o):(t!==yR&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var ca=S(w()),Lc=()=>(0,ca.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ca.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ca.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 da=S(w()),w_=()=>(0,da.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,da.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,da.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 It=S(O());var Ac=S(O());function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=1,mg=2,gg=4,xe=8,Oc=16,fa=32,zt=64,fg={a:{content:X|xe,self:!1,type:X|xe|fa|zt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:X|xe,void:!0},body:{content:X|mg|gg|xe|Oc|fa|zt},button:{content:xe,type:X|xe|fa|zt},caption:{content:X,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:X|fa|zt},dd:{content:X,parent:["dl"]},dl:{children:["dt","dd"],type:X},dt:{content:X,invalid:["footer","header"],parent:["dl"]},figcaption:{content:X,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:X,void:!0},img:{void:!0},li:{content:X,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:X},picture:{children:["source","img"],type:X|xe|Oc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:xe,parent:["ruby","rtc"]},rtc:{content:xe,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:xe,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:X},tbody:{parent:["table"],children:["tr"]},td:{content:X,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:X,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:X},video:{children:["track","source"]},wbr:{type:X|xe,void:!0}};function io(e){return t=>{fg[t]={...e,...fg[t]}}}["address","main","div","figure","p","pre"].forEach(io({content:X,type:X|zt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(io({content:xe,type:X|xe|zt}));["p","pre"].forEach(io({content:xe,type:X|zt}));["s","small","span","del","ins"].forEach(io({content:xe,type:X|xe}));["article","aside","footer","header","nav","section","blockquote"].forEach(io({content:X,type:X|mg|zt}));["h1","h2","h3","h4","h5","h6"].forEach(io({content:xe,type:X|gg|zt}));["audio","canvas","iframe","img","video"].forEach(io({type:X|xe|Oc|zt}));var ga=Object.freeze(fg),hg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],yg=Object.keys(ga).filter(e=>e!=="canvas"&&e!=="iframe"),ne=1,vg=2,oo=3,Sr=4,Mc=5,Dc=Object.freeze({alt:ne,cite:ne,class:ne,colspan:oo,controls:Sr,datetime:ne,default:Sr,disabled:Sr,dir:ne,height:ne,href:ne,id:ne,kind:ne,label:ne,lang:ne,loading:ne,loop:Sr,media:ne,muted:Sr,poster:ne,rel:ne,role:ne,rowspan:oo,scope:ne,sizes:ne,span:oo,start:oo,style:Mc,src:ne,srclang:ne,srcset:ne,tabindex:ne,target:ne,title:ne,type:ne,width:ne}),Sg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Nc(){return Nc=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},Nc.apply(this,arguments)}function Fc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ac.default.createElement(i,Nc({className:t},e)):Ac.default.createElement(i,Nc({className:t},e),n)}var ma=class{attribute(t,n){return n}node(t,n){return n}};function b_(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 bn=class{constructor(t,n,r){pa(this,"greedy",!1),pa(this,"options",void 0),pa(this,"propName",void 0),pa(this,"inverseName",void 0),pa(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?Ac.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return b_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var so=S(O()),k_=S(E_());function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xR=/(url|image|image-set)\(/i,xg=class extends ma{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(xR)&&delete n[r]}),n}},T_=1,_R=3,wR=/^<(!doctype|(html|head|body)(\s|>))/i,bR=/^(aria-|data-|\w+:)/iu,CR=/{{{(\w+)\/?}}}/;function ER(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var jc=class{constructor(t,n={},r=[],o=[]){var i;Cn(this,"allowed",void 0),Cn(this,"banned",void 0),Cn(this,"blocked",void 0),Cn(this,"container",void 0),Cn(this,"content",[]),Cn(this,"props",void 0),Cn(this,"matchers",void 0),Cn(this,"filters",void 0),Cn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new xg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:yg),this.banned=new Set(hg),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:g,match:y,valid:v,void:m,...h}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),v?(p+=m?`{{{${f}/}}}`:`{{{${f}}}}${y}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:y,matcher:l,props:{...o,...h,key:this.keyIndex}}):p+=y,l.greedy?(i=p+i.slice(d+g),p=""):i=i.slice(d+(g||y.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
|
+
`,ro.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 ug(c.value,d,Object.keys(c.options),s);a.push.apply(a,ua(x.value,t,n,r,o,d-(c.offset||0)));continue}}return cR(a)}function pR(e,t){return t?ct(ct(ct({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ct(ct({},e[r]),t[r]||{}),n},{})):e}function fR(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=pR(e[r],t[r]),n},ct({},e)):e}function cg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function mR(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,yc([void 0],n,!1)))},{cache:cg(e.number),strategy:Rc.variadic}),getDateTimeFormat:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,yc([void 0],n,!1)))},{cache:cg(e.dateTime),strategy:Rc.variadic}),getPluralRules:Pc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,yc([void 0],n,!1)))},{cache:cg(e.pluralRules),strategy:Rc.variadic})}}var x_=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,g){return!d.length||g.type!==Ue.literal||typeof d[d.length-1]!="string"?d.push(g.value):d[d.length-1]+=g.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return ua(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=p_(s,["formatters"]);this.ast=e.__parse(t,ct(ct({},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=fR(e.formats,r),this.formatters=o&&o.formatters||mR(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=g_,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 gR(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var hR="dummy",dg=(0,Ic.createContext)(null);function j(e){let t=(0,Ic.useContext)(dg);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=gR(n,r);return i?new x_(i).format(o):(t!==hR&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var ca=S(w()),Lc=()=>(0,ca.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ca.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ca.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 da=S(w()),__=()=>(0,da.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,da.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,da.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 It=S(O());var Ac=S(O());function pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=1,fg=2,mg=4,xe=8,Oc=16,fa=32,zt=64,pg={a:{content:X|xe,self:!1,type:X|xe|fa|zt},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:X|xe,void:!0},body:{content:X|fg|mg|xe|Oc|fa|zt},button:{content:xe,type:X|xe|fa|zt},caption:{content:X,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:X|fa|zt},dd:{content:X,parent:["dl"]},dl:{children:["dt","dd"],type:X},dt:{content:X,invalid:["footer","header"],parent:["dl"]},figcaption:{content:X,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:X,void:!0},img:{void:!0},li:{content:X,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:X},picture:{children:["source","img"],type:X|xe|Oc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:xe,parent:["ruby","rtc"]},rtc:{content:xe,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:xe,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:X},tbody:{parent:["table"],children:["tr"]},td:{content:X,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:X,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:X},video:{children:["track","source"]},wbr:{type:X|xe,void:!0}};function io(e){return t=>{pg[t]={...e,...pg[t]}}}["address","main","div","figure","p","pre"].forEach(io({content:X,type:X|zt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(io({content:xe,type:X|xe|zt}));["p","pre"].forEach(io({content:xe,type:X|zt}));["s","small","span","del","ins"].forEach(io({content:xe,type:X|xe}));["article","aside","footer","header","nav","section","blockquote"].forEach(io({content:X,type:X|fg|zt}));["h1","h2","h3","h4","h5","h6"].forEach(io({content:xe,type:X|mg|zt}));["audio","canvas","iframe","img","video"].forEach(io({type:X|xe|Oc|zt}));var ga=Object.freeze(pg),gg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],hg=Object.keys(ga).filter(e=>e!=="canvas"&&e!=="iframe"),ne=1,yg=2,oo=3,Sr=4,Mc=5,Dc=Object.freeze({alt:ne,cite:ne,class:ne,colspan:oo,controls:Sr,datetime:ne,default:Sr,disabled:Sr,dir:ne,height:ne,href:ne,id:ne,kind:ne,label:ne,lang:ne,loading:ne,loop:Sr,media:ne,muted:Sr,poster:ne,rel:ne,role:ne,rowspan:oo,scope:ne,sizes:ne,span:oo,start:oo,style:Mc,src:ne,srclang:ne,srcset:ne,tabindex:ne,target:ne,title:ne,type:ne,width:ne}),vg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Nc(){return Nc=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},Nc.apply(this,arguments)}function Fc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ac.default.createElement(i,Nc({className:t},e)):Ac.default.createElement(i,Nc({className:t},e),n)}var ma=class{attribute(t,n){return n}node(t,n){return n}};function w_(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 bn=class{constructor(t,n,r){pa(this,"greedy",!1),pa(this,"options",void 0),pa(this,"propName",void 0),pa(this,"inverseName",void 0),pa(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?Ac.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return w_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var so=S(O()),T_=S(C_());function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SR=/(url|image|image-set)\(/i,Sg=class extends ma{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(SR)&&delete n[r]}),n}},E_=1,xR=3,_R=/^<(!doctype|(html|head|body)(\s|>))/i,wR=/^(aria-|data-|\w+:)/iu,bR=/{{{(\w+)\/?}}}/;function CR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var jc=class{constructor(t,n={},r=[],o=[]){var i;Cn(this,"allowed",void 0),Cn(this,"banned",void 0),Cn(this,"blocked",void 0),Cn(this,"container",void 0),Cn(this,"content",[]),Cn(this,"props",void 0),Cn(this,"matchers",void 0),Cn(this,"filters",void 0),Cn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Sg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:hg),this.banned=new Set(gg),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:g,match:y,valid:v,void:f,...h}=a,m=l.propName+String(s);d>0&&(p+=i.slice(0,d)),v?(p+=f?`{{{${m}/}}}`:`{{{${m}}}}${y}{{{/${m}}}}`,this.keyIndex+=1,s+=1,r[m]={children:y,matcher:l,props:{...o,...h,key:this.keyIndex}}):p+=y,l.greedy?(i=p+i.slice(d+g),p=""):i=i.slice(d+(g||y.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||ER)();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(wR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,k_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==T_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Dc[l]||Dc[s];if(!this.isSafe(t)||!l.match(bR)&&(!n&&(!u||u===vg)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===Sr?c=!0:u===oo?c=Number.parseFloat(String(c)):u!==Mc&&(c=String(c)),r[Sg[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 ga[t]?{...n,...ga[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===T_){let d=c.nodeName.toLowerCase(),g=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let v;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let m=this.keyIndex;v=this.parseNode(y,g);let h=s(y,v,g);if(h===null)return;if(typeof h<"u"){l.push(so.default.cloneElement(h,{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,g))){var p;this.keyIndex+=1;let m=this.extractAttributes(y),h={tagName:d};m&&(h.attributes=m),g.void&&(h.selfClose=g.void),l.push(so.default.createElement(Fc,{...h,key:this.keyIndex},(p=v)!==null&&p!==void 0?p:this.parseNode(y,g)))}else l=[...l,...this.parseNode(y,g.tagName?g:n)]}else if(c.nodeType===_R){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(CR);){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],g;if(u)g=s.length,r.push(p.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));g=y.index+y[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(g)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function TR(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 g=new jc(i??"",e).parse();g.length>0&&(d=g)}return d||(d=s),p?so.default.createElement(so.default.Fragment,null,d):so.default.createElement(Fc,{attributes:n,className:r,tagName:c},d)}function En(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,...g}=e,y=i?[]:l,v=o?[]:a,m=c?[c]:[],h=u?[u]:[];y.forEach(b=>{b.onBeforeParse&&m.push(b.onBeforeParse.bind(b)),b.onAfterParse&&h.push(b.onAfterParse.bind(b))});let f=m.reduce((b,C)=>C(b,e),r??""),x=new jc(f,g,y,v),_=h.reduce((b,C)=>C(b,e),x.parse());return so.default.createElement(TR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var Lg=S(q());var _g={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 R_=S(q());var wi=S(O());function P_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Hc(e){let t=(0,wi.useRef)(null),[n,r]=(0,wi.useState)(!1);return(0,wi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=P_((c,p)=>{let d=t.current;if(!d)return;let g=c/i,y=p/i,v=d.getBoundingClientRect(),m=g>v.x&&g<v.x+v.width&&y>v.y&&y<v.y+v.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=P_(()=>{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 Tn={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 wg=S(w()),kR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Tn),[r,o]=Hc(e);return(0,wg.jsx)("mark",{ref:r,className:(0,R_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},bi=class extends bn{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,wg.jsx)(kR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Ci=S(O());function Bc(e){return e.contentEditable==="true"}function PR(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 I_(e){let{selectionStart:t,selectionEnd:n}=Bc(e)?PR(e):e;return[t,n]}function Uc(e){let[,t]=(0,Ci.useState)(),n=(0,Ci.useRef)(null);return n.current=I_(e),(0,Ci.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=I_(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 zc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Io);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 L_=S(O());function Ei(e){(0,L_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ao(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var A_,sn=new Map,RR=["bottom","height","left","right","top","width"],IR=(e={},t={})=>RR.some(n=>e[n]!==t[n]);function O_(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...O_(t)]:[]}function N_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var Kc=!1,M_=()=>{Kc=!0;let e=[];if(sn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),sn.delete(n);return}let r=n.getBoundingClientRect();IR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(N_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),sn.size===0){Kc=!1;return}A_=window.requestAnimationFrame(M_)};function bg(e,t){let n=O_(e),r=[],o=n.map((i,s)=>bg(i,a=>{r[s]=a;let l=sn.get(e);if(!l)return;let u=r.reduce(N_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),sn.has(e)){let s=sn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else sn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!Kc&&M_()},unobserve(){o.forEach(s=>s.unobserve());let i=sn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||sn.delete(e),sn.size||(cancelAnimationFrame(A_),Kc=!1)}}}}var D_,an=new Map,F_=()=>{an.forEach((e,t)=>{if(!t.isConnected){an.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),an.size!==0&&(D_=window.requestAnimationFrame(F_))};function j_(e,t){return{observe(){let n=an.size===0;an.has(e)?an.get(e).callbacks.push(t):an.set(e,{visible:void 0,callbacks:[t]}),n&&F_()},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(D_)}}}}var Cg=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function Eg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function Ti(e){return parseFloat(e)}function Vc(e){return Math.round(e*1e6)}function H_(e){return e/1e6}function Tg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=Ti(e.width),i=Ti(e.borderLeftWidth),s=Ti(e.borderRightWidth),a=Ti(e.paddingRight),l=H_(Vc(o)-Vc(i)-Vc(s)),u=H_(Vc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function lo(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ao(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};Eg(r,n,Cg),Tg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=j_(e,()=>{Eg(r,n,Cg),Tg(r,e,n),i(),setTimeout(i,0)}),a=bg(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(Eg(r,n,Cg),Tg(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=Ti(p.borderTopWidth),g=Ti(p.borderBottomWidth),y=c.top+d-u.top,v=u.top+u.height+-(c.top+c.height-g);n.style.clipPath=`inset(${y}px 0px ${v}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 kg={};Pe(kg,{enUS:()=>LR,nlNL:()=>AR});var LR={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"}]},AR={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 ha=S(w()),B_=()=>(0,ha.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ha.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ha.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(w()),U_=()=>(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"})});function OR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Wc(e){return e?e instanceof ShadowRoot?Wc(e.host):e===e.ownerDocument.body?e.ownerDocument:OR(e)?e:Wc(e.parentNode):document.body}var z_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(z_||{}),kn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();hr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(z_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()});let n=Wc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Pn=class extends kn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var NR=/[.*+?^${}()|[\]\\]/g,MR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function DR(e){return e.replace(NR,"\\$&")}function FR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function jR(e){return e.search(MR)}function K_(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${DR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function V_(e){return e.replace(Io,'<mark data-type="placeholder">$1</mark>')}function ki(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function HR(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 Rg(e,t,n={}){if(t){let r=FR(t.toLowerCase(),e.toLowerCase()),o=ki(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=jR(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(ky).length>3||t.length>30?HR(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ki(e.substring(s,r))}`}<strong>${o}</strong>`}return e}function Ig(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function $c(e){if(Ig(e)){let n=/<body[^>]*>([\s\S]*)<\/body>/gi.exec(e);return n?n[1]:""}return e}var ze=S(w()),BR=({value:e,onUse:t,...n})=>{var p;let r=j(kg),o=z(),i=Ig(e),s=k("EditSuggestionTextInput",_g),[a,l]=(0,It.useState)(null),u=(0,It.useRef)(null),c=((p=e.match(Io))==null?void 0:p.length)||0;return(0,It.useEffect)(()=>{let d;return u.current&&(l(u.current),d=new Pn(u.current),d.on("change",({plainText:g})=>{o(nt.actions.userInput({text:g,selection:d.getSelection()}))}),d.on("keydown",g=>{o(nt.actions.registerKeyDown(dc(g))),g.code==="Enter"&&g.shiftKey&&t(d.getText())}),d.on("paste",({pastedText:g,selectionText:y})=>{o(nt.actions.registerPaste({text:g,selectionText:y}))}),d.on("cut",({selectionText:g})=>{o(nt.actions.registerCut(g))})),()=>{o(nt.actions.reset()),d.dispose(),d.deactivate()}},[u]),(0,It.useEffect)(()=>{e&&u.current&&(u.current.value=e)},[e,u]),(0,It.useEffect)(()=>{u.current&&setTimeout(()=>{if(!u.current)return;let d=u.current.value.length;u.current.setSelectionRange(d,d),u.current.focus()},0)},[u]),i?(0,ze.jsx)("div",{className:s.textInputWrapper,children:(0,ze.jsx)(En,{className:s.textInput,tagName:"div",content:e})}):(0,ze.jsxs)("div",{className:s.textInputWrapper,children:[(0,ze.jsx)("textarea",{...n,ref:u,"data-testid":"edit-suggestion-dialog-textarea",className:s.textInput,defaultValue:e,onChange:()=>{}}),a&&(0,ze.jsx)(UR,{inputElement:u.current,value:e}),(0,ze.jsxs)("div",{className:(0,Lg.default)(s.alert,c===0?s.success:s.warning),children:[(0,ze.jsx)("div",{className:s.alertText,children:r("placeholders",{placeholderSize:c})}),c===0?(0,ze.jsx)(B_,{}):(0,ze.jsx)(U_,{})]})]})},UR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",_g),r=(0,It.useRef)(null),o=Uc(e);return(0,It.useEffect)(()=>{zc(e,o)},[o,e]),(0,ze.jsx)(zR,{inputElement:e,children:(0,ze.jsxs)("div",{ref:r,className:(0,Lg.default)(n.root,n.agentText),children:[(0,ze.jsx)(En,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new bi("placeholders")],inputElement:e,boundaryRef:r}),(0,ze.jsx)("br",{})]})})},zR=({inputElement:e,children:t})=>{let n=(0,It.useRef)(null);return(0,It.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=lo(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,ze.jsx)("div",{ref:n,children:t})},W_=BR;var Ii=S(O());var $_=S(O()),qc=S(q());var rt={root:"_root_pc5uy_1",list:"_list_pc5uy_2",listWrapper:"_listWrapper_pc5uy_6",listHorizontal:"_listHorizontal_pc5uy_10",page:"_page_pc5uy_19",search:"_search_pc5uy_25",pageNav:"_pageNav_pc5uy_33",pageTitle:"_pageTitle_pc5uy_41",pageBackButton:"_pageBackButton_pc5uy_48",listHeading:"_listHeading_pc5uy_62",listItem:"_listItem_pc5uy_70",listItemContent:"_listItemContent_pc5uy_79",listItemText:"_listItemText_pc5uy_97",listItemDescription:"_listItemDescription_pc5uy_105",listItemActions:"_listItemActions_pc5uy_112",truncate:"_truncate_pc5uy_123",lineClamp:"_lineClamp_pc5uy_129",listItemTitle:"_listItemTitle_pc5uy_136",listItemAction:"_listItemAction_pc5uy_112",listItemPrimaryAction:"_listItemPrimaryAction_pc5uy_157",listItemSelected:"_listItemSelected_pc5uy_162",sources:"_sources_pc5uy_166",sourcesTitle:"_sourcesTitle_pc5uy_173",source:"_source_pc5uy_166",icon:"_icon_pc5uy_188",searchIcon:"_searchIcon_pc5uy_205",searchInputWrapper:"_searchInputWrapper_pc5uy_210",searchInput:"_searchInput_pc5uy_210",select:"_select_pc5uy_231",selectType:"_selectType_pc5uy_248",selectWrapper:"_selectWrapper_pc5uy_252",image:"_image_pc5uy_282",imageSrc:"_imageSrc_pc5uy_289",imageSrcHidden:"_imageSrcHidden_pc5uy_300",imageSrcStatus:"_imageSrcStatus_pc5uy_304",imageTitle:"_imageTitle_pc5uy_314",actions:"_actions_pc5uy_319",actionsWrapper:"_actionsWrapper_pc5uy_323",actionsBar:"_actionsBar_pc5uy_329",actionButton:"_actionButton_pc5uy_338",actionShortcut:"_actionShortcut_pc5uy_356",actionShortcutFixKerning:"_actionShortcutFixKerning_pc5uy_363"};var uo={};Pe(uo,{enUS:()=>KR,nlNL:()=>VR});var KR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},VR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var xr=S(w()),WR=({src:e,title:t})=>{let n=k("CommandPalette",rt),[r,o]=(0,$_.useState)("loading"),i=j(uo);return(0,xr.jsxs)("div",{className:n.image,children:[(0,xr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,qc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,qc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,qc.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(tl,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},q_=WR;var G_=S(O()),X_=S(q());var ya=S(w());function Ag({children:e,heading:t,orientation:n}){let r=k("CommandPalette",rt);return G_.default.Children.count(e)===0?null:(0,ya.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ya.jsx)("h4",{className:r.listHeading,children:t}),(0,ya.jsx)("div",{className:(0,X_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var va=S(q());var Gc=S(O()),Z_=S(w()),Q_=Gc.default.createContext(void 0);function _r(){let e=Gc.default.useContext(Q_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var Y_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Gc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,Z_.jsx)(Q_.Provider,{value:s,children:e})};var Ae=S(O()),J_=S(q());var Og={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var co=S(w()),$R=0,ew=Ae.default.createContext(null),qR=()=>{let e=(0,Ae.useContext)(ew);if(!e)throw new Error("Invalid DropdownContext");return e},tw=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ae.useMemo)(()=>++$R,[]),o=(0,Ae.useRef)(null),i=(0,Ae.useRef)(null),s=k("Dropdown",Og),[a,l]=(0,Ae.useState)(!1),[u,c]=(0,Ae.useState)(n),p=g=>{g.preventDefault(),g.stopPropagation(),l(!a)},d=(0,Ae.useCallback)(([g])=>{!g.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ae.useEffect)(()=>{let g=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}},[]),(0,Ae.useEffect)(()=>{if(!i.current&&!a)return()=>{};let g=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&g.observe(i.current),()=>{i.current&&g.unobserve(i.current)}},[i,a]),(0,co.jsx)(ew.Provider,{value:{setIsOpen:l},children:(0,co.jsxs)("div",{ref:o,className:s.root,children:[(0,co.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,co.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,J_.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function GR({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",Og),{setIsOpen:s}=qR(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,co.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}tw.Item=GR;var Ng=tw;var Mg=S(w()),nw=e=>(0,Mg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Mg.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var po={};Pe(po,{enUS:()=>XR,nlNL:()=>QR});var XR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},QR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Xc=S(w()),YR="%0d%0a%0d%0a%0d%0a",ZR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(YR)}`},JR=({suggestion:e,onFeedback:t})=>{let n=j(po),r=N("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Xc.jsx)(Ng,{trigger:(0,Xc.jsx)(nw,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Xc.jsx)(Ng.Item,{as:"a",href:ZR(r,e),onClick:t,children:n("giveFeedback")})})},Qc=JR;var dt=S(w());function Dg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,index:s,description:a,sources:l,styles:u,...c}){let{selected:p,setSelected:d,onChangeOpen:g}=_r(),y=k("CommandPalette",rt);function v(m){r(m),e&&g(!1)}return(0,dt.jsxs)("div",{className:(0,va.default)(y.listItem,p===s&&y.listItemSelected),children:[(0,dt.jsx)("button",{onMouseEnter:()=>d(s),type:"button",className:(0,va.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:(0,dt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,dt.jsx)("p",{className:(0,va.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,dt.jsx)(En,{tagName:"p",allowList:[],content:$c(a),className:(0,va.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate)})]})}),o&&p===s&&(0,dt.jsx)("div",{className:y.listItemActions,children:(0,dt.jsx)(Qc,{suggestion:String(n),onFeedback:o})}),l&&(0,dt.jsxs)("div",{className:y.sources,children:[(0,dt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(m=>m.url?(0,dt.jsx)("a",{className:y.source,href:m.url,target:"_blank",title:m.url,rel:"noopener noreferrer",onClick:()=>i&&i(m),children:m.name},m.url):(0,dt.jsx)("span",{className:y.source,children:m.name},m.name))]})]})}var fo=S(w());function Fg({children:e,title:t,id:n,onDismiss:r}){let o=j(uo),i=k("CommandPalette",rt),{page:s}=_r();return s!==n?null:(0,fo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,fo.jsxs)("div",{className:i.pageNav,children:[(0,fo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,fo.jsx)(Lc,{}),o("back")]}),t&&(0,fo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wr=S(O());var Yc=()=>/Mac/i.test(navigator.platform);var eI={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},H=eI;function tI(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function Z(e){return Array.isArray(e)?e.map(Z):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[tI(n)]:Z(e[n])}),{}):e}function jg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ke(e){return Array.isArray(e)?e.map(ke):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[jg(n)]:ke(e[n])}),{}):e}var nI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},xa=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)||""}},Sa=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?Z(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),Z(r))}),Hg=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}),Bg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),rw=e=>e.info.agentInfo,ow=U({name:"info",initialState:nI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Sa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Sa.rejected,t=>{t.fetchState="error"}).addCase(Sa.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(Hg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Bg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(te,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:iw}=ow.actions,sw=ow.reducer;var Zc={list:[],fetchState:"idle",isOpen:!1,page:"search"},aw=e=>e.search.isOpen,lw=e=>e.search.page,uw=e=>e.search.list;function cw(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var mo=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:xa(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),dw=U({name:"search",initialState:Zc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Zc.fetchState,e.list=Zc.list}},extraReducers:e=>{e.addCase(mo.pending,t=>{t.fetchState="loading"}).addCase(mo.rejected,(t,n)=>{t.fetchState="error",H.error(n.error)}).addCase(mo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(te,()=>Zc)}}),{resetSearch:Jc,setIsOpen:$e,setPage:qe}=dw.actions,pw=dw.reducer;var rI=/(https?:\/\/[^\s]+)/,ed=e=>e.split(" ").find(t=>rI.test(t));var Ug=S(q());var td=S(w()),oI=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",rt);return(0,td.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Ug.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,td.jsx)("span",{className:(0,Ug.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},Pi=oI;var Rn=S(w()),iI=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",rt),a=j(uo),{selected:l,setSelected:u}=_r(),c=i[l],p=c&&typeof c.text=="string"&&ed(c.text),d=(0,wr.useRef)(null);function g(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),b=0,C=0;x==="down"?(_.forEach((I,P)=>{P===l&&(b=P)}),C=b===_.length-1?0:b+1):x==="up"?(_.forEach((I,P)=>{P===l&&(b=P)}),C=b?b-1:_.length-1):u(0);let E=_[C];E&&typeof C=="number"&&(u(C),E.scrollIntoView&&E.scrollIntoView({behavior:"smooth",block:C?"center":"end"}))}function y(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((C,E)=>{E===l&&(_=E)});let b=x[_];b&&b.click()}let v=()=>{p&&window.open(p,"_blank")},m=()=>{c&&r(c,l)},h=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,wr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&p){v();return}if(x.key==="Enter"&&x.shiftKey){h();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),g("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),g("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),y())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,Rn.jsxs)("div",{className:s.actions,children:[(0,Rn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,Rn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,Rn.jsx)(Pi,{onClick:v,shortKeys:[Yc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Rn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Rn.jsx)(Pi,{onClick:h,shortKeys:[8679,8629],children:n}),(0,Rn.jsx)(Pi,{onClick:m,shortKeys:[8629],children:t})]})]})]})},mw=iI;var gw=S(O());var _a=S(w()),Ri=()=>(0,_a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,_a.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,_a.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 Kt=S(w());function sI({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",rt);return(0,Kt.jsxs)("div",{className:l.search,children:[(0,Kt.jsx)("div",{className:l.searchIcon,children:(0,Kt.jsx)(Ri,{})}),(0,Kt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Kt.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,Kt.jsx)("div",{className:l.selectWrapper,children:(0,Kt.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,Kt.jsx)("option",{children:r}),o.map(u=>(0,Kt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var hw=(0,gw.forwardRef)(sI);var wa=S(w());function go({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[g,y]=(0,Ii.useState)(0),v=(0,Ii.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},h=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=v.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Ii.useEffect)(()=>{y(0)},[d,r]),(0,wa.jsx)(_i,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:h,onClose:m,children:(0,wa.jsxs)(Y_,{selected:g,setSelected:y,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,wa.jsx)(hw,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}go.Page=Fg;go.List=Ag;go.Image=q_;go.ListItem=Dg;go.ActionsBar=mw;go.Button=Pi;var $=go;var Ke=S(w()),aI=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",p_),l=z(),u=j(og),c=R(y=>y.overlayInput.text);(0,zg.useEffect)(()=>{e&&(l(nt.actions.reset()),l(nt.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(nt.actions.commitSuggestion()))},[e]);let p=y=>{y.preventDefault(),d(c)},d=y=>{l(mc(y)),t(y)},g=y=>v=>{c!==s?window.confirm(u("warning"))&&y(v):y(v)};return(0,zg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Ke.jsxs)("div",{className:a.root,children:[(0,Ke.jsxs)("div",{className:a.content,children:[e.title&&(0,Ke.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Ke.jsx)(Qd,{labels:e.searchKeywords}),(0,Ke.jsx)(W_,{onUse:d,value:$c(c)})]}),(0,Ke.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&g(i),children:(0,Ke.jsx)(Lc,{})}),(0,Ke.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&g(o),children:(0,Ke.jsx)(w_,{})})]}),(0,Ke.jsxs)("div",{className:a.primaryButtons,children:[(0,Ke.jsx)($.Button,{onClick:g(n),shortKeys:["esc"],children:u("dismiss")}),(0,Ke.jsx)($.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},nd=aI;var lI=["{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}"],uI=new RegExp(lI.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function yw(e,t){let n=e.split(uI),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 vw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var xw={suggestions:[],fetchState:"idle",isInitialRequest:null},Sw={default:xw},rd=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},_w=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")},br=e=>e.textSuggestions,ww=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},od=fe("textSuggestions/refresh"),Vt=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=Si(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,xa(r),e);if(e==="default"){let c=s?l.filter(ww(a)):l;t.dispatch(on(c.slice(0,i)))}return l}),ba=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,{...xa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(ww(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?yw(c.text,e):c.text}))),l=vw(l,i),t.dispatch(on(l)),l}),bw=U({name:"textSuggestions",initialState:Sw,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(Vt.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||xw;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Vt.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Vt.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(ba.pending,t=>{t.default.fetchState="loading"}).addCase(ba.rejected,t=>{t.default.fetchState="error"}).addCase(ba.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(te,()=>Sw)}}),{setTextSuggestions:Cw,setSuggestionState:Ew}=bw.actions,Tw=bw.reducer;var kw={contentType:null,suggestion:null},Pw=e=>e.activeSuggestion.suggestion,Rw=e=>e.activeSuggestion.contentType,Iw=U({name:"activeSuggestion",initialState:kw,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(te,()=>kw)}}),{setActiveSuggestion:In,resetActiveSuggestion:Kg}=Iw.actions,Lw=Iw.reducer;var Vg={};Pe(Vg,{enUS:()=>cI,nlNL:()=>dI});var cI={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"}]},dI={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 pI={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var id=({ui:e})=>e.overlayCollapsed;var Aw=U({name:"ui",initialState:pI,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:Ca,setInputHasFocus:Li,setOverlayCollapsed:Cr,setOpenOverlayWhenTyping:Ow,setOverlayCollapsedUserOverwrite:Nw}=Aw.actions,Mw=Aw.reducer;var Ea=S(O()),Fw=S(w()),Dw=Ea.default.createContext(null),ho=({broadcastEvents:e,children:t})=>{let n=Ea.default.useMemo(()=>e,[]);return(0,Fw.jsx)(Dw.Provider,{value:n,children:t})},Lt=()=>{let e=(0,Ea.useContext)(Dw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var fI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},pt=e=>e.auth.isLoggedIn,jw=e=>e.auth.loginFetchState,Hw=e=>e.auth.verifyFetchState,Bw=e=>e.auth.showLoginOverlay,Ln=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Uw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ta=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),zw=U({name:"auth",initialState:fI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Ln.pending,t=>{t.loginFetchState="loading"}),e.addCase(Ln.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Ln.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ta.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ta.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ta.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ai,setShowLoginOverlay:Kw}=zw.actions,Vw=zw.reducer;var Wg="SetActiveSuggestion",Oi="ShowLoginOverlay",ka="UserLoggedIn",mI="UserLoggedOut",An="ApplySuggestion",$g="ApplyImageSuggestion",gI="ShowCommandPalette",hI=e=>({[Wg]:t=>{e.dispatch(Ew(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[gI]:t=>{e.dispatch($e(t.isOpen)),t.page&&e.dispatch(qe(t.page))},[Oi]:t=>{e.dispatch(Kw(t))},[ka]:()=>{e.dispatch(Ln())},[mI]:()=>{e.dispatch(Ln())},[$g]:t=>{e.dispatch(hc({suggestion:t.suggestion}))},[An]:t=>{e.dispatch(Bt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(wn())}}),Ww=hI;var qg=S(w()),yI=()=>{var y;let[e,t]=(0,$w.useState)(!1),n=R(Pw),r=R(Rw),o=R(br),i=z(),s=Lt(),a=j(Vg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(Kg()),i(Li(!0)),i(nt.actions.reset())},c=(v,m)=>{i(Kg()),i(Li(!0)),s.send(An,{text:v,suggestion:{...m,source:`${m.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let p=(y=o[r])==null?void 0:y.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p-1]})),g=p===o[r].suggestions.length-1||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,qg.jsx)(_i,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,qg.jsx)(nd,{onTouched:t,onDismiss:u,onUse:v=>c(v,n),suggestion:n,onNext:g,onPrevious:d})})},qw=yI;var sd=S(q()),Wt=S(O());var Xw=S(q());var Gw={root:"_root_1ukx5_1"};var Qw=S(w()),vI=({className:e,value:t,...n})=>{let r=k("TextInput",Gw);return(0,Qw.jsx)("input",{className:(0,Xw.default)(e,r.root),type:"text",value:t,...n})},Pa=vI;var Gg={};Pe(Gg,{enUS:()=>SI,nlNL:()=>xI});var SI={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"}]},xI={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 Yw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var ye=S(w());var _I=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},wI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Gg),s=k("LoginTokenDialog",Yw),a=R(Hw),l=z(),u=N("productName"),[c,p]=(0,Wt.useState)(e||""),[d,g]=(0,Wt.useState)(0),[y,v]=(0,Wt.useState)(""),m=(0,Wt.useCallback)(async _=>{_.preventDefault(),l(Uw({email:c})),g(1)},[n,c]),h=()=>{v(""),g(0)},f=(0,Wt.useCallback)(async _=>{_.preventDefault();let b=_I(_.target.elements.token.value);if(!b){v(i("verifyCodeError",{login:x}));return}l(Ta({token:b}))},[n]),x=(0,Wt.useMemo)(()=>_=>(0,ye.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:h,children:_},"back-button"),[]);return(0,Wt.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,ye.jsx)(_i,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ye.jsxs)("div",{className:s.root,children:[(0,ye.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ye.jsxs)("form",{onSubmit:m,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ye.jsx)(Pa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,ye.jsx)("div",{className:s.actions,children:(0,ye.jsx)("button",{type:"submit",className:(0,sd.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ye.jsxs)("form",{onSubmit:f,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ye.jsx)(Pa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,ye.jsx)("div",{className:s.errorMessage,children:y}),(0,ye.jsxs)("div",{className:s.actions,children:[(0,ye.jsx)("button",{type:"button",className:(0,sd.default)(s.button),onClick:h,children:i("back")}),(0,ye.jsx)("button",{type:"submit",className:(0,sd.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Zw=wI;var e1=S(w()),bI=()=>{let e=R(Bw),t=R(rw),n=N("adminUrl"),r=Lt(),o=()=>r.send(Oi,!1),i=()=>{r.send(Oi,!1),r.send(ka)};return(0,e1.jsx)(Zw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Jw=bI;var I1=S(Yg()),Ge=S(O());var UI={data:null,fetchState:"idle"},o1=e=>e.contentTypes.data,Ra=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),zI=U({name:"contentTypes",initialState:UI,reducers:{},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),i1=zI.reducer;function Ia(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 s1=S(O());function a1(e,t){(0,s1.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 La=S(O());var l1={data:null,fetchState:"idle"},ad=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},$t=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)}),KI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),VI=U({name:"entities",initialState:l1,reducers:{},extraReducers:e=>{e.addCase($t.pending,t=>{t.fetchState="loading"}).addCase($t.rejected,t=>{t.fetchState="error"}).addCase($t.fulfilled,(t,n)=>{t.fetchState="done",t.data=KI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(te,()=>l1)}}),u1=VI.reducer;var Zg={};Pe(Zg,{enUS:()=>WI,nlNL:()=>$I});var WI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},$I={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var c1={root:"_root_17kae_1",empty:"_empty_17kae_5"};var yo=S(w()),qI=({onCopy:e,onUse:t})=>{let n=(0,La.useRef)(null),r=k("EntitiesList",c1),o=j(Zg),i=R(ad),s=z();return(0,La.useEffect)(()=>{s($t())},[]),(0,La.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,yo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,yo.jsx)($.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,yo.jsx)($.List,{children:i.map((a,l)=>(0,yo.jsx)($.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,yo.jsx)("p",{className:r.empty,children:o("noResults")})]})},d1=qI;var qt=S(O());var p1={data:null,fetchState:"idle"},f1=e=>e.summary.data,m1=e=>e.summary.fetchState==="error",On=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 a?{summary:a}:Promise.reject(new Error("Summary is not provided"))}),GI=U({name:"summary",initialState:p1,reducers:{},extraReducers:e=>{e.addCase(On.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(On.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(On.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(te,()=>p1)}}),g1=GI.reducer;var Jg={};Pe(Jg,{enUS:()=>XI,nlNL:()=>QI});var XI={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."}]},QI={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 h1={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 Nn=S(w()),YI=({onCopy:e})=>{let t=(0,qt.useRef)(null),n=k("SummaryForm",h1),[r,o]=(0,qt.useState)(""),i=j(Jg),s=R(f1),a=R(m1),l=z(),u=()=>{l(Be({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(Be({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,qt.useEffect)(()=>{l(On())},[]),(0,qt.useEffect)(()=>{o(s||"")},[s]),(0,qt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,qt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Nn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Nn.jsx)("p",{className:n.error,children:i("error")}):(0,Nn.jsxs)(qt.Fragment,{children:[(0,Nn.jsx)("div",{className:n.main,children:(0,Nn.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,Nn.jsx)("div",{className:n.actions,children:(0,Nn.jsx)($.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},y1=YI;var Aa={};Pe(Aa,{enUS:()=>ZI,nlNL:()=>JI});var ZI={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?"}]},JI={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Er=S(O());var eh={};Pe(eh,{enUS:()=>eL,nlNL:()=>tL});var eL={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"}]},tL={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 v1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var nL={data:null,fetchState:"idle"},S1=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},Oa=M("knowledgeAssistant/getKnoeledgeAssistant",async(e,t)=>{var s;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");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),rL=U({name:"knowledgeAssistant",initialState:nL,reducers:{},extraReducers:e=>{e.addCase(Oa.pending,t=>{t.fetchState="loading"}).addCase(Oa.rejected,t=>{t.fetchState="error"}).addCase(Oa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),x1=rL.reducer;var th={data:[],fetchState:"idle"},_1=e=>{var t;return(t=e.answer)==null?void 0:t.data},w1=e=>e.answer.fetchState,Mi=fe("answer/resetKnowledgeSearch"),Ni=M("answer/getAnswer",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=S1(t.getState());if(!o)throw new Error("KnowledgeAssistant is not defined");let i=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code);return{question:e,answer:i}}),oL=U({name:"answer",initialState:th,reducers:{},extraReducers:e=>{e.addCase(Ni.pending,t=>{t.fetchState="loading"}).addCase(Ni.rejected,t=>{t.fetchState="error"}).addCase(Ni.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(te,()=>th).addCase(Mi,()=>th)}}),b1=oL.reducer;var Na=S(w()),C1=()=>(0,Na.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Na.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Na.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 ot=S(w()),iL=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Er.default.useState(""),{setSelected:i}=_r(),s=(0,Er.useRef)(null),a=k("EntitiesList",v1),l=j(eh),u=z(),c=R(_1),p=R(w1),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Ni(r))},g=(y,v)=>{u(Be({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Er.useEffect)(()=>{var y;n&&p==="idle"?u(Ni(n)):(y=s.current)==null||y.focus()},[s,p]),(0,Er.useEffect)(()=>{p==="done"&&(u(Be({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(c.length-1),o(""))},[p,c]),(0,Er.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,ot.jsxs)("div",{className:a.root,children:[c.length>0&&(0,ot.jsx)("div",{className:a.alignRight,children:(0,ot.jsx)($.Button,{onClick:t,children:l("reset")})}),(0,ot.jsxs)($.ActionsBar,{list:c.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:l("use"),onPrimary:y=>e(y.text),children:[c.map(({question:y,answer:v},m)=>(0,ot.jsx)($.List,{children:(0,ot.jsx)($.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:h=>g(h,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${m}`)),p==="loading"&&(0,ot.jsx)("p",{className:a.status,children:l("loading")}),p==="error"&&(0,ot.jsx)("p",{className:a.status,children:l("error")}),(0,ot.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,ot.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(-1)},onChange:y=>{i(-1),o(y.target.value)}}),(0,ot.jsx)("button",{type:"submit",className:a.submit,children:(0,ot.jsx)(C1,{})})]})]})]})},E1=iL;var sL={data:null,fetchState:"idle"},Tr=e=>e.profile.data,ld=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ma=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)}),aL=U({name:"profile",initialState:sL,reducers:{},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.fetchState="loading"}).addCase(Ma.rejected,t=>{t.fetchState="error"}).addCase(Ma.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),T1=aL.reducer;var k1=S(O());var vo=S(w()),lL=({commands:e,onClick:t,onEdit:n})=>{var c,p,d;let r=z(),o=j(Aa),i=R(Tr),s=R(br),a=((d=(p=(c=i==null?void 0:i.uiConfig)==null?void 0:c.search)==null?void 0:p.initialTypes)==null?void 0:d.filter(({isActive:g})=>g))||[],l=0,u=a.map(({type:g})=>{var y;return(y=s[g])==null?void 0:y.suggestions.map(v=>({text:v.text||v.url||v.message,type:g}))}).flat(1);return(0,k1.useEffect)(()=>{a.forEach(({type:g})=>{(!s[g]||s[g].suggestions.length===0)&&r(Vt(g))})},[]),(0,vo.jsxs)($.ActionsBar,{list:[...e.map(g=>({text:g.label,type:"command"})),...u],primaryLabel:o("use"),secondaryLabel:o("preview"),onPrimary:({text:g},y)=>t(g,u[y]),onSecondary:(g,y)=>{n(u[y],s[u[y].type].suggestions)},children:[e.length>0&&(0,vo.jsx)($.List,{heading:o("commands"),children:e.map((g,y)=>(0,vo.jsx)($.ListItem,{index:y,closeOnSelect:!1,onClick:g.onClick,children:g.label},g.label))}),a.map(({type:g,title:y})=>{var v;return(0,vo.jsx)($.List,{heading:y,orientation:"vertical",children:(v=s[g])==null?void 0:v.suggestions.map(m=>(l++,(0,vo.jsx)($.ListItem,{index:l+e.length-1,closeOnSelect:!1,description:m.text,onClick:()=>t(m.text,m),"data-testid":"search-overlay-suggestion",children:m.title},`${m.id}-${m.text}`)))},g)})]})},P1=lL;var _e=S(w()),uL=200,cL=5,dL=4,pL=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),R1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),fL=()=>{let e=z(),t=Lt(),n=j(Aa),[r,o]=(0,Ge.useState)(!1),[i,s]=(0,Ge.useState)(""),a=R(lw),l=R(Tr),[u,c]=(0,Ge.useState)(null),[p,d]=(0,Ge.useState)([]),[g,y]=(0,Ge.useState)(),v=R(pt),m=N("showSearch"),h=N("showEntitiesCommand"),f=N("showSummaryCommand"),x=N("showKnowledgeSearch"),_=N("showImageSearch"),b=N("searchTriggerKey"),C=R(o1),E=R(uw),I=R(aw),P=L=>Co(E.filter(J=>J.type===L.toUpperCase()),L),K=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(L=>L.shouldShow),D=[{label:n("entitiesClipboard"),onClick:()=>e(qe("entities")),shouldShow:h&&R1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(qe("summary")),shouldShow:f&&R1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(qe("knowledgeAssist")),shouldShow:x}].filter(L=>L.shouldShow),B=(C==null?void 0:C.map(L=>({value:L.code.toUpperCase(),label:`${L.name}s`,list:P(L.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],be=(0,Ge.useCallback)((0,I1.default)((L,J)=>{e(mo({query:L,type:J,tags:["search-overlay"]}))},uL),[]),Ar=pL([...B,...K]),Ye=(0,Ge.useCallback)((L,J)=>{e(qe("edit")),c({...L,searchTerm:void 0}),d(J)},[e,u,B]),Or=(0,Ge.useCallback)((L,J)=>{switch(J.type){case"IMAGE":t.send($g,{suggestion:J});break;default:t.send(An,{text:L,suggestion:J})}e($e(!1))},[e]),Vi=L=>{Ia(L.text),e(Be({name:"entity copied",data:{entity:L,type:"copy"}})),e($e(!1))},Nr=(0,Ge.useCallback)(L=>{e(Be({name:"suggestion feedback",data:{text:L.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),qa=L=>{t.send(An,{text:L,suggestion:{source:"knowledge-assist",text:L}}),e(Be({name:"answer used",data:{originalText:L},options:{includeConversationData:!0}})),s(""),e(qe("search")),e(Mi()),e($e(!1))},Ga=L=>{Ia(L),e($e(!1))},Wi=L=>{t.send(An,{text:L.text,suggestion:{source:"entity",text:L.text}}),e($e(!1))},$i=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Mr=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function Co(L,J){return L.slice(0,g?10:J.toLowerCase()==="image"?dL:cL)}function Bd(L,J,gt){return J.reduce((cn,zn)=>gt&&g===gt?zn.length+cn:Co(zn,gt).length+cn,L)}function Xt(L){return J=>{r?window.confirm(n("warning"))&&(L(J),o(!1)):L(J)}}return(0,Ge.useEffect)(()=>{i?be(i,g):e(Jc())},[i,g]),(0,Ge.useEffect)(()=>{a==="search"&&e(Mi())},[a]),(0,Ge.useEffect)(()=>{v&&e(Ra())},[v]),a1(b,()=>e($e(!0))),!m||!l?null:(0,_e.jsxs)($,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Xt(L=>e($e(L))),onChangeType:L=>y(L),onChangePage:Xt(L=>e(qe(L))),selectedType:g,search:i,page:a,isOpen:I,types:[...B,...K],children:[(0,_e.jsxs)($.Page,{id:"search",children:[i.length===0&&(0,_e.jsx)(P1,{commands:D,onClick:Or,onEdit:Ye}),i.length>0&&(0,_e.jsxs)($.ActionsBar,{list:[...D.map(L=>({text:L.label,type:"command"})),...Ar.map(L=>({text:L.text||L.url||L.message,type:L.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:L},J)=>Or(L,Ar[J]),onSecondary:(L,J)=>{let gt=Ar[J-D.length];!gt||!gt.type||Ye(gt,P(gt.type))},children:[D.length>0&&(0,_e.jsx)($.List,{heading:n("commands"),children:D.map((L,J)=>(0,_e.jsx)($.ListItem,{index:Bd(J,[],"commands"),closeOnSelect:!1,onClick:L.onClick,children:L.label},L.label))}),[...B,...K].map(({value:L,label:J,list:gt,lineClamp:cn,listOrientation:zn},jh)=>(0,_e.jsx)($.List,{heading:J,orientation:zn==="horizontal"?"horizontal":"vertical",children:Co(gt,L).map((ce,Dr)=>(0,_e.jsx)($.ListItem,{index:Bd(D.length+Dr,[...B,...K].slice(0,jh).map(({list:MC})=>MC),L),closeOnSelect:!1,lineClamp:cn,onClick:()=>Or(ce.text,ce),description:L!=="IMAGE"?ce.title&&ce.text:void 0,onFeedback:L!=="IMAGE"?()=>Nr(ce):void 0,children:L==="IMAGE"?(0,_e.jsx)($.Image,{title:ce.title||ce.text,src:ce.image}):ce.title||ce.text},`${ce.id}-${ce.text}`))},L))]})]}),(0,_e.jsx)($.Page,{id:"edit",onDismiss:Xt(()=>{e(qe("search")),c(null)}),children:u&&(0,_e.jsx)(nd,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(qe("search")),c(null),d([])},onNext:Mr,onPrevious:$i,onUse:L=>{e(qe("search")),Or(L,{...u,source:`${u.source||"text_recommendation"}-preview`}),e($e(!1)),d([]),c(null)}})}),(0,_e.jsx)($.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Xt(()=>{e(qe("search"))}),children:(0,_e.jsx)(d1,{onUse:Wi,onCopy:Vi})}),(0,_e.jsx)($.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Xt(()=>{e(qe("search"))}),children:(0,_e.jsx)(y1,{onCopy:Ga})}),(0,_e.jsx)($.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Xt(()=>{e(Mi()),e(qe("search"))}),children:(0,_e.jsx)(E1,{question:i,onUse:qa,onResetQuestion:()=>{e(Mi()),s("")}})})]})},L1=fL;var Di=S(w()),mL=()=>{let e=N("showSearch"),t=N("isEmbedded");return(0,Di.jsxs)(A1.Fragment,{children:[e&&(0,Di.jsx)(L1,{}),(0,Di.jsx)(qw,{}),t&&(0,Di.jsx)(Jw,{})]})},O1=mL;var dd=S(O());function Fi(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 ud=S(O());var ji=S(O());var N1=S(O());function M1(e,t,n){(0,N1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var D1={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var So=S(w()),hL=["search","personal-collection-search","search-autocomplete"];function yL(e,t,n,r={}){let o="";return hL.includes(t)?o=K_(Rg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Rg(e,n,r),r.placeholders===!0&&(o=V_(o)),o}var vL=()=>{},SL=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=N("inlineSuggestions"),i=R(Si),s=z(),a=k("TextSuggestion",D1),l=(0,ji.useRef)(null);(0,ji.useEffect)(()=>{let c=setTimeout(()=>{s(r_({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),M1(l,"click",()=>{s(vr(e)),s(Bt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,ji.useMemo)(()=>yL(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,So.jsxs)("div",{className:a.root,onMouseEnter:()=>s(vr(e)),children:[(0,So.jsx)(oe,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:vL,children:(0,So.jsx)(En,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,So.jsx)("div",{className:a.actions,children:(0,So.jsx)(Qc,{onFeedback:()=>r(n),suggestion:n.text})})]})},F1=SL;var nh=S(w()),xL=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,ud.useMemo)(()=>{let i=t.map((s,a)=>(0,nh.jsx)(F1,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,nh.jsx)(ud.Fragment,{children:o})},cd=xL;var j1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Da=S(w()),_L=({textSuggestions:e,selectedIndex:t})=>{let n=(0,dd.useRef)(null),r=k("InlineSuggestionsOverlay",j1),o=R(Fi),i=z(),s=R(pt),a=R(vi),l=R(id),u=N("showTextSuggestions");return Ei(()=>{i(Cr({collapse:!0,skipWhenInputFocus:!0}))}),(0,dd.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,Da.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Da.jsx)("div",{ref:n,className:r.paper,children:(0,Da.jsx)(xt,{children:(0,Da.jsx)(cd,{suggestions:e,selectedIndex:t})})})})},wL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),H1=xn(wL)(_L);var fd=S(q()),Hi=S(O());var B1=S(O());function U1(e,t){let[n,r]=(0,B1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return H.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){H.error(s)}}]}var K1=S(q()),Mn=S(O());var rh={};Pe(rh,{enUS:()=>bL,nlNL:()=>CL});var bL={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"}]}]},CL={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 z1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var kr=S(w()),oh=(e,t,n)=>r=>(0,kr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),EL=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=j(rh),s=Lt(),a=k("Login",z1),l=N("productName"),u=(0,Mn.useCallback)(m=>{m.preventDefault(),r&&r(parseInt(m.target.value,10))},[]),c=(0,Mn.useCallback)(m=>{m.preventDefault(),s.send(Oi,!0)},[t]),p=(0,Mn.useMemo)(()=>m=>(0,kr.jsx)("a",{onClick:f=>{f.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:m},"login"),[t]),d=(0,Mn.useCallback)(m=>(0,kr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:m},"prompt"),[c]),{min:g,hour:y,day:v}=(0,Mn.useMemo)(()=>({min:oh(a,60*10,u),hour:oh(a,60*60,u),day:oh(a,60*60*12,u)}),[]);return(0,kr.jsxs)("div",{className:(0,K1.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,kr.jsxs)(Mn.Fragment,{children:[(0,kr.jsx)("br",{}),i("snooze",{min:g,hour:y,day:v})]})]})},pd=EL;var V1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Fa=S(w()),TL=({title:e})=>{let t=k("SearchTrigger",V1),n=z();return(0,Fa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n($e(!0)),children:[(0,Fa.jsx)(Ri,{}),(0,Fa.jsx)("span",{className:t.text,children:e})]})},W1=TL;var ih={};Pe(ih,{enUS:()=>kL,nlNL:()=>PL});var kL={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"}]},PL={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 $1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=S(w()),RL=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=k("SuggestionsOverlay",$1),o=j(ih),i=R(Fi),s=Zx(),a=z(),l=(0,Hi.useRef)(null),u=N("searchTriggerKey"),c=N("productName"),p=R(id),d=R(pt),g=R(vi),[y,v]=(0,Hi.useState)(null),m=N("showSearch"),h=N("showTextSuggestions"),f=N("adminUrl"),x=N("isEmbedded"),[_,b]=U1("dd-snooze-until-ms",0),C=p||_>Date.now(),E=R(B=>B.input.text),I=e.filter(B=>B.source!=="gpt").length,P=()=>{C&&b(0),a(Nw(!C))},K=B=>{a(Be({name:"suggestion feedback",data:{text:B.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},D=B=>{let be=Date.now()+B*1e3;b(be),H.info(`Snooze until: ${new Date(be)}`),a(Cr({collapse:!0}))};return(0,Hi.useEffect)(()=>{I===0&&v(null)},[e,I]),Ei(()=>{a(Cr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||g===!1?null:d===!1?(0,ue.jsxs)("div",{ref:l,className:(0,fd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(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)(Hr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Hr,{className:r.toggleButton,title:o("open",{productName:c}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(pd,{loginUrl:f,isEmbedded:x,onLogIn:n,onSnooze:D})})]}):!s||!i?null:(0,ue.jsxs)("div",{ref:l,className:(0,fd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:m&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(Yc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(W1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,fd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,ue.jsx)(Hr,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Hr,{className:r.toggleButton,title:o("open",{productName:c}),onClick:P,isCollapsed:!0})}),I>0&&h&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(xt,{children:(0,ue.jsx)(cd,{onFeedback:K,suggestions:e,selectedIndex:t,reverse:!0})})})]})},IL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),q1=xn(IL)(RL);var ja=S(w()),LL=({children:e})=>{let n=N("locale").replace("-","");return(0,ja.jsx)(pg.Provider,{value:n,children:e})},AL=({store:e,customStyles:t={},children:n})=>(0,ja.jsx)(qm,{store:e,children:(0,ja.jsx)(LL,{children:(0,ja.jsx)(Gi.Provider,{value:t,children:n})})}),xo=AL;var Td=S(q());var jn=S(O());var G1=S(O()),OL=["div","span","mark","strong","b","i","u","em"];function sh(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(OL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,G1.cloneElement)(r,{children:sh(s,t,n+1)})]}return[...e,...t]}function Pr(e){return e.tagName.toLowerCase()==="textarea"}var X1={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 ob=S(q());var wd=S(O());function Q1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function md(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Y1(e){return e!=null}var lh=S(q()),At=S(O());var gd=S(O()),NL=["bottom","height","left","right","top","width"],ML=(e={},t={})=>NL.some(n=>e[n]!==t[n]),Dn=new Map,Z1,J1=()=>{let e=[],t=[];Dn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();ML(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Dn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Z1=window.requestAnimationFrame(J1)};function DL(e,t){return{observe(){let n=Dn.size===0;if(Dn.has(e)){let r=Dn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Dn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&J1()},unobserve(){let n=Dn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Dn.delete(e),Dn.size||cancelAnimationFrame(Z1)}}}}function ah(e){let[t,n]=(0,gd.useState)(null);return(0,gd.useLayoutEffect)(()=>{if(!e.current)return;let r=DL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Bi=S(O()),tb=S(_u());var eb={root:"_root_1jq08_1"};var nb=({children:e})=>{let[t,n]=(0,Bi.useState)(null),r=(0,Bi.useContext)(Gi);return(0,Bi.useLayoutEffect)(()=>{let o=document.createElement("div");return ao(o),o.classList.add(eb.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,tb.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var hd=S(w()),yd=(e=!1)=>{let[t,n]=(0,At.useState)(e),r=(0,At.useCallback)(()=>n(!0),[]),o=(0,At.useCallback)(()=>n(!1),[]),i=(0,At.useCallback)(()=>n(a=>!a),[]),s=(0,At.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function uh(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 vd=({className:e,triggerRef:t,boundaryRef:n=(0,At.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=uh,...a})=>{let l=ah(t),u=ah(n),c=(0,At.useMemo)(()=>s(l,u,0),[l,u]);return(0,hd.jsx)(nb,{children:(0,hd.jsx)("div",{className:(0,lh.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,hd.jsx)("div",{className:(0,lh.default)(e,ln.root),children:i})})})};var rb=S(q()),Sd=S(O());var ch=S(w()),xd=(0,Sd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Sd.useRef)(null),i=k("TabCompletion",Tn);return(0,ch.jsx)("div",{ref:md([o,r]),className:(0,rb.default)(e,i.popoverContentContainer),...n,children:(0,ch.jsx)("div",{className:i.popoverContent,children:t})})});var Rr=S(w()),FL=e=>t=>{let n=uh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},jL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Tn),s=yd(),a=(0,wd.useMemo)(()=>FL(e.getBoundingClientRect()),[e]),[l,u]=Hc(e);return(0,wd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Rr.jsxs)("span",{children:[(0,Rr.jsx)("mark",{ref:md([l,s.triggerRef]),className:(0,ob.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Rr.jsx)(vd,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Rr.jsx)(xd,{style:n,children:(0,Rr.jsx)("div",{className:i.hintText,children:o})})})]})},_d=class extends bn{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${Q1(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(Y1);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,Rr.jsx)(jL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Cd=S(q());var Qe=S(O());var dh=S(w()),ib=()=>(0,dh.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,dh.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 Ir=S(O());var ab=S(Yg());var sb={root:"_root_1muu8_1",content:"_content_1muu8_7"};function bd(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 ph(e){return e.replace("https://www.","").replace("https://","")}var Ot=S(w()),HL=3,BL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),UL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=HL})=>{let i=k("LinkSearch",sb),[s,a]=(0,Ir.useState)(""),l=z(),u=R(rd("url")),c=R(cw("URL",BL)),[p,d]=(0,Ir.useState)(c.length-1),g=N("fallbackImage"),y=f=>{let x=f.target;a(x.value)},v=(f,x)=>{f.stopPropagation(),f.preventDefault(),window.open(x,"_blank")},m=f=>{var b;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(((b=c[p])==null?void 0:b.text)||s)},h=(0,Ir.useCallback)((0,ab.default)(f=>{l(mo({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Ir.useEffect)(()=>{s&&h(s)},[s]),(0,Ir.useEffect)(()=>()=>{l(Jc())},[]),(0,Ot.jsxs)("div",{className:i.root,children:[(0,Ot.jsx)(xt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,x)=>(0,Ot.jsx)(oe,{selected:p===x,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,Ot.jsxs)(ge,{children:[(0,Ot.jsx)(ge.Image,{src:bd(f,"small",g||void 0),title:f.title||f.text}),(0,Ot.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,Ot.jsx)(ge.Title,{children:f.title||ph(f.text)}),f.title&&ph(f.text)]}),(0,Ot.jsx)(oe.Actions,{children:(0,Ot.jsx)(oe.ActionButton,{label:r,onClick:_=>v(_,f.text)})})]})},f.text))}),(0,Ot.jsx)(Pa,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:m})]})},lb=UL;var fh={};Pe(fh,{enUS:()=>zL,nlNL:()=>KL});var zL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},KL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Xe=S(w()),VL=(0,Qe.forwardRef)((e,t)=>{let n=k("TabCompletion",Tn);return(0,Xe.jsx)("mark",{ref:t,className:(0,Cd.default)(n.matchSelection)},"selection-start")}),WL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(fh),s=k("TabCompletion",Tn),a=(0,Qe.useRef)(null),l=(0,Qe.useRef)(null),[u,c]=(0,Qe.useState)(null),p=z(),d=yd(document.activeElement===r),[g]=(0,Qe.useState)(()=>document.createRange());d.triggerRef.current=g,(0,Qe.useEffect)(()=>()=>g.detach(),[]),(0,Qe.useEffect)(()=>{let v=e.current,m=a.current;!v||!m||(g.setStart(v,0),g.setEnd(m,0))},[e.current,a.current]),Ei(()=>{d.close()});let y=(0,Qe.useCallback)(v=>{let m=g.toString(),h=/^http(s?):\/\//.test(v)?v:`https://${v}`;p(pc({text:`[${m}](${h})`,replace:"selection"}))},[]);return(0,Xe.jsxs)("span",{children:[(0,Xe.jsx)("mark",{ref:a,className:(0,Cd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Xe.jsx)(vd,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Xe.jsxs)(xd,{style:n,ref:l,children:[(0,Xe.jsx)("div",{className:(0,Cd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Xe.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Xe.jsx)(ib,{}),(0,Xe.jsx)("span",{children:"\xA0"}),(0,Xe.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Xe.jsx)(lb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},Ed=class extends bn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Qe.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,Xe.jsx)(VL,{ref:this.startRef}):(0,Xe.jsx)(WL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Fn=S(w()),$L=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",X1),c=N("insertLink"),p=N("showMidSentenceSuggestions"),d=N("inlineSuggestions"),g=Uc(a),y=(0,jn.useRef)(null);(0,jn.useEffect)(()=>{Pr(a)&&g&&zc(a,g)},[g]);let v=(0,jn.useCallback)(f=>{if(!o||!n)return f;let x=[(0,Fn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Fn.jsx)("span",{"data-testid":"tab-completion",className:(0,Td.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Fn.jsx)("span",{className:(0,Td.default)(u.hint,u.resetIndent),children:(0,Fn.jsx)(il,{keyCode:"tab"},"tabHint")})),sh(f,x)},[o,n,r]),m=(0,jn.useMemo)(()=>{let f=[];return c&&f.push(new Ed("selection")),f.push(new bi("placeholders")),i&&f.push(new _d("keywords")),f},[d,c,i]),h=(0,jn.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,Fn.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(y.current=f==null?void 0:f.parentElement)},className:u.root,style:h,children:[(0,Fn.jsx)(En,{tagName:"span",containerTagName:"div",className:(0,Td.default)(u.container,u.agentText),disableLineBreaks:Pr(a),content:t||"\u200B",onAfterParse:v,matchers:m,selection:g,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!p}),(0,Fn.jsx)("br",{})]}):null},qL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var v;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:g,showStyleSuggestions:y}=n;return{showTabHint:c,showStyleSuggestions:y,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((v=r.list)==null?void 0:v.keywordMatches)??[],enabled:g&&p!==!1}},ub=xn(qL)($L);var Yb=S(q()),Zb=S(O());var cb={list:[],fetchState:"idle",isInitialRequest:null},pb=e=>e.autoflows.list||[],db=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Hn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),mh=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(Hn(e.platformSessionId))}),gh=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(Hn(e.platformSessionId))}),GL=U({name:"autoflows",initialState:cb,reducers:{},extraReducers:e=>{e.addCase(mh.pending,(t,n)=>{let r=db(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(gh.pending,(t,n)=>{let r=db(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Hn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Hn.rejected,t=>{t.fetchState="error"}),e.addCase(Hn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(te,()=>cb)}}),fb=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(Hn(e))}),o.on("sessionCompleted",()=>{n(Hn(e))})}),mb=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),gb=GL.reducer;var hb={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},yb=e=>e.customMessages.list,vb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),Sb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),xb=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ha=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),kd=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)}),Pd=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)}),_b=U({name:"customMessages",initialState:hb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ha.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ha.rejected,t=>{t.fetchState="error"}).addCase(Ha.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(kd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(kd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Pd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Pd.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(te,()=>hb)}}),wb=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(_b.actions.onCustomMessage(i))})}),bb=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Cb=_b.reducer;var XL={token:null,accountUrl:null,interval:null},Eb=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},hh=M("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),yh=M("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(hh()),setInterval(()=>r(hh()),n)}),Tb=U({name:"passwordlessToken",initialState:XL,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(hh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(yh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:kb}=Tb.actions,Pb=Tb.reducer;function Rb(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var jb=S(O());var Mb=S(q()),Db=S(O());var Lb=S(q());var Ib={root:"_root_838fd_1"};var Ob=S(w()),QL=({className:e,children:t})=>{let n=k("Unicode",Ib);return(0,Ob.jsx)("span",{className:(0,Lb.default)(e,n.root),children:t})},Ab=QL;var Nb={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 vh={};Pe(vh,{enUS:()=>YL,nlNL:()=>ZL});var YL={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"}]},ZL={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 ft=S(w()),eA=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",Nb),a=j(vh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,ft.jsxs)(oe,{className:(0,Mb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,ft.jsx)(ge,{children:(0,ft.jsxs)(ge.Content,{children:[(0,ft.jsxs)(ge.Title,{children:[t&&(0,ft.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,ft.jsx)("span",{children:r})]})}),(0,ft.jsx)(oe.Actions,{fixed:t==="Started",children:(0,ft.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,ft.jsxs)(Db.Fragment,{children:[(0,ft.jsx)(Ab,{children:u})," ",(0,ft.jsx)("span",{children:a(l)})]})})})]})},Fb=eA;var Sh=S(w()),tA=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},nA=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Sh.jsx)(jb.Fragment,{children:e.map(o=>(0,Sh.jsx)(Fb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||tA(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),rA=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},oA={onStartAutoflow:mh,onStopAutoflow:gh},Hb=xn(rA,oA)(nA);var Rd=S(O());var wh=S(q());var xh=S(w()),_h=()=>(0,xh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,xh.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 Bb={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=S(w()),iA=({entities:e})=>{let t=k("EntitiesWidgetList",Bb),[n,r]=(0,Rd.useState)(void 0),o=z(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ia(a.text),o(Be({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Rd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,wh.default)(t.icon),children:(0,un.jsx)(_h,{})}),(0,un.jsx)("span",{className:(0,wh.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(_h,{})})]})]},a.text))})},Ub=iA;var zb=S(q()),bh=S(O());var Bn={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 it=S(w()),sA=({suggestion:e})=>{let t=j(po),n=z(),r=R(vb(e.text)),o=R(Sb(e.text)),i=R(xb(e.text)),s=R(oc),{replyOptions:a}=e,l=(0,bh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(kd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,bh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(Pd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,it.jsxs)(oe,{onClick:l,className:(0,zb.default)(Bn.root,{[Bn.isUsed]:r,[Bn.hasError]:i}),children:[(0,it.jsx)(ge,{children:(0,it.jsxs)(ge.Content,{children:[(0,it.jsxs)(ge.Title,{className:Bn.title,children:[e.text," ",(0,it.jsx)(sl,{className:Bn.label,children:"analyse tool"})," ",i&&(0,it.jsx)("span",{className:Bn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,it.jsx)("ul",{className:Bn.quickReplies,children:a.map(c=>(0,it.jsx)("li",{className:Bn.quickReply,children:c.title},c.title))})]})}),(0,it.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,it.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,it.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,it.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Kb=sA;var Ch=S(w()),Vb=()=>(0,Ch.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Ch.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 Wb=S(O());var mt=S(w()),aA=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=ed(o),s=j(po),a=N("showImages"),l=N("fallbackImage"),u=g=>{g.preventDefault(),g.stopPropagation(),r(o)},c=g=>{g.preventDefault(),g.stopPropagation(),n(e)},p=(0,Wb.useCallback)(g=>{window.open(i,"_blank"),g.stopPropagation(),g.preventDefault()},[i]);return(0,mt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,mt.jsxs)(ge,{children:[a&&e.image&&(0,mt.jsx)(ge.Image,{src:bd(e,"small",l||void 0),title:e.title}),(0,mt.jsxs)(ge.Content,{children:[e.title&&(0,mt.jsx)(ge.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,mt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,mt.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,mt.jsxs)(oe.Actions,{children:[i&&(0,mt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,mt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,mt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},$b=aA;var Ba=S(w()),lA=({contentType:e,lines:t,suggestions:n})=>{let r=Lt(),o=R(br),i=a=>{r.send(Wg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(An,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Ba.jsx)(Ba.Fragment,{children:n.map(a=>(0,Ba.jsx)($b,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},qb=lA;var Eh={};Pe(Eh,{enUS:()=>uA,nlNL:()=>cA});var uA={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"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},cA={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"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var Gb={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 Th=S(w()),Xb=()=>(0,Th.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Th.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 kh=S(w()),Qb=()=>(0,kh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,kh.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 V=S(w()),Id=(e,t)=>{let n=R(pt);(0,Zb.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},dA=({onLogIn:e})=>{let t=j(Eh),n=z(),r=N("isEmbedded"),o=k("Widget",Gb),i=N("showAutoflows"),s=N("showCustomMessages"),a=N("showSummaryCommand"),l=N("showKnowledgeSearch"),u=N("showSearch"),c=R(Tr),p=R(ld),d=R(pb),g=R(ad),y=R(yb),v=R(ic),m=R(vi),h=R(pt),f=R(oc),x=R(Rb),_=R(br),b=Lt(),C=R(_w),E=R(Eb("/admin/")),I=N("adminUrl"),P=N("productName");if(Id(()=>(n(Ha(f)),n(wb(f)),()=>{n(bb(f))}),[n,m,s,f]),Id(()=>(n(Hn(f)),n(fb(f)),()=>{n(mb(f))}),[n,m,i,f]),Id(()=>{p.forEach(({type:D})=>{n(D==="entities"?$t():Vt(D))})},[n,m,v,c]),Id(()=>(n(yh()),()=>{n(kb())}),[n]),m===!1)return(0,V.jsx)("div",{className:o.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,V.jsx)("div",{className:o.loginText,children:(0,V.jsx)("div",{children:(0,V.jsx)(pd,{isEmbedded:r,loginUrl:I,onLogIn:e})})},"login");if(!c||!f||h===null||C||x)return(0,V.jsx)("div",{className:o.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:t("waiting")})})},"waiting");let K=u||a||l||E;return(0,V.jsx)("div",{className:(0,Yb.default)(o.root),"data-testid":"widget",children:(0,V.jsxs)(al,{className:o.sectionList,children:[K&&(0,V.jsx)(Kn,{title:t("actions"),type:"shortcuts",children:(0,V.jsxs)("div",{className:o.shortcutList,children:[u&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,V.jsx)(Ri,{}),t("linkSearch")]}),a&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,V.jsx)(Qb,{}),t("linkSummary")]}),l&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,V.jsx)(Xb,{}),t("linkKnowledgeSearch")]}),E&&(0,V.jsxs)("a",{className:o.shortcut,target:"_blank",href:E,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,V.jsx)(Vb,{}),t("linkStudioLogin",{productName:P})]})]})}),s&&y.length>0&&(0,V.jsx)(Kn,{type:"custom-messages","data-testid":"custom-messages",children:(0,V.jsx)(xt,{withDivider:!0,children:y.map(D=>(0,V.jsx)(Kb,{suggestion:D},D.text))})}),i&&d.length>0&&(0,V.jsx)(Kn,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,V.jsx)(xt,{withDivider:!0,children:(0,V.jsx)(Hb,{})})}),p.map(({type:D,title:B,amount:be,lines:Ar})=>{var Ye;switch(D){case"entities":return g&&g.length>0&&(0,V.jsx)(Kn,{type:D,title:B,"data-testid":`type-${D}`,children:(0,V.jsx)(Ub,{entities:g})},D);default:return((Ye=_[D])==null?void 0:Ye.fetchState)==="done"&&_[D].suggestions.length>0&&(0,V.jsx)(Kn,{type:D,title:B,"data-testid":`type-${D}`,children:(0,V.jsx)(xt,{withDivider:!0,children:(0,V.jsx)(qb,{lines:Ar,contentType:D,suggestions:_[D].suggestions.slice(0,be)||[]})})},D)}})]})})},Jb=dA;function Ui(e){let t=new Range;return t.selectNodeContents(e),t}function eC(e,t,n){try{return Lr(e,t,n),!0}catch{return!1}}function Ld(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Ad(e){return"tagName"in e&&e.tagName==="BR"}var Ua=/[\u200B-\u200D\uFEFF]/g;function Lr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Ua,""),p=o+c.length,d=t>=o&&t<=p,g=n>=o&&n<=p;if(d){let y=s(u,t-o);y===0&&!g?r.setStartBefore(l):r.setStart(l,y)}g&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(Ad(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;Ld(l)&&u&&!Ld(u)&&!Ad(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function za(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,g=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let y=p.textContent;d&&(a=u+y.substring(0,r).replace(Ua,"").length),g&&(l=u+y.substring(0,i).replace(Ua,"").length),u+=y.replace(Ua,"").length;break}case Node.ELEMENT_NODE:{let y=p.nextSibling===null;Ad(p)&&!y&&u++;for(let v=0;v<p.childNodes.length;v++){let m=d&&v===r,h=g&&v===i;if(m&&(a=u),h&&(l=u),l!==void 0||((!m||!s)&&c(p.childNodes[v]),g&&v===i-1&&(l=u),l!==void 0))break}!g&&Ld(p)&&!y&&u++,g&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Ka(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,g=p?i:void 0,y=u.textContent.replace(Ua,"");d===0&&g===void 0?a+=y:a+=y.substring(d,g);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&Ad(u)&&!d&&(a+=`
|
|
20
|
-
`);for(let g=c?r:0;g<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[g]),s!==1);g++);!p&&s===0&&
|
|
21
|
-
`);break}default:break}p&&s++}return l(e),a}function tC(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var _o=class extends kn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Ka(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!tC(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!tC(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return za(this.element,t);let n=this.lastKnownSelection;if(n&&eC(this.element,n.start,n.end))return n;let r=Ui(this.element);return r.collapse(!1),za(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Ka(this.element,Lr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};function nC(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}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()}},Rh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=nC(t,`${this.targetOrigin}/v2/widget/liveengage/channel.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];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()}},Ih=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",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(),H.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 Rh(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&&(H.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 i,s;H.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(s=(i=this.eventMap)[t])==null||s.call(i,n);let o=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;o==null||o.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)}},rC=Ih;var zi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Lh=e=>new Promise(t=>{setTimeout(t,e)});var Ki=class extends zi{name="ClientError"},Ah=class extends zi{name="ServerError"},Gt=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:g=_=>_.status>=500,version:y="v1",...v}=n,m={credentials:"include",...v,headers:{"Content-Type":"application/json",...v.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(m.headers={...m.headers,"X-CSRFToken":this.csrfToken}),typeof y=="string"&&(m.headers={...m.headers,"X-Deepdesk-API-Version":y});let h=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()=>(h--,a(s,m).then(async _=>g(_)&&!i.isAborted&&h>0?(await Lh(c),x()):_.status===401&&p===!0&&f===!1?(f=!0,await this.refreshToken(),x()):_).catch(async _=>{if(d(_)&&!i.isAborted&&h>0)return await Lh(c),x();throw _}));x().then(_=>_.json().catch(()=>null).then(b=>{_.status>=500?o(new Ah("Server Error",b)):_.status===401?o(new Ki("Unauthorized",b)):_.status===403?o(new Ki("Forbidden",b)):_.status===404?o(new Ki("Not Found",b)):_.status>=400&&o(new Ki("Bad Request",b)),delete this.latestRequestByUrl[s],r(b)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var pA;(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||={})})(pA||={});function Od(e){return{...Z(e),tags:e.tags}}var Un=class e{constructor(t,n={}){this.options=n;this.client=new Gt(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(),H.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...ke(t),tags:t.tags},{version:"v2"});return Od(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return Z(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null});return Z(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return Z(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return Z(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(),H.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 Od(i)}async isConversationSupported(t,n={}){H.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=ke(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Od(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...ke(o),tags:o.tags})),{version:"v2"})).map(o=>Od(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",ke({...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:ke({...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 H.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",ke(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}`,ke(n),{abortLatest:!0})).map(i=>({...Z(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`,ke(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 Z(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",ke(t),{abortLatest:!0});return Z(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,ke(t),{version:"v2"});return Z(n)}async knowledgeAssist(t,n,r){let o=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,ke({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return Z(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return Z(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return Z(t.token)}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 Z(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Py);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&H.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Va=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(jg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,Z(o))}catch{H.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 fA;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(fA||={});var Wa=class{constructor(t,n={}){this.apiUrl=t;this.client=new Gt(t,n)}client;streams={};logger=H;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return Z(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,ke(n));return Z(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,ke(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return Z(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",ke(t));return Z(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Va(`${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 oC={startTime:null,stopTime:null},iC=U({name:"handlingTime",initialState:oC,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(te,()=>oC)}}),{handlingTimeStart:sC,handlingTimeStop:Nd,handlingTimeReset:aC}=iC.actions,lC=iC.reducer;var uC=(e={})=>{let t={onAuthError:Ai(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Md={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var wo=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 Md.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),mA=U({name:"styleSuggestions",initialState:Md,reducers:{},extraReducers:e=>{e.addCase(wo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(wo.rejected,t=>{t.fetchState="error"}).addCase(wo.fulfilled,(t,n)=>{t.fetchState="done",hr(t.list,n.payload)||(t.list=n.payload)}).addCase(no,t=>{t.list=Md.list}).addCase(te,()=>Md)}}),cC=mA.reducer;var dC=(e={})=>{let t,n=!0,r={getStyleSuggestions:wo,debounce:500,...e};return o=>i=>s=>{var g;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(!((g=u.conversation.current)==null?void 0:g.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 gA(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var pC=(e={})=>{let t={getTextSuggestions:Vt,getAutocompleteSuggestions:ba,debounce:200,check:Fi,...e},n;return r=>o=>i=>{var v;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=(v=l.conversation.current)==null?void 0:v.id,d=i.type===od.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:g}}=l;return gA(g,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let m=Si(l);m===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(m))},d?0:t.debounce)),a}};var fC=wo.fulfilled.toString();function hA(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 mC=e=>t=>n=>r=>{var u;if(r.type!==fC){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=hA(o,s);r.type===fC&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var yA=Pu({activeSuggestion:Lw,answer:b1,auth:Vw,autoflows:gb,conversation:Qx,contentTypes:i1,customMessages:Cb,passwordlessToken:Pb,entities:u1,knowledgeAssistant:x1,handlingTime:lC,info:sw,input:tg.reducer,overlayInput:nt.reducer,settings:Ux,profile:T1,search:pw,summary:g1,styleSuggestions:cC,ui:Mw,textSuggestions:Tw});function gC(e){return q0({reducer:yA,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),uC(),pC({debounce:200}),dC({debounce:500}),mC(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var vA=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},SA=e=>t=>n=>r=>{var a;let o=t.getState(),i=Xm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=rd(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 Ai.toString():{!r.payload&&e.emit("logout",void 0);break}case Bt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:vA(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case pc.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 ia.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case hc.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 $t.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case On.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case Be.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 fc.toString():e.handleKeyDown(r.payload);break;case no.toString():e.logSendMessage(r.payload);break;case mc.toString():e.logSendEditSuggestionMessage(r.payload);break;case gc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case no.toString():e.handleAfterSendMessage(r.payload);break;case Ca.toString():e.onUpdateShowTabHint(r.payload);break;case Nd.toString():e.logHandlingTime();break;case Bt.toString():{i&&(t.dispatch(on([])),t.dispatch(wn()));break}case on.toString():{i&&r.payload.length>0&&t.dispatch(vr(0));break}default:break}return s},hC=SA;function Oh(e){return e.toISOString().replace("T"," ").replace("Z","")}function yC(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:Oh(n),timeStop:Oh(r)}}function Nh(e,t,n){var E,I,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:g,textSuggestions:y,offeredTextSuggestions:v}}=t[e],m=r.length,f=y.reduce((K,{text:D,searchTerm:B})=>K+D.length-(B?B.length:0),0),x=u??Date.now(),_=(Date.now()-x)/1e3+(c||0),b=o/_,C=y.reduce((K,{searchTerm:D})=>K+(D?D.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:g,lenTextTyped:o+C,lenTextTotal:m,lenTextAssisted:f,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:b,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(K=>K.source==="gpt").length}],agentId:(E=t.info.agentInfo)==null?void 0:E.agentId,agentName:(I=t.info.agentInfo)==null?void 0:I.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function Mh(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return Mh(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?Mh(o,t):null}function vC(e,t){return Mh(e,t)}function SC(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function xA(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Dd(e){return xA(e)&&(Pr(e)||Bc(e))}var xC=(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{H.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function _A(e){return e.offsetParent!==null}function _C(e){if(!_A(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 Fd(e,t,n=100){let r=_C(e);t({isVisible:r});let o=setInterval(()=>{let i=_C(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var EC=S(q());var jd=S(w()),wC=({className:e})=>(0,jd.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,jd.jsx)("g",{children:(0,jd.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||CR)();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(_R)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,T_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==E_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Dc[l]||Dc[s];if(!this.isSafe(t)||!l.match(wR)&&(!n&&(!u||u===yg)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===Sr?c=!0:u===oo?c=Number.parseFloat(String(c)):u!==Mc&&(c=String(c)),r[vg[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 ga[t]?{...n,...ga[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===E_){let d=c.nodeName.toLowerCase(),g=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let v;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let f=this.keyIndex;v=this.parseNode(y,g);let h=s(y,v,g);if(h===null)return;if(typeof h<"u"){l.push(so.default.cloneElement(h,{key:f}));return}this.keyIndex=f-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,g))){var p;this.keyIndex+=1;let f=this.extractAttributes(y),h={tagName:d};f&&(h.attributes=f),g.void&&(h.selfClose=g.void),l.push(so.default.createElement(Fc,{...h,key:this.keyIndex},(p=v)!==null&&p!==void 0?p:this.parseNode(y,g)))}else l=[...l,...this.parseNode(y,g.tagName?g:n)]}else if(c.nodeType===xR){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(bR);){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],g;if(u)g=s.length,r.push(p.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));g=y.index+y[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(g)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function ER(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 g=new jc(i??"",e).parse();g.length>0&&(d=g)}return d||(d=s),p?so.default.createElement(so.default.Fragment,null,d):so.default.createElement(Fc,{attributes:n,className:r,tagName:c},d)}function En(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,...g}=e,y=i?[]:l,v=o?[]:a,f=c?[c]:[],h=u?[u]:[];y.forEach(b=>{b.onBeforeParse&&f.push(b.onBeforeParse.bind(b)),b.onAfterParse&&h.push(b.onAfterParse.bind(b))});let m=f.reduce((b,C)=>C(b,e),r??""),x=new jc(m,g,y,v),_=h.reduce((b,C)=>C(b,e),x.parse());return so.default.createElement(ER,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var Ig=S(q());var xg={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 P_=S(q());var wi=S(O());function k_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Bc(e){let t=(0,wi.useRef)(null),[n,r]=(0,wi.useState)(!1);return(0,wi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=k_((c,p)=>{let d=t.current;if(!d)return;let g=c/i,y=p/i,v=d.getBoundingClientRect(),f=g>v.x&&g<v.x+v.width&&y>v.y&&y<v.y+v.height;f&&!o?(o=!0,r(!0)):!f&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=k_(()=>{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 Tn={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 _g=S(w()),TR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Tn),[r,o]=Bc(e);return(0,_g.jsx)("mark",{ref:r,className:(0,P_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},bi=class extends bn{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,_g.jsx)(TR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Ci=S(O());function Hc(e){return e.contentEditable==="true"}function kR(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 R_(e){let{selectionStart:t,selectionEnd:n}=Hc(e)?kR(e):e;return[t,n]}function Uc(e){let[,t]=(0,Ci.useState)(),n=(0,Ci.useRef)(null);return n.current=R_(e),(0,Ci.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=R_(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 zc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Io);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 I_=S(O());function Ei(e){(0,I_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ao(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var L_,sn=new Map,PR=["bottom","height","left","right","top","width"],RR=(e={},t={})=>PR.some(n=>e[n]!==t[n]);function A_(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...A_(t)]:[]}function O_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var Kc=!1,N_=()=>{Kc=!0;let e=[];if(sn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),sn.delete(n);return}let r=n.getBoundingClientRect();RR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(O_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),sn.size===0){Kc=!1;return}L_=window.requestAnimationFrame(N_)};function wg(e,t){let n=A_(e),r=[],o=n.map((i,s)=>wg(i,a=>{r[s]=a;let l=sn.get(e);if(!l)return;let u=r.reduce(O_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),sn.has(e)){let s=sn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else sn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!Kc&&N_()},unobserve(){o.forEach(s=>s.unobserve());let i=sn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||sn.delete(e),sn.size||(cancelAnimationFrame(L_),Kc=!1)}}}}var M_,an=new Map,D_=()=>{an.forEach((e,t)=>{if(!t.isConnected){an.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),an.size!==0&&(M_=window.requestAnimationFrame(D_))};function F_(e,t){return{observe(){let n=an.size===0;an.has(e)?an.get(e).callbacks.push(t):an.set(e,{visible:void 0,callbacks:[t]}),n&&D_()},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(M_)}}}}var bg=["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 Cg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function Ti(e){return parseFloat(e)}function Vc(e){return Math.round(e*1e6)}function j_(e){return e/1e6}function Eg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=Ti(e.width),i=Ti(e.borderLeftWidth),s=Ti(e.borderRightWidth),a=Ti(e.paddingRight),l=j_(Vc(o)-Vc(i)-Vc(s)),u=j_(Vc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function lo(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ao(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};Cg(r,n,bg),Eg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=F_(e,()=>{Cg(r,n,bg),Eg(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=wg(e,p=>{if(p===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),p.height===0&&p.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(Cg(r,n,bg),Eg(r,e,n),i(),n.style.top=`${p.top}px`,n.style.left=`${p.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),g=window.getComputedStyle(t.closestScrollElement),y=Ti(g.borderTopWidth),v=Ti(g.borderBottomWidth),f=d.top+y-p.top,h=p.top+p.height+-(d.top+d.height-v);n.style.clipPath=`inset(${f}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var Tg={};Pe(Tg,{enUS:()=>IR,nlNL:()=>LR});var IR={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"}]},LR={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 ha=S(w()),B_=()=>(0,ha.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ha.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ha.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 kg=S(w()),H_=()=>(0,kg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,kg.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 U_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(U_||{}),kn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();hr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(U_).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)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Pn=class extends kn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var AR=/[.*+?^${}()|[\]\\]/g,OR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function NR(e){return e.replace(AR,"\\$&")}function MR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function DR(e){return e.search(OR)}function z_(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${NR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function K_(e){return e.replace(Io,'<mark data-type="placeholder">$1</mark>')}function ki(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function FR(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 Pg(e,t,n={}){if(t){let r=MR(t.toLowerCase(),e.toLowerCase()),o=ki(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=DR(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ty).length>3||t.length>30?FR(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ki(e.substring(s,r))}`}<strong>${o}</strong>`}return e}function Rg(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function Wc(e){if(Rg(e)){let n=/<body[^>]*>([\s\S]*)<\/body>/gi.exec(e);return n?n[1]:""}return e}var ze=S(w()),jR=({value:e,onUse:t,...n})=>{var p;let r=j(Tg),o=z(),i=Rg(e),s=k("EditSuggestionTextInput",xg),[a,l]=(0,It.useState)(null),u=(0,It.useRef)(null),c=((p=e.match(Io))==null?void 0:p.length)||0;return(0,It.useEffect)(()=>{let d;return u.current&&(l(u.current),d=new Pn(u.current),d.on("change",({plainText:g})=>{o(nt.actions.userInput({text:g,selection:d.getSelection()}))}),d.on("keydown",g=>{o(nt.actions.registerKeyDown(dc(g))),g.code==="Enter"&&g.shiftKey&&t(d.getText())}),d.on("paste",({pastedText:g,selectionText:y})=>{o(nt.actions.registerPaste({text:g,selectionText:y}))}),d.on("cut",({selectionText:g})=>{o(nt.actions.registerCut(g))})),()=>{o(nt.actions.reset()),d.dispose(),d.deactivate()}},[u]),(0,It.useEffect)(()=>{e&&u.current&&(u.current.value=e)},[e,u]),(0,It.useEffect)(()=>{u.current&&setTimeout(()=>{if(!u.current)return;let d=u.current.value.length;u.current.setSelectionRange(d,d),u.current.focus()},0)},[u]),i?(0,ze.jsx)("div",{className:s.textInputWrapper,children:(0,ze.jsx)(En,{className:s.textInput,tagName:"div",content:e})}):(0,ze.jsxs)("div",{className:s.textInputWrapper,children:[(0,ze.jsx)("textarea",{...n,ref:u,"data-testid":"edit-suggestion-dialog-textarea",className:s.textInput,defaultValue:e,onChange:()=>{}}),a&&(0,ze.jsx)(BR,{inputElement:u.current,value:e}),(0,ze.jsxs)("div",{className:(0,Ig.default)(s.alert,c===0?s.success:s.warning),children:[(0,ze.jsx)("div",{className:s.alertText,children:r("placeholders",{placeholderSize:c})}),c===0?(0,ze.jsx)(B_,{}):(0,ze.jsx)(H_,{})]})]})},BR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",xg),r=(0,It.useRef)(null),o=Uc(e);return(0,It.useEffect)(()=>{zc(e,o)},[o,e]),(0,ze.jsx)(HR,{inputElement:e,children:(0,ze.jsxs)("div",{ref:r,className:(0,Ig.default)(n.root,n.agentText),children:[(0,ze.jsx)(En,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new bi("placeholders")],inputElement:e,boundaryRef:r}),(0,ze.jsx)("br",{})]})})},HR=({inputElement:e,children:t})=>{let n=(0,It.useRef)(null);return(0,It.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=lo(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,ze.jsx)("div",{ref:n,children:t})},V_=jR;var Ii=S(O());var W_=S(O()),$c=S(q());var rt={root:"_root_pc5uy_1",list:"_list_pc5uy_2",listWrapper:"_listWrapper_pc5uy_6",listHorizontal:"_listHorizontal_pc5uy_10",page:"_page_pc5uy_19",search:"_search_pc5uy_25",pageNav:"_pageNav_pc5uy_33",pageTitle:"_pageTitle_pc5uy_41",pageBackButton:"_pageBackButton_pc5uy_48",listHeading:"_listHeading_pc5uy_62",listItem:"_listItem_pc5uy_70",listItemContent:"_listItemContent_pc5uy_79",listItemText:"_listItemText_pc5uy_97",listItemDescription:"_listItemDescription_pc5uy_105",listItemActions:"_listItemActions_pc5uy_112",truncate:"_truncate_pc5uy_123",lineClamp:"_lineClamp_pc5uy_129",listItemTitle:"_listItemTitle_pc5uy_136",listItemAction:"_listItemAction_pc5uy_112",listItemPrimaryAction:"_listItemPrimaryAction_pc5uy_157",listItemSelected:"_listItemSelected_pc5uy_162",sources:"_sources_pc5uy_166",sourcesTitle:"_sourcesTitle_pc5uy_173",source:"_source_pc5uy_166",icon:"_icon_pc5uy_188",searchIcon:"_searchIcon_pc5uy_205",searchInputWrapper:"_searchInputWrapper_pc5uy_210",searchInput:"_searchInput_pc5uy_210",select:"_select_pc5uy_231",selectType:"_selectType_pc5uy_248",selectWrapper:"_selectWrapper_pc5uy_252",image:"_image_pc5uy_282",imageSrc:"_imageSrc_pc5uy_289",imageSrcHidden:"_imageSrcHidden_pc5uy_300",imageSrcStatus:"_imageSrcStatus_pc5uy_304",imageTitle:"_imageTitle_pc5uy_314",actions:"_actions_pc5uy_319",actionsWrapper:"_actionsWrapper_pc5uy_323",actionsBar:"_actionsBar_pc5uy_329",actionButton:"_actionButton_pc5uy_338",actionShortcut:"_actionShortcut_pc5uy_356",actionShortcutFixKerning:"_actionShortcutFixKerning_pc5uy_363"};var uo={};Pe(uo,{enUS:()=>UR,nlNL:()=>zR});var UR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},zR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var xr=S(w()),KR=({src:e,title:t})=>{let n=k("CommandPalette",rt),[r,o]=(0,W_.useState)("loading"),i=j(uo);return(0,xr.jsxs)("div",{className:n.image,children:[(0,xr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,$c.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,xr.jsx)("span",{className:(0,$c.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,xr.jsx)("span",{className:(0,$c.default)(n.imageSrc,n.imageSrcStatus),children:(0,xr.jsx)(tl,{})}),t&&(0,xr.jsx)("span",{className:n.imageTitle,children:t})]})},$_=KR;var q_=S(O()),G_=S(q());var ya=S(w());function Lg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",rt);return q_.default.Children.count(e)===0?null:(0,ya.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ya.jsx)("h4",{className:r.listHeading,children:t}),(0,ya.jsx)("div",{className:(0,G_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var va=S(q());var qc=S(O()),Y_=S(w()),X_=qc.default.createContext(void 0);function _r(){let e=qc.default.useContext(X_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var Q_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=qc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,Y_.jsx)(X_.Provider,{value:s,children:e})};var Ae=S(O()),Z_=S(q());var Ag={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var co=S(w()),VR=0,J_=Ae.default.createContext(null),WR=()=>{let e=(0,Ae.useContext)(J_);if(!e)throw new Error("Invalid DropdownContext");return e},ew=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ae.useMemo)(()=>++VR,[]),o=(0,Ae.useRef)(null),i=(0,Ae.useRef)(null),s=k("Dropdown",Ag),[a,l]=(0,Ae.useState)(!1),[u,c]=(0,Ae.useState)(n),p=g=>{g.preventDefault(),g.stopPropagation(),l(!a)},d=(0,Ae.useCallback)(([g])=>{!g.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ae.useEffect)(()=>{let g=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}},[]),(0,Ae.useEffect)(()=>{if(!i.current&&!a)return()=>{};let g=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&g.observe(i.current),()=>{i.current&&g.unobserve(i.current)}},[i,a]),(0,co.jsx)(J_.Provider,{value:{setIsOpen:l},children:(0,co.jsxs)("div",{ref:o,className:s.root,children:[(0,co.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,co.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,Z_.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function $R({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",Ag),{setIsOpen:s}=WR(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,co.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}ew.Item=$R;var Og=ew;var Ng=S(w()),tw=e=>(0,Ng.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Ng.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var po={};Pe(po,{enUS:()=>qR,nlNL:()=>GR});var qR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},GR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Gc=S(w()),XR="%0d%0a%0d%0a%0d%0a",QR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(XR)}`},YR=({suggestion:e,onFeedback:t})=>{let n=j(po),r=N("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Gc.jsx)(Og,{trigger:(0,Gc.jsx)(tw,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Gc.jsx)(Og.Item,{as:"a",href:QR(r,e),onClick:t,children:n("giveFeedback")})})},Xc=YR;var dt=S(w());function Mg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,index:s,description:a,sources:l,styles:u,...c}){let{selected:p,setSelected:d,onChangeOpen:g}=_r(),y=k("CommandPalette",rt);function v(f){r(f),e&&g(!1)}return(0,dt.jsxs)("div",{className:(0,va.default)(y.listItem,p===s&&y.listItemSelected),children:[(0,dt.jsx)("button",{onMouseEnter:()=>d(s),type:"button",className:(0,va.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:(0,dt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,dt.jsx)("p",{className:(0,va.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,dt.jsx)(En,{tagName:"p",allowList:[],content:Wc(a),className:(0,va.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate)})]})}),o&&p===s&&(0,dt.jsx)("div",{className:y.listItemActions,children:(0,dt.jsx)(Xc,{suggestion:String(n),onFeedback:o})}),l&&(0,dt.jsxs)("div",{className:y.sources,children:[(0,dt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(f=>f.url?(0,dt.jsx)("a",{className:y.source,href:f.url,target:"_blank",title:f.url,rel:"noopener noreferrer",onClick:()=>i&&i(f),children:f.name},f.url):(0,dt.jsx)("span",{className:y.source,children:f.name},f.name))]})]})}var fo=S(w());function Dg({children:e,title:t,id:n,onDismiss:r}){let o=j(uo),i=k("CommandPalette",rt),{page:s}=_r();return s!==n?null:(0,fo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,fo.jsxs)("div",{className:i.pageNav,children:[(0,fo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,fo.jsx)(Lc,{}),o("back")]}),t&&(0,fo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wr=S(O());var Qc=()=>/Mac/i.test(navigator.platform);var ZR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},B=ZR;function JR(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function Z(e){return Array.isArray(e)?e.map(Z):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[JR(n)]:Z(e[n])}),{}):e}function Fg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function ke(e){return Array.isArray(e)?e.map(ke):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Fg(n)]:ke(e[n])}),{}):e}var eI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},xa=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)||""}},Sa=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?Z(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),Z(r))}),jg=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}),Bg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),nw=e=>e.info.agentInfo,rw=U({name:"info",initialState:eI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Sa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Sa.rejected,t=>{t.fetchState="error"}).addCase(Sa.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(jg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Bg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(te,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:ow}=rw.actions,iw=rw.reducer;var Yc={list:[],fetchState:"idle",isOpen:!1,page:"search"},sw=e=>e.search.isOpen,aw=e=>e.search.page,lw=e=>e.search.list;function uw(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var mo=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:xa(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),cw=U({name:"search",initialState:Yc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Yc.fetchState,e.list=Yc.list}},extraReducers:e=>{e.addCase(mo.pending,t=>{t.fetchState="loading"}).addCase(mo.rejected,(t,n)=>{t.fetchState="error",B.error(n.error)}).addCase(mo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(te,()=>Yc)}}),{resetSearch:Zc,setIsOpen:$e,setPage:qe}=cw.actions,dw=cw.reducer;var tI=/(https?:\/\/[^\s]+)/,Jc=e=>e.split(" ").find(t=>tI.test(t));var Hg=S(q());var ed=S(w()),nI=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",rt);return(0,ed.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Hg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,ed.jsx)("span",{className:(0,Hg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},Pi=nI;var Rn=S(w()),rI=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",rt),a=j(uo),{selected:l,setSelected:u}=_r(),c=i[l],p=c&&typeof c.text=="string"&&Jc(c.text),d=(0,wr.useRef)(null);function g(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),b=0,C=0;x==="down"?(_.forEach((I,P)=>{P===l&&(b=P)}),C=b===_.length-1?0:b+1):x==="up"?(_.forEach((I,P)=>{P===l&&(b=P)}),C=b?b-1:_.length-1):u(0);let E=_[C];E&&typeof C=="number"&&(u(C),E.scrollIntoView&&E.scrollIntoView({behavior:"smooth",block:C?"center":"end"}))}function y(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((C,E)=>{E===l&&(_=E)});let b=x[_];b&&b.click()}let v=()=>{p&&window.open(p,"_blank")},f=()=>{c&&r(c,l)},h=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},m=(0,wr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&p){v();return}if(x.key==="Enter"&&x.shiftKey){h();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),g("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),g("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),y())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",m),()=>{window.removeEventListener("keyup",m)}),[m]),(0,Rn.jsxs)("div",{className:s.actions,children:[(0,Rn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,Rn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,Rn.jsx)(Pi,{onClick:v,shortKeys:[Qc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,Rn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,Rn.jsx)(Pi,{onClick:h,shortKeys:[8679,8629],children:n}),(0,Rn.jsx)(Pi,{onClick:f,shortKeys:[8629],children:t})]})]})]})},fw=rI;var mw=S(O());var _a=S(w()),Ri=()=>(0,_a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,_a.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,_a.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 Kt=S(w());function oI({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",rt);return(0,Kt.jsxs)("div",{className:l.search,children:[(0,Kt.jsx)("div",{className:l.searchIcon,children:(0,Kt.jsx)(Ri,{})}),(0,Kt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Kt.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,Kt.jsx)("div",{className:l.selectWrapper,children:(0,Kt.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,Kt.jsx)("option",{children:r}),o.map(u=>(0,Kt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var gw=(0,mw.forwardRef)(oI);var wa=S(w());function go({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[g,y]=(0,Ii.useState)(0),v=(0,Ii.useRef)(null),f=()=>{o&&o(n),s(void 0),i(""),a(!1)},h=()=>{var m;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(m=v.current)==null||m.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Ii.useEffect)(()=>{y(0)},[d,r]),(0,wa.jsx)(_i,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:h,onClose:f,children:(0,wa.jsxs)(Q_,{selected:g,setSelected:y,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,wa.jsx)(gw,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}go.Page=Dg;go.List=Lg;go.Image=$_;go.ListItem=Mg;go.ActionsBar=fw;go.Button=Pi;var $=go;var Ke=S(w()),iI=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",d_),l=z(),u=j(rg),c=R(y=>y.overlayInput.text);(0,Ug.useEffect)(()=>{e&&(l(nt.actions.reset()),l(nt.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(nt.actions.commitSuggestion()))},[e]);let p=y=>{y.preventDefault(),d(c)},d=y=>{l(mc(y)),t(y)},g=y=>v=>{c!==s?window.confirm(u("warning"))&&y(v):y(v)};return(0,Ug.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Ke.jsxs)("div",{className:a.root,children:[(0,Ke.jsxs)("div",{className:a.content,children:[e.title&&(0,Ke.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Ke.jsx)(Xd,{labels:e.searchKeywords}),(0,Ke.jsx)(V_,{onUse:d,value:Wc(c)})]}),(0,Ke.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&g(i),children:(0,Ke.jsx)(Lc,{})}),(0,Ke.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&g(o),children:(0,Ke.jsx)(__,{})})]}),(0,Ke.jsxs)("div",{className:a.primaryButtons,children:[(0,Ke.jsx)($.Button,{onClick:g(n),shortKeys:["esc"],children:u("dismiss")}),(0,Ke.jsx)($.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},td=iI;var sI=["{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}"],aI=new RegExp(sI.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function hw(e,t){let n=e.split(aI),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 yw(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var Sw={suggestions:[],fetchState:"idle",isInitialRequest:null},vw={default:Sw},nd=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},xw=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")},br=e=>e.textSuggestions,_w=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},rd=fe("textSuggestions/refresh"),Vt=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=Si(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,xa(r),e);if(e==="default"){let c=s?l.filter(_w(a)):l;t.dispatch(on(c.slice(0,i)))}return l}),ba=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,{...xa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(_w(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?hw(c.text,e):c.text}))),l=yw(l,i),t.dispatch(on(l)),l}),ww=U({name:"textSuggestions",initialState:vw,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(Vt.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||Sw;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Vt.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Vt.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(ba.pending,t=>{t.default.fetchState="loading"}).addCase(ba.rejected,t=>{t.default.fetchState="error"}).addCase(ba.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(te,()=>vw)}}),{setTextSuggestions:bw,setSuggestionState:Cw}=ww.actions,Ew=ww.reducer;var Tw={contentType:null,suggestion:null},kw=e=>e.activeSuggestion.suggestion,Pw=e=>e.activeSuggestion.contentType,Rw=U({name:"activeSuggestion",initialState:Tw,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(te,()=>Tw)}}),{setActiveSuggestion:In,resetActiveSuggestion:zg}=Rw.actions,Iw=Rw.reducer;var Kg={};Pe(Kg,{enUS:()=>lI,nlNL:()=>uI});var lI={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"}]},uI={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 cI={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var od=({ui:e})=>e.overlayCollapsed;var Lw=U({name:"ui",initialState:cI,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:Ca,setInputHasFocus:Li,setOverlayCollapsed:Cr,setOpenOverlayWhenTyping:Aw,setOverlayCollapsedUserOverwrite:Ow}=Lw.actions,Nw=Lw.reducer;var Ea=S(O()),Dw=S(w()),Mw=Ea.default.createContext(null),ho=({broadcastEvents:e,children:t})=>{let n=Ea.default.useMemo(()=>e,[]);return(0,Dw.jsx)(Mw.Provider,{value:n,children:t})},Lt=()=>{let e=(0,Ea.useContext)(Mw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var dI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},pt=e=>e.auth.isLoggedIn,Fw=e=>e.auth.loginFetchState,jw=e=>e.auth.verifyFetchState,Bw=e=>e.auth.showLoginOverlay,Ln=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Hw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ta=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Uw=U({name:"auth",initialState:dI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Ln.pending,t=>{t.loginFetchState="loading"}),e.addCase(Ln.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Ln.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ta.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ta.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ta.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ai,setShowLoginOverlay:zw}=Uw.actions,Kw=Uw.reducer;var Vg="SetActiveSuggestion",Oi="ShowLoginOverlay",ka="UserLoggedIn",pI="UserLoggedOut",An="ApplySuggestion",Wg="ApplyImageSuggestion",fI="ShowCommandPalette",mI=e=>({[Vg]:t=>{e.dispatch(Cw(t.state)),e.dispatch(In({contentType:t.contentType,suggestion:t.suggestion}))},[fI]:t=>{e.dispatch($e(t.isOpen)),t.page&&e.dispatch(qe(t.page))},[Oi]:t=>{e.dispatch(zw(t))},[ka]:()=>{e.dispatch(Ln())},[pI]:()=>{e.dispatch(Ln())},[Wg]:t=>{e.dispatch(hc({suggestion:t.suggestion}))},[An]:t=>{e.dispatch(Ht({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(wn())}}),Vw=mI;var $g=S(w()),gI=()=>{var y;let[e,t]=(0,Ww.useState)(!1),n=R(kw),r=R(Pw),o=R(br),i=z(),s=Lt(),a=j(Kg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(zg()),i(Li(!0)),i(nt.actions.reset())},c=(v,f)=>{i(zg()),i(Li(!0)),s.send(An,{text:v,suggestion:{...f,source:`${f.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let p=(y=o[r])==null?void 0:y.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p-1]})),g=p===o[r].suggestions.length-1||p===null?void 0:()=>i(In({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,$g.jsx)(_i,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,$g.jsx)(td,{onTouched:t,onDismiss:u,onUse:v=>c(v,n),suggestion:n,onNext:g,onPrevious:d})})},$w=gI;var id=S(q()),Wt=S(O());var Gw=S(q());var qw={root:"_root_1ukx5_1"};var Xw=S(w()),hI=({className:e,value:t,...n})=>{let r=k("TextInput",qw);return(0,Xw.jsx)("input",{className:(0,Gw.default)(e,r.root),type:"text",value:t,...n})},Pa=hI;var qg={};Pe(qg,{enUS:()=>yI,nlNL:()=>vI});var yI={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"}]},vI={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 Qw={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var ye=S(w());var SI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},xI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(qg),s=k("LoginTokenDialog",Qw),a=R(jw),l=z(),u=N("productName"),[c,p]=(0,Wt.useState)(e||""),[d,g]=(0,Wt.useState)(0),[y,v]=(0,Wt.useState)(""),f=(0,Wt.useCallback)(async _=>{_.preventDefault(),l(Hw({email:c})),g(1)},[n,c]),h=()=>{v(""),g(0)},m=(0,Wt.useCallback)(async _=>{_.preventDefault();let b=SI(_.target.elements.token.value);if(!b){v(i("verifyCodeError",{login:x}));return}l(Ta({token:b}))},[n]),x=(0,Wt.useMemo)(()=>_=>(0,ye.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:h,children:_},"back-button"),[]);return(0,Wt.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,ye.jsx)(_i,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ye.jsxs)("div",{className:s.root,children:[(0,ye.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ye.jsxs)("form",{onSubmit:f,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ye.jsx)(Pa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,ye.jsx)("div",{className:s.actions,children:(0,ye.jsx)("button",{type:"submit",className:(0,id.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ye.jsxs)("form",{onSubmit:m,children:[(0,ye.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ye.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ye.jsx)(Pa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,ye.jsx)("div",{className:s.errorMessage,children:y}),(0,ye.jsxs)("div",{className:s.actions,children:[(0,ye.jsx)("button",{type:"button",className:(0,id.default)(s.button),onClick:h,children:i("back")}),(0,ye.jsx)("button",{type:"submit",className:(0,id.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Yw=xI;var Jw=S(w()),_I=()=>{let e=R(Bw),t=R(nw),n=N("adminUrl"),r=Lt(),o=()=>r.send(Oi,!1),i=()=>{r.send(Oi,!1),r.send(ka)};return(0,Jw.jsx)(Yw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Zw=_I;var R1=S(Qg()),Ge=S(O());var BI={data:null,fetchState:"idle"},r1=e=>e.contentTypes.data,Ra=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),HI=U({name:"contentTypes",initialState:BI,reducers:{},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),o1=HI.reducer;function Ia(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 i1=S(O());function s1(e,t){(0,i1.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 La=S(O());var a1={data:null,fetchState:"idle"},sd=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},$t=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)}),UI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),zI=U({name:"entities",initialState:a1,reducers:{},extraReducers:e=>{e.addCase($t.pending,t=>{t.fetchState="loading"}).addCase($t.rejected,t=>{t.fetchState="error"}).addCase($t.fulfilled,(t,n)=>{t.fetchState="done",t.data=UI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(te,()=>a1)}}),l1=zI.reducer;var Yg={};Pe(Yg,{enUS:()=>KI,nlNL:()=>VI});var KI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},VI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var u1={root:"_root_17kae_1",empty:"_empty_17kae_5"};var yo=S(w()),WI=({onCopy:e,onUse:t})=>{let n=(0,La.useRef)(null),r=k("EntitiesList",u1),o=j(Yg),i=R(sd),s=z();return(0,La.useEffect)(()=>{s($t())},[]),(0,La.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,yo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,yo.jsx)($.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,yo.jsx)($.List,{children:i.map((a,l)=>(0,yo.jsx)($.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,yo.jsx)("p",{className:r.empty,children:o("noResults")})]})},c1=WI;var qt=S(O());var d1={data:null,fetchState:"idle"},p1=e=>e.summary.data,f1=e=>e.summary.fetchState==="error",On=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 a?{summary:a}:Promise.reject(new Error("Summary is not provided"))}),$I=U({name:"summary",initialState:d1,reducers:{},extraReducers:e=>{e.addCase(On.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(On.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(On.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(te,()=>d1)}}),m1=$I.reducer;var Zg={};Pe(Zg,{enUS:()=>qI,nlNL:()=>GI});var qI={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."}]},GI={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 g1={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 Nn=S(w()),XI=({onCopy:e})=>{let t=(0,qt.useRef)(null),n=k("SummaryForm",g1),[r,o]=(0,qt.useState)(""),i=j(Zg),s=R(p1),a=R(f1),l=z(),u=()=>{l(He({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(He({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,qt.useEffect)(()=>{l(On())},[]),(0,qt.useEffect)(()=>{o(s||"")},[s]),(0,qt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,qt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Nn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Nn.jsx)("p",{className:n.error,children:i("error")}):(0,Nn.jsxs)(qt.Fragment,{children:[(0,Nn.jsx)("div",{className:n.main,children:(0,Nn.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,Nn.jsx)("div",{className:n.actions,children:(0,Nn.jsx)($.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},h1=XI;var Aa={};Pe(Aa,{enUS:()=>QI,nlNL:()=>YI});var QI={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?"}]},YI={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Er=S(O());var Jg={};Pe(Jg,{enUS:()=>ZI,nlNL:()=>JI});var ZI={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"}]},JI={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 y1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var eL={data:null,fetchState:"idle"},v1=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},Oa=M("knowledgeAssistant/getKnoeledgeAssistant",async(e,t)=>{var s;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");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),tL=U({name:"knowledgeAssistant",initialState:eL,reducers:{},extraReducers:e=>{e.addCase(Oa.pending,t=>{t.fetchState="loading"}).addCase(Oa.rejected,t=>{t.fetchState="error"}).addCase(Oa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),S1=tL.reducer;var eh={data:[],fetchState:"idle"},x1=e=>{var t;return(t=e.answer)==null?void 0:t.data},_1=e=>e.answer.fetchState,Mi=fe("answer/resetKnowledgeSearch"),Ni=M("answer/getAnswer",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=v1(t.getState());if(!o)throw new Error("KnowledgeAssistant is not defined");let i=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code);return{question:e,answer:i}}),nL=U({name:"answer",initialState:eh,reducers:{},extraReducers:e=>{e.addCase(Ni.pending,t=>{t.fetchState="loading"}).addCase(Ni.rejected,t=>{t.fetchState="error"}).addCase(Ni.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(te,()=>eh).addCase(Mi,()=>eh)}}),w1=nL.reducer;var Na=S(w()),b1=()=>(0,Na.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Na.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Na.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 ot=S(w()),rL=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Er.default.useState(""),{setSelected:i}=_r(),s=(0,Er.useRef)(null),a=k("EntitiesList",y1),l=j(Jg),u=z(),c=R(x1),p=R(_1),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Ni(r))},g=(y,v)=>{u(He({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Er.useEffect)(()=>{var y;n&&p==="idle"?u(Ni(n)):(y=s.current)==null||y.focus()},[s,p]),(0,Er.useEffect)(()=>{p==="done"&&(u(He({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(c.length-1),o(""))},[p,c]),(0,Er.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,ot.jsxs)("div",{className:a.root,children:[c.length>0&&(0,ot.jsx)("div",{className:a.alignRight,children:(0,ot.jsx)($.Button,{onClick:t,children:l("reset")})}),(0,ot.jsxs)($.ActionsBar,{list:c.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:l("use"),onPrimary:y=>e(y.text),children:[c.map(({question:y,answer:v},f)=>(0,ot.jsx)($.List,{children:(0,ot.jsx)($.ListItem,{"data-testid":"knowledge-search-answer",index:f,description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:h=>g(h,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${f}`)),p==="loading"&&(0,ot.jsx)("p",{className:a.status,children:l("loading")}),p==="error"&&(0,ot.jsx)("p",{className:a.status,children:l("error")}),(0,ot.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,ot.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(-1)},onChange:y=>{i(-1),o(y.target.value)}}),(0,ot.jsx)("button",{type:"submit",className:a.submit,children:(0,ot.jsx)(b1,{})})]})]})]})},C1=rL;var oL={data:null,fetchState:"idle"},Tr=e=>e.profile.data,ad=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ma=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)}),iL=U({name:"profile",initialState:oL,reducers:{},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.fetchState="loading"}).addCase(Ma.rejected,t=>{t.fetchState="error"}).addCase(Ma.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),E1=iL.reducer;var T1=S(O());var vo=S(w()),sL=({commands:e,onClick:t,onEdit:n})=>{var c,p,d;let r=z(),o=j(Aa),i=R(Tr),s=R(br),a=((d=(p=(c=i==null?void 0:i.uiConfig)==null?void 0:c.search)==null?void 0:p.initialTypes)==null?void 0:d.filter(({isActive:g})=>g))||[],l=0,u=a.map(({type:g})=>{var y;return(y=s[g])==null?void 0:y.suggestions.map(v=>({text:v.text||v.url||v.message,type:g}))}).flat(1);return(0,T1.useEffect)(()=>{a.forEach(({type:g})=>{(!s[g]||s[g].suggestions.length===0)&&r(Vt(g))})},[]),(0,vo.jsxs)($.ActionsBar,{list:[...e.map(g=>({text:g.label,type:"command"})),...u],primaryLabel:o("use"),secondaryLabel:o("preview"),onPrimary:({text:g},y)=>t(g,u[y]),onSecondary:(g,y)=>{n(u[y],s[u[y].type].suggestions)},children:[e.length>0&&(0,vo.jsx)($.List,{heading:o("commands"),children:e.map((g,y)=>(0,vo.jsx)($.ListItem,{index:y,closeOnSelect:!1,onClick:g.onClick,children:g.label},g.label))}),a.map(({type:g,title:y})=>{var v;return(0,vo.jsx)($.List,{heading:y,orientation:"vertical",children:(v=s[g])==null?void 0:v.suggestions.map(f=>(l++,(0,vo.jsx)($.ListItem,{index:l+e.length-1,closeOnSelect:!1,description:f.text,onClick:()=>t(f.text,f),"data-testid":"search-overlay-suggestion",children:f.title},`${f.id}-${f.text}`)))},g)})]})},k1=sL;var _e=S(w()),aL=200,lL=5,uL=4,cL=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),P1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),dL=()=>{let e=z(),t=Lt(),n=j(Aa),[r,o]=(0,Ge.useState)(!1),[i,s]=(0,Ge.useState)(""),a=R(aw),l=R(Tr),[u,c]=(0,Ge.useState)(null),[p,d]=(0,Ge.useState)([]),[g,y]=(0,Ge.useState)(),v=R(pt),f=N("showSearch"),h=N("showEntitiesCommand"),m=N("showSummaryCommand"),x=N("showKnowledgeSearch"),_=N("showImageSearch"),b=N("searchTriggerKey"),C=R(r1),E=R(lw),I=R(sw),P=L=>Co(E.filter(J=>J.type===L.toUpperCase()),L),K=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(L=>L.shouldShow),D=[{label:n("entitiesClipboard"),onClick:()=>e(qe("entities")),shouldShow:h&&P1(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(qe("summary")),shouldShow:m&&P1(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(qe("knowledgeAssist")),shouldShow:x}].filter(L=>L.shouldShow),H=(C==null?void 0:C.map(L=>({value:L.code.toUpperCase(),label:`${L.name}s`,list:P(L.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],be=(0,Ge.useCallback)((0,R1.default)((L,J)=>{e(mo({query:L,type:J,tags:["search-overlay"]}))},aL),[]),Ar=cL([...H,...K]),Ye=(0,Ge.useCallback)((L,J)=>{e(qe("edit")),c({...L,searchTerm:void 0}),d(J)},[e,u,H]),Or=(0,Ge.useCallback)((L,J)=>{switch(J.type){case"IMAGE":t.send(Wg,{suggestion:J});break;default:t.send(An,{text:L,suggestion:J})}e($e(!1))},[e]),Vi=L=>{Ia(L.text),e(He({name:"entity copied",data:{entity:L,type:"copy"}})),e($e(!1))},Nr=(0,Ge.useCallback)(L=>{e(He({name:"suggestion feedback",data:{text:L.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),qa=L=>{t.send(An,{text:L,suggestion:{source:"knowledge-assist",text:L}}),e(He({name:"answer used",data:{originalText:L},options:{includeConversationData:!0}})),s(""),e(qe("search")),e(Mi()),e($e(!1))},Ga=L=>{Ia(L),e($e(!1))},Wi=L=>{t.send(An,{text:L.text,suggestion:{source:"entity",text:L.text}}),e($e(!1))},$i=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Mr=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function Co(L,J){return L.slice(0,g?10:J.toLowerCase()==="image"?uL:lL)}function Bd(L,J,gt){return J.reduce((cn,zn)=>gt&&g===gt?zn.length+cn:Co(zn,gt).length+cn,L)}function Xt(L){return J=>{r?window.confirm(n("warning"))&&(L(J),o(!1)):L(J)}}return(0,Ge.useEffect)(()=>{i?be(i,g):e(Zc())},[i,g]),(0,Ge.useEffect)(()=>{a==="search"&&e(Mi())},[a]),(0,Ge.useEffect)(()=>{v&&e(Ra())},[v]),s1(b,()=>e($e(!0))),!f||!l?null:(0,_e.jsxs)($,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Xt(L=>e($e(L))),onChangeType:L=>y(L),onChangePage:Xt(L=>e(qe(L))),selectedType:g,search:i,page:a,isOpen:I,types:[...H,...K],children:[(0,_e.jsxs)($.Page,{id:"search",children:[i.length===0&&(0,_e.jsx)(k1,{commands:D,onClick:Or,onEdit:Ye}),i.length>0&&(0,_e.jsxs)($.ActionsBar,{list:[...D.map(L=>({text:L.label,type:"command"})),...Ar.map(L=>({text:L.text||L.url||L.message,type:L.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:L},J)=>Or(L,Ar[J]),onSecondary:(L,J)=>{let gt=Ar[J-D.length];!gt||!gt.type||Ye(gt,P(gt.type))},children:[D.length>0&&(0,_e.jsx)($.List,{heading:n("commands"),children:D.map((L,J)=>(0,_e.jsx)($.ListItem,{index:Bd(J,[],"commands"),closeOnSelect:!1,onClick:L.onClick,children:L.label},L.label))}),[...H,...K].map(({value:L,label:J,list:gt,lineClamp:cn,listOrientation:zn},Fh)=>(0,_e.jsx)($.List,{heading:J,orientation:zn==="horizontal"?"horizontal":"vertical",children:Co(gt,L).map((ce,Dr)=>(0,_e.jsx)($.ListItem,{index:Bd(D.length+Dr,[...H,...K].slice(0,Fh).map(({list:NC})=>NC),L),closeOnSelect:!1,lineClamp:cn,onClick:()=>Or(ce.text,ce),description:L!=="IMAGE"?ce.title&&ce.text:void 0,onFeedback:L!=="IMAGE"?()=>Nr(ce):void 0,children:L==="IMAGE"?(0,_e.jsx)($.Image,{title:ce.title||ce.text,src:ce.image}):ce.title||ce.text},`${ce.id}-${ce.text}`))},L))]})]}),(0,_e.jsx)($.Page,{id:"edit",onDismiss:Xt(()=>{e(qe("search")),c(null)}),children:u&&(0,_e.jsx)(td,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(qe("search")),c(null),d([])},onNext:Mr,onPrevious:$i,onUse:L=>{e(qe("search")),Or(L,{...u,source:`${u.source||"text_recommendation"}-preview`}),e($e(!1)),d([]),c(null)}})}),(0,_e.jsx)($.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Xt(()=>{e(qe("search"))}),children:(0,_e.jsx)(c1,{onUse:Wi,onCopy:Vi})}),(0,_e.jsx)($.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Xt(()=>{e(qe("search"))}),children:(0,_e.jsx)(h1,{onCopy:Ga})}),(0,_e.jsx)($.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Xt(()=>{e(Mi()),e(qe("search"))}),children:(0,_e.jsx)(C1,{question:i,onUse:qa,onResetQuestion:()=>{e(Mi()),s("")}})})]})},I1=dL;var Di=S(w()),pL=()=>{let e=N("showSearch"),t=N("isEmbedded");return(0,Di.jsxs)(L1.Fragment,{children:[e&&(0,Di.jsx)(I1,{}),(0,Di.jsx)($w,{}),t&&(0,Di.jsx)(Zw,{})]})},A1=pL;var cd=S(O());function Fi(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 ld=S(O());var ji=S(O());var O1=S(O());function N1(e,t,n){(0,O1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var M1={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var So=S(w()),mL=["search","personal-collection-search","search-autocomplete"];function gL(e,t,n,r={}){let o="";return mL.includes(t)?o=z_(Pg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Pg(e,n,r),r.placeholders===!0&&(o=K_(o)),o}var hL=()=>{},yL=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=N("inlineSuggestions"),i=R(Si),s=z(),a=k("TextSuggestion",M1),l=(0,ji.useRef)(null);(0,ji.useEffect)(()=>{let c=setTimeout(()=>{s(n_({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),N1(l,"click",()=>{s(vr(e)),s(Ht({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,ji.useMemo)(()=>gL(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,So.jsxs)("div",{className:a.root,onMouseEnter:()=>s(vr(e)),children:[(0,So.jsx)(oe,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:hL,children:(0,So.jsx)(En,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,So.jsx)("div",{className:a.actions,children:(0,So.jsx)(Xc,{onFeedback:()=>r(n),suggestion:n.text})})]})},D1=yL;var th=S(w()),vL=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,ld.useMemo)(()=>{let i=t.map((s,a)=>(0,th.jsx)(D1,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,th.jsx)(ld.Fragment,{children:o})},ud=vL;var F1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Da=S(w()),SL=({textSuggestions:e,selectedIndex:t})=>{let n=(0,cd.useRef)(null),r=k("InlineSuggestionsOverlay",F1),o=R(Fi),i=z(),s=R(pt),a=R(vi),l=R(od),u=N("showTextSuggestions");return Ei(()=>{i(Cr({collapse:!0,skipWhenInputFocus:!0}))}),(0,cd.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,Da.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Da.jsx)("div",{ref:n,className:r.paper,children:(0,Da.jsx)(xt,{children:(0,Da.jsx)(ud,{suggestions:e,selectedIndex:t})})})})},xL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),j1=xn(xL)(SL);var pd=S(q()),Bi=S(O());var B1=S(O());function H1(e,t){let[n,r]=(0,B1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return B.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){B.error(s)}}]}var z1=S(q()),Mn=S(O());var nh={};Pe(nh,{enUS:()=>_L,nlNL:()=>wL});var _L={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"}]}]},wL={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 U1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var kr=S(w()),rh=(e,t,n)=>r=>(0,kr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),bL=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=j(nh),s=Lt(),a=k("Login",U1),l=N("productName"),u=(0,Mn.useCallback)(f=>{f.preventDefault(),r&&r(parseInt(f.target.value,10))},[]),c=(0,Mn.useCallback)(f=>{f.preventDefault(),s.send(Oi,!0)},[t]),p=(0,Mn.useMemo)(()=>f=>(0,kr.jsx)("a",{onClick:m=>{m.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:f},"login"),[t]),d=(0,Mn.useCallback)(f=>(0,kr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:f},"prompt"),[c]),{min:g,hour:y,day:v}=(0,Mn.useMemo)(()=>({min:rh(a,60*10,u),hour:rh(a,60*60,u),day:rh(a,60*60*12,u)}),[]);return(0,kr.jsxs)("div",{className:(0,z1.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,kr.jsxs)(Mn.Fragment,{children:[(0,kr.jsx)("br",{}),i("snooze",{min:g,hour:y,day:v})]})]})},dd=bL;var K1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Fa=S(w()),CL=({title:e})=>{let t=k("SearchTrigger",K1),n=z();return(0,Fa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n($e(!0)),children:[(0,Fa.jsx)(Ri,{}),(0,Fa.jsx)("span",{className:t.text,children:e})]})},V1=CL;var oh={};Pe(oh,{enUS:()=>EL,nlNL:()=>TL});var EL={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"}]},TL={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_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=S(w()),kL=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=k("SuggestionsOverlay",W1),o=j(oh),i=R(Fi),s=Yx(),a=z(),l=(0,Bi.useRef)(null),u=N("searchTriggerKey"),c=N("productName"),p=R(od),d=R(pt),g=R(vi),[y,v]=(0,Bi.useState)(null),f=N("showSearch"),h=N("showTextSuggestions"),m=N("adminUrl"),x=N("isEmbedded"),[_,b]=H1("dd-snooze-until-ms",0),C=p||_>Date.now(),E=R(H=>H.input.text),I=e.filter(H=>H.source!=="gpt").length,P=()=>{C&&b(0),a(Ow(!C))},K=H=>{a(He({name:"suggestion feedback",data:{text:H.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},D=H=>{let be=Date.now()+H*1e3;b(be),B.info(`Snooze until: ${new Date(be)}`),a(Cr({collapse:!0}))};return(0,Bi.useEffect)(()=>{I===0&&v(null)},[e,I]),Ei(()=>{a(Cr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||g===!1?null:d===!1?(0,ue.jsxs)("div",{ref:l,className:(0,pd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(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)(Br,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Br,{className:r.toggleButton,title:o("open",{productName:c}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(dd,{loginUrl:m,isEmbedded:x,onLogIn:n,onSnooze:D})})]}):!s||!i?null:(0,ue.jsxs)("div",{ref:l,className:(0,pd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:f&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(Qc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,ue.jsx)(V1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,pd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,ue.jsx)(Br,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Br,{className:r.toggleButton,title:o("open",{productName:c}),onClick:P,isCollapsed:!0})}),I>0&&h&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(xt,{children:(0,ue.jsx)(ud,{onFeedback:K,suggestions:e,selectedIndex:t,reverse:!0})})})]})},PL=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),$1=xn(PL)(kL);var ja=S(w()),RL=({children:e})=>{let n=N("locale").replace("-","");return(0,ja.jsx)(dg.Provider,{value:n,children:e})},IL=({store:e,customStyles:t={},children:n})=>(0,ja.jsx)($m,{store:e,children:(0,ja.jsx)(RL,{children:(0,ja.jsx)(Gi.Provider,{value:t,children:n})})}),xo=IL;var Ed=S(q());var jn=S(O());var q1=S(O()),LL=["div","span","mark","strong","b","i","u","em"];function ih(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(LL.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,q1.cloneElement)(r,{children:ih(s,t,n+1)})]}return[...e,...t]}function Pr(e){return e.tagName.toLowerCase()==="textarea"}var G1={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 rb=S(q());var _d=S(O());function X1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function fd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Q1(e){return e!=null}var ah=S(q()),At=S(O());var md=S(O()),AL=["bottom","height","left","right","top","width"],OL=(e={},t={})=>AL.some(n=>e[n]!==t[n]),Dn=new Map,Y1,Z1=()=>{let e=[],t=[];Dn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();OL(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Dn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Y1=window.requestAnimationFrame(Z1)};function NL(e,t){return{observe(){let n=Dn.size===0;if(Dn.has(e)){let r=Dn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Dn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Z1()},unobserve(){let n=Dn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Dn.delete(e),Dn.size||cancelAnimationFrame(Y1)}}}}function sh(e){let[t,n]=(0,md.useState)(null);return(0,md.useLayoutEffect)(()=>{if(!e.current)return;let r=NL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Hi=S(O()),eb=S(_u());var J1={root:"_root_1jq08_1"};var tb=({children:e})=>{let[t,n]=(0,Hi.useState)(null),r=(0,Hi.useContext)(Gi);return(0,Hi.useLayoutEffect)(()=>{let o=document.createElement("div");return ao(o),o.classList.add(J1.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,eb.createPortal)(e,t):null};var ln={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var gd=S(w()),hd=(e=!1)=>{let[t,n]=(0,At.useState)(e),r=(0,At.useCallback)(()=>n(!0),[]),o=(0,At.useCallback)(()=>n(!1),[]),i=(0,At.useCallback)(()=>n(a=>!a),[]),s=(0,At.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function lh(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 yd=({className:e,triggerRef:t,boundaryRef:n=(0,At.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=lh,...a})=>{let l=sh(t),u=sh(n),c=(0,At.useMemo)(()=>s(l,u,0),[l,u]);return(0,gd.jsx)(tb,{children:(0,gd.jsx)("div",{className:(0,ah.default)(ln.ref,{[ln.positionAbove]:r==="above",[ln.positionBelow]:r==="below",[ln.positionLeft]:r==="left",[ln.positionRight]:r==="right",[ln.alignStart]:o==="start",[ln.alignCenter]:o==="center",[ln.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,gd.jsx)("div",{className:(0,ah.default)(e,ln.root),children:i})})})};var nb=S(q()),vd=S(O());var uh=S(w()),Sd=(0,vd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,vd.useRef)(null),i=k("TabCompletion",Tn);return(0,uh.jsx)("div",{ref:fd([o,r]),className:(0,nb.default)(e,i.popoverContentContainer),...n,children:(0,uh.jsx)("div",{className:i.popoverContent,children:t})})});var Rr=S(w()),ML=e=>t=>{let n=lh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},DL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Tn),s=hd(),a=(0,_d.useMemo)(()=>ML(e.getBoundingClientRect()),[e]),[l,u]=Bc(e);return(0,_d.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Rr.jsxs)("span",{children:[(0,Rr.jsx)("mark",{ref:fd([l,s.triggerRef]),className:(0,rb.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Rr.jsx)(yd,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Rr.jsx)(Sd,{style:n,children:(0,Rr.jsx)("div",{className:i.hintText,children:o})})})]})},xd=class extends bn{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${X1(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(Q1);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,Rr.jsx)(DL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var bd=S(q());var Qe=S(O());var ch=S(w()),ob=()=>(0,ch.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,ch.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 Ir=S(O());var sb=S(Qg());var ib={root:"_root_1muu8_1",content:"_content_1muu8_7"};function wd(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 dh(e){return e.replace("https://www.","").replace("https://","")}var Ot=S(w()),FL=3,jL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),BL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=FL})=>{let i=k("LinkSearch",ib),[s,a]=(0,Ir.useState)(""),l=z(),u=R(nd("url")),c=R(uw("URL",jL)),[p,d]=(0,Ir.useState)(c.length-1),g=N("fallbackImage"),y=m=>{let x=m.target;a(x.value)},v=(m,x)=>{m.stopPropagation(),m.preventDefault(),window.open(x,"_blank")},f=m=>{var b;let x=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;m.code==="Escape"&&(a(""),t()),m.code==="ArrowUp"&&d(x),m.code==="ArrowDown"&&d(_),m.code==="Enter"&&e(((b=c[p])==null?void 0:b.text)||s)},h=(0,Ir.useCallback)((0,sb.default)(m=>{l(mo({query:m,type:"URL",tags:["link-search"]}))},300),[]);return(0,Ir.useEffect)(()=>{s&&h(s)},[s]),(0,Ir.useEffect)(()=>()=>{l(Zc())},[]),(0,Ot.jsxs)("div",{className:i.root,children:[(0,Ot.jsx)(xt,{withDivider:!0,children:(s?c:u).slice(0,o).map((m,x)=>(0,Ot.jsx)(oe,{selected:p===x,onClick:()=>e(m.text),"data-testid":"linksearch-suggestion",children:(0,Ot.jsxs)(ge,{children:[(0,Ot.jsx)(ge.Image,{src:wd(m,"small",g||void 0),title:m.title||m.text}),(0,Ot.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,Ot.jsx)(ge.Title,{children:m.title||dh(m.text)}),m.title&&dh(m.text)]}),(0,Ot.jsx)(oe.Actions,{children:(0,Ot.jsx)(oe.ActionButton,{label:r,onClick:_=>v(_,m.text)})})]})},m.text))}),(0,Ot.jsx)(Pa,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:f})]})},ab=BL;var ph={};Pe(ph,{enUS:()=>HL,nlNL:()=>UL});var HL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},UL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Xe=S(w()),zL=(0,Qe.forwardRef)((e,t)=>{let n=k("TabCompletion",Tn);return(0,Xe.jsx)("mark",{ref:t,className:(0,bd.default)(n.matchSelection)},"selection-start")}),KL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(ph),s=k("TabCompletion",Tn),a=(0,Qe.useRef)(null),l=(0,Qe.useRef)(null),[u,c]=(0,Qe.useState)(null),p=z(),d=hd(document.activeElement===r),[g]=(0,Qe.useState)(()=>document.createRange());d.triggerRef.current=g,(0,Qe.useEffect)(()=>()=>g.detach(),[]),(0,Qe.useEffect)(()=>{let v=e.current,f=a.current;!v||!f||(g.setStart(v,0),g.setEnd(f,0))},[e.current,a.current]),Ei(()=>{d.close()});let y=(0,Qe.useCallback)(v=>{let f=g.toString(),h=/^http(s?):\/\//.test(v)?v:`https://${v}`;p(pc({text:`[${f}](${h})`,replace:"selection"}))},[]);return(0,Xe.jsxs)("span",{children:[(0,Xe.jsx)("mark",{ref:a,className:(0,bd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Xe.jsx)(yd,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Xe.jsxs)(Sd,{style:n,ref:l,children:[(0,Xe.jsx)("div",{className:(0,bd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Xe.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Xe.jsx)(ob,{}),(0,Xe.jsx)("span",{children:"\xA0"}),(0,Xe.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Xe.jsx)(ab,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},Cd=class extends bn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Qe.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,Xe.jsx)(zL,{ref:this.startRef}):(0,Xe.jsx)(KL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Fn=S(w()),VL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",G1),c=N("insertLink"),p=N("showMidSentenceSuggestions"),d=N("inlineSuggestions"),g=Uc(a),y=(0,jn.useRef)(null);(0,jn.useEffect)(()=>{Pr(a)&&g&&zc(a,g)},[g]);let v=(0,jn.useCallback)(m=>{if(!o||!n)return m;let x=[(0,Fn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Fn.jsx)("span",{"data-testid":"tab-completion",className:(0,Ed.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Fn.jsx)("span",{className:(0,Ed.default)(u.hint,u.resetIndent),children:(0,Fn.jsx)(il,{keyCode:"tab"},"tabHint")})),ih(m,x)},[o,n,r]),f=(0,jn.useMemo)(()=>{let m=[];return c&&m.push(new Cd("selection")),m.push(new bi("placeholders")),i&&m.push(new xd("keywords")),m},[d,c,i]),h=(0,jn.useMemo)(()=>{let m=window.getComputedStyle(a);return{"--dd-color":m.color,"--dd-font-size":m.fontSize,"--dd-font-family":m.fontFamily,"--dd-font-variant":m.fontVariant}},[]);return e?(0,Fn.jsxs)("div",{ref:m=>{m!=null&&m.parentElement&&(y.current=m==null?void 0:m.parentElement)},className:u.root,style:h,children:[(0,Fn.jsx)(En,{tagName:"span",containerTagName:"div",className:(0,Ed.default)(u.container,u.agentText),disableLineBreaks:Pr(a),content:t||"\u200B",onAfterParse:v,matchers:f,selection:g,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!p}),(0,Fn.jsx)("br",{})]}):null},WL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var v;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:g,showStyleSuggestions:y}=n;return{showTabHint:c,showStyleSuggestions:y,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((v=r.list)==null?void 0:v.keywordMatches)??[],enabled:g&&p!==!1}},lb=xn(WL)(VL);var Qb=S(q()),Yb=S(O());var ub={list:[],fetchState:"idle",isInitialRequest:null},db=e=>e.autoflows.list||[],cb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Bn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),fh=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(Bn(e.platformSessionId))}),mh=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(Bn(e.platformSessionId))}),$L=U({name:"autoflows",initialState:ub,reducers:{},extraReducers:e=>{e.addCase(fh.pending,(t,n)=>{let r=cb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(mh.pending,(t,n)=>{let r=cb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Bn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Bn.rejected,t=>{t.fetchState="error"}),e.addCase(Bn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(te,()=>ub)}}),pb=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(Bn(e))}),o.on("sessionCompleted",()=>{n(Bn(e))})}),fb=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),mb=$L.reducer;var gb={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},hb=e=>e.customMessages.list,yb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),vb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),Sb=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ba=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Td=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)}),kd=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)}),xb=U({name:"customMessages",initialState:gb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ba.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ba.rejected,t=>{t.fetchState="error"}).addCase(Ba.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Td.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Td.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(kd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(kd.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(te,()=>gb)}}),_b=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(xb.actions.onCustomMessage(i))})}),wb=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),bb=xb.reducer;var qL={token:null,accountUrl:null,interval:null},Cb=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},gh=M("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),hh=M("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(gh()),setInterval(()=>r(gh()),n)}),Eb=U({name:"passwordlessToken",initialState:qL,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(gh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(hh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:Tb}=Eb.actions,kb=Eb.reducer;function Pb(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var Fb=S(O());var Nb=S(q()),Mb=S(O());var Ib=S(q());var Rb={root:"_root_838fd_1"};var Ab=S(w()),GL=({className:e,children:t})=>{let n=k("Unicode",Rb);return(0,Ab.jsx)("span",{className:(0,Ib.default)(e,n.root),children:t})},Lb=GL;var Ob={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 yh={};Pe(yh,{enUS:()=>XL,nlNL:()=>QL});var XL={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"}]},QL={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 ft=S(w()),ZL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",Ob),a=j(yh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,ft.jsxs)(oe,{className:(0,Nb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,ft.jsx)(ge,{children:(0,ft.jsxs)(ge.Content,{children:[(0,ft.jsxs)(ge.Title,{children:[t&&(0,ft.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,ft.jsx)("span",{children:r})]})}),(0,ft.jsx)(oe.Actions,{fixed:t==="Started",children:(0,ft.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,ft.jsxs)(Mb.Fragment,{children:[(0,ft.jsx)(Lb,{children:u})," ",(0,ft.jsx)("span",{children:a(l)})]})})})]})},Db=ZL;var vh=S(w()),JL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},eA=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,vh.jsx)(Fb.Fragment,{children:e.map(o=>(0,vh.jsx)(Db,{displayName:o.displayName,description:o.description,disabled:o.isBusy||JL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),tA=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},nA={onStartAutoflow:fh,onStopAutoflow:mh},jb=xn(tA,nA)(eA);var Pd=S(O());var _h=S(q());var Sh=S(w()),xh=()=>(0,Sh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,Sh.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 Bb={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var un=S(w()),rA=({entities:e})=>{let t=k("EntitiesWidgetList",Bb),[n,r]=(0,Pd.useState)(void 0),o=z(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ia(a.text),o(He({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Pd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,un.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,un.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,un.jsx)("span",{className:t.entityText,children:a.text}),(0,un.jsxs)("span",{className:t.iconWrapper,children:[(0,un.jsx)("span",{className:(0,_h.default)(t.icon),children:(0,un.jsx)(xh,{})}),(0,un.jsx)("span",{className:(0,_h.default)(t.icon,n===l&&t.iconClicked),children:(0,un.jsx)(xh,{})})]})]},a.text))})},Hb=rA;var Ub=S(q()),wh=S(O());var Hn={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 it=S(w()),oA=({suggestion:e})=>{let t=j(po),n=z(),r=R(yb(e.text)),o=R(vb(e.text)),i=R(Sb(e.text)),s=R(oc),{replyOptions:a}=e,l=(0,wh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Td({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,wh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(kd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,it.jsxs)(oe,{onClick:l,className:(0,Ub.default)(Hn.root,{[Hn.isUsed]:r,[Hn.hasError]:i}),children:[(0,it.jsx)(ge,{children:(0,it.jsxs)(ge.Content,{children:[(0,it.jsxs)(ge.Title,{className:Hn.title,children:[e.text," ",(0,it.jsx)(sl,{className:Hn.label,children:"analyse tool"})," ",i&&(0,it.jsx)("span",{className:Hn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,it.jsx)("ul",{className:Hn.quickReplies,children:a.map(c=>(0,it.jsx)("li",{className:Hn.quickReply,children:c.title},c.title))})]})}),(0,it.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,it.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,it.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,it.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},zb=oA;var bh=S(w()),Kb=()=>(0,bh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,bh.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 Vb=S(O());var mt=S(w()),iA=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Jc(o),s=j(po),a=N("showImages"),l=N("fallbackImage"),u=g=>{g.preventDefault(),g.stopPropagation(),r(o)},c=g=>{g.preventDefault(),g.stopPropagation(),n(e)},p=(0,Vb.useCallback)(g=>{window.open(i,"_blank"),g.stopPropagation(),g.preventDefault()},[i]);return(0,mt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,mt.jsxs)(ge,{children:[a&&e.image&&(0,mt.jsx)(ge.Image,{src:wd(e,"small",l||void 0),title:e.title}),(0,mt.jsxs)(ge.Content,{children:[e.title&&(0,mt.jsx)(ge.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,mt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,mt.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,mt.jsxs)(oe.Actions,{children:[i&&(0,mt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,mt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,mt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},Wb=iA;var Ha=S(w()),sA=({contentType:e,lines:t,suggestions:n})=>{let r=Lt(),o=R(br),i=a=>{r.send(Vg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(An,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Ha.jsx)(Ha.Fragment,{children:n.map(a=>(0,Ha.jsx)(Wb,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},$b=sA;var Ch={};Pe(Ch,{enUS:()=>aA,nlNL:()=>lA});var aA={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"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},lA={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"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var qb={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 Eh=S(w()),Gb=()=>(0,Eh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Eh.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 Th=S(w()),Xb=()=>(0,Th.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Th.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 V=S(w()),Rd=(e,t)=>{let n=R(pt);(0,Yb.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},uA=({onLogIn:e})=>{let t=j(Ch),n=z(),r=N("isEmbedded"),o=k("Widget",qb),i=N("showAutoflows"),s=N("showCustomMessages"),a=N("showSummaryCommand"),l=N("showKnowledgeSearch"),u=N("showSearch"),c=R(Tr),p=R(ad),d=R(db),g=R(sd),y=R(hb),v=R(ic),f=R(vi),h=R(pt),m=R(oc),x=R(Pb),_=R(br),b=Lt(),C=R(xw),E=R(Cb("/admin/")),I=N("adminUrl"),P=N("productName");if(Rd(()=>(n(Ba(m)),n(_b(m)),()=>{n(wb(m))}),[n,f,s,m]),Rd(()=>(n(Bn(m)),n(pb(m)),()=>{n(fb(m))}),[n,f,i,m]),Rd(()=>{p.forEach(({type:D})=>{n(D==="entities"?$t():Vt(D))})},[n,f,v,c]),Rd(()=>(n(hh()),()=>{n(Tb())}),[n]),f===!1)return(0,V.jsx)("div",{className:o.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,V.jsx)("div",{className:o.loginText,children:(0,V.jsx)("div",{children:(0,V.jsx)(dd,{isEmbedded:r,loginUrl:I,onLogIn:e})})},"login");if(!c||!m||h===null||C||x)return(0,V.jsx)("div",{className:o.stateText,children:(0,V.jsx)("div",{children:(0,V.jsx)("p",{children:t("waiting")})})},"waiting");let K=u||a||l||E;return(0,V.jsx)("div",{className:(0,Qb.default)(o.root),"data-testid":"widget",children:(0,V.jsxs)(al,{className:o.sectionList,children:[K&&(0,V.jsx)(Kn,{title:t("actions"),type:"shortcuts",children:(0,V.jsxs)("div",{className:o.shortcutList,children:[u&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,V.jsx)(Ri,{}),t("linkSearch")]}),a&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,V.jsx)(Xb,{}),t("linkSummary")]}),l&&(0,V.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,V.jsx)(Gb,{}),t("linkKnowledgeSearch")]}),E&&(0,V.jsxs)("a",{className:o.shortcut,target:"_blank",href:E,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,V.jsx)(Kb,{}),t("linkStudioLogin",{productName:P})]})]})}),s&&y.length>0&&(0,V.jsx)(Kn,{type:"custom-messages","data-testid":"custom-messages",children:(0,V.jsx)(xt,{withDivider:!0,children:y.map(D=>(0,V.jsx)(zb,{suggestion:D},D.text))})}),i&&d.length>0&&(0,V.jsx)(Kn,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,V.jsx)(xt,{withDivider:!0,children:(0,V.jsx)(jb,{})})}),p.map(({type:D,title:H,amount:be,lines:Ar})=>{var Ye;switch(D){case"entities":return g&&g.length>0&&(0,V.jsx)(Kn,{type:D,title:H,"data-testid":`type-${D}`,children:(0,V.jsx)(Hb,{entities:g})},D);default:return((Ye=_[D])==null?void 0:Ye.fetchState)==="done"&&_[D].suggestions.length>0&&(0,V.jsx)(Kn,{type:D,title:H,"data-testid":`type-${D}`,children:(0,V.jsx)(xt,{withDivider:!0,children:(0,V.jsx)($b,{lines:Ar,contentType:D,suggestions:_[D].suggestions.slice(0,be)||[]})})},D)}})]})})},Zb=uA;function Ui(e){let t=new Range;return t.selectNodeContents(e),t}function Jb(e,t,n){try{return Lr(e,t,n),!0}catch{return!1}}function Id(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Ld(e){return"tagName"in e&&e.tagName==="BR"}var Ua=/[\u200B-\u200D\uFEFF]/g;function Lr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(Ua,""),p=o+c.length,d=t>=o&&t<=p,g=n>=o&&n<=p;if(d){let y=s(u,t-o);y===0&&!g?r.setStartBefore(l):r.setStart(l,y)}g&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(Ld(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;Id(l)&&u&&!Id(u)&&!Ld(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function za(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,g=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let y=p.textContent;d&&(a=u+y.substring(0,r).replace(Ua,"").length),g&&(l=u+y.substring(0,i).replace(Ua,"").length),u+=y.replace(Ua,"").length;break}case Node.ELEMENT_NODE:{let y=p.nextSibling===null;Ld(p)&&!y&&u++;for(let v=0;v<p.childNodes.length;v++){let f=d&&v===r,h=g&&v===i;if(f&&(a=u),h&&(l=u),l!==void 0||((!f||!s)&&c(p.childNodes[v]),g&&v===i-1&&(l=u),l!==void 0))break}!g&&Id(p)&&!y&&u++,g&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Ka(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,g=p?i:void 0,y=u.textContent.replace(Ua,"");d===0&&g===void 0?a+=y:a+=y.substring(d,g);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&Ld(u)&&!d&&(a+=`
|
|
20
|
+
`);for(let g=c?r:0;g<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[g]),s!==1);g++);!p&&s===0&&Id(u)&&!d&&(a+=`
|
|
21
|
+
`);break}default:break}p&&s++}return l(e),a}function eC(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var _o=class extends kn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Ka(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!eC(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!eC(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return za(this.element,t);let n=this.lastKnownSelection;if(n&&Jb(this.element,n.start,n.end))return n;let r=Ui(this.element);return r.collapse(!1),za(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Ka(this.element,Lr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};function tC(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}var kh=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()}},Ph=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=tC(t,`${this.targetOrigin}/v2/widget/liveengage/channel.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];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()}},Rh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",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(),B.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 Ph(t,this.deepdeskUrl,{debug:!0}):new kh(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(B.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 i,s;B.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(s=(i=this.eventMap)[t])==null||s.call(i,n);let o=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;o==null||o.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)}},nC=Rh;var zi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Ih=e=>new Promise(t=>{setTimeout(t,e)});var Ki=class extends zi{name="ClientError"},Lh=class extends zi{name="ServerError"},Gt=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:g=_=>_.status>=500,version:y="v1",...v}=n,f={credentials:"include",...v,headers:{"Content-Type":"application/json",...v.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(f.headers={...f.headers,"X-CSRFToken":this.csrfToken}),typeof y=="string"&&(f.headers={...f.headers,"X-Deepdesk-API-Version":y});let h=u,m=!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()=>(h--,a(s,f).then(async _=>g(_)&&!i.isAborted&&h>0?(await Ih(c),x()):_.status===401&&p===!0&&m===!1?(m=!0,await this.refreshToken(),x()):_).catch(async _=>{if(d(_)&&!i.isAborted&&h>0)return await Ih(c),x();throw _}));x().then(_=>_.json().catch(()=>null).then(b=>{_.status>=500?o(new Lh("Server Error",b)):_.status===401?o(new Ki("Unauthorized",b)):_.status===403?o(new Ki("Forbidden",b)):_.status===404?o(new Ki("Not Found",b)):_.status>=400&&o(new Ki("Bad Request",b)),delete this.latestRequestByUrl[s],r(b)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var cA;(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||={})})(cA||={});function Ad(e){return{...Z(e),tags:e.tags}}var Un=class e{constructor(t,n={}){this.options=n;this.client=new Gt(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(),B.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...ke(t),tags:t.tags},{version:"v2"});return Ad(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return Z(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null});return Z(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return Z(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return Z(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(),B.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 Ad(i)}async isConversationSupported(t,n={}){B.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=ke(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return Ad(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...ke(o),tags:o.tags})),{version:"v2"})).map(o=>Ad(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",ke({...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:ke({...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 B.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",ke(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}`,ke(n),{abortLatest:!0})).map(i=>({...Z(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`,ke(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 Z(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",ke(t),{abortLatest:!0});return Z(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,ke(t),{version:"v2"});return Z(n)}async knowledgeAssist(t,n,r){let o=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,ke({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return Z(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return Z(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return Z(t.token)}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 Z(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(ky);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&B.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Va=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Fg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,Z(o))}catch{B.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 dA;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(dA||={});var Wa=class{constructor(t,n={}){this.apiUrl=t;this.client=new Gt(t,n)}client;streams={};logger=B;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return Z(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,ke(n));return Z(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,ke(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return Z(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",ke(t));return Z(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Va(`${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 rC={startTime:null,stopTime:null},oC=U({name:"handlingTime",initialState:rC,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(te,()=>rC)}}),{handlingTimeStart:iC,handlingTimeStop:Od,handlingTimeReset:sC}=oC.actions,aC=oC.reducer;var lC=(e={})=>{let t={onAuthError:Ai(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Nd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var wo=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 Nd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),pA=U({name:"styleSuggestions",initialState:Nd,reducers:{},extraReducers:e=>{e.addCase(wo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(wo.rejected,t=>{t.fetchState="error"}).addCase(wo.fulfilled,(t,n)=>{t.fetchState="done",hr(t.list,n.payload)||(t.list=n.payload)}).addCase(no,t=>{t.list=Nd.list}).addCase(te,()=>Nd)}}),uC=pA.reducer;var cC=(e={})=>{let t,n=!0,r={getStyleSuggestions:wo,debounce:500,...e};return o=>i=>s=>{var g;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(!((g=u.conversation.current)==null?void 0:g.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 fA(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var dC=(e={})=>{let t={getTextSuggestions:Vt,getAutocompleteSuggestions:ba,debounce:200,check:Fi,...e},n;return r=>o=>i=>{var v;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=(v=l.conversation.current)==null?void 0:v.id,d=i.type===rd.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:g}}=l;return fA(g,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let f=Si(l);f===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(f))},d?0:t.debounce)),a}};var pC=wo.fulfilled.toString();function mA(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 fC=e=>t=>n=>r=>{var u;if(r.type!==pC){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=mA(o,s);r.type===pC&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var gA=Pu({activeSuggestion:Iw,answer:w1,auth:Kw,autoflows:mb,conversation:Xx,contentTypes:o1,customMessages:bb,passwordlessToken:kb,entities:l1,knowledgeAssistant:S1,handlingTime:aC,info:iw,input:eg.reducer,overlayInput:nt.reducer,settings:Hx,profile:E1,search:dw,summary:m1,styleSuggestions:uC,ui:Nw,textSuggestions:Ew});function mC(e){return $0({reducer:gA,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),lC(),dC({debounce:200}),cC({debounce:500}),fC(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var hA=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},yA=e=>t=>n=>r=>{var a;let o=t.getState(),i=Gm("inlineSuggestions")(o);switch(r.type){case In.toString():{let l=nd(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 Ai.toString():{!r.payload&&e.emit("logout",void 0);break}case Ht.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:hA(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case pc.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 ia.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case hc.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 $t.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case On.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case He.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 fc.toString():e.handleKeyDown(r.payload);break;case no.toString():e.logSendMessage(r.payload);break;case mc.toString():e.logSendEditSuggestionMessage(r.payload);break;case gc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case no.toString():e.handleAfterSendMessage(r.payload);break;case Ca.toString():e.onUpdateShowTabHint(r.payload);break;case Od.toString():e.logHandlingTime();break;case Ht.toString():{i&&(t.dispatch(on([])),t.dispatch(wn()));break}case on.toString():{i&&r.payload.length>0&&t.dispatch(vr(0));break}default:break}return s},gC=yA;function Ah(e){return e.toISOString().replace("T"," ").replace("Z","")}function hC(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:Ah(n),timeStop:Ah(r)}}function Oh(e,t,n){var E,I,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:g,textSuggestions:y,offeredTextSuggestions:v}}=t[e],f=r.length,m=y.reduce((K,{text:D,searchTerm:H})=>K+D.length-(H?H.length:0),0),x=u??Date.now(),_=(Date.now()-x)/1e3+(c||0),b=o/_,C=y.reduce((K,{searchTerm:D})=>K+(D?D.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:g,lenTextTyped:o+C,lenTextTotal:f,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:b,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(K=>K.source==="gpt").length}],agentId:(E=t.info.agentInfo)==null?void 0:E.agentId,agentName:(I=t.info.agentInfo)==null?void 0:I.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function Nh(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return Nh(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?Nh(o,t):null}function yC(e,t){return Nh(e,t)}function vC(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vA(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Md(e){return vA(e)&&(Pr(e)||Hc(e))}var SC=(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{B.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function SA(e){return e.offsetParent!==null}function xC(e){if(!SA(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 Dd(e,t,n=100){let r=xC(e);t({isVisible:r});let o=setInterval(()=>{let i=xC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var CC=S(q());var Fd=S(w()),_C=({className:e})=>(0,Fd.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Fd.jsx)("g",{children:(0,Fd.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
|
|
22
22
|
c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
|
|
23
23
|
c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
|
|
24
24
|
c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
|
|
25
|
-
c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var Dh=S(w()),wA={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},bC=({className:e,color:t})=>(0,Dh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Dh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:wA[t||"pink"]})});var CC={root:"_root_1tvv4_1",text:"_text_1tvv4_18",isLoggedIn:"_isLoggedIn_1tvv4_25",isLoggedOut:"_isLoggedOut_1tvv4_29",icon:"_icon_1tvv4_39",logo:"_logo_1tvv4_44",lock:"_lock_1tvv4_49"};var Fh={};Pe(Fh,{enUS:()=>bA,nlNL:()=>CA});var bA={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},CA={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var bo=S(w()),TC=({onLogIn:e})=>{let t=j(Fh),n=N("productName"),r=z(),o=R(pt),i=k("FloatingMenu",CC);if(o===null)return null;let s=()=>{o===!0?r($e(!0)):e()};return(0,bo.jsxs)("button",{className:(0,EC.default)(i.root,{[i.isLoggedIn]:o,[i.isLoggedOut]:!o}),onClick:s,children:[(0,bo.jsx)("div",{className:i.text,children:t(o?"search":"signin",{productName:n})}),(0,bo.jsxs)("div",{className:i.icon,children:[(0,bo.jsx)(bC,{className:i.logo,color:"pink"}),o===!1&&(0,bo.jsx)(wC,{className:i.lock})]})]})};async function Hd(e){let n=await new Gt(e).get("/platform/config/",{version:null});return Z(n)}var we=S(w());var kC=xC("showTabHint",!0),$a=class e{static version="10.10.1";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Un(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[hC({emit:(p,d,g)=>this.emit(p,d,g),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=>kC.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Wa(n)}),this.store=gC(c),this.broadcastEvents=new rC({debug:!0,deepdeskUrl:u,eventMap:Ww(this.store),createCustomChannel:l}),this.store.dispatch(ra),this.store.dispatch(Ca(kC.value())),this.store.dispatch(ra({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?(H.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(H.warn("Profile has not been loaded (yet)"),!0):(H.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ai(null)),this.store.dispatch(Ln()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();pt(r)&&jw(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Ln())).payload}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){H.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Jm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(sc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(ac({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(eg(t))).payload}async postMessages(t){return(await this.store.dispatch(uc(t))).payload}async updateConversation(t){return(await this.store.dispatch(lc(t))).payload}resetConversation(){this.store.dispatch(te()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(On());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ra(t))}setVisitorInfo(t){this.store.dispatch(iw(t))}async setAgentInfo(t){await this.store.dispatch(Sa(t))}async setAgentSettings(t){await this.store.dispatch(Hg(t))}async getAgentSettings(){return(await this.store.dispatch(Bg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(od()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(gc(t))}notifyKeyDown(t){this.store.dispatch(fc(t))}notifyPaste(t,n){this.store.dispatch(a_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(i_(t))}notifyExternalSuggestion(t){this.store.dispatch(Bt(t)),this.store.dispatch(wn())}notifyEditSuggestion(t){this.store.dispatch(Cw(t.contentType,t.suggestions)),this.store.dispatch(In({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(Cr({collapse:!1})),this.inputMediator&&this.store.dispatch(Jx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(on([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(s_(dc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(n_()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(o_());let{selectedSuggestionIndex:p}=this.state.input;t.preventDefault(),!s&&(p===-1?this.store.dispatch(ia()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(vr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(vr(-1)),this.store.dispatch(ia()),t.preventDefault()):n||(this.store.dispatch(Cr({collapse:!0})),this.store.dispatch(Ow(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:g}=this.state.input;this.store.dispatch(Ca(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&g&&g.text.startsWith(d)&&(this.store.dispatch(Bt({text:g.text,suggestion:g,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(wn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(l_()),this.store.dispatch(on([]))}handlingTimeStart(){this.state.handlingTime.startTime||(H.info("Start handling time"),this.store.dispatch(sC()))}handlingTimeStop(){this.state.handlingTime.startTime&&(H.info("Stop handling time"),this.store.dispatch(Nd()))}logSendMessage(t){let n=Nh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=Nh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(t_(this.state.overlayInput.metrics))}logHandlingTime(){let t=yC(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(aC())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(wn()),this.store.dispatch(no(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Bt({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){H.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),H.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]=lo(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=lo(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ao(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),H.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(H.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(c_(r.metrics))):H.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Dd(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:g,inputMediator:y,closestScrollSelector:v,appendOverlayTo:m,inlineSuggestions:h,floatingMenu:f}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:g,isEmbedded:p,inlineSuggestions:h,floatingMenu:!!f}),n.automaticHandlingTime&&this.setupHandlingTime(t),ao(t),this.inputMediator=y||(Pr(t)?new Pn(t):new _o(t)),this.inputMediator.on("change",({plainText:b})=>{this.notifyInputChanged(b)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(u_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",b=>{this.notifyKeyDown(b)}),this.inputMediator.on("paste",({pastedText:b,selectionText:C})=>{this.notifyPaste(b,C)}),this.inputMediator.on("cut",({selectionText:b})=>{this.notifyCut(b)});let x=v&&vC(t,v)||void 0;if(h){let{customStyles:b,appendOverlayTo:C}=n;if(Pr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let E=this.createInlineContainer(t,"deepdesk-caret");(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:b,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(H1,{})})}),E),this.inputMediator.on("caret",P=>{this.store.dispatch(on([])),P?(E.style.display="block",E.style.top=`${P.top}px`,E.style.left=`${P.left}px`):E.style.display="none"});let I=this.overlayContainerFactory("floating-menu",x||t,{appendTo:typeof f=="object"&&"appendOverlayTo"in f?f.appendOverlayTo:C},b==null?void 0:b.floatingMenuRootNode);(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:b,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(TC,{onLogIn:()=>this.loginViaPopup().catch(P=>H.warn(P.message))})})}),I)}else{let b=this.overlayContainerFactory("deepdesk-tab-completion",x||t,{appendTo:m,closestScrollElement:x,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",x||t,{appendTo:m},r==null?void 0:r.suggestionsRootNode);(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(ub,{inputElement:t})})}),b),(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(q1,{onLogIn:()=>this.loginViaPopup().catch(E=>H.warn(E.message))})})}),C)}(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(O1,{})})}),this.createContainer("deepdesk-overlays"));let _;this.inputMediator.on("selection",b=>{clearTimeout(_),b===null?_=setTimeout(()=>{b!==null&&this.store.dispatch(ng(b))},500):this.store.dispatch(ng(b))}),this.inputMediator.on("disabled",()=>{var b;(b=this.inputMediator)==null||b.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(Li(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Li(!0))),this.store.dispatch(e_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(wn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var b;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((b=this.state.conversation.current)==null?void 0:b.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&&H.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(Jb,{onLogIn:()=>this.loginViaPopup().catch(s=>H.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Nt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Fd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){SC(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ma());let t=Tr(this.state);t&&(await this.store.dispatch(Oa()),this.store.dispatch(ra({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(){let t=this.state.settings.adminUrl,n=new URL(t),r=await Hd(n.origin);return new Promise((o,i)=>{let s=new MessageChannel,a=s.port1,l=new URL(r.config.platform.hasSso?`${t}/platform/sso/`:`${t}/admin/`);l.searchParams.append("redirect","/sdk/popup/close.html");let u=!1,c=()=>{p&&!p.closed&&p.close(),window.removeEventListener("message",d),clearInterval(g)};a.onmessage=async y=>{var v,m;if((v=y.data)!=null&&v.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((m=y.data)==null?void 0:m.jwt),await this.isLoggedIn(),this.broadcastEvents.send(ka),c(),u=!0,s.port1.close(),o()}catch(h){i(h)}};let p=window.open(l.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");p===null&&i(new Error("Popup blocked by browser"));let d=async y=>{var v;if(y.origin===l.origin)switch((v=y.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{p==null||p.postMessage({type:"deepdesk-popup-create-channel"},l.origin,[s.port2]);break}case"deepdesk-popup-error":{c(),y.data.message==="Timeout"&&H.warn("Popup timed out. Check if the account's platform url is configured correctly."),i(new Error(y.data.message));break}}};window.addEventListener("message",d);let g=setInterval(()=>{p&&!p.closed||(c(),u||i(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(H.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;H.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=ld(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch($t()):this.store.dispatch(Vt(r))})}catch(r){this.handleError(r)}}};async function PC(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 RC(e,t,n={}){let r=n.replace?Lr(e,n.replace.start,n.replace.end):Ui(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(`
|
|
26
|
-
`).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?Lr(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
|
|
27
|
-
`).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br")),t.appendChild(document.createTextNode(n))}),t}function
|
|
25
|
+
c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var Mh=S(w()),xA={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},wC=({className:e,color:t})=>(0,Mh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Mh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:xA[t||"pink"]})});var bC={root:"_root_1tvv4_1",text:"_text_1tvv4_18",isLoggedIn:"_isLoggedIn_1tvv4_25",isLoggedOut:"_isLoggedOut_1tvv4_29",icon:"_icon_1tvv4_39",logo:"_logo_1tvv4_44",lock:"_lock_1tvv4_49"};var Dh={};Pe(Dh,{enUS:()=>_A,nlNL:()=>wA});var _A={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},wA={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var bo=S(w()),EC=({onLogIn:e})=>{let t=j(Dh),n=N("productName"),r=z(),o=R(pt),i=k("FloatingMenu",bC);if(o===null)return null;let s=()=>{o===!0?r($e(!0)):e()};return(0,bo.jsxs)("button",{className:(0,CC.default)(i.root,{[i.isLoggedIn]:o,[i.isLoggedOut]:!o}),onClick:s,children:[(0,bo.jsx)("div",{className:i.text,children:t(o?"search":"signin",{productName:n})}),(0,bo.jsxs)("div",{className:i.icon,children:[(0,bo.jsx)(wC,{className:i.logo,color:"pink"}),o===!1&&(0,bo.jsx)(_C,{className:i.lock})]})]})};async function jd(e){let n=await new Gt(e).get("/platform/config/",{version:null});return Z(n)}var we=S(w());var TC=SC("showTabHint",!0),$a=class e{static version="10.10.2";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 Un(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[gC({emit:(p,d,g)=>this.emit(p,d,g),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=>TC.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Wa(n)}),this.store=mC(c),this.broadcastEvents=new nC({debug:!0,deepdeskUrl:u,eventMap:Vw(this.store),createCustomChannel:l}),this.store.dispatch(ra),this.store.dispatch(Ca(TC.value())),this.store.dispatch(ra({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?(B.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(B.warn("Profile has not been loaded (yet)"),!0):(B.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ai(null)),this.store.dispatch(Ln()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();pt(r)&&Fw(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Ln())).payload}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){B.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Zm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(sc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(ac({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Jm(t))).payload}async postMessages(t){return(await this.store.dispatch(uc(t))).payload}async updateConversation(t){return(await this.store.dispatch(lc(t))).payload}resetConversation(){this.store.dispatch(te()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(On());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ra(t))}setVisitorInfo(t){this.store.dispatch(ow(t))}async setAgentInfo(t){await this.store.dispatch(Sa(t))}async setAgentSettings(t){await this.store.dispatch(jg(t))}async getAgentSettings(){return(await this.store.dispatch(Bg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(rd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(gc(t))}notifyKeyDown(t){this.store.dispatch(fc(t))}notifyPaste(t,n){this.store.dispatch(s_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(o_(t))}notifyExternalSuggestion(t){this.store.dispatch(Ht(t)),this.store.dispatch(wn())}notifyEditSuggestion(t){this.store.dispatch(bw(t.contentType,t.suggestions)),this.store.dispatch(In({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(Cr({collapse:!1})),this.inputMediator&&this.store.dispatch(Zx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(on([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(i_(dc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(t_()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(r_());let{selectedSuggestionIndex:p}=this.state.input;t.preventDefault(),!s&&(p===-1?this.store.dispatch(ia()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(vr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(vr(-1)),this.store.dispatch(ia()),t.preventDefault()):n||(this.store.dispatch(Cr({collapse:!0})),this.store.dispatch(Aw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:g}=this.state.input;this.store.dispatch(Ca(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&g&&g.text.startsWith(d)&&(this.store.dispatch(Ht({text:g.text,suggestion:g,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(wn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(a_()),this.store.dispatch(on([]))}handlingTimeStart(){this.state.handlingTime.startTime||(B.info("Start handling time"),this.store.dispatch(iC()))}handlingTimeStop(){this.state.handlingTime.startTime&&(B.info("Stop handling time"),this.store.dispatch(Od()))}logSendMessage(t){let n=Oh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=Oh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(e_(this.state.overlayInput.metrics))}logHandlingTime(){let t=hC(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(sC())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(wn()),this.store.dispatch(no(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ht({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){B.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),B.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]=lo(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=lo(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ao(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,Nt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),B.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(B.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(u_(r.metrics))):B.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!Md(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:g,inputMediator:y,closestScrollSelector:v,appendOverlayTo:f,inlineSuggestions:h,floatingMenu:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:g,isEmbedded:p,inlineSuggestions:h,floatingMenu:!!m}),n.automaticHandlingTime&&this.setupHandlingTime(t),ao(t),this.inputMediator=y||(Pr(t)?new Pn(t):new _o(t)),this.inputMediator.on("change",({plainText:b})=>{this.notifyInputChanged(b)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(l_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",b=>{this.notifyKeyDown(b)}),this.inputMediator.on("paste",({pastedText:b,selectionText:C})=>{this.notifyPaste(b,C)}),this.inputMediator.on("cut",({selectionText:b})=>{this.notifyCut(b)});let x=v&&yC(t,v)||void 0;if(h){let{customStyles:b,appendOverlayTo:C}=n;if(Pr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let E=this.createInlineContainer(t,"deepdesk-caret");(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:b,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(j1,{})})}),E),this.inputMediator.on("caret",P=>{this.store.dispatch(on([])),P?(E.style.display="block",E.style.top=`${P.top}px`,E.style.left=`${P.left}px`):E.style.display="none"});let I=this.overlayContainerFactory("floating-menu",x||t,{appendTo:typeof m=="object"&&"appendOverlayTo"in m?m.appendOverlayTo:C},b==null?void 0:b.floatingMenuRootNode);(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:b,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(EC,{onLogIn:()=>this.loginViaPopup().catch(P=>B.warn(P.message))})})}),I)}else{let b=this.overlayContainerFactory("deepdesk-tab-completion",x||t,{appendTo:f,closestScrollElement:x,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",x||t,{appendTo:f},r==null?void 0:r.suggestionsRootNode);(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(lb,{inputElement:t})})}),b),(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)($1,{onLogIn:()=>this.loginViaPopup().catch(E=>B.warn(E.message))})})}),C)}(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(A1,{})})}),this.createContainer("deepdesk-overlays"));let _;this.inputMediator.on("selection",b=>{clearTimeout(_),b===null?_=setTimeout(()=>{b!==null&&this.store.dispatch(tg(b))},500):this.store.dispatch(tg(b))}),this.inputMediator.on("disabled",()=>{var b;(b=this.inputMediator)==null||b.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(Li(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Li(!0))),this.store.dispatch(Jx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(wn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var b;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((b=this.state.conversation.current)==null?void 0:b.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&&B.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,Nt.render)((0,we.jsx)(xo,{store:this.store,customStyles:r,children:(0,we.jsx)(ho,{broadcastEvents:this.broadcastEvents,children:(0,we.jsx)(Zb,{onLogIn:()=>this.loginViaPopup().catch(s=>B.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Nt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Dd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){vC(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ma());let t=Tr(this.state);t&&(await this.store.dispatch(Oa()),this.store.dispatch(ra({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(){let t=this.state.settings.adminUrl,n=new URL(t),r=await jd(n.origin);return new Promise((o,i)=>{let s=new MessageChannel,a=s.port1,l=new URL(r.config.platform.hasSso?`${t}/platform/sso/`:`${t}/admin/`);l.searchParams.append("redirect","/sdk/popup/close.html");let u=!1,c=()=>{p&&!p.closed&&p.close(),window.removeEventListener("message",d),clearInterval(g)};a.onmessage=async y=>{var v,f;if((v=y.data)!=null&&v.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((f=y.data)==null?void 0:f.jwt),await this.isLoggedIn(),this.broadcastEvents.send(ka),c(),u=!0,s.port1.close(),o()}catch(h){i(h)}};let p=window.open(l.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");p===null&&i(new Error("Popup blocked by browser"));let d=async y=>{var v;if(y.origin===l.origin)switch((v=y.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{p==null||p.postMessage({type:"deepdesk-popup-create-channel"},l.origin,[s.port2]);break}case"deepdesk-popup-error":{c(),y.data.message==="Timeout"&&B.warn("Popup timed out. Check if the account's platform url is configured correctly."),i(new Error(y.data.message));break}}};window.addEventListener("message",d);let g=setInterval(()=>{p&&!p.closed||(c(),u||i(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(B.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;B.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=ad(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch($t()):this.store.dispatch(Vt(r))})}catch(r){this.handleError(r)}}};async function kC(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 PC(e,t,n={}){let r=n.replace?Lr(e,n.replace.start,n.replace.end):Ui(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(`
|
|
26
|
+
`).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?Lr(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 bA(e){let t=document.createElement("template");return t.innerHTML=e,t.content}function CA(e){let t=document.createDocumentFragment();return e.split(`
|
|
27
|
+
`).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br")),t.appendChild(document.createTextNode(n))}),t}function RC(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:RC(e,t.parentNode)}async function IC(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?bA(t):CA(t);if(n){let c=RC(e,l.startContainer)??e.firstChild;e.insertBefore(u,(c==null?void 0:c.nextSibling)??null)}else l.insertNode(u),l.collapse(!1)};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function LC(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function AC(e,t,n){await new Un(e).authenticateWithKey(t,n)}async function EA(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 OC(e,t){let n=await EA(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 HC(TA);})();
|
|
28
28
|
/*! Bundled license information:
|
|
29
29
|
|
|
30
30
|
classnames/index.js:
|