@deepdesk/deepdesk-sdk 10.0.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.mts +168 -142
- package/dist/index.d.ts +168 -142
- package/dist/index.esm.js +4 -4
- package/dist/index.iife.js +130 -0
- package/package.json +6 -6
- package/styles/index.js +1 -1
- package/styles.css +1 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var t1=Object.create;var Ha=Object.defineProperty;var n1=Object.getOwnPropertyDescriptor;var r1=Object.getOwnPropertyNames;var o1=Object.getPrototypeOf,i1=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})},yh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of r1(t))!i1.call(e,o)&&o!==n&&Ha(e,o,{get:()=>t[o],enumerable:!(r=n1(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?t1(o1(e)):{},yh(t||!e||!e.__esModule?Ha(n,"default",{value:e,enumerable:!0}):n,e)),s1=e=>yh(Ha({},"__esModule",{value:!0}),e);var Ba=pe((AL,xh)=>{"use strict";var wh=Object.getOwnPropertySymbols,a1=Object.prototype.hasOwnProperty,l1=Object.prototype.propertyIsEnumerable;function u1(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function c1(){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}}xh.exports=c1()?Object.assign:function(e,t){for(var n,r=u1(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)a1.call(n,s)&&(r[s]=n[s]);if(wh){o=wh(n);for(var a=0;a<o.length;a++)l1.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Fh=pe(V=>{"use strict";var xd=Ba(),uo=60103,Th=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var _h=60109,bh=60110,kh=60112;V.Suspense=60113;var Ph=60115,Rh=60116;typeof Symbol=="function"&&Symbol.for&&(dt=Symbol.for,uo=dt("react.element"),Th=dt("react.portal"),V.Fragment=dt("react.fragment"),V.StrictMode=dt("react.strict_mode"),V.Profiler=dt("react.profiler"),_h=dt("react.provider"),bh=dt("react.context"),kh=dt("react.forward_ref"),V.Suspense=dt("react.suspense"),Ph=dt("react.memo"),Rh=dt("react.lazy"));var dt,Eh=typeof Symbol=="function"&&Symbol.iterator;function d1(e){return e===null||typeof e!="object"?null:(e=Eh&&e[Eh]||e["@@iterator"],typeof e=="function"?e:null)}function Mi(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Ih={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lh={};function co(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}co.prototype.isReactComponent={};co.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Mi(85));this.updater.enqueueSetState(this,e,t,"setState")};co.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ah(){}Ah.prototype=co.prototype;function Ed(e,t,n){this.props=e,this.context=t,this.refs=Lh,this.updater=n||Ih}var Cd=Ed.prototype=new Ah;Cd.constructor=Ed;xd(Cd,co.prototype);Cd.isPureReactComponent=!0;var Td={current:null},Oh=Object.prototype.hasOwnProperty,Nh={key:!0,ref:!0,__self:!0,__source:!0};function Mh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Oh.call(t,r)&&!Nh.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:uo,type:e,key:i,ref:s,props:o,_owner:Td.current}}function f1(e,t){return{$$typeof:uo,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===uo}function p1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ch=/\/+/g;function wd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p1(""+e.key):t.toString(36)}function za(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 uo:case Th:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+wd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Ch,"$&/")+"/"),za(o,t,n,"",function(u){return u})):o!=null&&(_d(o)&&(o=f1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ch,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+wd(i,a);s+=za(i,t,n,l,o)}else if(l=d1(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+wd(i,a++),s+=za(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Mi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ua(e,t,n){if(e==null)return e;var r=[],o=0;return za(e,r,"","",function(i){return t.call(n,i,o++)}),r}function m1(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var Dh={current:null};function an(){var e=Dh.current;if(e===null)throw Error(Mi(321));return e}var g1={ReactCurrentDispatcher:Dh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Td,IsSomeRendererActing:{current:!1},assign:xd};V.Children={map:Ua,forEach:function(e,t,n){Ua(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ua(e,function(){t++}),t},toArray:function(e){return Ua(e,function(t){return t})||[]},only:function(e){if(!_d(e))throw Error(Mi(143));return e}};V.Component=co;V.PureComponent=Ed;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;V.cloneElement=function(e,t,n){if(e==null)throw Error(Mi(267,e));var r=xd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Td.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Oh.call(t,l)&&!Nh.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:uo,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:bh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:_h,_context:e},e.Consumer=e};V.createElement=Mh;V.createFactory=function(e){var t=Mh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:kh,render:e}};V.isValidElement=_d;V.lazy=function(e){return{$$typeof:Rh,_payload:{_status:-1,_result:e},_init:m1}};V.memo=function(e,t){return{$$typeof:Ph,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return an().useCallback(e,t)};V.useContext=function(e,t){return an().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return an().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return an().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return an().useLayoutEffect(e,t)};V.useMemo=function(e,t){return an().useMemo(e,t)};V.useReducer=function(e,t,n){return an().useReducer(e,t,n)};V.useRef=function(e){return an().useRef(e)};V.useState=function(e){return an().useState(e)};V.version="17.0.2"});var O=pe((NL,jh)=>{"use strict";jh.exports=Fh()});var Kh=pe($=>{"use strict";var po,ji,$a,Ad;typeof performance=="object"&&typeof performance.now=="function"?(Hh=performance,$.unstable_now=function(){return Hh.now()}):(bd=Date,Bh=bd.now(),$.unstable_now=function(){return bd.now()-Bh});var Hh,bd,Bh;typeof window>"u"||typeof MessageChannel!="function"?(fo=null,kd=null,Pd=function(){if(fo!==null)try{var e=$.unstable_now();fo(!0,e),fo=null}catch(t){throw setTimeout(Pd,0),t}},po=function(e){fo!==null?setTimeout(po,0,e):(fo=e,setTimeout(Pd,0))},ji=function(e,t){kd=setTimeout(e,t)},$a=function(){clearTimeout(kd)},$.unstable_shouldYield=function(){return!1},Ad=$.unstable_forceFrameRate=function(){}):(Uh=window.setTimeout,zh=window.clearTimeout,typeof console<"u"&&(Vh=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 Vh!="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")),Di=!1,Fi=null,Va=-1,Rd=5,Id=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Id},Ad=function(){},$.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Rd=0<e?Math.floor(1e3/e):5},Ld=new MessageChannel,Ka=Ld.port2,Ld.port1.onmessage=function(){if(Fi!==null){var e=$.unstable_now();Id=e+Rd;try{Fi(!0,e)?Ka.postMessage(null):(Di=!1,Fi=null)}catch(t){throw Ka.postMessage(null),t}}else Di=!1},po=function(e){Fi=e,Di||(Di=!0,Ka.postMessage(null))},ji=function(e,t){Va=Uh(function(){e($.unstable_now())},t)},$a=function(){zh(Va),Va=-1});var fo,kd,Pd,Uh,zh,Vh,Di,Fi,Va,Rd,Id,Ld,Ka;function Od(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Wa(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Lt(e){return e=e[0],e===void 0?null:e}function qa(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>Wa(s,n))l!==void 0&&0>Wa(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Wa(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Wa(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Kt=[],Hn=[],h1=1,ft=null,Re=3,Ga=!1,kr=!1,Hi=!1;function Nd(e){for(var t=Lt(Hn);t!==null;){if(t.callback===null)qa(Hn);else if(t.startTime<=e)qa(Hn),t.sortIndex=t.expirationTime,Od(Kt,t);else break;t=Lt(Hn)}}function Md(e){if(Hi=!1,Nd(e),!kr)if(Lt(Kt)!==null)kr=!0,po(Dd);else{var t=Lt(Hn);t!==null&&ji(Md,t.startTime-e)}}function Dd(e,t){kr=!1,Hi&&(Hi=!1,$a()),Ga=!0;var n=Re;try{for(Nd(t),ft=Lt(Kt);ft!==null&&(!(ft.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=ft.callback;if(typeof r=="function"){ft.callback=null,Re=ft.priorityLevel;var o=r(ft.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?ft.callback=o:ft===Lt(Kt)&&qa(Kt),Nd(t)}else qa(Kt);ft=Lt(Kt)}if(ft!==null)var i=!0;else{var s=Lt(Hn);s!==null&&ji(Md,s.startTime-t),i=!1}return i}finally{ft=null,Re=n,Ga=!1}}var y1=Ad;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){kr||Ga||(kr=!0,po(Dd))};$.unstable_getCurrentPriorityLevel=function(){return Re};$.unstable_getFirstCallbackNode=function(){return Lt(Kt)};$.unstable_next=function(e){switch(Re){case 1:case 2:case 3:var t=3;break;default:t=Re}var n=Re;Re=t;try{return e()}finally{Re=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=y1;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Re;Re=e;try{return t()}finally{Re=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:h1++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Od(Hn,e),Lt(Kt)===null&&e===Lt(Hn)&&(Hi?$a():Hi=!0,ji(Md,n-r))):(e.sortIndex=o,Od(Kt,e),kr||Ga||(kr=!0,po(Dd))),e};$.unstable_wrapCallback=function(e){var t=Re;return function(){var n=Re;Re=t;try{return e.apply(this,arguments)}finally{Re=n}}}});var $h=pe((DL,Wh)=>{"use strict";Wh.exports=Kh()});var AS=pe(vt=>{"use strict";var Ul=O(),ae=Ba(),we=$h();function k(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(!Ul)throw Error(k(227));var iv=new Set,gs={};function jr(e,t){No(e,t),No(e+"Capture",t)}function No(e,t){for(gs[e]=t,e=0;e<t.length;e++)iv.add(t[e])}var pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v1=/^[: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]*$/,qh=Object.prototype.hasOwnProperty,Gh={},Xh={};function S1(e){return qh.call(Xh,e)?!0:qh.call(Gh,e)?!1:v1.test(e)?Xh[e]=!0:(Gh[e]=!0,!1)}function w1(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 x1(e,t,n,r){if(t===null||typeof t>"u"||w1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Be(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Be(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ke[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var $f=/[\-:]([a-z])/g;function qf(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($f,qf);ke[t]=new Be(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($f,qf);ke[t]=new Be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($f,qf);ke[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gf(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(x1(t,n,o,r)&&(n=null),r||o===null?S1(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 Hr=Ul.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Zi=60103,Rr=60106,Un=60107,Xf=60108,rs=60114,Qf=60109,Yf=60110,zl=60112,os=60113,vl=60120,Vl=60115,Zf=60116,Jf=60121,ep=60128,sv=60129,tp=60130,sf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,Zi=ye("react.element"),Rr=ye("react.portal"),Un=ye("react.fragment"),Xf=ye("react.strict_mode"),rs=ye("react.profiler"),Qf=ye("react.provider"),Yf=ye("react.context"),zl=ye("react.forward_ref"),os=ye("react.suspense"),vl=ye("react.suspense_list"),Vl=ye("react.memo"),Zf=ye("react.lazy"),Jf=ye("react.block"),ye("react.scope"),ep=ye("react.opaque.id"),sv=ye("react.debug_trace_mode"),tp=ye("react.offscreen"),sf=ye("react.legacy_hidden"));var ye,Qh=typeof Symbol=="function"&&Symbol.iterator;function Bi(e){return e===null||typeof e!="object"?null:(e=Qh&&e[Qh]||e["@@iterator"],typeof e=="function"?e:null)}var Fd;function Ji(e){if(Fd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fd=t&&t[1]||""}return`
|
|
2
|
+
`+Fd+e}var jd=!1;function Xa(e,t){if(!e||jd)return"";jd=!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
|
+
`),i=r.stack.split(`
|
|
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{jd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ji(e):""}function E1(e){switch(e.tag){case 5:return Ji(e.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 2:case 15:return e=Xa(e.type,!1),e;case 11:return e=Xa(e.type.render,!1),e;case 22:return e=Xa(e.type._render,!1),e;case 1:return e=Xa(e.type,!0),e;default:return""}}function To(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 Un:return"Fragment";case Rr:return"Portal";case rs:return"Profiler";case Xf:return"StrictMode";case os:return"Suspense";case vl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case zl:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Vl:return To(e.type);case Jf:return To(e._render);case Zf:t=e._payload,e=e._init;try{return To(e(t))}catch{}}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function av(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function C1(e){var t=av(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qa(e){e._valueTracker||(e._valueTracker=C1(e))}function lv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=av(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Sl(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 af(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(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 uv(e,t){t=t.checked,t!=null&&Gf(e,"checked",t,!1)}function lf(e,t){uv(e,t);var n=Jn(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")?uf(e,t.type,n):t.hasOwnProperty("defaultValue")&&uf(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zh(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 uf(e,t,n){(t!=="number"||Sl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function T1(e){var t="";return Ul.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function cf(e,t){return e=ae({children:void 0},t),(t=T1(t.children))&&(e.children=t),e}function _o(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=""+Jn(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 df(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(k(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Jh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(k(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(k(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Jn(n)}}function cv(e,t){var n=Jn(t.value),r=Jn(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 ey(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var ff={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function dv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?dv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ya,fv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==ff.svg||"innerHTML"in e)e.innerHTML=t;else{for(Ya=Ya||document.createElement("div"),Ya.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ya.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var is={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},_1=["Webkit","ms","Moz","O"];Object.keys(is).forEach(function(e){_1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),is[t]=is[e]})});function pv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||is.hasOwnProperty(e)&&is[e]?(""+t).trim():t+"px"}function mv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=pv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var b1=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 mf(e,t){if(t){if(b1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function gf(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 np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hf=null,bo=null,ko=null;function ty(e){if(e=Is(e)){if(typeof hf!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Xl(t),hf(e.stateNode,e.type,t))}}function gv(e){bo?ko?ko.push(e):ko=[e]:bo=e}function hv(){if(bo){var e=bo,t=ko;if(ko=bo=null,ty(e),t)for(e=0;e<t.length;e++)ty(t[e])}}function rp(e,t){return e(t)}function yv(e,t,n,r,o){return e(t,n,r,o)}function op(){}var vv=rp,Ir=!1,Hd=!1;function ip(){(bo!==null||ko!==null)&&(op(),hv())}function k1(e,t,n){if(Hd)return e(t,n);Hd=!0;try{return vv(e,t,n)}finally{Hd=!1,ip()}}function ys(e,t){var n=e.stateNode;if(n===null)return null;var r=Xl(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(k(231,t,typeof n));return n}var yf=!1;if(pn)try{mo={},Object.defineProperty(mo,"passive",{get:function(){yf=!0}}),window.addEventListener("test",mo,mo),window.removeEventListener("test",mo,mo)}catch{yf=!1}var mo;function P1(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ss=!1,wl=null,xl=!1,vf=null,R1={onError:function(e){ss=!0,wl=e}};function I1(e,t,n,r,o,i,s,a,l){ss=!1,wl=null,P1.apply(R1,arguments)}function L1(e,t,n,r,o,i,s,a,l){if(I1.apply(this,arguments),ss){if(ss){var u=wl;ss=!1,wl=null}else throw Error(k(198));xl||(xl=!0,vf=u)}}function Br(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 Sv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ny(e){if(Br(e)!==e)throw Error(k(188))}function A1(e){var t=e.alternate;if(!t){if(t=Br(e),t===null)throw Error(k(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return ny(o),e;if(i===r)return ny(o),t;i=i.sibling}throw Error(k(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(k(189))}}if(n.alternate!==r)throw Error(k(190))}if(n.tag!==3)throw Error(k(188));return n.stateNode.current===n?e:t}function wv(e){if(e=A1(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 ry(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var xv,sp,Ev,Cv,Sf=!1,Wt=[],Wn=null,$n=null,qn=null,vs=new Map,Ss=new Map,Ui=[],oy="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 wf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function iy(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ss.delete(t.pointerId)}}function zi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=wf(t,n,r,o,i),t!==null&&(t=Is(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function O1(e,t,n,r,o){switch(t){case"focusin":return Wn=zi(Wn,e,t,n,r,o),!0;case"dragenter":return $n=zi($n,e,t,n,r,o),!0;case"mouseover":return qn=zi(qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return vs.set(i,zi(vs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ss.set(i,zi(Ss.get(i)||null,e,t,n,r,o)),!0}return!1}function N1(e){var t=Lr(e.target);if(t!==null){var n=Br(t);if(n!==null){if(t=n.tag,t===13){if(t=Sv(n),t!==null){e.blockedOn=t,Cv(e.lanePriority,function(){we.unstable_runWithPriority(e.priority,function(){Ev(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ll(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Is(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function sy(e,t,n){ll(e)&&n.delete(t)}function M1(){for(Sf=!1;0<Wt.length;){var e=Wt[0];if(e.blockedOn!==null){e=Is(e.blockedOn),e!==null&&xv(e);break}for(var t=e.targetContainers;0<t.length;){var n=cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Wt.shift()}Wn!==null&&ll(Wn)&&(Wn=null),$n!==null&&ll($n)&&($n=null),qn!==null&&ll(qn)&&(qn=null),vs.forEach(sy),Ss.forEach(sy)}function Vi(e,t){e.blockedOn===t&&(e.blockedOn=null,Sf||(Sf=!0,we.unstable_scheduleCallback(we.unstable_NormalPriority,M1)))}function Tv(e){function t(o){return Vi(o,e)}if(0<Wt.length){Vi(Wt[0],e);for(var n=1;n<Wt.length;n++){var r=Wt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Wn!==null&&Vi(Wn,e),$n!==null&&Vi($n,e),qn!==null&&Vi(qn,e),vs.forEach(t),Ss.forEach(t),n=0;n<Ui.length;n++)r=Ui[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ui.length&&(n=Ui[0],n.blockedOn===null);)N1(n),n.blockedOn===null&&Ui.shift()}function Za(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vo={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionend:Za("Transition","TransitionEnd")},Bd={},_v={};pn&&(_v=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Kl(e){if(Bd[e])return Bd[e];if(!vo[e])return e;var t=vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _v)return Bd[e]=t[n];return e}var bv=Kl("animationend"),kv=Kl("animationiteration"),Pv=Kl("animationstart"),Rv=Kl("transitionend"),Iv=new Map,ap=new Map,D1=["abort","abort",bv,"animationEnd",kv,"animationIteration",Pv,"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",Rv,"transitionEnd","waiting","waiting"];function lp(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)),ap.set(r,t),Iv.set(r,o),jr(o,[r])}}var F1=we.unstable_now;F1();var te=8;function ho(e){if(1&e)return te=15,1;if(2&e)return te=14,2;if(4&e)return te=13,4;var t=24&e;return t!==0?(te=12,t):e&32?(te=11,32):(t=192&e,t!==0?(te=10,t):e&256?(te=9,256):(t=3584&e,t!==0?(te=8,t):e&4096?(te=7,4096):(t=4186112&e,t!==0?(te=6,t):(t=62914560&e,t!==0?(te=5,t):e&67108864?(te=4,67108864):e&134217728?(te=3,134217728):(t=805306368&e,t!==0?(te=2,t):1073741824&e?(te=1,1073741824):(te=8,e))))))}function j1(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 H1(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(k(358,e))}}function ws(e,t){var n=e.pendingLanes;if(n===0)return te=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=te=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ho(l),o=te):(a&=i,a!==0&&(r=ho(a),o=te))}else i=n&~s,i!==0?(r=ho(i),o=te):a!==0&&(r=ho(a),o=te);if(r===0)return 0;if(r=31-er(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(ho(t),o<=te)return t;te=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-er(t),o=1<<n,r|=e[n],t&=~o;return r}function Lv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function El(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=yo(24&~t),e===0?El(10,t):e;case 10:return e=yo(192&~t),e===0?El(8,t):e;case 8:return e=yo(3584&~t),e===0&&(e=yo(4186112&~t),e===0&&(e=512)),e;case 2:return t=yo(805306368&~t),t===0&&(t=268435456),t}throw Error(k(358,e))}function yo(e){return e&-e}function Ud(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wl(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-er(t),e[t]=n}var er=Math.clz32?Math.clz32:z1,B1=Math.log,U1=Math.LN2;function z1(e){return e===0?32:31-(B1(e)/U1|0)|0}var V1=we.unstable_UserBlockingPriority,K1=we.unstable_runWithPriority,ul=!0;function W1(e,t,n,r){Ir||op();var o=up,i=Ir;Ir=!0;try{yv(o,e,t,n,r)}finally{(Ir=i)||ip()}}function $1(e,t,n,r){K1(V1,up.bind(null,e,t,n,r))}function up(e,t,n,r){if(ul){var o;if((o=(t&4)===0)&&0<Wt.length&&-1<oy.indexOf(e))e=wf(null,e,t,n,r),Wt.push(e);else{var i=cp(e,t,n,r);if(i===null)o&&iy(e,r);else{if(o){if(-1<oy.indexOf(e)){e=wf(i,e,t,n,r),Wt.push(e);return}if(O1(i,e,t,n,r))return;iy(e,r)}Kv(e,t,r,null,n)}}}}function cp(e,t,n,r){var o=np(r);if(o=Lr(o),o!==null){var i=Br(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Sv(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 Kv(e,t,r,o,n),null}var zn=null,dp=null,cl=null;function Av(){if(cl)return cl;var e,t=dp,n=t.length,r,o="value"in zn?zn.value:zn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return cl=o.slice(e,1<r?1-r:void 0)}function dl(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 Ja(){return!0}function ay(){return!1}function et(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)?Ja:ay,this.isPropagationStopped=ay,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ja)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ja)},persist:function(){},isPersistent:Ja}),t}var jo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fp=et(jo),Rs=ae({},jo,{view:0,detail:0}),q1=et(Rs),zd,Vd,Ki,$l=ae({},Rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pp,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!==Ki&&(Ki&&e.type==="mousemove"?(zd=e.screenX-Ki.screenX,Vd=e.screenY-Ki.screenY):Vd=zd=0,Ki=e),zd)},movementY:function(e){return"movementY"in e?e.movementY:Vd}}),ly=et($l),G1=ae({},$l,{dataTransfer:0}),X1=et(G1),Q1=ae({},Rs,{relatedTarget:0}),Kd=et(Q1),Y1=ae({},jo,{animationName:0,elapsedTime:0,pseudoElement:0}),Z1=et(Y1),J1=ae({},jo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),e_=et(J1),t_=ae({},jo,{data:0}),uy=et(t_),n_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r_={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"},o_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=o_[e])?!!t[e]:!1}function pp(){return i_}var s_=ae({},Rs,{key:function(e){if(e.key){var t=n_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pp,charCode:function(e){return e.type==="keypress"?dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),a_=et(s_),l_=ae({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=et(l_),u_=ae({},Rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pp}),c_=et(u_),d_=ae({},jo,{propertyName:0,elapsedTime:0,pseudoElement:0}),f_=et(d_),p_=ae({},$l,{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}),m_=et(p_),g_=[9,13,27,32],mp=pn&&"CompositionEvent"in window,as=null;pn&&"documentMode"in document&&(as=document.documentMode);var h_=pn&&"TextEvent"in window&&!as,Ov=pn&&(!mp||as&&8<as&&11>=as),dy=String.fromCharCode(32),fy=!1;function Nv(e,t){switch(e){case"keyup":return g_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var So=!1;function y_(e,t){switch(e){case"compositionend":return Mv(t);case"keypress":return t.which!==32?null:(fy=!0,dy);case"textInput":return e=t.data,e===dy&&fy?null:e;default:return null}}function v_(e,t){if(So)return e==="compositionend"||!mp&&Nv(e,t)?(e=Av(),cl=dp=zn=null,So=!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 Ov&&t.locale!=="ko"?null:t.data;default:return null}}var S_={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 py(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!S_[e.type]:t==="textarea"}function Dv(e,t,n,r){gv(r),t=Cl(t,"onChange"),0<t.length&&(n=new fp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,xs=null;function w_(e){Uv(e,0)}function ql(e){var t=xo(e);if(lv(t))return e}function x_(e,t){if(e==="change")return t}var Fv=!1;pn&&(pn?(tl="oninput"in document,tl||(Wd=document.createElement("div"),Wd.setAttribute("oninput","return;"),tl=typeof Wd.oninput=="function"),el=tl):el=!1,Fv=el&&(!document.documentMode||9<document.documentMode));var el,tl,Wd;function my(){ls&&(ls.detachEvent("onpropertychange",jv),xs=ls=null)}function jv(e){if(e.propertyName==="value"&&ql(xs)){var t=[];if(Dv(t,xs,e,np(e)),e=w_,Ir)e(t);else{Ir=!0;try{rp(e,t)}finally{Ir=!1,ip()}}}}function E_(e,t,n){e==="focusin"?(my(),ls=t,xs=n,ls.attachEvent("onpropertychange",jv)):e==="focusout"&&my()}function C_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ql(xs)}function T_(e,t){if(e==="click")return ql(t)}function __(e,t){if(e==="input"||e==="change")return ql(t)}function b_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:b_,k_=Object.prototype.hasOwnProperty;function Es(e,t){if(pt(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(!k_.call(t,n[r])||!pt(e[n[r]],t[n[r]]))return!1;return!0}function gy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hy(e,t){var n=gy(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=gy(n)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function yy(){for(var e=window,t=Sl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sl(e.document)}return t}function xf(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 P_=pn&&"documentMode"in document&&11>=document.documentMode,wo=null,Ef=null,us=null,Cf=!1;function vy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cf||wo==null||wo!==Sl(r)||(r=wo,"selectionStart"in r&&xf(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}),us&&Es(us,r)||(us=r,r=Cl(Ef,"onSelect"),0<r.length&&(t=new fp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wo)))}lp("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);lp("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);lp(D1,2);for($d="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),nl=0;nl<$d.length;nl++)ap.set($d[nl],0);var $d,nl;No("onMouseEnter",["mouseout","mouseover"]);No("onMouseLeave",["mouseout","mouseover"]);No("onPointerEnter",["pointerout","pointerover"]);No("onPointerLeave",["pointerout","pointerover"]);jr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jr("onBeforeInput",["compositionend","keypress","textInput","paste"]);jr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Bv=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function Sy(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,L1(r,t,void 0,e),e.currentTarget=null}function Uv(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;Sy(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;Sy(o,a,u),i=l}}}if(xl)throw e=vf,xl=!1,vf=null,e}function oe(e,t){var n=$v(t),r=e+"__bubble";n.has(r)||(Vv(t,e,2,!1),n.add(r))}var wy="_reactListening"+Math.random().toString(36).slice(2);function zv(e){e[wy]||(e[wy]=!0,iv.forEach(function(t){Bv.has(t)||xy(t,!1,e,null),xy(t,!0,e,null)}))}function xy(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&&Bv.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=$v(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),Vv(i,e,o,t),s.add(a))}function Vv(e,t,n,r){var o=ap.get(t);switch(o===void 0?2:o){case 0:o=W1;break;case 1:o=$1;break;default:o=up}n=o.bind(null,t,n,e),o=void 0,!yf||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 Kv(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=Lr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}k1(function(){var u=i,c=np(n),p=[];e:{var d=Iv.get(e);if(d!==void 0){var h=fp,y=e;switch(e){case"keypress":if(dl(n)===0)break e;case"keydown":case"keyup":h=a_;break;case"focusin":y="focus",h=Kd;break;case"focusout":y="blur",h=Kd;break;case"beforeblur":case"afterblur":h=Kd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=c_;break;case bv:case kv:case Pv:h=Z1;break;case Rv:h=f_;break;case"scroll":h=q1;break;case"wheel":h=m_;break;case"copy":case"cut":case"paste":h=e_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cy}var v=(t&4)!==0,g=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var f=u,w;f!==null;){w=f;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,m!==null&&(x=ys(f,m),x!=null&&v.push(Cs(f,x,w)))),g)break;f=f.return}0<v.length&&(d=new h(d,y,null,n,c),p.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(Lr(y)||y[Ho]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Lr(y):null,y!==null&&(g=Br(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(v=ly,x="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(v=cy,x="onPointerLeave",m="onPointerEnter",f="pointer"),g=h==null?d:xo(h),w=y==null?d:xo(y),d=new v(x,f+"leave",h,n,c),d.target=g,d.relatedTarget=w,x=null,Lr(c)===u&&(v=new v(m,f+"enter",y,n,c),v.target=w,v.relatedTarget=g,x=v),g=x,h&&y)t:{for(v=h,m=y,f=0,w=v;w;w=go(w))f++;for(w=0,x=m;x;x=go(x))w++;for(;0<f-w;)v=go(v),f--;for(;0<w-f;)m=go(m),w--;for(;f--;){if(v===m||m!==null&&v===m.alternate)break t;v=go(v),m=go(m)}v=null}else v=null;h!==null&&Ey(p,d,h,v,!1),y!==null&&g!==null&&Ey(p,g,y,v,!0)}}e:{if(d=u?xo(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var T=x_;else if(py(d))if(Fv)T=__;else{T=C_;var E=E_}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=T_);if(T&&(T=T(e,u))){Dv(p,T,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&uf(d,"number",d.value)}switch(E=u?xo(u):window,e){case"focusin":(py(E)||E.contentEditable==="true")&&(wo=E,Ef=u,us=null);break;case"focusout":us=Ef=wo=null;break;case"mousedown":Cf=!0;break;case"contextmenu":case"mouseup":case"dragend":Cf=!1,vy(p,n,c);break;case"selectionchange":if(P_)break;case"keydown":case"keyup":vy(p,n,c)}var _;if(mp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else So?Nv(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(Ov&&n.locale!=="ko"&&(So||R!=="onCompositionStart"?R==="onCompositionEnd"&&So&&(_=Av()):(zn=c,dp="value"in zn?zn.value:zn.textContent,So=!0)),E=Cl(u,R),0<E.length&&(R=new uy(R,e,null,n,c),p.push({event:R,listeners:E}),_?R.data=_:(_=Mv(n),_!==null&&(R.data=_)))),(_=h_?y_(e,n):v_(e,n))&&(u=Cl(u,"onBeforeInput"),0<u.length&&(c=new uy("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=_))}Uv(p,t)})}function Cs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ys(e,n),i!=null&&r.unshift(Cs(e,i,o)),i=ys(e,t),i!=null&&r.push(Cs(e,i,o))),e=e.return}return r}function go(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ey(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=ys(n,i),l!=null&&s.unshift(Cs(n,l,a))):o||(l=ys(n,i),l!=null&&s.push(Cs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Tl(){}var qd=null,Gd=null;function Wv(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Tf(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 Cy=typeof setTimeout=="function"?setTimeout:void 0,R_=typeof clearTimeout=="function"?clearTimeout:void 0;function gp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Po(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function Ty(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 Xd=0;function I_(e){return{$$typeof:ep,toString:e,valueOf:e}}var Gl=Math.random().toString(36).slice(2),Vn="__reactFiber$"+Gl,_l="__reactProps$"+Gl,Ho="__reactContainer$"+Gl,_y="__reactEvents$"+Gl;function Lr(e){var t=e[Vn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ho]||n[Vn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ty(e);e!==null;){if(n=e[Vn])return n;e=Ty(e)}return t}e=n,n=e.parentNode}return null}function Is(e){return e=e[Vn]||e[Ho],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function xo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(k(33))}function Xl(e){return e[_l]||null}function $v(e){var t=e[_y];return t===void 0&&(t=e[_y]=new Set),t}var _f=[],Eo=-1;function or(e){return{current:e}}function ie(e){0>Eo||(e.current=_f[Eo],_f[Eo]=null,Eo--)}function de(e,t){Eo++,_f[Eo]=e.current,e.current=t}var tr={},Oe=or(tr),$e=or(!1),Mr=tr;function Mo(e,t){var n=e.type.contextTypes;if(!n)return tr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function qe(e){return e=e.childContextTypes,e!=null}function bl(){ie($e),ie(Oe)}function by(e,t,n){if(Oe.current!==tr)throw Error(k(168));de(Oe,t),de($e,n)}function qv(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(k(108,To(t)||"Unknown",o));return ae({},n,r)}function fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||tr,Mr=Oe.current,de(Oe,e),de($e,$e.current),!0}function ky(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=qv(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,ie($e),ie(Oe),de(Oe,e)):ie($e),de($e,n)}var hp=null,Nr=null,L_=we.unstable_runWithPriority,yp=we.unstable_scheduleCallback,bf=we.unstable_cancelCallback,A_=we.unstable_shouldYield,Py=we.unstable_requestPaint,kf=we.unstable_now,O_=we.unstable_getCurrentPriorityLevel,Ql=we.unstable_ImmediatePriority,Gv=we.unstable_UserBlockingPriority,Xv=we.unstable_NormalPriority,Qv=we.unstable_LowPriority,Yv=we.unstable_IdlePriority,Qd={},N_=Py!==void 0?Py:function(){},ln=null,pl=null,Yd=!1,Ry=kf(),Le=1e4>Ry?kf:function(){return kf()-Ry};function Do(){switch(O_()){case Ql:return 99;case Gv:return 98;case Xv:return 97;case Qv:return 96;case Yv:return 95;default:throw Error(k(332))}}function Zv(e){switch(e){case 99:return Ql;case 98:return Gv;case 97:return Xv;case 96:return Qv;case 95:return Yv;default:throw Error(k(332))}}function Dr(e,t){return e=Zv(e),L_(e,t)}function Ts(e,t,n){return e=Zv(e),yp(e,t,n)}function Qt(){if(pl!==null){var e=pl;pl=null,bf(e)}Jv()}function Jv(){if(!Yd&&ln!==null){Yd=!0;var e=0;try{var t=ln;Dr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),ln=null}catch(n){throw ln!==null&&(ln=ln.slice(e+1)),yp(Ql,Qt),n}finally{Yd=!1}}}var M_=Hr.ReactCurrentBatchConfig;function At(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 kl=or(null),Pl=null,Co=null,Rl=null;function vp(){Rl=Co=Pl=null}function Sp(e){var t=kl.current;ie(kl),e.type._context._currentValue=t}function eS(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 Ro(e,t){Pl=e,Rl=Co=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function ht(e,t){if(Rl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Rl=e,t=1073741823),t={context:e,observedBits:t,next:null},Co===null){if(Pl===null)throw Error(k(308));Co=t,Pl.dependencies={lanes:0,firstContext:t,responders:null}}else Co=Co.next=t;return e._currentValue}var Bn=!1;function wp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function tS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xn(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 Iy(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 _s(e,t,n,r){var o=e.updateQueue;Bn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var h=e,y=i;switch(a=t,d=n,y.tag){case 1:if(h=y.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=y.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,a);break e;case 2:Bn=!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,As|=s,e.lanes=s,e.memoizedState=p}}function Ly(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(k(191,o));o.call(r)}}}var nS=new Ul.Component().refs;function Il(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 Yl={isMounted:function(e){return(e=e._reactInternals)?Br(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Qn(e),i=Gn(r,o);i.payload=t,n!=null&&(i.callback=n),Xn(e,i),Yn(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Je(),o=Qn(e),i=Gn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Xn(e,i),Yn(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Je(),r=Qn(e),o=Gn(n,r);o.tag=2,t!=null&&(o.callback=t),Xn(e,o),Yn(e,r,n)}};function Ay(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?!Es(n,r)||!Es(o,i):!0}function rS(e,t,n){var r=!1,o=tr,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=qe(t)?Mr:Oe.current,r=t.contextTypes,i=(r=r!=null)?Mo(e,o):tr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Yl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Oy(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&&Yl.enqueueReplaceState(t,t.state,null)}function Pf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=nS,wp(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=qe(t)?Mr:Oe.current,o.context=Mo(e,i)),_s(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Il(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&&Yl.enqueueReplaceState(o,o.state,null),_s(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var rl=Array.isArray;function Wi(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(k(309));var r=n.stateNode}if(!r)throw Error(k(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===nS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(k(284));if(!n._owner)throw Error(k(290,e))}return e}function ol(e,t){if(e.type!=="textarea")throw Error(k(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function oS(e){function t(g,m){if(e){var f=g.lastEffect;f!==null?(f.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=rr(g,m),g.index=0,g.sibling=null,g}function i(g,m,f){return g.index=f,e?(f=g.alternate,f!==null?(f=f.index,f<m?(g.flags=2,m):f):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,f,w){return m===null||m.tag!==6?(m=nf(f,g.mode,w),m.return=g,m):(m=o(m,f),m.return=g,m)}function l(g,m,f,w){return m!==null&&m.elementType===f.type?(w=o(m,f.props),w.ref=Wi(g,m,f),w.return=g,w):(w=yl(f.type,f.key,f.props,null,g.mode,w),w.ref=Wi(g,m,f),w.return=g,w)}function u(g,m,f,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==f.containerInfo||m.stateNode.implementation!==f.implementation?(m=rf(f,g.mode,w),m.return=g,m):(m=o(m,f.children||[]),m.return=g,m)}function c(g,m,f,w,x){return m===null||m.tag!==7?(m=Oo(f,g.mode,w,x),m.return=g,m):(m=o(m,f),m.return=g,m)}function p(g,m,f){if(typeof m=="string"||typeof m=="number")return m=nf(""+m,g.mode,f),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Zi:return f=yl(m.type,m.key,m.props,null,g.mode,f),f.ref=Wi(g,null,m),f.return=g,f;case Rr:return m=rf(m,g.mode,f),m.return=g,m}if(rl(m)||Bi(m))return m=Oo(m,g.mode,f,null),m.return=g,m;ol(g,m)}return null}function d(g,m,f,w){var x=m!==null?m.key:null;if(typeof f=="string"||typeof f=="number")return x!==null?null:a(g,m,""+f,w);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Zi:return f.key===x?f.type===Un?c(g,m,f.props.children,w,x):l(g,m,f,w):null;case Rr:return f.key===x?u(g,m,f,w):null}if(rl(f)||Bi(f))return x!==null?null:c(g,m,f,w,null);ol(g,f)}return null}function h(g,m,f,w,x){if(typeof w=="string"||typeof w=="number")return g=g.get(f)||null,a(m,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Zi:return g=g.get(w.key===null?f:w.key)||null,w.type===Un?c(m,g,w.props.children,x,w.key):l(m,g,w,x);case Rr:return g=g.get(w.key===null?f:w.key)||null,u(m,g,w,x)}if(rl(w)||Bi(w))return g=g.get(f)||null,c(m,g,w,x,null);ol(m,w)}return null}function y(g,m,f,w){for(var x=null,T=null,E=m,_=m=0,R=null;E!==null&&_<f.length;_++){E.index>_?(R=E,E=null):R=E.sibling;var b=d(g,E,f[_],w);if(b===null){E===null&&(E=R);break}e&&E&&b.alternate===null&&t(g,E),m=i(b,m,_),T===null?x=b:T.sibling=b,T=b,E=R}if(_===f.length)return n(g,E),x;if(E===null){for(;_<f.length;_++)E=p(g,f[_],w),E!==null&&(m=i(E,m,_),T===null?x=E:T.sibling=E,T=E);return x}for(E=r(g,E);_<f.length;_++)R=h(E,g,_,f[_],w),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),m=i(R,m,_),T===null?x=R:T.sibling=R,T=R);return e&&E.forEach(function(B){return t(g,B)}),x}function v(g,m,f,w){var x=Bi(f);if(typeof x!="function")throw Error(k(150));if(f=x.call(f),f==null)throw Error(k(151));for(var T=x=null,E=m,_=m=0,R=null,b=f.next();E!==null&&!b.done;_++,b=f.next()){E.index>_?(R=E,E=null):R=E.sibling;var B=d(g,E,b.value,w);if(B===null){E===null&&(E=R);break}e&&E&&B.alternate===null&&t(g,E),m=i(B,m,_),T===null?x=B:T.sibling=B,T=B,E=R}if(b.done)return n(g,E),x;if(E===null){for(;!b.done;_++,b=f.next())b=p(g,b.value,w),b!==null&&(m=i(b,m,_),T===null?x=b:T.sibling=b,T=b);return x}for(E=r(g,E);!b.done;_++,b=f.next())b=h(E,g,_,b.value,w),b!==null&&(e&&b.alternate!==null&&E.delete(b.key===null?_:b.key),m=i(b,m,_),T===null?x=b:T.sibling=b,T=b);return e&&E.forEach(function(re){return t(g,re)}),x}return function(g,m,f,w){var x=typeof f=="object"&&f!==null&&f.type===Un&&f.key===null;x&&(f=f.props.children);var T=typeof f=="object"&&f!==null;if(T)switch(f.$$typeof){case Zi:e:{for(T=f.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(f.type===Un){n(g,x.sibling),m=o(x,f.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===f.type){n(g,x.sibling),m=o(x,f.props),m.ref=Wi(g,x,f),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}f.type===Un?(m=Oo(f.props.children,g.mode,w,f.key),m.return=g,g=m):(w=yl(f.type,f.key,f.props,null,g.mode,w),w.ref=Wi(g,m,f),w.return=g,g=w)}return s(g);case Rr:e:{for(x=f.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===f.containerInfo&&m.stateNode.implementation===f.implementation){n(g,m.sibling),m=o(m,f.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=rf(f,g.mode,w),m.return=g,g=m}return s(g)}if(typeof f=="string"||typeof f=="number")return f=""+f,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,f),m.return=g,g=m):(n(g,m),m=nf(f,g.mode,w),m.return=g,g=m),s(g);if(rl(f))return y(g,m,f,w);if(Bi(f))return v(g,m,f,w);if(T&&ol(g,f),typeof f>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(k(152,To(g.type)||"Component"))}return n(g,m)}}var Ll=oS(!0),iS=oS(!1),Ls={},Gt=or(Ls),bs=or(Ls),ks=or(Ls);function Ar(e){if(e===Ls)throw Error(k(174));return e}function Rf(e,t){switch(de(ks,t),de(bs,e),de(Gt,Ls),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:pf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=pf(t,e)}ie(Gt),de(Gt,t)}function Fo(){ie(Gt),ie(bs),ie(ks)}function Ny(e){Ar(ks.current);var t=Ar(Gt.current),n=pf(t,e.type);t!==n&&(de(bs,e),de(Gt,n))}function xp(e){bs.current===e&&(ie(Gt),ie(bs))}var ce=or(0);function Al(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 cn=null,Kn=null,Xt=!1;function sS(e,t){var n=mt(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 My(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 If(e){if(Xt){var t=Kn;if(t){var n=t;if(!My(e,t)){if(t=Po(n.nextSibling),!t||!My(e,t)){e.flags=e.flags&-1025|2,Xt=!1,cn=e;return}sS(cn,n)}cn=e,Kn=Po(t.firstChild)}else e.flags=e.flags&-1025|2,Xt=!1,cn=e}}function Dy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;cn=e}function il(e){if(e!==cn)return!1;if(!Xt)return Dy(e),Xt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Tf(t,e.memoizedProps))for(t=Kn;t;)sS(e,t),t=Po(t.nextSibling);if(Dy(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(k(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kn=Po(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kn=null}}else Kn=cn?Po(e.stateNode.nextSibling):null;return!0}function Zd(){Kn=cn=null,Xt=!1}var Io=[];function Ep(){for(var e=0;e<Io.length;e++)Io[e]._workInProgressVersionPrimary=null;Io.length=0}var cs=Hr.ReactCurrentDispatcher,gt=Hr.ReactCurrentBatchConfig,Ps=0,me=null,Ie=null,_e=null,Ol=!1,ds=!1;function Ke(){throw Error(k(321))}function Cp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pt(e[n],t[n]))return!1;return!0}function Tp(e,t,n,r,o,i){if(Ps=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=e===null||e.memoizedState===null?F_:j_,e=n(r,o),ds){i=0;do{if(ds=!1,!(25>i))throw Error(k(301));i+=1,_e=Ie=null,t.updateQueue=null,cs.current=H_,e=n(r,o)}while(ds)}if(cs.current=Fl,t=Ie!==null&&Ie.next!==null,Ps=0,_e=Ie=me=null,Ol=!1,t)throw Error(k(300));return e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?me.memoizedState=_e=e:_e=_e.next=e,_e}function Ur(){if(Ie===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=_e===null?me.memoizedState:_e.next;if(t!==null)_e=t,Ie=e;else{if(e===null)throw Error(k(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},_e===null?me.memoizedState=_e=e:_e=_e.next=e}return _e}function $t(e,t){return typeof t=="function"?t(e):t}function $i(e){var t=Ur(),n=t.queue;if(n===null)throw Error(k(311));n.lastRenderedReducer=e;var r=Ie,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((Ps&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,me.lanes|=u,As|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,pt(r,t.memoizedState)||(Ot=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function qi(e){var t=Ur(),n=t.queue;if(n===null)throw Error(k(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);pt(i,t.memoizedState)||(Ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Fy(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=(Ps&e)===e)&&(t._workInProgressVersionPrimary=r,Io.push(t))),e)return n(t._source);throw Io.push(t),Error(k(350))}function aS(e,t,n,r){var o=He;if(o===null)throw Error(k(349));var i=t._getVersion,s=i(t._source),a=cs.current,l=a.useState(function(){return Fy(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,y=p.source;p=p.subscribe;var v=me;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!pt(s,g)){g=n(t._source),pt(c,g)||(u(g),g=Qn(v),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,f=g;0<f;){var w=31-er(f),x=1<<w;m[w]|=g,f&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var f=Qn(v);o.mutableReadLanes|=f&o.pendingLanes}catch(w){m(function(){throw w})}})},[t,r]),pt(h,n)&&pt(y,t)&&pt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:$t,lastRenderedState:c},e.dispatch=u=kp.bind(null,me,e),l.queue=e,l.baseQueue=null,c=Fy(o,t,n),l.memoizedState=l.baseState=c),c}function lS(e,t,n){var r=Ur();return aS(r,e,t,n)}function Gi(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:$t,lastRenderedState:e},e=e.dispatch=kp.bind(null,me,e),[t.memoizedState,e]}function Nl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null},me.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 jy(e){var t=Or();return e={current:e},t.memoizedState=e}function Ml(){return Ur().memoizedState}function Lf(e,t,n,r){var o=Or();me.flags|=e,o.memoizedState=Nl(1|t,n,void 0,r===void 0?null:r)}function _p(e,t,n,r){var o=Ur();r=r===void 0?null:r;var i=void 0;if(Ie!==null){var s=Ie.memoizedState;if(i=s.destroy,r!==null&&Cp(r,s.deps)){Nl(t,n,i,r);return}}me.flags|=e,o.memoizedState=Nl(1|t,n,i,r)}function Hy(e,t){return Lf(516,4,e,t)}function Dl(e,t){return _p(516,4,e,t)}function uS(e,t){return _p(4,2,e,t)}function cS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dS(e,t,n){return n=n!=null?n.concat([e]):null,_p(4,2,cS.bind(null,t,e),n)}function bp(){}function fS(e,t){var n=Ur();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function pS(e,t){var n=Ur();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Cp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function D_(e,t){var n=Do();Dr(98>n?98:n,function(){e(!0)}),Dr(97<n?97:n,function(){var r=gt.transition;gt.transition=1;try{e(!1),t()}finally{gt.transition=r}})}function kp(e,t,n){var r=Je(),o=Qn(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===me||s!==null&&s===me)ds=Ol=!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,pt(l,a))return}catch{}finally{}Yn(e,o,r)}}var Fl={readContext:ht,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},F_={readContext:ht,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Hy,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lf(4,2,cS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lf(4,2,e,t)},useMemo:function(e,t){var n=Or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Or();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=kp.bind(null,me,e),[r.memoizedState,e]},useRef:jy,useState:Gi,useDebugValue:bp,useDeferredValue:function(e){var t=Gi(e),n=t[0],r=t[1];return Hy(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=Gi(!1),t=e[0];return e=D_.bind(null,e[1]),jy(e),[e,t]},useMutableSource:function(e,t,n){var r=Or();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},aS(r,e,t,n)},useOpaqueIdentifier:function(){if(Xt){var e=!1,t=I_(function(){throw e||(e=!0,n("r:"+(Xd++).toString(36))),Error(k(355))}),n=Gi(t)[1];return!(me.mode&2)&&(me.flags|=516,Nl(5,function(){n("r:"+(Xd++).toString(36))},void 0,null)),t}return t="r:"+(Xd++).toString(36),Gi(t),t},unstable_isNewReconciler:!1},j_={readContext:ht,useCallback:fS,useContext:ht,useEffect:Dl,useImperativeHandle:dS,useLayoutEffect:uS,useMemo:pS,useReducer:$i,useRef:Ml,useState:function(){return $i($t)},useDebugValue:bp,useDeferredValue:function(e){var t=$i($t),n=t[0],r=t[1];return Dl(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=$i($t)[0];return[Ml().current,e]},useMutableSource:lS,useOpaqueIdentifier:function(){return $i($t)[0]},unstable_isNewReconciler:!1},H_={readContext:ht,useCallback:fS,useContext:ht,useEffect:Dl,useImperativeHandle:dS,useLayoutEffect:uS,useMemo:pS,useReducer:qi,useRef:Ml,useState:function(){return qi($t)},useDebugValue:bp,useDeferredValue:function(e){var t=qi($t),n=t[0],r=t[1];return Dl(function(){var o=gt.transition;gt.transition=1;try{r(e)}finally{gt.transition=o}},[e]),n},useTransition:function(){var e=qi($t)[0];return[Ml().current,e]},useMutableSource:lS,useOpaqueIdentifier:function(){return qi($t)[0]},unstable_isNewReconciler:!1},B_=Hr.ReactCurrentOwner,Ot=!1;function We(e,t,n,r){t.child=e===null?iS(t,null,n,r):Ll(t,e.child,n,r)}function By(e,t,n,r,o){n=n.render;var i=t.ref;return Ro(t,o),r=Tp(e,t,n,r,i,o),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,dn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Uy(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Op(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mS(e,t,s,r,o,i)):(e=yl(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:Es,n(o,r)&&e.ref===t.ref)?dn(e,t,i):(t.flags|=1,e=rr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function mS(e,t,n,r,o,i){if(e!==null&&Es(e.memoizedProps,r)&&e.ref===t.ref)if(Ot=!1,(i&o)!==0)e.flags&16384&&(Ot=!0);else return t.lanes=e.lanes,dn(e,t,i);return Af(e,t,n,r,i)}function Jd(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},al(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},al(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},al(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,al(t,r);return We(e,t,o,n),t.child}function gS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Af(e,t,n,r,o){var i=qe(n)?Mr:Oe.current;return i=Mo(t,i),Ro(t,o),n=Tp(e,t,n,r,i,o),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,dn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function zy(e,t,n,r,o){if(qe(n)){var i=!0;fl(t)}else i=!1;if(Ro(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),rS(t,n,r),Pf(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=ht(u):(u=qe(n)?Mr:Oe.current,u=Mo(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)&&Oy(t,s,r,u),Bn=!1;var d=t.memoizedState;s.state=d,_s(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Bn?(typeof c=="function"&&(Il(t,n,c,r),l=t.memoizedState),(a=Bn||Ay(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,tS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:At(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=ht(l):(l=qe(n)?Mr:Oe.current,l=Mo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&Oy(t,s,r,l),Bn=!1,d=t.memoizedState,s.state=d,_s(t,r,s,o);var y=t.memoizedState;a!==p||d!==y||$e.current||Bn?(typeof h=="function"&&(Il(t,n,h,r),y=t.memoizedState),(u=Bn||Ay(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 Of(e,t,n,r,i,o)}function Of(e,t,n,r,o,i){gS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&ky(t,n,!1),dn(e,t,i);r=t.stateNode,B_.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ll(t,e.child,null,i),t.child=Ll(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&ky(t,n,!0),t.child}function Vy(e){var t=e.stateNode;t.pendingContext?by(e,t.pendingContext,t.pendingContext!==t.context):t.context&&by(e,t.context,!1),Rf(e,t.containerInfo)}var sl={dehydrated:null,retryLane:0};function Ky(e,t,n){var r=t.pendingProps,o=ce.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),de(ce,o&1),e===null?(r.fallback!==void 0&&If(t),e=r.children,o=r.fallback,i?(e=Wy(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=sl,e):typeof r.unstable_expectedLoadTime=="number"?(e=Wy(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=sl,t.lanes=33554432,e):(n=Np({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=qy(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=sl,r):(n=$y(e,t,r.children,n),t.memoizedState=null,n):i?(r=qy(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=sl,r):(n=$y(e,t,r.children,n),t.memoizedState=null,n)}function Wy(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=Np(t,o,0,null),n=Oo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function $y(e,t,n,r){var o=e.child;return e=o.sibling,n=rr(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 qy(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=rr(s,a),e!==null?r=rr(e,r):(r=Oo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Gy(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),eS(e.return,t)}function ef(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 Xy(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gy(e,n);else if(e.tag===19)Gy(e,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Al(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ef(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&&Al(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ef(t,!0,n,null,i,t.lastEffect);break;case"together":ef(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),As|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(k(153));if(t.child!==null){for(e=t.child,n=rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var hS,Nf,yS,vS;hS=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}};Nf=function(){};yS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ar(Gt.current);var i=null;switch(n){case"input":o=af(e,o),r=af(e,r),i=[];break;case"option":o=cf(e,o),r=cf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=df(e,o),r=df(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tl)}mf(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"&&(gs.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"&&(gs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&oe("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===ep?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};vS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xi(e,t){if(!Xt)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 U_(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return qe(t.type)&&bl(),null;case 3:return Fo(),ie($e),ie(Oe),Ep(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(il(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Nf(t),null;case 5:xp(t);var o=Ar(ks.current);if(n=t.type,e!==null&&t.stateNode!=null)yS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(k(166));return null}if(e=Ar(Gt.current),il(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Vn]=t,r[_l]=i,n){case"dialog":oe("cancel",r),oe("close",r);break;case"iframe":case"object":case"embed":oe("load",r);break;case"video":case"audio":for(e=0;e<es.length;e++)oe(es[e],r);break;case"source":oe("error",r);break;case"img":case"image":case"link":oe("error",r),oe("load",r);break;case"details":oe("toggle",r);break;case"input":Yh(r,i),oe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},oe("invalid",r);break;case"textarea":Jh(r,i),oe("invalid",r)}mf(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]):gs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&oe("scroll",r));switch(n){case"input":Qa(r),Zh(r,i,!0);break;case"textarea":Qa(r),ey(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Tl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===ff.html&&(e=dv(n)),e===ff.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[Vn]=t,e[_l]=r,hS(e,t,!1,!1),t.stateNode=e,s=gf(n,r),n){case"dialog":oe("cancel",e),oe("close",e),o=r;break;case"iframe":case"object":case"embed":oe("load",e),o=r;break;case"video":case"audio":for(o=0;o<es.length;o++)oe(es[o],e);o=r;break;case"source":oe("error",e),o=r;break;case"img":case"image":case"link":oe("error",e),oe("load",e),o=r;break;case"details":oe("toggle",e),o=r;break;case"input":Yh(e,r),o=af(e,r),oe("invalid",e);break;case"option":o=cf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),oe("invalid",e);break;case"textarea":Jh(e,r),o=df(e,r),oe("invalid",e);break;default:o=r}mf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?mv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&fv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&hs(e,l):typeof l=="number"&&hs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(gs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&oe("scroll",e):l!=null&&Gf(e,i,l,s))}switch(n){case"input":Qa(e),Zh(e,r,!1);break;case"textarea":Qa(e),ey(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Jn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?_o(e,!!r.multiple,i,!1):r.defaultValue!=null&&_o(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Tl)}Wv(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)vS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(k(166));n=Ar(ks.current),Ar(Gt.current),il(t)?(r=t.stateNode,n=t.memoizedProps,r[Vn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Vn]=t,t.stateNode=r)}return null;case 13:return ie(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&il(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?be===0&&(be=3):((be===0||be===3)&&(be=4),He===null||!(As&134217727)&&!(Uo&134217727)||Lo(He,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Fo(),Nf(t),e===null&&zv(t.stateNode.containerInfo),null;case 10:return Sp(t),null;case 17:return qe(t.type)&&bl(),null;case 19:if(ie(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Xi(r,!1);else{if(be!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Al(e),s!==null){for(t.flags|=64,Xi(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Le()>Bf&&(t.flags|=64,i=!0,Xi(r,!1),t.lanes=33554432)}else{if(!i)if(e=Al(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Xt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>Bf&&n!==1073741824&&(t.flags|=64,i=!0,Xi(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Ap(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(k(156,t.tag))}function z_(e){switch(e.tag){case 1:qe(e.type)&&bl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Fo(),ie($e),ie(Oe),Ep(),t=e.flags,t&64)throw Error(k(285));return e.flags=t&-4097|64,e;case 5:return xp(e),null;case 13:return ie(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ie(ce),null;case 4:return Fo(),null;case 10:return Sp(e),null;case 23:case 24:return Ap(),null;default:return null}}function Pp(e,t){try{var n="",r=t;do n+=E1(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
6
|
+
Error generating stack: `+i.message+`
|
|
7
|
+
`+i.stack}return{value:e,source:t,stack:o}}function Mf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var V_=typeof WeakMap=="function"?WeakMap:Map;function SS(e,t,n){n=Gn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Uf=r),Mf(e,t)},n}function wS(e,t,n){n=Gn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Mf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(qt===null?qt=new Set([this]):qt.add(this),Mf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var K_=typeof WeakSet=="function"?WeakSet:Set;function Qy(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Zn(e,n)}else t.current=null}function W_(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:At(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&gp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(k(163))}function $_(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&&(RS(n,e),eb(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:At(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Ly(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}Ly(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&Wv(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&&Tv(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(k(163))}function Yy(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=pv("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 Zy(e,t){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(hp,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)RS(t,n);else{r=t;try{o()}catch(i){Zn(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Qy(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Zn(t,i)}break;case 5:Qy(t);break;case 4:xS(e,t)}}function Jy(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 ev(e){return e.tag===5||e.tag===3||e.tag===4}function tv(e){e:{for(var t=e.return;t!==null;){if(ev(t))break e;t=t.return}throw Error(k(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(k(161))}n.flags&16&&(hs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||ev(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?Df(e,n,t):Ff(e,n,t)}function Df(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=Tl));else if(r!==4&&(e=e.child,e!==null))for(Df(e,t,n),e=e.sibling;e!==null;)Df(e,t,n),e=e.sibling}function Ff(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(Ff(e,t,n),e=e.sibling;e!==null;)Ff(e,t,n),e=e.sibling}function xS(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(k(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(Zy(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(Zy(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 tf(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[_l]=r,e==="input"&&r.type==="radio"&&r.name!=null&&uv(n,r),gf(e,o),t=gf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?mv(n,a):s==="dangerouslySetInnerHTML"?fv(n,a):s==="children"?hs(n,a):Gf(n,s,a,t)}switch(e){case"input":lf(n,r);break;case"textarea":cv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?_o(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?_o(n,!!r.multiple,r.defaultValue,!0):_o(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(k(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,Tv(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Lp=Le(),Yy(t.child,!0)),nv(t);return;case 19:nv(t);return;case 17:return;case 23:case 24:Yy(t,t.memoizedState!==null);return}throw Error(k(163))}function nv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new K_),t.forEach(function(r){var o=rb.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function q_(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var G_=Math.ceil,jl=Hr.ReactCurrentDispatcher,Rp=Hr.ReactCurrentOwner,M=0,He=null,ve=null,Ae=0,Fr=0,jf=or(0),be=0,Zl=null,Bo=0,As=0,Uo=0,Ip=0,Hf=null,Lp=0,Bf=1/0;function zo(){Bf=Le()+500}var L=null,Hl=!1,Uf=null,qt=null,nr=!1,fs=null,ts=90,zf=[],Vf=[],fn=null,ps=0,Kf=null,ml=-1,un=0,gl=0,ms=null,hl=!1;function Je(){return M&48?Le():ml!==-1?ml:ml=Le()}function Qn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Do()===99?1:2;if(un===0&&(un=Bo),M_.transition!==0){gl!==0&&(gl=Hf!==null?Hf.pendingLanes:0),e=un;var t=4186112&~gl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Do(),M&4&&e===98?e=El(12,un):(e=j1(e),e=El(e,un)),e}function Yn(e,t,n){if(50<ps)throw ps=0,Kf=null,Error(k(185));if(e=Jl(e,t),e===null)return null;Wl(e,t,n),e===He&&(Uo|=t,be===4&&Lo(e,Ae));var r=Do();t===1?M&8&&!(M&48)?Wf(e):(yt(e,n),M===0&&(zo(),Qt())):(!(M&4)||r!==98&&r!==99||(fn===null?fn=new Set([e]):fn.add(e)),yt(e,n)),Hf=e}function Jl(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 yt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-er(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,ho(l);var c=te;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=ws(e,e===He?Ae:0),t=te,r===0)n!==null&&(n!==Qd&&bf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Qd&&bf(n)}t===15?(n=Wf.bind(null,e),ln===null?(ln=[n],pl=yp(Ql,Jv)):ln.push(n),n=Qd):t===14?n=Ts(99,Wf.bind(null,e)):(n=H1(t),n=Ts(n,ES.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function ES(e){if(ml=-1,gl=un=0,M&48)throw Error(k(327));var t=e.callbackNode;if(ir()&&e.callbackNode!==t)return null;var n=ws(e,e===He?Ae:0);if(n===0)return null;var r=n,o=M;M|=16;var i=bS();(He!==e||Ae!==r)&&(zo(),Ao(e,r));do try{Y_();break}catch(a){_S(e,a)}while(1);if(vp(),jl.current=i,M=o,ve!==null?r=0:(He=null,Ae=0,r=be),Bo&Uo)Ao(e,0);else if(r!==0){if(r===2&&(M|=64,e.hydrate&&(e.hydrate=!1,gp(e.containerInfo)),n=Lv(e),n!==0&&(r=ns(e,n))),r===1)throw t=Zl,Ao(e,0),Lo(e,n),yt(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(k(345));case 2:Pr(e);break;case 3:if(Lo(e,n),(n&62914560)===n&&(r=Lp+500-Le(),10<r)){if(ws(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Je(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Cy(Pr.bind(null,e),r);break}Pr(e);break;case 4:if(Lo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-er(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*G_(n/1960))-n,10<n){e.timeoutHandle=Cy(Pr.bind(null,e),n);break}Pr(e);break;case 5:Pr(e);break;default:throw Error(k(329))}}return yt(e,Le()),e.callbackNode===t?ES.bind(null,e):null}function Lo(e,t){for(t&=~Ip,t&=~Uo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-er(t),r=1<<n;e[n]=-1,t&=~r}}function Wf(e){if(M&48)throw Error(k(327));if(ir(),e===He&&e.expiredLanes&Ae){var t=Ae,n=ns(e,t);Bo&Uo&&(t=ws(e,t),n=ns(e,t))}else t=ws(e,0),n=ns(e,t);if(e.tag!==0&&n===2&&(M|=64,e.hydrate&&(e.hydrate=!1,gp(e.containerInfo)),t=Lv(e),t!==0&&(n=ns(e,t))),n===1)throw n=Zl,Ao(e,0),Lo(e,t),yt(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pr(e),yt(e,Le()),null}function X_(){if(fn!==null){var e=fn;fn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,yt(t,Le())})}Qt()}function CS(e,t){var n=M;M|=1;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}}function TS(e,t){var n=M;M&=-2,M|=8;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}}function al(e,t){de(jf,Fr),Fr|=t,Bo|=t}function Ap(){Fr=jf.current,ie(jf)}function Ao(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,R_(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&bl();break;case 3:Fo(),ie($e),ie(Oe),Ep();break;case 5:xp(r);break;case 4:Fo();break;case 13:ie(ce);break;case 19:ie(ce);break;case 10:Sp(r);break;case 23:case 24:Ap()}n=n.return}He=e,ve=rr(e.current,null),Ae=Fr=Bo=t,be=0,Zl=null,Ip=Uo=As=0}function _S(e,t){do{var n=ve;try{if(vp(),cs.current=Fl,Ol){for(var r=me.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ol=!1}if(Ps=0,_e=Ie=me=null,ds=!1,Rp.current=null,n===null||n.return===null){be=1,Zl=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(ce.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var y=d.memoizedState;if(y!==null)h=y.dehydrated!==null;else{var v=d.memoizedProps;h=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(h){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var f=Gn(-1,1);f.tag=2,Xn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new V_,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=nb.bind(null,i,u,a);u.then(x,x)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((To(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
8
|
+
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}be!==5&&(be=2),l=Pp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=SS(d,i,t);Iy(d,T);break e;case 1:i=l;var E=d.type,_=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(qt===null||!qt.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=wS(d,i,t);Iy(d,R);break e}}d=d.return}while(d!==null)}PS(n)}catch(b){t=b,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function bS(){var e=jl.current;return jl.current=Fl,e===null?Fl:e}function ns(e,t){var n=M;M|=16;var r=bS();He===e&&Ae===t||Ao(e,t);do try{Q_();break}catch(o){_S(e,o)}while(1);if(vp(),M=n,jl.current=r,ve!==null)throw Error(k(261));return He=null,Ae=0,be}function Q_(){for(;ve!==null;)kS(ve)}function Y_(){for(;ve!==null&&!A_();)kS(ve)}function kS(e){var t=IS(e.alternate,e,Fr);e.memoizedProps=e.pendingProps,t===null?PS(e):ve=t,Rp.current=null}function PS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=z_(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=U_(n,t,Fr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Fr&1073741824||!(n.mode&4)){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);be===0&&(be=5)}function Pr(e){var t=Do();return Dr(99,Z_.bind(null,e,t)),null}function Z_(e,t){do ir();while(fs!==null);if(M&48)throw Error(k(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(k(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-er(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(fn!==null&&!(r&24)&&fn.has(e)&&fn.delete(e),e===He&&(ve=He=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=M,M|=32,Rp.current=null,qd=ul,s=yy(),xf(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,h=0,y=0,v=s,g=null;t:for(;;){for(var m;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),(m=v.firstChild)!==null;)g=v,v=m;for(;;){if(v===s)break t;if(g===a&&++h===i&&(p=c),g===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Gd={focusedElem:s,selectionRange:a},ul=!1,ms=null,hl=!1,L=r;do try{J_()}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);ms=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&hs(L.stateNode,""),f&128){var w=L.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(f&1038){case 2:tv(L),L.flags&=-3;break;case 6:tv(L),L.flags&=-3,tf(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,tf(L.alternate,L);break;case 4:tf(L.alternate,L);break;case 8:a=L,xS(s,a);var T=a.alternate;Jy(a),T!==null&&Jy(T)}L=L.nextEffect}}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);if(x=Gd,w=yy(),f=x.focusedElem,s=x.selectionRange,w!==f&&f&&f.ownerDocument&&Hv(f.ownerDocument.documentElement,f)){for(s!==null&&xf(f)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in f?(f.selectionStart=w,f.selectionEnd=Math.min(x,f.value.length)):(x=(w=f.ownerDocument||document)&&w.defaultView||window,x.getSelection&&(x=x.getSelection(),a=f.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!x.extend&&T>s&&(a=s,s=T,T=a),a=hy(f,T),i=hy(f,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=f;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<w.length;f++)x=w[f],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}ul=!!qd,Gd=qd=null,e.current=n,L=r;do try{for(f=e;L!==null;){var E=L.flags;if(E&36&&$_(f,L.alternate,L),E&128){w=void 0;var _=L.ref;if(_!==null){var R=L.stateNode;switch(L.tag){case 5:w=R;break;default:w=R}typeof _=="function"?_(w):_.current=w}}L=L.nextEffect}}catch(b){if(L===null)throw Error(k(330));Zn(L,b),L=L.nextEffect}while(L!==null);L=null,N_(),M=o}else e.current=n;if(nr)nr=!1,fs=e,ts=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(E=L,E.sibling=null,E.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(qt=null),r===1?e===Kf?ps++:(ps=0,Kf=e):ps=0,n=n.stateNode,Nr&&typeof Nr.onCommitFiberRoot=="function")try{Nr.onCommitFiberRoot(hp,n,void 0,(n.current.flags&64)===64)}catch{}if(yt(e,Le()),Hl)throw Hl=!1,e=Uf,Uf=null,e;return M&8||Qt(),null}function J_(){for(;L!==null;){var e=L.alternate;hl||ms===null||(L.flags&8?ry(L,ms)&&(hl=!0):L.tag===13&&q_(e,L)&&ry(L,ms)&&(hl=!0));var t=L.flags;t&256&&W_(e,L),!(t&512)||nr||(nr=!0,Ts(97,function(){return ir(),null})),L=L.nextEffect}}function ir(){if(ts!==90){var e=97<ts?97:ts;return ts=90,Dr(e,tb)}return!1}function eb(e,t){zf.push(t,e),nr||(nr=!0,Ts(97,function(){return ir(),null}))}function RS(e,t){Vf.push(t,e),nr||(nr=!0,Ts(97,function(){return ir(),null}))}function tb(){if(fs===null)return!1;var e=fs;if(fs=null,M&48)throw Error(k(331));var t=M;M|=32;var n=Vf;Vf=[];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(k(330));Zn(i,l)}}for(n=zf,zf=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(k(330));Zn(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 M=t,Qt(),!0}function rv(e,t,n){t=Pp(n,t),t=SS(e,t,1),Xn(e,t),t=Je(),e=Jl(e,1),e!==null&&(Wl(e,1,t),yt(e,t))}function Zn(e,t){if(e.tag===3)rv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){rv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r))){e=Pp(t,e);var o=wS(n,e,1);if(Xn(n,o),o=Je(),n=Jl(n,1),n!==null)Wl(n,1,o),yt(n,o);else if(typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function nb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Je(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Ae&n)===n&&(be===4||be===3&&(Ae&62914560)===Ae&&500>Le()-Lp?Ao(e,0):Ip|=n),yt(e,t)}function rb(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(un===0&&(un=Bo),t=yo(62914560&~un),t===0&&(t=4194304)):t=Do()===99?1:2:t=1),n=Je(),e=Jl(e,t),e!==null&&(Wl(e,t,n),yt(e,n))}var IS;IS=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Ot=!0;else if(n&r)Ot=!!(e.flags&16384);else{switch(Ot=!1,t.tag){case 3:Vy(t),Zd();break;case 5:Ny(t);break;case 1:qe(t.type)&&fl(t);break;case 4:Rf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(kl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Ky(e,t,n):(de(ce,ce.current&1),t=dn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Xy(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,Jd(e,t,n)}return dn(e,t,n)}else Ot=!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=Mo(t,Oe.current),Ro(t,n),o=Tp(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)){var i=!0;fl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,wp(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Il(t,r,s,e),o.updater=Yl,t.stateNode=o,o._reactInternals=t,Pf(t,r,e,n),t=Of(null,t,r,!0,i,n)}else t.tag=0,We(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=ib(o),e=At(o,e),i){case 0:t=Af(null,t,o,e,n);break e;case 1:t=zy(null,t,o,e,n);break e;case 11:t=By(null,t,o,e,n);break e;case 14:t=Uy(null,t,o,At(o.type,e),r,n);break e}throw Error(k(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Af(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),zy(e,t,r,o,n);case 3:if(Vy(t),r=t.updateQueue,e===null||r===null)throw Error(k(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,tS(e,t),_s(t,r,null,n),r=t.memoizedState.element,r===o)Zd(),t=dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Kn=Po(t.stateNode.containerInfo.firstChild),cn=t,i=Xt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Io.push(i);for(n=iS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),Zd();t=t.child}return t;case 5:return Ny(t),e===null&&If(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Tf(r,o)?s=null:i!==null&&Tf(r,i)&&(t.flags|=16),gS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&If(t),null;case 13:return Ky(e,t,n);case 4:return Rf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ll(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),By(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(de(kl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=pt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=dn(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=Gn(-1,n&-n),u.tag=2,Xn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),eS(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ro(t,n),o=ht(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=At(o,t.pendingProps),i=At(o.type,i),Uy(e,t,o,i,r,n);case 15:return mS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,fl(t)):e=!1,Ro(t,n),rS(t,r,o),Pf(t,r,o,n),Of(null,t,r,!0,e,n);case 19:return Xy(e,t,n);case 23:return Jd(e,t,n);case 24:return Jd(e,t,n)}throw Error(k(156,t.tag))};function ob(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 mt(e,t,n,r){return new ob(e,t,n,r)}function Op(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ib(e){if(typeof e=="function")return Op(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zl)return 11;if(e===Vl)return 14}return 2}function rr(e,t){var n=e.alternate;return n===null?(n=mt(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 yl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Op(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Un:return Oo(n.children,o,i,t);case sv:s=8,o|=16;break;case Xf:s=8,o|=1;break;case rs:return e=mt(12,n,t,o|8),e.elementType=rs,e.type=rs,e.lanes=i,e;case os:return e=mt(13,n,t,o),e.type=os,e.elementType=os,e.lanes=i,e;case vl:return e=mt(19,n,t,o),e.elementType=vl,e.lanes=i,e;case tp:return Np(n,o,i,t);case sf:return e=mt(24,n,t,o),e.elementType=sf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:s=10;break e;case Yf:s=9;break e;case zl:s=11;break e;case Vl:s=14;break e;case Zf:s=16,r=null;break e;case Jf:s=22;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=mt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Oo(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function Np(e,t,n,r){return e=mt(23,e,r,t),e.elementType=tp,e.lanes=n,e}function nf(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function rf(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sb(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=Ud(0),this.expirationTimes=Ud(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ud(0),this.mutableSourceEagerHydrationData=null}function ab(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Bl(e,t,n,r){var o=t.current,i=Je(),s=Qn(o);e:if(n){n=n._reactInternals;t:{if(Br(n)!==n||n.tag!==1)throw Error(k(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(qe(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(k(171))}if(n.tag===1){var l=n.type;if(qe(l)){n=qv(n,l,a);break e}}n=a}else n=tr;return t.context===null?t.context=n:t.pendingContext=n,t=Gn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Xn(o,t),Yn(o,s,i),s}function of(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 ov(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Mp(e,t){ov(e,t),(e=e.alternate)&&ov(e,t)}function lb(){return null}function Dp(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new sb(e,t,n!=null&&n.hydrate===!0),t=mt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,wp(t),e[Ho]=n.current,zv(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}Dp.prototype.render=function(e){Bl(e,this._internalRoot,null,null)};Dp.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Bl(null,e,null,function(){t[Ho]=null})};function Os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ub(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 Dp(e,0,t?{hydrate:!0}:void 0)}function eu(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=of(s);a.call(u)}}Bl(t,s,e,o)}else{if(i=n._reactRootContainer=ub(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=of(s);l.call(u)}}TS(function(){Bl(t,s,e,o)})}return of(s)}xv=function(e){if(e.tag===13){var t=Je();Yn(e,4,t),Mp(e,4)}};sp=function(e){if(e.tag===13){var t=Je();Yn(e,67108864,t),Mp(e,67108864)}};Ev=function(e){if(e.tag===13){var t=Je(),n=Qn(e);Yn(e,n,t),Mp(e,n)}};Cv=function(e,t){return t()};hf=function(e,t,n){switch(t){case"input":if(lf(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=Xl(r);if(!o)throw Error(k(90));lv(r),lf(r,o)}}}break;case"textarea":cv(e,n);break;case"select":t=n.value,t!=null&&_o(e,!!n.multiple,t,!1)}};rp=CS;yv=function(e,t,n,r,o){var i=M;M|=4;try{return Dr(98,e.bind(null,t,n,r,o))}finally{M=i,M===0&&(zo(),Qt())}};op=function(){!(M&49)&&(X_(),ir())};vv=function(e,t){var n=M;M|=2;try{return e(t)}finally{M=n,M===0&&(zo(),Qt())}};function LS(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Os(t))throw Error(k(200));return ab(e,t,null,n)}var cb={Events:[Is,xo,Xl,gv,hv,ir,{current:!1}]},Qi={findFiberByHostInstance:Lr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},db={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Hr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wv(e),e===null?null:e.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||lb,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Yi=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Yi.isDisabled&&Yi.supportsFiber))try{hp=Yi.inject(db),Nr=Yi}catch{}var Yi;vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cb;vt.createPortal=LS;vt.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(k(188)):Error(k(268,Object.keys(e)));return e=wv(t),e=e===null?null:e.stateNode,e};vt.flushSync=function(e,t){var n=M;if(n&48)return e(t);M|=1;try{if(e)return Dr(99,e.bind(null,t))}finally{M=n,Qt()}};vt.hydrate=function(e,t,n){if(!Os(t))throw Error(k(200));return eu(null,e,t,!0,n)};vt.render=function(e,t,n){if(!Os(t))throw Error(k(200));return eu(null,e,t,!1,n)};vt.unmountComponentAtNode=function(e){if(!Os(e))throw Error(k(40));return e._reactRootContainer?(TS(function(){eu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ho]=null})}),!0):!1};vt.unstable_batchedUpdates=CS;vt.unstable_createPortal=function(e,t){return LS(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};vt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Os(n))throw Error(k(200));if(e==null||e._reactInternals===void 0)throw Error(k(38));return eu(e,t,n,!1,r)};vt.version="17.0.2"});var tu=pe((jL,NS)=>{"use strict";function OS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OS)}catch(e){console.error(e)}}OS(),NS.exports=AS()});var lw=pe(aw=>{"use strict";var Go=O();function Xb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qb=typeof Object.is=="function"?Object.is:Xb,Yb=Go.useState,Zb=Go.useEffect,Jb=Go.useLayoutEffect,ek=Go.useDebugValue;function tk(e,t){var n=t(),r=Yb({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Jb(function(){o.value=n,o.getSnapshot=t,um(o)&&i({inst:o})},[e,n,t]),Zb(function(){return um(o)&&i({inst:o}),e(function(){um(o)&&i({inst:o})})},[e]),ek(n),n}function um(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qb(e,n)}catch{return!0}}function nk(e,t){return t()}var rk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?nk:tk;aw.useSyncExternalStore=Go.useSyncExternalStore!==void 0?Go.useSyncExternalStore:rk});var cm=pe((_A,uw)=>{"use strict";uw.exports=lw()});var dw=pe(cw=>{"use strict";var uu=O(),ok=cm();function ik(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sk=typeof Object.is=="function"?Object.is:ik,ak=ok.useSyncExternalStore,lk=uu.useRef,uk=uu.useEffect,ck=uu.useMemo,dk=uu.useDebugValue;cw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=lk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ck(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return p=y}return p=h}if(y=p,sk(c,h))return y;var v=r(h);return o!==void 0&&o(y,v)?y:(c=h,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=ak(e,i[0],i[1]);return uk(function(){s.hasValue=!0,s.value=a},[a]),dk(a),a}});var pw=pe((kA,fw)=>{"use strict";fw.exports=dw()});var Tw=pe(G=>{"use strict";var xe=typeof Symbol=="function"&&Symbol.for,fm=xe?Symbol.for("react.element"):60103,pm=xe?Symbol.for("react.portal"):60106,pu=xe?Symbol.for("react.fragment"):60107,mu=xe?Symbol.for("react.strict_mode"):60108,gu=xe?Symbol.for("react.profiler"):60114,hu=xe?Symbol.for("react.provider"):60109,yu=xe?Symbol.for("react.context"):60110,mm=xe?Symbol.for("react.async_mode"):60111,vu=xe?Symbol.for("react.concurrent_mode"):60111,Su=xe?Symbol.for("react.forward_ref"):60112,wu=xe?Symbol.for("react.suspense"):60113,gk=xe?Symbol.for("react.suspense_list"):60120,xu=xe?Symbol.for("react.memo"):60115,Eu=xe?Symbol.for("react.lazy"):60116,hk=xe?Symbol.for("react.block"):60121,yk=xe?Symbol.for("react.fundamental"):60117,vk=xe?Symbol.for("react.responder"):60118,Sk=xe?Symbol.for("react.scope"):60119;function nt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case fm:switch(e=e.type,e){case mm:case vu:case pu:case gu:case mu:case wu:return e;default:switch(e=e&&e.$$typeof,e){case yu:case Su:case Eu:case xu:case hu:return e;default:return t}}case pm:return t}}}function Cw(e){return nt(e)===vu}G.AsyncMode=mm;G.ConcurrentMode=vu;G.ContextConsumer=yu;G.ContextProvider=hu;G.Element=fm;G.ForwardRef=Su;G.Fragment=pu;G.Lazy=Eu;G.Memo=xu;G.Portal=pm;G.Profiler=gu;G.StrictMode=mu;G.Suspense=wu;G.isAsyncMode=function(e){return Cw(e)||nt(e)===mm};G.isConcurrentMode=Cw;G.isContextConsumer=function(e){return nt(e)===yu};G.isContextProvider=function(e){return nt(e)===hu};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===fm};G.isForwardRef=function(e){return nt(e)===Su};G.isFragment=function(e){return nt(e)===pu};G.isLazy=function(e){return nt(e)===Eu};G.isMemo=function(e){return nt(e)===xu};G.isPortal=function(e){return nt(e)===pm};G.isProfiler=function(e){return nt(e)===gu};G.isStrictMode=function(e){return nt(e)===mu};G.isSuspense=function(e){return nt(e)===wu};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===pu||e===vu||e===gu||e===mu||e===wu||e===gk||typeof e=="object"&&e!==null&&(e.$$typeof===Eu||e.$$typeof===xu||e.$$typeof===hu||e.$$typeof===yu||e.$$typeof===Su||e.$$typeof===yk||e.$$typeof===vk||e.$$typeof===Sk||e.$$typeof===hk)};G.typeOf=nt});var bw=pe((UA,_w)=>{"use strict";_w.exports=Tw()});var Ow=pe((zA,Aw)=>{"use strict";var gm=bw(),wk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},xk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ek={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Iw={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hm={};hm[gm.ForwardRef]=Ek;hm[gm.Memo]=Iw;function kw(e){return gm.isMemo(e)?Iw:hm[e.$$typeof]||wk}var Ck=Object.defineProperty,Tk=Object.getOwnPropertyNames,Pw=Object.getOwnPropertySymbols,_k=Object.getOwnPropertyDescriptor,bk=Object.getPrototypeOf,Rw=Object.prototype;function Lw(e,t,n){if(typeof t!="string"){if(Rw){var r=bk(t);r&&r!==Rw&&Lw(e,r,n)}var o=Tk(t);Pw&&(o=o.concat(Pw(t)));for(var i=kw(e),s=kw(t),a=0;a<o.length;++a){var l=o[a];if(!xk[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=_k(t,l);try{Ck(e,l,u)}catch{}}}}return e}Aw.exports=Lw});var Mw=pe(X=>{"use strict";var ym=Symbol.for("react.element"),vm=Symbol.for("react.portal"),Cu=Symbol.for("react.fragment"),Tu=Symbol.for("react.strict_mode"),_u=Symbol.for("react.profiler"),bu=Symbol.for("react.provider"),ku=Symbol.for("react.context"),kk=Symbol.for("react.server_context"),Pu=Symbol.for("react.forward_ref"),Ru=Symbol.for("react.suspense"),Iu=Symbol.for("react.suspense_list"),Lu=Symbol.for("react.memo"),Au=Symbol.for("react.lazy"),Pk=Symbol.for("react.offscreen"),Nw;Nw=Symbol.for("react.module.reference");function wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ym:switch(e=e.type,e){case Cu:case _u:case Tu:case Ru:case Iu:return e;default:switch(e=e&&e.$$typeof,e){case kk:case ku:case Pu:case Au:case Lu:case bu:return e;default:return t}}case vm:return t}}}X.ContextConsumer=ku;X.ContextProvider=bu;X.Element=ym;X.ForwardRef=Pu;X.Fragment=Cu;X.Lazy=Au;X.Memo=Lu;X.Portal=vm;X.Profiler=_u;X.StrictMode=Tu;X.Suspense=Ru;X.SuspenseList=Iu;X.isAsyncMode=function(){return!1};X.isConcurrentMode=function(){return!1};X.isContextConsumer=function(e){return wt(e)===ku};X.isContextProvider=function(e){return wt(e)===bu};X.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ym};X.isForwardRef=function(e){return wt(e)===Pu};X.isFragment=function(e){return wt(e)===Cu};X.isLazy=function(e){return wt(e)===Au};X.isMemo=function(e){return wt(e)===Lu};X.isPortal=function(e){return wt(e)===vm};X.isProfiler=function(e){return wt(e)===_u};X.isStrictMode=function(e){return wt(e)===Tu};X.isSuspense=function(e){return wt(e)===Ru};X.isSuspenseList=function(e){return wt(e)===Iu};X.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Cu||e===_u||e===Tu||e===Ru||e===Iu||e===Pk||typeof e=="object"&&e!==null&&(e.$$typeof===Au||e.$$typeof===Lu||e.$$typeof===bu||e.$$typeof===ku||e.$$typeof===Pu||e.$$typeof===Nw||e.getModuleId!==void 0)};X.typeOf=wt});var Fw=pe((KA,Dw)=>{"use strict";Dw.exports=Mw()});var Q=pe((AN,Ju)=>{"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 Ju<"u"&&Ju.exports?(n.default=n,Ju.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var T0=pe(qs=>{"use strict";Ba();var rP=O(),E0=60103;qs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Am=Symbol.for,E0=Am("react.element"),qs.Fragment=Am("react.fragment"));var Am,oP=rP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,iP=Object.prototype.hasOwnProperty,sP={key:!0,ref:!0,__self:!0,__source:!0};function C0(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)iP.call(t,r)&&!sP.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:E0,type:e,key:i,ref:s,props:o,_owner:oP.current}}qs.jsx=C0;qs.jsxs=C0});var C=pe((HN,_0)=>{"use strict";_0.exports=T0()});var H0=pe((OM,j0)=>{"use strict";var kP=/["'&<>]/;j0.exports=PP;function PP(e){var t=""+e,n=kP.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 bg=pe((G4,gE)=>{"use strict";var SR="Expected a function",pE=NaN,wR="[object Symbol]",xR=/^\s+|\s+$/g,ER=/^[-+]0x[0-9a-f]+$/i,CR=/^0b[01]+$/i,TR=/^0o[0-7]+$/i,_R=parseInt,bR=typeof global=="object"&&global&&global.Object===Object&&global,kR=typeof self=="object"&&self&&self.Object===Object&&self,PR=bR||kR||Function("return this")(),RR=Object.prototype,IR=RR.toString,LR=Math.max,AR=Math.min,Tg=function(){return PR.Date.now()};function OR(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(SR);t=mE(t)||0,_g(n)&&(c=!!n.leading,p="maxWait"in n,i=p?LR(mE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var _=r,R=o;return r=o=void 0,u=E,s=e.apply(R,_),s}function y(E){return u=E,a=setTimeout(m,t),c?h(E):s}function v(E){var _=E-l,R=E-u,b=t-_;return p?AR(b,i-R):b}function g(E){var _=E-l,R=E-u;return l===void 0||_>=t||_<0||p&&R>=i}function m(){var E=Tg();if(g(E))return f(E);a=setTimeout(m,v(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:f(Tg())}function T(){var E=Tg(),_=g(E);if(r=arguments,o=this,l=E,_){if(a===void 0)return y(l);if(p)return a=setTimeout(m,t),h(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=w,T.flush=x,T}function _g(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NR(e){return!!e&&typeof e=="object"}function MR(e){return typeof e=="symbol"||NR(e)&&IR.call(e)==wR}function mE(e){if(typeof e=="number")return e;if(MR(e))return pE;if(_g(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_g(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(xR,"");var n=CR.test(e);return n||TR.test(e)?_R(e.slice(2),n?2:8):ER.test(e)?pE:+e}gE.exports=OR});var RL={};Te(RL,{Card:()=>ge,Chip:()=>lx,ContentEditableInput:()=>oo,DeepdeskAPI:()=>Nn,DeepdeskSDK:()=>Da,InputMediator:()=>vn,InputType:()=>jn,KeyboardHint:()=>$c,Label:()=>fd,Locale:()=>Us,Section:()=>Cr,SectionList:()=>pd,Sources:()=>Fn,Suggestion:()=>se,SuggestionList:()=>tn,TextAreaInput:()=>Sn,ToggleButton:()=>eo,attachFile:()=>e1,authenticateWithKey:()=>ZT,createOverlayContainer:()=>ci,createRangeFromOffsets:()=>ro,escapeHTML:()=>xi,fetchPlatformConfig:()=>JT,formatTextMarkup:()=>YT,getRangeOffsets:()=>gd,getRangeText:()=>Oa,isSupportedInputElement:()=>vd,updateContentEditable:()=>QT,updateTextArea:()=>XT,useStyles:()=>P,waitForElementVisibilityChange:()=>Sd});var vh=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,lo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Sh=/x-deepdesk-(([a-z0-9\-_])+-version)/,Fn=(d=>(d.SEARCH="search",d.TEMPLATE="template",d.ELASTIC_SEARCH="studio-search",d.GPT="gpt",d.TRIE="trie",d.TRIE_WITH_TYPOS="trie-with-typos",d.SEMANTIC="semantic",d.TEXT_RECOMMENDATION="text_recommendation",d.URL_RECOMMENDATION="url_recommendation",d.LINK_RECOMMENDATION="link_recommendation",d.PERSONAL_COLLECTION="personal-collection",d.PERSONAL_COLLECTION_SEARCH="personal-collection-search",d))(Fn||{}),jn=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(jn||{});var Mn=S(tu());var BE=S(O());function St(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 mn(e){return!!e&&!!e[le]}function Nt(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)===Sb}(e)||Array.isArray(e)||!!e[US]||!!(!((t=e.constructor)===null||t===void 0)&&t[US])||Wp(e)||$p(e))}function zr(e,t,n){n===void 0&&(n=!1),Wo(e)===0?(n?Object.keys:Ko)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Wo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Wp(e)?2:$p(e)?3:0}function Vo(e,t){return Wo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fb(e,t){return Wo(e)===2?e.get(t):e[t]}function zS(e,t,n){var r=Wo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function VS(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Wp(e){return yb&&e instanceof Map}function $p(e){return vb&&e instanceof Set}function sr(e){return e.o||e.t}function qp(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$S(e);delete t[le];for(var n=Ko(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 Gp(e,t){return t===void 0&&(t=!1),Xp(e)||mn(e)||!Nt(e)||(Wo(e)>1&&(e.set=e.add=e.clear=e.delete=pb),Object.freeze(e),t&&zr(e,function(n,r){return Gp(r,!0)},!0)),e}function pb(){St(2)}function Xp(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Yt(e){var t=Kp[e];return t||St(18,e),t}function mb(e,t){Kp[e]||(Kp[e]=t)}function Up(){return Ms}function Fp(e,t){t&&(Yt("Patches"),e.u=[],e.s=[],e.v=t)}function nu(e){zp(e),e.p.forEach(gb),e.p=null}function zp(e){e===Ms&&(Ms=e.l)}function MS(e){return Ms={p:[],l:Ms,h:e,m:!0,_:0}}function gb(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function jp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Yt("ES5").S(t,e,r),r?(n[le].P&&(nu(t),St(4)),Nt(e)&&(e=ru(t,e),t.l||ou(t,e)),t.u&&Yt("Patches").M(n[le].t,e,t.u,t.s)):e=ru(t,n,[]),nu(t),t.u&&t.v(t.u,t.s),e!==WS?e:void 0}function ru(e,t,n){if(Xp(t))return t;var r=t[le];if(!r)return zr(t,function(a,l){return DS(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ou(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=qp(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),zr(i,function(a,l){return DS(e,r,o,a,l,n,s)}),ou(e,o,!1),n&&e.u&&Yt("Patches").N(r,n,e.u,e.s)}return r.o}function DS(e,t,n,r,o,i,s){if(mn(o)){var a=ru(e,o,i&&t&&t.i!==3&&!Vo(t.R,r)?i.concat(r):void 0);if(zS(n,r,a),!mn(a))return;e.m=!1}else s&&n.add(o);if(Nt(o)&&!Xp(o)){if(!e.h.D&&e._<1)return;ru(e,o),t&&t.A.l||ou(e,o)}}function ou(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Gp(t,n)}function Hp(e,t){var n=e[le];return(n?sr(n):e)[t]}function FS(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 ar(e){e.P||(e.P=!0,e.l&&ar(e.l))}function Bp(e){e.o||(e.o=qp(e.t))}function Vp(e,t,n){var r=Wp(t)?Yt("MapSet").F(t,n):$p(t)?Yt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Up(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ds;s&&(l=[a],u=Ns);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Yt("ES5").J(t,n);return(n?n.A:Up()).p.push(r),r}function hb(e){return mn(e)||St(22,e),function t(n){if(!Nt(n))return n;var r,o=n[le],i=Wo(n);if(o){if(!o.P&&(o.i<4||!Yt("ES5").K(o)))return o.t;o.I=!0,r=jS(n,i),o.I=!1}else r=jS(n,i);return zr(r,function(s,a){o&&fb(o.t,s)===a||zS(r,s,t(a))}),i===3?new Set(r):r}(e)}function jS(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return qp(e)}function KS(){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 Ds.get(u,s)},set:function(u){var c=this[le];Ds.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)&&ar(l);break;case 4:n(l)&&ar(l)}}}function n(s){for(var a=s.t,l=s.k,u=Ko(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!Vo(a,p))return!0;var h=l[p],y=h&&h[le];if(y?y.t!==d:!VS(h,d))return!0}}var v=!!a[le];return u.length!==Ko(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&&St(3,JSON.stringify(sr(s)))}var i={};mb("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(h,""+y,e(y,!0));return h}var v=$S(d);delete v[le];for(var g=Ko(v),m=0;m<g.length;m++){var f=g[m];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:Up(),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?mn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,y=p.R,v=p.i;if(v===4)zr(h,function(x){x!==le&&(d[x]!==void 0||Vo(d,x)?y[x]||u(h[x]):(y[x]=!0,ar(p)))}),zr(d,function(x){h[x]!==void 0||Vo(h,x)||(y[x]=!1,ar(p))});else if(v===5){if(r(p)&&(ar(p),y.length=!0),h.length<d.length)for(var g=h.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<h.length;m++)y[m]=!0;for(var f=Math.min(h.length,d.length),w=0;w<f;w++)h.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&u(h[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var HS,Ms,Qp=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",yb=typeof Map<"u",vb=typeof Set<"u",BS=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",WS=Qp?Symbol.for("immer-nothing"):((HS={})["immer-nothing"]=!0,HS),US=Qp?Symbol.for("immer-draftable"):"__$immer_draftable",le=Qp?Symbol.for("immer-state"):"__$immer_state";var Sb=""+Object.prototype.constructor,Ko=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,$S=Object.getOwnPropertyDescriptors||function(e){var t={};return Ko(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Kp={},Ds={get:function(e,t){if(t===le)return e;var n=sr(e);if(!Vo(n,t))return function(o,i,s){var a,l=FS(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||!Nt(r)?r:r===Hp(e.t,t)?(Bp(e),e.o[t]=Vp(e.A.h,r,e)):r},has:function(e,t){return t in sr(e)},ownKeys:function(e){return Reflect.ownKeys(sr(e))},set:function(e,t,n){var r=FS(sr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Hp(sr(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(VS(n,o)&&(n!==void 0||Vo(e.t,t)))return!0;Bp(e),ar(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 Hp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bp(e),ar(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=sr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){St(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){St(12)}},Ns={};zr(Ds,function(e,t){Ns[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ns.deleteProperty=function(e,t){return Ns.set.call(this,e,t,void 0)},Ns.set=function(e,t,n){return Ds.set.call(this,e[0],t,n,e[0])};var wb=function(){function e(n){var r=this;this.O=BS,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 g=this;v===void 0&&(v=a);for(var m=arguments.length,f=Array(m>1?m-1:0),w=1;w<m;w++)f[w-1]=arguments[w];return l.produce(v,function(x){var T;return(T=i).call.apply(T,[g,x].concat(f))})}}var u;if(typeof i!="function"&&St(6),s!==void 0&&typeof s!="function"&&St(7),Nt(o)){var c=MS(r),p=Vp(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?nu(c):zp(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Fp(c,s),jp(v,c)},function(v){throw nu(c),v}):(Fp(c,s),jp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===WS&&(u=void 0),r.D&&Gp(u,!0),s){var h=[],y=[];Yt("Patches").M(o,u,h,y),s(h,y)}return u}St(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Nt(n)||St(8),mn(n)&&(n=hb(n));var r=MS(this),o=Vp(this,n,void 0);return o[le].C=!0,zp(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Fp(i,r),jp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!BS&&St(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=Yt("Patches").$;return mn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),tt=new wb,xb=tt.produce,HL=tt.produceWithPatches.bind(tt),BL=tt.setAutoFreeze.bind(tt),UL=tt.setUseProxies.bind(tt),zL=tt.applyPatches.bind(tt),VL=tt.createDraft.bind(tt),KL=tt.finishDraft.bind(tt),iu=xb;function lr(e){"@babel/helpers - typeof";return lr=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},lr(e)}function Yp(e,t){if(lr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zp(e){var t=Yp(e,"string");return lr(t)==="symbol"?t:String(t)}function Jp(e,t,n){return t=Zp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qS(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 su(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qS(Object(n),!0).forEach(function(r){Jp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var GS=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),em=function(){return Math.random().toString(36).substring(7).split("").join(".")},au={INIT:"@@redux/INIT"+em(),REPLACE:"@@redux/REPLACE"+em(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+em()}};function Eb(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(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(tm)(e,t)}if(typeof e!="function")throw new Error(Ne(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Ne(3));return i}function p(v){if(typeof v!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(v),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var f=a.indexOf(v);a.splice(f,1),s=null}}}function d(v){if(!Eb(v))throw new Error(Ne(7));if(typeof v.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var f=g[m];f()}return v}function h(v){if(typeof v!="function")throw new Error(Ne(10));o=v,d({type:au.REPLACE})}function y(){var v,g=p;return v={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Ne(11));function w(){f.next&&f.next(c())}w();var x=g(w);return{unsubscribe:x}}},v[GS]=function(){return this},v}return d({type:au.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[GS]=y,r}function Cb(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:au.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:au.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function lu(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{Cb(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},y=0;y<i.length;y++){var v=i[y],g=n[v],m=u[v],f=g(m,c);if(typeof f>"u"){var w=c&&c.type;throw new Error(Ne(14))}h[v]=f,d=d||f!==m}return d=d||i.length!==Object.keys(u).length,d?h:u}}function $o(){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 XS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=$o.apply(void 0,a)(o.dispatch),su(su({},o),{},{dispatch:i})}}}function QS(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 YS=QS();YS.withExtraArgument=QS;var nm=YS;var nw=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)}}(),Tb=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}}},qo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},_b=Object.defineProperty,bb=Object.defineProperties,kb=Object.getOwnPropertyDescriptors,ZS=Object.getOwnPropertySymbols,Pb=Object.prototype.hasOwnProperty,Rb=Object.prototype.propertyIsEnumerable,JS=function(e,t,n){return t in e?_b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ur=function(e,t){for(var n in t||(t={}))Pb.call(t,n)&&JS(e,n,t[n]);if(ZS)for(var r=0,o=ZS(t);r<o.length;r++){var n=o[r];Rb.call(t,n)&&JS(e,n,t[n])}return e},rm=function(e,t){return bb(e,kb(t))},Ib=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 Lb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?$o:$o.apply(null,arguments)},lA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function Ab(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 Ob=function(e){nw(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,qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,qo([void 0],n.concat(this))))},t}(Array),Nb=function(e){nw(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,qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,qo([void 0],n.concat(this))))},t}(Array);function sm(e){return Nt(e)?iu(e,function(){}):e}function Mb(e){return typeof e=="boolean"}function Db(){return function(t){return Fb(t)}}function Fb(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 Ob;if(n&&(Mb(n)?a.push(nm):a.push(nm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var om=!0;function rw(e){var t=Db(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(Ab(o))h=lu(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),!om&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!om&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=XS.apply(void 0,y),g=$o;l&&(g=Lb(ur({trace:!om},typeof l=="object"&&l)));var m=new Nb(v),f=m;Array.isArray(d)?f=qo([v],d):typeof d=="function"&&(f=d(m));var w=g.apply(void 0,f);return tm(h,c,w)}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 ur(ur({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 ow(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 jb(e){return typeof e=="function"}function Hb(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?ow(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(jb(e))l=function(){return sm(e())};else{var u=sm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=qo([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return h.filter(function(y){return!!y}).length===0&&(h=[a]),h.reduce(function(y,v){if(v)if(mn(y)){var g=y,m=v(g,d);return m===void 0?y:m}else{if(Nt(y))return iu(y,function(f){return v(f,d)});var m=v(y,d);if(m===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return y},p)}return c.getInitialState=l,c}function Bb(e,t){return e+"/"+t}function F(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:sm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=Bb(t,c),h,y;"reducer"in p?(h=p.reducer,y=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=y?fe(d,y):fe(d)});function l(){var c=typeof e.extraReducers=="function"?ow(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],y=h===void 0?[]:h,v=c[2],g=v===void 0?void 0:v,m=ur(ur({},d),s);return Hb(n,function(f){for(var w in m)f.addCase(w,m[w]);for(var x=0,T=y;x<T.length;x++){var E=T[x];f.addMatcher(E.matcher,E.reducer)}g&&f.addDefaultCase(g)})}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 Ub="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zb=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Ub[Math.random()*64|0];return t},Vb=["name","message","stack","code"],im=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),ew=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Kb=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Vb;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},N=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,p,d,h){return{payload:c,meta:rm(ur({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:rm(ur({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,y){return{payload:h,error:(r&&r.serializeError||Kb)(c||"Rejected"),meta:rm(ur({},y||{}),{arg:d,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,h){var y=r!=null&&r.idGenerator?r.idGenerator(c):zb(),v=new l,g,m=!1;function f(x){g=x,v.abort()}var w=function(){return Ib(this,null,function(){var x,T,E,_,R,b,B;return Tb(this,function(re){switch(re.label){case 0:return re.trys.push([0,4,,5]),_=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:h}),$b(_)?[4,_]:[3,2];case 1:_=re.sent(),re.label=2;case 2:if(_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(z,Pe){return v.signal.addEventListener("abort",function(){return Pe({name:"AbortError",message:g||"Aborted"})})}),p(i(y,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:y,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:y,signal:v.signal,abort:f,rejectWithValue:function(z,Pe){return new im(z,Pe)},fulfillWithValue:function(z,Pe){return new ew(z,Pe)}})).then(function(z){if(z instanceof im)throw z;return z instanceof ew?o(z.payload,y,c,z.meta):o(z,y,c)})])];case 3:return E=re.sent(),[3,5];case 4:return b=re.sent(),E=b instanceof im?s(null,y,c,b.payload,b.meta):s(b,y,c),[3,5];case 5:return B=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,B||p(E),[2,E]}})})}();return Object.assign(w,{abort:f,requestId:y,arg:c,unwrap:function(){return w.then(Wb)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Wb(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $b(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qb="task",iw="listener",sw="completed",am="cancelled",fA="task-"+am,pA="task-"+sw,mA=iw+"-"+am,gA=iw+"-"+sw,hA=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=qb+" "+am+" (reason: "+t+")"}return e}();var lm="listenerMiddleware";var yA=fe(lm+"/add"),vA=fe(lm+"/removeAll"),SA=fe(lm+"/remove");var tw,wA=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(tw||(tw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Gb=function(e){return function(t){setTimeout(t,e)}},xA=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Gb(10);KS();var Gw=S(cm()),Xw=S(pw());var dm=S(tu());function fk(e){e()}var mw=fk,gw=e=>mw=e,hw=()=>mw;var Xo=S(O());var Sw=S(O());var cu=S(O()),yw=Symbol.for(`react-redux-context-${cu.version}`),vw=globalThis;function pk(){let e=vw[yw];return e||(e=(0,cu.createContext)(null),vw[yw]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=pk();return(r,...o)=>Reflect[t](n,...o)}}));function Fs(e=Me){return function(){return(0,Sw.useContext)(e)}}var du=Fs();var fu=()=>{throw new Error("uSES not initialized!")};var ww=fu,xw=e=>{ww=e},mk=(e,t)=>e===t;function Ew(e=Me){let t=e===Me?du:Fs(e);return function(r,o={}){let{equalityFn:i=mk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,Xo.useRef)(!0),y=(0,Xo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),v=ww(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Xo.useDebugValue)(v),v}}var A=Ew();function gn(){return gn=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},gn.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 xm=S(Ow()),Y=S(O()),Kw=S(Fw());var Ik=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Lk(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,w){return l=f,u=w,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 g(){let f=e(l,u),w=!s(f,c);return c=f,w&&(d=n(c,p,u)),d}function m(f,w){let x=!i(w,u),T=!o(f,l,w,u);return l=f,u=w,x&&T?y():x?v():T?g():d}return function(w,x){return a?m(w,x):h(w,x)}}function Sm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=js(t,Ik),s=n(e,i),a=r(e,i),l=o(e,i);return Lk(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 Hs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function jw(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ou(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=jw(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=jw(u),u=i(a,l)),u},i}}function Qo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Hw(e){return e&&typeof e=="object"?Hs(t=>wm(e,t)):e?typeof e=="function"?Ou(e,"mapDispatchToProps"):Qo(e,"mapDispatchToProps"):Hs(t=>({dispatch:t}))}function Bw(e){return e?typeof e=="function"?Ou(e,"mapStateToProps"):Qo(e,"mapStateToProps"):Hs(()=>({}))}function Ak(e,t,n){return gn({},n,e,t)}function Ok(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 Uw(e){return e?typeof e=="function"?Ok(e):Qo(e,"mergeProps"):()=>Ak}function Nk(){let e=hw(),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 zw={notify(){},get:()=>[]};function Nu(e,t){let n,r=zw;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=Nk())}function u(){n&&(n(),n=void 0,r.clear(),r=zw)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Mu=S(O()),Mk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yo=Mk?Mu.useLayoutEffect:Mu.useEffect;function Vw(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Zo(e,t){if(Vw(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])||!Vw(e[n[o]],t[n[o]]))return!1;return!0}var Dk=["reactReduxForwardedRef"],Ww=fu,$w=e=>{Ww=e};var Fk=[null,null];function jk(e,t,n){Yo(()=>e(...t),n)}function Hk(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Bk(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let v=t.getState(),g,m;try{g=r(v,o.current)}catch(f){m=f,d=f}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function Uk(e,t){return e===t}function zk(e,t,n,{pure:r,areStatesEqual:o=Uk,areOwnPropsEqual:i=Zo,areStatePropsEqual:s=Zo,areMergedPropsEqual:a=Zo,forwardRef:l=!1,context:u=Me}={}){let c=u,p=Bw(e),d=Hw(t),h=Uw(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",f=`Connect(${m})`,w={shouldHandleStateChanges:y,displayName:f,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(_){let[R,b,B]=(0,Y.useMemo)(()=>{let{reactReduxForwardedRef:ct}=_,br=js(_,Dk);return[_.context,ct,br]},[_]),re=(0,Y.useMemo)(()=>R&&R.Consumer&&(0,Kw.isContextConsumer)(Y.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Y.useContext)(re),Pe=!!_.store&&!!_.store.getState&&!!_.store.dispatch,so=!!z&&!!z.store,Vt=Pe?_.store:z.store,ao=so?z.getServerState:Vt.getState,Ii=(0,Y.useMemo)(()=>Sm(Vt.dispatch,w),[Vt]),[Tr,Fa]=(0,Y.useMemo)(()=>{if(!y)return Fk;let ct=Nu(Vt,Pe?void 0:z.subscription),br=ct.notifyNestedSubs.bind(ct);return[ct,br]},[Vt,Pe,z]),ja=(0,Y.useMemo)(()=>Pe?z:gn({},z,{subscription:Tr}),[Pe,z,Tr]),Li=(0,Y.useRef)(),Ai=(0,Y.useRef)(B),on=(0,Y.useRef)(),Oi=(0,Y.useRef)(!1),_r=(0,Y.useRef)(!1),I=(0,Y.useRef)(!1),W=(0,Y.useRef)();Yo(()=>(I.current=!0,()=>{I.current=!1}),[]);let It=(0,Y.useMemo)(()=>()=>on.current&&B===Ai.current?on.current:Ii(Vt.getState(),B),[Vt,B]),Dn=(0,Y.useMemo)(()=>br=>Tr?Bk(y,Vt,Tr,Ii,Ai,Li,Oi,I,on,Fa,br):()=>{},[Tr]);jk(Hk,[Ai,Li,Oi,B,on,Fa]);let sn;try{sn=Ww(Dn,It,ao?()=>Ii(ao(),B):It)}catch(ct){throw W.current&&(ct.message+=`
|
|
10
|
+
The error may be correlated with this previous error:
|
|
11
|
+
${W.current.stack}
|
|
12
|
+
|
|
13
|
+
`),ct}Yo(()=>{W.current=void 0,on.current=void 0,Li.current=sn});let Ni=(0,Y.useMemo)(()=>Y.default.createElement(g,gn({},sn,{ref:b})),[b,g,sn]);return(0,Y.useMemo)(()=>y?Y.default.createElement(re.Provider,{value:ja},Ni):Ni,[re,Ni,ja])}let E=Y.default.memo(x);if(E.WrappedComponent=g,E.displayName=x.displayName=f,l){let R=Y.default.forwardRef(function(B,re){return Y.default.createElement(E,gn({},B,{reactReduxForwardedRef:re}))});return R.displayName=f,R.WrappedComponent=g,(0,xm.default)(R,g)}return(0,xm.default)(E,g)}}var Vr=zk;var Bs=S(O());function Vk({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Bs.useMemo)(()=>{let u=Nu(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Bs.useMemo)(()=>e.getState(),[e]);Yo(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Me;return Bs.default.createElement(l.Provider,{value:s},n)}var Em=Vk;function Du(e=Me){let t=e===Me?du:Fs(e);return function(){let{store:r}=t();return r}}var Cm=Du();function qw(e=Me){let t=e===Me?Cm:Du(e);return function(){return t().dispatch}}var K=qw();xw(Xw.useSyncExternalStoreWithSelector);$w(Gw.useSyncExternalStore);gw(dm.unstable_batchedUpdates);var Us=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Us||{});var Kk={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,adminUrl:void 0,productName:"Deepdesk"},Qw=F({name:"settings",initialState:Kk,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:zs}=Qw.actions,Tm=e=>t=>t.settings[e],D=e=>A(Tm(e)),Yw=Qw.reducer;var oE=S(O());function hn(){}hn.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 h(){for(var v=-1*u;v<=u;v+=2){var g=void 0,m=p[v-1],f=p[v+1],w=(f?f.newPos:0)-v;m&&(p[v-1]=void 0);var x=m&&m.newPos+1<a,T=f&&0<=w&&w<l;if(!x&&!T){p[v]=void 0;continue}if(!x||T&&m.newPos<f.newPos?(g=$k(f),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),w=i.extractCommon(g,n,t,v),g.newPos+1>=a&&w+1>=l)return s(Wk(i,g.components,n,t,i.useLongestToken));p[v]=g}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();h()||v()},0)})();else for(;u<=c;){var y=h();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 Wk(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,y){var v=r[l+y];return v.length>h.length?v:h}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function $k(e){return{newPos:e.newPos,components:e.components.slice(0)}}var qk=new hn;function e0(e,t,n){return qk.diff(e,t,n)}var Zw=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Jw=/\S/,t0=new hn;t0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Jw.test(e)&&!Jw.test(t)};t0.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]&&Zw.test(t[n])&&Zw.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var n0=new hn;n0.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 Gk=new hn;Gk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Xk=new hn;Xk.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Fu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fu=function(t){return typeof t}:Fu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}var Qk=Object.prototype.toString,Vs=new hn;Vs.useLongestToken=!0;Vs.tokenize=n0.tokenize;Vs.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(_m(e,null,null,o),o," ")};Vs.equals=function(e,t){return hn.prototype.equals.call(Vs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function _m(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(Qk.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]=_m(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Fu(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]=_m(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var bm=new hn;bm.tokenize=function(e){return e.slice()};bm.join=bm.removeEmpty=function(e){return e};function r0(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function cr(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)=>cr(i,t[s],n-1)):r0(e)&&r0(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>cr(e[s],t[s],n-1)):!1}function Yk(e){return Math.max(...e.map(t=>t.length))}function Zk(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 o0(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<Yk(r);o++){let i=Zk(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 Jk=2;function km(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=o0(e,Jk);return n&&n.text!==t?n:e[0]}var i0={current:null,isSupported:null},Z=fe("resetConversation"),ju=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Hu=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Bu=e=>e.conversation.isSupported,Pm=N("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Uu=N("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),zu=N("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Vu=N("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hu(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Rm=N("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})})}),Ku=N("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hu(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),eP=[Uu.rejected,zu.rejected,Vu.rejected,Ku.rejected].map(e=>e==null?void 0:e.toString()),tP=F({name:"conversation",initialState:i0,reducers:{},extraReducers:e=>{e.addCase(Pm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Uu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(zu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Rm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Ku.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(Z,()=>i0).addMatcher(t=>eP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),s0=tP.reducer;var dr={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,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function $u(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 qu=fe("input/replaceText"),Gu=fe("input/keyDown"),Ks=fe("input/sendMessage"),Xu=fe("input/sendEditSuggestionMessage"),Qu=fe("input/uiInputChange"),Yu=fe("input/applyImageSuggestion"),Zt=fe("input/sendEvent");function Wu(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s},eventMetrics:{inputType:a},replace:l}=e.stagedSuggestion,u=n==="search"||n==="personal-collection-search",c=u||l==="selection"?t:t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions=[...e.metrics.textSuggestions,{text:c,source:n,abVariant:r,abTestName:o,inputType:a,sourceText:s,trainingJobs:i||[],searchTerm:u?e.userCommitted.text:null}],e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var a0=e=>F({name:e,initialState:dr,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,{...dr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=km(t.textSuggestions,t.userCommitted.text)},setInputHtml(t,n){t.html=n.payload},changeSelection(t,n){n.payload&&(cr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Wu(t)))},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:p,ctrlKey:d,metaKey:h,altKey:y}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=t,{text:g}=n.payload,m=e0(v,g);v.length-g.length>1&&t.metrics.deletions.push(...m.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=v.length-g.length;break}case"C":case"V":case"X":if(!d&&!h){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&&!h&&!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=dr.metrics,t.textSuggestions=[]),t.text!==n.payload.text&&Wu(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"&&Wu(t)},commitSuggestion(t){Wu(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=km(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}){t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(Z,n=>{n.tabCompletionSuggestion=dr.tabCompletionSuggestion,n.previousKeyDownEvent=dr.previousKeyDownEvent,n.textSuggestions=dr.textSuggestions,n.selectedSuggestionIndex=dr.selectedSuggestionIndex,n.metrics=dr.metrics})}}),Im=a0("input"),Jo=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),nP=e=>e.input.selection,l0=()=>A(nP),{userInput:u0,changeSelection:Lm,initialInput:c0,mergeMetrics:d0,nextTextSuggestionIndex:f0,offeredTextSuggestion:p0,previousTextSuggestionIndex:m0,registerCut:g0,registerKeyDown:h0,registerPaste:y0,reset:v0,resetToCommitted:Ws,setInputHtml:S0,setSelectedTextSuggestionIndex:Zu,setTextSuggestions:fr,stageSuggestion:Mt,commitSuggestion:pr}=Im.actions,Ge=a0("overlay");var ei=S(O());var ec=S(O()),w0=S(Q()),$s=ec.default.createContext({});function P(e,t){let r=(0,ec.useContext)($s)[e];return r?Object.entries(t).reduce((o,[i,s])=>{let a=r[i];return{...o,[i]:(0,w0.default)(s,a)}},{}):t}var x0={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Om=S(C()),aP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ei.useRef)(null),l=(0,ei.useRef)(null),u=P("Dialog",x0);return(0,ei.useEffect)(()=>{var d,h;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),(h=a.current)==null||h.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,ei.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,Om.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Om.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ti=aP;var hg=S(O());var Nm={};Te(Nm,{enUS:()=>lP,nlNL:()=>uP});var lP={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?"}]},uP={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 b0={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 mc=S(O());var Mm=function(e,t){return Mm=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])},Mm(e,t)};function Gs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Mm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var rt=function(){return rt=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},rt.apply(this,arguments)};function k0(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 tc(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 nc;(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"})(nc||(nc={}));var rc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Dt;(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"})(Dt||(Dt={}));var oc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(oc||(oc={}));function Dm(e){return e.type===Dt.literal}function P0(e){return e.type===Dt.argument}function ic(e){return e.type===Dt.number}function sc(e){return e.type===Dt.date}function ac(e){return e.type===Dt.time}function lc(e){return e.type===Dt.select}function uc(e){return e.type===Dt.plural}function R0(e){return e.type===Dt.pound}function cc(e){return e.type===Dt.tag}function dc(e){return!!(e&&typeof e=="object"&&e.type===oc.number)}function Xs(e){return!!(e&&typeof e=="object"&&e.type===oc.dateTime)}function Fm(e){e.forEach(function(t){if(delete t.location,lc(t)||uc(t))for(var n in t.options)delete t.options[n].location,Fm(t.options[n].value);else ic(t)&&dc(t.style)||(sc(t)||ac(t))&&Xs(t.style)?delete t.style.location:cc(t)&&Fm(t.children)})}function I0(e,t){t===void 0&&(t={}),t=rt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new rc(e,t).parse();if(n.err){var r=SyntaxError(nc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Fm(n.val),n.val}function fc(e,t){var n=t&&t.cache?t.cache:gP,r=t&&t.serializer?t.serializer:mP,o=t&&t.strategy?t.strategy:dP;return o(e,{cache:n,serializer:r})}function cP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function L0(e,t,n,r){var o=cP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function A0(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 jm(e,t,n,r,o){return n.bind(t,e,r,o)}function dP(e,t){var n=e.length===1?L0:A0;return jm(e,this,n,t.cache.create(),t.serializer)}function fP(e,t){return jm(e,this,A0,t.cache.create(),t.serializer)}function pP(e,t){return jm(e,this,L0,t.cache.create(),t.serializer)}var mP=function(){return JSON.stringify(arguments)};function Hm(){this.cache=Object.create(null)}Hm.prototype.get=function(e){return this.cache[e]};Hm.prototype.set=function(e,t){this.cache[e]=t};var gP={create:function(){return new Hm}},pc={variadic:fP,monadic:pP};var Kr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Kr||(Kr={}));var Qs=function(e){Gs(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 Bm=function(e){Gs(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('", "'),'"'),Kr.INVALID_VALUE,i)||this}return t}(Qs);var O0=function(e){Gs(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Kr.INVALID_VALUE,o)||this}return t}(Qs);var N0=function(e){Gs(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,'"'),Kr.MISSING_VALUE,r)||this}return t}(Qs);var De;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(De||(De={}));function hP(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==De.literal||n.type!==De.literal?t.push(n):r.value+=n.value,t},[])}function yP(e){return typeof e=="function"}function Ys(e,t,n,r,o,i,s){if(e.length===1&&Dm(e[0]))return[{type:De.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Dm(c)){a.push({type:De.literal,value:c.value});continue}if(R0(c)){typeof i=="number"&&a.push({type:De.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new N0(p,s);var d=o[p];if(P0(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?De.literal:De.object,value:d});continue}if(sc(c)){var h=typeof c.style=="string"?r.date[c.style]:Xs(c.style)?c.style.parsedOptions:void 0;a.push({type:De.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(ac(c)){var h=typeof c.style=="string"?r.time[c.style]:Xs(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:De.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(ic(c)){var h=typeof c.style=="string"?r.number[c.style]:dc(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:De.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(cc(c)){var y=c.children,v=c.value,g=o[v];if(!yP(g))throw new O0(v,"function",s);var m=Ys(y,t,n,r,o,i),f=g(m.map(function(T){return T.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(T){return{type:typeof T=="string"?De.literal:De.object,value:T}}))}if(lc(c)){var w=c.options[d]||c.options.other;if(!w)throw new Bm(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ys(w.value,t,n,r,o));continue}if(uc(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Qs(`Intl.PluralRules is not available in this environment.
|
|
14
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
+
`,Kr.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Bm(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ys(w.value,t,n,r,o,d-(c.offset||0)));continue}}return hP(a)}function vP(e,t){return t?rt(rt(rt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=rt(rt({},e[r]),t[r]||{}),n},{})):e}function SP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=vP(e[r],t[r]),n},rt({},e)):e}function Um(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function wP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.number),strategy:pc.variadic}),getDateTimeFormat:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.dateTime),strategy:pc.variadic}),getPluralRules:fc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,tc([void 0],n,!1)))},{cache:Um(e.pluralRules),strategy:pc.variadic})}}var M0=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,h){return!d.length||h.type!==De.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Ys(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=k0(s,["formatters"]);this.ast=e.__parse(t,rt(rt({},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=SP(e.formats,r),this.formatters=o&&o.formatters||wP(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=I0,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 xP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var EP="dummy",zm=(0,mc.createContext)(null);function j(e){let t=(0,mc.useContext)(zm);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=xP(n,r);return i?new M0(i).format(o):(t!==EP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Zs=S(C()),gc=()=>(0,Zs.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Zs.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Zs.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 Js=S(C()),D0=()=>(0,Js.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,Js.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,Js.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 ea=S(Q()),Et=S(O());var Vm={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var xt=S(C()),ni=(0,Et.createContext)(Vm),CP=({fixed:e,children:t,...n})=>{let r=(0,Et.useContext)(ni);return(0,xt.jsx)("div",{...n,className:(0,ea.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},TP=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,Et.useContext)(ni);return(0,xt.jsxs)("div",{className:(0,ea.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,xt.jsx)("ul",{className:i.dropdownList,children:o})]})},_P=({index:e,label:t,onClick:n})=>{let r=(0,Et.useContext)(ni);return(0,xt.jsx)("li",{className:r.dropdownItem,children:(0,xt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},bP=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,Et.useContext)(ni);return(0,xt.jsx)("button",{type:"button",className:(0,ea.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Km=({labels:e})=>{let t=(0,Et.useContext)(ni);return(0,xt.jsx)("div",{className:t.labels,children:e.map(n=>(0,xt.jsx)("span",{className:t.label,children:n},n))})},ri=Et.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",Vm),l=(0,Et.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,xt.jsx)(o,{...i,ref:s,className:(0,ea.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,xt.jsx)(ni.Provider,{value:a,children:r})})});ri.Labels=Km;ri.Actions=CP;ri.ActionButton=bP;ri.DropdownButton=TP;ri.DropdownItem=_P;var se=ri;var Tt=S(O());var hc=S(O());function ta(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,$m=2,qm=4,Se=8,yc=16,na=32,Ft=64,Wm={a:{content:q|Se,self:!1,type:q|Se|na|Ft},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|$m|qm|Se|yc|na|Ft},button:{content:Se,type:q|Se|na|Ft},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|na|Ft},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|yc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function $r(e){return t=>{Wm[t]={...e,...Wm[t]}}}["address","main","div","figure","p","pre"].forEach($r({content:q,type:q|Ft}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach($r({content:Se,type:q|Se|Ft}));["p","pre"].forEach($r({content:Se,type:q|Ft}));["s","small","span","del","ins"].forEach($r({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach($r({content:q,type:q|$m|Ft}));["h1","h2","h3","h4","h5","h6"].forEach($r({content:Se,type:q|qm|Ft}));["audio","canvas","iframe","img","video"].forEach($r({type:q|Se|yc|Ft}));var oa=Object.freeze(Wm),Gm=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Xm=Object.keys(oa).filter(e=>e!=="canvas"&&e!=="iframe"),J=1,Qm=2,Wr=3,mr=4,Sc=5,wc=Object.freeze({alt:J,cite:J,class:J,colspan:Wr,controls:mr,datetime:J,default:mr,disabled:mr,dir:J,height:J,href:J,id:J,kind:J,label:J,lang:J,loading:J,loop:mr,media:J,muted:mr,poster:J,rel:J,role:J,rowspan:Wr,scope:J,sizes:J,span:Wr,start:Wr,style:Sc,src:J,srclang:J,srcset:J,tabindex:J,target:J,title:J,type:J,width:J}),Ym=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function vc(){return vc=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},vc.apply(this,arguments)}function xc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?hc.default.createElement(i,vc({className:t},e)):hc.default.createElement(i,vc({className:t},e),n)}var ra=class{attribute(t,n){return n}node(t,n){return n}};function F0(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 jt=class{constructor(t,n,r){ta(this,"greedy",!1),ta(this,"options",void 0),ta(this,"propName",void 0),ta(this,"inverseName",void 0),ta(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?hc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return F0(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var qr=S(O()),U0=S(H0());function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RP=/(url|image|image-set)\(/i,Zm=class extends ra{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(RP)&&delete n[r]}),n}},B0=1,IP=3,LP=/^<(!doctype|(html|head|body)(\s|>))/i,AP=/^(aria-|data-|\w+:)/iu,OP=/{{{(\w+)\/?}}}/;function NP(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ec=class{constructor(t,n={},r=[],o=[]){var i;yn(this,"allowed",void 0),yn(this,"banned",void 0),yn(this,"blocked",void 0),yn(this,"container",void 0),yn(this,"content",[]),yn(this,"props",void 0),yn(this,"matchers",void 0),yn(this,"filters",void 0),yn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Zm],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Xm),this.banned=new Set(Gm),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:y,valid:v,void:g,...m}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),v?(p+=g?`{{{${f}/}}}`:`{{{${f}}}}${y}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=y,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||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
|
+
`);return o=o.replace(/\n{3,}/g,`
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||NP)();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(LP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,U0.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==B0||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=wc[l]||wc[s];if(!this.isSafe(t)||!l.match(AP)&&(!n&&(!u||u===Qm)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===mr?c=!0:u===Wr?c=Number.parseFloat(String(c)):u!==Sc&&(c=String(c)),r[Ym[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 oa[t]?{...n,...oa[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===B0){let d=c.nodeName.toLowerCase(),h=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 g=this.keyIndex;v=this.parseNode(y,h);let m=s(y,v,h);if(m===null)return;if(typeof m<"u"){l.push(qr.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,h))){var p;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),h.void&&(m.selfClose=h.void),l.push(qr.default.createElement(xc,{...m,key:this.keyIndex},(p=v)!==null&&p!==void 0?p:this.parseNode(y,h)))}else l=[...l,...this.parseNode(y,h.tagName?h:n)]}else if(c.nodeType===IP){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(OP);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));h=y.index+y[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function MP(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Ec(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?qr.default.createElement(qr.default.Fragment,null,d):qr.default.createElement(xc,{attributes:n,className:r,tagName:c},d)}function oi(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...h}=e,y=i?[]:l,v=o?[]:a,g=c?[c]:[],m=u?[u]:[];y.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let f=g.reduce((T,E)=>E(T,e),r??""),w=new Ec(f,h,y,v),x=m.reduce((T,E)=>E(T,e),w.parse());return qr.default.createElement(MP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:p})}var sg=S(Q());var Jm={root:"_root_7hhs4_1",agentText:"_agentText_7hhs4_3",textInput:"_textInput_7hhs4_8",textInputWrapper:"_textInputWrapper_7hhs4_27",alert:"_alert_7hhs4_31",alertText:"_alertText_7hhs4_50",warning:"_warning_7hhs4_60",success:"_success_7hhs4_69"};var V0=S(Q());var ii=S(O());function z0(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Cc(e){let t=(0,ii.useRef)(null),[n,r]=(0,ii.useState)(!1);return(0,ii.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=z0((c,p)=>{let d=t.current;if(!d)return;let h=c/i,y=p/i,v=d.getBoundingClientRect(),g=h>v.x&&h<v.x+v.width&&y>v.y&&y<v.y+v.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=z0(()=>{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 Ct={root:"_root_kpc8q_1",agentText:"_agentText_kpc8q_4",tabText:"_tabText_kpc8q_9",hint:"_hint_kpc8q_10",matchSelection:"_matchSelection_kpc8q_14",focus:"_focus_kpc8q_20",resetIndent:"_resetIndent_kpc8q_24",matchKeyword:"_matchKeyword_kpc8q_28",matchPlaceholder:"_matchPlaceholder_kpc8q_29",hover:"_hover_kpc8q_35",hintText:"_hintText_kpc8q_67",popover:"_popover_kpc8q_75",popoverRoot:"_popoverRoot_kpc8q_80",popoverContentContainer:"_popoverContentContainer_kpc8q_84",popoverContent:"_popoverContent_kpc8q_84",selectionOptions:"_selectionOptions_kpc8q_110",selectionOptionsIsHidden:"_selectionOptionsIsHidden_kpc8q_115",selectionOptionsButton:"_selectionOptionsButton_kpc8q_119",caret:"_caret_kpc8q_135",popoverSuggestionsRoot:"_popoverSuggestionsRoot_kpc8q_139",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_kpc8q_144"};var eg=S(C()),DP=({inputElement:e,children:t})=>{let n=P("TabCompletion",Ct),[r,o]=Cc(e);return(0,eg.jsx)("mark",{ref:r,className:(0,V0.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},si=class extends jt{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,eg.jsx)(DP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ai=S(O());function Tc(e){return e.contentEditable==="true"}function FP(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 K0(e){let{selectionStart:t,selectionEnd:n}=Tc(e)?FP(e):e;return[t,n]}function _c(e){let[,t]=(0,ai.useState)(),n=(0,ai.useRef)(null);return n.current=K0(e),(0,ai.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=K0(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 bc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(lo);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 W0=S(O());function li(e){(0,W0.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Gr(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var $0,Jt=new Map,jP=["bottom","height","left","right","top","width"],HP=(e={},t={})=>jP.some(n=>e[n]!==t[n]),q0=()=>{let e=[];Jt.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Jt.delete(n);return}let r=n.getBoundingClientRect();HP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),Jt.size!==0&&($0=window.requestAnimationFrame(q0))};function G0(e,t){return{observe(){let n=Jt.size===0;if(Jt.has(e)){let r=Jt.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Jt.set(e,{rect:void 0,callbacks:[t]});n&&q0()},unobserve(){let n=Jt.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Jt.delete(e),Jt.size||cancelAnimationFrame($0)}}}}var X0,en=new Map,Q0=()=>{en.forEach((e,t)=>{if(!t.isConnected){en.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)))}),en.size!==0&&(X0=window.requestAnimationFrame(Q0))};function Y0(e,t){return{observe(){let n=en.size===0;en.has(e)?en.get(e).callbacks.push(t):en.set(e,{visible:void 0,callbacks:[t]}),n&&Q0()},unobserve(){let n=en.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||en.delete(e),en.size||cancelAnimationFrame(X0)}}}}var tg=["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 ng(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ui(e){return parseFloat(e)}function kc(e){return Math.round(e*1e6)}function Z0(e){return e/1e6}function rg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ui(e.width),i=ui(e.borderLeftWidth),s=ui(e.borderRightWidth),a=ui(e.paddingRight),l=Z0(kc(o)-kc(i)-kc(s)),u=Z0(kc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function ci(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Gr(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ng(r,n,tg),rg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=Y0(e,()=>{ng(r,n,tg),rg(r,e,n),i(),setTimeout(i,0)}),a=G0(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(ng(r,n,tg),rg(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=ui(p.borderTopWidth),h=ui(p.borderBottomWidth),y=c.top+d-u.top,v=u.top+u.height+-(c.top+c.height-h);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 og={};Te(og,{enUS:()=>BP,nlNL:()=>UP});var BP={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"}]},UP={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 ia=S(C()),J0=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ia.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ia.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 ig=S(C()),ex=()=>(0,ig.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,ig.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 tx=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(tx||{}),vn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentHTML="";currentSelection=null;isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(tx).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){let t=this.currentSelection;this.isPossibleClearInputAction=!0,t&&this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){let t=()=>{let r=document.activeElement===this.element?this.getSelection():null;cr(this.currentSelection,r)||(this.currentSelection=r,this.emit("selection",r))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),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)),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Sn=class extends vn{getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){return this.currentSelection?this.getText().slice(this.currentSelection.start,this.currentSelection.end):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=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 Xe=S(C()),zP=({value:e,onUse:t,...n})=>{var c;let r=j(og),o=K(),i=P("EditSuggestionTextInput",Jm),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(lo))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new Sn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown($u(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Ge.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(VP,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,sg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(J0,{}):(0,Xe.jsx)(ex,{})]})]})},VP=({inputElement:e,value:t})=>{let n=P("EditSuggestionTextInput",Jm),r=(0,Tt.useRef)(null),o=_c(e);return(0,Tt.useEffect)(()=>{bc(e,o)},[o,e]),(0,Xe.jsx)(KP,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,sg.default)(n.root,n.agentText),children:[(0,Xe.jsx)(oi,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new si("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},KP=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=ci(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},nx=zP;var pi=S(O());var Qe={root:"_root_m5usm_1",list:"_list_m5usm_2",listWrapper:"_listWrapper_m5usm_6",listHorizontal:"_listHorizontal_m5usm_10",page:"_page_m5usm_19",search:"_search_m5usm_25",pageNav:"_pageNav_m5usm_33",pageTitle:"_pageTitle_m5usm_41",pageBackButton:"_pageBackButton_m5usm_48",listHeading:"_listHeading_m5usm_62",listItem:"_listItem_m5usm_70",listItemContent:"_listItemContent_m5usm_79",listItemText:"_listItemText_m5usm_97",listItemDescription:"_listItemDescription_m5usm_105",truncate:"_truncate_m5usm_112",lineClamp:"_lineClamp_m5usm_118",listItemTitle:"_listItemTitle_m5usm_125",listItemAction:"_listItemAction_m5usm_132",listItemPrimaryAction:"_listItemPrimaryAction_m5usm_146",listItemSelected:"_listItemSelected_m5usm_151",sources:"_sources_m5usm_155",sourcesTitle:"_sourcesTitle_m5usm_162",source:"_source_m5usm_155",icon:"_icon_m5usm_177",searchIcon:"_searchIcon_m5usm_194",searchInputWrapper:"_searchInputWrapper_m5usm_199",searchInput:"_searchInput_m5usm_199",select:"_select_m5usm_220",selectType:"_selectType_m5usm_237",selectWrapper:"_selectWrapper_m5usm_241",image:"_image_m5usm_271",imageSrc:"_imageSrc_m5usm_278",imageTitle:"_imageTitle_m5usm_289",actions:"_actions_m5usm_294",actionsWrapper:"_actionsWrapper_m5usm_298",actionsBar:"_actionsBar_m5usm_304",actionButton:"_actionButton_m5usm_313",actionShortcut:"_actionShortcut_m5usm_331",actionShortcutFixKerning:"_actionShortcutFixKerning_m5usm_338"};var sa=S(C()),WP=({src:e,title:t})=>{let n=P("CommandPalette",Qe);return(0,sa.jsxs)("div",{className:n.image,children:[(0,sa.jsx)("img",{src:e,alt:t,className:n.imageSrc}),t&&(0,sa.jsx)("span",{className:n.imageTitle,children:t})]})},rx=WP;var ox=S(O()),ix=S(Q());var aa=S(C());function ag({children:e,heading:t,orientation:n}){let r=P("CommandPalette",Qe);return ox.default.Children.count(e)===0?null:(0,aa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,aa.jsx)("h4",{className:r.listHeading,children:t}),(0,aa.jsx)("div",{className:(0,ix.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var la=S(Q());var sx={root:"_root_nkim0_1"};var lg={};Te(lg,{enUS:()=>$P,nlNL:()=>qP});var $P={experimental:[{type:0,value:"Experimental"}]},qP={experimental:[{type:0,value:"Experimenteel"}]};var ug=S(C()),ax=({children:e})=>{let t=P("Chip",sx);return(0,ug.jsx)("span",{className:t.root,children:e})},Pc=()=>{let e=j(lg);return(0,ug.jsx)(ax,{children:e("experimental")})},lx=ax;var Rc=S(O()),dx=S(C()),ux=Rc.default.createContext(void 0);function gr(){let e=Rc.default.useContext(ux);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var cx=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Rc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,dx.jsx)(ux.Provider,{value:s,children:e})};var _t=S(C());function cg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,index:o,isExperimental:i,description:s,sources:a,styles:l,...u}){let{selected:c,onChangeOpen:p}=gr(),d=P("CommandPalette",Qe);function h(y){r(y),e&&p(!1)}return(0,_t.jsxs)("div",{className:(0,la.default)(d.listItem,c===o&&d.listItemSelected),children:[(0,_t.jsxs)("button",{type:"button",className:(0,la.default)("command-palette-list-item",d.listItemAction,d.listItemPrimaryAction),"aria-disabled":u.disabled??!1,onClick:h,...u,children:[(0,_t.jsxs)("div",{className:d.listItemContent,children:[typeof n=="string"?(0,_t.jsx)("p",{className:(0,la.default)(d.listItemText,d.truncate,l==null?void 0:l.title),children:n}):n,s&&(0,_t.jsx)("p",{className:(0,la.default)(d.listItemDescription,l==null?void 0:l.description,t?d.lineClamp:d.truncate),children:s})]}),i&&(0,_t.jsx)(Pc,{})]}),a&&(0,_t.jsxs)("div",{className:d.sources,children:[(0,_t.jsx)("span",{className:d.sourcesTitle,children:"Sources"}),a.map(y=>y.url?(0,_t.jsx)("a",{className:d.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",children:y.name},y.url):(0,_t.jsx)("span",{className:d.source,children:y.name},y.name))]})]})}var ua={};Te(ua,{enUS:()=>GP,nlNL:()=>XP});var GP={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}]},XP={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}]};var hr=S(C());function dg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(ua),s=P("CommandPalette",Qe),{page:a}=gr();return a!==n?null:(0,hr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,hr.jsxs)("div",{className:s.pageNav,children:[(0,hr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,hr.jsx)(gc,{}),i("back")]}),t&&(0,hr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,hr.jsx)(Pc,{})]}),e]})}var yr=S(O());var Ic=()=>/Mac/i.test(navigator.platform);var QP={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},H=QP;function YP(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function ne(e){return Array.isArray(e)?e.map(ne):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[YP(n)]:ne(e[n])}),{}):e}function fg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ee(e){return Array.isArray(e)?e.map(Ee):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[fg(n)]:Ee(e[n])}),{}):e}var ZP={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},da=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)||""}},ca=N("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?ne(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),ne(r))}),pg=N("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}),mg=N("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),fx=e=>e.info.agentInfo,px=F({name:"info",initialState:ZP,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ca.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ca.rejected,t=>{t.fetchState="error"}).addCase(ca.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(pg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Z,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:mx}=px.actions,gx=px.reducer;var Lc={list:[],fetchState:"idle",isOpen:!1,page:"search"},hx=e=>e.search.isOpen,yx=e=>e.search.page,vx=e=>e.search.list;function Sx(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Xr=N("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:da(r),tags:e.tags});return i}),wx=F({name:"search",initialState:Lc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Lc.fetchState,e.list=Lc.list}},extraReducers:e=>{e.addCase(Xr.pending,t=>{t.fetchState="loading"}).addCase(Xr.rejected,(t,n)=>{t.fetchState="error",H.error(n.error)}).addCase(Xr.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(Z,()=>Lc)}}),{resetSearch:Ac,setIsOpen:ot,setPage:Ue}=wx.actions,xx=wx.reducer;var JP=/(https?:\/\/[^\s]+)/,Oc=e=>e.split(" ").find(t=>JP.test(t));var gg=S(Q());var Nc=S(C()),eR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Qe);return(0,Nc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,gg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Nc.jsx)("span",{className:(0,gg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},di=eR;var wn=S(C()),tR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=P("CommandPalette",Qe),a=j(ua),{selected:l,setSelected:u}=gr(),c=i[l],p=c&&typeof c.text=="string"&&Oc(c.text),d=(0,yr.useRef)(null);function h(w){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),T=0,E=0;w==="down"?(x.forEach((R,b)=>{b===l&&(T=b)}),E=T===x.length-1?0:T+1):w==="up"?(x.forEach((R,b)=>{b===l&&(T=b)}),E=T?T-1:x.length-1):u(0);let _=x[E];_&&typeof E=="number"&&(u(E),_.scrollIntoView&&_.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function y(){if(!d.current)return;let w=d.current.querySelectorAll(".command-palette-list-item"),x=0;w.forEach((E,_)=>{_===l&&(x=_)});let T=w[x];T&&T.click()}let v=()=>{p&&window.open(p,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,yr.useCallback)(w=>{if(w.key==="Enter"&&w.altKey&&p){v();return}if(w.key==="Enter"&&w.shiftKey){m();return}if(w.key==="ArrowDown"){w.preventDefault(),w.stopPropagation(),h("down");return}if(w.key==="ArrowUp"){w.preventDefault(),w.stopPropagation(),h("up");return}w.key==="Enter"&&l!==-1&&(w.preventDefault(),w.stopPropagation(),y())},[l]);return(0,yr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,wn.jsxs)("div",{className:s.actions,children:[(0,wn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,wn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,wn.jsx)(di,{onClick:v,shortKeys:[Ic()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,wn.jsxs)(yr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,wn.jsx)(di,{onClick:m,shortKeys:[8679,8629],children:n}),(0,wn.jsx)(di,{onClick:g,shortKeys:[8629],children:t})]})]})]})},Cx=tR;var Tx=S(O());var fa=S(C()),fi=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"currentColor",children:[(0,fa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,fa.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var Ht=S(C());function nR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Qe);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(fi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.jsx)("input",{ref:a,spellCheck:!1,onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,Ht.jsx)("div",{className:l.selectWrapper,children:(0,Ht.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,Ht.jsx)("option",{children:r}),o.map(u=>(0,Ht.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var _x=(0,Tx.forwardRef)(nR);var pa=S(C());function Qr({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[h,y]=(0,pi.useState)(0),v=(0,pi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{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,pi.useEffect)(()=>{y(0)},[d,r]),(0,pa.jsx)(ti,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,children:(0,pa.jsxs)(cx,{selected:h,setSelected:y,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,pa.jsx)(_x,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Qr.Page=dg;Qr.List=ag;Qr.Image=rx;Qr.ListItem=cg;Qr.ActionsBar=Cx;Qr.Button=di;var ee=Qr;var je=S(C()),rR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=P("EditSuggestionForm",b0),l=K(),u=j(Nm),c=A(y=>y.overlayInput.text);(0,hg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=y=>{y.preventDefault(),d(c)},d=y=>{l(Xu(y)),t(y)},h=y=>v=>{c!==s?window.confirm(u("warning"))&&y(v):y(v)};return(0,hg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,je.jsxs)("div",{className:a.root,children:[(0,je.jsxs)("div",{className:a.content,children:[e.title&&(0,je.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,je.jsx)(Km,{labels:e.searchKeywords}),(0,je.jsx)(nx,{onUse:d,value:c})]}),(0,je.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,je.jsx)(gc,{})}),(0,je.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,je.jsx)(D0,{})})]}),(0,je.jsxs)("div",{className:a.primaryButtons,children:[(0,je.jsx)(ee.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,je.jsx)(ee.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Mc=rR;var oR=["{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}"],iR=new RegExp(oR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function bx(e,t){let n=e.split(iR),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 kx(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var Rx={suggestions:[],fetchState:"idle",isInitialRequest:null},Px={default:Rx},Ix=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Lx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Ax=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")},mi=e=>e.textSuggestions,Ox=e=>t=>t.text.startsWith(e),Dc=fe("textSuggestions/refresh"),xn=N("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=Jo(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,da(r),e);if(e==="default"){let c=s?l.filter(Ox(a)):l;t.dispatch(fr(c.slice(0,i)))}return l}),ma=N("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,{...da(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Ox(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?bx(c.text,e):c.text}))),l=kx(l,i),t.dispatch(fr(l)),l}),Nx=F({name:"textSuggestions",initialState:Px,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(xn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||Rx;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(xn.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(xn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(ma.pending,t=>{t.default.fetchState="loading"}).addCase(ma.rejected,t=>{t.default.fetchState="error"}).addCase(ma.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(Z,()=>Px)}}),{setTextSuggestions:Mx,setSuggestionState:Dx}=Nx.actions,Fx=Nx.reducer;var jx={contentType:null,suggestion:null},Hx=e=>e.activeSuggestion.suggestion,Bx=e=>e.activeSuggestion.contentType,Ux=F({name:"activeSuggestion",initialState:jx,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(Z,()=>jx)}}),{setActiveSuggestion:En,resetActiveSuggestion:yg}=Ux.actions,zx=Ux.reducer;var vg={};Te(vg,{enUS:()=>sR,nlNL:()=>aR});var sR={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"}]},aR={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 lR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Vx=({ui:e})=>e.overlayCollapsed;var Kx=F({name:"ui",initialState:lR,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:ga,setInputHasFocus:gi,setOverlayCollapsed:hi,setOpenOverlayWhenTyping:Wx,setOverlayCollapsedUserOverwrite:$x}=Kx.actions,qx=Kx.reducer;var ha=S(O()),Xx=S(C()),Gx=ha.default.createContext(null),ya=({broadcastEvents:e,children:t})=>{let n=ha.default.useMemo(()=>e,[]);return(0,Xx.jsx)(Gx.Provider,{value:n,children:t})},bt=()=>{let e=(0,ha.useContext)(Gx);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var uR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Cn=e=>e.auth.isLoggedIn,Qx=e=>e.auth.loginFetchState,Yx=e=>e.auth.verifyFetchState,Zx=e=>e.auth.showLoginOverlay,Yr=N("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Jx=N("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),va=N("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),eE=F({name:"auth",initialState:uR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Yr.pending,t=>{t.loginFetchState="loading"}),e.addCase(Yr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Yr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(va.pending,t=>{t.verifyFetchState="loading"}),e.addCase(va.rejected,t=>{t.verifyFetchState="error"}),e.addCase(va.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Fc,setShowLoginOverlay:tE}=eE.actions,nE=eE.reducer;var Sg="SetActiveSuggestion",yi="ShowLoginOverlay",wg="UserLoggedIn",Tn="ApplySuggestion",xg="ApplyImageSuggestion",cR="ShowCommandPalette",dR=e=>({[Sg]:t=>{e.dispatch(Dx(t.state)),e.dispatch(En({contentType:t.contentType,suggestion:t.suggestion}))},[cR]:t=>{e.dispatch(ot(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[yi]:t=>{e.dispatch(tE(t))},[wg]:()=>{e.dispatch(Yr())},[xg]:t=>{e.dispatch(Yu({suggestion:t.suggestion}))},[Tn]:t=>{e.dispatch(Mt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(pr())}}),rE=dR;var Eg=S(C()),fR=()=>{var y;let[e,t]=(0,oE.useState)(!1),n=A(Hx),r=A(Bx),o=A(mi),i=K(),s=bt(),a=j(vg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(yg()),i(gi(!0)),i(Ge.actions.reset())},c=(v,g)=>{i(yg()),i(gi(!0)),s.send(Tn,{text:v,suggestion:g})};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(En({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(En({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Eg.jsx)(ti,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Eg.jsx)(Mc,{onTouched:t,onDismiss:u,onUse:v=>c(v,n),suggestion:n,onNext:h,onPrevious:d})})},iE=fR;var jc=S(Q()),Bt=S(O());var aE=S(Q());var sE={root:"_root_1ukx5_1"};var lE=S(C()),pR=({className:e,value:t,...n})=>{let r=P("TextInput",sE);return(0,lE.jsx)("input",{className:(0,aE.default)(e,r.root),type:"text",value:t,...n})},Sa=pR;var Cg={};Te(Cg,{enUS:()=>mR,nlNL:()=>gR});var mR={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},gR={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var uE={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=S(C());var hR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},yR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Cg),s=P("LoginTokenDialog",uE),a=A(Yx),l=K(),u=D("productName"),[c,p]=(0,Bt.useState)(e||""),[d,h]=(0,Bt.useState)(0),[y,v]=(0,Bt.useState)(""),g=(0,Bt.useCallback)(async x=>{x.preventDefault(),l(Jx({email:c})),h(1)},[n,c]),m=()=>{v(""),h(0)},f=(0,Bt.useCallback)(async x=>{x.preventDefault();let T=hR(x.target.elements.token.value);if(!T){v(i("verifyCodeError",{login:w}));return}l(va({token:T}))},[n]),w=(0,Bt.useMemo)(()=>x=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,Bt.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:w})),a==="done"&&r()},[a]),(0,he.jsx)(ti,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Sa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>p(x.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,jc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:f,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Sa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,he.jsx)("div",{className:s.errorMessage,children:y}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,jc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,jc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},cE=yR;var fE=S(C()),vR=()=>{let e=A(Zx),t=A(fx),n=D("adminUrl"),r=bt(),o=()=>r.send(yi,!1),i=()=>{r.send(yi,!1),r.send(wg)};return(0,fE.jsx)(cE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},dE=vR;var jE=S(bg()),it=S(O());var DR={data:null,fetchState:"idle"},hE=e=>e.contentTypes.data,wa=N("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),FR=F({name:"contentTypes",initialState:DR,reducers:{},extraReducers:e=>{e.addCase(wa.pending,t=>{t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),yE=FR.reducer;function xa(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 vE=S(O());function SE(e,t){(0,vE.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 Ea=S(O());var wE={data:null,fetchState:"idle"},Hc=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},Ut=N("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)}),jR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),HR=F({name:"entities",initialState:wE,reducers:{},extraReducers:e=>{e.addCase(Ut.pending,t=>{t.fetchState="loading"}).addCase(Ut.rejected,t=>{t.fetchState="error"}).addCase(Ut.fulfilled,(t,n)=>{t.fetchState="done",t.data=jR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(Z,()=>wE)}}),xE=HR.reducer;var kg={};Te(kg,{enUS:()=>BR,nlNL:()=>UR});var BR={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},UR={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var EE={root:"_root_17kae_1",empty:"_empty_17kae_5"};var Zr=S(C()),zR=({onCopy:e,onUse:t})=>{let n=(0,Ea.useRef)(null),r=P("EntitiesList",EE),o=j(kg),i=A(Hc),s=K();return(0,Ea.useEffect)(()=>{s(Ut())},[]),(0,Ea.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,Zr.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,Zr.jsx)(ee.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,Zr.jsx)(ee.List,{children:i.map((a,l)=>(0,Zr.jsx)(ee.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,Zr.jsx)("p",{className:r.empty,children:o("noResults")})]})},CE=zR;var zt=S(O());var TE={data:null,fetchState:"idle"},_E=e=>e.summary.data,bE=e=>e.summary.fetchState==="error",_n=N("summary/getSummary",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let o=r.conversationQuery,i=await o();if(i.length===0)return Promise.reject(new Error("No messages are included"));let s=await n.getSummary(i);return{original:i,summary:s}}),VR=F({name:"summary",initialState:TE,reducers:{},extraReducers:e=>{e.addCase(_n.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(_n.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(_n.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(Z,()=>TE)}}),kE=VR.reducer;var Pg={};Te(Pg,{enUS:()=>KR,nlNL:()=>WR});var KR={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."}]},WR={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 PE={root:"_root_18y7z_1",actions:"_actions_18y7z_5",main:"_main_18y7z_11",textInput:"_textInput_18y7z_15",loading:"_loading_18y7z_34",error:"_error_18y7z_38"};var bn=S(C()),$R=({onCopy:e})=>{let t=(0,zt.useRef)(null),n=P("SummaryForm",PE),[r,o]=(0,zt.useState)(""),i=j(Pg),s=A(_E),a=A(bE),l=K(),u=()=>{l(Zt({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(Zt({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,zt.useEffect)(()=>{l(_n())},[]),(0,zt.useEffect)(()=>{o(s||"")},[s]),(0,zt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,zt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,bn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,bn.jsx)("p",{className:n.error,children:i("error")}):(0,bn.jsxs)(zt.Fragment,{children:[(0,bn.jsx)("div",{className:n.main,children:(0,bn.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,bn.jsx)("div",{className:n.actions,children:(0,bn.jsx)(ee.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},RE=$R;var Rg={};Te(Rg,{enUS:()=>qR,nlNL:()=>GR});var qR={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"}],knowledgeSearch:[{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?"}]},GR={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Vat gesprek samen"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeSearch:[{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 Jr=S(O());var Ig={};Te(Ig,{enUS:()=>XR,nlNL:()=>QR});var XR={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"}]},QR={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 IE={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Lg={data:[],fetchState:"idle"},LE=e=>{var t;return(t=e.answer)==null?void 0:t.data},AE=e=>e.answer.fetchState,Ca=fe("answer/resetKnowledgeSearch"),vi=N("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().profile.data)==null?void 0:s.code;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeSearch({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),YR=F({name:"answer",initialState:Lg,reducers:{},extraReducers:e=>{e.addCase(vi.pending,t=>{t.fetchState="loading"}).addCase(vi.rejected,t=>{t.fetchState="error"}).addCase(vi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(Z,()=>Lg).addCase(Ca,()=>Lg)}}),OE=YR.reducer;var Ta=S(C()),NE=()=>(0,Ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ta.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ta.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Ye=S(C()),ZR=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Jr.default.useState(""),{setSelected:s}=gr(),a=(0,Jr.useRef)(null),l=P("EntitiesList",IE),u=j(Ig),c=K(),p=A(LE),d=A(AE),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(vi({question:o,promptInstruction:r}))};return(0,Jr.useEffect)(()=>{var y;n&&d==="idle"?c(vi({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,Jr.useEffect)(()=>{d==="done"&&(s(0),i(""))},[d,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(ee.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(ee.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:v},g)=>(0,Ye.jsx)(ee.List,{children:(0,Ye.jsx)(ee.ListItem,{"data-testid":"knowledge-search-answer",index:g,description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),sources:v.sources,styles:{title:l.question,description:l.answer},children:y})},`${v.answer}_${g}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,Ye.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(NE,{})})]})]})]})},ME=ZR;var JR={data:null,fetchState:"idle"},Si=e=>e.profile.data,Bc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],_a=N("profile/getProfile",async(e,t)=>{let{deepdeskAPI:n}=t.extra,o=t.getState().conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return n.getProfile(o.profileCode)}),eI=F({name:"profile",initialState:JR,reducers:{},extraReducers:e=>{e.addCase(_a.pending,t=>{t.fetchState="loading"}).addCase(_a.rejected,t=>{t.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),DE=eI.reducer;var Ce=S(C()),tI=200,nI=5,rI=4,oI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),FE=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),iI=()=>{let e=K(),t=bt(),n=j(Rg),[r,o]=(0,it.useState)(!1),[i,s]=(0,it.useState)(""),a=A(yx),l=A(Si),[u,c]=(0,it.useState)(null),[p,d]=(0,it.useState)([]),[h,y]=(0,it.useState)(),v=A(Cn),g=D("showSearch"),m=D("showEntitiesCommand"),f=D("showSummaryCommand"),w=D("showKnowledgeSearch"),x=D("showImageSearch"),T=D("searchTriggerKey"),E=A(hE),_=A(vx),R=A(hx),b=I=>on(_.filter(W=>W.type===I.toUpperCase()),I),B=[{value:"PERSONAL",label:n("personalSuggestions"),list:b("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:b("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:b("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:b("IMAGE"),listOrientation:"horizontal",shouldShow:x}].filter(I=>I.shouldShow),re=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:m&&FE(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&FE(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeSearch")}: ${i}`:n("knowledgeSearch"),onClick:()=>e(Ue("knowledgeSearch")),shouldShow:w,experimental:!0}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:b(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],Pe=(0,it.useCallback)((0,jE.default)((I,W)=>{e(Xr({query:I,type:W,tags:["search-overlay"]}))},tI),[]),so=oI([...z,...B]),Vt=(0,it.useCallback)((I,W)=>{if(!W)return;let It=[...B,...z].find(({value:Dn})=>Dn===W);It&&(e(Ue("edit")),c(I),d(It.list))},[e,u,z]),ao=(0,it.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(xg,{suggestion:W});break;default:t.send(Tn,{text:I,suggestion:W})}e(ot(!1))},[e]),Ii=I=>{xa(I.text),e(Zt({name:"entity copied",data:{entity:I,type:"copy"}})),e(ot(!1))},Tr=I=>{t.send(Tn,{text:I,suggestion:{source:"knowledge-search",text:I}}),e(Zt({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ca()),e(ot(!1))},Fa=I=>{xa(I),e(ot(!1))},ja=I=>{t.send(Tn,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(ot(!1))},Li=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ai=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function on(I,W){return I.slice(0,h?10:W.toLowerCase()==="image"?rI:nI)}function Oi(I,W,It){return W.reduce((Dn,sn)=>It&&h===It?sn.length+Dn:on(sn,It).length+Dn,I)}function _r(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,it.useEffect)(()=>{i?Pe(i,h):e(Ac())},[i,h]),(0,it.useEffect)(()=>{v&&e(wa())},[v]),SE(T,()=>e(ot(!0))),!g||!l?null:(0,Ce.jsxs)(ee,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:_r(I=>e(ot(I))),onChangeType:I=>y(I),onChangePage:_r(I=>e(Ue(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...B],children:[(0,Ce.jsx)(ee.Page,{id:"search",children:(0,Ce.jsxs)(ee.ActionsBar,{list:[...re.map(I=>({text:I.label,type:"command"})),...so.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>ao(I,so[W]),onSecondary:(I,W)=>Vt(so[W],so[W].type),children:[re.length>0&&(0,Ce.jsx)(ee.List,{heading:n("commands"),children:re.map((I,W)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...z,...B].map(({value:I,label:W,list:It,lineClamp:Dn,listOrientation:sn},Ni)=>(0,Ce.jsx)(ee.List,{heading:W,orientation:sn==="horizontal"?"horizontal":"vertical",children:on(It,I).map((ut,ct)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(re.length+ct,[...z,...B].slice(0,Ni).map(({list:br})=>br),I),closeOnSelect:!1,lineClamp:Dn,onClick:()=>ao(ut.text,ut),description:I!=="IMAGE"?ut.title&&ut.text:void 0,children:I==="IMAGE"?(0,Ce.jsx)(ee.Image,{title:ut.title||ut.text,src:ut.image}):ut.title||ut.text},`${ut.id}-${ut.text}`))},I))]})}),(0,Ce.jsx)(ee.Page,{id:"edit",onDismiss:_r(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ce.jsx)(Mc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Ai,onPrevious:Li,onUse:I=>{e(Ue("search")),ao(I,u),e(ot(!1)),d([]),c(null)}})}),(0,Ce.jsx)(ee.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:_r(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(CE,{onUse:ja,onCopy:Ii})}),(0,Ce.jsx)(ee.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:_r(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(RE,{onCopy:Fa})}),(0,Ce.jsx)(ee.Page,{id:"knowledgeSearch",title:n("knowledgeSearch"),isExperimental:!0,onDismiss:_r(()=>{e(Ca()),e(Ue("search"))}),children:(0,Ce.jsx)(ME,{promptInstruction:l.knowledgeSearchPromptInstruction,question:i,onUse:Tr,onResetQuestion:()=>{e(Ca()),s("")}})})]})},HE=iI;var wi=S(C()),sI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,wi.jsxs)(BE.Fragment,{children:[e&&(0,wi.jsx)(HE,{}),(0,wi.jsx)(iE,{}),t&&(0,wi.jsx)(dE,{})]})},UE=sI;var ba=S(C()),aI=({children:e})=>{let n=D("locale").replace("-","");return(0,ba.jsx)(zm.Provider,{value:n,children:e})},lI=({store:e,customStyles:t={},children:n})=>(0,ba.jsx)(Em,{store:e,children:(0,ba.jsx)(aI,{children:(0,ba.jsx)($s.Provider,{value:t,children:n})})}),ka=lI;var Kc=S(Q()),Ci=S(O());var zE=S(O());function VE(e,t){let[n,r]=(0,zE.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)}}]}function Uc(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 WE=S(Q()),kn=S(O());var Ag={};Te(Ag,{enUS:()=>uI,nlNL:()=>cI});var uI={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"}]}]},cI={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 KE={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var vr=S(C()),Og=(e,t,n)=>r=>(0,vr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),dI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Ag),i=bt(),s=P("Login",KE),a=D("productName"),l=(0,kn.useCallback)(v=>{v.preventDefault(),r&&r(parseInt(v.target.value,10))},[]),u=(0,kn.useCallback)(v=>{v.preventDefault(),i.send(yi,!0)},[t]),c=(0,kn.useMemo)(()=>v=>(0,vr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:v},"login"),[t]),p=(0,kn.useCallback)(v=>(0,vr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:v},"prompt"),[u]),{min:d,hour:h,day:y}=(0,kn.useMemo)(()=>({min:Og(s,60*10,l),hour:Og(s,60*60,l),day:Og(s,60*60*12,l)}),[]);return(0,vr.jsxs)("div",{className:(0,WE.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,vr.jsxs)(kn.Fragment,{children:[(0,vr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:y})]})]})},zc=dI;var $E={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Pa=S(C()),fI=({title:e})=>{let t=P("SearchTrigger",$E),n=K();return(0,Pa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(ot(!0)),children:[(0,Pa.jsx)(fi,{}),(0,Pa.jsx)("span",{className:t.text,children:e})]})},qE=fI;var XE=S(Q());var GE={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var QE=S(C()),pI=({withDivider:e,children:t})=>{let n=P("SuggestionList",GE);return(0,QE.jsx)("div",{className:(0,XE.default)(n.root,{[n.isWithDivider]:e}),children:t})},tn=pI;var rC=S(O());var Ei=S(O());var YE=S(O());function ZE(e,t,n){(0,YE.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var mI=/[.*+?^${}()|[\]\\]/g,gI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function hI(e){return e.replace(mI,"\\$&")}function yI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Ng(e){return e.search(gI)}function JE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${hI(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function eC(e){return e.replace(lo,'<mark data-type="placeholder">$1</mark>')}function xi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function vI(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 Mg(e,t,n={}){if(t){let r=yI(t.toLowerCase(),e.toLowerCase()),o=xi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Ng(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(vh).length>3||t.length>30?vI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${xi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var tC={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Dg=S(C()),wI=["search","personal-collection-search","studio-search"];function xI(e,t,n,r={}){let o="";return wI.includes(t)?o=JE(Mg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Mg(e,n,r),r.placeholders===!0&&(o=eC(o)),o}var EI=()=>{},CI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=A(Jo),i=K(),s=P("TextSuggestion",tC),a=(0,Ei.useRef)(null);(0,Ei.useEffect)(()=>{let u=setTimeout(()=>{i(p0({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),ZE(a,"click",()=>{i(Zu(e)),i(Mt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Ei.useMemo)(()=>xI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Dg.jsx)(se,{ref:a,as:"button",selected:t,onClick:EI,children:(0,Dg.jsx)(oi,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},nC=CI;var Fg=S(C()),TI=({suggestions:e,selectedIndex:t})=>(0,Fg.jsx)(rC.Fragment,{children:e.slice().map((n,r)=>(0,Fg.jsx)(nC,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),oC=TI;var sC=S(Q());var iC={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var Vc=S(C()),_I=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",iC);return(0,Vc.jsx)("button",{type:"button",className:(0,sC.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Vc.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Vc.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},eo=_I;var jg={};Te(jg,{enUS:()=>bI,nlNL:()=>kI});var bI={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"}]},kI={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 aC={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(C()),PI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=P("SuggestionsOverlay",aC),o=j(jg),i=D("inlineSuggestions"),s=A(Uc),a=l0(),l=K(),u=(0,Ci.useRef)(null),c=D("searchTriggerKey"),p=D("productName"),d=A(Vx),h=A(Cn),y=A(Bu),[v,g]=(0,Ci.useState)(null),m=D("showSearch"),f=D("showTextSuggestions"),w=D("adminUrl"),x=D("isEmbedded"),[T,E]=VE("dd-snooze-until-ms",0),_=d||T>Date.now(),R=t.filter(re=>re.source!=="gpt").length,b=()=>{_&&E(0),l($x(!_))},B=re=>{let z=Date.now()+re*1e3;E(z),H.info(`Snooze until: ${new Date(z)}`),l(hi({collapse:!0}))};return(0,Ci.useEffect)(()=>{R===0&&g(null)},[t,R]),li(()=>{l(hi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||h===null||y===!1?null:h===!1?(0,ue.jsxs)("div",{ref:u,className:(0,Kc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(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)(eo,{className:r.toggleButton,title:o("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(eo,{className:r.toggleButton,title:o("open",{productName:p}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(zc,{loginUrl:w,isEmbedded:x,onSnooze:B})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,Kc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(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:()=>g(o(Ic()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,ue.jsx)(qE,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,Kc.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,ue.jsx)(eo,{className:r.toggleButton,title:o("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(eo,{className:r.toggleButton,title:o("open",{productName:p}),onClick:b,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(tn,{children:(0,ue.jsx)(oC,{suggestions:t,selectedIndex:n})})})]})},RI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Wc=Vr(RI)(PI);var ld=S(Q());var In=S(O());var lC=S(O()),II=["div","span","mark","strong","b","i","u","em"];function Hg(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(II.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,lC.cloneElement)(r,{children:Hg(s,t,n+1)})]}return[...e,...t]}function Pn(e){return e.tagName.toLowerCase()==="textarea"}var cC=S(Q());var uC={root:"_root_1s73o_1",isArrowUp:"_isArrowUp_1s73o_22",isArrowDown:"_isArrowDown_1s73o_23",isTab:"_isTab_1s73o_39",isEsc:"_isEsc_1s73o_44",isEnter:"_isEnter_1s73o_49"};var dC=S(C());var LI=({className:e,keyCode:t,children:n,...r})=>{let o=P("KeyboardHint",uC);return(0,dC.jsx)("span",{className:(0,cC.default)(e,o.root,{[o.isArrowUp]:t==="arrow-up",[o.isArrowDown]:t==="arrow-down",[o.isTab]:t==="tab",[o.isEsc]:t==="esc",[o.isEnter]:t==="enter"}),...r,children:n})},$c=LI;var Qc=S(O());var Ug=S(Q()),kt=S(O());var qc=S(O()),AI=["bottom","height","left","right","top","width"],OI=(e={},t={})=>AI.some(n=>e[n]!==t[n]),Rn=new Map,fC,pC=()=>{let e=[],t=[];Rn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();OI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Rn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),fC=window.requestAnimationFrame(pC)};function NI(e,t){return{observe(){let n=Rn.size===0;if(Rn.has(e)){let r=Rn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Rn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&pC()},unobserve(){let n=Rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Rn.delete(e),Rn.size||cancelAnimationFrame(fC)}}}}function Bg(e){let[t,n]=(0,qc.useState)(null);return(0,qc.useLayoutEffect)(()=>{if(!e.current)return;let r=NI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ti=S(O()),gC=S(tu());var mC={root:"_root_1jq08_1"};var hC=({children:e})=>{let[t,n]=(0,Ti.useState)(null),r=(0,Ti.useContext)($s);return(0,Ti.useLayoutEffect)(()=>{let o=document.createElement("div");return Gr(o),o.classList.add(mC.root),r!=null&&r.rootNode&&o.classList.add(r==null?void 0:r.rootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,gC.createPortal)(e,t):null};var nn={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 Gc=S(C()),_i=(e=!1)=>{let[t,n]=(0,kt.useState)(e),r=(0,kt.useCallback)(()=>n(!0),[]),o=(0,kt.useCallback)(()=>n(!1),[]),i=(0,kt.useCallback)(()=>n(a=>!a),[]),s=(0,kt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function zg(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 bi=({className:e,triggerRef:t,boundaryRef:n=(0,kt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=zg,...a})=>{let l=Bg(t),u=Bg(n),c=(0,kt.useMemo)(()=>s(l,u,0),[l,u]);return(0,Gc.jsx)(hC,{children:(0,Gc.jsx)("div",{className:(0,Ug.default)(nn.ref,{[nn.positionAbove]:r==="above",[nn.positionBelow]:r==="below",[nn.positionLeft]:r==="left",[nn.positionRight]:r==="right",[nn.alignStart]:o==="start",[nn.alignCenter]:o==="center",[nn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,Gc.jsx)("div",{className:(0,Ug.default)(e,nn.root),children:i})})})};var Sr=S(C()),MI=({inputStyle:e,inputElement:t})=>{let n=P("TabCompletion",Ct),r=_i(document.activeElement===t);return li(()=>r.close()),(0,Qc.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Sr.jsxs)(Qc.Fragment,{children:[(0,Sr.jsx)("mark",{className:Ct.caret,ref:r.triggerRef}),r.opened&&(0,Sr.jsx)(bi,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Sr.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Sr.jsx)(Wc,{inline:!0})})})]})},Xc=class extends jt{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Pn(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Ng(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Sr.jsx)(MI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var wC=S(Q());var td=S(O());function yC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Yc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function vC(e){return e!=null}var SC=S(Q()),Zc=S(O());var Vg=S(C()),Jc=(0,Zc.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Zc.useRef)(null),i=P("TabCompletion",Ct);return(0,Vg.jsx)("div",{ref:Yc([o,r]),className:(0,SC.default)(e,i.popoverContentContainer),...n,children:(0,Vg.jsx)("div",{className:i.popoverContent,children:t})})});var wr=S(C()),DI=e=>t=>{let n=zg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},FI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",Ct),s=_i(),a=(0,td.useMemo)(()=>DI(e.getBoundingClientRect()),[e]),[l,u]=Cc(e);return(0,td.useEffect)(()=>{u?s.open():s.close()},[u]),(0,wr.jsxs)("span",{children:[(0,wr.jsx)("mark",{ref:Yc([l,s.triggerRef]),className:(0,wC.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,wr.jsx)(bi,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,wr.jsx)(Jc,{style:n,children:(0,wr.jsx)("div",{className:i.hintText,children:o})})})]})},ed=class extends jt{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${yC(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(vC);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,wr.jsx)(FI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var sd=S(Q());var Ve=S(O());var Kg=S(C()),xC=()=>(0,Kg.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,Kg.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 xr=S(O());var _C=S(bg());var nd=S(Q()),Pt=S(O());var EC={root:"_root_vr71j_1"};var to=S(C()),CC=()=>(0,to.jsxs)("svg",{className:EC.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,to.jsx)("defs",{children:(0,to.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,to.jsx)("title",{children:"Failed loading image"}),(0,to.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 Wg={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 no=S(C()),rd=(0,Pt.createContext)(Wg),jI=({title:e,src:t})=>{let n=(0,Pt.useContext)(rd),[r,o]=(0,Pt.useState)(!1);return(0,Pt.useEffect)(()=>{o(!1)},[t]),(0,no.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,no.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,no.jsx)(CC,{})})},HI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pt.useContext)(rd);return(0,no.jsx)("div",{className:(0,nd.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},BI=({as:e="h1",cropText:t=!1,className:n,children:r})=>{let o=(0,Pt.useContext)(rd);return Pt.default.createElement(e,{className:(0,nd.default)(o.title,n,{[o.contentIsCropped]:t})},r)},od=({children:e})=>{let t=P("Card",Wg);return(0,no.jsx)("div",{className:(0,nd.default)(t.root),children:(0,no.jsx)(rd.Provider,{value:t,children:e})})};od.Image=jI;od.Content=HI;od.Title=BI;var ge=od;var TC={root:"_root_1muu8_1",content:"_content_1muu8_7"};function id(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 $g(e){return e.replace("https://www.","").replace("https://","")}var Rt=S(C()),UI=3,zI=e=>({image:e.image||"",text:`https://${e.text}`,id:e.id,title:e.title}),VI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=UI})=>{let i=P("LinkSearch",TC),[s,a]=(0,xr.useState)(""),l=K(),u=A(Ix("url")),c=A(Sx("URL",zI)),[p,d]=(0,xr.useState)(c.length-1),h=D("fallbackImage"),y=f=>{let w=f.target;a(w.value)},v=(f,w)=>{f.stopPropagation(),f.preventDefault(),window.open(w,"_blank")},g=f=>{var T;let w=p-1<0?c.length-1:p-1,x=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(w),f.code==="ArrowDown"&&d(x),f.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,xr.useCallback)((0,_C.default)(f=>{l(Xr({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,xr.useEffect)(()=>{s&&m(s)},[s]),(0,xr.useEffect)(()=>()=>{l(Ac())},[]),(0,Rt.jsxs)("div",{className:i.root,children:[(0,Rt.jsx)(tn,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,w)=>(0,Rt.jsx)(se,{selected:p===w,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,Rt.jsxs)(ge,{children:[(0,Rt.jsx)(ge.Image,{src:id(f,"small",h||void 0),title:f.title||f.text}),(0,Rt.jsxs)(ge.Content,{className:i.content,cropText:!0,children:[(0,Rt.jsx)(ge.Title,{children:f.title||$g(f.text)}),f.title&&$g(f.text)]}),(0,Rt.jsx)(se.Actions,{children:(0,Rt.jsx)(se.ActionButton,{label:r,onClick:x=>v(x,f.text)})})]})},f.text))}),(0,Rt.jsx)(Sa,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:g})]})},bC=VI;var qg={};Te(qg,{enUS:()=>KI,nlNL:()=>WI});var KI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},WI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(C()),$I=(0,Ve.forwardRef)((e,t)=>{let n=P("TabCompletion",Ct);return(0,ze.jsx)("mark",{ref:t,className:(0,sd.default)(n.matchSelection)},"selection-start")}),qI=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(qg),s=P("TabCompletion",Ct),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),p=K(),d=_i(document.activeElement===r),[h]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ve.useEffect)(()=>()=>h.detach(),[]),(0,Ve.useEffect)(()=>{let v=e.current,g=a.current;!v||!g||(h.setStart(v,0),h.setEnd(g,0))},[e.current,a.current]),li(()=>{d.close()});let y=(0,Ve.useCallback)(v=>{let g=h.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;p(qu({text:`[${g}](${m})`}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,sd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(bi,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(Jc,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,sd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(xC,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(bC,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},ad=class extends jt{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,ze.jsx)($I,{ref:this.startRef}):(0,ze.jsx)(qI,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var kC={root:"_root_kpc8q_1",agentText:"_agentText_kpc8q_4",tabText:"_tabText_kpc8q_9",hint:"_hint_kpc8q_10",matchSelection:"_matchSelection_kpc8q_14",focus:"_focus_kpc8q_20",resetIndent:"_resetIndent_kpc8q_24",matchKeyword:"_matchKeyword_kpc8q_28",matchPlaceholder:"_matchPlaceholder_kpc8q_29",hover:"_hover_kpc8q_35",hintText:"_hintText_kpc8q_67",popover:"_popover_kpc8q_75",popoverRoot:"_popoverRoot_kpc8q_80",popoverContentContainer:"_popoverContentContainer_kpc8q_84",popoverContent:"_popoverContent_kpc8q_84",selectionOptions:"_selectionOptions_kpc8q_110",selectionOptionsIsHidden:"_selectionOptionsIsHidden_kpc8q_115",selectionOptionsButton:"_selectionOptionsButton_kpc8q_119",caret:"_caret_kpc8q_135",popoverSuggestionsRoot:"_popoverSuggestionsRoot_kpc8q_139",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_kpc8q_144"};var Er=S(C()),GI=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",kC),c=D("insertLink"),p=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),h=_c(a),y=(0,In.useRef)(null);(0,In.useEffect)(()=>{Pn(a)&&h&&bc(a,h)},[h]);let v=(0,In.useCallback)(f=>{if(!o||!n)return f;let w=[(0,Er.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Er.jsx)("span",{className:(0,ld.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,Er.jsx)($c,{className:(0,ld.default)(u.hint,u.resetIndent),keyCode:"tab"},"tabHint")),Hg(f,w)},[o,n,r]),g=(0,In.useMemo)(()=>{let f=[];return d&&f.push(new Xc("inline")),c&&f.push(new ad("selection")),f.push(new si("placeholders")),i&&f.push(new ed("keywords")),f},[d,c,i]),m=(0,In.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,Er.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(y.current=f==null?void 0:f.parentElement)},className:(0,ld.default)(u.root,u.agentText),style:m,children:[(0,Er.jsx)(oi,{tagName:"span",noWrap:!1,containerTagName:"div",disableLineBreaks:Pn(a),content:t||"\u200B",onAfterParse:v,matchers:g,selection:h,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!p}),(0,Er.jsx)("br",{})]}):null},XI=({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??xi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,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:h&&p!==!1}},PC=Vr(XI)(GI);var TT=S(Q()),_T=S(O());var RC={list:[],fetchState:"idle",isInitialRequest:null},LC=e=>e.autoflows.list||[],IC=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Ln=N("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gg=N("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(Ln(e.platformSessionId))}),Xg=N("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(Ln(e.platformSessionId))}),QI=F({name:"autoflows",initialState:RC,reducers:{},extraReducers:e=>{e.addCase(Gg.pending,(t,n)=>{let r=IC(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Xg.pending,(t,n)=>{let r=IC(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Ln.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Ln.rejected,t=>{t.fetchState="error"}),e.addCase(Ln.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(Z,()=>RC)}}),AC=N("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(Ln(e))}),o.on("sessionCompleted",()=>{n(Ln(e))})}),OC=N("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),NC=QI.reducer;var MC={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},DC=e=>e.customMessages.list,FC=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),jC=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),HC=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ra=N("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),ud=N("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)}),cd=N("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)}),BC=F({name:"customMessages",initialState:MC,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(ud.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(ud.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(cd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(cd.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(Z,()=>MC)}}),UC=N("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(BC.actions.onCustomMessage(i))})}),zC=N("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),VC=BC.reducer;var YI={jwt:null,accountUrl:null,interval:null},KC=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},Qg=N("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),Yg=N("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(Qg()),setInterval(()=>r(Qg()),n)}),WC=F({name:"exchangeToken",initialState:YI,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Qg.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(Yg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:$C}=WC.actions,qC=WC.reducer;function GC(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var rT=S(O());var eT=S(Q()),tT=S(O());var QC=S(Q());var XC={root:"_root_838fd_1"};var ZC=S(C()),ZI=({className:e,children:t})=>{let n=P("Unicode",XC);return(0,ZC.jsx)("span",{className:(0,QC.default)(e,n.root),children:t})},YC=ZI;var JC={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 Zg={};Te(Zg,{enUS:()=>JI,nlNL:()=>eL});var JI={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"}]},eL={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 st=S(C()),nL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",JC),a=j(Zg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,st.jsxs)(se,{className:(0,eT.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,st.jsx)(ge,{children:(0,st.jsxs)(ge.Content,{children:[(0,st.jsxs)(ge.Title,{children:[t&&(0,st.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,st.jsx)("span",{children:r})]})}),(0,st.jsx)(se.Actions,{fixed:t==="Started",children:(0,st.jsx)(se.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,st.jsxs)(tT.Fragment,{children:[(0,st.jsx)(YC,{children:u})," ",(0,st.jsx)("span",{children:a(l)})]})})})]})},nT=nL;var Jg=S(C()),rL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},oL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jg.jsx)(rT.Fragment,{children:e.map(o=>(0,Jg.jsx)(nT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||rL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),iL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},sL={onStartAutoflow:Gg,onStopAutoflow:Xg},oT=Vr(iL,sL)(oL);var dd=S(O());var nh=S(Q());var eh=S(C()),th=()=>(0,eh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,eh.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 iT={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 rn=S(C()),aL=({entities:e})=>{let t=P("EntitiesWidgetList",iT),[n,r]=(0,dd.useState)(void 0),o=K(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),xa(a.text),o(Zt({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,dd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,rn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,rn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,rn.jsx)("span",{className:t.entityText,children:a.text}),(0,rn.jsxs)("span",{className:t.iconWrapper,children:[(0,rn.jsx)("span",{className:(0,nh.default)(t.icon),children:(0,rn.jsx)(th,{})}),(0,rn.jsx)("span",{className:(0,nh.default)(t.icon,n===l&&t.iconClicked),children:(0,rn.jsx)(th,{})})]})]},a.text))})},sT=aL;var cT=S(Q()),rh=S(O());var lT=S(Q());var aT={root:"_root_4a08n_1"};var uT=S(C()),lL=({className:e,children:t,...n})=>{let r=P("Label",aT);return(0,uT.jsx)("span",{...n,className:(0,lT.default)(e,r.root),children:t})},fd=lL;var Ia={};Te(Ia,{enUS:()=>uL,nlNL:()=>cL});var uL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],answer:[{type:0,value:"Answer"}]},cL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],answer:[{type:0,value:"Antwoord"}]};var An={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 Ze=S(C()),dL=({suggestion:e})=>{let t=j(Ia),n=K(),r=A(FC(e.text)),o=A(jC(e.text)),i=A(HC(e.text)),s=A(ju),{replyOptions:a}=e,l=(0,rh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(ud({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,rh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(cd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Ze.jsxs)(se,{onClick:l,className:(0,cT.default)(An.root,{[An.isUsed]:r,[An.hasError]:i}),children:[(0,Ze.jsx)(ge,{children:(0,Ze.jsxs)(ge.Content,{children:[(0,Ze.jsxs)(ge.Title,{className:An.title,children:[e.text," ",(0,Ze.jsx)(fd,{className:An.label,children:"analyse tool"})," ",i&&(0,Ze.jsx)("span",{className:An.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Ze.jsx)("ul",{className:An.quickReplies,children:a.map(c=>(0,Ze.jsx)("li",{className:An.quickReply,children:c.title},c.title))})]})}),(0,Ze.jsxs)(se.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Ze.jsx)(se.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Ze.jsx)(se.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Ze.jsx)(se.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},dT=dL;var oh=S(C()),fT=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 pT={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ki=S(C()),fL=({title:e,children:t,...n})=>{let r=P("Section",pT);return(0,ki.jsxs)("section",{...n,className:r.root,children:[e&&(0,ki.jsx)("div",{className:r.subTitleContainer,children:(0,ki.jsx)("span",{className:r.subtitle,children:e})}),(0,ki.jsx)("div",{className:r.suggestions,children:t})]})},Cr=fL;var gT=S(Q()),hT=S(O());var mT={root:"_root_19wxp_1"};var yT=S(C()),pL=hT.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",mT);return(0,yT.jsx)("div",{ref:n,className:(0,gT.default)(r.root,e),children:t})}),pd=pL;var vT=S(O());var at=S(C()),mL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Oc(o),s=j(Ia),a=D("showImages"),l=D("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,vT.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,at.jsxs)(se,{onClick:u,"data-testid":"edit-suggestion",children:[(0,at.jsxs)(ge,{children:[a&&e.image&&(0,at.jsx)(ge.Image,{src:id(e,"small",l||void 0),title:e.title}),(0,at.jsxs)(ge.Content,{children:[e.title&&(0,at.jsx)(ge.Title,{children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,at.jsx)(se.Labels,{labels:e.searchKeywords}),(0,at.jsx)(ge.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,at.jsxs)(se.Actions,{children:[i&&(0,at.jsx)(se.ActionButton,{onClick:p,label:s("visitUrl")}),(0,at.jsx)(se.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,at.jsx)(se.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},ST=mL;var La=S(C()),gL=({contentType:e,lines:t,suggestions:n})=>{let r=bt(),o=A(mi),i=a=>{r.send(Sg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(Tn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,La.jsx)(La.Fragment,{children:n.map(a=>(0,La.jsx)(ST,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wT=gL;var ih={};Te(ih,{enUS:()=>hL,nlNL:()=>yL});var hL={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},yL={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xT={root:"_root_oym4o_1",loginText:"_loginText_oym4o_7",stateText:"_stateText_oym4o_8",sectionList:"_sectionList_oym4o_20",links:"_links_oym4o_24",link:"_link_oym4o_24"};var sh=S(C()),ET=()=>(0,sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,sh.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 ah=S(C()),CT=()=>(0,ah.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ah.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 U=S(C()),md=(e,t)=>{let n=A(Cn);(0,_T.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},vL=()=>{let e=j(ih),t=K(),n=D("isEmbedded"),r=P("Widget",xT),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=A(Si),p=A(Bc),d=A(LC),h=A(Hc),y=A(DC),v=A(Hu),g=A(Bu),m=A(Cn),f=A(ju),w=A(GC),x=A(mi),T=bt(),E=A(Ax),_=A(KC("/admin/personal-collection")),R=D("adminUrl");return md(()=>(t(Ra(f)),t(UC(f)),()=>{t(zC(f))}),[t,g,i,f]),md(()=>(t(Ln(f)),t(AC(f)),()=>{t(OC(f))}),[t,g,o,f]),md(()=>{p.forEach(({type:b})=>{t(b==="entities"?Ut():xn(b))})},[t,g,v,c]),md(()=>(t(Yg()),()=>{t($C())}),[t,g,s,v]),g===!1?(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("notSupported")})})},"supported"):m===!1?(0,U.jsx)("div",{className:r.loginText,children:(0,U.jsx)("div",{children:(0,U.jsx)(zc,{isEmbedded:n,loginUrl:R})})},"login"):!c||!f||m===null||E||w?(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("waiting")})})},"waiting"):(0,U.jsx)("div",{className:(0,TT.default)(r.root),"data-testid":"widget",children:(0,U.jsxs)(pd,{className:r.sectionList,children:[(0,U.jsx)(Cr,{title:e("actions"),children:(0,U.jsxs)("div",{className:r.links,children:[u&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,U.jsx)(fi,{}),e("linkSearch")]}),a&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,U.jsx)(CT,{}),e("linkSummary")]}),l&&(0,U.jsxs)("button",{className:r.link,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeSearch"}),children:[(0,U.jsx)(ET,{}),e("linkKnowledgeSearch")]}),_&&(0,U.jsxs)("a",{className:r.link,target:"_blank",href:_,rel:"noreferrer",children:[(0,U.jsx)(fT,{}),e("linkPersonalcollection")]})]})}),i&&y.length>0&&(0,U.jsx)(Cr,{"data-testid":"custom-messages",children:(0,U.jsx)(tn,{withDivider:!0,children:y.map(b=>(0,U.jsx)(dT,{suggestion:b},b.text))})}),o&&d.length>0&&(0,U.jsx)(Cr,{title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,U.jsx)(tn,{withDivider:!0,children:(0,U.jsx)(oT,{})})}),p.map(({type:b,title:B,amount:re,lines:z})=>{var Pe;switch(b){case"entities":return h&&h.length>0&&(0,U.jsx)(Cr,{title:B,"data-testid":`type-${b}`,children:(0,U.jsx)(sT,{entities:h})},b);default:return((Pe=x[b])==null?void 0:Pe.fetchState)==="done"&&x[b].suggestions.length>0&&(0,U.jsx)(Cr,{title:B,"data-testid":`type-${b}`,children:(0,U.jsx)(tn,{withDivider:!0,children:(0,U.jsx)(wT,{lines:z,contentType:b,suggestions:x[b].suggestions.slice(0,re)||[]})})},b)}})]})})},bT=vL;function kT(e){let t=new Range;return t.selectNodeContents(e),t}var Aa=/[\u200B-\u200D\uFEFF]/g;function ro(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Aa,""),d=o+p.length,h=t>=o&&t<=d,y=n>=o&&n<=d;if(h){let v=s(c,t-o);v===0&&!y?r.setStartBefore(l):r.setStart(l,v)}y&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gd(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let h=c.textContent;p&&(s=l+h.substring(0,r).replace(Aa,"").length),d&&(a=l+h.substring(0,i).replace(Aa,"").length),l+=h.replace(Aa,"").length;break}case Node.ELEMENT_NODE:{let{tagName:h}=c,y=c.nextSibling===null;h==="BR"&&!y&&l++;for(let v=0;v<c.childNodes.length&&(p&&v===r&&(s=l),u(c.childNodes[v]),d&&v===i-1&&(a=l),a===void 0);v++);!d&&h==="DIV"&&!y&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Oa(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,y=u.textContent.replace(Aa,"");d===0&&h===void 0?a+=y:a+=y.substring(d,h);break}case Node.ELEMENT_NODE:{let{tagName:d}=u,h=u.nextSibling===null;s===0&&d==="BR"&&!h&&(a+=`
|
|
20
|
+
`);for(let y=c?r:0;y<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[y]),s!==1);y++);!p&&s===0&&d==="DIV"&&!h&&(a+=`
|
|
21
|
+
`);break}default:break}p&&s++}return l(e),a}var oo=class extends vn{observer;getText(){let t=new Range;return t.selectNodeContents(this.element),Oa(this.element,t)}getHTML(){return this.element.innerHTML||""}getSelection(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:gd(this.element,n)}getSelectedText(){if(!this.currentSelection)return"";let{start:t,end:n}=this.currentSelection;return Oa(this.element,ro(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var lh=class{constructor(t){this.name=t;H.warn("BroadcastChannel is not supported")}postMessage(){}addEventListener(){}removeEventListener(){}close(){}},uh=class{constructor(t,n){this.name=t;this.options=n;this.broadcastChannel=new this.options.broadcastChannelConstructor(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()}},ch=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},dh=class{sessionId;deepdeskUrl;channel;broadcastChannelConstructor;eventMap;isIntegration;constructor(t){this.deepdeskUrl=t.deepdeskUrl,this.broadcastChannelConstructor=t.broadcastChannelConstructor||window.BroadcastChannel||lh,this.isIntegration=t.deepdeskUrl!==(t.origin||window.location.origin),this.eventMap=t.eventMap,this.setSessionId("deepdesk-general")}setSessionId(t){if(this.sessionId===t)return;this.cleanup(),H.info("Set sessionId",t),this.sessionId=t,this.channel=this.isIntegration?new ch(t,this.deepdeskUrl,{debug:!0}):new uh(t,{broadcastChannelConstructor:this.broadcastChannelConstructor});let n=r=>{var o,i;r.origin===this.deepdeskUrl&&r.data.type==="event"&&(H.info("Received broadcast event",this.sessionId,r),(i=(o=this.eventMap)[r.data.name])==null||i.call(o,r.data.payload))};this.channel.onMessage(n)}send(t,n){var o,i,s;if(!this.sessionId)return;H.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage(r)}cleanup(){var t;(t=this.channel)==null||t.close(),delete this.channel}},PT=dh;var Pi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var fh=e=>new Promise(t=>{setTimeout(t,e)});var Ri=class extends Pi{name="ClientError"},ph=class extends Pi{name="ServerError"},On=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}async request(t,n={}){let r={isStale:!1},o=`${this.baseUrl}${t}`,i=this.fetch,{abortLatest:s=!1,attempts:a=1,retryDelay:l=500,refreshTokenOn401:u=!0,retryOnError:c=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:d="v1",...h}=n,y={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(y.headers={...y.headers,"X-CSRFToken":this.csrfToken}),typeof d=="string"&&(y.headers={...y.headers,"X-Deepdesk-API-Version":d});let v=a,g=!1;if(!i)throw new Error("fetch is not set");this.latestRequestByUrl[o]&&s&&(this.latestRequestByUrl[o].isStale=!0),this.latestRequestByUrl[o]=r;let m=async()=>(v--,i(o,y).then(async x=>p(x)&&!r.isStale&&v>0?(await fh(l),m()):x.status===401&&u===!0&&g===!1?(g=!0,await this.refreshToken(),m()):x).catch(async x=>{if(c(x)&&!r.isStale&&v>0)return await fh(l),m();throw x})),f=await m(),w=await f.json().catch(()=>null);if(r.isStale)throw new Error("Aborted");if(f.status>=500)throw new ph("Server Error",w);if(f.status===401)throw new Ri("Unauthorized",w);if(f.status===403)throw new Ri("Forbidden",w);if(f.status===404)throw new Ri("Not Found",w);if(f.status>=400)throw new Ri("Bad Request",w);return delete this.latestRequestByUrl[o],w}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 SL;(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||={})})(SL||={});function hd(e){return{...ne(e),tags:e.tags}}var Nn=class e{constructor(t,n={}){this.options=n;this.client=new On(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",{...Ee(t),tags:t.tags},{version:"v2"});return hd(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return ne(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return ne(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return ne(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 hd(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=Ee(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return hd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ee(o),tags:o.tags})),{version:"v2"})).map(o=>hd(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",Ee({...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:Ee({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(r=>r.text&&r.source)}})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.get(`/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/",Ee(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}`,Ee(n),{abortLatest:!0})).map(i=>({...ne(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`,Ee(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 ne(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",Ee(t),{abortLatest:!0});return ne(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ee(t),{version:"v2"});return ne(n)}async knowledgeSearch(t,n,r){let o=await this.client.post("/api/knowledge-search/search",Ee({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return ne(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return ne(n)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return ne(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Sh);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 Na=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,ne(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 wL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(wL||={});var Ma=class{constructor(t,n={}){this.apiUrl=t;this.client=new On(t,n)}client;streams={};logger=H;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return ne(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Ee(n));return ne(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ee(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return ne(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Ee(t));return ne(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Na(`${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 RT={startTime:null,stopTime:null},IT=F({name:"handlingTime",initialState:RT,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(Z,()=>RT)}}),{handlingTimeStart:LT,handlingTimeStop:yd,handlingTimeReset:AT}=IT.actions,OT=IT.reducer;var NT=(e={})=>{let t={onAuthError:Fc(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mh={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var io=N("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 mh.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),xL=F({name:"styleSuggestions",initialState:mh,reducers:{},extraReducers:e=>{e.addCase(io.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(io.rejected,t=>{t.fetchState="error"}).addCase(io.fulfilled,(t,n)=>{t.fetchState="done",cr(t.list,n.payload)||(t.list=n.payload)}).addCase(Z,()=>mh)}}),MT=xL.reducer;var DT=(e={})=>{let t,n=!0,r={getStyleSuggestions:io,debounce:500,...e};return o=>i=>s=>{var h;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((h=u.conversation.current)==null?void 0:h.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function EL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var FT=(e={})=>{let t={getTextSuggestions:xn,getAutocompleteSuggestions:ma,debounce:200,check:Uc,...e},n,r=!0;return o=>i=>s=>{var g;let{input:{userCommitted:a}}=o.getState(),l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{recommendTextSuggestions:c,showTabCompletion:p}=u.settings,d=(g=u.conversation.current)==null?void 0:g.id,h=s.type===Dc.toString();if(!d||!c&&!p)return l;let{input:{userCommitted:y}}=u;return EL(y,a)&&!r&&!h||(clearTimeout(n),!t.check(u))||(n=setTimeout(()=>{r=!1;let m=Jo(u);m===""?o.dispatch(t.getTextSuggestions("default")):o.dispatch(t.getAutocompleteSuggestions(m))},h?0:t.debounce)),l}};var jT=io.fulfilled.toString();function CL(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 HT=e=>t=>n=>r=>{var c;if(r.type!==jT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current,{agentInfo:l}=i.info;if(o===s)return;let u=CL(o,s);r.type===jT&&u.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,agentId:l.agentId??(a==null?void 0:a.agentId),agentName:l.agentName??(a==null?void 0:a.agentName),agentEmail:l.agentEmail??(a==null?void 0:a.agentEmail),data:{keywordMatches:u}})};var TL=lu({activeSuggestion:zx,answer:OE,auth:nE,autoflows:NC,conversation:s0,contentTypes:yE,customMessages:VC,exchangeToken:qC,entities:xE,handlingTime:OT,info:gx,input:Im.reducer,overlayInput:Ge.reducer,settings:Yw,profile:DE,search:xx,summary:kE,styleSuggestions:MT,ui:qx,textSuggestions:Fx});function BT(e){return rw({reducer:TL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),NT(),FT({debounce:200}),DT({debounce:500}),HT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var _L=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},bL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Tm("inlineSuggestions")(o);switch(r.type){case En.toString():{let l=Lx(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 Mt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:_L(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case qu.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 Ws.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Yu.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 Ut.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case _n.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),summary:r.payload.summary}});break;case Zt.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 Gu.toString():e.handleKeyDown(r.payload);break;case Ks.toString():e.logSendMessage(r.payload);break;case Xu.toString():e.logSendEditSuggestionMessage(r.payload);break;case Qu.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Ks.toString():e.handleAfterSendMessage(r.payload);break;case ga.toString():e.onUpdateShowTabHint(r.payload);break;case yd.toString():e.logHandlingTime();break;case Mt.toString():{i&&(t.dispatch(fr([])),t.dispatch(pr()));break}default:break}return s},UT=bL;function gh(e){return e.toISOString().replace("T"," ").replace("Z","")}function zT(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:gh(n),timeStop:gh(r)}}function hh(e,t,n){var T,E,_;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,pastes:c,cuts:p,deletions:d,textSuggestions:h,offeredTextSuggestions:y}}=t[e],v=r.length,m=h.reduce((R,{text:b,searchTerm:B})=>R+b.length-(B?B.length:0),0),f=u??Date.now(),w=(Date.now()-f)/1e3,x=o/w;return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:c,cuts:p,deletions:d,lenTextTyped:o,lenTextTotal:v,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:w,charsPerSecond:x,numPastes:l,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:y.filter(R=>R.source==="gpt").length}],agentId:(T=t.info.agentInfo)==null?void 0:T.agentId,agentName:(E=t.info.agentInfo)==null?void 0:E.agentName,agentEmail:(_=t.info.agentInfo)==null?void 0:_.agentEmail}}function VT(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?VT(r,t):null}function KT(e,t){return VT(e,t)}function WT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vd(e){return e instanceof HTMLElement&&(Pn(e)||Tc(e))}var $T=(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 kL(e){return e.offsetParent!==null}function qT(e){if(!kL(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 Sd(e,t,n=100){let r=qT(e);t({isVisible:r});let o=setInterval(()=>{let i=qT(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var lt=S(C()),GT=$T("showTabHint",!0),Da=class e{static version="10.1.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}){let l=t.replace(/\/api$/,"");this.deepdeskApi=new Nn(l,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[UT({emit:(c,p,d)=>this.emit(c,p,d),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),handleInputChanged:c=>this.handleInputChanged(c),handleKeyDown:c=>this.handleKeyDown(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),logSendEditSuggestionMessage:c=>this.logSendEditMessage(c),onUpdateShowTabHint:c=>GT.update(c),sendEvent:(c,p)=>this.deepdeskApi.sendEvent(c,p)})]};n&&Object.assign(u,{deepdeskBrokerAPI:new Ma(n)}),this.store=BT(u),this.broadcastEvents=new PT({debug:!0,deepdeskUrl:l,eventMap:rE(this.store)}),this.store.dispatch(zs),this.store.dispatch(ga(GT.value())),this.store.dispatch(zs({locale:o,adminUrl:l,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(Fc(null)),this.store.dispatch(Yr()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Cn(r)&&Qx(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){H.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Pm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Uu(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(zu({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Rm(t))).payload}async postMessages(t){return(await this.store.dispatch(Ku(t))).payload}async updateConversation(t){return(await this.store.dispatch(Vu(t))).payload}resetConversation(){this.store.dispatch(Z()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(_n());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(zs(t))}setVisitorInfo(t){this.store.dispatch(mx(t))}async setAgentInfo(t){await this.store.dispatch(ca(t))}async setAgentSettings(t){await this.store.dispatch(pg(t))}async getAgentSettings(){return(await this.store.dispatch(mg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();let t=[];return this.store.dispatch(Dc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Qu(t))}syncInputHtml(t){this.store.dispatch(S0(t))}notifyKeyDown(t){this.store.dispatch(Gu(t))}notifyPaste(t,n){this.store.dispatch(y0({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(g0(t))}notifyExternalSuggestion(t){this.store.dispatch(Mt(t)),this.store.dispatch(pr())}notifyEditSuggestion(t){this.store.dispatch(Mx(t.contentType,t.suggestions)),this.store.dispatch(En({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(hi({collapse:!1})),this.inputMediator&&this.store.dispatch(u0({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(fr([])))}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(h0($u(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(f0()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(m0());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(Ws()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Zu(-1)),this.store.dispatch(Ws()),t.preventDefault()):n||(this.store.dispatch(hi({collapse:!0})),this.store.dispatch(Wx(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(ga(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(Mt({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(pr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(v0()),this.store.dispatch(fr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(H.info("Start handling time"),this.store.dispatch(LT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(H.info("Stop handling time"),this.store.dispatch(yd()))}logSendMessage(t){let n=hh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=hh("overlayInput",this.state,{version:"v2"});t&&Object.assign(n,{text:t}),this.store.dispatch(d0(this.state.overlayInput.metrics)),this.deepdeskApi.sendEvent("suggestion edited",{data:n})}logHandlingTime(){let t=zT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(AT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(pr()),this.store.dispatch(Ks(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Mt({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]=ci(r,o);return i.dataset.testid=t,n!=null&&n.rootNode&&i.classList.add(n.rootNode),this.unmountHandlers.push(()=>{(0,Mn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Gr(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,n.appendChild(o),this.unmountHandlers.push(()=>{(0,Mn.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!vd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:h,inputMediator:y,closestScrollSelector:v,appendOverlayTo:g,inlineSuggestions:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:m});let f=v&&KT(t,v)||void 0,w=this.overlayContainerFactory("deepdesk-tab-completion",r,t,{appendTo:g,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()}),x=this.overlayContainerFactory("deepdesk-suggestions-overlay",r,f||t,{appendTo:g});n.automaticHandlingTime&&this.setupHandlingTime(t),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(PC,{inputElement:t})})}),w),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(Wc,{})})}),x),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(UE,{})})}),this.createContainer("deepdesk-overlays")),Gr(t),this.inputMediator=y||(Pn(t)?new Sn(t):new oo(t)),this.inputMediator.on("change",({plainText:E})=>{this.notifyInputChanged(E)}),this.inputMediator.on("updated",({rawHtml:E})=>{E!=null&&this.syncInputHtml(E)}),this.inputMediator.on("keydown",E=>{this.notifyKeyDown(E)}),this.inputMediator.on("paste",({pastedText:E,selectionText:_})=>{this.notifyPaste(E,_)}),this.inputMediator.on("cut",({selectionText:E})=>{this.notifyCut(E)});let T;this.inputMediator.on("selection",E=>{clearTimeout(T),E===null?T=setTimeout(()=>{E!==null&&this.store.dispatch(Lm(E))},500):this.store.dispatch(Lm(E))}),this.inputMediator.on("disabled",()=>{var E;(E=this.inputMediator)==null||E.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(gi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(gi(!0))),this.store.dispatch(c0({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var E;this.broadcastEvents.setSessionId((E=this.state.conversation.current)==null?void 0:E.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,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,Mn.render)((0,lt.jsx)(ka,{store:this.store,customStyles:r,children:(0,lt.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,lt.jsx)(bT,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Mn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Sd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){WT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(_a());let t=Si(this.state);t&&this.store.dispatch(zs({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeSearch,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}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=Bc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Ut()):this.store.dispatch(xn(r))})}catch(r){this.handleError(r)}}};async function XT(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 QT(e,t,n={}){let r=n.replace?ro(e,n.replace.start,n.replace.end):kT(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),t.split(`
|
|
22
|
+
`).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}),r.commonAncestorContainer===e&&r.surroundContents(document.createElement("div"))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?ro(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 YT(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ZT(e,t,n){await new Nn(e).authenticateWithKey(t,n)}async function JT(e){let n=await new On(e).get("/platform/config/",{version:null});return ne(n)}async function PL(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 e1(e,t){let n=await PL(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 s1(RL);})();
|
|
23
|
+
/*! Bundled license information:
|
|
24
|
+
|
|
25
|
+
object-assign/index.js:
|
|
26
|
+
(*
|
|
27
|
+
object-assign
|
|
28
|
+
(c) Sindre Sorhus
|
|
29
|
+
@license MIT
|
|
30
|
+
*)
|
|
31
|
+
|
|
32
|
+
react/cjs/react.production.min.js:
|
|
33
|
+
(** @license React v17.0.2
|
|
34
|
+
* react.production.min.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*)
|
|
41
|
+
|
|
42
|
+
scheduler/cjs/scheduler.production.min.js:
|
|
43
|
+
(** @license React v0.20.2
|
|
44
|
+
* scheduler.production.min.js
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the MIT license found in the
|
|
49
|
+
* LICENSE file in the root directory of this source tree.
|
|
50
|
+
*)
|
|
51
|
+
|
|
52
|
+
react-dom/cjs/react-dom.production.min.js:
|
|
53
|
+
(** @license React v17.0.2
|
|
54
|
+
* react-dom.production.min.js
|
|
55
|
+
*
|
|
56
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*)
|
|
61
|
+
|
|
62
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js:
|
|
63
|
+
(**
|
|
64
|
+
* @license React
|
|
65
|
+
* use-sync-external-store-shim.production.min.js
|
|
66
|
+
*
|
|
67
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the MIT license found in the
|
|
70
|
+
* LICENSE file in the root directory of this source tree.
|
|
71
|
+
*)
|
|
72
|
+
|
|
73
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js:
|
|
74
|
+
(**
|
|
75
|
+
* @license React
|
|
76
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
77
|
+
*
|
|
78
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
79
|
+
*
|
|
80
|
+
* This source code is licensed under the MIT license found in the
|
|
81
|
+
* LICENSE file in the root directory of this source tree.
|
|
82
|
+
*)
|
|
83
|
+
|
|
84
|
+
react-is/cjs/react-is.production.min.js:
|
|
85
|
+
(** @license React v16.13.1
|
|
86
|
+
* react-is.production.min.js
|
|
87
|
+
*
|
|
88
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the MIT license found in the
|
|
91
|
+
* LICENSE file in the root directory of this source tree.
|
|
92
|
+
*)
|
|
93
|
+
|
|
94
|
+
react-is/cjs/react-is.production.min.js:
|
|
95
|
+
(**
|
|
96
|
+
* @license React
|
|
97
|
+
* react-is.production.min.js
|
|
98
|
+
*
|
|
99
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the MIT license found in the
|
|
102
|
+
* LICENSE file in the root directory of this source tree.
|
|
103
|
+
*)
|
|
104
|
+
|
|
105
|
+
classnames/index.js:
|
|
106
|
+
(*!
|
|
107
|
+
Copyright (c) 2018 Jed Watson.
|
|
108
|
+
Licensed under the MIT License (MIT), see
|
|
109
|
+
http://jedwatson.github.io/classnames
|
|
110
|
+
*)
|
|
111
|
+
|
|
112
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
113
|
+
(** @license React v17.0.2
|
|
114
|
+
* react-jsx-runtime.production.min.js
|
|
115
|
+
*
|
|
116
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the MIT license found in the
|
|
119
|
+
* LICENSE file in the root directory of this source tree.
|
|
120
|
+
*)
|
|
121
|
+
|
|
122
|
+
escape-html/index.js:
|
|
123
|
+
(*!
|
|
124
|
+
* escape-html
|
|
125
|
+
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
126
|
+
* Copyright(c) 2015 Andreas Lubbe
|
|
127
|
+
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
128
|
+
* MIT Licensed
|
|
129
|
+
*)
|
|
130
|
+
*/
|