@deepdesk/deepdesk-sdk 11.1.0 → 11.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
1
- "use strict";var Deepdesk=(()=>{var nk=Object.create;var bl=Object.defineProperty;var rk=Object.getOwnPropertyDescriptor;var ok=Object.getOwnPropertyNames;var ik=Object.getPrototypeOf,sk=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Je=(e,t)=>{for(var n in t)bl(e,n,{get:t[n],enumerable:!0})},Ny=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ok(t))!sk.call(e,o)&&o!==n&&bl(e,o,{get:()=>t[o],enumerable:!(r=rk(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?nk(ik(e)):{},Ny(t||!e||!e.__esModule?bl(n,"default",{value:e,enumerable:!0}):n,e)),ak=e=>Ny(bl({},"__esModule",{value:!0}),e);var ee=be((GM,Tl)=>{"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 Tl<"u"&&Tl.exports?(n.default=n,Tl.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var kl=be((YM,_y)=>{"use strict";var My=Object.getOwnPropertySymbols,lk=Object.prototype.hasOwnProperty,uk=Object.prototype.propertyIsEnumerable;function ck(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function dk(){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}}_y.exports=dk()?Object.assign:function(e,t){for(var n,r=ck(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)lk.call(n,s)&&(r[s]=n[s]);if(My){o=My(n);for(var a=0;a<o.length;a++)uk.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Qy=be(Q=>{"use strict";var wf=kl(),Xo=60103,Hy=60106;Q.Fragment=60107;Q.StrictMode=60108;Q.Profiler=60114;var Uy=60109,jy=60110,zy=60112;Q.Suspense=60113;var By=60115,Vy=60116;typeof Symbol=="function"&&Symbol.for&&(Lt=Symbol.for,Xo=Lt("react.element"),Hy=Lt("react.portal"),Q.Fragment=Lt("react.fragment"),Q.StrictMode=Lt("react.strict_mode"),Q.Profiler=Lt("react.profiler"),Uy=Lt("react.provider"),jy=Lt("react.context"),zy=Lt("react.forward_ref"),Q.Suspense=Lt("react.suspense"),By=Lt("react.memo"),Vy=Lt("react.lazy"));var Lt,Dy=typeof Symbol=="function"&&Symbol.iterator;function fk(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}function ms(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 Ky={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$y={};function Qo(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Ky}Qo.prototype.isReactComponent={};Qo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(ms(85));this.updater.enqueueSetState(this,e,t,"setState")};Qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wy(){}Wy.prototype=Qo.prototype;function xf(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Ky}var Ef=xf.prototype=new Wy;Ef.constructor=xf;wf(Ef,Qo.prototype);Ef.isPureReactComponent=!0;var Cf={current:null},qy=Object.prototype.hasOwnProperty,Gy={key:!0,ref:!0,__self:!0,__source:!0};function Yy(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)qy.call(t,r)&&!Gy.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:Xo,type:e,key:i,ref:s,props:o,_owner:Cf.current}}function pk(e,t){return{$$typeof:Xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function bf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xo}function mk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fy=/\/+/g;function Sf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mk(""+e.key):t.toString(36)}function Rl(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 Xo:case Hy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Sf(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Fy,"$&/")+"/"),Rl(o,t,n,"",function(u){return u})):o!=null&&(bf(o)&&(o=pk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Fy,"$&/")+"/")+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+Sf(i,a);s+=Rl(i,t,n,l,o)}else if(l=fk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Sf(i,a++),s+=Rl(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(ms(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Pl(e,t,n){if(e==null)return e;var r=[],o=0;return Rl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function gk(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 Xy={current:null};function In(){var e=Xy.current;if(e===null)throw Error(ms(321));return e}var hk={ReactCurrentDispatcher:Xy,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Cf,IsSomeRendererActing:{current:!1},assign:wf};Q.Children={map:Pl,forEach:function(e,t,n){Pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pl(e,function(){t++}),t},toArray:function(e){return Pl(e,function(t){return t})||[]},only:function(e){if(!bf(e))throw Error(ms(143));return e}};Q.Component=Qo;Q.PureComponent=xf;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hk;Q.cloneElement=function(e,t,n){if(e==null)throw Error(ms(267,e));var r=wf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Cf.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)qy.call(t,l)&&!Gy.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:Xo,type:e.type,key:o,ref:i,props:r,_owner:s}};Q.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:jy,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Uy,_context:e},e.Consumer=e};Q.createElement=Yy;Q.createFactory=function(e){var t=Yy.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:zy,render:e}};Q.isValidElement=bf;Q.lazy=function(e){return{$$typeof:Vy,_payload:{_status:-1,_result:e},_init:gk}};Q.memo=function(e,t){return{$$typeof:By,type:e,compare:t===void 0?null:t}};Q.useCallback=function(e,t){return In().useCallback(e,t)};Q.useContext=function(e,t){return In().useContext(e,t)};Q.useDebugValue=function(){};Q.useEffect=function(e,t){return In().useEffect(e,t)};Q.useImperativeHandle=function(e,t,n){return In().useImperativeHandle(e,t,n)};Q.useLayoutEffect=function(e,t){return In().useLayoutEffect(e,t)};Q.useMemo=function(e,t){return In().useMemo(e,t)};Q.useReducer=function(e,t,n){return In().useReducer(e,t,n)};Q.useRef=function(e){return In().useRef(e)};Q.useState=function(e){return In().useState(e)};Q.version="17.0.2"});var F=be((QM,Zy)=>{"use strict";Zy.exports=Qy()});var rv=be(hs=>{"use strict";kl();var vk=F(),tv=60103;hs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Tf=Symbol.for,tv=Tf("react.element"),hs.Fragment=Tf("react.fragment"));var Tf,Sk=vk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wk=Object.prototype.hasOwnProperty,xk={key:!0,ref:!0,__self:!0,__source:!0};function nv(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)wk.call(t,r)&&!xk.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:tv,type:e,key:i,ref:s,props:o,_owner:Sk.current}}hs.jsx=nv;hs.jsxs=nv});var b=be((t_,ov)=>{"use strict";ov.exports=rv()});var Av=be(te=>{"use strict";var ti,ws,zl,_f;typeof performance=="object"&&typeof performance.now=="function"?(bv=performance,te.unstable_now=function(){return bv.now()}):(Af=Date,Tv=Af.now(),te.unstable_now=function(){return Af.now()-Tv});var bv,Af,Tv;typeof window>"u"||typeof MessageChannel!="function"?(ei=null,If=null,Lf=function(){if(ei!==null)try{var e=te.unstable_now();ei(!0,e),ei=null}catch(t){throw setTimeout(Lf,0),t}},ti=function(e){ei!==null?setTimeout(ti,0,e):(ei=e,setTimeout(Lf,0))},ws=function(e,t){If=setTimeout(e,t)},zl=function(){clearTimeout(If)},te.unstable_shouldYield=function(){return!1},_f=te.unstable_forceFrameRate=function(){}):(kv=window.setTimeout,Pv=window.clearTimeout,typeof console<"u"&&(Rv=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 Rv!="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")),vs=!1,Ss=null,Hl=-1,Of=5,Nf=0,te.unstable_shouldYield=function(){return te.unstable_now()>=Nf},_f=function(){},te.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"):Of=0<e?Math.floor(1e3/e):5},Mf=new MessageChannel,Ul=Mf.port2,Mf.port1.onmessage=function(){if(Ss!==null){var e=te.unstable_now();Nf=e+Of;try{Ss(!0,e)?Ul.postMessage(null):(vs=!1,Ss=null)}catch(t){throw Ul.postMessage(null),t}}else vs=!1},ti=function(e){Ss=e,vs||(vs=!0,Ul.postMessage(null))},ws=function(e,t){Hl=kv(function(){e(te.unstable_now())},t)},zl=function(){Pv(Hl),Hl=-1});var ei,If,Lf,kv,Pv,Rv,vs,Ss,Hl,Of,Nf,Mf,Ul;function Df(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<jl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Yt(e){return e=e[0],e===void 0?null:e}function Bl(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>jl(s,n))l!==void 0&&0>jl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>jl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function jl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var mn=[],cr=[],Wk=1,Nt=null,Ke=3,Vl=!1,so=!1,xs=!1;function Ff(e){for(var t=Yt(cr);t!==null;){if(t.callback===null)Bl(cr);else if(t.startTime<=e)Bl(cr),t.sortIndex=t.expirationTime,Df(mn,t);else break;t=Yt(cr)}}function Hf(e){if(xs=!1,Ff(e),!so)if(Yt(mn)!==null)so=!0,ti(Uf);else{var t=Yt(cr);t!==null&&ws(Hf,t.startTime-e)}}function Uf(e,t){so=!1,xs&&(xs=!1,zl()),Vl=!0;var n=Ke;try{for(Ff(t),Nt=Yt(mn);Nt!==null&&(!(Nt.expirationTime>t)||e&&!te.unstable_shouldYield());){var r=Nt.callback;if(typeof r=="function"){Nt.callback=null,Ke=Nt.priorityLevel;var o=r(Nt.expirationTime<=t);t=te.unstable_now(),typeof o=="function"?Nt.callback=o:Nt===Yt(mn)&&Bl(mn),Ff(t)}else Bl(mn);Nt=Yt(mn)}if(Nt!==null)var i=!0;else{var s=Yt(cr);s!==null&&ws(Hf,s.startTime-t),i=!1}return i}finally{Nt=null,Ke=n,Vl=!1}}var qk=_f;te.unstable_IdlePriority=5;te.unstable_ImmediatePriority=1;te.unstable_LowPriority=4;te.unstable_NormalPriority=3;te.unstable_Profiling=null;te.unstable_UserBlockingPriority=2;te.unstable_cancelCallback=function(e){e.callback=null};te.unstable_continueExecution=function(){so||Vl||(so=!0,ti(Uf))};te.unstable_getCurrentPriorityLevel=function(){return Ke};te.unstable_getFirstCallbackNode=function(){return Yt(mn)};te.unstable_next=function(e){switch(Ke){case 1:case 2:case 3:var t=3;break;default:t=Ke}var n=Ke;Ke=t;try{return e()}finally{Ke=n}};te.unstable_pauseExecution=function(){};te.unstable_requestPaint=qk;te.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ke;Ke=e;try{return t()}finally{Ke=n}};te.unstable_scheduleCallback=function(e,t,n){var r=te.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:Wk++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Df(cr,e),Yt(mn)===null&&e===Yt(cr)&&(xs?zl():xs=!0,ws(Hf,n-r))):(e.sortIndex=o,Df(mn,e),so||Vl||(so=!0,ti(Uf))),e};te.unstable_wrapCallback=function(e){var t=Ke;return function(){var n=Ke;Ke=t;try{return e.apply(this,arguments)}finally{Ke=n}}}});var Lv=be((G_,Iv)=>{"use strict";Iv.exports=Av()});var yw=be(Ut=>{"use strict";var Du=F(),ve=kl(),Me=Lv();function P(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(!Du)throw Error(P(227));var KS=new Set,Qs={};function vo(e,t){Ei(e,t),Ei(e+"Capture",t)}function Ei(e,t){for(Qs[e]=t,e=0;e<t.length;e++)KS.add(t[e])}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gk=/^[: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]*$/,Ov=Object.prototype.hasOwnProperty,Nv={},Mv={};function Yk(e){return Ov.call(Mv,e)?!0:Ov.call(Nv,e)?!1:Gk.test(e)?Mv[e]=!0:(Nv[e]=!0,!1)}function Xk(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 Qk(e,t,n,r){if(t===null||typeof t>"u"||Xk(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 tt(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 He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new tt(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){He[e]=new tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gp=/[\-:]([a-z])/g;function Yp(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xp(e,t,n,r){var o=He.hasOwnProperty(t)?He[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||(Qk(t,n,o,r)&&(n=null),r||o===null?Yk(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 So=Du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ms=60103,lo=60106,fr=60107,Qp=60108,Us=60114,Zp=60109,Jp=60110,Fu=60112,js=60113,pu=60120,Hu=60115,em=60116,tm=60121,nm=60128,$S=60129,rm=60130,lp=60131;typeof Symbol=="function"&&Symbol.for&&(Pe=Symbol.for,Ms=Pe("react.element"),lo=Pe("react.portal"),fr=Pe("react.fragment"),Qp=Pe("react.strict_mode"),Us=Pe("react.profiler"),Zp=Pe("react.provider"),Jp=Pe("react.context"),Fu=Pe("react.forward_ref"),js=Pe("react.suspense"),pu=Pe("react.suspense_list"),Hu=Pe("react.memo"),em=Pe("react.lazy"),tm=Pe("react.block"),Pe("react.scope"),nm=Pe("react.opaque.id"),$S=Pe("react.debug_trace_mode"),rm=Pe("react.offscreen"),lp=Pe("react.legacy_hidden"));var Pe,_v=typeof Symbol=="function"&&Symbol.iterator;function Es(e){return e===null||typeof e!="object"?null:(e=_v&&e[_v]||e["@@iterator"],typeof e=="function"?e:null)}var jf;function _s(e){if(jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||""}return`
1
+ "use strict";var Deepdesk=(()=>{var rk=Object.create;var bl=Object.defineProperty;var ok=Object.getOwnPropertyDescriptor;var ik=Object.getOwnPropertyNames;var sk=Object.getPrototypeOf,ak=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Je=(e,t)=>{for(var n in t)bl(e,n,{get:t[n],enumerable:!0})},My=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ik(t))!ak.call(e,o)&&o!==n&&bl(e,o,{get:()=>t[o],enumerable:!(r=ok(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?rk(sk(e)):{},My(t||!e||!e.__esModule?bl(n,"default",{value:e,enumerable:!0}):n,e)),lk=e=>My(bl({},"__esModule",{value:!0}),e);var te=be((YM,Tl)=>{"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 Tl<"u"&&Tl.exports?(n.default=n,Tl.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var kl=be((XM,Dy)=>{"use strict";var _y=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,ck=Object.prototype.propertyIsEnumerable;function dk(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function fk(){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}}Dy.exports=fk()?Object.assign:function(e,t){for(var n,r=dk(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)uk.call(n,s)&&(r[s]=n[s]);if(_y){o=_y(n);for(var a=0;a<o.length;a++)ck.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Zy=be(Q=>{"use strict";var wf=kl(),Xo=60103,Uy=60106;Q.Fragment=60107;Q.StrictMode=60108;Q.Profiler=60114;var jy=60109,zy=60110,By=60112;Q.Suspense=60113;var Vy=60115,Ky=60116;typeof Symbol=="function"&&Symbol.for&&(Lt=Symbol.for,Xo=Lt("react.element"),Uy=Lt("react.portal"),Q.Fragment=Lt("react.fragment"),Q.StrictMode=Lt("react.strict_mode"),Q.Profiler=Lt("react.profiler"),jy=Lt("react.provider"),zy=Lt("react.context"),By=Lt("react.forward_ref"),Q.Suspense=Lt("react.suspense"),Vy=Lt("react.memo"),Ky=Lt("react.lazy"));var Lt,Fy=typeof Symbol=="function"&&Symbol.iterator;function pk(e){return e===null||typeof e!="object"?null:(e=Fy&&e[Fy]||e["@@iterator"],typeof e=="function"?e:null)}function ms(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 $y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Wy={};function Qo(e,t,n){this.props=e,this.context=t,this.refs=Wy,this.updater=n||$y}Qo.prototype.isReactComponent={};Qo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(ms(85));this.updater.enqueueSetState(this,e,t,"setState")};Qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qy(){}qy.prototype=Qo.prototype;function xf(e,t,n){this.props=e,this.context=t,this.refs=Wy,this.updater=n||$y}var Ef=xf.prototype=new qy;Ef.constructor=xf;wf(Ef,Qo.prototype);Ef.isPureReactComponent=!0;var Cf={current:null},Gy=Object.prototype.hasOwnProperty,Yy={key:!0,ref:!0,__self:!0,__source:!0};function Xy(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)Gy.call(t,r)&&!Yy.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:Xo,type:e,key:i,ref:s,props:o,_owner:Cf.current}}function mk(e,t){return{$$typeof:Xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function bf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xo}function gk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hy=/\/+/g;function Sf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?gk(""+e.key):t.toString(36)}function Rl(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 Xo:case Uy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Sf(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Hy,"$&/")+"/"),Rl(o,t,n,"",function(u){return u})):o!=null&&(bf(o)&&(o=mk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Hy,"$&/")+"/")+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+Sf(i,a);s+=Rl(i,t,n,l,o)}else if(l=pk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Sf(i,a++),s+=Rl(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(ms(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Pl(e,t,n){if(e==null)return e;var r=[],o=0;return Rl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function hk(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 Qy={current:null};function In(){var e=Qy.current;if(e===null)throw Error(ms(321));return e}var yk={ReactCurrentDispatcher:Qy,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Cf,IsSomeRendererActing:{current:!1},assign:wf};Q.Children={map:Pl,forEach:function(e,t,n){Pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pl(e,function(){t++}),t},toArray:function(e){return Pl(e,function(t){return t})||[]},only:function(e){if(!bf(e))throw Error(ms(143));return e}};Q.Component=Qo;Q.PureComponent=xf;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yk;Q.cloneElement=function(e,t,n){if(e==null)throw Error(ms(267,e));var r=wf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Cf.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Gy.call(t,l)&&!Yy.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:Xo,type:e.type,key:o,ref:i,props:r,_owner:s}};Q.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:zy,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:jy,_context:e},e.Consumer=e};Q.createElement=Xy;Q.createFactory=function(e){var t=Xy.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:By,render:e}};Q.isValidElement=bf;Q.lazy=function(e){return{$$typeof:Ky,_payload:{_status:-1,_result:e},_init:hk}};Q.memo=function(e,t){return{$$typeof:Vy,type:e,compare:t===void 0?null:t}};Q.useCallback=function(e,t){return In().useCallback(e,t)};Q.useContext=function(e,t){return In().useContext(e,t)};Q.useDebugValue=function(){};Q.useEffect=function(e,t){return In().useEffect(e,t)};Q.useImperativeHandle=function(e,t,n){return In().useImperativeHandle(e,t,n)};Q.useLayoutEffect=function(e,t){return In().useLayoutEffect(e,t)};Q.useMemo=function(e,t){return In().useMemo(e,t)};Q.useReducer=function(e,t,n){return In().useReducer(e,t,n)};Q.useRef=function(e){return In().useRef(e)};Q.useState=function(e){return In().useState(e)};Q.version="17.0.2"});var F=be((ZM,Jy)=>{"use strict";Jy.exports=Zy()});var ov=be(hs=>{"use strict";kl();var Sk=F(),nv=60103;hs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Tf=Symbol.for,nv=Tf("react.element"),hs.Fragment=Tf("react.fragment"));var Tf,wk=Sk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xk=Object.prototype.hasOwnProperty,Ek={key:!0,ref:!0,__self:!0,__source:!0};function rv(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)xk.call(t,r)&&!Ek.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:nv,type:e,key:i,ref:s,props:o,_owner:wk.current}}hs.jsx=rv;hs.jsxs=rv});var b=be((n_,iv)=>{"use strict";iv.exports=ov()});var Iv=be(ne=>{"use strict";var ti,ws,zl,_f;typeof performance=="object"&&typeof performance.now=="function"?(Tv=performance,ne.unstable_now=function(){return Tv.now()}):(Af=Date,kv=Af.now(),ne.unstable_now=function(){return Af.now()-kv});var Tv,Af,kv;typeof window>"u"||typeof MessageChannel!="function"?(ei=null,If=null,Lf=function(){if(ei!==null)try{var e=ne.unstable_now();ei(!0,e),ei=null}catch(t){throw setTimeout(Lf,0),t}},ti=function(e){ei!==null?setTimeout(ti,0,e):(ei=e,setTimeout(Lf,0))},ws=function(e,t){If=setTimeout(e,t)},zl=function(){clearTimeout(If)},ne.unstable_shouldYield=function(){return!1},_f=ne.unstable_forceFrameRate=function(){}):(Pv=window.setTimeout,Rv=window.clearTimeout,typeof console<"u"&&(Av=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 Av!="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")),vs=!1,Ss=null,Hl=-1,Of=5,Nf=0,ne.unstable_shouldYield=function(){return ne.unstable_now()>=Nf},_f=function(){},ne.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"):Of=0<e?Math.floor(1e3/e):5},Mf=new MessageChannel,Ul=Mf.port2,Mf.port1.onmessage=function(){if(Ss!==null){var e=ne.unstable_now();Nf=e+Of;try{Ss(!0,e)?Ul.postMessage(null):(vs=!1,Ss=null)}catch(t){throw Ul.postMessage(null),t}}else vs=!1},ti=function(e){Ss=e,vs||(vs=!0,Ul.postMessage(null))},ws=function(e,t){Hl=Pv(function(){e(ne.unstable_now())},t)},zl=function(){Rv(Hl),Hl=-1});var ei,If,Lf,Pv,Rv,Av,vs,Ss,Hl,Of,Nf,Mf,Ul;function Df(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<jl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Yt(e){return e=e[0],e===void 0?null:e}function Bl(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>jl(s,n))l!==void 0&&0>jl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>jl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function jl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var mn=[],cr=[],qk=1,Nt=null,Ke=3,Vl=!1,so=!1,xs=!1;function Ff(e){for(var t=Yt(cr);t!==null;){if(t.callback===null)Bl(cr);else if(t.startTime<=e)Bl(cr),t.sortIndex=t.expirationTime,Df(mn,t);else break;t=Yt(cr)}}function Hf(e){if(xs=!1,Ff(e),!so)if(Yt(mn)!==null)so=!0,ti(Uf);else{var t=Yt(cr);t!==null&&ws(Hf,t.startTime-e)}}function Uf(e,t){so=!1,xs&&(xs=!1,zl()),Vl=!0;var n=Ke;try{for(Ff(t),Nt=Yt(mn);Nt!==null&&(!(Nt.expirationTime>t)||e&&!ne.unstable_shouldYield());){var r=Nt.callback;if(typeof r=="function"){Nt.callback=null,Ke=Nt.priorityLevel;var o=r(Nt.expirationTime<=t);t=ne.unstable_now(),typeof o=="function"?Nt.callback=o:Nt===Yt(mn)&&Bl(mn),Ff(t)}else Bl(mn);Nt=Yt(mn)}if(Nt!==null)var i=!0;else{var s=Yt(cr);s!==null&&ws(Hf,s.startTime-t),i=!1}return i}finally{Nt=null,Ke=n,Vl=!1}}var Gk=_f;ne.unstable_IdlePriority=5;ne.unstable_ImmediatePriority=1;ne.unstable_LowPriority=4;ne.unstable_NormalPriority=3;ne.unstable_Profiling=null;ne.unstable_UserBlockingPriority=2;ne.unstable_cancelCallback=function(e){e.callback=null};ne.unstable_continueExecution=function(){so||Vl||(so=!0,ti(Uf))};ne.unstable_getCurrentPriorityLevel=function(){return Ke};ne.unstable_getFirstCallbackNode=function(){return Yt(mn)};ne.unstable_next=function(e){switch(Ke){case 1:case 2:case 3:var t=3;break;default:t=Ke}var n=Ke;Ke=t;try{return e()}finally{Ke=n}};ne.unstable_pauseExecution=function(){};ne.unstable_requestPaint=Gk;ne.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ke;Ke=e;try{return t()}finally{Ke=n}};ne.unstable_scheduleCallback=function(e,t,n){var r=ne.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:qk++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Df(cr,e),Yt(mn)===null&&e===Yt(cr)&&(xs?zl():xs=!0,ws(Hf,n-r))):(e.sortIndex=o,Df(mn,e),so||Vl||(so=!0,ti(Uf))),e};ne.unstable_wrapCallback=function(e){var t=Ke;return function(){var n=Ke;Ke=t;try{return e.apply(this,arguments)}finally{Ke=n}}}});var Ov=be((Y_,Lv)=>{"use strict";Lv.exports=Iv()});var vw=be(Ut=>{"use strict";var Du=F(),ve=kl(),Me=Ov();function P(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(!Du)throw Error(P(227));var $S=new Set,Qs={};function vo(e,t){Ei(e,t),Ei(e+"Capture",t)}function Ei(e,t){for(Qs[e]=t,e=0;e<t.length;e++)$S.add(t[e])}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yk=/^[: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]*$/,Nv=Object.prototype.hasOwnProperty,Mv={},_v={};function Xk(e){return Nv.call(_v,e)?!0:Nv.call(Mv,e)?!1:Yk.test(e)?_v[e]=!0:(Mv[e]=!0,!1)}function Qk(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 Zk(e,t,n,r){if(t===null||typeof t>"u"||Qk(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 tt(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 He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new tt(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){He[e]=new tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gp=/[\-:]([a-z])/g;function Yp(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xp(e,t,n,r){var o=He.hasOwnProperty(t)?He[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||(Zk(t,n,o,r)&&(n=null),r||o===null?Xk(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 So=Du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ms=60103,lo=60106,fr=60107,Qp=60108,Us=60114,Zp=60109,Jp=60110,Fu=60112,js=60113,pu=60120,Hu=60115,em=60116,tm=60121,nm=60128,WS=60129,rm=60130,lp=60131;typeof Symbol=="function"&&Symbol.for&&(Pe=Symbol.for,Ms=Pe("react.element"),lo=Pe("react.portal"),fr=Pe("react.fragment"),Qp=Pe("react.strict_mode"),Us=Pe("react.profiler"),Zp=Pe("react.provider"),Jp=Pe("react.context"),Fu=Pe("react.forward_ref"),js=Pe("react.suspense"),pu=Pe("react.suspense_list"),Hu=Pe("react.memo"),em=Pe("react.lazy"),tm=Pe("react.block"),Pe("react.scope"),nm=Pe("react.opaque.id"),WS=Pe("react.debug_trace_mode"),rm=Pe("react.offscreen"),lp=Pe("react.legacy_hidden"));var Pe,Dv=typeof Symbol=="function"&&Symbol.iterator;function Es(e){return e===null||typeof e!="object"?null:(e=Dv&&e[Dv]||e["@@iterator"],typeof e=="function"?e:null)}var jf;function _s(e){if(jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||""}return`
2
2
  `+jf+e}var zf=!1;function Kl(e,t){if(!e||zf)return"";zf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
3
3
  `),i=r.stack.split(`
4
4
  `),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a])return`
5
- `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{zf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_s(e):""}function Zk(e){switch(e.tag){case 5:return _s(e.type);case 16:return _s("Lazy");case 13:return _s("Suspense");case 19:return _s("SuspenseList");case 0:case 2:case 15:return e=Kl(e.type,!1),e;case 11:return e=Kl(e.type.render,!1),e;case 22:return e=Kl(e.type._render,!1),e;case 1:return e=Kl(e.type,!0),e;default:return""}}function fi(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 fr:return"Fragment";case lo:return"Portal";case Us:return"Profiler";case Qp:return"StrictMode";case js:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jp:return(e.displayName||"Context")+".Consumer";case Zp:return(e._context.displayName||"Context")+".Provider";case Fu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Hu:return fi(e.type);case tm:return fi(e._render);case em:t=e._payload,e=e._init;try{return fi(e(t))}catch{}}return null}function br(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function WS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jk(e){var t=WS(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 $l(e){e._valueTracker||(e._valueTracker=Jk(e))}function qS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=WS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mu(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 up(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=br(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 GS(e,t){t=t.checked,t!=null&&Xp(e,"checked",t,!1)}function cp(e,t){GS(e,t);var n=br(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")?dp(e,t.type,n):t.hasOwnProperty("defaultValue")&&dp(e,t.type,br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fv(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 dp(e,t,n){(t!=="number"||mu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function eP(e){var t="";return Du.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function fp(e,t){return e=ve({children:void 0},t),(t=eP(t.children))&&(e.children=t),e}function pi(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=""+br(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:br(n)}}function YS(e,t){var n=br(t.value),r=br(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 Uv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var mp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function XS(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?XS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wl,QS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==mp.svg||"innerHTML"in e)e.innerHTML=t;else{for(Wl=Wl||document.createElement("div"),Wl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zs={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},tP=["Webkit","ms","Moz","O"];Object.keys(zs).forEach(function(e){tP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zs[t]=zs[e]})});function ZS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zs.hasOwnProperty(e)&&zs[e]?(""+t).trim():t+"px"}function JS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ZS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var nP=ve({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 hp(e,t){if(t){if(nP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function yp(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 om(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vp=null,mi=null,gi=null;function jv(e){if(e=fa(e)){if(typeof vp!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Ku(t),vp(e.stateNode,e.type,t))}}function e0(e){mi?gi?gi.push(e):gi=[e]:mi=e}function t0(){if(mi){var e=mi,t=gi;if(gi=mi=null,jv(e),t)for(e=0;e<t.length;e++)jv(t[e])}}function im(e,t){return e(t)}function n0(e,t,n,r,o){return e(t,n,r,o)}function sm(){}var r0=im,uo=!1,Bf=!1;function am(){(mi!==null||gi!==null)&&(sm(),t0())}function rP(e,t,n){if(Bf)return e(t,n);Bf=!0;try{return r0(e,t,n)}finally{Bf=!1,am()}}function Js(e,t){var n=e.stateNode;if(n===null)return null;var r=Ku(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(P(231,t,typeof n));return n}var Sp=!1;if(Hn)try{ni={},Object.defineProperty(ni,"passive",{get:function(){Sp=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{Sp=!1}var ni;function oP(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 Bs=!1,gu=null,hu=!1,wp=null,iP={onError:function(e){Bs=!0,gu=e}};function sP(e,t,n,r,o,i,s,a,l){Bs=!1,gu=null,oP.apply(iP,arguments)}function aP(e,t,n,r,o,i,s,a,l){if(sP.apply(this,arguments),Bs){if(Bs){var u=gu;Bs=!1,gu=null}else throw Error(P(198));hu||(hu=!0,wp=u)}}function wo(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 o0(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 zv(e){if(wo(e)!==e)throw Error(P(188))}function lP(e){var t=e.alternate;if(!t){if(t=wo(e),t===null)throw Error(P(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 zv(o),e;if(i===r)return zv(o),t;i=i.sibling}throw Error(P(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(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function i0(e){if(e=lP(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 Bv(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var s0,lm,a0,l0,xp=!1,gn=[],hr=null,yr=null,vr=null,ea=new Map,ta=new Map,Cs=[],Vv="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 Ep(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Kv(e,t){switch(e){case"focusin":case"focusout":hr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function bs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Ep(t,n,r,o,i),t!==null&&(t=fa(t),t!==null&&lm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function uP(e,t,n,r,o){switch(t){case"focusin":return hr=bs(hr,e,t,n,r,o),!0;case"dragenter":return yr=bs(yr,e,t,n,r,o),!0;case"mouseover":return vr=bs(vr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ea.set(i,bs(ea.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ta.set(i,bs(ta.get(i)||null,e,t,n,r,o)),!0}return!1}function cP(e){var t=co(e.target);if(t!==null){var n=wo(t);if(n!==null){if(t=n.tag,t===13){if(t=o0(n),t!==null){e.blockedOn=t,l0(e.lanePriority,function(){Me.unstable_runWithPriority(e.priority,function(){a0(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=fa(n),t!==null&&lm(t),e.blockedOn=n,!1;t.shift()}return!0}function $v(e,t,n){ru(e)&&n.delete(t)}function dP(){for(xp=!1;0<gn.length;){var e=gn[0];if(e.blockedOn!==null){e=fa(e.blockedOn),e!==null&&s0(e);break}for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&gn.shift()}hr!==null&&ru(hr)&&(hr=null),yr!==null&&ru(yr)&&(yr=null),vr!==null&&ru(vr)&&(vr=null),ea.forEach($v),ta.forEach($v)}function Ts(e,t){e.blockedOn===t&&(e.blockedOn=null,xp||(xp=!0,Me.unstable_scheduleCallback(Me.unstable_NormalPriority,dP)))}function u0(e){function t(o){return Ts(o,e)}if(0<gn.length){Ts(gn[0],e);for(var n=1;n<gn.length;n++){var r=gn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hr!==null&&Ts(hr,e),yr!==null&&Ts(yr,e),vr!==null&&Ts(vr,e),ea.forEach(t),ta.forEach(t),n=0;n<Cs.length;n++)r=Cs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cs.length&&(n=Cs[0],n.blockedOn===null);)cP(n),n.blockedOn===null&&Cs.shift()}function ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionend:ql("Transition","TransitionEnd")},Vf={},c0={};Hn&&(c0=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function Uu(e){if(Vf[e])return Vf[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in c0)return Vf[e]=t[n];return e}var d0=Uu("animationend"),f0=Uu("animationiteration"),p0=Uu("animationstart"),m0=Uu("transitionend"),g0=new Map,um=new Map,fP=["abort","abort",d0,"animationEnd",f0,"animationIteration",p0,"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",m0,"transitionEnd","waiting","waiting"];function cm(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)),um.set(r,t),g0.set(r,o),vo(o,[r])}}var pP=Me.unstable_now;pP();var fe=8;function oi(e){if(1&e)return fe=15,1;if(2&e)return fe=14,2;if(4&e)return fe=13,4;var t=24&e;return t!==0?(fe=12,t):e&32?(fe=11,32):(t=192&e,t!==0?(fe=10,t):e&256?(fe=9,256):(t=3584&e,t!==0?(fe=8,t):e&4096?(fe=7,4096):(t=4186112&e,t!==0?(fe=6,t):(t=62914560&e,t!==0?(fe=5,t):e&67108864?(fe=4,67108864):e&134217728?(fe=3,134217728):(t=805306368&e,t!==0?(fe=2,t):1073741824&e?(fe=1,1073741824):(fe=8,e))))))}function mP(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 gP(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(P(358,e))}}function na(e,t){var n=e.pendingLanes;if(n===0)return fe=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=fe=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=oi(l),o=fe):(a&=i,a!==0&&(r=oi(a),o=fe))}else i=n&~s,i!==0?(r=oi(i),o=fe):a!==0&&(r=oi(a),o=fe);if(r===0)return 0;if(r=31-Tr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(oi(t),o<=fe)return t;fe=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tr(t),o=1<<n,r|=e[n],t&=~o;return r}function h0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ii(24&~t),e===0?yu(10,t):e;case 10:return e=ii(192&~t),e===0?yu(8,t):e;case 8:return e=ii(3584&~t),e===0&&(e=ii(4186112&~t),e===0&&(e=512)),e;case 2:return t=ii(805306368&~t),t===0&&(t=268435456),t}throw Error(P(358,e))}function ii(e){return e&-e}function Kf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ju(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Tr(t),e[t]=n}var Tr=Math.clz32?Math.clz32:vP,hP=Math.log,yP=Math.LN2;function vP(e){return e===0?32:31-(hP(e)/yP|0)|0}var SP=Me.unstable_UserBlockingPriority,wP=Me.unstable_runWithPriority,ou=!0;function xP(e,t,n,r){uo||sm();var o=dm,i=uo;uo=!0;try{n0(o,e,t,n,r)}finally{(uo=i)||am()}}function EP(e,t,n,r){wP(SP,dm.bind(null,e,t,n,r))}function dm(e,t,n,r){if(ou){var o;if((o=(t&4)===0)&&0<gn.length&&-1<Vv.indexOf(e))e=Ep(null,e,t,n,r),gn.push(e);else{var i=fm(e,t,n,r);if(i===null)o&&Kv(e,r);else{if(o){if(-1<Vv.indexOf(e)){e=Ep(i,e,t,n,r),gn.push(e);return}if(uP(i,e,t,n,r))return;Kv(e,r)}A0(e,t,r,null,n)}}}}function fm(e,t,n,r){var o=om(r);if(o=co(o),o!==null){var i=wo(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=o0(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 A0(e,t,r,o,n),null}var pr=null,pm=null,iu=null;function y0(){if(iu)return iu;var e,t=pm,n=t.length,r,o="value"in pr?pr.value:pr.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 iu=o.slice(e,1<r?1-r:void 0)}function su(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 Gl(){return!0}function Wv(){return!1}function wt(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)?Gl:Wv,this.isPropagationStopped=Wv,this}return ve(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=Gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),t}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mm=wt(ki),da=ve({},ki,{view:0,detail:0}),CP=wt(da),$f,Wf,ks,zu=ve({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,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!==ks&&(ks&&e.type==="mousemove"?($f=e.screenX-ks.screenX,Wf=e.screenY-ks.screenY):Wf=$f=0,ks=e),$f)},movementY:function(e){return"movementY"in e?e.movementY:Wf}}),qv=wt(zu),bP=ve({},zu,{dataTransfer:0}),TP=wt(bP),kP=ve({},da,{relatedTarget:0}),qf=wt(kP),PP=ve({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),RP=wt(PP),AP=ve({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IP=wt(AP),LP=ve({},ki,{data:0}),Gv=wt(LP),OP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NP={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"},MP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _P(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MP[e])?!!t[e]:!1}function gm(){return _P}var DP=ve({},da,{key:function(e){if(e.key){var t=OP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?NP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(e){return e.type==="keypress"?su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),FP=wt(DP),HP=ve({},zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yv=wt(HP),UP=ve({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),jP=wt(UP),zP=ve({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),BP=wt(zP),VP=ve({},zu,{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}),KP=wt(VP),$P=[9,13,27,32],hm=Hn&&"CompositionEvent"in window,Vs=null;Hn&&"documentMode"in document&&(Vs=document.documentMode);var WP=Hn&&"TextEvent"in window&&!Vs,v0=Hn&&(!hm||Vs&&8<Vs&&11>=Vs),Xv=String.fromCharCode(32),Qv=!1;function S0(e,t){switch(e){case"keyup":return $P.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function qP(e,t){switch(e){case"compositionend":return w0(t);case"keypress":return t.which!==32?null:(Qv=!0,Xv);case"textInput":return e=t.data,e===Xv&&Qv?null:e;default:return null}}function GP(e,t){if(ai)return e==="compositionend"||!hm&&S0(e,t)?(e=y0(),iu=pm=pr=null,ai=!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 v0&&t.locale!=="ko"?null:t.data;default:return null}}var YP={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 Zv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YP[e.type]:t==="textarea"}function x0(e,t,n,r){e0(r),t=vu(t,"onChange"),0<t.length&&(n=new mm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ks=null,ra=null;function XP(e){k0(e,0)}function Bu(e){var t=ui(e);if(qS(t))return e}function QP(e,t){if(e==="change")return t}var E0=!1;Hn&&(Hn?(Xl="oninput"in document,Xl||(Gf=document.createElement("div"),Gf.setAttribute("oninput","return;"),Xl=typeof Gf.oninput=="function"),Yl=Xl):Yl=!1,E0=Yl&&(!document.documentMode||9<document.documentMode));var Yl,Xl,Gf;function Jv(){Ks&&(Ks.detachEvent("onpropertychange",C0),ra=Ks=null)}function C0(e){if(e.propertyName==="value"&&Bu(ra)){var t=[];if(x0(t,ra,e,om(e)),e=XP,uo)e(t);else{uo=!0;try{im(e,t)}finally{uo=!1,am()}}}}function ZP(e,t,n){e==="focusin"?(Jv(),Ks=t,ra=n,Ks.attachEvent("onpropertychange",C0)):e==="focusout"&&Jv()}function JP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bu(ra)}function eR(e,t){if(e==="click")return Bu(t)}function tR(e,t){if(e==="input"||e==="change")return Bu(t)}function nR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:nR,rR=Object.prototype.hasOwnProperty;function oa(e,t){if(Mt(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(!rR.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function eS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tS(e,t){var n=eS(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=eS(n)}}function b0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?b0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nS(){for(var e=window,t=mu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mu(e.document)}return t}function Cp(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 oR=Hn&&"documentMode"in document&&11>=document.documentMode,li=null,bp=null,$s=null,Tp=!1;function rS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tp||li==null||li!==mu(r)||(r=li,"selectionStart"in r&&Cp(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}),$s&&oa($s,r)||($s=r,r=vu(bp,"onSelect"),0<r.length&&(t=new mm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=li)))}cm("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);cm("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);cm(fP,2);for(Yf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ql=0;Ql<Yf.length;Ql++)um.set(Yf[Ql],0);var Yf,Ql;Ei("onMouseEnter",["mouseout","mouseover"]);Ei("onMouseLeave",["mouseout","mouseover"]);Ei("onPointerEnter",["pointerout","pointerover"]);Ei("onPointerLeave",["pointerout","pointerover"]);vo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vo("onBeforeInput",["compositionend","keypress","textInput","paste"]);vo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),T0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function oS(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,aP(r,t,void 0,e),e.currentTarget=null}function k0(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;oS(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;oS(o,a,u),i=l}}}if(hu)throw e=wp,hu=!1,wp=null,e}function me(e,t){var n=L0(t),r=e+"__bubble";n.has(r)||(R0(t,e,2,!1),n.add(r))}var iS="_reactListening"+Math.random().toString(36).slice(2);function P0(e){e[iS]||(e[iS]=!0,KS.forEach(function(t){T0.has(t)||sS(t,!1,e,null),sS(t,!0,e,null)}))}function sS(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&&T0.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=L0(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),R0(i,e,o,t),s.add(a))}function R0(e,t,n,r){var o=um.get(t);switch(o===void 0?2:o){case 0:o=xP;break;case 1:o=EP;break;default:o=dm}n=o.bind(null,t,n,e),o=void 0,!Sp||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 A0(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=co(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}rP(function(){var u=i,c=om(n),f=[];e:{var d=g0.get(e);if(d!==void 0){var p=mm,y=e;switch(e){case"keypress":if(su(n)===0)break e;case"keydown":case"keyup":p=FP;break;case"focusin":y="focus",p=qf;break;case"focusout":y="blur",p=qf;break;case"beforeblur":case"afterblur":p=qf;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":p=qv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=TP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=jP;break;case d0:case f0:case p0:p=RP;break;case m0:p=BP;break;case"scroll":p=CP;break;case"wheel":p=KP;break;case"copy":case"cut":case"paste":p=IP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Yv}var v=(t&4)!==0,g=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var h=u,S;h!==null;){S=h;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,m!==null&&(x=Js(h,m),x!=null&&v.push(ia(h,x,S)))),g)break;h=h.return}0<v.length&&(d=new p(d,y,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(co(y)||y[Pi]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?co(y):null,y!==null&&(g=wo(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(v=qv,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=Yv,x="onPointerLeave",m="onPointerEnter",h="pointer"),g=p==null?d:ui(p),S=y==null?d:ui(y),d=new v(x,h+"leave",p,n,c),d.target=g,d.relatedTarget=S,x=null,co(c)===u&&(v=new v(m,h+"enter",y,n,c),v.target=S,v.relatedTarget=g,x=v),g=x,p&&y)t:{for(v=p,m=y,h=0,S=v;S;S=ri(S))h++;for(S=0,x=m;x;x=ri(x))S++;for(;0<h-S;)v=ri(v),h--;for(;0<S-h;)m=ri(m),S--;for(;h--;){if(v===m||m!==null&&v===m.alternate)break t;v=ri(v),m=ri(m)}v=null}else v=null;p!==null&&aS(f,d,p,v,!1),y!==null&&g!==null&&aS(f,g,y,v,!0)}}e:{if(d=u?ui(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var C=QP;else if(Zv(d))if(E0)C=tR;else{C=JP;var T=ZP}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=eR);if(C&&(C=C(e,u))){x0(f,C,n,c);break e}T&&T(e,d,u),e==="focusout"&&(T=d._wrapperState)&&T.controlled&&d.type==="number"&&dp(d,"number",d.value)}switch(T=u?ui(u):window,e){case"focusin":(Zv(T)||T.contentEditable==="true")&&(li=T,bp=u,$s=null);break;case"focusout":$s=bp=li=null;break;case"mousedown":Tp=!0;break;case"contextmenu":case"mouseup":case"dragend":Tp=!1,rS(f,n,c);break;case"selectionchange":if(oR)break;case"keydown":case"keyup":rS(f,n,c)}var k;if(hm)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else ai?S0(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(v0&&n.locale!=="ko"&&(ai||I!=="onCompositionStart"?I==="onCompositionEnd"&&ai&&(k=y0()):(pr=c,pm="value"in pr?pr.value:pr.textContent,ai=!0)),T=vu(u,I),0<T.length&&(I=new Gv(I,e,null,n,c),f.push({event:I,listeners:T}),k?I.data=k:(k=w0(n),k!==null&&(I.data=k)))),(k=WP?qP(e,n):GP(e,n))&&(u=vu(u,"onBeforeInput"),0<u.length&&(c=new Gv("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}k0(f,t)})}function ia(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Js(e,n),i!=null&&r.unshift(ia(e,i,o)),i=Js(e,t),i!=null&&r.push(ia(e,i,o))),e=e.return}return r}function ri(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function aS(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=Js(n,i),l!=null&&s.unshift(ia(n,l,a))):o||(l=Js(n,i),l!=null&&s.push(ia(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Su(){}var Xf=null,Qf=null;function I0(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function kp(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 lS=typeof setTimeout=="function"?setTimeout:void 0,iR=typeof clearTimeout=="function"?clearTimeout:void 0;function ym(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function hi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function uS(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 Zf=0;function sR(e){return{$$typeof:nm,toString:e,valueOf:e}}var Vu=Math.random().toString(36).slice(2),mr="__reactFiber$"+Vu,wu="__reactProps$"+Vu,Pi="__reactContainer$"+Vu,cS="__reactEvents$"+Vu;function co(e){var t=e[mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pi]||n[mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uS(e);e!==null;){if(n=e[mr])return n;e=uS(e)}return t}e=n,n=e.parentNode}return null}function fa(e){return e=e[mr]||e[Pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Ku(e){return e[wu]||null}function L0(e){var t=e[cS];return t===void 0&&(t=e[cS]=new Set),t}var Pp=[],ci=-1;function Ar(e){return{current:e}}function ge(e){0>ci||(e.current=Pp[ci],Pp[ci]=null,ci--)}function Ce(e,t){ci++,Pp[ci]=e.current,e.current=t}var kr={},Ge=Ar(kr),pt=Ar(!1),go=kr;function Ci(e,t){var n=e.type.contextTypes;if(!n)return kr;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 mt(e){return e=e.childContextTypes,e!=null}function xu(){ge(pt),ge(Ge)}function dS(e,t,n){if(Ge.current!==kr)throw Error(P(168));Ce(Ge,t),Ce(pt,n)}function O0(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(P(108,fi(t)||"Unknown",o));return ve({},n,r)}function au(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,go=Ge.current,Ce(Ge,e),Ce(pt,pt.current),!0}function fS(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=O0(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(Ge),Ce(Ge,e)):ge(pt),Ce(pt,n)}var vm=null,mo=null,aR=Me.unstable_runWithPriority,Sm=Me.unstable_scheduleCallback,Rp=Me.unstable_cancelCallback,lR=Me.unstable_shouldYield,pS=Me.unstable_requestPaint,Ap=Me.unstable_now,uR=Me.unstable_getCurrentPriorityLevel,$u=Me.unstable_ImmediatePriority,N0=Me.unstable_UserBlockingPriority,M0=Me.unstable_NormalPriority,_0=Me.unstable_LowPriority,D0=Me.unstable_IdlePriority,Jf={},cR=pS!==void 0?pS:function(){},Nn=null,lu=null,ep=!1,mS=Ap(),We=1e4>mS?Ap:function(){return Ap()-mS};function bi(){switch(uR()){case $u:return 99;case N0:return 98;case M0:return 97;case _0:return 96;case D0:return 95;default:throw Error(P(332))}}function F0(e){switch(e){case 99:return $u;case 98:return N0;case 97:return M0;case 96:return _0;case 95:return D0;default:throw Error(P(332))}}function ho(e,t){return e=F0(e),aR(e,t)}function sa(e,t,n){return e=F0(e),Sm(e,t,n)}function wn(){if(lu!==null){var e=lu;lu=null,Rp(e)}H0()}function H0(){if(!ep&&Nn!==null){ep=!0;var e=0;try{var t=Nn;ho(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Nn=null}catch(n){throw Nn!==null&&(Nn=Nn.slice(e+1)),Sm($u,wn),n}finally{ep=!1}}}var dR=So.ReactCurrentBatchConfig;function Xt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Eu=Ar(null),Cu=null,di=null,bu=null;function wm(){bu=di=Cu=null}function xm(e){var t=Eu.current;ge(Eu),e.type._context._currentValue=t}function U0(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 yi(e,t){Cu=e,bu=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qt=!0),e.firstContext=null)}function Ft(e,t){if(bu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(bu=e,t=1073741823),t={context:e,observedBits:t,next:null},di===null){if(Cu===null)throw Error(P(308));di=t,Cu.dependencies={lanes:0,firstContext:t,responders:null}}else di=di.next=t;return e._currentValue}var dr=!1;function Em(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function j0(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 Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wr(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 gS(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 aa(e,t,n,r){var o=e.updateQueue;dr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var p=e,y=i;switch(a=t,d=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(d,f,a);break e}f=p;break e;case 3:p.flags=p.flags&-4097|64;case 0:if(p=y.payload,a=typeof p=="function"?p.call(d,f,a):p,a==null)break e;f=ve({},f,a);break e;case 2:dr=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,ma|=s,e.lanes=s,e.memoizedState=f}}function hS(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(P(191,o));o.call(r)}}}var z0=new Du.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wu={isMounted:function(e){return(e=e._reactInternals)?wo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=St(),r=xr(e),o=Sr(n,r);o.tag=2,t!=null&&(o.callback=t),wr(e,o),Er(e,r,n)}};function yS(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?!oa(n,r)||!oa(o,i):!0}function B0(e,t,n){var r=!1,o=kr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(o=mt(t)?go:Ge.current,r=t.contextTypes,i=(r=r!=null)?Ci(e,o):kr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function vS(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&&Wu.enqueueReplaceState(t,t.state,null)}function Ip(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=z0,Em(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ft(i):(i=mt(t)?go:Ge.current,o.context=Ci(e,i)),aa(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Tu(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&&Wu.enqueueReplaceState(o,o.state,null),aa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Zl=Array.isArray;function Ps(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(P(309));var r=n.stateNode}if(!r)throw Error(P(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===z0&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function Jl(e,t){if(e.type!=="textarea")throw Error(P(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function V0(e){function t(g,m){if(e){var h=g.lastEffect;h!==null?(h.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,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<m?(g.flags=2,m):h):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,h,S){return m===null||m.tag!==6?(m=ip(h,g.mode,S),m.return=g,m):(m=o(m,h),m.return=g,m)}function l(g,m,h,S){return m!==null&&m.elementType===h.type?(S=o(m,h.props),S.ref=Ps(g,m,h),S.return=g,S):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,S)}function u(g,m,h,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=sp(h,g.mode,S),m.return=g,m):(m=o(m,h.children||[]),m.return=g,m)}function c(g,m,h,S,x){return m===null||m.tag!==7?(m=xi(h,g.mode,S,x),m.return=g,m):(m=o(m,h),m.return=g,m)}function f(g,m,h){if(typeof m=="string"||typeof m=="number")return m=ip(""+m,g.mode,h),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ms:return h=fu(m.type,m.key,m.props,null,g.mode,h),h.ref=Ps(g,null,m),h.return=g,h;case lo:return m=sp(m,g.mode,h),m.return=g,m}if(Zl(m)||Es(m))return m=xi(m,g.mode,h,null),m.return=g,m;Jl(g,m)}return null}function d(g,m,h,S){var x=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return x!==null?null:a(g,m,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ms:return h.key===x?h.type===fr?c(g,m,h.props.children,S,x):l(g,m,h,S):null;case lo:return h.key===x?u(g,m,h,S):null}if(Zl(h)||Es(h))return x!==null?null:c(g,m,h,S,null);Jl(g,h)}return null}function p(g,m,h,S,x){if(typeof S=="string"||typeof S=="number")return g=g.get(h)||null,a(m,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ms:return g=g.get(S.key===null?h:S.key)||null,S.type===fr?c(m,g,S.props.children,x,S.key):l(m,g,S,x);case lo:return g=g.get(S.key===null?h:S.key)||null,u(m,g,S,x)}if(Zl(S)||Es(S))return g=g.get(h)||null,c(m,g,S,x,null);Jl(m,S)}return null}function y(g,m,h,S){for(var x=null,C=null,T=m,k=m=0,I=null;T!==null&&k<h.length;k++){T.index>k?(I=T,T=null):I=T.sibling;var L=d(g,T,h[k],S);if(L===null){T===null&&(T=I);break}e&&T&&L.alternate===null&&t(g,T),m=i(L,m,k),C===null?x=L:C.sibling=L,C=L,T=I}if(k===h.length)return n(g,T),x;if(T===null){for(;k<h.length;k++)T=f(g,h[k],S),T!==null&&(m=i(T,m,k),C===null?x=T:C.sibling=T,C=T);return x}for(T=r(g,T);k<h.length;k++)I=p(T,g,k,h[k],S),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?k:I.key),m=i(I,m,k),C===null?x=I:C.sibling=I,C=I);return e&&T.forEach(function(N){return t(g,N)}),x}function v(g,m,h,S){var x=Es(h);if(typeof x!="function")throw Error(P(150));if(h=x.call(h),h==null)throw Error(P(151));for(var C=x=null,T=m,k=m=0,I=null,L=h.next();T!==null&&!L.done;k++,L=h.next()){T.index>k?(I=T,T=null):I=T.sibling;var N=d(g,T,L.value,S);if(N===null){T===null&&(T=I);break}e&&T&&N.alternate===null&&t(g,T),m=i(N,m,k),C===null?x=N:C.sibling=N,C=N,T=I}if(L.done)return n(g,T),x;if(T===null){for(;!L.done;k++,L=h.next())L=f(g,L.value,S),L!==null&&(m=i(L,m,k),C===null?x=L:C.sibling=L,C=L);return x}for(T=r(g,T);!L.done;k++,L=h.next())L=p(T,g,k,L.value,S),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?k:L.key),m=i(L,m,k),C===null?x=L:C.sibling=L,C=L);return e&&T.forEach(function(z){return t(g,z)}),x}return function(g,m,h,S){var x=typeof h=="object"&&h!==null&&h.type===fr&&h.key===null;x&&(h=h.props.children);var C=typeof h=="object"&&h!==null;if(C)switch(h.$$typeof){case Ms:e:{for(C=h.key,x=m;x!==null;){if(x.key===C){switch(x.tag){case 7:if(h.type===fr){n(g,x.sibling),m=o(x,h.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===h.type){n(g,x.sibling),m=o(x,h.props),m.ref=Ps(g,x,h),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}h.type===fr?(m=xi(h.props.children,g.mode,S,h.key),m.return=g,g=m):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,g=S)}return s(g);case lo:e:{for(x=h.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=o(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=sp(h,g.mode,S),m.return=g,g=m}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,h),m.return=g,g=m):(n(g,m),m=ip(h,g.mode,S),m.return=g,g=m),s(g);if(Zl(h))return y(g,m,h,S);if(Es(h))return v(g,m,h,S);if(C&&Jl(g,h),typeof h>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(P(152,fi(g.type)||"Component"))}return n(g,m)}}var ku=V0(!0),K0=V0(!1),pa={},vn=Ar(pa),la=Ar(pa),ua=Ar(pa);function fo(e){if(e===pa)throw Error(P(174));return e}function Lp(e,t){switch(Ce(ua,t),Ce(la,e),Ce(vn,pa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}ge(vn),Ce(vn,t)}function Ti(){ge(vn),ge(la),ge(ua)}function SS(e){fo(ua.current);var t=fo(vn.current),n=gp(t,e.type);t!==n&&(Ce(la,e),Ce(vn,n))}function Cm(e){la.current===e&&(ge(vn),ge(la))}var Ee=Ar(0);function Pu(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 _n=null,gr=null,Sn=!1;function $0(e,t){var n=_t(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 wS(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 Op(e){if(Sn){var t=gr;if(t){var n=t;if(!wS(e,t)){if(t=hi(n.nextSibling),!t||!wS(e,t)){e.flags=e.flags&-1025|2,Sn=!1,_n=e;return}$0(_n,n)}_n=e,gr=hi(t.firstChild)}else e.flags=e.flags&-1025|2,Sn=!1,_n=e}}function xS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function eu(e){if(e!==_n)return!1;if(!Sn)return xS(e),Sn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!kp(t,e.memoizedProps))for(t=gr;t;)$0(e,t),t=hi(t.nextSibling);if(xS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gr=hi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gr=null}}else gr=_n?hi(e.stateNode.nextSibling):null;return!0}function tp(){gr=_n=null,Sn=!1}var vi=[];function bm(){for(var e=0;e<vi.length;e++)vi[e]._workInProgressVersionPrimary=null;vi.length=0}var Ws=So.ReactCurrentDispatcher,Dt=So.ReactCurrentBatchConfig,ca=0,Te=null,$e=null,De=null,Ru=!1,qs=!1;function dt(){throw Error(P(321))}function Tm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function km(e,t,n,r,o,i){if(ca=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ws.current=e===null||e.memoizedState===null?pR:mR,e=n(r,o),qs){i=0;do{if(qs=!1,!(25>i))throw Error(P(301));i+=1,De=$e=null,t.updateQueue=null,Ws.current=gR,e=n(r,o)}while(qs)}if(Ws.current=Ou,t=$e!==null&&$e.next!==null,ca=0,De=$e=Te=null,Ru=!1,t)throw Error(P(300));return e}function po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Te.memoizedState=De=e:De=De.next=e,De}function xo(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=De===null?Te.memoizedState:De.next;if(t!==null)De=t,$e=e;else{if(e===null)throw Error(P(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},De===null?Te.memoizedState=De=e:De=De.next=e}return De}function hn(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=$e,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((ca&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,Te.lanes|=u,ma|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Qt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function As(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(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);Mt(i,t.memoizedState)||(Qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ES(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=(ca&e)===e)&&(t._workInProgressVersionPrimary=r,vi.push(t))),e)return n(t._source);throw vi.push(t),Error(P(350))}function W0(e,t,n,r){var o=et;if(o===null)throw Error(P(349));var i=t._getVersion,s=i(t._source),a=Ws.current,l=a.useState(function(){return ES(o,t,n)}),u=l[1],c=l[0];l=De;var f=e.memoizedState,d=f.refs,p=d.getSnapshot,y=f.source;f=f.subscribe;var v=Te;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Mt(s,g)){g=n(t._source),Mt(c,g)||(u(g),g=xr(v),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,h=g;0<h;){var S=31-Tr(h),x=1<<S;m[S]|=g,h&=~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 h=xr(v);o.mutableReadLanes|=h&o.pendingLanes}catch(S){m(function(){throw S})}})},[t,r]),Mt(p,n)&&Mt(y,t)&&Mt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:c},e.dispatch=u=Am.bind(null,Te,e),l.queue=e,l.baseQueue=null,c=ES(o,t,n),l.memoizedState=l.baseState=c),c}function q0(e,t,n){var r=xo();return W0(r,e,t,n)}function Is(e){var t=po();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},e=e.dispatch=Am.bind(null,Te,e),[t.memoizedState,e]}function Au(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null},Te.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 CS(e){var t=po();return e={current:e},t.memoizedState=e}function Iu(){return xo().memoizedState}function Np(e,t,n,r){var o=po();Te.flags|=e,o.memoizedState=Au(1|t,n,void 0,r===void 0?null:r)}function Pm(e,t,n,r){var o=xo();r=r===void 0?null:r;var i=void 0;if($e!==null){var s=$e.memoizedState;if(i=s.destroy,r!==null&&Tm(r,s.deps)){Au(t,n,i,r);return}}Te.flags|=e,o.memoizedState=Au(1|t,n,i,r)}function bS(e,t){return Np(516,4,e,t)}function Lu(e,t){return Pm(516,4,e,t)}function G0(e,t){return Pm(4,2,e,t)}function Y0(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 X0(e,t,n){return n=n!=null?n.concat([e]):null,Pm(4,2,Y0.bind(null,t,e),n)}function Rm(){}function Q0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fR(e,t){var n=bi();ho(98>n?98:n,function(){e(!0)}),ho(97<n?97:n,function(){var r=Dt.transition;Dt.transition=1;try{e(!1),t()}finally{Dt.transition=r}})}function Am(e,t,n){var r=St(),o=xr(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===Te||s!==null&&s===Te)qs=Ru=!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,Mt(l,a))return}catch{}finally{}Er(e,o,r)}}var Ou={readContext:Ft,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useOpaqueIdentifier:dt,unstable_isNewReconciler:!1},pR={readContext:Ft,useCallback:function(e,t){return po().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:bS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Np(4,2,Y0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Np(4,2,e,t)},useMemo:function(e,t){var n=po();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=po();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=Am.bind(null,Te,e),[r.memoizedState,e]},useRef:CS,useState:Is,useDebugValue:Rm,useDeferredValue:function(e){var t=Is(e),n=t[0],r=t[1];return bS(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Is(!1),t=e[0];return e=fR.bind(null,e[1]),CS(e),[e,t]},useMutableSource:function(e,t,n){var r=po();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},W0(r,e,t,n)},useOpaqueIdentifier:function(){if(Sn){var e=!1,t=sR(function(){throw e||(e=!0,n("r:"+(Zf++).toString(36))),Error(P(355))}),n=Is(t)[1];return!(Te.mode&2)&&(Te.flags|=516,Au(5,function(){n("r:"+(Zf++).toString(36))},void 0,null)),t}return t="r:"+(Zf++).toString(36),Is(t),t},unstable_isNewReconciler:!1},mR={readContext:Ft,useCallback:Q0,useContext:Ft,useEffect:Lu,useImperativeHandle:X0,useLayoutEffect:G0,useMemo:Z0,useReducer:Rs,useRef:Iu,useState:function(){return Rs(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=Rs(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Rs(hn)[0];return[Iu().current,e]},useMutableSource:q0,useOpaqueIdentifier:function(){return Rs(hn)[0]},unstable_isNewReconciler:!1},gR={readContext:Ft,useCallback:Q0,useContext:Ft,useEffect:Lu,useImperativeHandle:X0,useLayoutEffect:G0,useMemo:Z0,useReducer:As,useRef:Iu,useState:function(){return As(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=As(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=As(hn)[0];return[Iu().current,e]},useMutableSource:q0,useOpaqueIdentifier:function(){return As(hn)[0]},unstable_isNewReconciler:!1},hR=So.ReactCurrentOwner,Qt=!1;function ft(e,t,n,r){t.child=e===null?K0(t,null,n,r):ku(t,e.child,n,r)}function TS(e,t,n,r,o){n=n.render;var i=t.ref;return yi(t,o),r=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,r,o),t.child)}function kS(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!_m(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,J0(e,t,s,r,o,i)):(e=fu(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:oa,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 J0(e,t,n,r,o,i){if(e!==null&&oa(e.memoizedProps,r)&&e.ref===t.ref)if(Qt=!1,(i&o)!==0)e.flags&16384&&(Qt=!0);else return t.lanes=e.lanes,Dn(e,t,i);return Mp(e,t,n,r,i)}function np(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},nu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},nu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},nu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,nu(t,r);return ft(e,t,o,n),t.child}function ew(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Mp(e,t,n,r,o){var i=mt(n)?go:Ge.current;return i=Ci(t,i),yi(t,o),n=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,n,o),t.child)}function PS(e,t,n,r,o){if(mt(n)){var i=!0;au(t)}else i=!1;if(yi(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),B0(t,n,r),Ip(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=Ft(u):(u=mt(n)?go:Ge.current,u=Ci(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&vS(t,s,r,u),dr=!1;var d=t.memoizedState;s.state=d,aa(t,r,s,o),l=t.memoizedState,a!==r||d!==l||pt.current||dr?(typeof c=="function"&&(Tu(t,n,c,r),l=t.memoizedState),(a=dr||yS(t,n,a,r,d,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,j0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Xt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=mt(n)?go:Ge.current,l=Ci(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&vS(t,s,r,l),dr=!1,d=t.memoizedState,s.state=d,aa(t,r,s,o);var y=t.memoizedState;a!==f||d!==y||pt.current||dr?(typeof p=="function"&&(Tu(t,n,p,r),y=t.memoizedState),(u=dr||yS(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 _p(e,t,n,r,i,o)}function _p(e,t,n,r,o,i){ew(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&fS(t,n,!1),Dn(e,t,i);r=t.stateNode,hR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ku(t,e.child,null,i),t.child=ku(t,null,a,i)):ft(e,t,a,i),t.memoizedState=r.state,o&&fS(t,n,!0),t.child}function RS(e){var t=e.stateNode;t.pendingContext?dS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dS(e,t.context,!1),Lp(e,t.containerInfo)}var tu={dehydrated:null,retryLane:0};function AS(e,t,n){var r=t.pendingProps,o=Ee.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),Ce(Ee,o&1),e===null?(r.fallback!==void 0&&Op(t),e=r.children,o=r.fallback,i?(e=IS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,e):typeof r.unstable_expectedLoadTime=="number"?(e=IS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,t.lanes=33554432,e):(n=Dm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=OS(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=tu,r):(n=LS(e,t,r.children,n),t.memoizedState=null,n):i?(r=OS(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=tu,r):(n=LS(e,t,r.children,n),t.memoizedState=null,n)}function IS(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=Dm(t,o,0,null),n=xi(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function LS(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 OS(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=xi(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function NS(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),U0(e.return,t)}function rp(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 MS(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ft(e,t,r.children,n),r=Ee.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&&NS(e,n);else if(e.tag===19)NS(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(Ce(Ee,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&&Pu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rp(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&&Pu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rp(t,!0,n,null,i,t.lastEffect);break;case"together":rp(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),ma|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(P(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 tw,Dp,nw,rw;tw=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}};Dp=function(){};nw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,fo(vn.current);var i=null;switch(n){case"input":o=up(e,o),r=up(e,r),i=[];break;case"option":o=fp(e,o),r=fp(e,r),i=[];break;case"select":o=ve({},o,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":o=pp(e,o),r=pp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}hp(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"&&(Qs.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"&&(Qs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===nm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};rw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ls(e,t){if(!Sn)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 yR(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 mt(t.type)&&xu(),null;case 3:return Ti(),ge(pt),ge(Ge),bm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(eu(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Dp(t),null;case 5:Cm(t);var o=fo(ua.current);if(n=t.type,e!==null&&t.stateNode!=null)nw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(P(166));return null}if(e=fo(vn.current),eu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[mr]=t,r[wu]=i,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(e=0;e<Ds.length;e++)me(Ds[e],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Dv(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":Hv(r,i),me("invalid",r)}hp(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]):Qs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r));switch(n){case"input":$l(r),Fv(r,i,!0);break;case"textarea":$l(r),Uv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Su)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===mp.html&&(e=XS(n)),e===mp.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[mr]=t,e[wu]=r,tw(e,t,!1,!1),t.stateNode=e,s=yp(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ds.length;o++)me(Ds[o],e);o=r;break;case"source":me("error",e),o=r;break;case"img":case"image":case"link":me("error",e),me("load",e),o=r;break;case"details":me("toggle",e),o=r;break;case"input":Dv(e,r),o=up(e,r),me("invalid",e);break;case"option":o=fp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ve({},r,{value:void 0}),me("invalid",e);break;case"textarea":Hv(e,r),o=pp(e,r),me("invalid",e);break;default:o=r}hp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?JS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&QS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Zs(e,l):typeof l=="number"&&Zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&Xp(e,i,l,s))}switch(n){case"input":$l(e),Fv(e,r,!1);break;case"textarea":$l(e),Uv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+br(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?pi(e,!!r.multiple,i,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Su)}I0(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)rw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));n=fo(ua.current),fo(vn.current),eu(t)?(r=t.stateNode,n=t.memoizedProps,r[mr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mr]=t,t.stateNode=r)}return null;case 13:return ge(Ee),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&eu(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Ee.current&1?Fe===0&&(Fe=3):((Fe===0||Fe===3)&&(Fe=4),et===null||!(ma&134217727)&&!(Ai&134217727)||Si(et,qe))),(r||n)&&(t.flags|=4),null);case 4:return Ti(),Dp(t),e===null&&P0(t.stateNode.containerInfo),null;case 10:return xm(t),null;case 17:return mt(t.type)&&xu(),null;case 19:if(ge(Ee),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Ls(r,!1);else{if(Fe!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Pu(e),s!==null){for(t.flags|=64,Ls(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(Ee,Ee.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>Bp&&(t.flags|=64,i=!0,Ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=Pu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Sn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>Bp&&n!==1073741824&&(t.flags|=64,i=!0,Ls(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=We(),n.sibling=null,t=Ee.current,Ce(Ee,i?t&1|2:t&1),n):null;case 23:case 24:return Mm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(P(156,t.tag))}function vR(e){switch(e.tag){case 1:mt(e.type)&&xu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ti(),ge(pt),ge(Ge),bm(),t=e.flags,t&64)throw Error(P(285));return e.flags=t&-4097|64,e;case 5:return Cm(e),null;case 13:return ge(Ee),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ge(Ee),null;case 4:return Ti(),null;case 10:return xm(e),null;case 23:case 24:return Mm(),null;default:return null}}function Im(e,t){try{var n="",r=t;do n+=Zk(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{zf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_s(e):""}function Jk(e){switch(e.tag){case 5:return _s(e.type);case 16:return _s("Lazy");case 13:return _s("Suspense");case 19:return _s("SuspenseList");case 0:case 2:case 15:return e=Kl(e.type,!1),e;case 11:return e=Kl(e.type.render,!1),e;case 22:return e=Kl(e.type._render,!1),e;case 1:return e=Kl(e.type,!0),e;default:return""}}function fi(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 fr:return"Fragment";case lo:return"Portal";case Us:return"Profiler";case Qp:return"StrictMode";case js:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jp:return(e.displayName||"Context")+".Consumer";case Zp:return(e._context.displayName||"Context")+".Provider";case Fu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Hu:return fi(e.type);case tm:return fi(e._render);case em:t=e._payload,e=e._init;try{return fi(e(t))}catch{}}return null}function br(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function qS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eP(e){var t=qS(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 $l(e){e._valueTracker||(e._valueTracker=eP(e))}function GS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mu(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 up(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=br(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 YS(e,t){t=t.checked,t!=null&&Xp(e,"checked",t,!1)}function cp(e,t){YS(e,t);var n=br(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")?dp(e,t.type,n):t.hasOwnProperty("defaultValue")&&dp(e,t.type,br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hv(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 dp(e,t,n){(t!=="number"||mu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function tP(e){var t="";return Du.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function fp(e,t){return e=ve({children:void 0},t),(t=tP(t.children))&&(e.children=t),e}function pi(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=""+br(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Uv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:br(n)}}function XS(e,t){var n=br(t.value),r=br(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 jv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var mp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function QS(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?QS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wl,ZS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==mp.svg||"innerHTML"in e)e.innerHTML=t;else{for(Wl=Wl||document.createElement("div"),Wl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zs={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},nP=["Webkit","ms","Moz","O"];Object.keys(zs).forEach(function(e){nP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zs[t]=zs[e]})});function JS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zs.hasOwnProperty(e)&&zs[e]?(""+t).trim():t+"px"}function e0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=JS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var rP=ve({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 hp(e,t){if(t){if(rP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function yp(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 om(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vp=null,mi=null,gi=null;function zv(e){if(e=fa(e)){if(typeof vp!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Ku(t),vp(e.stateNode,e.type,t))}}function t0(e){mi?gi?gi.push(e):gi=[e]:mi=e}function n0(){if(mi){var e=mi,t=gi;if(gi=mi=null,zv(e),t)for(e=0;e<t.length;e++)zv(t[e])}}function im(e,t){return e(t)}function r0(e,t,n,r,o){return e(t,n,r,o)}function sm(){}var o0=im,uo=!1,Bf=!1;function am(){(mi!==null||gi!==null)&&(sm(),n0())}function oP(e,t,n){if(Bf)return e(t,n);Bf=!0;try{return o0(e,t,n)}finally{Bf=!1,am()}}function Js(e,t){var n=e.stateNode;if(n===null)return null;var r=Ku(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(P(231,t,typeof n));return n}var Sp=!1;if(Hn)try{ni={},Object.defineProperty(ni,"passive",{get:function(){Sp=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{Sp=!1}var ni;function iP(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 Bs=!1,gu=null,hu=!1,wp=null,sP={onError:function(e){Bs=!0,gu=e}};function aP(e,t,n,r,o,i,s,a,l){Bs=!1,gu=null,iP.apply(sP,arguments)}function lP(e,t,n,r,o,i,s,a,l){if(aP.apply(this,arguments),Bs){if(Bs){var u=gu;Bs=!1,gu=null}else throw Error(P(198));hu||(hu=!0,wp=u)}}function wo(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 i0(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 Bv(e){if(wo(e)!==e)throw Error(P(188))}function uP(e){var t=e.alternate;if(!t){if(t=wo(e),t===null)throw Error(P(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 Bv(o),e;if(i===r)return Bv(o),t;i=i.sibling}throw Error(P(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(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function s0(e){if(e=uP(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 Vv(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var a0,lm,l0,u0,xp=!1,gn=[],hr=null,yr=null,vr=null,ea=new Map,ta=new Map,Cs=[],Kv="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 Ep(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function $v(e,t){switch(e){case"focusin":case"focusout":hr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function bs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Ep(t,n,r,o,i),t!==null&&(t=fa(t),t!==null&&lm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function cP(e,t,n,r,o){switch(t){case"focusin":return hr=bs(hr,e,t,n,r,o),!0;case"dragenter":return yr=bs(yr,e,t,n,r,o),!0;case"mouseover":return vr=bs(vr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ea.set(i,bs(ea.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ta.set(i,bs(ta.get(i)||null,e,t,n,r,o)),!0}return!1}function dP(e){var t=co(e.target);if(t!==null){var n=wo(t);if(n!==null){if(t=n.tag,t===13){if(t=i0(n),t!==null){e.blockedOn=t,u0(e.lanePriority,function(){Me.unstable_runWithPriority(e.priority,function(){l0(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=fa(n),t!==null&&lm(t),e.blockedOn=n,!1;t.shift()}return!0}function Wv(e,t,n){ru(e)&&n.delete(t)}function fP(){for(xp=!1;0<gn.length;){var e=gn[0];if(e.blockedOn!==null){e=fa(e.blockedOn),e!==null&&a0(e);break}for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&gn.shift()}hr!==null&&ru(hr)&&(hr=null),yr!==null&&ru(yr)&&(yr=null),vr!==null&&ru(vr)&&(vr=null),ea.forEach(Wv),ta.forEach(Wv)}function Ts(e,t){e.blockedOn===t&&(e.blockedOn=null,xp||(xp=!0,Me.unstable_scheduleCallback(Me.unstable_NormalPriority,fP)))}function c0(e){function t(o){return Ts(o,e)}if(0<gn.length){Ts(gn[0],e);for(var n=1;n<gn.length;n++){var r=gn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hr!==null&&Ts(hr,e),yr!==null&&Ts(yr,e),vr!==null&&Ts(vr,e),ea.forEach(t),ta.forEach(t),n=0;n<Cs.length;n++)r=Cs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cs.length&&(n=Cs[0],n.blockedOn===null);)dP(n),n.blockedOn===null&&Cs.shift()}function ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionend:ql("Transition","TransitionEnd")},Vf={},d0={};Hn&&(d0=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function Uu(e){if(Vf[e])return Vf[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in d0)return Vf[e]=t[n];return e}var f0=Uu("animationend"),p0=Uu("animationiteration"),m0=Uu("animationstart"),g0=Uu("transitionend"),h0=new Map,um=new Map,pP=["abort","abort",f0,"animationEnd",p0,"animationIteration",m0,"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",g0,"transitionEnd","waiting","waiting"];function cm(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)),um.set(r,t),h0.set(r,o),vo(o,[r])}}var mP=Me.unstable_now;mP();var fe=8;function oi(e){if(1&e)return fe=15,1;if(2&e)return fe=14,2;if(4&e)return fe=13,4;var t=24&e;return t!==0?(fe=12,t):e&32?(fe=11,32):(t=192&e,t!==0?(fe=10,t):e&256?(fe=9,256):(t=3584&e,t!==0?(fe=8,t):e&4096?(fe=7,4096):(t=4186112&e,t!==0?(fe=6,t):(t=62914560&e,t!==0?(fe=5,t):e&67108864?(fe=4,67108864):e&134217728?(fe=3,134217728):(t=805306368&e,t!==0?(fe=2,t):1073741824&e?(fe=1,1073741824):(fe=8,e))))))}function gP(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 hP(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(P(358,e))}}function na(e,t){var n=e.pendingLanes;if(n===0)return fe=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=fe=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=oi(l),o=fe):(a&=i,a!==0&&(r=oi(a),o=fe))}else i=n&~s,i!==0?(r=oi(i),o=fe):a!==0&&(r=oi(a),o=fe);if(r===0)return 0;if(r=31-Tr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(oi(t),o<=fe)return t;fe=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tr(t),o=1<<n,r|=e[n],t&=~o;return r}function y0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ii(24&~t),e===0?yu(10,t):e;case 10:return e=ii(192&~t),e===0?yu(8,t):e;case 8:return e=ii(3584&~t),e===0&&(e=ii(4186112&~t),e===0&&(e=512)),e;case 2:return t=ii(805306368&~t),t===0&&(t=268435456),t}throw Error(P(358,e))}function ii(e){return e&-e}function Kf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ju(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Tr(t),e[t]=n}var Tr=Math.clz32?Math.clz32:SP,yP=Math.log,vP=Math.LN2;function SP(e){return e===0?32:31-(yP(e)/vP|0)|0}var wP=Me.unstable_UserBlockingPriority,xP=Me.unstable_runWithPriority,ou=!0;function EP(e,t,n,r){uo||sm();var o=dm,i=uo;uo=!0;try{r0(o,e,t,n,r)}finally{(uo=i)||am()}}function CP(e,t,n,r){xP(wP,dm.bind(null,e,t,n,r))}function dm(e,t,n,r){if(ou){var o;if((o=(t&4)===0)&&0<gn.length&&-1<Kv.indexOf(e))e=Ep(null,e,t,n,r),gn.push(e);else{var i=fm(e,t,n,r);if(i===null)o&&$v(e,r);else{if(o){if(-1<Kv.indexOf(e)){e=Ep(i,e,t,n,r),gn.push(e);return}if(cP(i,e,t,n,r))return;$v(e,r)}I0(e,t,r,null,n)}}}}function fm(e,t,n,r){var o=om(r);if(o=co(o),o!==null){var i=wo(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=i0(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 I0(e,t,r,o,n),null}var pr=null,pm=null,iu=null;function v0(){if(iu)return iu;var e,t=pm,n=t.length,r,o="value"in pr?pr.value:pr.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 iu=o.slice(e,1<r?1-r:void 0)}function su(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 Gl(){return!0}function qv(){return!1}function wt(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)?Gl:qv,this.isPropagationStopped=qv,this}return ve(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=Gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),t}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mm=wt(ki),da=ve({},ki,{view:0,detail:0}),bP=wt(da),$f,Wf,ks,zu=ve({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,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!==ks&&(ks&&e.type==="mousemove"?($f=e.screenX-ks.screenX,Wf=e.screenY-ks.screenY):Wf=$f=0,ks=e),$f)},movementY:function(e){return"movementY"in e?e.movementY:Wf}}),Gv=wt(zu),TP=ve({},zu,{dataTransfer:0}),kP=wt(TP),PP=ve({},da,{relatedTarget:0}),qf=wt(PP),RP=ve({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),AP=wt(RP),IP=ve({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),LP=wt(IP),OP=ve({},ki,{data:0}),Yv=wt(OP),NP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MP={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"},_P={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_P[e])?!!t[e]:!1}function gm(){return DP}var FP=ve({},da,{key:function(e){if(e.key){var t=NP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?MP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(e){return e.type==="keypress"?su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),HP=wt(FP),UP=ve({},zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xv=wt(UP),jP=ve({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),zP=wt(jP),BP=ve({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),VP=wt(BP),KP=ve({},zu,{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}),$P=wt(KP),WP=[9,13,27,32],hm=Hn&&"CompositionEvent"in window,Vs=null;Hn&&"documentMode"in document&&(Vs=document.documentMode);var qP=Hn&&"TextEvent"in window&&!Vs,S0=Hn&&(!hm||Vs&&8<Vs&&11>=Vs),Qv=String.fromCharCode(32),Zv=!1;function w0(e,t){switch(e){case"keyup":return WP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function x0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function GP(e,t){switch(e){case"compositionend":return x0(t);case"keypress":return t.which!==32?null:(Zv=!0,Qv);case"textInput":return e=t.data,e===Qv&&Zv?null:e;default:return null}}function YP(e,t){if(ai)return e==="compositionend"||!hm&&w0(e,t)?(e=v0(),iu=pm=pr=null,ai=!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 S0&&t.locale!=="ko"?null:t.data;default:return null}}var XP={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 Jv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!XP[e.type]:t==="textarea"}function E0(e,t,n,r){t0(r),t=vu(t,"onChange"),0<t.length&&(n=new mm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ks=null,ra=null;function QP(e){P0(e,0)}function Bu(e){var t=ui(e);if(GS(t))return e}function ZP(e,t){if(e==="change")return t}var C0=!1;Hn&&(Hn?(Xl="oninput"in document,Xl||(Gf=document.createElement("div"),Gf.setAttribute("oninput","return;"),Xl=typeof Gf.oninput=="function"),Yl=Xl):Yl=!1,C0=Yl&&(!document.documentMode||9<document.documentMode));var Yl,Xl,Gf;function eS(){Ks&&(Ks.detachEvent("onpropertychange",b0),ra=Ks=null)}function b0(e){if(e.propertyName==="value"&&Bu(ra)){var t=[];if(E0(t,ra,e,om(e)),e=QP,uo)e(t);else{uo=!0;try{im(e,t)}finally{uo=!1,am()}}}}function JP(e,t,n){e==="focusin"?(eS(),Ks=t,ra=n,Ks.attachEvent("onpropertychange",b0)):e==="focusout"&&eS()}function eR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bu(ra)}function tR(e,t){if(e==="click")return Bu(t)}function nR(e,t){if(e==="input"||e==="change")return Bu(t)}function rR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:rR,oR=Object.prototype.hasOwnProperty;function oa(e,t){if(Mt(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(!oR.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function tS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nS(e,t){var n=tS(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=tS(n)}}function T0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?T0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rS(){for(var e=window,t=mu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mu(e.document)}return t}function Cp(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 iR=Hn&&"documentMode"in document&&11>=document.documentMode,li=null,bp=null,$s=null,Tp=!1;function oS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tp||li==null||li!==mu(r)||(r=li,"selectionStart"in r&&Cp(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}),$s&&oa($s,r)||($s=r,r=vu(bp,"onSelect"),0<r.length&&(t=new mm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=li)))}cm("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);cm("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);cm(pP,2);for(Yf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ql=0;Ql<Yf.length;Ql++)um.set(Yf[Ql],0);var Yf,Ql;Ei("onMouseEnter",["mouseout","mouseover"]);Ei("onMouseLeave",["mouseout","mouseover"]);Ei("onPointerEnter",["pointerout","pointerover"]);Ei("onPointerLeave",["pointerout","pointerover"]);vo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vo("onBeforeInput",["compositionend","keypress","textInput","paste"]);vo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),k0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function iS(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lP(r,t,void 0,e),e.currentTarget=null}function P0(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;iS(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;iS(o,a,u),i=l}}}if(hu)throw e=wp,hu=!1,wp=null,e}function me(e,t){var n=O0(t),r=e+"__bubble";n.has(r)||(A0(t,e,2,!1),n.add(r))}var sS="_reactListening"+Math.random().toString(36).slice(2);function R0(e){e[sS]||(e[sS]=!0,$S.forEach(function(t){k0.has(t)||aS(t,!1,e,null),aS(t,!0,e,null)}))}function aS(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&&k0.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=O0(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),A0(i,e,o,t),s.add(a))}function A0(e,t,n,r){var o=um.get(t);switch(o===void 0?2:o){case 0:o=EP;break;case 1:o=CP;break;default:o=dm}n=o.bind(null,t,n,e),o=void 0,!Sp||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 I0(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=co(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}oP(function(){var u=i,c=om(n),f=[];e:{var d=h0.get(e);if(d!==void 0){var p=mm,y=e;switch(e){case"keypress":if(su(n)===0)break e;case"keydown":case"keyup":p=HP;break;case"focusin":y="focus",p=qf;break;case"focusout":y="blur",p=qf;break;case"beforeblur":case"afterblur":p=qf;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":p=Gv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=kP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=zP;break;case f0:case p0:case m0:p=AP;break;case g0:p=VP;break;case"scroll":p=bP;break;case"wheel":p=$P;break;case"copy":case"cut":case"paste":p=LP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xv}var v=(t&4)!==0,g=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var h=u,S;h!==null;){S=h;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,m!==null&&(x=Js(h,m),x!=null&&v.push(ia(h,x,S)))),g)break;h=h.return}0<v.length&&(d=new p(d,y,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(co(y)||y[Pi]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?co(y):null,y!==null&&(g=wo(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(v=Gv,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=Xv,x="onPointerLeave",m="onPointerEnter",h="pointer"),g=p==null?d:ui(p),S=y==null?d:ui(y),d=new v(x,h+"leave",p,n,c),d.target=g,d.relatedTarget=S,x=null,co(c)===u&&(v=new v(m,h+"enter",y,n,c),v.target=S,v.relatedTarget=g,x=v),g=x,p&&y)t:{for(v=p,m=y,h=0,S=v;S;S=ri(S))h++;for(S=0,x=m;x;x=ri(x))S++;for(;0<h-S;)v=ri(v),h--;for(;0<S-h;)m=ri(m),S--;for(;h--;){if(v===m||m!==null&&v===m.alternate)break t;v=ri(v),m=ri(m)}v=null}else v=null;p!==null&&lS(f,d,p,v,!1),y!==null&&g!==null&&lS(f,g,y,v,!0)}}e:{if(d=u?ui(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var T=ZP;else if(Jv(d))if(C0)T=nR;else{T=eR;var C=JP}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=tR);if(T&&(T=T(e,u))){E0(f,T,n,c);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&dp(d,"number",d.value)}switch(C=u?ui(u):window,e){case"focusin":(Jv(C)||C.contentEditable==="true")&&(li=C,bp=u,$s=null);break;case"focusout":$s=bp=li=null;break;case"mousedown":Tp=!0;break;case"contextmenu":case"mouseup":case"dragend":Tp=!1,oS(f,n,c);break;case"selectionchange":if(iR)break;case"keydown":case"keyup":oS(f,n,c)}var k;if(hm)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else ai?w0(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(S0&&n.locale!=="ko"&&(ai||I!=="onCompositionStart"?I==="onCompositionEnd"&&ai&&(k=v0()):(pr=c,pm="value"in pr?pr.value:pr.textContent,ai=!0)),C=vu(u,I),0<C.length&&(I=new Yv(I,e,null,n,c),f.push({event:I,listeners:C}),k?I.data=k:(k=x0(n),k!==null&&(I.data=k)))),(k=qP?GP(e,n):YP(e,n))&&(u=vu(u,"onBeforeInput"),0<u.length&&(c=new Yv("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}P0(f,t)})}function ia(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Js(e,n),i!=null&&r.unshift(ia(e,i,o)),i=Js(e,t),i!=null&&r.push(ia(e,i,o))),e=e.return}return r}function ri(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lS(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=Js(n,i),l!=null&&s.unshift(ia(n,l,a))):o||(l=Js(n,i),l!=null&&s.push(ia(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Su(){}var Xf=null,Qf=null;function L0(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function kp(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 uS=typeof setTimeout=="function"?setTimeout:void 0,sR=typeof clearTimeout=="function"?clearTimeout:void 0;function ym(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function hi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function cS(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 Zf=0;function aR(e){return{$$typeof:nm,toString:e,valueOf:e}}var Vu=Math.random().toString(36).slice(2),mr="__reactFiber$"+Vu,wu="__reactProps$"+Vu,Pi="__reactContainer$"+Vu,dS="__reactEvents$"+Vu;function co(e){var t=e[mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pi]||n[mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cS(e);e!==null;){if(n=e[mr])return n;e=cS(e)}return t}e=n,n=e.parentNode}return null}function fa(e){return e=e[mr]||e[Pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Ku(e){return e[wu]||null}function O0(e){var t=e[dS];return t===void 0&&(t=e[dS]=new Set),t}var Pp=[],ci=-1;function Ar(e){return{current:e}}function ge(e){0>ci||(e.current=Pp[ci],Pp[ci]=null,ci--)}function Ce(e,t){ci++,Pp[ci]=e.current,e.current=t}var kr={},Ge=Ar(kr),pt=Ar(!1),go=kr;function Ci(e,t){var n=e.type.contextTypes;if(!n)return kr;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 mt(e){return e=e.childContextTypes,e!=null}function xu(){ge(pt),ge(Ge)}function fS(e,t,n){if(Ge.current!==kr)throw Error(P(168));Ce(Ge,t),Ce(pt,n)}function N0(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(P(108,fi(t)||"Unknown",o));return ve({},n,r)}function au(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,go=Ge.current,Ce(Ge,e),Ce(pt,pt.current),!0}function pS(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=N0(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(Ge),Ce(Ge,e)):ge(pt),Ce(pt,n)}var vm=null,mo=null,lR=Me.unstable_runWithPriority,Sm=Me.unstable_scheduleCallback,Rp=Me.unstable_cancelCallback,uR=Me.unstable_shouldYield,mS=Me.unstable_requestPaint,Ap=Me.unstable_now,cR=Me.unstable_getCurrentPriorityLevel,$u=Me.unstable_ImmediatePriority,M0=Me.unstable_UserBlockingPriority,_0=Me.unstable_NormalPriority,D0=Me.unstable_LowPriority,F0=Me.unstable_IdlePriority,Jf={},dR=mS!==void 0?mS:function(){},Nn=null,lu=null,ep=!1,gS=Ap(),We=1e4>gS?Ap:function(){return Ap()-gS};function bi(){switch(cR()){case $u:return 99;case M0:return 98;case _0:return 97;case D0:return 96;case F0:return 95;default:throw Error(P(332))}}function H0(e){switch(e){case 99:return $u;case 98:return M0;case 97:return _0;case 96:return D0;case 95:return F0;default:throw Error(P(332))}}function ho(e,t){return e=H0(e),lR(e,t)}function sa(e,t,n){return e=H0(e),Sm(e,t,n)}function wn(){if(lu!==null){var e=lu;lu=null,Rp(e)}U0()}function U0(){if(!ep&&Nn!==null){ep=!0;var e=0;try{var t=Nn;ho(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Nn=null}catch(n){throw Nn!==null&&(Nn=Nn.slice(e+1)),Sm($u,wn),n}finally{ep=!1}}}var fR=So.ReactCurrentBatchConfig;function Xt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Eu=Ar(null),Cu=null,di=null,bu=null;function wm(){bu=di=Cu=null}function xm(e){var t=Eu.current;ge(Eu),e.type._context._currentValue=t}function j0(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 yi(e,t){Cu=e,bu=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qt=!0),e.firstContext=null)}function Ft(e,t){if(bu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(bu=e,t=1073741823),t={context:e,observedBits:t,next:null},di===null){if(Cu===null)throw Error(P(308));di=t,Cu.dependencies={lanes:0,firstContext:t,responders:null}}else di=di.next=t;return e._currentValue}var dr=!1;function Em(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function z0(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 Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wr(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 hS(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 aa(e,t,n,r){var o=e.updateQueue;dr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var p=e,y=i;switch(a=t,d=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(d,f,a);break e}f=p;break e;case 3:p.flags=p.flags&-4097|64;case 0:if(p=y.payload,a=typeof p=="function"?p.call(d,f,a):p,a==null)break e;f=ve({},f,a);break e;case 2:dr=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,ma|=s,e.lanes=s,e.memoizedState=f}}function yS(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(P(191,o));o.call(r)}}}var B0=new Du.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wu={isMounted:function(e){return(e=e._reactInternals)?wo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=St(),r=xr(e),o=Sr(n,r);o.tag=2,t!=null&&(o.callback=t),wr(e,o),Er(e,r,n)}};function vS(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?!oa(n,r)||!oa(o,i):!0}function V0(e,t,n){var r=!1,o=kr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(o=mt(t)?go:Ge.current,r=t.contextTypes,i=(r=r!=null)?Ci(e,o):kr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function SS(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&&Wu.enqueueReplaceState(t,t.state,null)}function Ip(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=B0,Em(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ft(i):(i=mt(t)?go:Ge.current,o.context=Ci(e,i)),aa(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Tu(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&&Wu.enqueueReplaceState(o,o.state,null),aa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Zl=Array.isArray;function Ps(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(P(309));var r=n.stateNode}if(!r)throw Error(P(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===B0&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function Jl(e,t){if(e.type!=="textarea")throw Error(P(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function K0(e){function t(g,m){if(e){var h=g.lastEffect;h!==null?(h.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,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<m?(g.flags=2,m):h):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,h,S){return m===null||m.tag!==6?(m=ip(h,g.mode,S),m.return=g,m):(m=o(m,h),m.return=g,m)}function l(g,m,h,S){return m!==null&&m.elementType===h.type?(S=o(m,h.props),S.ref=Ps(g,m,h),S.return=g,S):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,S)}function u(g,m,h,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=sp(h,g.mode,S),m.return=g,m):(m=o(m,h.children||[]),m.return=g,m)}function c(g,m,h,S,x){return m===null||m.tag!==7?(m=xi(h,g.mode,S,x),m.return=g,m):(m=o(m,h),m.return=g,m)}function f(g,m,h){if(typeof m=="string"||typeof m=="number")return m=ip(""+m,g.mode,h),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ms:return h=fu(m.type,m.key,m.props,null,g.mode,h),h.ref=Ps(g,null,m),h.return=g,h;case lo:return m=sp(m,g.mode,h),m.return=g,m}if(Zl(m)||Es(m))return m=xi(m,g.mode,h,null),m.return=g,m;Jl(g,m)}return null}function d(g,m,h,S){var x=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return x!==null?null:a(g,m,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ms:return h.key===x?h.type===fr?c(g,m,h.props.children,S,x):l(g,m,h,S):null;case lo:return h.key===x?u(g,m,h,S):null}if(Zl(h)||Es(h))return x!==null?null:c(g,m,h,S,null);Jl(g,h)}return null}function p(g,m,h,S,x){if(typeof S=="string"||typeof S=="number")return g=g.get(h)||null,a(m,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ms:return g=g.get(S.key===null?h:S.key)||null,S.type===fr?c(m,g,S.props.children,x,S.key):l(m,g,S,x);case lo:return g=g.get(S.key===null?h:S.key)||null,u(m,g,S,x)}if(Zl(S)||Es(S))return g=g.get(h)||null,c(m,g,S,x,null);Jl(m,S)}return null}function y(g,m,h,S){for(var x=null,T=null,C=m,k=m=0,I=null;C!==null&&k<h.length;k++){C.index>k?(I=C,C=null):I=C.sibling;var L=d(g,C,h[k],S);if(L===null){C===null&&(C=I);break}e&&C&&L.alternate===null&&t(g,C),m=i(L,m,k),T===null?x=L:T.sibling=L,T=L,C=I}if(k===h.length)return n(g,C),x;if(C===null){for(;k<h.length;k++)C=f(g,h[k],S),C!==null&&(m=i(C,m,k),T===null?x=C:T.sibling=C,T=C);return x}for(C=r(g,C);k<h.length;k++)I=p(C,g,k,h[k],S),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?k:I.key),m=i(I,m,k),T===null?x=I:T.sibling=I,T=I);return e&&C.forEach(function(N){return t(g,N)}),x}function v(g,m,h,S){var x=Es(h);if(typeof x!="function")throw Error(P(150));if(h=x.call(h),h==null)throw Error(P(151));for(var T=x=null,C=m,k=m=0,I=null,L=h.next();C!==null&&!L.done;k++,L=h.next()){C.index>k?(I=C,C=null):I=C.sibling;var N=d(g,C,L.value,S);if(N===null){C===null&&(C=I);break}e&&C&&N.alternate===null&&t(g,C),m=i(N,m,k),T===null?x=N:T.sibling=N,T=N,C=I}if(L.done)return n(g,C),x;if(C===null){for(;!L.done;k++,L=h.next())L=f(g,L.value,S),L!==null&&(m=i(L,m,k),T===null?x=L:T.sibling=L,T=L);return x}for(C=r(g,C);!L.done;k++,L=h.next())L=p(C,g,k,L.value,S),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?k:L.key),m=i(L,m,k),T===null?x=L:T.sibling=L,T=L);return e&&C.forEach(function(z){return t(g,z)}),x}return function(g,m,h,S){var x=typeof h=="object"&&h!==null&&h.type===fr&&h.key===null;x&&(h=h.props.children);var T=typeof h=="object"&&h!==null;if(T)switch(h.$$typeof){case Ms:e:{for(T=h.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(h.type===fr){n(g,x.sibling),m=o(x,h.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===h.type){n(g,x.sibling),m=o(x,h.props),m.ref=Ps(g,x,h),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}h.type===fr?(m=xi(h.props.children,g.mode,S,h.key),m.return=g,g=m):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,g=S)}return s(g);case lo:e:{for(x=h.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=o(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=sp(h,g.mode,S),m.return=g,g=m}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,h),m.return=g,g=m):(n(g,m),m=ip(h,g.mode,S),m.return=g,g=m),s(g);if(Zl(h))return y(g,m,h,S);if(Es(h))return v(g,m,h,S);if(T&&Jl(g,h),typeof h>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(P(152,fi(g.type)||"Component"))}return n(g,m)}}var ku=K0(!0),$0=K0(!1),pa={},vn=Ar(pa),la=Ar(pa),ua=Ar(pa);function fo(e){if(e===pa)throw Error(P(174));return e}function Lp(e,t){switch(Ce(ua,t),Ce(la,e),Ce(vn,pa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}ge(vn),Ce(vn,t)}function Ti(){ge(vn),ge(la),ge(ua)}function wS(e){fo(ua.current);var t=fo(vn.current),n=gp(t,e.type);t!==n&&(Ce(la,e),Ce(vn,n))}function Cm(e){la.current===e&&(ge(vn),ge(la))}var Ee=Ar(0);function Pu(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 _n=null,gr=null,Sn=!1;function W0(e,t){var n=_t(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 xS(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 Op(e){if(Sn){var t=gr;if(t){var n=t;if(!xS(e,t)){if(t=hi(n.nextSibling),!t||!xS(e,t)){e.flags=e.flags&-1025|2,Sn=!1,_n=e;return}W0(_n,n)}_n=e,gr=hi(t.firstChild)}else e.flags=e.flags&-1025|2,Sn=!1,_n=e}}function ES(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function eu(e){if(e!==_n)return!1;if(!Sn)return ES(e),Sn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!kp(t,e.memoizedProps))for(t=gr;t;)W0(e,t),t=hi(t.nextSibling);if(ES(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gr=hi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gr=null}}else gr=_n?hi(e.stateNode.nextSibling):null;return!0}function tp(){gr=_n=null,Sn=!1}var vi=[];function bm(){for(var e=0;e<vi.length;e++)vi[e]._workInProgressVersionPrimary=null;vi.length=0}var Ws=So.ReactCurrentDispatcher,Dt=So.ReactCurrentBatchConfig,ca=0,Te=null,$e=null,De=null,Ru=!1,qs=!1;function dt(){throw Error(P(321))}function Tm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function km(e,t,n,r,o,i){if(ca=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ws.current=e===null||e.memoizedState===null?mR:gR,e=n(r,o),qs){i=0;do{if(qs=!1,!(25>i))throw Error(P(301));i+=1,De=$e=null,t.updateQueue=null,Ws.current=hR,e=n(r,o)}while(qs)}if(Ws.current=Ou,t=$e!==null&&$e.next!==null,ca=0,De=$e=Te=null,Ru=!1,t)throw Error(P(300));return e}function po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Te.memoizedState=De=e:De=De.next=e,De}function xo(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=De===null?Te.memoizedState:De.next;if(t!==null)De=t,$e=e;else{if(e===null)throw Error(P(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},De===null?Te.memoizedState=De=e:De=De.next=e}return De}function hn(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=$e,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((ca&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,Te.lanes|=u,ma|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Qt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function As(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(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);Mt(i,t.memoizedState)||(Qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function CS(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=(ca&e)===e)&&(t._workInProgressVersionPrimary=r,vi.push(t))),e)return n(t._source);throw vi.push(t),Error(P(350))}function q0(e,t,n,r){var o=et;if(o===null)throw Error(P(349));var i=t._getVersion,s=i(t._source),a=Ws.current,l=a.useState(function(){return CS(o,t,n)}),u=l[1],c=l[0];l=De;var f=e.memoizedState,d=f.refs,p=d.getSnapshot,y=f.source;f=f.subscribe;var v=Te;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Mt(s,g)){g=n(t._source),Mt(c,g)||(u(g),g=xr(v),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,h=g;0<h;){var S=31-Tr(h),x=1<<S;m[S]|=g,h&=~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 h=xr(v);o.mutableReadLanes|=h&o.pendingLanes}catch(S){m(function(){throw S})}})},[t,r]),Mt(p,n)&&Mt(y,t)&&Mt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:c},e.dispatch=u=Am.bind(null,Te,e),l.queue=e,l.baseQueue=null,c=CS(o,t,n),l.memoizedState=l.baseState=c),c}function G0(e,t,n){var r=xo();return q0(r,e,t,n)}function Is(e){var t=po();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},e=e.dispatch=Am.bind(null,Te,e),[t.memoizedState,e]}function Au(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null},Te.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 bS(e){var t=po();return e={current:e},t.memoizedState=e}function Iu(){return xo().memoizedState}function Np(e,t,n,r){var o=po();Te.flags|=e,o.memoizedState=Au(1|t,n,void 0,r===void 0?null:r)}function Pm(e,t,n,r){var o=xo();r=r===void 0?null:r;var i=void 0;if($e!==null){var s=$e.memoizedState;if(i=s.destroy,r!==null&&Tm(r,s.deps)){Au(t,n,i,r);return}}Te.flags|=e,o.memoizedState=Au(1|t,n,i,r)}function TS(e,t){return Np(516,4,e,t)}function Lu(e,t){return Pm(516,4,e,t)}function Y0(e,t){return Pm(4,2,e,t)}function X0(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 Q0(e,t,n){return n=n!=null?n.concat([e]):null,Pm(4,2,X0.bind(null,t,e),n)}function Rm(){}function Z0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function J0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function pR(e,t){var n=bi();ho(98>n?98:n,function(){e(!0)}),ho(97<n?97:n,function(){var r=Dt.transition;Dt.transition=1;try{e(!1),t()}finally{Dt.transition=r}})}function Am(e,t,n){var r=St(),o=xr(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===Te||s!==null&&s===Te)qs=Ru=!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,Mt(l,a))return}catch{}finally{}Er(e,o,r)}}var Ou={readContext:Ft,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useOpaqueIdentifier:dt,unstable_isNewReconciler:!1},mR={readContext:Ft,useCallback:function(e,t){return po().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:TS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Np(4,2,X0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Np(4,2,e,t)},useMemo:function(e,t){var n=po();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=po();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=Am.bind(null,Te,e),[r.memoizedState,e]},useRef:bS,useState:Is,useDebugValue:Rm,useDeferredValue:function(e){var t=Is(e),n=t[0],r=t[1];return TS(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Is(!1),t=e[0];return e=pR.bind(null,e[1]),bS(e),[e,t]},useMutableSource:function(e,t,n){var r=po();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},q0(r,e,t,n)},useOpaqueIdentifier:function(){if(Sn){var e=!1,t=aR(function(){throw e||(e=!0,n("r:"+(Zf++).toString(36))),Error(P(355))}),n=Is(t)[1];return!(Te.mode&2)&&(Te.flags|=516,Au(5,function(){n("r:"+(Zf++).toString(36))},void 0,null)),t}return t="r:"+(Zf++).toString(36),Is(t),t},unstable_isNewReconciler:!1},gR={readContext:Ft,useCallback:Z0,useContext:Ft,useEffect:Lu,useImperativeHandle:Q0,useLayoutEffect:Y0,useMemo:J0,useReducer:Rs,useRef:Iu,useState:function(){return Rs(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=Rs(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Rs(hn)[0];return[Iu().current,e]},useMutableSource:G0,useOpaqueIdentifier:function(){return Rs(hn)[0]},unstable_isNewReconciler:!1},hR={readContext:Ft,useCallback:Z0,useContext:Ft,useEffect:Lu,useImperativeHandle:Q0,useLayoutEffect:Y0,useMemo:J0,useReducer:As,useRef:Iu,useState:function(){return As(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=As(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=As(hn)[0];return[Iu().current,e]},useMutableSource:G0,useOpaqueIdentifier:function(){return As(hn)[0]},unstable_isNewReconciler:!1},yR=So.ReactCurrentOwner,Qt=!1;function ft(e,t,n,r){t.child=e===null?$0(t,null,n,r):ku(t,e.child,n,r)}function kS(e,t,n,r,o){n=n.render;var i=t.ref;return yi(t,o),r=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,r,o),t.child)}function PS(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!_m(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,ew(e,t,s,r,o,i)):(e=fu(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:oa,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 ew(e,t,n,r,o,i){if(e!==null&&oa(e.memoizedProps,r)&&e.ref===t.ref)if(Qt=!1,(i&o)!==0)e.flags&16384&&(Qt=!0);else return t.lanes=e.lanes,Dn(e,t,i);return Mp(e,t,n,r,i)}function np(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},nu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},nu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},nu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,nu(t,r);return ft(e,t,o,n),t.child}function tw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Mp(e,t,n,r,o){var i=mt(n)?go:Ge.current;return i=Ci(t,i),yi(t,o),n=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,n,o),t.child)}function RS(e,t,n,r,o){if(mt(n)){var i=!0;au(t)}else i=!1;if(yi(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),V0(t,n,r),Ip(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=Ft(u):(u=mt(n)?go:Ge.current,u=Ci(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&SS(t,s,r,u),dr=!1;var d=t.memoizedState;s.state=d,aa(t,r,s,o),l=t.memoizedState,a!==r||d!==l||pt.current||dr?(typeof c=="function"&&(Tu(t,n,c,r),l=t.memoizedState),(a=dr||vS(t,n,a,r,d,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,z0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Xt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=mt(n)?go:Ge.current,l=Ci(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&SS(t,s,r,l),dr=!1,d=t.memoizedState,s.state=d,aa(t,r,s,o);var y=t.memoizedState;a!==f||d!==y||pt.current||dr?(typeof p=="function"&&(Tu(t,n,p,r),y=t.memoizedState),(u=dr||vS(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 _p(e,t,n,r,i,o)}function _p(e,t,n,r,o,i){tw(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&pS(t,n,!1),Dn(e,t,i);r=t.stateNode,yR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ku(t,e.child,null,i),t.child=ku(t,null,a,i)):ft(e,t,a,i),t.memoizedState=r.state,o&&pS(t,n,!0),t.child}function AS(e){var t=e.stateNode;t.pendingContext?fS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fS(e,t.context,!1),Lp(e,t.containerInfo)}var tu={dehydrated:null,retryLane:0};function IS(e,t,n){var r=t.pendingProps,o=Ee.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),Ce(Ee,o&1),e===null?(r.fallback!==void 0&&Op(t),e=r.children,o=r.fallback,i?(e=LS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,e):typeof r.unstable_expectedLoadTime=="number"?(e=LS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,t.lanes=33554432,e):(n=Dm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=NS(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=tu,r):(n=OS(e,t,r.children,n),t.memoizedState=null,n):i?(r=NS(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=tu,r):(n=OS(e,t,r.children,n),t.memoizedState=null,n)}function LS(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=Dm(t,o,0,null),n=xi(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function OS(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 NS(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=xi(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function MS(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),j0(e.return,t)}function rp(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 _S(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ft(e,t,r.children,n),r=Ee.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&&MS(e,n);else if(e.tag===19)MS(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(Ce(Ee,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&&Pu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rp(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&&Pu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rp(t,!0,n,null,i,t.lastEffect);break;case"together":rp(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),ma|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(P(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 nw,Dp,rw,ow;nw=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}};Dp=function(){};rw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,fo(vn.current);var i=null;switch(n){case"input":o=up(e,o),r=up(e,r),i=[];break;case"option":o=fp(e,o),r=fp(e,r),i=[];break;case"select":o=ve({},o,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":o=pp(e,o),r=pp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}hp(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"&&(Qs.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"&&(Qs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===nm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};ow=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ls(e,t){if(!Sn)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 vR(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 mt(t.type)&&xu(),null;case 3:return Ti(),ge(pt),ge(Ge),bm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(eu(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Dp(t),null;case 5:Cm(t);var o=fo(ua.current);if(n=t.type,e!==null&&t.stateNode!=null)rw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(P(166));return null}if(e=fo(vn.current),eu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[mr]=t,r[wu]=i,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(e=0;e<Ds.length;e++)me(Ds[e],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Fv(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":Uv(r,i),me("invalid",r)}hp(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]):Qs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r));switch(n){case"input":$l(r),Hv(r,i,!0);break;case"textarea":$l(r),jv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Su)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===mp.html&&(e=QS(n)),e===mp.html?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[mr]=t,e[wu]=r,nw(e,t,!1,!1),t.stateNode=e,s=yp(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ds.length;o++)me(Ds[o],e);o=r;break;case"source":me("error",e),o=r;break;case"img":case"image":case"link":me("error",e),me("load",e),o=r;break;case"details":me("toggle",e),o=r;break;case"input":Fv(e,r),o=up(e,r),me("invalid",e);break;case"option":o=fp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ve({},r,{value:void 0}),me("invalid",e);break;case"textarea":Uv(e,r),o=pp(e,r),me("invalid",e);break;default:o=r}hp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?e0(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ZS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Zs(e,l):typeof l=="number"&&Zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&Xp(e,i,l,s))}switch(n){case"input":$l(e),Hv(e,r,!1);break;case"textarea":$l(e),jv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+br(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?pi(e,!!r.multiple,i,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Su)}L0(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ow(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));n=fo(ua.current),fo(vn.current),eu(t)?(r=t.stateNode,n=t.memoizedProps,r[mr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mr]=t,t.stateNode=r)}return null;case 13:return ge(Ee),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&eu(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Ee.current&1?Fe===0&&(Fe=3):((Fe===0||Fe===3)&&(Fe=4),et===null||!(ma&134217727)&&!(Ai&134217727)||Si(et,qe))),(r||n)&&(t.flags|=4),null);case 4:return Ti(),Dp(t),e===null&&R0(t.stateNode.containerInfo),null;case 10:return xm(t),null;case 17:return mt(t.type)&&xu(),null;case 19:if(ge(Ee),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Ls(r,!1);else{if(Fe!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Pu(e),s!==null){for(t.flags|=64,Ls(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ce(Ee,Ee.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>Bp&&(t.flags|=64,i=!0,Ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=Pu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Sn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>Bp&&n!==1073741824&&(t.flags|=64,i=!0,Ls(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=We(),n.sibling=null,t=Ee.current,Ce(Ee,i?t&1|2:t&1),n):null;case 23:case 24:return Mm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(P(156,t.tag))}function SR(e){switch(e.tag){case 1:mt(e.type)&&xu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ti(),ge(pt),ge(Ge),bm(),t=e.flags,t&64)throw Error(P(285));return e.flags=t&-4097|64,e;case 5:return Cm(e),null;case 13:return ge(Ee),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ge(Ee),null;case 4:return Ti(),null;case 10:return xm(e),null;case 23:case 24:return Mm(),null;default:return null}}function Im(e,t){try{var n="",r=t;do n+=Jk(r),r=r.return;while(r);var o=n}catch(i){o=`
6
6
  Error generating stack: `+i.message+`
7
- `+i.stack}return{value:e,source:t,stack:o}}function Fp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var SR=typeof WeakMap=="function"?WeakMap:Map;function ow(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mu||(Mu=!0,Vp=r),Fp(e,t)},n}function iw(e,t,n){n=Sr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Fp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this),Fp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var wR=typeof WeakSet=="function"?WeakSet:Set;function _S(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Cr(e,n)}else t.current=null}function xR(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:Xt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&ym(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(P(163))}function ER(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&&(mw(n,e),IR(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:Xt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&hS(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}hS(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&I0(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&&u0(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(P(163))}function DS(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=ZS("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 FS(e,t){if(mo&&typeof mo.onCommitFiberUnmount=="function")try{mo.onCommitFiberUnmount(vm,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)mw(t,n);else{r=t;try{o()}catch(i){Cr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(_S(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Cr(t,i)}break;case 5:_S(t);break;case 4:sw(e,t)}}function HS(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 US(e){return e.tag===5||e.tag===3||e.tag===4}function jS(e){e:{for(var t=e.return;t!==null;){if(US(t))break e;t=t.return}throw Error(P(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(P(161))}n.flags&16&&(Zs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||US(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?Hp(e,n,t):Up(e,n,t)}function Hp(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Hp(e,t,n),e=e.sibling;e!==null;)Hp(e,t,n),e=e.sibling}function Up(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(Up(e,t,n),e=e.sibling;e!==null;)Up(e,t,n),e=e.sibling}function sw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(P(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(FS(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(FS(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 op(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[wu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&GS(n,r),yp(e,o),t=yp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?JS(n,a):s==="dangerouslySetInnerHTML"?QS(n,a):s==="children"?Zs(n,a):Xp(n,s,a,t)}switch(e){case"input":cp(n,r);break;case"textarea":YS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?pi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?pi(n,!!r.multiple,r.defaultValue,!0):pi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(P(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,u0(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Nm=We(),DS(t.child,!0)),zS(t);return;case 19:zS(t);return;case 17:return;case 23:case 24:DS(t,t.memoizedState!==null);return}throw Error(P(163))}function zS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wR),t.forEach(function(r){var o=NR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function CR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var bR=Math.ceil,Nu=So.ReactCurrentDispatcher,Lm=So.ReactCurrentOwner,B=0,et=null,Re=null,qe=0,yo=0,jp=Ar(0),Fe=0,qu=null,Ri=0,ma=0,Ai=0,Om=0,zp=null,Nm=0,Bp=1/0;function Ii(){Bp=We()+500}var M=null,Mu=!1,Vp=null,yn=null,Pr=!1,Gs=null,Fs=90,Kp=[],$p=[],Fn=null,Ys=0,Wp=null,uu=-1,Mn=0,cu=0,Xs=null,du=!1;function St(){return B&48?We():uu!==-1?uu:uu=We()}function xr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return bi()===99?1:2;if(Mn===0&&(Mn=Ri),dR.transition!==0){cu!==0&&(cu=zp!==null?zp.pendingLanes:0),e=Mn;var t=4186112&~cu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=bi(),B&4&&e===98?e=yu(12,Mn):(e=mP(e),e=yu(e,Mn)),e}function Er(e,t,n){if(50<Ys)throw Ys=0,Wp=null,Error(P(185));if(e=Gu(e,t),e===null)return null;ju(e,t,n),e===et&&(Ai|=t,Fe===4&&Si(e,qe));var r=bi();t===1?B&8&&!(B&48)?qp(e):(Ht(e,n),B===0&&(Ii(),wn())):(!(B&4)||r!==98&&r!==99||(Fn===null?Fn=new Set([e]):Fn.add(e)),Ht(e,n)),zp=e}function Gu(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 Ht(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Tr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,oi(l);var c=fe;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=na(e,e===et?qe:0),t=fe,r===0)n!==null&&(n!==Jf&&Rp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Jf&&Rp(n)}t===15?(n=qp.bind(null,e),Nn===null?(Nn=[n],lu=Sm($u,H0)):Nn.push(n),n=Jf):t===14?n=sa(99,qp.bind(null,e)):(n=gP(t),n=sa(n,aw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function aw(e){if(uu=-1,cu=Mn=0,B&48)throw Error(P(327));var t=e.callbackNode;if(Ir()&&e.callbackNode!==t)return null;var n=na(e,e===et?qe:0);if(n===0)return null;var r=n,o=B;B|=16;var i=dw();(et!==e||qe!==r)&&(Ii(),wi(e,r));do try{PR();break}catch(a){cw(e,a)}while(1);if(wm(),Nu.current=i,B=o,Re!==null?r=0:(et=null,qe=0,r=Fe),Ri&Ai)wi(e,0);else if(r!==0){if(r===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),n=h0(e),n!==0&&(r=Hs(e,n))),r===1)throw t=qu,wi(e,0),Si(e,n),Ht(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(P(345));case 2:ao(e);break;case 3:if(Si(e,n),(n&62914560)===n&&(r=Nm+500-We(),10<r)){if(na(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){St(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=lS(ao.bind(null,e),r);break}ao(e);break;case 4:if(Si(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Tr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*bR(n/1960))-n,10<n){e.timeoutHandle=lS(ao.bind(null,e),n);break}ao(e);break;case 5:ao(e);break;default:throw Error(P(329))}}return Ht(e,We()),e.callbackNode===t?aw.bind(null,e):null}function Si(e,t){for(t&=~Om,t&=~Ai,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tr(t),r=1<<n;e[n]=-1,t&=~r}}function qp(e){if(B&48)throw Error(P(327));if(Ir(),e===et&&e.expiredLanes&qe){var t=qe,n=Hs(e,t);Ri&Ai&&(t=na(e,t),n=Hs(e,t))}else t=na(e,0),n=Hs(e,t);if(e.tag!==0&&n===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),t=h0(e),t!==0&&(n=Hs(e,t))),n===1)throw n=qu,wi(e,0),Si(e,t),Ht(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ao(e),Ht(e,We()),null}function TR(){if(Fn!==null){var e=Fn;Fn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ht(t,We())})}wn()}function lw(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function uw(e,t){var n=B;B&=-2,B|=8;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function nu(e,t){Ce(jp,yo),yo|=t,Ri|=t}function Mm(){yo=jp.current,ge(jp)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,iR(n)),Re!==null)for(n=Re.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&xu();break;case 3:Ti(),ge(pt),ge(Ge),bm();break;case 5:Cm(r);break;case 4:Ti();break;case 13:ge(Ee);break;case 19:ge(Ee);break;case 10:xm(r);break;case 23:case 24:Mm()}n=n.return}et=e,Re=Rr(e.current,null),qe=yo=Ri=t,Fe=0,qu=null,Om=Ai=ma=0}function cw(e,t){do{var n=Re;try{if(wm(),Ws.current=Ou,Ru){for(var r=Te.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ru=!1}if(ca=0,De=$e=Te=null,qs=!1,Lm.current=null,n===null||n.return===null){Fe=1,qu=t,Re=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=qe,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var f=(Ee.current&1)!==0,d=s;do{var p;if(p=d.tag===13){var y=d.memoizedState;if(y!==null)p=y.dehydrated!==null;else{var v=d.memoizedProps;p=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!f}}if(p){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 h=Sr(-1,1);h.tag=2,wr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new SR,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var x=OR.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((fi(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
7
+ `+i.stack}return{value:e,source:t,stack:o}}function Fp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wR=typeof WeakMap=="function"?WeakMap:Map;function iw(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mu||(Mu=!0,Vp=r),Fp(e,t)},n}function sw(e,t,n){n=Sr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Fp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this),Fp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var xR=typeof WeakSet=="function"?WeakSet:Set;function DS(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Cr(e,n)}else t.current=null}function ER(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:Xt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&ym(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(P(163))}function CR(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&&(gw(n,e),LR(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:Xt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&yS(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}yS(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&L0(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&&c0(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(P(163))}function FS(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=JS("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 HS(e,t){if(mo&&typeof mo.onCommitFiberUnmount=="function")try{mo.onCommitFiberUnmount(vm,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)gw(t,n);else{r=t;try{o()}catch(i){Cr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(DS(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Cr(t,i)}break;case 5:DS(t);break;case 4:aw(e,t)}}function US(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 jS(e){return e.tag===5||e.tag===3||e.tag===4}function zS(e){e:{for(var t=e.return;t!==null;){if(jS(t))break e;t=t.return}throw Error(P(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(P(161))}n.flags&16&&(Zs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||jS(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?Hp(e,n,t):Up(e,n,t)}function Hp(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Hp(e,t,n),e=e.sibling;e!==null;)Hp(e,t,n),e=e.sibling}function Up(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(Up(e,t,n),e=e.sibling;e!==null;)Up(e,t,n),e=e.sibling}function aw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(P(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(HS(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(HS(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 op(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[wu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&YS(n,r),yp(e,o),t=yp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?e0(n,a):s==="dangerouslySetInnerHTML"?ZS(n,a):s==="children"?Zs(n,a):Xp(n,s,a,t)}switch(e){case"input":cp(n,r);break;case"textarea":XS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?pi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?pi(n,!!r.multiple,r.defaultValue,!0):pi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(P(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,c0(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Nm=We(),FS(t.child,!0)),BS(t);return;case 19:BS(t);return;case 17:return;case 23:case 24:FS(t,t.memoizedState!==null);return}throw Error(P(163))}function BS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xR),t.forEach(function(r){var o=MR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var TR=Math.ceil,Nu=So.ReactCurrentDispatcher,Lm=So.ReactCurrentOwner,B=0,et=null,Re=null,qe=0,yo=0,jp=Ar(0),Fe=0,qu=null,Ri=0,ma=0,Ai=0,Om=0,zp=null,Nm=0,Bp=1/0;function Ii(){Bp=We()+500}var M=null,Mu=!1,Vp=null,yn=null,Pr=!1,Gs=null,Fs=90,Kp=[],$p=[],Fn=null,Ys=0,Wp=null,uu=-1,Mn=0,cu=0,Xs=null,du=!1;function St(){return B&48?We():uu!==-1?uu:uu=We()}function xr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return bi()===99?1:2;if(Mn===0&&(Mn=Ri),fR.transition!==0){cu!==0&&(cu=zp!==null?zp.pendingLanes:0),e=Mn;var t=4186112&~cu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=bi(),B&4&&e===98?e=yu(12,Mn):(e=gP(e),e=yu(e,Mn)),e}function Er(e,t,n){if(50<Ys)throw Ys=0,Wp=null,Error(P(185));if(e=Gu(e,t),e===null)return null;ju(e,t,n),e===et&&(Ai|=t,Fe===4&&Si(e,qe));var r=bi();t===1?B&8&&!(B&48)?qp(e):(Ht(e,n),B===0&&(Ii(),wn())):(!(B&4)||r!==98&&r!==99||(Fn===null?Fn=new Set([e]):Fn.add(e)),Ht(e,n)),zp=e}function Gu(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 Ht(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Tr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,oi(l);var c=fe;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=na(e,e===et?qe:0),t=fe,r===0)n!==null&&(n!==Jf&&Rp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Jf&&Rp(n)}t===15?(n=qp.bind(null,e),Nn===null?(Nn=[n],lu=Sm($u,U0)):Nn.push(n),n=Jf):t===14?n=sa(99,qp.bind(null,e)):(n=hP(t),n=sa(n,lw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function lw(e){if(uu=-1,cu=Mn=0,B&48)throw Error(P(327));var t=e.callbackNode;if(Ir()&&e.callbackNode!==t)return null;var n=na(e,e===et?qe:0);if(n===0)return null;var r=n,o=B;B|=16;var i=fw();(et!==e||qe!==r)&&(Ii(),wi(e,r));do try{RR();break}catch(a){dw(e,a)}while(1);if(wm(),Nu.current=i,B=o,Re!==null?r=0:(et=null,qe=0,r=Fe),Ri&Ai)wi(e,0);else if(r!==0){if(r===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),n=y0(e),n!==0&&(r=Hs(e,n))),r===1)throw t=qu,wi(e,0),Si(e,n),Ht(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(P(345));case 2:ao(e);break;case 3:if(Si(e,n),(n&62914560)===n&&(r=Nm+500-We(),10<r)){if(na(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){St(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=uS(ao.bind(null,e),r);break}ao(e);break;case 4:if(Si(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Tr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*TR(n/1960))-n,10<n){e.timeoutHandle=uS(ao.bind(null,e),n);break}ao(e);break;case 5:ao(e);break;default:throw Error(P(329))}}return Ht(e,We()),e.callbackNode===t?lw.bind(null,e):null}function Si(e,t){for(t&=~Om,t&=~Ai,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tr(t),r=1<<n;e[n]=-1,t&=~r}}function qp(e){if(B&48)throw Error(P(327));if(Ir(),e===et&&e.expiredLanes&qe){var t=qe,n=Hs(e,t);Ri&Ai&&(t=na(e,t),n=Hs(e,t))}else t=na(e,0),n=Hs(e,t);if(e.tag!==0&&n===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),t=y0(e),t!==0&&(n=Hs(e,t))),n===1)throw n=qu,wi(e,0),Si(e,t),Ht(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ao(e),Ht(e,We()),null}function kR(){if(Fn!==null){var e=Fn;Fn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ht(t,We())})}wn()}function uw(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function cw(e,t){var n=B;B&=-2,B|=8;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function nu(e,t){Ce(jp,yo),yo|=t,Ri|=t}function Mm(){yo=jp.current,ge(jp)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,sR(n)),Re!==null)for(n=Re.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&xu();break;case 3:Ti(),ge(pt),ge(Ge),bm();break;case 5:Cm(r);break;case 4:Ti();break;case 13:ge(Ee);break;case 19:ge(Ee);break;case 10:xm(r);break;case 23:case 24:Mm()}n=n.return}et=e,Re=Rr(e.current,null),qe=yo=Ri=t,Fe=0,qu=null,Om=Ai=ma=0}function dw(e,t){do{var n=Re;try{if(wm(),Ws.current=Ou,Ru){for(var r=Te.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ru=!1}if(ca=0,De=$e=Te=null,qs=!1,Lm.current=null,n===null||n.return===null){Fe=1,qu=t,Re=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=qe,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var f=(Ee.current&1)!==0,d=s;do{var p;if(p=d.tag===13){var y=d.memoizedState;if(y!==null)p=y.dehydrated!==null;else{var v=d.memoizedProps;p=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!f}}if(p){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 h=Sr(-1,1);h.tag=2,wr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new wR,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var x=NR.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((fi(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
8
8
 
9
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Fe!==5&&(Fe=2),l=Im(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=ow(d,i,t);gS(d,C);break e;case 1:i=l;var T=d.type,k=d.stateNode;if(!(d.flags&64)&&(typeof T.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=iw(d,i,t);gS(d,I);break e}}d=d.return}while(d!==null)}pw(n)}catch(L){t=L,Re===n&&n!==null&&(Re=n=n.return);continue}break}while(1)}function dw(){var e=Nu.current;return Nu.current=Ou,e===null?Ou:e}function Hs(e,t){var n=B;B|=16;var r=dw();et===e&&qe===t||wi(e,t);do try{kR();break}catch(o){cw(e,o)}while(1);if(wm(),B=n,Nu.current=r,Re!==null)throw Error(P(261));return et=null,qe=0,Fe}function kR(){for(;Re!==null;)fw(Re)}function PR(){for(;Re!==null&&!lR();)fw(Re)}function fw(e){var t=gw(e.alternate,e,yo);e.memoizedProps=e.pendingProps,t===null?pw(e):Re=t,Lm.current=null}function pw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=vR(t),n!==null){n.flags&=2047,Re=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=yR(n,t,yo),n!==null){Re=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||yo&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){Re=t;return}Re=t=e}while(t!==null);Fe===0&&(Fe=5)}function ao(e){var t=bi();return ho(99,RR.bind(null,e,t)),null}function RR(e,t){do Ir();while(Gs!==null);if(B&48)throw Error(P(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(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-Tr(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===et&&(Re=et=null,qe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=B,B|=32,Lm.current=null,Xf=ou,s=nS(),Cp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,f=-1,d=-1,p=0,y=0,v=s,g=null;t:for(;;){for(var m;v!==a||i!==0&&v.nodeType!==3||(f=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&&++p===i&&(f=c),g===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Qf={focusedElem:s,selectionRange:a},ou=!1,Xs=null,du=!1,M=r;do try{AR()}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);Xs=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&Zs(M.stateNode,""),h&128){var S=M.alternate;if(S!==null){var x=S.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(h&1038){case 2:jS(M),M.flags&=-3;break;case 6:jS(M),M.flags&=-3,op(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,op(M.alternate,M);break;case 4:op(M.alternate,M);break;case 8:a=M,sw(s,a);var C=a.alternate;HS(a),C!==null&&HS(C)}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);if(x=Qf,S=nS(),h=x.focusedElem,s=x.selectionRange,S!==h&&h&&h.ownerDocument&&b0(h.ownerDocument.documentElement,h)){for(s!==null&&Cp(h)&&(S=s.start,x=s.end,x===void 0&&(x=S),"selectionStart"in h?(h.selectionStart=S,h.selectionEnd=Math.min(x,h.value.length)):(x=(S=h.ownerDocument||document)&&S.defaultView||window,x.getSelection&&(x=x.getSelection(),a=h.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!x.extend&&C>s&&(a=s,s=C,C=a),a=tS(h,C),i=tS(h,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),x.removeAllRanges(),C>s?(x.addRange(S),x.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),x.addRange(S)))))),S=[],x=h;x=x.parentNode;)x.nodeType===1&&S.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<S.length;h++)x=S[h],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}ou=!!Xf,Qf=Xf=null,e.current=n,M=r;do try{for(h=e;M!==null;){var T=M.flags;if(T&36&&ER(h,M.alternate,M),T&128){S=void 0;var k=M.ref;if(k!==null){var I=M.stateNode;switch(M.tag){case 5:S=I;break;default:S=I}typeof k=="function"?k(S):k.current=S}}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);M=null,cR(),B=o}else e.current=n;if(Pr)Pr=!1,Gs=e,Fs=t;else for(M=r;M!==null;)t=M.nextEffect,M.nextEffect=null,M.flags&8&&(T=M,T.sibling=null,T.stateNode=null),M=t;if(r=e.pendingLanes,r===0&&(yn=null),r===1?e===Wp?Ys++:(Ys=0,Wp=e):Ys=0,n=n.stateNode,mo&&typeof mo.onCommitFiberRoot=="function")try{mo.onCommitFiberRoot(vm,n,void 0,(n.current.flags&64)===64)}catch{}if(Ht(e,We()),Mu)throw Mu=!1,e=Vp,Vp=null,e;return B&8||wn(),null}function AR(){for(;M!==null;){var e=M.alternate;du||Xs===null||(M.flags&8?Bv(M,Xs)&&(du=!0):M.tag===13&&CR(e,M)&&Bv(M,Xs)&&(du=!0));var t=M.flags;t&256&&xR(e,M),!(t&512)||Pr||(Pr=!0,sa(97,function(){return Ir(),null})),M=M.nextEffect}}function Ir(){if(Fs!==90){var e=97<Fs?97:Fs;return Fs=90,ho(e,LR)}return!1}function IR(e,t){Kp.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function mw(e,t){$p.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function LR(){if(Gs===null)return!1;var e=Gs;if(Gs=null,B&48)throw Error(P(331));var t=B;B|=32;var n=$p;$p=[];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(P(330));Cr(i,l)}}for(n=Kp,Kp=[],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(P(330));Cr(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 B=t,wn(),!0}function BS(e,t,n){t=Im(n,t),t=ow(e,t,1),wr(e,t),t=St(),e=Gu(e,1),e!==null&&(ju(e,1,t),Ht(e,t))}function Cr(e,t){if(e.tag===3)BS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){BS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Im(t,e);var o=iw(n,e,1);if(wr(n,o),o=St(),n=Gu(n,1),n!==null)ju(n,1,o),Ht(n,o);else if(typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function OR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=St(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(qe&n)===n&&(Fe===4||Fe===3&&(qe&62914560)===qe&&500>We()-Nm?wi(e,0):Om|=n),Ht(e,t)}function NR(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(Mn===0&&(Mn=Ri),t=ii(62914560&~Mn),t===0&&(t=4194304)):t=bi()===99?1:2:t=1),n=St(),e=Gu(e,t),e!==null&&(ju(e,t,n),Ht(e,n))}var gw;gw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Qt=!0;else if(n&r)Qt=!!(e.flags&16384);else{switch(Qt=!1,t.tag){case 3:RS(t),tp();break;case 5:SS(t);break;case 1:mt(t.type)&&au(t);break;case 4:Lp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ce(Eu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?AS(e,t,n):(Ce(Ee,Ee.current&1),t=Dn(e,t,n),t!==null?t.sibling:null);Ce(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return MS(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(Ee,Ee.current),r)break;return null;case 23:case 24:return t.lanes=0,np(e,t,n)}return Dn(e,t,n)}else Qt=!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=Ci(t,Ge.current),yi(t,n),o=km(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,mt(r)){var i=!0;au(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Em(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Tu(t,r,s,e),o.updater=Wu,t.stateNode=o,o._reactInternals=t,Ip(t,r,e,n),t=_p(null,t,r,!0,i,n)}else t.tag=0,ft(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=_R(o),e=Xt(o,e),i){case 0:t=Mp(null,t,o,e,n);break e;case 1:t=PS(null,t,o,e,n);break e;case 11:t=TS(null,t,o,e,n);break e;case 14:t=kS(null,t,o,Xt(o.type,e),r,n);break e}throw Error(P(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),Mp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),PS(e,t,r,o,n);case 3:if(RS(t),r=t.updateQueue,e===null||r===null)throw Error(P(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,j0(e,t),aa(t,r,null,n),r=t.memoizedState.element,r===o)tp(),t=Dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(gr=hi(t.stateNode.containerInfo.firstChild),_n=t,i=Sn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],vi.push(i);for(n=K0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ft(e,t,r,n),tp();t=t.child}return t;case 5:return SS(t),e===null&&Op(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,kp(r,o)?s=null:i!==null&&kp(r,i)&&(t.flags|=16),ew(e,t),ft(e,t,s,n),t.child;case 6:return e===null&&Op(t),null;case 13:return AS(e,t,n);case 4:return Lp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ku(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),TS(e,t,r,o,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(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(Ce(Eu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Mt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!pt.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=Sr(-1,n&-n),u.tag=2,wr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),U0(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}ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,yi(t,n),o=Ft(o,i.unstable_observedBits),r=r(o),t.flags|=1,ft(e,t,r,n),t.child;case 14:return o=t.type,i=Xt(o,t.pendingProps),i=Xt(o.type,i),kS(e,t,o,i,r,n);case 15:return J0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mt(r)?(e=!0,au(t)):e=!1,yi(t,n),B0(t,r,o),Ip(t,r,o,n),_p(null,t,r,!0,e,n);case 19:return MS(e,t,n);case 23:return np(e,t,n);case 24:return np(e,t,n)}throw Error(P(156,t.tag))};function MR(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 _t(e,t,n,r){return new MR(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _R(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===Hu)return 14}return 2}function Rr(e,t){var n=e.alternate;return n===null?(n=_t(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 fu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")_m(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fr:return xi(n.children,o,i,t);case $S:s=8,o|=16;break;case Qp:s=8,o|=1;break;case Us:return e=_t(12,n,t,o|8),e.elementType=Us,e.type=Us,e.lanes=i,e;case js:return e=_t(13,n,t,o),e.type=js,e.elementType=js,e.lanes=i,e;case pu:return e=_t(19,n,t,o),e.elementType=pu,e.lanes=i,e;case rm:return Dm(n,o,i,t);case lp:return e=_t(24,n,t,o),e.elementType=lp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:s=10;break e;case Jp:s=9;break e;case Fu:s=11;break e;case Hu:s=14;break e;case em:s=16,r=null;break e;case tm:s=22;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=_t(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function xi(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Dm(e,t,n,r){return e=_t(23,e,r,t),e.elementType=rm,e.lanes=n,e}function ip(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function sp(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function DR(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=Kf(0),this.expirationTimes=Kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kf(0),this.mutableSourceEagerHydrationData=null}function FR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _u(e,t,n,r){var o=t.current,i=St(),s=xr(o);e:if(n){n=n._reactInternals;t:{if(wo(n)!==n||n.tag!==1)throw Error(P(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(P(171))}if(n.tag===1){var l=n.type;if(mt(l)){n=O0(n,l,a);break e}}n=a}else n=kr;return t.context===null?t.context=n:t.pendingContext=n,t=Sr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),wr(o,t),Er(o,s,i),s}function ap(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 VS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fm(e,t){VS(e,t),(e=e.alternate)&&VS(e,t)}function HR(){return null}function Hm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new DR(e,t,n!=null&&n.hydrate===!0),t=_t(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Em(t),e[Pi]=n.current,P0(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}Hm.prototype.render=function(e){_u(e,this._internalRoot,null,null)};Hm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;_u(null,e,null,function(){t[Pi]=null})};function ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function UR(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 Hm(e,0,t?{hydrate:!0}:void 0)}function Yu(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=ap(s);a.call(u)}}_u(t,s,e,o)}else{if(i=n._reactRootContainer=UR(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=ap(s);l.call(u)}}uw(function(){_u(t,s,e,o)})}return ap(s)}s0=function(e){if(e.tag===13){var t=St();Er(e,4,t),Fm(e,4)}};lm=function(e){if(e.tag===13){var t=St();Er(e,67108864,t),Fm(e,67108864)}};a0=function(e){if(e.tag===13){var t=St(),n=xr(e);Er(e,n,t),Fm(e,n)}};l0=function(e,t){return t()};vp=function(e,t,n){switch(t){case"input":if(cp(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=Ku(r);if(!o)throw Error(P(90));qS(r),cp(r,o)}}}break;case"textarea":YS(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};im=lw;n0=function(e,t,n,r,o){var i=B;B|=4;try{return ho(98,e.bind(null,t,n,r,o))}finally{B=i,B===0&&(Ii(),wn())}};sm=function(){!(B&49)&&(TR(),Ir())};r0=function(e,t){var n=B;B|=2;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}};function hw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(P(200));return FR(e,t,null,n)}var jR={Events:[fa,ui,Ku,e0,t0,Ir,{current:!1}]},Os={findFiberByHostInstance:co,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},zR={bundleType:Os.bundleType,version:Os.version,rendererPackageName:Os.rendererPackageName,rendererConfig:Os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:So.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=i0(e),e===null?null:e.stateNode},findFiberByHostInstance:Os.findFiberByHostInstance||HR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ns.isDisabled&&Ns.supportsFiber))try{vm=Ns.inject(zR),mo=Ns}catch{}var Ns;Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jR;Ut.createPortal=hw;Ut.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(P(188)):Error(P(268,Object.keys(e)));return e=i0(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e,t){var n=B;if(n&48)return e(t);B|=1;try{if(e)return ho(99,e.bind(null,t))}finally{B=n,wn()}};Ut.hydrate=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!0,n)};Ut.render=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!ga(e))throw Error(P(40));return e._reactRootContainer?(uw(function(){Yu(null,null,e,!1,function(){e._reactRootContainer=null,e[Pi]=null})}),!0):!1};Ut.unstable_batchedUpdates=lw;Ut.unstable_createPortal=function(e,t){return hw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ga(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Yu(e,t,n,!1,r)};Ut.version="17.0.2"});var Xu=be((X_,Sw)=>{"use strict";function vw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vw)}catch(e){console.error(e)}}vw(),Sw.exports=yw()});var qw=be(Ww=>{"use strict";var Di=F();function TA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kA=typeof Object.is=="function"?Object.is:TA,PA=Di.useState,RA=Di.useEffect,AA=Di.useLayoutEffect,IA=Di.useDebugValue;function LA(e,t){var n=t(),r=PA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return AA(function(){o.value=n,o.getSnapshot=t,dg(o)&&i({inst:o})},[e,n,t]),RA(function(){return dg(o)&&i({inst:o}),e(function(){dg(o)&&i({inst:o})})},[e]),IA(n),n}function dg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kA(e,n)}catch{return!0}}function OA(e,t){return t()}var NA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?OA:LA;Ww.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:NA});var fg=be((F2,Gw)=>{"use strict";Gw.exports=qw()});var Xw=be(Yw=>{"use strict";var oc=F(),MA=fg();function _A(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DA=typeof Object.is=="function"?Object.is:_A,FA=MA.useSyncExternalStore,HA=oc.useRef,UA=oc.useEffect,jA=oc.useMemo,zA=oc.useDebugValue;Yw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=HA(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=jA(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return f=y}return f=p}if(y=f,DA(c,p))return y;var v=r(p);return o!==void 0&&o(y,v)?y:(c=p,f=v)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=FA(e,i[0],i[1]);return UA(function(){s.hasValue=!0,s.value=a},[a]),zA(a),a}});var Zw=be((U2,Qw)=>{"use strict";Qw.exports=Xw()});var ux=be(ie=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,mg=_e?Symbol.for("react.element"):60103,gg=_e?Symbol.for("react.portal"):60106,lc=_e?Symbol.for("react.fragment"):60107,uc=_e?Symbol.for("react.strict_mode"):60108,cc=_e?Symbol.for("react.profiler"):60114,dc=_e?Symbol.for("react.provider"):60109,fc=_e?Symbol.for("react.context"):60110,hg=_e?Symbol.for("react.async_mode"):60111,pc=_e?Symbol.for("react.concurrent_mode"):60111,mc=_e?Symbol.for("react.forward_ref"):60112,gc=_e?Symbol.for("react.suspense"):60113,$A=_e?Symbol.for("react.suspense_list"):60120,hc=_e?Symbol.for("react.memo"):60115,yc=_e?Symbol.for("react.lazy"):60116,WA=_e?Symbol.for("react.block"):60121,qA=_e?Symbol.for("react.fundamental"):60117,GA=_e?Symbol.for("react.responder"):60118,YA=_e?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mg:switch(e=e.type,e){case hg:case pc:case lc:case cc:case uc:case gc:return e;default:switch(e=e&&e.$$typeof,e){case fc:case mc:case yc:case hc:case dc:return e;default:return t}}case gg:return t}}}function lx(e){return Et(e)===pc}ie.AsyncMode=hg;ie.ConcurrentMode=pc;ie.ContextConsumer=fc;ie.ContextProvider=dc;ie.Element=mg;ie.ForwardRef=mc;ie.Fragment=lc;ie.Lazy=yc;ie.Memo=hc;ie.Portal=gg;ie.Profiler=cc;ie.StrictMode=uc;ie.Suspense=gc;ie.isAsyncMode=function(e){return lx(e)||Et(e)===hg};ie.isConcurrentMode=lx;ie.isContextConsumer=function(e){return Et(e)===fc};ie.isContextProvider=function(e){return Et(e)===dc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mg};ie.isForwardRef=function(e){return Et(e)===mc};ie.isFragment=function(e){return Et(e)===lc};ie.isLazy=function(e){return Et(e)===yc};ie.isMemo=function(e){return Et(e)===hc};ie.isPortal=function(e){return Et(e)===gg};ie.isProfiler=function(e){return Et(e)===cc};ie.isStrictMode=function(e){return Et(e)===uc};ie.isSuspense=function(e){return Et(e)===gc};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lc||e===pc||e===cc||e===uc||e===gc||e===$A||typeof e=="object"&&e!==null&&(e.$$typeof===yc||e.$$typeof===hc||e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===mc||e.$$typeof===qA||e.$$typeof===GA||e.$$typeof===YA||e.$$typeof===WA)};ie.typeOf=Et});var dx=be((J2,cx)=>{"use strict";cx.exports=ux()});var vx=be((eD,yx)=>{"use strict";var yg=dx(),XA={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},QA={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ZA={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vg={};vg[yg.ForwardRef]=ZA;vg[yg.Memo]=gx;function fx(e){return yg.isMemo(e)?gx:vg[e.$$typeof]||XA}var JA=Object.defineProperty,eI=Object.getOwnPropertyNames,px=Object.getOwnPropertySymbols,tI=Object.getOwnPropertyDescriptor,nI=Object.getPrototypeOf,mx=Object.prototype;function hx(e,t,n){if(typeof t!="string"){if(mx){var r=nI(t);r&&r!==mx&&hx(e,r,n)}var o=eI(t);px&&(o=o.concat(px(t)));for(var i=fx(e),s=fx(t),a=0;a<o.length;++a){var l=o[a];if(!QA[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=tI(t,l);try{JA(e,l,u)}catch{}}}}return e}yx.exports=hx});var wx=be(se=>{"use strict";var Sg=Symbol.for("react.element"),wg=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),Sc=Symbol.for("react.strict_mode"),wc=Symbol.for("react.profiler"),xc=Symbol.for("react.provider"),Ec=Symbol.for("react.context"),rI=Symbol.for("react.server_context"),Cc=Symbol.for("react.forward_ref"),bc=Symbol.for("react.suspense"),Tc=Symbol.for("react.suspense_list"),kc=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),oI=Symbol.for("react.offscreen"),Sx;Sx=Symbol.for("react.module.reference");function zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sg:switch(e=e.type,e){case vc:case wc:case Sc:case bc:case Tc:return e;default:switch(e=e&&e.$$typeof,e){case rI:case Ec:case Cc:case Pc:case kc:case xc:return e;default:return t}}case wg:return t}}}se.ContextConsumer=Ec;se.ContextProvider=xc;se.Element=Sg;se.ForwardRef=Cc;se.Fragment=vc;se.Lazy=Pc;se.Memo=kc;se.Portal=wg;se.Profiler=wc;se.StrictMode=Sc;se.Suspense=bc;se.SuspenseList=Tc;se.isAsyncMode=function(){return!1};se.isConcurrentMode=function(){return!1};se.isContextConsumer=function(e){return zt(e)===Ec};se.isContextProvider=function(e){return zt(e)===xc};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sg};se.isForwardRef=function(e){return zt(e)===Cc};se.isFragment=function(e){return zt(e)===vc};se.isLazy=function(e){return zt(e)===Pc};se.isMemo=function(e){return zt(e)===kc};se.isPortal=function(e){return zt(e)===wg};se.isProfiler=function(e){return zt(e)===wc};se.isStrictMode=function(e){return zt(e)===Sc};se.isSuspense=function(e){return zt(e)===bc};se.isSuspenseList=function(e){return zt(e)===Tc};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vc||e===wc||e===Sc||e===bc||e===Tc||e===oI||typeof e=="object"&&e!==null&&(e.$$typeof===Pc||e.$$typeof===kc||e.$$typeof===xc||e.$$typeof===Ec||e.$$typeof===Cc||e.$$typeof===Sx||e.getModuleId!==void 0)};se.typeOf=zt});var Ex=be((nD,xx)=>{"use strict";xx.exports=wx()});var Qg=be((k4,QE)=>{"use strict";var cL="Expected a function",YE=NaN,dL="[object Symbol]",fL=/^\s+|\s+$/g,pL=/^[-+]0x[0-9a-f]+$/i,mL=/^0b[01]+$/i,gL=/^0o[0-7]+$/i,hL=parseInt,yL=typeof global=="object"&&global&&global.Object===Object&&global,vL=typeof self=="object"&&self&&self.Object===Object&&self,SL=yL||vL||Function("return this")(),wL=Object.prototype,xL=wL.toString,EL=Math.max,CL=Math.min,Yg=function(){return SL.Date.now()};function bL(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(cL);t=XE(t)||0,Xg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?EL(XE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(T){var k=r,I=o;return r=o=void 0,u=T,s=e.apply(I,k),s}function y(T){return u=T,a=setTimeout(m,t),c?p(T):s}function v(T){var k=T-l,I=T-u,L=t-k;return f?CL(L,i-I):L}function g(T){var k=T-l,I=T-u;return l===void 0||k>=t||k<0||f&&I>=i}function m(){var T=Yg();if(g(T))return h(T);a=setTimeout(m,v(T))}function h(T){return a=void 0,d&&r?p(T):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:h(Yg())}function C(){var T=Yg(),k=g(T);if(r=arguments,o=this,l=T,k){if(a===void 0)return y(l);if(f)return a=setTimeout(m,t),p(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=S,C.flush=x,C}function Xg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function TL(e){return!!e&&typeof e=="object"}function kL(e){return typeof e=="symbol"||TL(e)&&xL.call(e)==dL}function XE(e){if(typeof e=="number")return e;if(kL(e))return YE;if(Xg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(fL,"");var n=mL.test(e);return n||gL.test(e)?hL(e.slice(2),n?2:8):pL.test(e)?YE:+e}QE.exports=bL});var sC=be(($4,iC)=>{"use strict";var NL=/["'&<>]/;iC.exports=ML;function ML(e){var t=""+e,n=NL.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="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";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 WM={};Je(WM,{Card:()=>pe,ContentEditableInput:()=>Bo,DeepdeskAPI:()=>sr,DeepdeskSDK:()=>hl,HTTPClient:()=>fn,InputMediator:()=>ir,InputType:()=>io,KeyboardHint:()=>Nl,Label:()=>Ml,Locale:()=>Ca,Section:()=>Ln,SectionList:()=>_l,Sources:()=>On,Suggestion:()=>ae,SuggestionList:()=>vt,TextAreaInput:()=>Vo,ToggleButton:()=>oo,attachFile:()=>W1,authenticateWithKey:()=>K1,createFullRange:()=>ss,createOverlayContainer:()=>gl,createRangeFromOffsets:()=>Xr,escapeHTML:()=>Wi,fetchPlatformConfig:()=>$1,formatTextMarkup:()=>V1,getRangeOffsets:()=>dl,getRangeText:()=>fl,insertCKEditor:()=>B1,isHTML:()=>vd,isSupportedInputElement:()=>uf,updateContentEditable:()=>j1,updateTextArea:()=>U1,useStyles:()=>A,waitForElementVisibilityChange:()=>ff});var Pf=w(ee()),Ot=w(F());var Al=w(F()),Jy=w(ee()),gs=Al.default.createContext({});function A(e,t){let{debug:n,...r}=(0,Al.useContext)(gs),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Jy.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var ev={root:"uo"};var eo=w(b()),Il=()=>(0,eo.jsxs)("svg",{className:ev.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,eo.jsx)("defs",{children:(0,eo.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,eo.jsx)("title",{children:"Failed loading image"}),(0,eo.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 kf={root:"yo",imageWrapper:"G",image:"wo",content:"m",title:"vo",contentIsCropped:"ko",lineClamp:"zo"};var to=w(b()),Ll=(0,Ot.createContext)(kf),Ck=({title:e,src:t})=>{let n=(0,Ot.useContext)(Ll),[r,o]=(0,Ot.useState)(!1);return(0,Ot.useEffect)(()=>{o(!1)},[t]),(0,to.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,to.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,to.jsx)(Il,{})})},bk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Ot.useContext)(Ll);return(0,to.jsx)("div",{className:(0,Pf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Tk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Ot.useContext)(Ll);return Ot.default.createElement(e,{className:(0,Pf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ol=({children:e})=>{let t=A("Card",kf);return(0,to.jsx)("div",{className:t.root,children:(0,to.jsx)(Ll.Provider,{value:t,children:e})})};Ol.Image=Ck;Ol.Content=bk;Ol.Title=Tk;var pe=Ol;var sv=w(ee());var iv={root:"N"};var av=w(b());var Pk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},Rk=({className:e,keyCode:t,...n})=>{let r=A("KeyboardHint",iv);return(0,av.jsx)("span",{"data-key":Pk[t],className:(0,sv.default)(e,r.root),...n})},Nl=Rk;var uv=w(ee());var lv={root:"jo"};var cv=w(b()),Ik=({className:e,children:t,...n})=>{let r=A("Label",lv);return(0,cv.jsx)("span",{...n,className:(0,uv.default)(e,r.root),children:t})},Ml=Ik;var dv={root:"qo",subTitleContainer:"Co",subtitle:"So",suggestions:"Eo"};var Zo=w(b()),Ok=({title:e,children:t,type:n,...r})=>{let o=A("Section",dv);return(0,Zo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,Zo.jsx)("div",{className:o.subTitleContainer,children:(0,Zo.jsx)("span",{className:o.subtitle,children:e})}),(0,Zo.jsx)("div",{className:o.suggestions,children:t})]})},Ln=Ok;var pv=w(ee()),mv=w(F());var fv={root:"Go"};var gv=w(b()),Mk=mv.default.forwardRef(({className:e,children:t},n)=>{let r=A("SectionList",fv);return(0,gv.jsx)("div",{ref:n,className:(0,pv.default)(r.root,e),children:t})}),_l=Mk;var Jo=w(ee()),yt=w(F());var ys=w(b()),hv=({className:e})=>(0,ys.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,ys.jsx)("line",{x1:"1",y1:"11",x2:"11",y2:"1",stroke:"black",strokeWidth:"2"}),(0,ys.jsx)("line",{x1:"1",y1:"1",x2:"11",y2:"11",stroke:"black",strokeWidth:"2"})]});var Rf={fadein:"Y",root:"e",isClickable:"A",isSelected:"No",actions:"F",actionsIsFixed:"Yo",actionButton:"t",dropdownList:"H",dropdownButton:"L",dropdownItem:"M",dropdownItemButton:"R",actionButtonIsPrimary:"Ao",actionButtonIsDisabled:"Fo",labels:"Ho",label:"Lo",closeIcon:"n"};var ct=w(b()),no=(0,yt.createContext)(Rf),Dk=({fixed:e,children:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{...n,className:(0,Jo.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},Fk=({className:e,title:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:(0,Jo.default)(r.closeIcon,e),title:t,role:"button","aria-label":t,...n,children:(0,ct.jsx)(hv,{})})},Hk=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsxs)("div",{className:(0,Jo.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,ct.jsx)("ul",{className:i.dropdownList,children:o})]})},Uk=({index:e,label:t,onClick:n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("li",{className:r.dropdownItem,children:(0,ct.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},jk=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsx)("button",{type:"button",className:(0,Jo.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},zk=({labels:e})=>{let t=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:t.labels,children:e.map(n=>(0,ct.jsx)("span",{className:t.label,children:n},n))})},ro=yt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=A("Suggestion",Rf),l=(0,yt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,ct.jsx)(o,{...i,ref:s,className:(0,Jo.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,ct.jsx)(no.Provider,{value:a,children:r})})});ro.Labels=zk;ro.Actions=Dk;ro.ActionButton=jk;ro.DropdownButton=Hk;ro.DropdownItem=Uk;ro.CloseIcon=Fk;var ae=ro;var vv=w(ee());var yv={root:"Mo",isWithDivider:"Ro"};var Sv=w(b()),Vk=({withDivider:e,children:t})=>{let n=A("SuggestionList",yv);return(0,Sv.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,vv.default)(n.root,{[n.isWithDivider]:e}),children:t})},vt=Vk;var xv=w(ee());var wv={root:"u",isCollapsed:"T"};var Dl=w(b()),$k=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=A("ToggleButton",wv);return(0,Dl.jsx)("button",{type:"button",className:(0,xv.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Dl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Dl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},oo=$k;var Ev=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Fl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Cv=/x-deepdesk-(([a-z0-9\-_])+-version)/,On=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v))(On||{}),io=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(io||{});var Wt=w(Xu());var ob=w(F());function jt(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 Un(e){return!!e&&!!e[Se]}function Zt(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)===YR}(e)||Array.isArray(e)||!!e[kw]||!!(!((t=e.constructor)===null||t===void 0)&&t[kw])||qm(e)||Gm(e))}function Eo(e,t,n){n===void 0&&(n=!1),Ni(e)===0?(n?Object.keys:Oi)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Ni(e){var t=e[Se];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:qm(e)?2:Gm(e)?3:0}function Li(e,t){return Ni(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function BR(e,t){return Ni(e)===2?e.get(t):e[t]}function Pw(e,t,n){var r=Ni(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Rw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function qm(e){return qR&&e instanceof Map}function Gm(e){return GR&&e instanceof Set}function Lr(e){return e.o||e.t}function Ym(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Lw(e);delete t[Se];for(var n=Oi(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 Xm(e,t){return t===void 0&&(t=!1),Qm(e)||Un(e)||!Zt(e)||(Ni(e)>1&&(e.set=e.add=e.clear=e.delete=VR),Object.freeze(e),t&&Eo(e,function(n,r){return Xm(r,!0)},!0)),e}function VR(){jt(2)}function Qm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function xn(e){var t=Wm[e];return t||jt(18,e),t}function KR(e,t){Wm[e]||(Wm[e]=t)}function Vm(){return ya}function Um(e,t){t&&(xn("Patches"),e.u=[],e.s=[],e.v=t)}function Qu(e){Km(e),e.p.forEach($R),e.p=null}function Km(e){e===ya&&(ya=e.l)}function ww(e){return ya={p:[],l:ya,h:e,m:!0,_:0}}function $R(e){var t=e[Se];t.i===0||t.i===1?t.j():t.g=!0}function jm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||xn("ES5").S(t,e,r),r?(n[Se].P&&(Qu(t),jt(4)),Zt(e)&&(e=Zu(t,e),t.l||Ju(t,e)),t.u&&xn("Patches").M(n[Se].t,e,t.u,t.s)):e=Zu(t,n,[]),Qu(t),t.u&&t.v(t.u,t.s),e!==Iw?e:void 0}function Zu(e,t,n){if(Qm(t))return t;var r=t[Se];if(!r)return Eo(t,function(a,l){return xw(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Ju(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Ym(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Eo(i,function(a,l){return xw(e,r,o,a,l,n,s)}),Ju(e,o,!1),n&&e.u&&xn("Patches").N(r,n,e.u,e.s)}return r.o}function xw(e,t,n,r,o,i,s){if(Un(o)){var a=Zu(e,o,i&&t&&t.i!==3&&!Li(t.R,r)?i.concat(r):void 0);if(Pw(n,r,a),!Un(a))return;e.m=!1}else s&&n.add(o);if(Zt(o)&&!Qm(o)){if(!e.h.D&&e._<1)return;Zu(e,o),t&&t.A.l||Ju(e,o)}}function Ju(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Xm(t,n)}function zm(e,t){var n=e[Se];return(n?Lr(n):e)[t]}function Ew(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 Or(e){e.P||(e.P=!0,e.l&&Or(e.l))}function Bm(e){e.o||(e.o=Ym(e.t))}function $m(e,t,n){var r=qm(t)?xn("MapSet").F(t,n):Gm(t)?xn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Vm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=va;s&&(l=[a],u=ha);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):xn("ES5").J(t,n);return(n?n.A:Vm()).p.push(r),r}function WR(e){return Un(e)||jt(22,e),function t(n){if(!Zt(n))return n;var r,o=n[Se],i=Ni(n);if(o){if(!o.P&&(o.i<4||!xn("ES5").K(o)))return o.t;o.I=!0,r=Cw(n,i),o.I=!1}else r=Cw(n,i);return Eo(r,function(s,a){o&&BR(o.t,s)===a||Pw(r,s,t(a))}),i===3?new Set(r):r}(e)}function Cw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ym(e)}function Aw(){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[Se];return va.get(u,s)},set:function(u){var c=this[Se];va.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Se];if(!l.P)switch(l.i){case 5:r(l)&&Or(l);break;case 4:n(l)&&Or(l)}}}function n(s){for(var a=s.t,l=s.k,u=Oi(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==Se){var d=a[f];if(d===void 0&&!Li(a,f))return!0;var p=l[f],y=p&&p[Se];if(y?y.t!==d:!Rw(p,d))return!0}}var v=!!a[Se];return u.length!==Oi(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&&jt(3,JSON.stringify(Lr(s)))}var i={};KR("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var p=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(p,""+y,e(y,!0));return p}var v=Lw(d);delete v[Se];for(var g=Oi(v),m=0;m<g.length;m++){var h=g[m];v[h]=e(h,f||!!v[h].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:Vm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Se,{value:c,writable:!0}),u},S:function(s,a,l){l?Un(a)&&a[Se].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[Se];if(f){var d=f.t,p=f.k,y=f.R,v=f.i;if(v===4)Eo(p,function(x){x!==Se&&(d[x]!==void 0||Li(d,x)?y[x]||u(p[x]):(y[x]=!0,Or(f)))}),Eo(d,function(x){p[x]!==void 0||Li(p,x)||(y[x]=!1,Or(f))});else if(v===5){if(r(f)&&(Or(f),y.length=!0),p.length<d.length)for(var g=p.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<p.length;m++)y[m]=!0;for(var h=Math.min(p.length,d.length),S=0;S<h;S++)p.hasOwnProperty(S)||(y[S]=!0),y[S]===void 0&&u(p[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var bw,ya,Zm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",qR=typeof Map<"u",GR=typeof Set<"u",Tw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Iw=Zm?Symbol.for("immer-nothing"):((bw={})["immer-nothing"]=!0,bw),kw=Zm?Symbol.for("immer-draftable"):"__$immer_draftable",Se=Zm?Symbol.for("immer-state"):"__$immer_state";var YR=""+Object.prototype.constructor,Oi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Lw=Object.getOwnPropertyDescriptors||function(e){var t={};return Oi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Wm={},va={get:function(e,t){if(t===Se)return e;var n=Lr(e);if(!Li(n,t))return function(o,i,s){var a,l=Ew(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||!Zt(r)?r:r===zm(e.t,t)?(Bm(e),e.o[t]=$m(e.A.h,r,e)):r},has:function(e,t){return t in Lr(e)},ownKeys:function(e){return Reflect.ownKeys(Lr(e))},set:function(e,t,n){var r=Ew(Lr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=zm(Lr(e),t),i=o==null?void 0:o[Se];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Rw(n,o)&&(n!==void 0||Li(e.t,t)))return!0;Bm(e),Or(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 zm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bm(e),Or(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Lr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){jt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){jt(12)}},ha={};Eo(va,function(e,t){ha[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ha.deleteProperty=function(e,t){return ha.set.call(this,e,t,void 0)},ha.set=function(e,t,n){return va.set.call(this,e[0],t,n,e[0])};var XR=function(){function e(n){var r=this;this.O=Tw,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,h=Array(m>1?m-1:0),S=1;S<m;S++)h[S-1]=arguments[S];return l.produce(v,function(x){var C;return(C=i).call.apply(C,[g,x].concat(h))})}}var u;if(typeof i!="function"&&jt(6),s!==void 0&&typeof s!="function"&&jt(7),Zt(o)){var c=ww(r),f=$m(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Qu(c):Km(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Um(c,s),jm(v,c)},function(v){throw Qu(c),v}):(Um(c,s),jm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===Iw&&(u=void 0),r.D&&Xm(u,!0),s){var p=[],y=[];xn("Patches").M(o,u,p,y),s(p,y)}return u}jt(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(p){return o.apply(void 0,[p].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Zt(n)||jt(8),Un(n)&&(n=WR(n));var r=ww(this),o=$m(this,n,void 0);return o[Se].C=!0,Km(r),o},t.finishDraft=function(n,r){var o=n&&n[Se],i=o.A;return Um(i,r),jm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!Tw&&jt(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=xn("Patches").$;return Un(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),xt=new XR,QR=xt.produce,Q_=xt.produceWithPatches.bind(xt),Z_=xt.setAutoFreeze.bind(xt),J_=xt.setUseProxies.bind(xt),e2=xt.applyPatches.bind(xt),t2=xt.createDraft.bind(xt),n2=xt.finishDraft.bind(xt),ec=QR;function Nr(e){"@babel/helpers - typeof";return Nr=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},Nr(e)}function Jm(e,t){if(Nr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e){var t=Jm(e,"string");return Nr(t)==="symbol"?t:String(t)}function tg(e,t,n){return t=eg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ow(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 tc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(n),!0).forEach(function(r){tg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ye(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 Nw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ng=function(){return Math.random().toString(36).substring(7).split("").join(".")},nc={INIT:"@@redux/INIT"+ng(),REPLACE:"@@redux/REPLACE"+ng(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ng()}};function ZR(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 rg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ye(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ye(1));return n(rg)(e,t)}if(typeof e!="function")throw new Error(Ye(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(Ye(3));return i}function f(v){if(typeof v!="function")throw new Error(Ye(4));if(l)throw new Error(Ye(5));var g=!0;return u(),a.push(v),function(){if(g){if(l)throw new Error(Ye(6));g=!1,u();var h=a.indexOf(v);a.splice(h,1),s=null}}}function d(v){if(!ZR(v))throw new Error(Ye(7));if(typeof v.type>"u")throw new Error(Ye(8));if(l)throw new Error(Ye(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var h=g[m];h()}return v}function p(v){if(typeof v!="function")throw new Error(Ye(10));o=v,d({type:nc.REPLACE})}function y(){var v,g=f;return v={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ye(11));function S(){h.next&&h.next(c())}S();var x=g(S);return{unsubscribe:x}}},v[Nw]=function(){return this},v}return d({type:nc.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:p},r[Nw]=y,r}function JR(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:nc.INIT});if(typeof r>"u")throw new Error(Ye(12));if(typeof n(void 0,{type:nc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ye(13))})}function rc(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{JR(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,p={},y=0;y<i.length;y++){var v=i[y],g=n[v],m=u[v],h=g(m,c);if(typeof h>"u"){var S=c&&c.type;throw new Error(Ye(14))}p[v]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Mi(){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 Mw(){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(Ye(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Mi.apply(void 0,a)(o.dispatch),tc(tc({},o),{},{dispatch:i})}}}function _w(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 Dw=_w();Dw.withExtraArgument=_w;var og=Dw;var zw=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)}}(),eA=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}}},_i=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},tA=Object.defineProperty,nA=Object.defineProperties,rA=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertySymbols,oA=Object.prototype.hasOwnProperty,iA=Object.prototype.propertyIsEnumerable,Hw=function(e,t,n){return t in e?tA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mr=function(e,t){for(var n in t||(t={}))oA.call(t,n)&&Hw(e,n,t[n]);if(Fw)for(var r=0,o=Fw(t);r<o.length;r++){var n=o[r];iA.call(t,n)&&Hw(e,n,t[n])}return e},ig=function(e,t){return nA(e,rA(t))},sA=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 aA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mi:Mi.apply(null,arguments)},w2=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function lA(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 uA=function(e){zw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array),cA=function(e){zw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array);function lg(e){return Zt(e)?ec(e,function(){}):e}function dA(e){return typeof e=="boolean"}function fA(){return function(t){return pA(t)}}function pA(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 uA;if(n&&(dA(n)?a.push(og):a.push(og.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var sg=!0;function Bw(e){var t=fA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,f=n.enhancers,d=f===void 0?void 0:f,p;if(typeof o=="function")p=o;else if(lA(o))p=rc(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),!sg&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!sg&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Mw.apply(void 0,y),g=Mi;l&&(g=aA(Mr({trace:!sg},typeof l=="object"&&l)));var m=new cA(v),h=m;Array.isArray(d)?h=_i([v],d):typeof d=="function"&&(h=d(m));var S=g.apply(void 0,h);return rg(p,c,S)}function xe(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 Mr(Mr({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 Vw(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 mA(e){return typeof e=="function"}function gA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?Vw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(mA(e))l=function(){return lg(e())};else{var u=lg(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var p=_i([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return p.filter(function(y){return!!y}).length===0&&(p=[a]),p.reduce(function(y,v){if(v)if(Un(y)){var g=y,m=v(g,d);return m===void 0?y:m}else{if(Zt(y))return ec(y,function(h){return v(h,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},f)}return c.getInitialState=l,c}function hA(e,t){return e+"/"+t}function q(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:lg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=hA(t,c),p,y;"reducer"in f?(p=f.reducer,y=f.prepare):p=f,i[c]=p,s[d]=p,a[c]=y?xe(d,y):xe(d)});function l(){var c=typeof e.extraReducers=="function"?Vw(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,p=c[1],y=p===void 0?[]:p,v=c[2],g=v===void 0?void 0:v,m=Mr(Mr({},d),s);return gA(n,function(h){for(var S in m)h.addCase(S,m[S]);for(var x=0,C=y;x<C.length;x++){var T=C[x];h.addMatcher(T.matcher,T.reducer)}g&&h.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var yA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=yA[Math.random()*64|0];return t},SA=["name","message","stack","code"],ag=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Uw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),wA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=SA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},j=function(){function e(t,n,r){var o=xe(t+"/fulfilled",function(c,f,d,p){return{payload:c,meta:ig(Mr({},p||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=xe(t+"/pending",function(c,f,d){return{payload:void 0,meta:ig(Mr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=xe(t+"/rejected",function(c,f,d,p,y){return{payload:p,error:(r&&r.serializeError||wA)(c||"Rejected"),meta:ig(Mr({},y||{}),{arg:d,requestId:f,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(f,d,p){var y=r!=null&&r.idGenerator?r.idGenerator(c):vA(),v=new l,g,m=!1;function h(x){g=x,v.abort()}var S=function(){return sA(this,null,function(){var x,C,T,k,I,L,N;return eA(this,function(z){switch(z.label){case 0:return z.trys.push([0,4,,5]),k=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:p}),EA(k)?[4,k]:[3,2];case 1:k=z.sent(),z.label=2;case 2:if(k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(K,J){return v.signal.addEventListener("abort",function(){return J({name:"AbortError",message:g||"Aborted"})})}),f(i(y,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:y,arg:c},{getState:d,extra:p}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:f,getState:d,extra:p,requestId:y,signal:v.signal,abort:h,rejectWithValue:function(K,J){return new ag(K,J)},fulfillWithValue:function(K,J){return new Uw(K,J)}})).then(function(K){if(K instanceof ag)throw K;return K instanceof Uw?o(K.payload,y,c,K.meta):o(K,y,c)})])];case 3:return T=z.sent(),[3,5];case 4:return L=z.sent(),T=L instanceof ag?s(null,y,c,L.payload,L.meta):s(L,y,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(T)&&T.meta.condition,N||f(T),[2,T]}})})}();return Object.assign(S,{abort:h,requestId:y,arg:c,unwrap:function(){return S.then(xA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function xA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function EA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var CA="task",Kw="listener",$w="completed",ug="cancelled",b2="task-"+ug,T2="task-"+$w,k2=Kw+"-"+ug,P2=Kw+"-"+$w,R2=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=CA+" "+ug+" (reason: "+t+")"}return e}();var cg="listenerMiddleware";var A2=xe(cg+"/add"),I2=xe(cg+"/removeAll"),L2=xe(cg+"/remove");var jw,O2=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(jw||(jw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},bA=function(e){return function(t){setTimeout(t,e)}},N2=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:bA(10);Aw();var Nx=w(fg()),Mx=w(Zw());var pg=w(Xu());function BA(e){e()}var Jw=BA,ex=e=>Jw=e,tx=()=>Jw;var Fi=w(F());var ox=w(F());var ic=w(F()),nx=Symbol.for(`react-redux-context-${ic.version}`),rx=globalThis;function VA(){let e=rx[nx];return e||(e=(0,ic.createContext)(null),rx[nx]=e),e}var Xe=new Proxy({},new Proxy({},{get(e,t){let n=VA();return(r,...o)=>Reflect[t](n,...o)}}));function Sa(e=Xe){return function(){return(0,ox.useContext)(e)}}var sc=Sa();var ac=()=>{throw new Error("uSES not initialized!")};var ix=ac,sx=e=>{ix=e},KA=(e,t)=>e===t;function ax(e=Xe){let t=e===Xe?sc:Sa(e);return function(r,o={}){let{equalityFn:i=KA,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),p=(0,Fi.useRef)(!0),y=(0,Fi.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),v=ix(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Fi.useDebugValue)(v),v}}var O=ax();function jn(){return jn=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},jn.apply(this,arguments)}function wa(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 Cg=w(vx()),le=w(F()),Ax=w(Ex());var sI=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function aI(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function p(h,S){return l=h,u=S,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let h=e(l,u),S=!s(h,c);return c=h,S&&(d=n(c,f,u)),d}function m(h,S){let x=!i(S,u),C=!o(h,l,S,u);return l=h,u=S,x&&C?y():x?v():C?g():d}return function(S,x){return a?m(S,x):p(S,x)}}function xg(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=wa(t,sI),s=n(e,i),a=r(e,i),l=o(e,i);return aI(s,a,l,e,i)}function Eg(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 xa(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Cx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Rc(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=Cx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Cx(u),u=i(a,l)),u},i}}function Hi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function bx(e){return e&&typeof e=="object"?xa(t=>Eg(e,t)):e?typeof e=="function"?Rc(e,"mapDispatchToProps"):Hi(e,"mapDispatchToProps"):xa(t=>({dispatch:t}))}function Tx(e){return e?typeof e=="function"?Rc(e,"mapStateToProps"):Hi(e,"mapStateToProps"):xa(()=>({}))}function lI(e,t,n){return jn({},n,e,t)}function uI(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function kx(e){return e?typeof e=="function"?uI(e):Hi(e,"mergeProps"):()=>lI}function cI(){let e=tx(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Px={notify(){},get:()=>[]};function Ac(e,t){let n,r=Px;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=cI())}function u(){n&&(n(),n=void 0,r.clear(),r=Px)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Ic=w(F()),dI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ui=dI?Ic.useLayoutEffect:Ic.useEffect;function Rx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ji(e,t){if(Rx(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])||!Rx(e[n[o]],t[n[o]]))return!1;return!0}var fI=["reactReduxForwardedRef"],Ix=ac,Lx=e=>{Ix=e};var pI=[null,null];function mI(e,t,n){Ui(()=>e(...t),n)}function gI(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function hI(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let v=t.getState(),g,m;try{g=r(v,o.current)}catch(h){m=h,d=h}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function yI(e,t){return e===t}function vI(e,t,n,{pure:r,areStatesEqual:o=yI,areOwnPropsEqual:i=ji,areStatePropsEqual:s=ji,areMergedPropsEqual:a=ji,forwardRef:l=!1,context:u=Xe}={}){let c=u,f=Tx(e),d=bx(t),p=kx(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",h=`Connect(${m})`,S={shouldHandleStateChanges:y,displayName:h,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[I,L,N]=(0,le.useMemo)(()=>{let{reactReduxForwardedRef:at}=k,It=wa(k,fI);return[k.context,at,It]},[k]),z=(0,le.useMemo)(()=>I&&I.Consumer&&(0,Ax.isContextConsumer)(le.default.createElement(I.Consumer,null))?I:c,[I,c]),K=(0,le.useContext)(z),J=!!k.store&&!!k.store.getState&&!!k.store.dispatch,oe=!!K&&!!K.store,ze=J?k.store:K.store,pn=oe?K.getServerState:ze.getState,st=(0,le.useMemo)(()=>xg(ze.dispatch,S),[ze]),[_,$]=(0,le.useMemo)(()=>{if(!y)return pI;let at=Ac(ze,J?void 0:K.subscription),It=at.notifyNestedSubs.bind(at);return[at,It]},[ze,J,K]),ar=(0,le.useMemo)(()=>J?K:jn({},K,{subscription:_}),[J,K,_]),ye=(0,le.useRef)(),lr=(0,le.useRef)(N),W=(0,le.useRef)(),ur=(0,le.useRef)(!1),yl=(0,le.useRef)(!1),$o=(0,le.useRef)(!1),Qr=(0,le.useRef)();Ui(()=>($o.current=!0,()=>{$o.current=!1}),[]);let cs=(0,le.useMemo)(()=>()=>W.current&&N===lr.current?W.current:st(ze.getState(),N),[ze,N]),vl=(0,le.useMemo)(()=>It=>_?hI(y,ze,_,st,lr,ye,ur,$o,W,$,It):()=>{},[_]);mI(gI,[lr,ye,ur,N,W,$]);let qt;try{qt=Ix(vl,cs,pn?()=>st(pn(),N):cs)}catch(at){throw Qr.current&&(at.message+=`
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Fe!==5&&(Fe=2),l=Im(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=iw(d,i,t);hS(d,T);break e;case 1:i=l;var C=d.type,k=d.stateNode;if(!(d.flags&64)&&(typeof C.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=sw(d,i,t);hS(d,I);break e}}d=d.return}while(d!==null)}mw(n)}catch(L){t=L,Re===n&&n!==null&&(Re=n=n.return);continue}break}while(1)}function fw(){var e=Nu.current;return Nu.current=Ou,e===null?Ou:e}function Hs(e,t){var n=B;B|=16;var r=fw();et===e&&qe===t||wi(e,t);do try{PR();break}catch(o){dw(e,o)}while(1);if(wm(),B=n,Nu.current=r,Re!==null)throw Error(P(261));return et=null,qe=0,Fe}function PR(){for(;Re!==null;)pw(Re)}function RR(){for(;Re!==null&&!uR();)pw(Re)}function pw(e){var t=hw(e.alternate,e,yo);e.memoizedProps=e.pendingProps,t===null?mw(e):Re=t,Lm.current=null}function mw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=SR(t),n!==null){n.flags&=2047,Re=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=vR(n,t,yo),n!==null){Re=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||yo&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){Re=t;return}Re=t=e}while(t!==null);Fe===0&&(Fe=5)}function ao(e){var t=bi();return ho(99,AR.bind(null,e,t)),null}function AR(e,t){do Ir();while(Gs!==null);if(B&48)throw Error(P(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(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-Tr(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===et&&(Re=et=null,qe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=B,B|=32,Lm.current=null,Xf=ou,s=rS(),Cp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,f=-1,d=-1,p=0,y=0,v=s,g=null;t:for(;;){for(var m;v!==a||i!==0&&v.nodeType!==3||(f=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&&++p===i&&(f=c),g===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Qf={focusedElem:s,selectionRange:a},ou=!1,Xs=null,du=!1,M=r;do try{IR()}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);Xs=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&Zs(M.stateNode,""),h&128){var S=M.alternate;if(S!==null){var x=S.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(h&1038){case 2:zS(M),M.flags&=-3;break;case 6:zS(M),M.flags&=-3,op(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,op(M.alternate,M);break;case 4:op(M.alternate,M);break;case 8:a=M,aw(s,a);var T=a.alternate;US(a),T!==null&&US(T)}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);if(x=Qf,S=rS(),h=x.focusedElem,s=x.selectionRange,S!==h&&h&&h.ownerDocument&&T0(h.ownerDocument.documentElement,h)){for(s!==null&&Cp(h)&&(S=s.start,x=s.end,x===void 0&&(x=S),"selectionStart"in h?(h.selectionStart=S,h.selectionEnd=Math.min(x,h.value.length)):(x=(S=h.ownerDocument||document)&&S.defaultView||window,x.getSelection&&(x=x.getSelection(),a=h.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=nS(h,T),i=nS(h,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(S),x.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),x.addRange(S)))))),S=[],x=h;x=x.parentNode;)x.nodeType===1&&S.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<S.length;h++)x=S[h],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}ou=!!Xf,Qf=Xf=null,e.current=n,M=r;do try{for(h=e;M!==null;){var C=M.flags;if(C&36&&CR(h,M.alternate,M),C&128){S=void 0;var k=M.ref;if(k!==null){var I=M.stateNode;switch(M.tag){case 5:S=I;break;default:S=I}typeof k=="function"?k(S):k.current=S}}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);M=null,dR(),B=o}else e.current=n;if(Pr)Pr=!1,Gs=e,Fs=t;else for(M=r;M!==null;)t=M.nextEffect,M.nextEffect=null,M.flags&8&&(C=M,C.sibling=null,C.stateNode=null),M=t;if(r=e.pendingLanes,r===0&&(yn=null),r===1?e===Wp?Ys++:(Ys=0,Wp=e):Ys=0,n=n.stateNode,mo&&typeof mo.onCommitFiberRoot=="function")try{mo.onCommitFiberRoot(vm,n,void 0,(n.current.flags&64)===64)}catch{}if(Ht(e,We()),Mu)throw Mu=!1,e=Vp,Vp=null,e;return B&8||wn(),null}function IR(){for(;M!==null;){var e=M.alternate;du||Xs===null||(M.flags&8?Vv(M,Xs)&&(du=!0):M.tag===13&&bR(e,M)&&Vv(M,Xs)&&(du=!0));var t=M.flags;t&256&&ER(e,M),!(t&512)||Pr||(Pr=!0,sa(97,function(){return Ir(),null})),M=M.nextEffect}}function Ir(){if(Fs!==90){var e=97<Fs?97:Fs;return Fs=90,ho(e,OR)}return!1}function LR(e,t){Kp.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function gw(e,t){$p.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function OR(){if(Gs===null)return!1;var e=Gs;if(Gs=null,B&48)throw Error(P(331));var t=B;B|=32;var n=$p;$p=[];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(P(330));Cr(i,l)}}for(n=Kp,Kp=[],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(P(330));Cr(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 B=t,wn(),!0}function VS(e,t,n){t=Im(n,t),t=iw(e,t,1),wr(e,t),t=St(),e=Gu(e,1),e!==null&&(ju(e,1,t),Ht(e,t))}function Cr(e,t){if(e.tag===3)VS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){VS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Im(t,e);var o=sw(n,e,1);if(wr(n,o),o=St(),n=Gu(n,1),n!==null)ju(n,1,o),Ht(n,o);else if(typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function NR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=St(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(qe&n)===n&&(Fe===4||Fe===3&&(qe&62914560)===qe&&500>We()-Nm?wi(e,0):Om|=n),Ht(e,t)}function MR(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(Mn===0&&(Mn=Ri),t=ii(62914560&~Mn),t===0&&(t=4194304)):t=bi()===99?1:2:t=1),n=St(),e=Gu(e,t),e!==null&&(ju(e,t,n),Ht(e,n))}var hw;hw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Qt=!0;else if(n&r)Qt=!!(e.flags&16384);else{switch(Qt=!1,t.tag){case 3:AS(t),tp();break;case 5:wS(t);break;case 1:mt(t.type)&&au(t);break;case 4:Lp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ce(Eu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?IS(e,t,n):(Ce(Ee,Ee.current&1),t=Dn(e,t,n),t!==null?t.sibling:null);Ce(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return _S(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(Ee,Ee.current),r)break;return null;case 23:case 24:return t.lanes=0,np(e,t,n)}return Dn(e,t,n)}else Qt=!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=Ci(t,Ge.current),yi(t,n),o=km(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,mt(r)){var i=!0;au(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Em(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Tu(t,r,s,e),o.updater=Wu,t.stateNode=o,o._reactInternals=t,Ip(t,r,e,n),t=_p(null,t,r,!0,i,n)}else t.tag=0,ft(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=DR(o),e=Xt(o,e),i){case 0:t=Mp(null,t,o,e,n);break e;case 1:t=RS(null,t,o,e,n);break e;case 11:t=kS(null,t,o,e,n);break e;case 14:t=PS(null,t,o,Xt(o.type,e),r,n);break e}throw Error(P(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),Mp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),RS(e,t,r,o,n);case 3:if(AS(t),r=t.updateQueue,e===null||r===null)throw Error(P(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,z0(e,t),aa(t,r,null,n),r=t.memoizedState.element,r===o)tp(),t=Dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(gr=hi(t.stateNode.containerInfo.firstChild),_n=t,i=Sn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],vi.push(i);for(n=$0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ft(e,t,r,n),tp();t=t.child}return t;case 5:return wS(t),e===null&&Op(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,kp(r,o)?s=null:i!==null&&kp(r,i)&&(t.flags|=16),tw(e,t),ft(e,t,s,n),t.child;case 6:return e===null&&Op(t),null;case 13:return IS(e,t,n);case 4:return Lp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ku(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),kS(e,t,r,o,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(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(Ce(Eu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Mt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!pt.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=Sr(-1,n&-n),u.tag=2,wr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),j0(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}ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,yi(t,n),o=Ft(o,i.unstable_observedBits),r=r(o),t.flags|=1,ft(e,t,r,n),t.child;case 14:return o=t.type,i=Xt(o,t.pendingProps),i=Xt(o.type,i),PS(e,t,o,i,r,n);case 15:return ew(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mt(r)?(e=!0,au(t)):e=!1,yi(t,n),V0(t,r,o),Ip(t,r,o,n),_p(null,t,r,!0,e,n);case 19:return _S(e,t,n);case 23:return np(e,t,n);case 24:return np(e,t,n)}throw Error(P(156,t.tag))};function _R(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 _t(e,t,n,r){return new _R(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function DR(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===Hu)return 14}return 2}function Rr(e,t){var n=e.alternate;return n===null?(n=_t(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 fu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")_m(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fr:return xi(n.children,o,i,t);case WS:s=8,o|=16;break;case Qp:s=8,o|=1;break;case Us:return e=_t(12,n,t,o|8),e.elementType=Us,e.type=Us,e.lanes=i,e;case js:return e=_t(13,n,t,o),e.type=js,e.elementType=js,e.lanes=i,e;case pu:return e=_t(19,n,t,o),e.elementType=pu,e.lanes=i,e;case rm:return Dm(n,o,i,t);case lp:return e=_t(24,n,t,o),e.elementType=lp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:s=10;break e;case Jp:s=9;break e;case Fu:s=11;break e;case Hu:s=14;break e;case em:s=16,r=null;break e;case tm:s=22;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=_t(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function xi(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Dm(e,t,n,r){return e=_t(23,e,r,t),e.elementType=rm,e.lanes=n,e}function ip(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function sp(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function FR(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=Kf(0),this.expirationTimes=Kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kf(0),this.mutableSourceEagerHydrationData=null}function HR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _u(e,t,n,r){var o=t.current,i=St(),s=xr(o);e:if(n){n=n._reactInternals;t:{if(wo(n)!==n||n.tag!==1)throw Error(P(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(P(171))}if(n.tag===1){var l=n.type;if(mt(l)){n=N0(n,l,a);break e}}n=a}else n=kr;return t.context===null?t.context=n:t.pendingContext=n,t=Sr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),wr(o,t),Er(o,s,i),s}function ap(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 KS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fm(e,t){KS(e,t),(e=e.alternate)&&KS(e,t)}function UR(){return null}function Hm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new FR(e,t,n!=null&&n.hydrate===!0),t=_t(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Em(t),e[Pi]=n.current,R0(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}Hm.prototype.render=function(e){_u(e,this._internalRoot,null,null)};Hm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;_u(null,e,null,function(){t[Pi]=null})};function ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jR(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 Hm(e,0,t?{hydrate:!0}:void 0)}function Yu(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=ap(s);a.call(u)}}_u(t,s,e,o)}else{if(i=n._reactRootContainer=jR(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=ap(s);l.call(u)}}cw(function(){_u(t,s,e,o)})}return ap(s)}a0=function(e){if(e.tag===13){var t=St();Er(e,4,t),Fm(e,4)}};lm=function(e){if(e.tag===13){var t=St();Er(e,67108864,t),Fm(e,67108864)}};l0=function(e){if(e.tag===13){var t=St(),n=xr(e);Er(e,n,t),Fm(e,n)}};u0=function(e,t){return t()};vp=function(e,t,n){switch(t){case"input":if(cp(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=Ku(r);if(!o)throw Error(P(90));GS(r),cp(r,o)}}}break;case"textarea":XS(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};im=uw;r0=function(e,t,n,r,o){var i=B;B|=4;try{return ho(98,e.bind(null,t,n,r,o))}finally{B=i,B===0&&(Ii(),wn())}};sm=function(){!(B&49)&&(kR(),Ir())};o0=function(e,t){var n=B;B|=2;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}};function yw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(P(200));return HR(e,t,null,n)}var zR={Events:[fa,ui,Ku,t0,n0,Ir,{current:!1}]},Os={findFiberByHostInstance:co,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},BR={bundleType:Os.bundleType,version:Os.version,rendererPackageName:Os.rendererPackageName,rendererConfig:Os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:So.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=s0(e),e===null?null:e.stateNode},findFiberByHostInstance:Os.findFiberByHostInstance||UR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ns.isDisabled&&Ns.supportsFiber))try{vm=Ns.inject(BR),mo=Ns}catch{}var Ns;Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zR;Ut.createPortal=yw;Ut.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(P(188)):Error(P(268,Object.keys(e)));return e=s0(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e,t){var n=B;if(n&48)return e(t);B|=1;try{if(e)return ho(99,e.bind(null,t))}finally{B=n,wn()}};Ut.hydrate=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!0,n)};Ut.render=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!ga(e))throw Error(P(40));return e._reactRootContainer?(cw(function(){Yu(null,null,e,!1,function(){e._reactRootContainer=null,e[Pi]=null})}),!0):!1};Ut.unstable_batchedUpdates=uw;Ut.unstable_createPortal=function(e,t){return yw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ga(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Yu(e,t,n,!1,r)};Ut.version="17.0.2"});var Xu=be((Q_,ww)=>{"use strict";function Sw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Sw)}catch(e){console.error(e)}}Sw(),ww.exports=vw()});var Gw=be(qw=>{"use strict";var Di=F();function kA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var PA=typeof Object.is=="function"?Object.is:kA,RA=Di.useState,AA=Di.useEffect,IA=Di.useLayoutEffect,LA=Di.useDebugValue;function OA(e,t){var n=t(),r=RA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return IA(function(){o.value=n,o.getSnapshot=t,dg(o)&&i({inst:o})},[e,n,t]),AA(function(){return dg(o)&&i({inst:o}),e(function(){dg(o)&&i({inst:o})})},[e]),LA(n),n}function dg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!PA(e,n)}catch{return!0}}function NA(e,t){return t()}var MA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?NA:OA;qw.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:MA});var fg=be((H2,Yw)=>{"use strict";Yw.exports=Gw()});var Qw=be(Xw=>{"use strict";var oc=F(),_A=fg();function DA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FA=typeof Object.is=="function"?Object.is:DA,HA=_A.useSyncExternalStore,UA=oc.useRef,jA=oc.useEffect,zA=oc.useMemo,BA=oc.useDebugValue;Xw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=UA(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=zA(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return f=y}return f=p}if(y=f,FA(c,p))return y;var v=r(p);return o!==void 0&&o(y,v)?y:(c=p,f=v)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=HA(e,i[0],i[1]);return jA(function(){s.hasValue=!0,s.value=a},[a]),BA(a),a}});var Jw=be((j2,Zw)=>{"use strict";Zw.exports=Qw()});var cx=be(ie=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,mg=_e?Symbol.for("react.element"):60103,gg=_e?Symbol.for("react.portal"):60106,lc=_e?Symbol.for("react.fragment"):60107,uc=_e?Symbol.for("react.strict_mode"):60108,cc=_e?Symbol.for("react.profiler"):60114,dc=_e?Symbol.for("react.provider"):60109,fc=_e?Symbol.for("react.context"):60110,hg=_e?Symbol.for("react.async_mode"):60111,pc=_e?Symbol.for("react.concurrent_mode"):60111,mc=_e?Symbol.for("react.forward_ref"):60112,gc=_e?Symbol.for("react.suspense"):60113,WA=_e?Symbol.for("react.suspense_list"):60120,hc=_e?Symbol.for("react.memo"):60115,yc=_e?Symbol.for("react.lazy"):60116,qA=_e?Symbol.for("react.block"):60121,GA=_e?Symbol.for("react.fundamental"):60117,YA=_e?Symbol.for("react.responder"):60118,XA=_e?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mg:switch(e=e.type,e){case hg:case pc:case lc:case cc:case uc:case gc:return e;default:switch(e=e&&e.$$typeof,e){case fc:case mc:case yc:case hc:case dc:return e;default:return t}}case gg:return t}}}function ux(e){return Et(e)===pc}ie.AsyncMode=hg;ie.ConcurrentMode=pc;ie.ContextConsumer=fc;ie.ContextProvider=dc;ie.Element=mg;ie.ForwardRef=mc;ie.Fragment=lc;ie.Lazy=yc;ie.Memo=hc;ie.Portal=gg;ie.Profiler=cc;ie.StrictMode=uc;ie.Suspense=gc;ie.isAsyncMode=function(e){return ux(e)||Et(e)===hg};ie.isConcurrentMode=ux;ie.isContextConsumer=function(e){return Et(e)===fc};ie.isContextProvider=function(e){return Et(e)===dc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mg};ie.isForwardRef=function(e){return Et(e)===mc};ie.isFragment=function(e){return Et(e)===lc};ie.isLazy=function(e){return Et(e)===yc};ie.isMemo=function(e){return Et(e)===hc};ie.isPortal=function(e){return Et(e)===gg};ie.isProfiler=function(e){return Et(e)===cc};ie.isStrictMode=function(e){return Et(e)===uc};ie.isSuspense=function(e){return Et(e)===gc};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lc||e===pc||e===cc||e===uc||e===gc||e===WA||typeof e=="object"&&e!==null&&(e.$$typeof===yc||e.$$typeof===hc||e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===mc||e.$$typeof===GA||e.$$typeof===YA||e.$$typeof===XA||e.$$typeof===qA)};ie.typeOf=Et});var fx=be((eD,dx)=>{"use strict";dx.exports=cx()});var Sx=be((tD,vx)=>{"use strict";var yg=fx(),QA={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ZA={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},JA={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vg={};vg[yg.ForwardRef]=JA;vg[yg.Memo]=hx;function px(e){return yg.isMemo(e)?hx:vg[e.$$typeof]||QA}var eI=Object.defineProperty,tI=Object.getOwnPropertyNames,mx=Object.getOwnPropertySymbols,nI=Object.getOwnPropertyDescriptor,rI=Object.getPrototypeOf,gx=Object.prototype;function yx(e,t,n){if(typeof t!="string"){if(gx){var r=rI(t);r&&r!==gx&&yx(e,r,n)}var o=tI(t);mx&&(o=o.concat(mx(t)));for(var i=px(e),s=px(t),a=0;a<o.length;++a){var l=o[a];if(!ZA[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=nI(t,l);try{eI(e,l,u)}catch{}}}}return e}vx.exports=yx});var xx=be(se=>{"use strict";var Sg=Symbol.for("react.element"),wg=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),Sc=Symbol.for("react.strict_mode"),wc=Symbol.for("react.profiler"),xc=Symbol.for("react.provider"),Ec=Symbol.for("react.context"),oI=Symbol.for("react.server_context"),Cc=Symbol.for("react.forward_ref"),bc=Symbol.for("react.suspense"),Tc=Symbol.for("react.suspense_list"),kc=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),iI=Symbol.for("react.offscreen"),wx;wx=Symbol.for("react.module.reference");function zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sg:switch(e=e.type,e){case vc:case wc:case Sc:case bc:case Tc:return e;default:switch(e=e&&e.$$typeof,e){case oI:case Ec:case Cc:case Pc:case kc:case xc:return e;default:return t}}case wg:return t}}}se.ContextConsumer=Ec;se.ContextProvider=xc;se.Element=Sg;se.ForwardRef=Cc;se.Fragment=vc;se.Lazy=Pc;se.Memo=kc;se.Portal=wg;se.Profiler=wc;se.StrictMode=Sc;se.Suspense=bc;se.SuspenseList=Tc;se.isAsyncMode=function(){return!1};se.isConcurrentMode=function(){return!1};se.isContextConsumer=function(e){return zt(e)===Ec};se.isContextProvider=function(e){return zt(e)===xc};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sg};se.isForwardRef=function(e){return zt(e)===Cc};se.isFragment=function(e){return zt(e)===vc};se.isLazy=function(e){return zt(e)===Pc};se.isMemo=function(e){return zt(e)===kc};se.isPortal=function(e){return zt(e)===wg};se.isProfiler=function(e){return zt(e)===wc};se.isStrictMode=function(e){return zt(e)===Sc};se.isSuspense=function(e){return zt(e)===bc};se.isSuspenseList=function(e){return zt(e)===Tc};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vc||e===wc||e===Sc||e===bc||e===Tc||e===iI||typeof e=="object"&&e!==null&&(e.$$typeof===Pc||e.$$typeof===kc||e.$$typeof===xc||e.$$typeof===Ec||e.$$typeof===Cc||e.$$typeof===wx||e.getModuleId!==void 0)};se.typeOf=zt});var Cx=be((rD,Ex)=>{"use strict";Ex.exports=xx()});var Qg=be((P4,ZE)=>{"use strict";var dL="Expected a function",XE=NaN,fL="[object Symbol]",pL=/^\s+|\s+$/g,mL=/^[-+]0x[0-9a-f]+$/i,gL=/^0b[01]+$/i,hL=/^0o[0-7]+$/i,yL=parseInt,vL=typeof global=="object"&&global&&global.Object===Object&&global,SL=typeof self=="object"&&self&&self.Object===Object&&self,wL=vL||SL||Function("return this")(),xL=Object.prototype,EL=xL.toString,CL=Math.max,bL=Math.min,Yg=function(){return wL.Date.now()};function TL(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(dL);t=QE(t)||0,Xg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?CL(QE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(C){var k=r,I=o;return r=o=void 0,u=C,s=e.apply(I,k),s}function y(C){return u=C,a=setTimeout(m,t),c?p(C):s}function v(C){var k=C-l,I=C-u,L=t-k;return f?bL(L,i-I):L}function g(C){var k=C-l,I=C-u;return l===void 0||k>=t||k<0||f&&I>=i}function m(){var C=Yg();if(g(C))return h(C);a=setTimeout(m,v(C))}function h(C){return a=void 0,d&&r?p(C):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:h(Yg())}function T(){var C=Yg(),k=g(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return y(l);if(f)return a=setTimeout(m,t),p(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=S,T.flush=x,T}function Xg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function kL(e){return!!e&&typeof e=="object"}function PL(e){return typeof e=="symbol"||kL(e)&&EL.call(e)==fL}function QE(e){if(typeof e=="number")return e;if(PL(e))return XE;if(Xg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(pL,"");var n=gL.test(e);return n||hL.test(e)?yL(e.slice(2),n?2:8):mL.test(e)?XE:+e}ZE.exports=TL});var aC=be((W4,sC)=>{"use strict";var ML=/["'&<>]/;sC.exports=_L;function _L(e){var t=""+e,n=ML.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="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";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 qM={};Je(qM,{Card:()=>pe,ContentEditableInput:()=>Bo,DeepdeskAPI:()=>sr,DeepdeskSDK:()=>hl,HTTPClient:()=>fn,InputMediator:()=>ir,InputType:()=>io,KeyboardHint:()=>Nl,Label:()=>Ml,Locale:()=>Ca,Section:()=>Ln,SectionList:()=>_l,Sources:()=>On,Suggestion:()=>ae,SuggestionList:()=>vt,TextAreaInput:()=>Vo,ToggleButton:()=>oo,attachFile:()=>q1,authenticateWithKey:()=>$1,createFullRange:()=>ss,createOverlayContainer:()=>gl,createRangeFromOffsets:()=>Xr,escapeHTML:()=>Wi,fetchPlatformConfig:()=>W1,formatTextMarkup:()=>K1,getRangeOffsets:()=>dl,getRangeText:()=>fl,insertCKEditor:()=>V1,isHTML:()=>vd,isSupportedInputElement:()=>uf,updateContentEditable:()=>z1,updateTextArea:()=>j1,useStyles:()=>A,waitForElementVisibilityChange:()=>ff});var Pf=w(te()),Ot=w(F());var Al=w(F()),ev=w(te()),gs=Al.default.createContext({});function A(e,t){let{debug:n,...r}=(0,Al.useContext)(gs),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,ev.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var tv={root:"uo"};var eo=w(b()),Il=()=>(0,eo.jsxs)("svg",{className:tv.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,eo.jsx)("defs",{children:(0,eo.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,eo.jsx)("title",{children:"Failed loading image"}),(0,eo.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 kf={root:"yo",imageWrapper:"G",image:"wo",content:"m",title:"vo",contentIsCropped:"ko",lineClamp:"zo"};var to=w(b()),Ll=(0,Ot.createContext)(kf),bk=({title:e,src:t})=>{let n=(0,Ot.useContext)(Ll),[r,o]=(0,Ot.useState)(!1);return(0,Ot.useEffect)(()=>{o(!1)},[t]),(0,to.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,to.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,to.jsx)(Il,{})})},Tk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Ot.useContext)(Ll);return(0,to.jsx)("div",{className:(0,Pf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},kk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Ot.useContext)(Ll);return Ot.default.createElement(e,{className:(0,Pf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ol=({children:e})=>{let t=A("Card",kf);return(0,to.jsx)("div",{className:t.root,children:(0,to.jsx)(Ll.Provider,{value:t,children:e})})};Ol.Image=bk;Ol.Content=Tk;Ol.Title=kk;var pe=Ol;var av=w(te());var sv={root:"N"};var lv=w(b());var Rk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},Ak=({className:e,keyCode:t,...n})=>{let r=A("KeyboardHint",sv);return(0,lv.jsx)("span",{"data-key":Rk[t],className:(0,av.default)(e,r.root),...n})},Nl=Ak;var cv=w(te());var uv={root:"jo"};var dv=w(b()),Lk=({className:e,children:t,...n})=>{let r=A("Label",uv);return(0,dv.jsx)("span",{...n,className:(0,cv.default)(e,r.root),children:t})},Ml=Lk;var fv={root:"qo",subTitleContainer:"Co",subtitle:"So",suggestions:"Eo"};var Zo=w(b()),Nk=({title:e,children:t,type:n,...r})=>{let o=A("Section",fv);return(0,Zo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,Zo.jsx)("div",{className:o.subTitleContainer,children:(0,Zo.jsx)("span",{className:o.subtitle,children:e})}),(0,Zo.jsx)("div",{className:o.suggestions,children:t})]})},Ln=Nk;var mv=w(te()),gv=w(F());var pv={root:"Go"};var hv=w(b()),_k=gv.default.forwardRef(({className:e,children:t},n)=>{let r=A("SectionList",pv);return(0,hv.jsx)("div",{ref:n,className:(0,mv.default)(r.root,e),children:t})}),_l=_k;var Jo=w(te()),yt=w(F());var ys=w(b()),yv=({className:e})=>(0,ys.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,ys.jsx)("line",{x1:"1",y1:"11",x2:"11",y2:"1",stroke:"black",strokeWidth:"2"}),(0,ys.jsx)("line",{x1:"1",y1:"1",x2:"11",y2:"11",stroke:"black",strokeWidth:"2"})]});var Rf={fadein:"Y",root:"e",isClickable:"A",isSelected:"No",actions:"F",actionsIsFixed:"Yo",actionButton:"t",dropdownList:"H",dropdownButton:"L",dropdownItem:"M",dropdownItemButton:"R",actionButtonIsPrimary:"Ao",actionButtonIsDisabled:"Fo",labels:"Ho",label:"Lo",closeIcon:"n"};var ct=w(b()),no=(0,yt.createContext)(Rf),Fk=({fixed:e,children:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{...n,className:(0,Jo.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},Hk=({className:e,title:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:(0,Jo.default)(r.closeIcon,e),title:t,role:"button","aria-label":t,...n,children:(0,ct.jsx)(yv,{})})},Uk=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsxs)("div",{className:(0,Jo.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,ct.jsx)("ul",{className:i.dropdownList,children:o})]})},jk=({index:e,label:t,onClick:n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("li",{className:r.dropdownItem,children:(0,ct.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},zk=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsx)("button",{type:"button",className:(0,Jo.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Bk=({labels:e})=>{let t=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:t.labels,children:e.map(n=>(0,ct.jsx)("span",{className:t.label,children:n},n))})},ro=yt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=A("Suggestion",Rf),l=(0,yt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,ct.jsx)(o,{...i,ref:s,className:(0,Jo.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,ct.jsx)(no.Provider,{value:a,children:r})})});ro.Labels=Bk;ro.Actions=Fk;ro.ActionButton=zk;ro.DropdownButton=Uk;ro.DropdownItem=jk;ro.CloseIcon=Hk;var ae=ro;var Sv=w(te());var vv={root:"Mo",isWithDivider:"Ro"};var wv=w(b()),Kk=({withDivider:e,children:t})=>{let n=A("SuggestionList",vv);return(0,wv.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Sv.default)(n.root,{[n.isWithDivider]:e}),children:t})},vt=Kk;var Ev=w(te());var xv={root:"u",isCollapsed:"T"};var Dl=w(b()),Wk=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=A("ToggleButton",xv);return(0,Dl.jsx)("button",{type:"button",className:(0,Ev.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Dl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Dl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},oo=Wk;var Cv=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Fl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var bv=/x-deepdesk-(([a-z0-9\-_])+-version)/,On=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v))(On||{}),io=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(io||{});var Wt=w(Xu());var ib=w(F());function jt(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 Un(e){return!!e&&!!e[Se]}function Zt(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)===XR}(e)||Array.isArray(e)||!!e[Pw]||!!(!((t=e.constructor)===null||t===void 0)&&t[Pw])||qm(e)||Gm(e))}function Eo(e,t,n){n===void 0&&(n=!1),Ni(e)===0?(n?Object.keys:Oi)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Ni(e){var t=e[Se];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:qm(e)?2:Gm(e)?3:0}function Li(e,t){return Ni(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function VR(e,t){return Ni(e)===2?e.get(t):e[t]}function Rw(e,t,n){var r=Ni(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Aw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function qm(e){return GR&&e instanceof Map}function Gm(e){return YR&&e instanceof Set}function Lr(e){return e.o||e.t}function Ym(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Ow(e);delete t[Se];for(var n=Oi(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 Xm(e,t){return t===void 0&&(t=!1),Qm(e)||Un(e)||!Zt(e)||(Ni(e)>1&&(e.set=e.add=e.clear=e.delete=KR),Object.freeze(e),t&&Eo(e,function(n,r){return Xm(r,!0)},!0)),e}function KR(){jt(2)}function Qm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function xn(e){var t=Wm[e];return t||jt(18,e),t}function $R(e,t){Wm[e]||(Wm[e]=t)}function Vm(){return ya}function Um(e,t){t&&(xn("Patches"),e.u=[],e.s=[],e.v=t)}function Qu(e){Km(e),e.p.forEach(WR),e.p=null}function Km(e){e===ya&&(ya=e.l)}function xw(e){return ya={p:[],l:ya,h:e,m:!0,_:0}}function WR(e){var t=e[Se];t.i===0||t.i===1?t.j():t.g=!0}function jm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||xn("ES5").S(t,e,r),r?(n[Se].P&&(Qu(t),jt(4)),Zt(e)&&(e=Zu(t,e),t.l||Ju(t,e)),t.u&&xn("Patches").M(n[Se].t,e,t.u,t.s)):e=Zu(t,n,[]),Qu(t),t.u&&t.v(t.u,t.s),e!==Lw?e:void 0}function Zu(e,t,n){if(Qm(t))return t;var r=t[Se];if(!r)return Eo(t,function(a,l){return Ew(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Ju(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Ym(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Eo(i,function(a,l){return Ew(e,r,o,a,l,n,s)}),Ju(e,o,!1),n&&e.u&&xn("Patches").N(r,n,e.u,e.s)}return r.o}function Ew(e,t,n,r,o,i,s){if(Un(o)){var a=Zu(e,o,i&&t&&t.i!==3&&!Li(t.R,r)?i.concat(r):void 0);if(Rw(n,r,a),!Un(a))return;e.m=!1}else s&&n.add(o);if(Zt(o)&&!Qm(o)){if(!e.h.D&&e._<1)return;Zu(e,o),t&&t.A.l||Ju(e,o)}}function Ju(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Xm(t,n)}function zm(e,t){var n=e[Se];return(n?Lr(n):e)[t]}function Cw(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 Or(e){e.P||(e.P=!0,e.l&&Or(e.l))}function Bm(e){e.o||(e.o=Ym(e.t))}function $m(e,t,n){var r=qm(t)?xn("MapSet").F(t,n):Gm(t)?xn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Vm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=va;s&&(l=[a],u=ha);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):xn("ES5").J(t,n);return(n?n.A:Vm()).p.push(r),r}function qR(e){return Un(e)||jt(22,e),function t(n){if(!Zt(n))return n;var r,o=n[Se],i=Ni(n);if(o){if(!o.P&&(o.i<4||!xn("ES5").K(o)))return o.t;o.I=!0,r=bw(n,i),o.I=!1}else r=bw(n,i);return Eo(r,function(s,a){o&&VR(o.t,s)===a||Rw(r,s,t(a))}),i===3?new Set(r):r}(e)}function bw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ym(e)}function Iw(){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[Se];return va.get(u,s)},set:function(u){var c=this[Se];va.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Se];if(!l.P)switch(l.i){case 5:r(l)&&Or(l);break;case 4:n(l)&&Or(l)}}}function n(s){for(var a=s.t,l=s.k,u=Oi(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==Se){var d=a[f];if(d===void 0&&!Li(a,f))return!0;var p=l[f],y=p&&p[Se];if(y?y.t!==d:!Aw(p,d))return!0}}var v=!!a[Se];return u.length!==Oi(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&&jt(3,JSON.stringify(Lr(s)))}var i={};$R("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var p=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(p,""+y,e(y,!0));return p}var v=Ow(d);delete v[Se];for(var g=Oi(v),m=0;m<g.length;m++){var h=g[m];v[h]=e(h,f||!!v[h].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:Vm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Se,{value:c,writable:!0}),u},S:function(s,a,l){l?Un(a)&&a[Se].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[Se];if(f){var d=f.t,p=f.k,y=f.R,v=f.i;if(v===4)Eo(p,function(x){x!==Se&&(d[x]!==void 0||Li(d,x)?y[x]||u(p[x]):(y[x]=!0,Or(f)))}),Eo(d,function(x){p[x]!==void 0||Li(p,x)||(y[x]=!1,Or(f))});else if(v===5){if(r(f)&&(Or(f),y.length=!0),p.length<d.length)for(var g=p.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<p.length;m++)y[m]=!0;for(var h=Math.min(p.length,d.length),S=0;S<h;S++)p.hasOwnProperty(S)||(y[S]=!0),y[S]===void 0&&u(p[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var Tw,ya,Zm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",GR=typeof Map<"u",YR=typeof Set<"u",kw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Lw=Zm?Symbol.for("immer-nothing"):((Tw={})["immer-nothing"]=!0,Tw),Pw=Zm?Symbol.for("immer-draftable"):"__$immer_draftable",Se=Zm?Symbol.for("immer-state"):"__$immer_state";var XR=""+Object.prototype.constructor,Oi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Ow=Object.getOwnPropertyDescriptors||function(e){var t={};return Oi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Wm={},va={get:function(e,t){if(t===Se)return e;var n=Lr(e);if(!Li(n,t))return function(o,i,s){var a,l=Cw(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||!Zt(r)?r:r===zm(e.t,t)?(Bm(e),e.o[t]=$m(e.A.h,r,e)):r},has:function(e,t){return t in Lr(e)},ownKeys:function(e){return Reflect.ownKeys(Lr(e))},set:function(e,t,n){var r=Cw(Lr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=zm(Lr(e),t),i=o==null?void 0:o[Se];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Aw(n,o)&&(n!==void 0||Li(e.t,t)))return!0;Bm(e),Or(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 zm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bm(e),Or(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Lr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){jt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){jt(12)}},ha={};Eo(va,function(e,t){ha[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ha.deleteProperty=function(e,t){return ha.set.call(this,e,t,void 0)},ha.set=function(e,t,n){return va.set.call(this,e[0],t,n,e[0])};var QR=function(){function e(n){var r=this;this.O=kw,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,h=Array(m>1?m-1:0),S=1;S<m;S++)h[S-1]=arguments[S];return l.produce(v,function(x){var T;return(T=i).call.apply(T,[g,x].concat(h))})}}var u;if(typeof i!="function"&&jt(6),s!==void 0&&typeof s!="function"&&jt(7),Zt(o)){var c=xw(r),f=$m(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Qu(c):Km(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Um(c,s),jm(v,c)},function(v){throw Qu(c),v}):(Um(c,s),jm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===Lw&&(u=void 0),r.D&&Xm(u,!0),s){var p=[],y=[];xn("Patches").M(o,u,p,y),s(p,y)}return u}jt(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(p){return o.apply(void 0,[p].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Zt(n)||jt(8),Un(n)&&(n=qR(n));var r=xw(this),o=$m(this,n,void 0);return o[Se].C=!0,Km(r),o},t.finishDraft=function(n,r){var o=n&&n[Se],i=o.A;return Um(i,r),jm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!kw&&jt(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=xn("Patches").$;return Un(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),xt=new QR,ZR=xt.produce,Z_=xt.produceWithPatches.bind(xt),J_=xt.setAutoFreeze.bind(xt),e2=xt.setUseProxies.bind(xt),t2=xt.applyPatches.bind(xt),n2=xt.createDraft.bind(xt),r2=xt.finishDraft.bind(xt),ec=ZR;function Nr(e){"@babel/helpers - typeof";return Nr=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},Nr(e)}function Jm(e,t){if(Nr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e){var t=Jm(e,"string");return Nr(t)==="symbol"?t:String(t)}function tg(e,t,n){return t=eg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nw(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 tc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nw(Object(n),!0).forEach(function(r){tg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ye(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 Mw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ng=function(){return Math.random().toString(36).substring(7).split("").join(".")},nc={INIT:"@@redux/INIT"+ng(),REPLACE:"@@redux/REPLACE"+ng(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ng()}};function JR(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 rg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ye(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ye(1));return n(rg)(e,t)}if(typeof e!="function")throw new Error(Ye(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(Ye(3));return i}function f(v){if(typeof v!="function")throw new Error(Ye(4));if(l)throw new Error(Ye(5));var g=!0;return u(),a.push(v),function(){if(g){if(l)throw new Error(Ye(6));g=!1,u();var h=a.indexOf(v);a.splice(h,1),s=null}}}function d(v){if(!JR(v))throw new Error(Ye(7));if(typeof v.type>"u")throw new Error(Ye(8));if(l)throw new Error(Ye(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var h=g[m];h()}return v}function p(v){if(typeof v!="function")throw new Error(Ye(10));o=v,d({type:nc.REPLACE})}function y(){var v,g=f;return v={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ye(11));function S(){h.next&&h.next(c())}S();var x=g(S);return{unsubscribe:x}}},v[Mw]=function(){return this},v}return d({type:nc.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:p},r[Mw]=y,r}function eA(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:nc.INIT});if(typeof r>"u")throw new Error(Ye(12));if(typeof n(void 0,{type:nc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ye(13))})}function rc(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{eA(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,p={},y=0;y<i.length;y++){var v=i[y],g=n[v],m=u[v],h=g(m,c);if(typeof h>"u"){var S=c&&c.type;throw new Error(Ye(14))}p[v]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Mi(){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 _w(){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(Ye(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Mi.apply(void 0,a)(o.dispatch),tc(tc({},o),{},{dispatch:i})}}}function Dw(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 Fw=Dw();Fw.withExtraArgument=Dw;var og=Fw;var Bw=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)}}(),tA=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}}},_i=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},nA=Object.defineProperty,rA=Object.defineProperties,oA=Object.getOwnPropertyDescriptors,Hw=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,Uw=function(e,t,n){return t in e?nA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mr=function(e,t){for(var n in t||(t={}))iA.call(t,n)&&Uw(e,n,t[n]);if(Hw)for(var r=0,o=Hw(t);r<o.length;r++){var n=o[r];sA.call(t,n)&&Uw(e,n,t[n])}return e},ig=function(e,t){return rA(e,oA(t))},aA=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 lA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mi:Mi.apply(null,arguments)},x2=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function uA(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 cA=function(e){Bw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array),dA=function(e){Bw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array);function lg(e){return Zt(e)?ec(e,function(){}):e}function fA(e){return typeof e=="boolean"}function pA(){return function(t){return mA(t)}}function mA(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 cA;if(n&&(fA(n)?a.push(og):a.push(og.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var sg=!0;function Vw(e){var t=pA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,f=n.enhancers,d=f===void 0?void 0:f,p;if(typeof o=="function")p=o;else if(uA(o))p=rc(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),!sg&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!sg&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=_w.apply(void 0,y),g=Mi;l&&(g=lA(Mr({trace:!sg},typeof l=="object"&&l)));var m=new dA(v),h=m;Array.isArray(d)?h=_i([v],d):typeof d=="function"&&(h=d(m));var S=g.apply(void 0,h);return rg(p,c,S)}function xe(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 Mr(Mr({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 Kw(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 gA(e){return typeof e=="function"}function hA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?Kw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(gA(e))l=function(){return lg(e())};else{var u=lg(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var p=_i([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return p.filter(function(y){return!!y}).length===0&&(p=[a]),p.reduce(function(y,v){if(v)if(Un(y)){var g=y,m=v(g,d);return m===void 0?y:m}else{if(Zt(y))return ec(y,function(h){return v(h,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},f)}return c.getInitialState=l,c}function yA(e,t){return e+"/"+t}function q(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:lg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=yA(t,c),p,y;"reducer"in f?(p=f.reducer,y=f.prepare):p=f,i[c]=p,s[d]=p,a[c]=y?xe(d,y):xe(d)});function l(){var c=typeof e.extraReducers=="function"?Kw(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,p=c[1],y=p===void 0?[]:p,v=c[2],g=v===void 0?void 0:v,m=Mr(Mr({},d),s);return hA(n,function(h){for(var S in m)h.addCase(S,m[S]);for(var x=0,T=y;x<T.length;x++){var C=T[x];h.addMatcher(C.matcher,C.reducer)}g&&h.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var vA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",SA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=vA[Math.random()*64|0];return t},wA=["name","message","stack","code"],ag=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),jw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),xA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=wA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},j=function(){function e(t,n,r){var o=xe(t+"/fulfilled",function(c,f,d,p){return{payload:c,meta:ig(Mr({},p||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=xe(t+"/pending",function(c,f,d){return{payload:void 0,meta:ig(Mr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=xe(t+"/rejected",function(c,f,d,p,y){return{payload:p,error:(r&&r.serializeError||xA)(c||"Rejected"),meta:ig(Mr({},y||{}),{arg:d,requestId:f,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(f,d,p){var y=r!=null&&r.idGenerator?r.idGenerator(c):SA(),v=new l,g,m=!1;function h(x){g=x,v.abort()}var S=function(){return aA(this,null,function(){var x,T,C,k,I,L,N;return tA(this,function(z){switch(z.label){case 0:return z.trys.push([0,4,,5]),k=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:p}),CA(k)?[4,k]:[3,2];case 1:k=z.sent(),z.label=2;case 2:if(k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(K,ee){return v.signal.addEventListener("abort",function(){return ee({name:"AbortError",message:g||"Aborted"})})}),f(i(y,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:y,arg:c},{getState:d,extra:p}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:f,getState:d,extra:p,requestId:y,signal:v.signal,abort:h,rejectWithValue:function(K,ee){return new ag(K,ee)},fulfillWithValue:function(K,ee){return new jw(K,ee)}})).then(function(K){if(K instanceof ag)throw K;return K instanceof jw?o(K.payload,y,c,K.meta):o(K,y,c)})])];case 3:return C=z.sent(),[3,5];case 4:return L=z.sent(),C=L instanceof ag?s(null,y,c,L.payload,L.meta):s(L,y,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,N||f(C),[2,C]}})})}();return Object.assign(S,{abort:h,requestId:y,arg:c,unwrap:function(){return S.then(EA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function EA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function CA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var bA="task",$w="listener",Ww="completed",ug="cancelled",T2="task-"+ug,k2="task-"+Ww,P2=$w+"-"+ug,R2=$w+"-"+Ww,A2=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=bA+" "+ug+" (reason: "+t+")"}return e}();var cg="listenerMiddleware";var I2=xe(cg+"/add"),L2=xe(cg+"/removeAll"),O2=xe(cg+"/remove");var zw,N2=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(zw||(zw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},TA=function(e){return function(t){setTimeout(t,e)}},M2=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:TA(10);Iw();var Mx=w(fg()),_x=w(Jw());var pg=w(Xu());function VA(e){e()}var ex=VA,tx=e=>ex=e,nx=()=>ex;var Fi=w(F());var ix=w(F());var ic=w(F()),rx=Symbol.for(`react-redux-context-${ic.version}`),ox=globalThis;function KA(){let e=ox[rx];return e||(e=(0,ic.createContext)(null),ox[rx]=e),e}var Xe=new Proxy({},new Proxy({},{get(e,t){let n=KA();return(r,...o)=>Reflect[t](n,...o)}}));function Sa(e=Xe){return function(){return(0,ix.useContext)(e)}}var sc=Sa();var ac=()=>{throw new Error("uSES not initialized!")};var sx=ac,ax=e=>{sx=e},$A=(e,t)=>e===t;function lx(e=Xe){let t=e===Xe?sc:Sa(e);return function(r,o={}){let{equalityFn:i=$A,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),p=(0,Fi.useRef)(!0),y=(0,Fi.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),v=sx(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Fi.useDebugValue)(v),v}}var O=lx();function jn(){return jn=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},jn.apply(this,arguments)}function wa(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 Cg=w(Sx()),le=w(F()),Ix=w(Cx());var aI=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function lI(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function p(h,S){return l=h,u=S,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let h=e(l,u),S=!s(h,c);return c=h,S&&(d=n(c,f,u)),d}function m(h,S){let x=!i(S,u),T=!o(h,l,S,u);return l=h,u=S,x&&T?y():x?v():T?g():d}return function(S,x){return a?m(S,x):p(S,x)}}function xg(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=wa(t,aI),s=n(e,i),a=r(e,i),l=o(e,i);return lI(s,a,l,e,i)}function Eg(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 xa(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function bx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Rc(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=bx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=bx(u),u=i(a,l)),u},i}}function Hi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Tx(e){return e&&typeof e=="object"?xa(t=>Eg(e,t)):e?typeof e=="function"?Rc(e,"mapDispatchToProps"):Hi(e,"mapDispatchToProps"):xa(t=>({dispatch:t}))}function kx(e){return e?typeof e=="function"?Rc(e,"mapStateToProps"):Hi(e,"mapStateToProps"):xa(()=>({}))}function uI(e,t,n){return jn({},n,e,t)}function cI(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function Px(e){return e?typeof e=="function"?cI(e):Hi(e,"mergeProps"):()=>uI}function dI(){let e=nx(),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 Rx={notify(){},get:()=>[]};function Ac(e,t){let n,r=Rx;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=dI())}function u(){n&&(n(),n=void 0,r.clear(),r=Rx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Ic=w(F()),fI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ui=fI?Ic.useLayoutEffect:Ic.useEffect;function Ax(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ji(e,t){if(Ax(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Ax(e[n[o]],t[n[o]]))return!1;return!0}var pI=["reactReduxForwardedRef"],Lx=ac,Ox=e=>{Lx=e};var mI=[null,null];function gI(e,t,n){Ui(()=>e(...t),n)}function hI(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function yI(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let v=t.getState(),g,m;try{g=r(v,o.current)}catch(h){m=h,d=h}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function vI(e,t){return e===t}function SI(e,t,n,{pure:r,areStatesEqual:o=vI,areOwnPropsEqual:i=ji,areStatePropsEqual:s=ji,areMergedPropsEqual:a=ji,forwardRef:l=!1,context:u=Xe}={}){let c=u,f=kx(e),d=Tx(t),p=Px(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",h=`Connect(${m})`,S={shouldHandleStateChanges:y,displayName:h,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[I,L,N]=(0,le.useMemo)(()=>{let{reactReduxForwardedRef:at}=k,It=wa(k,pI);return[k.context,at,It]},[k]),z=(0,le.useMemo)(()=>I&&I.Consumer&&(0,Ix.isContextConsumer)(le.default.createElement(I.Consumer,null))?I:c,[I,c]),K=(0,le.useContext)(z),ee=!!k.store&&!!k.store.getState&&!!k.store.dispatch,oe=!!K&&!!K.store,ze=ee?k.store:K.store,pn=oe?K.getServerState:ze.getState,st=(0,le.useMemo)(()=>xg(ze.dispatch,S),[ze]),[_,$]=(0,le.useMemo)(()=>{if(!y)return mI;let at=Ac(ze,ee?void 0:K.subscription),It=at.notifyNestedSubs.bind(at);return[at,It]},[ze,ee,K]),ar=(0,le.useMemo)(()=>ee?K:jn({},K,{subscription:_}),[ee,K,_]),ye=(0,le.useRef)(),lr=(0,le.useRef)(N),W=(0,le.useRef)(),ur=(0,le.useRef)(!1),yl=(0,le.useRef)(!1),$o=(0,le.useRef)(!1),Qr=(0,le.useRef)();Ui(()=>($o.current=!0,()=>{$o.current=!1}),[]);let cs=(0,le.useMemo)(()=>()=>W.current&&N===lr.current?W.current:st(ze.getState(),N),[ze,N]),vl=(0,le.useMemo)(()=>It=>_?yI(y,ze,_,st,lr,ye,ur,$o,W,$,It):()=>{},[_]);gI(hI,[lr,ye,ur,N,W,$]);let qt;try{qt=Lx(vl,cs,pn?()=>st(pn(),N):cs)}catch(at){throw Qr.current&&(at.message+=`
10
10
  The error may be correlated with this previous error:
11
11
  ${Qr.current.stack}
12
12
 
13
- `),at}Ui(()=>{Qr.current=void 0,W.current=void 0,ye.current=qt});let Gt=(0,le.useMemo)(()=>le.default.createElement(g,jn({},qt,{ref:L})),[L,g,qt]);return(0,le.useMemo)(()=>y?le.default.createElement(z.Provider,{value:ar},Gt):Gt,[z,Gt,ar])}let T=le.default.memo(x);if(T.WrappedComponent=g,T.displayName=x.displayName=h,l){let I=le.default.forwardRef(function(N,z){return le.default.createElement(T,jn({},N,{reactReduxForwardedRef:z}))});return I.displayName=h,I.WrappedComponent=g,(0,Cg.default)(I,g)}return(0,Cg.default)(T,g)}}var zn=vI;var Ea=w(F());function SI({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ea.useMemo)(()=>{let u=Ac(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ea.useMemo)(()=>e.getState(),[e]);Ui(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Xe;return Ea.default.createElement(l.Provider,{value:s},n)}var bg=SI;function Lc(e=Xe){let t=e===Xe?sc:Sa(e);return function(){let{store:r}=t();return r}}var Tg=Lc();function Ox(e=Xe){let t=e===Xe?Tg:Lc(e);return function(){return t().dispatch}}var Z=Ox();sx(Mx.useSyncExternalStoreWithSelector);Lx(Nx.useSyncExternalStore);ex(pg.unstable_batchedUpdates);var Ca=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Ca||{});var wI={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},_x=q({name:"settings",initialState:wI,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Oc}=_x.actions,kg=e=>t=>t.settings[e],U=e=>O(kg(e)),Dx=_x.reducer;var xI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},nt=e=>e.auth.isLoggedIn,Fx=e=>e.auth.loginFetchState,Hx=e=>e.auth.verifyFetchState,Ux=e=>e.auth.showLoginOverlay,Bn=j("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),jx=j("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),ba=j("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),zx=q({name:"auth",initialState:xI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Bn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Bn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Bn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ba.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ba.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ba.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:zi,setShowLoginOverlay:Bx}=zx.actions,Vx=zx.reducer;function Vn(){}Vn.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 f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function p(){for(var v=-1*u;v<=u;v+=2){var g=void 0,m=f[v-1],h=f[v+1],S=(h?h.newPos:0)-v;m&&(f[v-1]=void 0);var x=m&&m.newPos+1<a,C=h&&0<=S&&S<l;if(!x&&!C){f[v]=void 0;continue}if(!x||C&&m.newPos<h.newPos?(g=CI(h),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,v),g.newPos+1>=a&&S+1>=l)return s(EI(i,g.components,n,t,i.useLongestToken));f[v]=g}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();p()||v()},0)})();else for(;u<=c;){var y=p();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 EI(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(p,y){var v=r[l+y];return v.length>p.length?v:p}),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 CI(e){return{newPos:e.newPos,components:e.components.slice(0)}}var bI=new Vn;function Wx(e,t,n){return bI.diff(e,t,n)}var Kx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$x=/\S/,qx=new Vn;qx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!$x.test(e)&&!$x.test(t)};qx.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]&&Kx.test(t[n])&&Kx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Gx=new Vn;Gx.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 TI=new Vn;TI.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kI=new Vn;kI.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nc=function(t){return typeof t}:Nc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}var PI=Object.prototype.toString,Ta=new Vn;Ta.useLongestToken=!0;Ta.tokenize=Gx.tokenize;Ta.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(Pg(e,null,null,o),o," ")};Ta.equals=function(e,t){return Vn.prototype.equals.call(Ta,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Pg(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(PI.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]=Pg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Nc(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]=Pg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Rg=new Vn;Rg.tokenize=function(e){return e.slice()};Rg.join=Rg.removeEmpty=function(e){return e};function Yx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function _r(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)=>_r(i,t[s],n-1)):Yx(e)&&Yx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>_r(e[s],t[s],n-1)):!1}function RI(e){return Math.max(...e.map(t=>t.length))}function AI(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 Xx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<RI(r);o++){let i=AI(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 II=2;function Ag(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Xx(e,II);return n&&n.text!==t?n:e[0]}var LI={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=LI;var Qx={current:null,isSupported:null},ue=xe("resetConversation"),Mc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},_c=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Bi=e=>e.conversation.isSupported,Ig=j("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Dc=j("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Fc=j("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Hc=j("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Lg=j("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),Uc=j("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),OI=[Dc.rejected,Fc.rejected,Hc.rejected,Uc.rejected].map(e=>e==null?void 0:e.toString()),NI=q({name:"conversation",initialState:Qx,reducers:{},extraReducers:e=>{e.addCase(Ig.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Dc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Fc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Lg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Uc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(ue,()=>Qx).addMatcher(t=>OI.includes(t.type),(t,n)=>{var r;throw V.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),Zx=NI.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,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Jx(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 zc=xe("input/replaceText"),Bc=xe("input/keyDown"),Co=xe("input/sendMessage"),Vc=xe("input/uiInputChange"),Kc=xe("input/applyImageSuggestion"),Qe=xe("input/sendEvent");function jc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var eE=q({name:"input",initialState:Dr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...Dr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=Ag(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(_r(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&jc(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:f,metaKey:d,altKey:p}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=e,{text:v}=t.payload,g=Wx(y,v);y.length-v.length>1&&e.metrics.deletions.push(...g.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=y.length-v.length;break}case"C":case"V":case"X":if(!f&&!d){e.metrics.numCharsTyped+=1;let y=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}break;case"Shift":break;default:if(!f&&!d&&!p){e.metrics.numCharsTyped+=1;let y=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=Dr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&jc(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&jc(e)},commitSuggestion(e){jc(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0)return;let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=Ag(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(ue,t=>{t.tabCompletionSuggestion=Dr.tabCompletionSuggestion,t.previousKeyDownEvent=Dr.previousKeyDownEvent,t.textSuggestions=Dr.textSuggestions,t.selectedSuggestionIndex=Dr.selectedSuggestionIndex,t.metrics=Dr.metrics})}}),Vi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),MI=e=>e.input.selection,tE=()=>O(MI),{userInput:nE,changeSelection:Og,initialInput:rE,nextTextSuggestionIndex:oE,offeredTextSuggestion:iE,previousTextSuggestionIndex:sE,registerCut:aE,registerKeyDown:lE,registerPaste:uE,reset:cE,resetToCommitted:ka,platformInput:dE,setSelectedTextSuggestionIndex:Fr,setTextSuggestions:En,stageSuggestion:Cn,commitSuggestion:Kn,setMetrics:fE}=eE.actions,pE=eE.reducer;function _I(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,[_I(n)]:ne(e[n])}),{}):e}function Ng(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ie(e){return Array.isArray(e)?e.map(Ie):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Ng(n)]:Ie(e[n])}),{}):e}var DI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Ra=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)||""}},Pa=j("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))}),Mg=j("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),_g=j("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),mE=e=>e.info.agentInfo,gE=q({name:"info",initialState:DI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Pa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.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(Mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(_g.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(ue,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:hE}=gE.actions,yE=gE.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},vE=e=>e.search.isOpen,SE=e=>e.search.page,wE=e=>e.search.list,xE=e=>e.search.aggregates;function EE(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var bo=j("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ra(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),CE=q({name:"search",initialState:$c,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=$c.fetchState,e.list=$c.list}},extraReducers:e=>{e.addCase(bo.pending,t=>{t.fetchState="loading"}).addCase(bo.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(bo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(ue,()=>$c)}}),{resetSearch:Wc,setIsOpen:Ct,setPage:Jt}=CE.actions,bE=CE.reducer;var Dg={cues:[],fetchState:"idle"},TE=e=>{var t;return(t=e.rules)==null?void 0:t.cues},FI=xe("rules/resetCues"),$n=j("rules/evaluate",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=(i=t.getState().conversation.current)==null?void 0:i.id;if(!r)throw new Error("No current conversation to evaulate rules");return await n.evaluateRule(e.label,r,e.params)}),kE=q({name:"answer",initialState:Dg,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.id!==t.payload.id)}},extraReducers:e=>{e.addCase($n.pending,t=>{t.fetchState="loading"}).addCase($n.rejected,t=>{t.fetchState="error"}).addCase($n.fulfilled,(t,n)=>{let r=Date.now(),o=n.payload.map(a=>({id:a.id||a.text,timestamp:r,...a})),i=o.map(a=>a.id),s=t.cues.filter(a=>!i.includes(a.id));t.fetchState="done",t.cues=[...o,...s]}).addCase(ue,()=>Dg).addCase(FI.toString(),()=>Dg)}}),{removeCue:PE}=kE.actions,RE=kE.reducer;var Fg="SetCues",Ki="ShowLoginOverlay",Aa="UserLoggedIn",HI="UserLoggedOut",Hr="ApplySuggestion",Hg="ApplyImageSuggestion",UI="ShowCommandPalette",jI=e=>({[Fg]:t=>{e.dispatch({type:$n.fulfilled,payload:t})},[UI]:t=>{e.dispatch(Ct(t.isOpen)),t.page&&e.dispatch(Jt(t.page))},[Ki]:t=>{e.dispatch(Bx(t))},[Aa]:()=>{e.dispatch(Bn())},[HI]:()=>{e.dispatch(Bn())},[Hg]:t=>{e.dispatch(Kc({suggestion:t.suggestion}))},[Hr]:t=>{e.dispatch(Cn({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Kn())}}),AE=jI;var Ia=w(F()),LE=w(b()),IE=Ia.default.createContext(null),To=({broadcastEvents:e,children:t})=>{let n=Ia.default.useMemo(()=>e,[]);return(0,LE.jsx)(IE.Provider,{value:n,children:t})},en=()=>{let e=(0,Ia.useContext)(IE);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var ud=w(ee()),nn=w(F());var sd=w(F());var Ug=function(e,t){return Ug=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])},Ug(e,t)};function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ug(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bt=function(){return bt=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},bt.apply(this,arguments)};function OE(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 qc(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 Gc;(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"})(Gc||(Gc={}));var Yc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var tn;(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"})(tn||(tn={}));var Xc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Xc||(Xc={}));function jg(e){return e.type===tn.literal}function NE(e){return e.type===tn.argument}function Qc(e){return e.type===tn.number}function Zc(e){return e.type===tn.date}function Jc(e){return e.type===tn.time}function ed(e){return e.type===tn.select}function td(e){return e.type===tn.plural}function ME(e){return e.type===tn.pound}function nd(e){return e.type===tn.tag}function rd(e){return!!(e&&typeof e=="object"&&e.type===Xc.number)}function Oa(e){return!!(e&&typeof e=="object"&&e.type===Xc.dateTime)}function zg(e){e.forEach(function(t){if(delete t.location,ed(t)||td(t))for(var n in t.options)delete t.options[n].location,zg(t.options[n].value);else Qc(t)&&rd(t.style)||(Zc(t)||Jc(t))&&Oa(t.style)?delete t.style.location:nd(t)&&zg(t.children)})}function _E(e,t){t===void 0&&(t={}),t=bt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yc(e,t).parse();if(n.err){var r=SyntaxError(Gc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||zg(n.val),n.val}function od(e,t){var n=t&&t.cache?t.cache:WI,r=t&&t.serializer?t.serializer:$I,o=t&&t.strategy?t.strategy:BI;return o(e,{cache:n,serializer:r})}function zI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function DE(e,t,n,r){var o=zI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function FE(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 Bg(e,t,n,r,o){return n.bind(t,e,r,o)}function BI(e,t){var n=e.length===1?DE:FE;return Bg(e,this,n,t.cache.create(),t.serializer)}function VI(e,t){return Bg(e,this,FE,t.cache.create(),t.serializer)}function KI(e,t){return Bg(e,this,DE,t.cache.create(),t.serializer)}var $I=function(){return JSON.stringify(arguments)};function Vg(){this.cache=Object.create(null)}Vg.prototype.get=function(e){return this.cache[e]};Vg.prototype.set=function(e,t){this.cache[e]=t};var WI={create:function(){return new Vg}},id={variadic:VI,monadic:KI};var ko;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ko||(ko={}));var Na=function(e){La(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 Kg=function(e){La(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('", "'),'"'),ko.INVALID_VALUE,i)||this}return t}(Na);var HE=function(e){La(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ko.INVALID_VALUE,o)||this}return t}(Na);var UE=function(e){La(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,'"'),ko.MISSING_VALUE,r)||this}return t}(Na);var Ze;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ze||(Ze={}));function qI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ze.literal||n.type!==Ze.literal?t.push(n):r.value+=n.value,t},[])}function GI(e){return typeof e=="function"}function Ma(e,t,n,r,o,i,s){if(e.length===1&&jg(e[0]))return[{type:Ze.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(jg(c)){a.push({type:Ze.literal,value:c.value});continue}if(ME(c)){typeof i=="number"&&a.push({type:Ze.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new UE(f,s);var d=o[f];if(NE(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ze.literal:Ze.object,value:d});continue}if(Zc(c)){var p=typeof c.style=="string"?r.date[c.style]:Oa(c.style)?c.style.parsedOptions:void 0;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Jc(c)){var p=typeof c.style=="string"?r.time[c.style]:Oa(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Qc(c)){var p=typeof c.style=="string"?r.number[c.style]:rd(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:Ze.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(nd(c)){var y=c.children,v=c.value,g=o[v];if(!GI(g))throw new HE(v,"function",s);var m=Ma(y,t,n,r,o,i),h=g(m.map(function(C){return C.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(C){return{type:typeof C=="string"?Ze.literal:Ze.object,value:C}}))}if(ed(c)){var S=c.options[d]||c.options.other;if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o));continue}if(td(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Na(`Intl.PluralRules is not available in this environment.
13
+ `),at}Ui(()=>{Qr.current=void 0,W.current=void 0,ye.current=qt});let Gt=(0,le.useMemo)(()=>le.default.createElement(g,jn({},qt,{ref:L})),[L,g,qt]);return(0,le.useMemo)(()=>y?le.default.createElement(z.Provider,{value:ar},Gt):Gt,[z,Gt,ar])}let C=le.default.memo(x);if(C.WrappedComponent=g,C.displayName=x.displayName=h,l){let I=le.default.forwardRef(function(N,z){return le.default.createElement(C,jn({},N,{reactReduxForwardedRef:z}))});return I.displayName=h,I.WrappedComponent=g,(0,Cg.default)(I,g)}return(0,Cg.default)(C,g)}}var zn=SI;var Ea=w(F());function wI({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ea.useMemo)(()=>{let u=Ac(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ea.useMemo)(()=>e.getState(),[e]);Ui(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||Xe;return Ea.default.createElement(l.Provider,{value:s},n)}var bg=wI;function Lc(e=Xe){let t=e===Xe?sc:Sa(e);return function(){let{store:r}=t();return r}}var Tg=Lc();function Nx(e=Xe){let t=e===Xe?Tg:Lc(e);return function(){return t().dispatch}}var Z=Nx();ax(_x.useSyncExternalStoreWithSelector);Ox(Mx.useSyncExternalStore);tx(pg.unstable_batchedUpdates);var Ca=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Ca||{});var xI={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},Dx=q({name:"settings",initialState:xI,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Oc}=Dx.actions,kg=e=>t=>t.settings[e],U=e=>O(kg(e)),Fx=Dx.reducer;var EI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},nt=e=>e.auth.isLoggedIn,Hx=e=>e.auth.loginFetchState,Ux=e=>e.auth.verifyFetchState,jx=e=>e.auth.showLoginOverlay,Bn=j("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),zx=j("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),ba=j("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Bx=q({name:"auth",initialState:EI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Bn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Bn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Bn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ba.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ba.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ba.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:zi,setShowLoginOverlay:Vx}=Bx.actions,Kx=Bx.reducer;function Vn(){}Vn.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 f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function p(){for(var v=-1*u;v<=u;v+=2){var g=void 0,m=f[v-1],h=f[v+1],S=(h?h.newPos:0)-v;m&&(f[v-1]=void 0);var x=m&&m.newPos+1<a,T=h&&0<=S&&S<l;if(!x&&!T){f[v]=void 0;continue}if(!x||T&&m.newPos<h.newPos?(g=bI(h),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,v),g.newPos+1>=a&&S+1>=l)return s(CI(i,g.components,n,t,i.useLongestToken));f[v]=g}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();p()||v()},0)})();else for(;u<=c;){var y=p();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 CI(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(p,y){var v=r[l+y];return v.length>p.length?v:p}),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 bI(e){return{newPos:e.newPos,components:e.components.slice(0)}}var TI=new Vn;function qx(e,t,n){return TI.diff(e,t,n)}var $x=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Wx=/\S/,Gx=new Vn;Gx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Wx.test(e)&&!Wx.test(t)};Gx.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]&&$x.test(t[n])&&$x.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Yx=new Vn;Yx.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 kI=new Vn;kI.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var PI=new Vn;PI.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nc=function(t){return typeof t}:Nc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}var RI=Object.prototype.toString,Ta=new Vn;Ta.useLongestToken=!0;Ta.tokenize=Yx.tokenize;Ta.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(Pg(e,null,null,o),o," ")};Ta.equals=function(e,t){return Vn.prototype.equals.call(Ta,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Pg(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(RI.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]=Pg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Nc(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]=Pg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Rg=new Vn;Rg.tokenize=function(e){return e.slice()};Rg.join=Rg.removeEmpty=function(e){return e};function Xx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function _r(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)=>_r(i,t[s],n-1)):Xx(e)&&Xx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>_r(e[s],t[s],n-1)):!1}function AI(e){return Math.max(...e.map(t=>t.length))}function II(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function Qx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<AI(r);o++){let i=II(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 LI=2;function Ag(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Qx(e,LI);return n&&n.text!==t?n:e[0]}var OI={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=OI;var Zx={current:null,isSupported:null},ue=xe("resetConversation"),Mc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},_c=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Bi=e=>e.conversation.isSupported,Ig=j("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Dc=j("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Fc=j("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Hc=j("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Lg=j("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),Uc=j("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),NI=[Dc.rejected,Fc.rejected,Hc.rejected,Uc.rejected].map(e=>e==null?void 0:e.toString()),MI=q({name:"conversation",initialState:Zx,reducers:{},extraReducers:e=>{e.addCase(Ig.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Dc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Fc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Lg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Uc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(ue,()=>Zx).addMatcher(t=>NI.includes(t.type),(t,n)=>{var r;throw V.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),Jx=MI.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,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function eE(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 zc=xe("input/replaceText"),Bc=xe("input/keyDown"),Co=xe("input/sendMessage"),Vc=xe("input/uiInputChange"),Kc=xe("input/applyImageSuggestion"),Qe=xe("input/sendEvent");function jc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var tE=q({name:"input",initialState:Dr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...Dr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=Ag(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(_r(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&jc(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:f,metaKey:d,altKey:p}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=e,{text:v}=t.payload,g=qx(y,v);y.length-v.length>1&&e.metrics.deletions.push(...g.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=y.length-v.length;break}case"C":case"V":case"X":if(!f&&!d){e.metrics.numCharsTyped+=1;let y=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}break;case"Shift":break;default:if(!f&&!d&&!p){e.metrics.numCharsTyped+=1;let y=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=Dr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&jc(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&jc(e)},commitSuggestion(e){jc(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0)return;let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=Ag(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(ue,t=>{t.tabCompletionSuggestion=Dr.tabCompletionSuggestion,t.previousKeyDownEvent=Dr.previousKeyDownEvent,t.textSuggestions=Dr.textSuggestions,t.selectedSuggestionIndex=Dr.selectedSuggestionIndex,t.metrics=Dr.metrics})}}),Vi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),_I=e=>e.input.selection,nE=()=>O(_I),{userInput:rE,changeSelection:Og,initialInput:oE,nextTextSuggestionIndex:iE,offeredTextSuggestion:sE,previousTextSuggestionIndex:aE,registerCut:lE,registerKeyDown:uE,registerPaste:cE,reset:dE,resetToCommitted:ka,platformInput:fE,setSelectedTextSuggestionIndex:Fr,setTextSuggestions:En,stageSuggestion:Cn,commitSuggestion:Kn,setMetrics:pE}=tE.actions,mE=tE.reducer;function DI(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function J(e){return Array.isArray(e)?e.map(J):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[DI(n)]:J(e[n])}),{}):e}function Ng(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ie(e){return Array.isArray(e)?e.map(Ie):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Ng(n)]:Ie(e[n])}),{}):e}var FI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Ra=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)||""}},Pa=j("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?J(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),J(r))}),Mg=j("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),_g=j("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),gE=e=>e.info.agentInfo,hE=q({name:"info",initialState:FI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Pa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.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(Mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(_g.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(ue,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:yE}=hE.actions,vE=hE.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},SE=e=>e.search.isOpen,wE=e=>e.search.page,xE=e=>e.search.list,EE=e=>e.search.aggregates;function CE(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var bo=j("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ra(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),bE=q({name:"search",initialState:$c,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=$c.fetchState,e.list=$c.list}},extraReducers:e=>{e.addCase(bo.pending,t=>{t.fetchState="loading"}).addCase(bo.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(bo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(ue,()=>$c)}}),{resetSearch:Wc,setIsOpen:Ct,setPage:Jt}=bE.actions,TE=bE.reducer;var Dg={cues:[],fetchState:"idle"},kE=e=>{var t;return(t=e.rules)==null?void 0:t.cues},HI=xe("rules/resetCues"),$n=j("rules/evaluate",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=(a=t.getState().conversation.current)==null?void 0:a.id;if(!r)throw new Error("No current conversation to evaluate rules");if(!(await n.getAccount()).ruleEngine)throw new Error("Rule engine is not enabled for this account");if(!(await n.getRules()).some(l=>l.label===e.label))throw new Error(`No rules found with label: ${e.label}`);return await n.evaluateRule(e.label,r,e.params)}),PE=q({name:"answer",initialState:Dg,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.id!==t.payload.id)}},extraReducers:e=>{e.addCase($n.pending,t=>{t.fetchState="loading"}).addCase($n.rejected,t=>{t.fetchState="error"}).addCase($n.fulfilled,(t,n)=>{let r=Date.now(),o=n.payload.map(a=>({id:a.id||a.text,timestamp:r,...a})),i=o.map(a=>a.id),s=t.cues.filter(a=>!i.includes(a.id));t.fetchState="done",t.cues=[...o,...s]}).addCase(ue,()=>Dg).addCase(HI.toString(),()=>Dg)}}),{removeCue:RE}=PE.actions,AE=PE.reducer;var Fg="SetCues",Ki="ShowLoginOverlay",Aa="UserLoggedIn",UI="UserLoggedOut",Hr="ApplySuggestion",Hg="ApplyImageSuggestion",jI="ShowCommandPalette",zI=e=>({[Fg]:t=>{e.dispatch({type:$n.fulfilled,payload:t})},[jI]:t=>{e.dispatch(Ct(t.isOpen)),t.page&&e.dispatch(Jt(t.page))},[Ki]:t=>{e.dispatch(Vx(t))},[Aa]:()=>{e.dispatch(Bn())},[UI]:()=>{e.dispatch(Bn())},[Hg]:t=>{e.dispatch(Kc({suggestion:t.suggestion}))},[Hr]:t=>{e.dispatch(Cn({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Kn())}}),IE=zI;var Ia=w(F()),OE=w(b()),LE=Ia.default.createContext(null),To=({broadcastEvents:e,children:t})=>{let n=Ia.default.useMemo(()=>e,[]);return(0,OE.jsx)(LE.Provider,{value:n,children:t})},en=()=>{let e=(0,Ia.useContext)(LE);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var ud=w(te()),nn=w(F());var sd=w(F());var Ug=function(e,t){return Ug=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])},Ug(e,t)};function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ug(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bt=function(){return bt=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},bt.apply(this,arguments)};function NE(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 qc(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 Gc;(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"})(Gc||(Gc={}));var Yc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var tn;(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"})(tn||(tn={}));var Xc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Xc||(Xc={}));function jg(e){return e.type===tn.literal}function ME(e){return e.type===tn.argument}function Qc(e){return e.type===tn.number}function Zc(e){return e.type===tn.date}function Jc(e){return e.type===tn.time}function ed(e){return e.type===tn.select}function td(e){return e.type===tn.plural}function _E(e){return e.type===tn.pound}function nd(e){return e.type===tn.tag}function rd(e){return!!(e&&typeof e=="object"&&e.type===Xc.number)}function Oa(e){return!!(e&&typeof e=="object"&&e.type===Xc.dateTime)}function zg(e){e.forEach(function(t){if(delete t.location,ed(t)||td(t))for(var n in t.options)delete t.options[n].location,zg(t.options[n].value);else Qc(t)&&rd(t.style)||(Zc(t)||Jc(t))&&Oa(t.style)?delete t.style.location:nd(t)&&zg(t.children)})}function DE(e,t){t===void 0&&(t={}),t=bt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yc(e,t).parse();if(n.err){var r=SyntaxError(Gc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||zg(n.val),n.val}function od(e,t){var n=t&&t.cache?t.cache:qI,r=t&&t.serializer?t.serializer:WI,o=t&&t.strategy?t.strategy:VI;return o(e,{cache:n,serializer:r})}function BI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function FE(e,t,n,r){var o=BI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function HE(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 Bg(e,t,n,r,o){return n.bind(t,e,r,o)}function VI(e,t){var n=e.length===1?FE:HE;return Bg(e,this,n,t.cache.create(),t.serializer)}function KI(e,t){return Bg(e,this,HE,t.cache.create(),t.serializer)}function $I(e,t){return Bg(e,this,FE,t.cache.create(),t.serializer)}var WI=function(){return JSON.stringify(arguments)};function Vg(){this.cache=Object.create(null)}Vg.prototype.get=function(e){return this.cache[e]};Vg.prototype.set=function(e,t){this.cache[e]=t};var qI={create:function(){return new Vg}},id={variadic:KI,monadic:$I};var ko;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ko||(ko={}));var Na=function(e){La(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 Kg=function(e){La(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('", "'),'"'),ko.INVALID_VALUE,i)||this}return t}(Na);var UE=function(e){La(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ko.INVALID_VALUE,o)||this}return t}(Na);var jE=function(e){La(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,'"'),ko.MISSING_VALUE,r)||this}return t}(Na);var Ze;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ze||(Ze={}));function GI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ze.literal||n.type!==Ze.literal?t.push(n):r.value+=n.value,t},[])}function YI(e){return typeof e=="function"}function Ma(e,t,n,r,o,i,s){if(e.length===1&&jg(e[0]))return[{type:Ze.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(jg(c)){a.push({type:Ze.literal,value:c.value});continue}if(_E(c)){typeof i=="number"&&a.push({type:Ze.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new jE(f,s);var d=o[f];if(ME(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ze.literal:Ze.object,value:d});continue}if(Zc(c)){var p=typeof c.style=="string"?r.date[c.style]:Oa(c.style)?c.style.parsedOptions:void 0;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Jc(c)){var p=typeof c.style=="string"?r.time[c.style]:Oa(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Qc(c)){var p=typeof c.style=="string"?r.number[c.style]:rd(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:Ze.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(nd(c)){var y=c.children,v=c.value,g=o[v];if(!YI(g))throw new UE(v,"function",s);var m=Ma(y,t,n,r,o,i),h=g(m.map(function(T){return T.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(T){return{type:typeof T=="string"?Ze.literal:Ze.object,value:T}}))}if(ed(c)){var S=c.options[d]||c.options.other;if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o));continue}if(td(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Na(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,ko.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[x]||c.options.other}if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o,d-(c.offset||0)));continue}}return qI(a)}function YI(e,t){return t?bt(bt(bt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=bt(bt({},e[r]),t[r]||{}),n},{})):e}function XI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=YI(e[r],t[r]),n},bt({},e)):e}function $g(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function QI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.number),strategy:id.variadic}),getDateTimeFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.dateTime),strategy:id.variadic}),getPluralRules:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.pluralRules),strategy:id.variadic})}}var jE=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var f=c.reduce(function(d,p){return!d.length||p.type!==Ze.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Ma(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=OE(s,["formatters"]);this.ast=e.__parse(t,bt(bt({},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=XI(e.formats,r),this.formatters=o&&o.formatters||QI(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=_E,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 ZI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var JI="dummy",Wg=(0,sd.createContext)(null);function G(e){let t=(0,sd.useContext)(Wg);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=ZI(n,r);return i?new jE(i).format(o):(t!==JI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var ad=w(F());var zE={root:"U",content:"To"};var qg=w(b()),tL=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,ad.useRef)(null),u=A("Dialog",zE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,ad.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,qg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:f,children:(0,qg.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},ld=tL;var VE=w(ee());var BE={root:"y"};var KE=w(b()),rL=({className:e,value:t,...n})=>{let r=A("TextInput",BE);return(0,KE.jsx)("input",{className:(0,VE.default)(e,r.root),type:"text",value:t,...n})},_a=rL;var Gg={};Je(Gg,{enUS:()=>oL,nlNL:()=>iL});var oL={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"}]},iL={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 $E={root:"Uo",anchorButton:"Bo",errorMessage:"Do",title:"Io",subtitle:"Oo",text:"Xo",input:"Jo",actions:"Ko",button:"w",primaryButton:"Po"};var ke=w(b());var aL=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},lL=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=G(Gg),s=A("LoginTokenDialog",$E),a=O(Hx),l=Z(),u=U("productName"),[c,f]=(0,nn.useState)(e||""),[d,p]=(0,nn.useState)(0),[y,v]=(0,nn.useState)(""),g=(0,nn.useCallback)(async x=>{x.preventDefault(),l(jx({email:c})),p(1)},[n,c]),m=()=>{v(""),p(0)},h=(0,nn.useCallback)(async x=>{x.preventDefault();let C=aL(x.target.elements.token.value);if(!C){v(i("verifyCodeError",{login:S}));return}l(ba({token:C}))},[n]),S=(0,nn.useMemo)(()=>x=>(0,ke.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,nn.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ke.jsx)(ld,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ke.jsxs)("div",{className:s.root,children:[(0,ke.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ke.jsxs)("form",{onSubmit:g,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ke.jsx)(_a,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>f(x.target.value)}),(0,ke.jsx)("div",{className:s.actions,children:(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ke.jsxs)("form",{onSubmit:h,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ke.jsx)(_a,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,ke.jsx)("div",{className:s.errorMessage,children:y}),(0,ke.jsxs)("div",{className:s.actions,children:[(0,ke.jsx)("button",{type:"button",className:(0,ud.default)(s.button),onClick:m,children:i("back")}),(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},WE=lL;var GE=w(b()),uL=()=>{let e=O(Ux),t=O(mE),n=U("adminUrl"),r=en(),o=()=>r.send(Ki,!1),i=()=>{r.send(Ki,!1),r.send(Aa)};return(0,GE.jsx)(WE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},qE=uL;var nb=w(Qg()),gt=w(F());var PL={data:null,fetchState:"idle"},ZE=e=>e.contentTypes.data,Da=j("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),RL=q({name:"contentTypes",initialState:PL,reducers:{},extraReducers:e=>{e.addCase(Da.pending,t=>{t.fetchState="loading"}).addCase(Da.rejected,t=>{t.fetchState="error"}).addCase(Da.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),JE=RL.reducer;function Po(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 Gn=w(F());var eC=w(F()),cd=w(ee());var Bt={root:"Qo",list:"Vo",listWrapper:"Wo",listHorizontal:"B",page:"v",search:"D",pageNav:"Zo",pageTitle:"_o",pageBackButton:"I",listHeader:"oe",listHeading:"ee",listMoreButton:"ie",listItem:"O",listItemContent:"a",listItemText:"re",listItemDescription:"te",listItemActions:"X",truncate:"ne",lineClamp:"ae",listItemTitle:"de",listItemAction:"pe",listItemPrimaryAction:"le",listItemSelected:"se",sources:"xe",sourcesTitle:"ce",source:"fe",icon:"J",searchIcon:"ge",searchInputWrapper:"be",searchInput:"k",select:"he",selectType:"me",selectWrapper:"z",image:"ue",imageSrc:"ye",imageSrcHidden:"we",imageSrcStatus:"ve",imageTitle:"ke",actions:"ze",actionsWrapper:"je",actionsBar:"qe",actionButton:"K",hasShortKeys:"Ce",actionShortcut:"Se",actionShortcutFixKerning:"Ee"};var Ro={};Je(Ro,{enUS:()=>IL,nlNL:()=>LL});var IL={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}]},LL={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}]};var Ur=w(b()),OL=({src:e,title:t})=>{let n=A("CommandPalette",Bt),[r,o]=(0,eC.useState)("loading"),i=G(Ro);return(0,Ur.jsxs)("div",{className:n.image,children:[(0,Ur.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,cd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:(0,Ur.jsx)(Il,{})}),t&&(0,Ur.jsx)("span",{className:n.imageTitle,children:t})]})},tC=OL;var nC=w(F()),rC=w(ee());var Ao=w(b());function Zg({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=G(Ro),s=A("CommandPalette",Bt);return nC.default.Children.count(e)===0?null:(0,Ao.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Ao.jsxs)("div",{className:s.listHeader,children:[t&&(0,Ao.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Ao.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Ao.jsx)("div",{className:(0,rC.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var za=w(ee());var dd=w(F());function Fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=1,eh=2,th=4,Le=8,fd=16,Ha=32,rn=64,Jg={a:{content:re|Le,self:!1,type:re|Le|Ha|rn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:re|Le,void:!0},body:{content:re|eh|th|Le|fd|Ha|rn},button:{content:Le,type:re|Le|Ha|rn},caption:{content:re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:re|Ha|rn},dd:{content:re,parent:["dl"]},dl:{children:["dt","dd"],type:re},dt:{content:re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:re,void:!0},img:{void:!0},li:{content:re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:re},picture:{children:["source","img"],type:re|Le|fd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Le,parent:["ruby","rtc"]},rtc:{content:Le,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Le,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:re},tbody:{parent:["table"],children:["tr"]},td:{content:re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:re,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:re},video:{children:["track","source"]},wbr:{type:re|Le,void:!0}};function Lo(e){return t=>{Jg[t]={...e,...Jg[t]}}}["address","main","div","figure","p","pre"].forEach(Lo({content:re,type:re|rn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Lo({content:Le,type:re|Le|rn}));["p","pre"].forEach(Lo({content:Le,type:re|rn}));["s","small","span","del","ins"].forEach(Lo({content:Le,type:re|Le}));["article","aside","footer","header","nav","section","blockquote"].forEach(Lo({content:re,type:re|eh|rn}));["h1","h2","h3","h4","h5","h6"].forEach(Lo({content:Le,type:re|th|rn}));["audio","canvas","iframe","img","video"].forEach(Lo({type:re|Le|fd|rn}));var ja=Object.freeze(Jg),nh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],rh=Object.keys(ja).filter(e=>e!=="canvas"&&e!=="iframe"),ce=1,oh=2,Io=3,jr=4,md=5,gd=Object.freeze({alt:ce,cite:ce,class:ce,colspan:Io,controls:jr,datetime:ce,default:jr,disabled:jr,dir:ce,height:ce,href:ce,id:ce,kind:ce,label:ce,lang:ce,loading:ce,loop:jr,media:ce,muted:jr,poster:ce,rel:ce,role:ce,rowspan:Io,scope:ce,sizes:ce,span:Io,start:Io,style:md,src:ce,srclang:ce,srcset:ce,tabindex:ce,target:ce,title:ce,type:ce,width:ce}),ih=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function pd(){return pd=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},pd.apply(this,arguments)}function hd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?dd.default.createElement(i,pd({className:t},e)):dd.default.createElement(i,pd({className:t},e),n)}var Ua=class{attribute(t,n){return n}node(t,n){return n}};function oC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var Wn=class{constructor(t,n,r){Fa(this,"greedy",!1),Fa(this,"options",void 0),Fa(this,"propName",void 0),Fa(this,"inverseName",void 0),Fa(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?dd.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return oC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Oo=w(F()),lC=w(sC());function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _L=/(url|image|image-set)\(/i,sh=class extends Ua{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(_L)&&delete n[r]}),n}},aC=1,DL=3,FL=/^<(!doctype|(html|head|body)(\s|>))/i,HL=/^(aria-|data-|\w+:)/iu,UL=/{{{(\w+)\/?}}}/;function jL(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var yd=class{constructor(t,n={},r=[],o=[]){var i;qn(this,"allowed",void 0),qn(this,"banned",void 0),qn(this,"blocked",void 0),qn(this,"container",void 0),qn(this,"content",[]),qn(this,"props",void 0),qn(this,"matchers",void 0),qn(this,"filters",void 0),qn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new sh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:rh),this.banned=new Set(nh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let f="";for(;i&&(a=l.match(i));){let{index:d,length:p,match:y,valid:v,void:g,...m}=a,h=l.propName+String(s);d>0&&(f+=i.slice(0,d)),v?(f+=g?`{{{${h}/}}}`:`{{{${h}}}}${y}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=y,l.greedy?(i=f+i.slice(d+p),f=""):i=i.slice(d+(p||y.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
15
+ `,ko.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[x]||c.options.other}if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o,d-(c.offset||0)));continue}}return GI(a)}function XI(e,t){return t?bt(bt(bt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=bt(bt({},e[r]),t[r]||{}),n},{})):e}function QI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=XI(e[r],t[r]),n},bt({},e)):e}function $g(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function ZI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.number),strategy:id.variadic}),getDateTimeFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.dateTime),strategy:id.variadic}),getPluralRules:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.pluralRules),strategy:id.variadic})}}var zE=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var f=c.reduce(function(d,p){return!d.length||p.type!==Ze.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Ma(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=NE(s,["formatters"]);this.ast=e.__parse(t,bt(bt({},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=QI(e.formats,r),this.formatters=o&&o.formatters||ZI(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=DE,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 JI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var eL="dummy",Wg=(0,sd.createContext)(null);function G(e){let t=(0,sd.useContext)(Wg);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=JI(n,r);return i?new zE(i).format(o):(t!==eL&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var ad=w(F());var BE={root:"U",content:"To"};var qg=w(b()),nL=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,ad.useRef)(null),u=A("Dialog",BE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,ad.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,qg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:f,children:(0,qg.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},ld=nL;var KE=w(te());var VE={root:"y"};var $E=w(b()),oL=({className:e,value:t,...n})=>{let r=A("TextInput",VE);return(0,$E.jsx)("input",{className:(0,KE.default)(e,r.root),type:"text",value:t,...n})},_a=oL;var Gg={};Je(Gg,{enUS:()=>iL,nlNL:()=>sL});var iL={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"}]},sL={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 WE={root:"Uo",anchorButton:"Bo",errorMessage:"Do",title:"Io",subtitle:"Oo",text:"Xo",input:"Jo",actions:"Ko",button:"w",primaryButton:"Po"};var ke=w(b());var lL=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},uL=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=G(Gg),s=A("LoginTokenDialog",WE),a=O(Ux),l=Z(),u=U("productName"),[c,f]=(0,nn.useState)(e||""),[d,p]=(0,nn.useState)(0),[y,v]=(0,nn.useState)(""),g=(0,nn.useCallback)(async x=>{x.preventDefault(),l(zx({email:c})),p(1)},[n,c]),m=()=>{v(""),p(0)},h=(0,nn.useCallback)(async x=>{x.preventDefault();let T=lL(x.target.elements.token.value);if(!T){v(i("verifyCodeError",{login:S}));return}l(ba({token:T}))},[n]),S=(0,nn.useMemo)(()=>x=>(0,ke.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,nn.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ke.jsx)(ld,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ke.jsxs)("div",{className:s.root,children:[(0,ke.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ke.jsxs)("form",{onSubmit:g,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ke.jsx)(_a,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>f(x.target.value)}),(0,ke.jsx)("div",{className:s.actions,children:(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ke.jsxs)("form",{onSubmit:h,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ke.jsx)(_a,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,ke.jsx)("div",{className:s.errorMessage,children:y}),(0,ke.jsxs)("div",{className:s.actions,children:[(0,ke.jsx)("button",{type:"button",className:(0,ud.default)(s.button),onClick:m,children:i("back")}),(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},qE=uL;var YE=w(b()),cL=()=>{let e=O(jx),t=O(gE),n=U("adminUrl"),r=en(),o=()=>r.send(Ki,!1),i=()=>{r.send(Ki,!1),r.send(Aa)};return(0,YE.jsx)(qE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},GE=cL;var rb=w(Qg()),gt=w(F());var RL={data:null,fetchState:"idle"},JE=e=>e.contentTypes.data,Da=j("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),AL=q({name:"contentTypes",initialState:RL,reducers:{},extraReducers:e=>{e.addCase(Da.pending,t=>{t.fetchState="loading"}).addCase(Da.rejected,t=>{t.fetchState="error"}).addCase(Da.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),eC=AL.reducer;function Po(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 Gn=w(F());var tC=w(F()),cd=w(te());var Bt={root:"Qo",list:"Vo",listWrapper:"Wo",listHorizontal:"B",page:"v",search:"D",pageNav:"Zo",pageTitle:"_o",pageBackButton:"I",listHeader:"oe",listHeading:"ee",listMoreButton:"ie",listItem:"O",listItemContent:"a",listItemText:"re",listItemDescription:"te",listItemActions:"X",truncate:"ne",lineClamp:"ae",listItemTitle:"de",listItemAction:"pe",listItemPrimaryAction:"le",listItemSelected:"se",sources:"xe",sourcesTitle:"ce",source:"fe",icon:"J",searchIcon:"ge",searchInputWrapper:"be",searchInput:"k",select:"he",selectType:"me",selectWrapper:"z",image:"ue",imageSrc:"ye",imageSrcHidden:"we",imageSrcStatus:"ve",imageTitle:"ke",actions:"ze",actionsWrapper:"je",actionsBar:"qe",actionButton:"K",hasShortKeys:"Ce",actionShortcut:"Se",actionShortcutFixKerning:"Ee"};var Ro={};Je(Ro,{enUS:()=>LL,nlNL:()=>OL});var LL={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}]},OL={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}]};var Ur=w(b()),NL=({src:e,title:t})=>{let n=A("CommandPalette",Bt),[r,o]=(0,tC.useState)("loading"),i=G(Ro);return(0,Ur.jsxs)("div",{className:n.image,children:[(0,Ur.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,cd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:(0,Ur.jsx)(Il,{})}),t&&(0,Ur.jsx)("span",{className:n.imageTitle,children:t})]})},nC=NL;var rC=w(F()),oC=w(te());var Ao=w(b());function Zg({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=G(Ro),s=A("CommandPalette",Bt);return rC.default.Children.count(e)===0?null:(0,Ao.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Ao.jsxs)("div",{className:s.listHeader,children:[t&&(0,Ao.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Ao.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Ao.jsx)("div",{className:(0,oC.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var za=w(te());var dd=w(F());function Fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=1,eh=2,th=4,Le=8,fd=16,Ha=32,rn=64,Jg={a:{content:re|Le,self:!1,type:re|Le|Ha|rn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:re|Le,void:!0},body:{content:re|eh|th|Le|fd|Ha|rn},button:{content:Le,type:re|Le|Ha|rn},caption:{content:re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:re|Ha|rn},dd:{content:re,parent:["dl"]},dl:{children:["dt","dd"],type:re},dt:{content:re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:re,void:!0},img:{void:!0},li:{content:re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:re},picture:{children:["source","img"],type:re|Le|fd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Le,parent:["ruby","rtc"]},rtc:{content:Le,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Le,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:re},tbody:{parent:["table"],children:["tr"]},td:{content:re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:re,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:re},video:{children:["track","source"]},wbr:{type:re|Le,void:!0}};function Lo(e){return t=>{Jg[t]={...e,...Jg[t]}}}["address","main","div","figure","p","pre"].forEach(Lo({content:re,type:re|rn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Lo({content:Le,type:re|Le|rn}));["p","pre"].forEach(Lo({content:Le,type:re|rn}));["s","small","span","del","ins"].forEach(Lo({content:Le,type:re|Le}));["article","aside","footer","header","nav","section","blockquote"].forEach(Lo({content:re,type:re|eh|rn}));["h1","h2","h3","h4","h5","h6"].forEach(Lo({content:Le,type:re|th|rn}));["audio","canvas","iframe","img","video"].forEach(Lo({type:re|Le|fd|rn}));var ja=Object.freeze(Jg),nh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],rh=Object.keys(ja).filter(e=>e!=="canvas"&&e!=="iframe"),ce=1,oh=2,Io=3,jr=4,md=5,gd=Object.freeze({alt:ce,cite:ce,class:ce,colspan:Io,controls:jr,datetime:ce,default:jr,disabled:jr,dir:ce,height:ce,href:ce,id:ce,kind:ce,label:ce,lang:ce,loading:ce,loop:jr,media:ce,muted:jr,poster:ce,rel:ce,role:ce,rowspan:Io,scope:ce,sizes:ce,span:Io,start:Io,style:md,src:ce,srclang:ce,srcset:ce,tabindex:ce,target:ce,title:ce,type:ce,width:ce}),ih=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function pd(){return pd=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},pd.apply(this,arguments)}function hd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?dd.default.createElement(i,pd({className:t},e)):dd.default.createElement(i,pd({className:t},e),n)}var Ua=class{attribute(t,n){return n}node(t,n){return n}};function iC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var Wn=class{constructor(t,n,r){Fa(this,"greedy",!1),Fa(this,"options",void 0),Fa(this,"propName",void 0),Fa(this,"inverseName",void 0),Fa(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?dd.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return iC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Oo=w(F()),uC=w(aC());function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var DL=/(url|image|image-set)\(/i,sh=class extends Ua{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(DL)&&delete n[r]}),n}},lC=1,FL=3,HL=/^<(!doctype|(html|head|body)(\s|>))/i,UL=/^(aria-|data-|\w+:)/iu,jL=/{{{(\w+)\/?}}}/;function zL(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var yd=class{constructor(t,n={},r=[],o=[]){var i;qn(this,"allowed",void 0),qn(this,"banned",void 0),qn(this,"blocked",void 0),qn(this,"container",void 0),qn(this,"content",[]),qn(this,"props",void 0),qn(this,"matchers",void 0),qn(this,"filters",void 0),qn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new sh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:rh),this.banned=new Set(nh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let f="";for(;i&&(a=l.match(i));){let{index:d,length:p,match:y,valid:v,void:g,...m}=a,h=l.propName+String(s);d>0&&(f+=i.slice(0,d)),v?(f+=g?`{{{${h}/}}}`:`{{{${h}}}}${y}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=y,l.greedy?(i=f+i.slice(d+p),f=""):i=i.slice(d+(p||y.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||jL)();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(FL)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,lC.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==aC||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=gd[l]||gd[s];if(!this.isSafe(t)||!l.match(HL)&&(!n&&(!u||u===oh)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===jr?c=!0:u===Io?c=Number.parseFloat(String(c)):u!==md&&(c=String(c)),r[ih[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 ja[t]?{...n,...ja[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===aC){let d=c.nodeName.toLowerCase(),p=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,p);let m=s(y,v,p);if(m===null)return;if(typeof m<"u"){l.push(Oo.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,p))){var f;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),p.void&&(m.selfClose=p.void),l.push(Oo.default.createElement(hd,{...m,key:this.keyIndex},(f=v)!==null&&f!==void 0?f:this.parseNode(y,p)))}else l=[...l,...this.parseNode(y,p.tagName?p:n)]}else if(c.nodeType===DL){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(UL);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:f,props:d}=n[a],p;if(u)p=s.length,r.push(f.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));p=y.index+y[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function zL(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let p=new yd(i??"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?Oo.default.createElement(Oo.default.Fragment,null,d):Oo.default.createElement(hd,{attributes:n,className:r,tagName:c},d)}function $i(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:f="span",noWrap:d=!1,...p}=e,y=i?[]:l,v=o?[]:a,g=c?[c]:[],m=u?[u]:[];y.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let h=g.reduce((C,T)=>T(C,e),r??""),S=new yd(h,p,y,v),x=m.reduce((C,T)=>T(C,e),S.parse());return Oo.default.createElement(zL,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var BL=/[.*+?^${}()|[\]\\]/g,VL=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function KL(e){return e.replace(BL,"\\$&")}function $L(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function WL(e){return e.search(VL)}function uC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${KL(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function cC(e){return e.replace(Fl,'<mark data-type="placeholder">$1</mark>')}function Wi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function qL(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 ah(e,t,n={}){if(t){let r=$L(t.toLowerCase(),e.toLowerCase()),o=Wi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=WL(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ev).length>3||t.length>30?qL(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Wi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var GL=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function vd(e){return GL.test(e)}function dC(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ue=w(F()),fC=w(ee());var lh={root:"Ge",trigger:"P",content:"Ne",contentOpen:"Ye",contentTop:"Ae",contentBottom:"Fe",item:"Q"};var No=w(b()),XL=0,pC=Ue.default.createContext(null),QL=()=>{let e=(0,Ue.useContext)(pC);if(!e)throw new Error("Invalid DropdownContext");return e},mC=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ue.useMemo)(()=>++XL,[]),o=(0,Ue.useRef)(null),i=(0,Ue.useRef)(null),s=A("Dropdown",lh),[a,l]=(0,Ue.useState)(!1),[u,c]=(0,Ue.useState)(n),f=p=>{p.preventDefault(),p.stopPropagation(),l(!a)},d=(0,Ue.useCallback)(([p])=>{!p.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ue.useEffect)(()=>{let p=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}},[]),(0,Ue.useEffect)(()=>{if(!i.current&&!a)return()=>{};let p=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&p.observe(i.current),()=>{i.current&&p.unobserve(i.current)}},[i,a]),(0,No.jsx)(pC.Provider,{value:{setIsOpen:l},children:(0,No.jsxs)("div",{ref:o,className:s.root,children:[(0,No.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:f,children:e}),(0,No.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,fC.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function ZL({as:e,children:t,onClick:n,...r}){let o=e||"button",i=A("Dropdown",lh),{setIsOpen:s}=QL(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,No.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}mC.Item=ZL;var uh=mC;var ch=w(b()),gC=e=>(0,ch.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,ch.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var Mo={};Je(Mo,{enUS:()=>JL,nlNL:()=>eO});var JL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},eO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Sd=w(b()),tO="%0d%0a%0d%0a%0d%0a",nO=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(tO)}`},rO=({suggestion:e,onFeedback:t})=>{let n=G(Mo),r=U("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Sd.jsx)(uh,{trigger:(0,Sd.jsx)(gC,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Sd.jsx)(uh.Item,{as:"a",href:nO(r,e),onClick:t,children:n("giveFeedback")})})},wd=rO;var xd=w(F()),vC=w(b()),hC=xd.default.createContext(void 0);function zr(){let e=xd.default.useContext(hC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var yC=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=xd.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,vC.jsx)(hC.Provider,{value:s,children:e})};var Tt=w(b());function dh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=zr(),p=A("CommandPalette",Bt);function y(v){r(v),e&&d(!1)}return(0,Tt.jsxs)("div",{className:(0,za.default)(p.listItem,l===f&&p.listItemSelected),children:[(0,Tt.jsx)("button",{type:"button",className:(0,za.default)(p.listItemAction,p.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,Tt.jsxs)("div",{className:p.listItemContent,children:[typeof n=="string"?(0,Tt.jsx)("p",{className:(0,za.default)(p.listItemText,p.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,Tt.jsx)($i,{tagName:"p",allowList:[],content:vd(s)?dC(s):s,className:(0,za.default)(p.listItemDescription,u==null?void 0:u.description,t?p.lineClamp:p.truncate)})]})}),o&&(0,Tt.jsx)("div",{className:p.listItemActions,children:(0,Tt.jsx)(wd,{suggestion:String(n),onFeedback:o})}),a&&(0,Tt.jsxs)("div",{className:p.sources,children:[(0,Tt.jsx)("span",{className:p.sourcesTitle,children:"Sources"}),a.map(v=>v.url?(0,Tt.jsx)("a",{className:p.source,href:v.url,target:"_blank",title:v.url,rel:"noopener noreferrer",onClick:()=>i&&i(v),children:v.name},v.url):(0,Tt.jsx)("span",{className:p.source,children:v.name},v.name))]})]})}var Ba=w(b()),SC=()=>(0,Ba.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Ba.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Ba.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 _o=w(b());function fh({children:e,title:t,id:n,onDismiss:r}){let o=G(Ro),i=A("CommandPalette",Bt),{page:s}=zr();return s!==n?null:(0,_o.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,_o.jsxs)("div",{className:i.pageNav,children:[(0,_o.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,_o.jsx)(SC,{}),o("back")]}),t&&(0,_o.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wC=w(F());var Va=w(b()),qi=()=>(0,Va.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Va.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Va.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 on=w(b());function oO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=A("CommandPalette",Bt);return(0,on.jsxs)("div",{className:l.search,children:[(0,on.jsx)("div",{className:l.searchIcon,children:(0,on.jsx)(qi,{})}),(0,on.jsxs)("div",{className:l.searchInputWrapper,children:[(0,on.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,on.jsx)("div",{className:l.selectWrapper,children:(0,on.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,on.jsx)("option",{children:r}),o.map(u=>(0,on.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var xC=(0,wC.forwardRef)(oO);var ph=w(ee());var Ed=w(b()),iO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=A("CommandPalette",Bt);return(0,Ed.jsxs)("button",{type:"button",...r,onClick:e,className:(0,ph.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Ed.jsx)("span",{className:(0,ph.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},EC=iO;var Ka=w(b()),sO="[data-command-palette-item]";function Gi({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:f,search:d}){let[p,y]=(0,Gn.useState)(),v=(0,Gn.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=v.current)==null||N.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let N=S();N.length!==0&&y(N[0].dataset.itemId)},S=()=>Array.from(document.querySelectorAll(sO)||[]),x=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let z=x(N);z&&y(z.dataset.itemId)},T=N=>{let z=x(N);z&&z.scrollIntoView({behavior:"smooth"})},k=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),J=N[K+1];J&&J.dataset.itemId?C(J.dataset.itemId):h()},I=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),J=N[K-1];J&&J.dataset.itemId?C(J.dataset.itemId):C(N[N.length-1].dataset.itemId)},L=(0,Gn.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),k();break}case"ArrowUp":{N.preventDefault(),I();break}case"Enter":{if(p){let z=x(p);z==null||z.click()}break}}},[p]);return(0,Gn.useEffect)(()=>{h()},[d,r,l,f]),(0,Gn.useEffect)(()=>{p&&T(p)},[p]),(0,Ka.jsx)(ld,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,onKeyDown:L,children:(0,Ka.jsxs)(yC,{selected:p,setSelected:y,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,Ka.jsx)(xC,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Gi.Page=fh;Gi.List=Zg;Gi.Image=tC;Gi.ListItem=dh;Gi.Button=EC;var he=Gi;var CC=w(F());function bC(e,t){(0,CC.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 $a=w(F());var TC={data:null,fetchState:"idle"},Cd=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},sn=j("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)}),aO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),lO=q({name:"entities",initialState:TC,reducers:{},extraReducers:e=>{e.addCase(sn.pending,t=>{t.fetchState="loading"}).addCase(sn.rejected,t=>{t.fetchState="error"}).addCase(sn.fulfilled,(t,n)=>{t.fetchState="done",t.data=aO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(ue,()=>TC)}}),kC=lO.reducer;var mh={};Je(mh,{enUS:()=>uO,nlNL:()=>cO});var uO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},cO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var PC={root:"He",empty:"Le"};var Yi=w(b()),fO=({onCopy:e})=>{let t=(0,$a.useRef)(null),n=A("EntitiesList",PC),r=O(Cd),{setSelected:o}=zr(),i=G(mh),s=Z();return(0,$a.useEffect)(()=>{s(sn())},[]),(0,$a.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Yi.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Yi.jsx)(he.List,{children:r.map((a,l)=>(0,Yi.jsx)(he.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Yi.jsx)("p",{className:n.empty,children:i("noResults")})]})},RC=fO;var an=w(F());var AC={data:null,fetchState:"idle"},IC=e=>e.summary.data,LC=e=>e.summary.fetchState==="error",Yn=j("summary/getSummary",async(e,t)=>{var c,f,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(f=t.getState().info)==null?void 0:f.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u?{summary:u}:Promise.reject(new Error("Summary is not provided"))}),pO=q({name:"summary",initialState:AC,reducers:{},extraReducers:e=>{e.addCase(Yn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Yn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Yn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(ue,()=>AC)}}),OC=pO.reducer;var gh={};Je(gh,{enUS:()=>mO,nlNL:()=>gO});var mO={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."}]},gO={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 NC={root:"Me",actions:"Re",main:"Te",textInput:"V",loading:"Ue",error:"Be"};var Xn=w(b()),yO=({onCopy:e})=>{let t=(0,an.useRef)(null),n=A("SummaryForm",NC),[r,o]=(0,an.useState)(""),i=G(gh),s=O(IC),a=O(LC),l=Z(),u=()=>{l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,an.useEffect)(()=>{l(Yn())},[]),(0,an.useEffect)(()=>{o(s||"")},[s]),(0,an.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,an.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,Xn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Xn.jsx)("p",{className:n.error,children:i("error")}):(0,Xn.jsxs)(an.Fragment,{children:[(0,Xn.jsx)("div",{className:n.main,children:(0,Xn.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,Xn.jsx)("div",{className:n.actions,children:(0,Xn.jsx)(he.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},MC=yO;var Wa={};Je(Wa,{enUS:()=>vO,nlNL:()=>SO});var vO={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},SO={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Br=w(F());var hh={};Je(hh,{enUS:()=>wO,nlNL:()=>xO});var wO={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"}]},xO={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 _C={root:"W",title:"De",empty:"Ie",status:"Oe",form:"Z",input:"_",submit:"Xe",question:"Je",answer:"Ke",alignRight:"Pe"};var CO={data:null,fetchState:"idle"},DC=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},qa=j("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),bO=q({name:"knowledgeAssistant",initialState:CO,reducers:{},extraReducers:e=>{e.addCase(qa.pending,t=>{t.fetchState="loading"}).addCase(qa.rejected,t=>{t.fetchState="error"}).addCase(qa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),FC=bO.reducer;var yh={data:[],fetchState:"idle"},HC=e=>{var t;return(t=e.answer)==null?void 0:t.data},UC=e=>e.answer.fetchState,Qi=xe("answer/resetKnowledgeSearch"),Xi=j("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=DC(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),TO=q({name:"answer",initialState:yh,reducers:{},extraReducers:e=>{e.addCase(Xi.pending,t=>{t.fetchState="loading"}).addCase(Xi.rejected,t=>{t.fetchState="error"}).addCase(Xi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(ue,()=>yh).addCase(Qi,()=>yh)}}),jC=TO.reducer;var Ga=w(b()),zC=()=>(0,Ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ga.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ga.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 kt=w(b()),kO=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Br.default.useState(""),{setSelected:i}=zr(),s=(0,Br.useRef)(null),a=A("EntitiesList",_C),l=G(hh),u=Z(),c=O(HC),f=O(UC),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Xi(r))},p=(y,v)=>{u(Qe({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Br.useEffect)(()=>{var y;n&&f==="idle"?u(Xi(n)):(y=s.current)==null||y.focus()},[s,f]),(0,Br.useEffect)(()=>{f==="done"&&(u(Qe({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(`knowledge-assist-${c.length-1}`),o(""))},[f,c]),(0,Br.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,kt.jsxs)("div",{className:a.root,children:[c.length>0&&(0,kt.jsx)("div",{className:a.alignRight,children:(0,kt.jsx)(he.Button,{onClick:t,children:l("reset")})}),c.map(({question:y,answer:v},g)=>(0,kt.jsx)(he.List,{children:(0,kt.jsx)(he.ListItem,{id:`knowledge-assist-${g}`,"data-testid":"knowledge-search-answer",description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:m=>p(m,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${g}`)),f==="loading"&&(0,kt.jsx)("p",{className:a.status,children:l("loading")}),f==="error"&&(0,kt.jsx)("p",{className:a.status,children:l("error")}),(0,kt.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,kt.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(void 0)},onChange:y=>{i(void 0),o(y.target.value)}}),(0,kt.jsx)("button",{type:"submit",className:a.submit,children:(0,kt.jsx)(zC,{})})]})]})},BC=kO;var PO={data:null,fetchState:"idle"},Vr=e=>e.profile.data,bd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ya=j("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),RO=q({name:"profile",initialState:PO,reducers:{},extraReducers:e=>{e.addCase(Ya.pending,t=>{t.fetchState="loading"}).addCase(Ya.rejected,t=>{t.fetchState="error"}).addCase(Ya.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),VC=RO.reducer;var JC=w(F());var AO=["{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}"],IO=new RegExp(AO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function KC(e,t){let n=e.split(IO),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let f=a.charAt(0),d=0;do u=f?t.indexOf(f,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function $C(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var qC={suggestions:[],fetchState:"idle",isInitialRequest:null},WC={default:qC},GC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},YC=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")},Td=e=>e.textSuggestions,XC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},kd=xe("textSuggestions/refresh"),ln=j("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=Vi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ra(r),e);if(e==="default"){let c=s?l.filter(XC(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),Xa=j("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,{...Ra(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(XC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?KC(c.text,e):c.text}))),l=$C(l,i),t.dispatch(En(l)),l}),QC=q({name:"textSuggestions",initialState:WC,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(ln.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||qC;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(ln.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(ln.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Xa.pending,t=>{t.default.fetchState="loading"}).addCase(Xa.rejected,t=>{t.default.fetchState="error"}).addCase(Xa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(ue,()=>WC)}}),{setTextSuggestions:oH,setSuggestionState:iH}=QC.actions,ZC=QC.reducer;var Do=w(b()),LO=({commands:e,onClick:t})=>{var a,l,u;let n=Z(),r=G(Wa),o=O(Vr),i=O(Td),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,JC.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(ln(c))})},[]),(0,Do.jsxs)("div",{children:[e.length>0&&(0,Do.jsx)(he.List,{heading:r("commands"),children:e.map((c,f)=>(0,Do.jsx)(he.ListItem,{id:`command-${f}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:f})=>{var d;return(0,Do.jsx)(he.List,{heading:f,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((p,y)=>(0,Do.jsx)(he.ListItem,{id:`${c}-${y}`,closeOnSelect:!1,description:p.text,onClick:()=>t(p.text,p),"data-testid":"search-overlay-suggestion",children:p.title},`${p.id}-${p.text}`))},c)})]})},eb=LO;var je=w(b()),NO=200,MO=5,_O=4,tb=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),DO=()=>{let e=Z(),t=en(),n=G(Wa),[r,o]=(0,gt.useState)(!1),[i,s]=(0,gt.useState)(""),a=O(SE),l=O(Vr),[u,c]=(0,gt.useState)(),f=O(nt),d=U("showSearch"),p=U("showEntitiesCommand"),y=U("showSummaryCommand"),v=U("showKnowledgeSearch"),g=U("showImageSearch"),m=U("searchTriggerKey"),h=O(ZE),S=O(wE),x=O(xE),C=O(vE),T=_=>pn(S.filter($=>$.type===_.toUpperCase()),_),k=[{value:"PERSONAL",label:n("personalSuggestions"),list:T("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:T("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:T("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:T("IMAGE"),listOrientation:"horizontal",shouldShow:g}].filter(_=>_.shouldShow),I=[{label:n("entitiesClipboard"),onClick:()=>e(Jt("entities")),shouldShow:p&&tb(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Jt("summary")),shouldShow:y&&tb(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Jt("knowledgeAssist")),shouldShow:v}].filter(_=>_.shouldShow),L=(h==null?void 0:h.map(_=>({value:_.code.toUpperCase(),label:`${_.name}s`,list:T(_.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],N=(0,gt.useCallback)((0,nb.default)((_,$)=>{e(bo({query:_,type:$,tags:["search-overlay"],size:u?50:20}))},NO),[u]),z=(0,gt.useCallback)((_,$)=>{switch($.type){case"IMAGE":t.send(Hg,{suggestion:$});break;default:t.send(Hr,{text:_,suggestion:$})}e(Ct(!1))},[e]),K=_=>{Po(_.text),e(Qe({name:"entity copied",data:{entity:_,type:"copy"}})),e(Ct(!1))},J=(0,gt.useCallback)(_=>{e(Qe({name:"suggestion feedback",data:{text:_.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),oe=_=>{t.send(Hr,{text:_,suggestion:{source:"knowledge-assist",text:_}}),e(Qe({name:"answer used",data:{originalText:_},options:{includeConversationData:!0}})),s(""),e(Jt("search")),e(Qi()),e(Ct(!1))},ze=_=>{Po(_),e(Ct(!1))};function pn(_,$){return _.slice(0,u?10:$.toLowerCase()==="image"?_O:MO)}function st(_){return $=>{r?window.confirm(n("warning"))&&(_($),o(!1)):_($)}}return(0,gt.useEffect)(()=>{i?N(i,u):e(Wc())},[i,u]),(0,gt.useEffect)(()=>{a==="search"&&e(Qi())},[a]),(0,gt.useEffect)(()=>{f&&e(Da())},[f]),bC(m,()=>e(Ct(!0))),!d||!l?null:(0,je.jsxs)(he,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:st(_=>e(Ct(_))),onChangeType:_=>c(_),onChangePage:st(_=>e(Jt(_))),selectedType:u,search:i,page:a,isOpen:C,types:[...L,...k],children:[(0,je.jsxs)(he.Page,{id:"search",children:[i.length===0&&(0,je.jsx)(eb,{commands:I,onClick:z}),i.length>0&&(0,je.jsxs)(gt.Fragment,{children:[I.length>0&&(0,je.jsx)(he.List,{heading:n("commands"),children:I.map((_,$)=>(0,je.jsx)(he.ListItem,{closeOnSelect:!1,onClick:_.onClick,id:`commands-${$}`,children:_.label},_.label))}),[...L,...k].map(({value:_,label:$,list:ar,lineClamp:ye,listOrientation:lr})=>(0,je.jsx)(he.List,{heading:$,orientation:lr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(_),hasMore:!u&&x[_.toLowerCase()]>pn(ar,_).length,children:pn(ar,_).map(W=>(0,je.jsx)(he.ListItem,{id:`${_}-${W.id}`,closeOnSelect:!1,lineClamp:ye,onClick:()=>z(W.text,W),description:_!=="IMAGE"?W.title&&W.text:void 0,onFeedback:_!=="IMAGE"?()=>J(W):void 0,children:_==="IMAGE"?(0,je.jsx)(he.Image,{title:W.title||W.text,src:W.image}):W.title||W.text},`${W.id}-${W.text}`))},_))]})]}),(0,je.jsx)(he.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(RC,{onCopy:K})}),(0,je.jsx)(he.Page,{id:"summary",title:n("summaryTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(MC,{onCopy:ze})}),(0,je.jsx)(he.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:st(()=>{e(Qi()),e(Jt("search"))}),children:(0,je.jsx)(BC,{question:i,onUse:oe,onResetQuestion:()=>{e(Qi()),s("")}})})]})},rb=DO;var Qa=w(b()),FO=()=>{let e=U("showSearch"),t=U("isEmbedded");return(0,Qa.jsxs)(ob.Fragment,{children:[e&&(0,Qa.jsx)(rb,{}),t&&(0,Qa.jsx)(qE,{})]})},ib=FO;var ub=w(ee());var Pd=w(b()),sb=({className:e})=>(0,Pd.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Pd.jsx)("g",{children:(0,Pd.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||zL)();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(HL)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,uC.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==lC||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=gd[l]||gd[s];if(!this.isSafe(t)||!l.match(UL)&&(!n&&(!u||u===oh)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===jr?c=!0:u===Io?c=Number.parseFloat(String(c)):u!==md&&(c=String(c)),r[ih[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 ja[t]?{...n,...ja[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===lC){let d=c.nodeName.toLowerCase(),p=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,p);let m=s(y,v,p);if(m===null)return;if(typeof m<"u"){l.push(Oo.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,p))){var f;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),p.void&&(m.selfClose=p.void),l.push(Oo.default.createElement(hd,{...m,key:this.keyIndex},(f=v)!==null&&f!==void 0?f:this.parseNode(y,p)))}else l=[...l,...this.parseNode(y,p.tagName?p:n)]}else if(c.nodeType===FL){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(jL);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:f,props:d}=n[a],p;if(u)p=s.length,r.push(f.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));p=y.index+y[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function BL(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let p=new yd(i??"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?Oo.default.createElement(Oo.default.Fragment,null,d):Oo.default.createElement(hd,{attributes:n,className:r,tagName:c},d)}function $i(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:f="span",noWrap:d=!1,...p}=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 h=g.reduce((T,C)=>C(T,e),r??""),S=new yd(h,p,y,v),x=m.reduce((T,C)=>C(T,e),S.parse());return Oo.default.createElement(BL,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var VL=/[.*+?^${}()|[\]\\]/g,KL=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function $L(e){return e.replace(VL,"\\$&")}function WL(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function qL(e){return e.search(KL)}function cC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${$L(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function dC(e){return e.replace(Fl,'<mark data-type="placeholder">$1</mark>')}function Wi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function GL(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 ah(e,t,n={}){if(t){let r=WL(t.toLowerCase(),e.toLowerCase()),o=Wi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=qL(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Cv).length>3||t.length>30?GL(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Wi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var YL=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function vd(e){return YL.test(e)}function fC(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ue=w(F()),pC=w(te());var lh={root:"Ge",trigger:"P",content:"Ne",contentOpen:"Ye",contentTop:"Ae",contentBottom:"Fe",item:"Q"};var No=w(b()),QL=0,mC=Ue.default.createContext(null),ZL=()=>{let e=(0,Ue.useContext)(mC);if(!e)throw new Error("Invalid DropdownContext");return e},gC=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ue.useMemo)(()=>++QL,[]),o=(0,Ue.useRef)(null),i=(0,Ue.useRef)(null),s=A("Dropdown",lh),[a,l]=(0,Ue.useState)(!1),[u,c]=(0,Ue.useState)(n),f=p=>{p.preventDefault(),p.stopPropagation(),l(!a)},d=(0,Ue.useCallback)(([p])=>{!p.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ue.useEffect)(()=>{let p=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}},[]),(0,Ue.useEffect)(()=>{if(!i.current&&!a)return()=>{};let p=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&p.observe(i.current),()=>{i.current&&p.unobserve(i.current)}},[i,a]),(0,No.jsx)(mC.Provider,{value:{setIsOpen:l},children:(0,No.jsxs)("div",{ref:o,className:s.root,children:[(0,No.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:f,children:e}),(0,No.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,pC.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function JL({as:e,children:t,onClick:n,...r}){let o=e||"button",i=A("Dropdown",lh),{setIsOpen:s}=ZL(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,No.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}gC.Item=JL;var uh=gC;var ch=w(b()),hC=e=>(0,ch.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,ch.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var Mo={};Je(Mo,{enUS:()=>eO,nlNL:()=>tO});var eO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},tO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Sd=w(b()),nO="%0d%0a%0d%0a%0d%0a",rO=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(nO)}`},oO=({suggestion:e,onFeedback:t})=>{let n=G(Mo),r=U("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Sd.jsx)(uh,{trigger:(0,Sd.jsx)(hC,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Sd.jsx)(uh.Item,{as:"a",href:rO(r,e),onClick:t,children:n("giveFeedback")})})},wd=oO;var xd=w(F()),SC=w(b()),yC=xd.default.createContext(void 0);function zr(){let e=xd.default.useContext(yC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var vC=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=xd.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,SC.jsx)(yC.Provider,{value:s,children:e})};var Tt=w(b());function dh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=zr(),p=A("CommandPalette",Bt);function y(v){r(v),e&&d(!1)}return(0,Tt.jsxs)("div",{className:(0,za.default)(p.listItem,l===f&&p.listItemSelected),children:[(0,Tt.jsx)("button",{type:"button",className:(0,za.default)(p.listItemAction,p.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,Tt.jsxs)("div",{className:p.listItemContent,children:[typeof n=="string"?(0,Tt.jsx)("p",{className:(0,za.default)(p.listItemText,p.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,Tt.jsx)($i,{tagName:"p",allowList:[],content:vd(s)?fC(s):s,className:(0,za.default)(p.listItemDescription,u==null?void 0:u.description,t?p.lineClamp:p.truncate)})]})}),o&&(0,Tt.jsx)("div",{className:p.listItemActions,children:(0,Tt.jsx)(wd,{suggestion:String(n),onFeedback:o})}),a&&(0,Tt.jsxs)("div",{className:p.sources,children:[(0,Tt.jsx)("span",{className:p.sourcesTitle,children:"Sources"}),a.map(v=>v.url?(0,Tt.jsx)("a",{className:p.source,href:v.url,target:"_blank",title:v.url,rel:"noopener noreferrer",onClick:()=>i&&i(v),children:v.name},v.url):(0,Tt.jsx)("span",{className:p.source,children:v.name},v.name))]})]})}var Ba=w(b()),wC=()=>(0,Ba.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Ba.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Ba.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 _o=w(b());function fh({children:e,title:t,id:n,onDismiss:r}){let o=G(Ro),i=A("CommandPalette",Bt),{page:s}=zr();return s!==n?null:(0,_o.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,_o.jsxs)("div",{className:i.pageNav,children:[(0,_o.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,_o.jsx)(wC,{}),o("back")]}),t&&(0,_o.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var xC=w(F());var Va=w(b()),qi=()=>(0,Va.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Va.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Va.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 on=w(b());function iO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=A("CommandPalette",Bt);return(0,on.jsxs)("div",{className:l.search,children:[(0,on.jsx)("div",{className:l.searchIcon,children:(0,on.jsx)(qi,{})}),(0,on.jsxs)("div",{className:l.searchInputWrapper,children:[(0,on.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,on.jsx)("div",{className:l.selectWrapper,children:(0,on.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,on.jsx)("option",{children:r}),o.map(u=>(0,on.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var EC=(0,xC.forwardRef)(iO);var ph=w(te());var Ed=w(b()),sO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=A("CommandPalette",Bt);return(0,Ed.jsxs)("button",{type:"button",...r,onClick:e,className:(0,ph.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Ed.jsx)("span",{className:(0,ph.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},CC=sO;var Ka=w(b()),aO="[data-command-palette-item]";function Gi({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:f,search:d}){let[p,y]=(0,Gn.useState)(),v=(0,Gn.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=v.current)==null||N.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let N=S();N.length!==0&&y(N[0].dataset.itemId)},S=()=>Array.from(document.querySelectorAll(aO)||[]),x=N=>document.querySelector(`[data-item-id=${N}]`),T=N=>{let z=x(N);z&&y(z.dataset.itemId)},C=N=>{let z=x(N);z&&z.scrollIntoView({behavior:"smooth"})},k=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),ee=N[K+1];ee&&ee.dataset.itemId?T(ee.dataset.itemId):h()},I=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),ee=N[K-1];ee&&ee.dataset.itemId?T(ee.dataset.itemId):T(N[N.length-1].dataset.itemId)},L=(0,Gn.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),k();break}case"ArrowUp":{N.preventDefault(),I();break}case"Enter":{if(p){let z=x(p);z==null||z.click()}break}}},[p]);return(0,Gn.useEffect)(()=>{h()},[d,r,l,f]),(0,Gn.useEffect)(()=>{p&&C(p)},[p]),(0,Ka.jsx)(ld,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,onKeyDown:L,children:(0,Ka.jsxs)(vC,{selected:p,setSelected:y,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,Ka.jsx)(EC,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Gi.Page=fh;Gi.List=Zg;Gi.Image=nC;Gi.ListItem=dh;Gi.Button=CC;var he=Gi;var bC=w(F());function TC(e,t){(0,bC.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 $a=w(F());var kC={data:null,fetchState:"idle"},Cd=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},sn=j("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)}),lO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),uO=q({name:"entities",initialState:kC,reducers:{},extraReducers:e=>{e.addCase(sn.pending,t=>{t.fetchState="loading"}).addCase(sn.rejected,t=>{t.fetchState="error"}).addCase(sn.fulfilled,(t,n)=>{t.fetchState="done",t.data=lO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(ue,()=>kC)}}),PC=uO.reducer;var mh={};Je(mh,{enUS:()=>cO,nlNL:()=>dO});var cO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},dO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var RC={root:"He",empty:"Le"};var Yi=w(b()),pO=({onCopy:e})=>{let t=(0,$a.useRef)(null),n=A("EntitiesList",RC),r=O(Cd),{setSelected:o}=zr(),i=G(mh),s=Z();return(0,$a.useEffect)(()=>{s(sn())},[]),(0,$a.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Yi.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Yi.jsx)(he.List,{children:r.map((a,l)=>(0,Yi.jsx)(he.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Yi.jsx)("p",{className:n.empty,children:i("noResults")})]})},AC=pO;var an=w(F());var IC={data:null,fetchState:"idle"},LC=e=>e.summary.data,OC=e=>e.summary.fetchState==="error",Yn=j("summary/getSummary",async(e,t)=>{var c,f,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(f=t.getState().info)==null?void 0:f.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u?{summary:u}:Promise.reject(new Error("Summary is not provided"))}),mO=q({name:"summary",initialState:IC,reducers:{},extraReducers:e=>{e.addCase(Yn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Yn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Yn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(ue,()=>IC)}}),NC=mO.reducer;var gh={};Je(gh,{enUS:()=>gO,nlNL:()=>hO});var gO={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."}]},hO={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 MC={root:"Me",actions:"Re",main:"Te",textInput:"V",loading:"Ue",error:"Be"};var Xn=w(b()),vO=({onCopy:e})=>{let t=(0,an.useRef)(null),n=A("SummaryForm",MC),[r,o]=(0,an.useState)(""),i=G(gh),s=O(LC),a=O(OC),l=Z(),u=()=>{l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,an.useEffect)(()=>{l(Yn())},[]),(0,an.useEffect)(()=>{o(s||"")},[s]),(0,an.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,an.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,Xn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Xn.jsx)("p",{className:n.error,children:i("error")}):(0,Xn.jsxs)(an.Fragment,{children:[(0,Xn.jsx)("div",{className:n.main,children:(0,Xn.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,Xn.jsx)("div",{className:n.actions,children:(0,Xn.jsx)(he.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},_C=vO;var Wa={};Je(Wa,{enUS:()=>SO,nlNL:()=>wO});var SO={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},wO={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Br=w(F());var hh={};Je(hh,{enUS:()=>xO,nlNL:()=>EO});var xO={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"}]},EO={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 DC={root:"W",title:"De",empty:"Ie",status:"Oe",form:"Z",input:"_",submit:"Xe",question:"Je",answer:"Ke",alignRight:"Pe"};var bO={data:null,fetchState:"idle"},FC=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},qa=j("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),TO=q({name:"knowledgeAssistant",initialState:bO,reducers:{},extraReducers:e=>{e.addCase(qa.pending,t=>{t.fetchState="loading"}).addCase(qa.rejected,t=>{t.fetchState="error"}).addCase(qa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),HC=TO.reducer;var yh={data:[],fetchState:"idle"},UC=e=>{var t;return(t=e.answer)==null?void 0:t.data},jC=e=>e.answer.fetchState,Qi=xe("answer/resetKnowledgeSearch"),Xi=j("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=FC(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),kO=q({name:"answer",initialState:yh,reducers:{},extraReducers:e=>{e.addCase(Xi.pending,t=>{t.fetchState="loading"}).addCase(Xi.rejected,t=>{t.fetchState="error"}).addCase(Xi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(ue,()=>yh).addCase(Qi,()=>yh)}}),zC=kO.reducer;var Ga=w(b()),BC=()=>(0,Ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ga.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ga.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 kt=w(b()),PO=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Br.default.useState(""),{setSelected:i}=zr(),s=(0,Br.useRef)(null),a=A("EntitiesList",DC),l=G(hh),u=Z(),c=O(UC),f=O(jC),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Xi(r))},p=(y,v)=>{u(Qe({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Br.useEffect)(()=>{var y;n&&f==="idle"?u(Xi(n)):(y=s.current)==null||y.focus()},[s,f]),(0,Br.useEffect)(()=>{f==="done"&&(u(Qe({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(`knowledge-assist-${c.length-1}`),o(""))},[f,c]),(0,Br.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,kt.jsxs)("div",{className:a.root,children:[c.length>0&&(0,kt.jsx)("div",{className:a.alignRight,children:(0,kt.jsx)(he.Button,{onClick:t,children:l("reset")})}),c.map(({question:y,answer:v},g)=>(0,kt.jsx)(he.List,{children:(0,kt.jsx)(he.ListItem,{id:`knowledge-assist-${g}`,"data-testid":"knowledge-search-answer",description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:m=>p(m,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${g}`)),f==="loading"&&(0,kt.jsx)("p",{className:a.status,children:l("loading")}),f==="error"&&(0,kt.jsx)("p",{className:a.status,children:l("error")}),(0,kt.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,kt.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(void 0)},onChange:y=>{i(void 0),o(y.target.value)}}),(0,kt.jsx)("button",{type:"submit",className:a.submit,children:(0,kt.jsx)(BC,{})})]})]})},VC=PO;var RO={data:null,fetchState:"idle"},Vr=e=>e.profile.data,bd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ya=j("profile/getProfile",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)}),AO=q({name:"profile",initialState:RO,reducers:{},extraReducers:e=>{e.addCase(Ya.pending,t=>{t.fetchState="loading"}).addCase(Ya.rejected,t=>{t.fetchState="error"}).addCase(Ya.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),KC=AO.reducer;var eb=w(F());var IO=["{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}"],LO=new RegExp(IO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function $C(e,t){let n=e.split(LO),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let f=a.charAt(0),d=0;do u=f?t.indexOf(f,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function WC(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var GC={suggestions:[],fetchState:"idle",isInitialRequest:null},qC={default:GC},YC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},XC=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")},Td=e=>e.textSuggestions,QC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},kd=xe("textSuggestions/refresh"),ln=j("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=Vi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ra(r),e);if(e==="default"){let c=s?l.filter(QC(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),Xa=j("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,{...Ra(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(QC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?$C(c.text,e):c.text}))),l=WC(l,i),t.dispatch(En(l)),l}),ZC=q({name:"textSuggestions",initialState:qC,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(ln.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||GC;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(ln.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(ln.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Xa.pending,t=>{t.default.fetchState="loading"}).addCase(Xa.rejected,t=>{t.default.fetchState="error"}).addCase(Xa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(ue,()=>qC)}}),{setTextSuggestions:iH,setSuggestionState:sH}=ZC.actions,JC=ZC.reducer;var Do=w(b()),OO=({commands:e,onClick:t})=>{var a,l,u;let n=Z(),r=G(Wa),o=O(Vr),i=O(Td),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,eb.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(ln(c))})},[]),(0,Do.jsxs)("div",{children:[e.length>0&&(0,Do.jsx)(he.List,{heading:r("commands"),children:e.map((c,f)=>(0,Do.jsx)(he.ListItem,{id:`command-${f}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:f})=>{var d;return(0,Do.jsx)(he.List,{heading:f,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((p,y)=>(0,Do.jsx)(he.ListItem,{id:`${c}-${y}`,closeOnSelect:!1,description:p.text,onClick:()=>t(p.text,p),"data-testid":"search-overlay-suggestion",children:p.title},`${p.id}-${p.text}`))},c)})]})},tb=OO;var je=w(b()),MO=200,_O=5,DO=4,nb=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),FO=()=>{let e=Z(),t=en(),n=G(Wa),[r,o]=(0,gt.useState)(!1),[i,s]=(0,gt.useState)(""),a=O(wE),l=O(Vr),[u,c]=(0,gt.useState)(),f=O(nt),d=U("showSearch"),p=U("showEntitiesCommand"),y=U("showSummaryCommand"),v=U("showKnowledgeSearch"),g=U("showImageSearch"),m=U("searchTriggerKey"),h=O(JE),S=O(xE),x=O(EE),T=O(SE),C=_=>pn(S.filter($=>$.type===_.toUpperCase()),_),k=[{value:"PERSONAL",label:n("personalSuggestions"),list:C("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:C("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:C("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:C("IMAGE"),listOrientation:"horizontal",shouldShow:g}].filter(_=>_.shouldShow),I=[{label:n("entitiesClipboard"),onClick:()=>e(Jt("entities")),shouldShow:p&&nb(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Jt("summary")),shouldShow:y&&nb(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Jt("knowledgeAssist")),shouldShow:v}].filter(_=>_.shouldShow),L=(h==null?void 0:h.map(_=>({value:_.code.toUpperCase(),label:`${_.name}s`,list:C(_.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],N=(0,gt.useCallback)((0,rb.default)((_,$)=>{e(bo({query:_,type:$,tags:["search-overlay"],size:u?50:20}))},MO),[u]),z=(0,gt.useCallback)((_,$)=>{switch($.type){case"IMAGE":t.send(Hg,{suggestion:$});break;default:t.send(Hr,{text:_,suggestion:$})}e(Ct(!1))},[e]),K=_=>{Po(_.text),e(Qe({name:"entity copied",data:{entity:_,type:"copy"}})),e(Ct(!1))},ee=(0,gt.useCallback)(_=>{e(Qe({name:"suggestion feedback",data:{text:_.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),oe=_=>{t.send(Hr,{text:_,suggestion:{source:"knowledge-assist",text:_}}),e(Qe({name:"answer used",data:{originalText:_},options:{includeConversationData:!0}})),s(""),e(Jt("search")),e(Qi()),e(Ct(!1))},ze=_=>{Po(_),e(Ct(!1))};function pn(_,$){return _.slice(0,u?10:$.toLowerCase()==="image"?DO:_O)}function st(_){return $=>{r?window.confirm(n("warning"))&&(_($),o(!1)):_($)}}return(0,gt.useEffect)(()=>{i?N(i,u):e(Wc())},[i,u]),(0,gt.useEffect)(()=>{a==="search"&&e(Qi())},[a]),(0,gt.useEffect)(()=>{f&&e(Da())},[f]),TC(m,()=>e(Ct(!0))),!d||!l?null:(0,je.jsxs)(he,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:st(_=>e(Ct(_))),onChangeType:_=>c(_),onChangePage:st(_=>e(Jt(_))),selectedType:u,search:i,page:a,isOpen:T,types:[...L,...k],children:[(0,je.jsxs)(he.Page,{id:"search",children:[i.length===0&&(0,je.jsx)(tb,{commands:I,onClick:z}),i.length>0&&(0,je.jsxs)(gt.Fragment,{children:[I.length>0&&(0,je.jsx)(he.List,{heading:n("commands"),children:I.map((_,$)=>(0,je.jsx)(he.ListItem,{closeOnSelect:!1,onClick:_.onClick,id:`commands-${$}`,children:_.label},_.label))}),[...L,...k].map(({value:_,label:$,list:ar,lineClamp:ye,listOrientation:lr})=>(0,je.jsx)(he.List,{heading:$,orientation:lr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(_),hasMore:!u&&x[_.toLowerCase()]>pn(ar,_).length,children:pn(ar,_).map(W=>(0,je.jsx)(he.ListItem,{id:`${_}-${W.id}`,closeOnSelect:!1,lineClamp:ye,onClick:()=>z(W.text,W),description:_!=="IMAGE"?W.title&&W.text:void 0,onFeedback:_!=="IMAGE"?()=>ee(W):void 0,children:_==="IMAGE"?(0,je.jsx)(he.Image,{title:W.title||W.text,src:W.image}):W.title||W.text},`${W.id}-${W.text}`))},_))]})]}),(0,je.jsx)(he.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(AC,{onCopy:K})}),(0,je.jsx)(he.Page,{id:"summary",title:n("summaryTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(_C,{onCopy:ze})}),(0,je.jsx)(he.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:st(()=>{e(Qi()),e(Jt("search"))}),children:(0,je.jsx)(VC,{question:i,onUse:oe,onResetQuestion:()=>{e(Qi()),s("")}})})]})},ob=FO;var Qa=w(b()),HO=()=>{let e=U("showSearch"),t=U("isEmbedded");return(0,Qa.jsxs)(ib.Fragment,{children:[e&&(0,Qa.jsx)(ob,{}),t&&(0,Qa.jsx)(GE,{})]})},sb=HO;var cb=w(te());var Pd=w(b()),ab=({className:e})=>(0,Pd.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Pd.jsx)("g",{children:(0,Pd.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
20
20
  c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
21
21
  c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
22
22
  c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
23
- c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var vh=w(b()),HO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},ab=({className:e,color:t})=>(0,vh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,vh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:HO[t||"pink"]})});var lb={root:"j",text:"q",isLoggedIn:"Qe",isLoggedOut:"oo",icon:"Ve",logo:"We",lock:"Ze"};var Sh={};Je(Sh,{enUS:()=>jO,nlNL:()=>zO});var jO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},zO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Fo=w(b()),cb=({onLogIn:e})=>{let t=G(Sh),n=U("floatingMenu"),r=U("productName"),o=Z(),i=O(nt),s=A("FloatingMenu",lb);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Ct(!0)):e()};return(0,Fo.jsxs)("button",{className:(0,ub.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Fo.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Fo.jsxs)("div",{className:s.icon,children:[(0,Fo.jsx)(ab,{className:s.logo,color:"pink"}),i===!1&&(0,Fo.jsx)(sb,{className:s.lock})]})]})};var Ld=w(F());var db=w(F());function Zi(e){(0,db.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Ho(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function Ji(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 BO={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Rd=({ui:e})=>e.overlayCollapsed;var fb=q({name:"ui",initialState:BO,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:Za,setInputHasFocus:wh,setOverlayCollapsed:Kr,setOpenOverlayWhenTyping:pb,setOverlayCollapsedUserOverwrite:mb}=fb.actions,gb=fb.reducer;var Ad=w(F());var es=w(F());var hb=w(F());function yb(e,t,n){(0,hb.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var vb={root:"_e",actions:"oi",badge:"ei",formattedText:"eo"};var Uo=w(b()),$O=["search","personal-collection-search","search-autocomplete"];function WO(e,t,n,r={}){let o="";return $O.includes(t)?o=uC(ah(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=ah(e,n,r),r.placeholders===!0&&(o=cC(o)),o}var qO=()=>{},GO=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=U("inlineSuggestions"),i=O(Vi),s=Z(),a=A("TextSuggestion",vb),l=(0,es.useRef)(null);(0,es.useEffect)(()=>{let c=setTimeout(()=>{s(iE({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),yb(l,"click",()=>{s(Fr(e)),s(Cn({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,es.useMemo)(()=>WO(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,Uo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(Fr(e)),children:[(0,Uo.jsx)(ae,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:qO,children:(0,Uo.jsx)($i,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,Uo.jsx)("div",{className:a.actions,children:(0,Uo.jsx)(wd,{onFeedback:()=>r(n),suggestion:n.text})})]})},Sb=GO;var xh=w(b()),YO=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Ad.useMemo)(()=>{let i=t.map((s,a)=>(0,xh.jsx)(Sb,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,xh.jsx)(Ad.Fragment,{children:o})},Id=YO;var wb={root:"ii",paper:"ri"};var Ja=w(b()),QO=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Ld.useRef)(null),r=A("InlineSuggestionsOverlay",wb),o=O(Ji),i=Z(),s=O(nt),a=O(Bi),l=O(Rd),u=U("showTextSuggestions");return Zi(()=>{setTimeout(()=>{i(Kr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Ld.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let f=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-f.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,Ja.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Ja.jsx)("div",{ref:n,className:r.paper,children:(0,Ja.jsx)(vt,{children:(0,Ja.jsx)(Id,{suggestions:e,selectedIndex:t})})})})},ZO=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),xb=zn(ZO)(QO);var el=w(b()),JO=({children:e})=>{let n=U("locale").replace("-","");return(0,el.jsx)(Wg.Provider,{value:n,children:e})},eN=({store:e,customStyles:t={},children:n})=>(0,el.jsx)(bg,{store:e,children:(0,el.jsx)(JO,{children:(0,el.jsx)(gs.Provider,{value:t,children:n})})}),jo=eN;var Nd=w(ee()),ts=w(F());var Eb=w(F());function Cb(e,t){let[n,r]=(0,Eb.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){V.error(s)}}]}var bb=()=>/Mac/i.test(navigator.platform);var kb=w(ee()),Qn=w(F());var Eh={};Je(Eh,{enUS:()=>tN,nlNL:()=>nN});var tN={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"}]}]},nN={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 Tb={root:"ti",anchor:"ni",anchorButton:"ai"};var $r=w(b()),Ch=(e,t,n)=>r=>(0,$r.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),oN=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=G(Eh),s=en(),a=A("Login",Tb),l=U("productName"),u=(0,Qn.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,Qn.useCallback)(g=>{g.preventDefault(),s.send(Ki,!0)},[t]),f=(0,Qn.useMemo)(()=>g=>(0,$r.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,Qn.useCallback)(g=>(0,$r.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:p,hour:y,day:v}=(0,Qn.useMemo)(()=>({min:Ch(a,60*10,u),hour:Ch(a,60*60,u),day:Ch(a,60*60*12,u)}),[]);return(0,$r.jsxs)("div",{className:(0,kb.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,$r.jsxs)(Qn.Fragment,{children:[(0,$r.jsx)("br",{}),i("snooze",{min:p,hour:y,day:v})]})]})},Od=oN;var Pb={root:"io",text:"di"};var tl=w(b()),sN=({title:e})=>{let t=A("SearchTrigger",Pb),n=Z();return(0,tl.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(Ct(!0)),children:[(0,tl.jsx)(qi,{}),(0,tl.jsx)("span",{className:t.text,children:e})]})},Rb=sN;var bh={};Je(bh,{enUS:()=>aN,nlNL:()=>lN});var aN={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"}]},lN={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 Ab={root:"pi",isInline:"C",toggleButton:"li",toggleButtonWrapper:"S",toggleButtonWrapperHidden:"si",isCollapsed:"ro",collapsible:"xi",hints:"to",hintsHidden:"ci",triggers:"no",triggersRight:"fi"};var we=w(b()),cN=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=A("SuggestionsOverlay",Ab),o=G(bh),i=O(Ji),s=tE(),a=Z(),l=(0,ts.useRef)(null),u=U("searchTriggerKey"),c=U("productName"),f=O(Rd),d=O(nt),p=O(Bi),[y,v]=(0,ts.useState)(null),g=U("showSearch"),m=U("showTextSuggestions"),h=U("adminUrl"),S=U("isEmbedded"),[x,C]=Cb("dd-snooze-until-ms",0),T=f||x>Date.now(),k=O(K=>K.input.text),I=e.filter(K=>K.source!=="gpt").length,L=()=>{T&&C(0),a(mb(!T))},N=K=>{a(Qe({name:"suggestion feedback",data:{text:K.text,source:"overlay",context:k},options:{includeConversationData:!0}}))},z=K=>{let J=Date.now()+K*1e3;C(J),V.info(`Snooze until: ${new Date(J)}`),a(Kr({collapse:!0}))};return(0,ts.useEffect)(()=>{I===0&&v(null)},[e,I]),Zi(()=>{a(Kr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||p===!1?null:d===!1?(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:T}),children:[!T&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1}}),(0,we.jsx)("div",{className:r.triggersRight,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),(0,we.jsx)("div",{className:r.collapsible,children:(0,we.jsx)(Od,{loginUrl:h,isEmbedded:S,onLogIn:n,onSnooze:z})})]}):!s||!i?null:(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:T}),children:[!T&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1},children:g&&(0,we.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(bb()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,we.jsx)(Rb,{title:o("search")})})}),(0,we.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,we.jsx)("div",{className:(0,Nd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})]})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),I>0&&m&&(0,we.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,we.jsx)(vt,{children:(0,we.jsx)(Id,{onFeedback:N,suggestions:e,selectedIndex:t,reverse:!0})})})]})},dN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Ib=zn(dN)(cN);var Gd=w(ee());var er=w(F());var ns=w(F());function Md(e){return e.contentEditable==="true"}function fN(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 Lb(e){let{selectionStart:t,selectionEnd:n}=Md(e)?fN(e):e;return[t,n]}function Ob(e){let[,t]=(0,ns.useState)(),n=(0,ns.useRef)(null);return n.current=Lb(e),(0,ns.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=Lb(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 Nb(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Fl);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 Mb=w(F()),pN=["div","span","mark","strong","b","i","u","em"];function Th(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(pN.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,Mb.cloneElement)(r,{children:Th(s,t,n+1)})]}return[...e,...t]}function Wr(e){return e.tagName.toLowerCase()==="textarea"}var un={root:"gi",container:"bi",agentText:"ao",tabText:"do",hint:"E",matchSelection:"po",focus:"hi",resetIndent:"mi",matchKeyword:"d",matchPlaceholder:"p",hover:"lo",hintText:"ui",popover:"yi",popoverRoot:"wi",popoverContentContainer:"so",popoverContent:"vi",selectionOptions:"ki",selectionOptionsIsHidden:"zi",selectionOptionsButton:"ji",caret:"qi",popoverSuggestionsRoot:"Ci",suggestionsOverlayInputStyles:"Si"};var Kb=w(ee());var Vd=w(F());var rs=w(F());function _b(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function _d(e){let t=(0,rs.useRef)(null),[n,r]=(0,rs.useState)(!1);return(0,rs.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=_b((c,f)=>{let d=t.current;if(!d)return;let p=c/i,y=f/i,v=d.getBoundingClientRect(),g=p>v.x&&p<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:f})=>[c,f]),[l,u]=_b(()=>{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]}function Db(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Dd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Fb(e){return e!=null}var Ph=w(ee()),Vt=w(F());var Fd=w(F()),gN=["bottom","height","left","right","top","width"],hN=(e={},t={})=>gN.some(n=>e[n]!==t[n]),Zn=new Map,Hb,Ub=()=>{let e=[],t=[];Zn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();hN(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Zn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Hb=window.requestAnimationFrame(Ub)};function yN(e,t){return{observe(){let n=Zn.size===0;if(Zn.has(e)){let r=Zn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Zn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Ub()},unobserve(){let n=Zn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Zn.delete(e),Zn.size||cancelAnimationFrame(Hb)}}}}function kh(e){let[t,n]=(0,Fd.useState)(null);return(0,Fd.useLayoutEffect)(()=>{if(!e.current)return;let r=yN(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var os=w(F()),zb=w(Xu());var jb={root:"Ei"};var Bb=({children:e,parentNode:t})=>{let[n,r]=(0,os.useState)(null),o=(0,os.useContext)(gs);return(0,os.useLayoutEffect)(()=>{let i=document.createElement("div");return Ho(i),i.classList.add(jb.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,zb.createPortal)(e,n):null};var bn={ref:"Gi",root:"o",positionAbove:"l",positionBelow:"s",positionLeft:"x",positionRight:"c",alignStart:"f",alignCenter:"g",alignEnd:"b"};var Hd=w(b()),Ud=(e=!1)=>{let[t,n]=(0,Vt.useState)(e),r=(0,Vt.useCallback)(()=>n(!0),[]),o=(0,Vt.useCallback)(()=>n(!1),[]),i=(0,Vt.useCallback)(()=>n(a=>!a),[]),s=(0,Vt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Rh(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 is=({className:e,triggerRef:t,boundaryRef:n=(0,Vt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Rh,parentNode:a,...l})=>{let u=kh(t),c=kh(n),f=(0,Vt.useMemo)(()=>s(u,c,0),[u,c]);return(0,Hd.jsx)(Bb,{parentNode:a,children:(0,Hd.jsx)("div",{className:(0,Ph.default)(bn.ref,{[bn.positionAbove]:r==="above",[bn.positionBelow]:r==="below",[bn.positionLeft]:r==="left",[bn.positionRight]:r==="right",[bn.alignStart]:o==="start",[bn.alignCenter]:o==="center",[bn.alignEnd]:o==="end"}),style:f,...l,role:"dialog",children:(0,Hd.jsx)("div",{className:(0,Ph.default)(e,bn.root),children:i})})})};var Vb=w(ee()),jd=w(F());var Ah=w(b()),zd=(0,jd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,jd.useRef)(null),i=A("TabCompletion",un);return(0,Ah.jsx)("div",{ref:Dd([o,r]),className:(0,Vb.default)(e,i.popoverContentContainer),...n,children:(0,Ah.jsx)("div",{className:i.popoverContent,children:t})})});var qr=w(b()),wN=e=>t=>{let n=Rh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},xN=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=A("TabCompletion",un),s=Ud(),a=(0,Vd.useMemo)(()=>wN(e.getBoundingClientRect()),[e]),[l,u]=_d(e);return(0,Vd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,qr.jsxs)("span",{children:[(0,qr.jsx)("mark",{ref:Dd([l,s.triggerRef]),className:(0,Kb.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,qr.jsx)(is,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,qr.jsx)(zd,{style:n,children:(0,qr.jsx)("div",{className:i.hintText,children:o})})})]})},Bd=class extends Wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${Db(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(Fb);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,qr.jsx)(xN,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var $b=w(ee());var Ih=w(b()),EN=({inputElement:e,children:t})=>{let n=A("TabCompletion",un),[r,o]=_d(e);return(0,Ih.jsx)("mark",{ref:r,className:(0,$b.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Kd=class extends Wn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,Ih.jsx)(EN,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Wd=w(ee());var ot=w(F());var Lh=w(b()),Wb=()=>(0,Lh.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,Lh.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 Gr=w(F());var Gb=w(Qg());var qb={root:"Ni",content:"Yi"};function $d(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 Oh(e){return e.replace("https://www.","").replace("https://","")}var Kt=w(b()),bN=3,TN=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),kN=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=bN})=>{let i=A("LinkSearch",qb),[s,a]=(0,Gr.useState)(""),l=Z(),u=O(GC("url")),c=O(EE("URL",TN)),[f,d]=(0,Gr.useState)(c.length-1),p=U("fallbackImage"),y=h=>{let S=h.target;a(S.value)},v=(h,S)=>{h.stopPropagation(),h.preventDefault(),window.open(S,"_blank")},g=h=>{var C;let S=f-1<0?c.length-1:f-1,x=f+1===c.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(S),h.code==="ArrowDown"&&d(x),h.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Gr.useCallback)((0,Gb.default)(h=>{l(bo({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Gr.useEffect)(()=>{s&&m(s)},[s]),(0,Gr.useEffect)(()=>()=>{l(Wc())},[]),(0,Kt.jsxs)("div",{className:i.root,children:[(0,Kt.jsx)(vt,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,S)=>(0,Kt.jsx)(ae,{selected:f===S,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Kt.jsxs)(pe,{children:[(0,Kt.jsx)(pe.Image,{src:$d(h,"small",p||void 0),title:h.title||h.text}),(0,Kt.jsxs)(pe.Content,{className:i.content,cropText:!0,children:[(0,Kt.jsx)(pe.Title,{children:h.title||Oh(h.text)}),h.title&&Oh(h.text)]}),(0,Kt.jsx)(ae.Actions,{children:(0,Kt.jsx)(ae.ActionButton,{label:r,onClick:x=>v(x,h.text)})})]})},h.text))}),(0,Kt.jsx)(_a,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:g})]})},Yb=kN;var Nh={};Je(Nh,{enUS:()=>PN,nlNL:()=>RN});var PN={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},RN={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var rt=w(b()),AN=(0,ot.forwardRef)((e,t)=>{let n=A("TabCompletion",un);return(0,rt.jsx)("mark",{ref:t,className:(0,Wd.default)(n.matchSelection)},"selection-start")}),IN=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=G(Nh),s=A("TabCompletion",un),a=(0,ot.useRef)(null),l=(0,ot.useRef)(null),[u,c]=(0,ot.useState)(null),f=Z(),d=Ud(document.activeElement===r),[p]=(0,ot.useState)(()=>document.createRange());d.triggerRef.current=p,(0,ot.useEffect)(()=>()=>p.detach(),[]),(0,ot.useEffect)(()=>{let v=e.current,g=a.current;!v||!g||(p.setStart(v,0),p.setEnd(g,0))},[e.current,a.current]),Zi(()=>{d.close()});let y=(0,ot.useCallback)(v=>{let g=p.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;f(zc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,rt.jsxs)("span",{children:[(0,rt.jsx)("mark",{ref:a,className:(0,Wd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,rt.jsx)(is,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,rt.jsxs)(zd,{style:n,ref:l,children:[(0,rt.jsx)("div",{className:(0,Wd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,rt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,rt.jsx)(Wb,{}),(0,rt.jsx)("span",{children:"\xA0"}),(0,rt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,rt.jsx)(Yb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},qd=class extends Wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,ot.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,rt.jsx)(AN,{ref:this.startRef}):(0,rt.jsx)(IN,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Jn=w(b()),LN=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=A("TabCompletion",un),c=U("insertLink"),f=U("showMidSentenceSuggestions"),d=U("inlineSuggestions"),p=Ob(a),y=(0,er.useRef)(null),v=O(nt);(0,er.useEffect)(()=>{Wr(a)&&p&&Nb(a,p)},[p]);let g=(0,er.useCallback)(S=>{if(!o||!n)return S;let x=[(0,Jn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Jn.jsx)("span",{"data-testid":"tab-completion",className:(0,Gd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Jn.jsx)("span",{className:(0,Gd.default)(u.hint,u.resetIndent),children:(0,Jn.jsx)(Nl,{keyCode:"tab"},"tabHint")})),Th(S,x)},[o,n,r]),m=(0,er.useMemo)(()=>{let S=[];return c&&S.push(new qd("selection")),S.push(new Kd("placeholders")),i&&S.push(new Bd("keywords")),S},[d,c,i]),h=(0,er.useMemo)(()=>{let S=window.getComputedStyle(a);return{"--dd-color":S.color,"--dd-font-size":S.fontSize,"--dd-font-family":S.fontFamily,"--dd-font-variant":S.fontVariant}},[]);return!e||!v?null:(0,Jn.jsxs)("div",{ref:S=>{S!=null&&S.parentElement&&(y.current=S==null?void 0:S.parentElement)},className:u.root,style:h,children:[(0,Jn.jsx)($i,{tagName:"span",containerTagName:"div",className:(0,Gd.default)(u.container,u.agentText),disableLineBreaks:Wr(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:p,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!f}),(0,Jn.jsx)("br",{})]})},ON=({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??Wi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:p,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:p&&f!==!1}},Xb=zn(ON)(LN);var r1=w(ee()),o1=w(F());var Qb={list:[],fetchState:"idle",isInitialRequest:null},Jb=e=>e.autoflows.list||[],Zb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},tr=j("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Mh=j("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(tr(e.platformSessionId))}),_h=j("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(tr(e.platformSessionId))}),NN=q({name:"autoflows",initialState:Qb,reducers:{},extraReducers:e=>{e.addCase(Mh.pending,(t,n)=>{let r=Zb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(_h.pending,(t,n)=>{let r=Zb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(tr.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(tr.rejected,t=>{t.fetchState="error"}),e.addCase(tr.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(ue,()=>Qb)}}),eT=j("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(tr(e))}),o.on("sessionCompleted",()=>{n(tr(e))})}),tT=j("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),nT=NN.reducer;var rT={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},oT=e=>e.customMessages.list,iT=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),sT=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),aT=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),nl=j("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Yd=j("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)}),Xd=j("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)}),lT=q({name:"customMessages",initialState:rT,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(nl.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(nl.rejected,t=>{t.fetchState="error"}).addCase(nl.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Yd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Yd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Xd.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(ue,()=>rT)}}),uT=j("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(lT.actions.onCustomMessage(i))})}),cT=j("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),dT=lT.reducer;var MN={token:null,accountUrl:null,interval:null},fT=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},Dh=j("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),Fh=j("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Dh()),setInterval(()=>r(Dh()),n)}),pT=q({name:"passwordlessToken",initialState:MN,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Dh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(Fh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:mT}=pT.actions,gT=pT.reducer;function hT(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var TT=w(F());var ET=w(ee()),CT=w(F());var vT=w(ee());var yT={root:"Ai"};var wT=w(b()),DN=({className:e,children:t})=>{let n=A("Unicode",yT);return(0,wT.jsx)("span",{className:(0,vT.default)(e,n.root),children:t})},ST=DN;var xT={isDisabled:"Fi",buttonStart:"Hi",root:"Li",buttonStop:"xo",stateBadge:"h",isCompleted:"Mi",isStarted:"Ri",isAborted:"Ti"};var Hh={};Je(Hh,{enUS:()=>HN,nlNL:()=>UN});var HN={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"}]},UN={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 Pt=w(b()),zN=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=A("Autoflow",xT),a=G(Hh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,Pt.jsxs)(ae,{className:(0,ET.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,Pt.jsx)(pe,{children:(0,Pt.jsxs)(pe.Content,{children:[(0,Pt.jsxs)(pe.Title,{children:[t&&(0,Pt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,Pt.jsx)("span",{children:r})]})}),(0,Pt.jsx)(ae.Actions,{fixed:t==="Started",children:(0,Pt.jsx)(ae.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,Pt.jsxs)(CT.Fragment,{children:[(0,Pt.jsx)(ST,{children:u})," ",(0,Pt.jsx)("span",{children:a(l)})]})})})]})},bT=zN;var Uh=w(b()),BN=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},VN=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Uh.jsx)(TT.Fragment,{children:e.map(o=>(0,Uh.jsx)(bT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||BN(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),KN=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},$N={onStartAutoflow:Mh,onStopAutoflow:_h},kT=zn(KN,$N)(VN);var PT=w(ee()),jh=w(F());var nr={root:"co",title:"fo",isUsed:"Ui",quickReplies:"Bi",quickReply:"Di",hasError:"Ii",label:"Oi",errorIcon:"Xi"};var ht=w(b()),qN=({suggestion:e})=>{let t=G(Mo),n=Z(),r=O(iT(e.text)),o=O(sT(e.text)),i=O(aT(e.text)),s=O(Mc),{replyOptions:a}=e,l=(0,jh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Yd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,jh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(Xd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,ht.jsxs)(ae,{onClick:l,className:(0,PT.default)(nr.root,{[nr.isUsed]:r,[nr.hasError]:i}),children:[(0,ht.jsx)(pe,{children:(0,ht.jsxs)(pe.Content,{children:[(0,ht.jsxs)(pe.Title,{className:nr.title,children:[e.text," ",(0,ht.jsx)(Ml,{className:nr.label,children:"analyse tool"})," ",i&&(0,ht.jsx)("span",{className:nr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,ht.jsx)("ul",{className:nr.quickReplies,children:a.map(c=>(0,ht.jsx)("li",{className:nr.quickReply,children:c.title},c.title))})]})}),(0,ht.jsxs)(ae.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,ht.jsx)(ae.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,ht.jsx)(ae.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,ht.jsx)(ae.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},RT=qN;var Qd=w(F());var Vh=w(ee());var zh=w(b()),Bh=()=>(0,zh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,zh.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 AT={root:"Ji",entity:"r",entityText:"Ki",iconWrapper:"Pi",icon:"Qi",iconClicked:"Vi"};var Tn=w(b()),YN=({entities:e})=>{let t=A("EntitiesWidgetList",AT),[n,r]=(0,Qd.useState)(void 0),o=Z(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Po(a.text),o(Qe({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Qd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Tn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Tn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Tn.jsx)("span",{className:t.entityText,children:a.text}),(0,Tn.jsxs)("span",{className:t.iconWrapper,children:[(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon),children:(0,Tn.jsx)(Bh,{})}),(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon,n===l&&t.iconClicked),children:(0,Tn.jsx)(Bh,{})})]})]},a.text))})},IT=YN;var Kh=w(b()),LT=()=>(0,Kh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Kh.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 $h=w(b()),OT=()=>(0,$h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,$h.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 Wh=w(b()),NT=()=>(0,Wh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Wh.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{entries:zT,setPrototypeOf:MT,isFrozen:XN,getPrototypeOf:QN,getOwnPropertyDescriptor:ZN}=Object,{freeze:it,seal:dn,create:BT}=Object,{apply:Zh,construct:Jh}=typeof Reflect<"u"&&Reflect;it||(it=function(t){return t});dn||(dn=function(t){return t});Zh||(Zh=function(t,n,r){return t.apply(n,r)});Jh||(Jh=function(t,n){return new t(...n)});var Zd=At(Array.prototype.forEach),_T=At(Array.prototype.pop),rl=At(Array.prototype.push),tf=At(String.prototype.toLowerCase),qh=At(String.prototype.toString),JN=At(String.prototype.match),ol=At(String.prototype.replace),eM=At(String.prototype.indexOf),tM=At(String.prototype.trim),cn=At(Object.prototype.hasOwnProperty),Rt=At(RegExp.prototype.test),il=nM(TypeError);function At(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Zh(e,t,r)}}function nM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Jh(e,n)}}function Y(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tf;MT&&MT(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(XN(t)||(t[r]=i),o=i)}e[o]=!0}return e}function rM(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function zo(e){let t=BT(null);for(let[n,r]of zT(e))cn(e,n)&&(Array.isArray(r)?t[n]=rM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=zo(r):t[n]=r);return t}function Jd(e,t){for(;e!==null;){let r=ZN(e,t);if(r){if(r.get)return At(r.get);if(typeof r.value=="function")return At(r.value)}e=QN(e)}function n(){return null}return n}var DT=it(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gh=it(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yh=it(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oM=it(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xh=it(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iM=it(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),FT=it(["#text"]),HT=it(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Qh=it(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),UT=it(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ef=it(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sM=dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),aM=dn(/<%[\w\W]*|[\w\W]*%>/gm),lM=dn(/\${[\w\W]*}/gm),uM=dn(/^data-[\-\w.\u00B7-\uFFFF]/),cM=dn(/^aria-[\-\w]+$/),VT=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dM=dn(/^(?:\w+script|data):/i),fM=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KT=dn(/^html$/i),jT=Object.freeze({__proto__:null,MUSTACHE_EXPR:sM,ERB_EXPR:aM,TMPLIT_EXPR:lM,DATA_ATTR:uM,ARIA_ATTR:cM,IS_ALLOWED_URI:VT,IS_SCRIPT_OR_DATA:dM,ATTR_WHITESPACE:fM,DOCTYPE_NAME:KT}),pM=function(){return typeof window>"u"?null:window},mM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function $T(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pM(),t=H=>$T(H);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=e,y=l.prototype,v=Jd(y,"cloneNode"),g=Jd(y,"nextSibling"),m=Jd(y,"childNodes"),h=Jd(y,"parentNode");if(typeof s=="function"){let H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let S,x="",{implementation:C,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:I}=n,{importNode:L}=r,N={};t.isSupported=typeof zT=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:K,TMPLIT_EXPR:J,DATA_ATTR:oe,ARIA_ATTR:ze,IS_SCRIPT_OR_DATA:pn,ATTR_WHITESPACE:st}=jT,{IS_ALLOWED_URI:_}=jT,$=null,ar=Y({},[...DT,...Gh,...Yh,...Xh,...FT]),ye=null,lr=Y({},[...HT,...Qh,...UT,...ef]),W=Object.seal(BT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ur=null,yl=null,$o=!0,Qr=!0,cs=!1,vl=!0,qt=!1,Gt=!1,Sl=!1,at=!1,It=!1,wl=!1,xl=!1,py=!0,my=!1,q1="user-content-",pf=!0,ds=!1,Wo={},qo=null,gy=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),hy=null,yy=Y({},["audio","video","img","source","image","track"]),mf=null,vy=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),El="http://www.w3.org/1998/Math/MathML",Cl="http://www.w3.org/2000/svg",Rn="http://www.w3.org/1999/xhtml",Go=Rn,gf=!1,hf=null,G1=Y({},[El,Cl,Rn],qh),fs=null,Y1=["application/xhtml+xml","text/html"],X1="text/html",Ne=null,Yo=null,Q1=n.createElement("form"),Sy=function(E){return E instanceof RegExp||E instanceof Function},yf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yo&&Yo===E)){if((!E||typeof E!="object")&&(E={}),E=zo(E),fs=Y1.indexOf(E.PARSER_MEDIA_TYPE)===-1?X1:E.PARSER_MEDIA_TYPE,Ne=fs==="application/xhtml+xml"?qh:tf,$=cn(E,"ALLOWED_TAGS")?Y({},E.ALLOWED_TAGS,Ne):ar,ye=cn(E,"ALLOWED_ATTR")?Y({},E.ALLOWED_ATTR,Ne):lr,hf=cn(E,"ALLOWED_NAMESPACES")?Y({},E.ALLOWED_NAMESPACES,qh):G1,mf=cn(E,"ADD_URI_SAFE_ATTR")?Y(zo(vy),E.ADD_URI_SAFE_ATTR,Ne):vy,hy=cn(E,"ADD_DATA_URI_TAGS")?Y(zo(yy),E.ADD_DATA_URI_TAGS,Ne):yy,qo=cn(E,"FORBID_CONTENTS")?Y({},E.FORBID_CONTENTS,Ne):gy,ur=cn(E,"FORBID_TAGS")?Y({},E.FORBID_TAGS,Ne):{},yl=cn(E,"FORBID_ATTR")?Y({},E.FORBID_ATTR,Ne):{},Wo=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,$o=E.ALLOW_ARIA_ATTR!==!1,Qr=E.ALLOW_DATA_ATTR!==!1,cs=E.ALLOW_UNKNOWN_PROTOCOLS||!1,vl=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,It=E.RETURN_DOM||!1,wl=E.RETURN_DOM_FRAGMENT||!1,xl=E.RETURN_TRUSTED_TYPE||!1,at=E.FORCE_BODY||!1,py=E.SANITIZE_DOM!==!1,my=E.SANITIZE_NAMED_PROPS||!1,pf=E.KEEP_CONTENT!==!1,ds=E.IN_PLACE||!1,_=E.ALLOWED_URI_REGEXP||VT,Go=E.NAMESPACE||Rn,W=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Sy(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Sy(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(Qr=!1),wl&&(It=!0),Wo&&($=Y({},FT),ye=[],Wo.html===!0&&(Y($,DT),Y(ye,HT)),Wo.svg===!0&&(Y($,Gh),Y(ye,Qh),Y(ye,ef)),Wo.svgFilters===!0&&(Y($,Yh),Y(ye,Qh),Y(ye,ef)),Wo.mathMl===!0&&(Y($,Xh),Y(ye,UT),Y(ye,ef))),E.ADD_TAGS&&($===ar&&($=zo($)),Y($,E.ADD_TAGS,Ne)),E.ADD_ATTR&&(ye===lr&&(ye=zo(ye)),Y(ye,E.ADD_ATTR,Ne)),E.ADD_URI_SAFE_ATTR&&Y(mf,E.ADD_URI_SAFE_ATTR,Ne),E.FORBID_CONTENTS&&(qo===gy&&(qo=zo(qo)),Y(qo,E.FORBID_CONTENTS,Ne)),pf&&($["#text"]=!0),Gt&&Y($,["html","head","body"]),$.table&&(Y($,["tbody"]),delete ur.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=E.TRUSTED_TYPES_POLICY,x=S.createHTML("")}else S===void 0&&(S=mM(p,o)),S!==null&&typeof x=="string"&&(x=S.createHTML(""));it&&it(E),Yo=E}},wy=Y({},["mi","mo","mn","ms","mtext"]),xy=Y({},["foreignobject","desc","title","annotation-xml"]),Z1=Y({},["title","style","font","a","script"]),Ey=Y({},[...Gh,...Yh,...oM]),Cy=Y({},[...Xh,...iM]),J1=function(E){let R=h(E);(!R||!R.tagName)&&(R={namespaceURI:Go,tagName:"template"});let D=tf(E.tagName),de=tf(R.tagName);return hf[E.namespaceURI]?E.namespaceURI===Cl?R.namespaceURI===Rn?D==="svg":R.namespaceURI===El?D==="svg"&&(de==="annotation-xml"||wy[de]):!!Ey[D]:E.namespaceURI===El?R.namespaceURI===Rn?D==="math":R.namespaceURI===Cl?D==="math"&&xy[de]:!!Cy[D]:E.namespaceURI===Rn?R.namespaceURI===Cl&&!xy[de]||R.namespaceURI===El&&!wy[de]?!1:!Cy[D]&&(Z1[D]||!Ey[D]):!!(fs==="application/xhtml+xml"&&hf[E.namespaceURI]):!1},Zr=function(E){rl(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},vf=function(E,R){try{rl(t.removed,{attribute:R.getAttributeNode(E),from:R})}catch{rl(t.removed,{attribute:null,from:R})}if(R.removeAttribute(E),E==="is"&&!ye[E])if(It||wl)try{Zr(R)}catch{}else try{R.setAttribute(E,"")}catch{}},by=function(E){let R=null,D=null;if(at)E="<remove></remove>"+E;else{let Ve=JN(E,/^[\r\n\t ]+/);D=Ve&&Ve[0]}fs==="application/xhtml+xml"&&Go===Rn&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let de=S?S.createHTML(E):E;if(Go===Rn)try{R=new d().parseFromString(de,fs)}catch{}if(!R||!R.documentElement){R=C.createDocument(Go,"template",null);try{R.documentElement.innerHTML=gf?x:de}catch{}}let Be=R.body||R.documentElement;return E&&D&&Be.insertBefore(n.createTextNode(D),Be.childNodes[0]||null),Go===Rn?I.call(R,Gt?"html":"body")[0]:Gt?R.documentElement:Be},Ty=function(E){return T.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},ek=function(E){return E instanceof f&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof c)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},ky=function(E){return typeof a=="function"&&E instanceof a},An=function(E,R,D){N[E]&&Zd(N[E],de=>{de.call(t,R,D,Yo)})},Py=function(E){let R=null;if(An("beforeSanitizeElements",E,null),ek(E))return Zr(E),!0;let D=Ne(E.nodeName);if(An("uponSanitizeElement",E,{tagName:D,allowedTags:$}),E.hasChildNodes()&&!ky(E.firstElementChild)&&Rt(/<[/\w]/g,E.innerHTML)&&Rt(/<[/\w]/g,E.textContent))return Zr(E),!0;if(!$[D]||ur[D]){if(!ur[D]&&Ay(D)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D)))return!1;if(pf&&!qo[D]){let de=h(E)||E.parentNode,Be=m(E)||E.childNodes;if(Be&&de){let Ve=Be.length;for(let lt=Ve-1;lt>=0;--lt)de.insertBefore(v(Be[lt],!0),g(E))}}return Zr(E),!0}return E instanceof l&&!J1(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Rt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Zr(E),!0):(qt&&E.nodeType===3&&(R=E.textContent,Zd([z,K,J],de=>{R=ol(R,de," ")}),E.textContent!==R&&(rl(t.removed,{element:E.cloneNode()}),E.textContent=R)),An("afterSanitizeElements",E,null),!1)},Ry=function(E,R,D){if(py&&(R==="id"||R==="name")&&(D in n||D in Q1))return!1;if(!(Qr&&!yl[R]&&Rt(oe,R))){if(!($o&&Rt(ze,R))){if(!ye[R]||yl[R]){if(!(Ay(E)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,E)||W.tagNameCheck instanceof Function&&W.tagNameCheck(E))&&(W.attributeNameCheck instanceof RegExp&&Rt(W.attributeNameCheck,R)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(R))||R==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D))))return!1}else if(!mf[R]){if(!Rt(_,ol(D,st,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&E!=="script"&&eM(D,"data:")===0&&hy[E])){if(!(cs&&!Rt(pn,ol(D,st,"")))){if(D)return!1}}}}}}return!0},Ay=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},Iy=function(E){An("beforeSanitizeAttributes",E,null);let{attributes:R}=E;if(!R)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye},de=R.length;for(;de--;){let Be=R[de],{name:Ve,namespaceURI:lt,value:Jr}=Be,ps=Ne(Ve),ut=Ve==="value"?Jr:tM(Jr);if(D.attrName=ps,D.attrValue=ut,D.keepAttr=!0,D.forceKeepAttr=void 0,An("uponSanitizeAttribute",E,D),ut=D.attrValue,D.forceKeepAttr||(vf(Ve,E),!D.keepAttr))continue;if(!vl&&Rt(/\/>/i,ut)){vf(Ve,E);continue}qt&&Zd([z,K,J],Oy=>{ut=ol(ut,Oy," ")});let Ly=Ne(E.nodeName);if(Ry(Ly,ps,ut)){if(my&&(ps==="id"||ps==="name")&&(vf(Ve,E),ut=q1+ut),S&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!lt)switch(p.getAttributeType(Ly,ps)){case"TrustedHTML":{ut=S.createHTML(ut);break}case"TrustedScriptURL":{ut=S.createScriptURL(ut);break}}try{lt?E.setAttributeNS(lt,Ve,ut):E.setAttribute(Ve,ut),_T(t.removed)}catch{}}}An("afterSanitizeAttributes",E,null)},tk=function H(E){let R=null,D=Ty(E);for(An("beforeSanitizeShadowDOM",E,null);R=D.nextNode();)An("uponSanitizeShadowNode",R,null),!Py(R)&&(R.content instanceof i&&H(R.content),Iy(R));An("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(H){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,D=null,de=null,Be=null;if(gf=!H,gf&&(H="<!-->"),typeof H!="string"&&!ky(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw il("dirty is not a string, aborting")}else throw il("toString is not a function");if(!t.isSupported)return H;if(Sl||yf(E),t.removed=[],typeof H=="string"&&(ds=!1),ds){if(H.nodeName){let Jr=Ne(H.nodeName);if(!$[Jr]||ur[Jr])throw il("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)R=by("<!---->"),D=R.ownerDocument.importNode(H,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?R=D:R.appendChild(D);else{if(!It&&!qt&&!Gt&&H.indexOf("<")===-1)return S&&xl?S.createHTML(H):H;if(R=by(H),!R)return It?null:xl?x:""}R&&at&&Zr(R.firstChild);let Ve=Ty(ds?H:R);for(;de=Ve.nextNode();)Py(de)||(de.content instanceof i&&tk(de.content),Iy(de));if(ds)return H;if(It){if(wl)for(Be=k.call(R.ownerDocument);R.firstChild;)Be.appendChild(R.firstChild);else Be=R;return(ye.shadowroot||ye.shadowrootmode)&&(Be=L.call(r,Be,!0)),Be}let lt=Gt?R.outerHTML:R.innerHTML;return Gt&&$["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Rt(KT,R.ownerDocument.doctype.name)&&(lt="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
24
- `+lt),qt&&Zd([z,K,J],Jr=>{lt=ol(lt,Jr," ")}),S&&xl?S.createHTML(lt):lt},t.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yf(H),Sl=!0},t.clearConfig=function(){Yo=null,Sl=!1},t.isValidAttribute=function(H,E,R){Yo||yf({});let D=Ne(H),de=Ne(E);return Ry(D,de,R)},t.addHook=function(H,E){typeof E=="function"&&(N[H]=N[H]||[],rl(N[H],E))},t.removeHook=function(H){if(N[H])return _T(N[H])},t.removeHooks=function(H){N[H]&&(N[H]=[])},t.removeAllHooks=function(){N={}},t}var WT=$T();var or=w(F());var gM={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function qT(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function sl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function al(e,t){var n,r,o,i,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],u="",c=t||{},f=0;function d(y){var v=gM[y[1]||""],g=l[l.length-1]==y;return v?v[1]?(g?l.pop():l.push(y),v[0|g]):v[0]:y}function p(){for(var y="";l.length;)y+=d(l[l.length-1]);return y}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(y,v,g){return c[v.toLowerCase()]=g,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(f,o.index),f=a.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((s=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+qT(sl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=al(qT(o[5].replace(/^\s*[>*+.-]/gm,""))),s==">"?s="blockquote":(s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+i+"</"+s+">"):o[8]?n='<img src="'+sl(o[8])+'" alt="'+sl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+sl(o[11]||c[r.toLowerCase()])+'">'),n=p()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+al(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+sl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(f)+p()).replace(/^\n+|\n+$/g,"")}var GT={root:"i",popover:"Wi",options:"go",copyIcon:"Zi",option:"bo",divider:"_i"};var rr=w(b()),yM=e=>`<svg class=${e} version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black" fill-opacity="0.5" stroke-opacity="0.8"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg>`,vM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=A("Markdown",GT),s=(0,or.useRef)(null),[a,l]=(0,or.useState)(null),[u,c]=(0,or.useState)(null),f=(0,or.useMemo)(()=>{let g=al(e);return WT.sanitize(g).replace(/<\/code>/g,`${yM(i.copyIcon)}</code>`)},[e]),d=()=>{l(null),c(null)},p=g=>{var S;let m=g.target,h=!!((S=s.current)!=null&&S.querySelector("code"));a||h&&m.tagName!=="CODE"||!h&&m!==s.current||(m.addEventListener("mouseleave",d,{once:!0}),c(m.textContent),l(m))},y=()=>{u&&r(u),d()},v=()=>{u&&o(u),d()};return(0,rr.jsxs)(or.Fragment,{children:[a&&(0,rr.jsx)(is,{triggerRef:{current:a},parentNode:a,className:i.popover,children:(0,rr.jsxs)("div",{className:i.options,children:[(0,rr.jsx)("button",{type:"button",className:i.option,onClick:y,children:n}),(0,rr.jsx)("div",{className:i.divider}),(0,rr.jsx)("button",{type:"button",className:i.option,onClick:v,children:t})]})}),(0,rr.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:f},onMouseOver:p})]})},YT=vM;var ey={};Je(ey,{enUS:()=>SM,nlNL:()=>wM});var SM={useCue:[{type:0,value:"Copy"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}]},wM={useCue:[{type:0,value:"Gebruik"}],copyCue:[{type:0,value:"Kopieer"}],removeCue:[{type:0,value:"Sluiten"}]};var Yr=w(b()),xM=({cue:e,onRemove:t,onCopy:n,onUse:r})=>{let o=G(ey),i=l=>{n&&n(l)},s=l=>{r&&r(l)},a=l=>{l.preventDefault(),l.stopPropagation(),t&&t(e.id)};return(0,Yr.jsxs)(ae,{"data-testid":"cue",children:[(0,Yr.jsx)(pe,{children:(0,Yr.jsxs)(pe.Content,{children:[e.title&&(0,Yr.jsx)(pe.Title,{"data-testid":"widget-cue-title",children:e.title}),(0,Yr.jsx)(YT,{content:e.text,useLabel:o("useCue"),copyLabel:o("copyCue"),onCopy:i,onUse:s})]})}),(0,Yr.jsx)(ae.CloseIcon,{title:o("removeCue"),onClick:a})]})},XT=xM;var ll=w(b()),EM=({cues:e,onCopyCue:t,onUseCue:n,onRemoveCue:r})=>(0,ll.jsx)(ll.Fragment,{children:e.map(o=>(0,ll.jsx)(XT,{cue:o,onRemove:r,onCopy:t,onUse:n},`${o.id}_${o.timestamp}`))}),QT=EM;var JT=w(F());var CM=/(https?:\/\/[^\s]+)/,ZT=e=>e.split(" ").find(t=>CM.test(t));var $t=w(b()),bM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=ZT(r),i=G(Mo),s=U("showImages"),a=U("fallbackImage"),l=f=>{f.preventDefault(),f.stopPropagation(),n(r)},u=(0,JT.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$t.jsxs)(ae,{onClick:l,"data-testid":"edit-suggestion",children:[(0,$t.jsxs)(pe,{children:[s&&e.image&&(0,$t.jsx)(pe.Image,{src:$d(e,"small",a||void 0),title:e.title}),(0,$t.jsxs)(pe.Content,{children:[e.title&&(0,$t.jsx)(pe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,$t.jsx)(ae.Labels,{labels:e.searchKeywords}),(0,$t.jsx)(pe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$t.jsxs)(ae.Actions,{children:[o&&(0,$t.jsx)(ae.ActionButton,{onClick:u,label:i("visitUrl")}),(0,$t.jsx)(ae.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},e1=bM;var ul=w(b()),TM=({lines:e,suggestions:t})=>{let n=en(),r=(o,i)=>{n.send(Hr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,ul.jsx)(ul.Fragment,{children:t.map(o=>(0,ul.jsx)(e1,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},t1=TM;var ty={};Je(ty,{enUS:()=>kM,nlNL:()=>PM});var kM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},PM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var n1={root:"or",loginText:"er",stateText:"ho",sectionList:"ir",shortcutList:"rr",shortcut:"tr",link:"mo"};var X=w(b()),nf=(e,t)=>{let n=O(nt);(0,o1.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},AM=({onLogIn:e})=>{let t=G(ty),n=Z(),r=U("isEmbedded"),o=A("Widget",n1),i=U("showAutoflows"),s=U("showCustomMessages"),a=U("showSummaryCommand"),l=U("showKnowledgeSearch"),u=U("showSearch"),c=O(Vr),f=O(bd),d=O(Jb),p=O(TE),y=O(Cd),v=O(oT),g=O(_c),m=O(Bi),h=O(nt),S=O(Mc),x=O(hT),C=O(Td),T=en(),k=O(YC),I=O(fT("/admin/")),L=U("adminUrl"),N=U("productName"),z=en();if(nf(()=>(n(nl(S)),n(uT(S)),()=>{n(cT(S))}),[n,m,s,S]),nf(()=>(n(tr(S)),n(eT(S)),()=>{n(tT(S))}),[n,m,i,S]),nf(()=>{f.forEach(({type:oe})=>{n(oe==="entities"?sn():ln(oe))})},[n,m,g,c]),nf(()=>(n(Fh()),()=>{n(mT())}),[n]),m===!1)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,X.jsx)("div",{className:o.loginText,children:(0,X.jsx)("div",{children:(0,X.jsx)(Od,{isEmbedded:r,loginUrl:L,onLogIn:e})})},"login");if(!c||!S||h===null||k||x)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("waiting")})})},"waiting");let K=oe=>{z.send(Hr,{text:oe,suggestion:{source:"cue",sourceText:oe}})},J=u||a||l||I;return(0,X.jsx)("div",{className:(0,r1.default)(o.root),"data-testid":"widget",children:(0,X.jsxs)(_l,{className:o.sectionList,children:[J&&(0,X.jsx)(Ln,{title:t("actions"),type:"shortcuts",children:(0,X.jsxs)("div",{className:o.shortcutList,children:[u&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,X.jsx)(qi,{}),t("linkSearch")]}),a&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,X.jsx)(NT,{}),t("linkSummary")]}),l&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,X.jsx)(OT,{}),t("linkKnowledgeSearch")]}),I&&(0,X.jsxs)("a",{className:o.shortcut,target:"_blank",href:I,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,X.jsx)(LT,{}),t("linkStudioLogin",{productName:N})]})]})}),s&&v.length>0&&(0,X.jsx)(Ln,{type:"custom-messages","data-testid":"custom-messages",children:(0,X.jsx)(vt,{withDivider:!0,children:v.map(oe=>(0,X.jsx)(RT,{suggestion:oe},oe.text))})}),i&&d.length>0&&(0,X.jsx)(Ln,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(kT,{})})}),f.map(({type:oe,title:ze,amount:pn,lines:st})=>{var _;switch(oe){case"entities":return y&&y.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(IT,{entities:y})},oe);case"cues":return p&&p.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(QT,{cues:p,onRemoveCue:$=>n(PE({id:$})),onCopyCue:$=>Po($),onUseCue:K})})},oe);default:return((_=C[oe])==null?void 0:_.fetchState)==="done"&&C[oe].suggestions.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(t1,{lines:st,contentType:oe,suggestions:C[oe].suggestions.slice(0,pn)||[]})})},oe)}})]})})},i1=AM;function ss(e){let t=new Range;return t.selectNodeContents(e),t}function s1(e,t,n){try{return Xr(e,t,n),!0}catch{return!1}}function rf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function of(e){return"tagName"in e&&e.tagName==="BR"}var cl=/[\u200B-\u200D\uFEFF]/g;function Xr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(cl,""),f=o+c.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let y=s(u,t-o);y===0&&!p?r.setStartBefore(l):r.setStart(l,y)}p&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(of(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;rf(l)&&u&&!rf(u)&&!of(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function dl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(f){let d=f===n,p=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let y=f.textContent;d&&(a=u+y.substring(0,r).replace(cl,"").length),p&&(l=u+y.substring(0,i).replace(cl,"").length),u+=y.replace(cl,"").length;break}case Node.ELEMENT_NODE:{let y=f.nextSibling===null;of(f)&&!y&&u++;for(let v=0;v<f.childNodes.length;v++){let g=d&&v===r,m=p&&v===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[v]),p&&v===i-1&&(l=u),l!==void 0))break}!p&&rf(f)&&!y&&u++,p&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function fl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,p=f?i:void 0,y=u.textContent.replace(cl,"");d===0&&p===void 0?a+=y:a+=y.substring(d,p);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&of(u)&&!d&&(a+=`
23
+ c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var vh=w(b()),UO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},lb=({className:e,color:t})=>(0,vh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,vh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:UO[t||"pink"]})});var ub={root:"j",text:"q",isLoggedIn:"Qe",isLoggedOut:"oo",icon:"Ve",logo:"We",lock:"Ze"};var Sh={};Je(Sh,{enUS:()=>zO,nlNL:()=>BO});var zO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},BO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Fo=w(b()),db=({onLogIn:e})=>{let t=G(Sh),n=U("floatingMenu"),r=U("productName"),o=Z(),i=O(nt),s=A("FloatingMenu",ub);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Ct(!0)):e()};return(0,Fo.jsxs)("button",{className:(0,cb.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Fo.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Fo.jsxs)("div",{className:s.icon,children:[(0,Fo.jsx)(lb,{className:s.logo,color:"pink"}),i===!1&&(0,Fo.jsx)(ab,{className:s.lock})]})]})};var Ld=w(F());var fb=w(F());function Zi(e){(0,fb.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Ho(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function Ji(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 VO={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Rd=({ui:e})=>e.overlayCollapsed;var pb=q({name:"ui",initialState:VO,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:Za,setInputHasFocus:wh,setOverlayCollapsed:Kr,setOpenOverlayWhenTyping:mb,setOverlayCollapsedUserOverwrite:gb}=pb.actions,hb=pb.reducer;var Ad=w(F());var es=w(F());var yb=w(F());function vb(e,t,n){(0,yb.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var Sb={root:"_e",actions:"oi",badge:"ei",formattedText:"eo"};var Uo=w(b()),WO=["search","personal-collection-search","search-autocomplete"];function qO(e,t,n,r={}){let o="";return WO.includes(t)?o=cC(ah(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=ah(e,n,r),r.placeholders===!0&&(o=dC(o)),o}var GO=()=>{},YO=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=U("inlineSuggestions"),i=O(Vi),s=Z(),a=A("TextSuggestion",Sb),l=(0,es.useRef)(null);(0,es.useEffect)(()=>{let c=setTimeout(()=>{s(sE({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),vb(l,"click",()=>{s(Fr(e)),s(Cn({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,es.useMemo)(()=>qO(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,Uo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(Fr(e)),children:[(0,Uo.jsx)(ae,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:GO,children:(0,Uo.jsx)($i,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,Uo.jsx)("div",{className:a.actions,children:(0,Uo.jsx)(wd,{onFeedback:()=>r(n),suggestion:n.text})})]})},wb=YO;var xh=w(b()),XO=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Ad.useMemo)(()=>{let i=t.map((s,a)=>(0,xh.jsx)(wb,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,xh.jsx)(Ad.Fragment,{children:o})},Id=XO;var xb={root:"ii",paper:"ri"};var Ja=w(b()),ZO=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Ld.useRef)(null),r=A("InlineSuggestionsOverlay",xb),o=O(Ji),i=Z(),s=O(nt),a=O(Bi),l=O(Rd),u=U("showTextSuggestions");return Zi(()=>{setTimeout(()=>{i(Kr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Ld.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let f=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-f.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,Ja.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Ja.jsx)("div",{ref:n,className:r.paper,children:(0,Ja.jsx)(vt,{children:(0,Ja.jsx)(Id,{suggestions:e,selectedIndex:t})})})})},JO=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Eb=zn(JO)(ZO);var el=w(b()),eN=({children:e})=>{let n=U("locale").replace("-","");return(0,el.jsx)(Wg.Provider,{value:n,children:e})},tN=({store:e,customStyles:t={},children:n})=>(0,el.jsx)(bg,{store:e,children:(0,el.jsx)(eN,{children:(0,el.jsx)(gs.Provider,{value:t,children:n})})}),jo=tN;var Nd=w(te()),ts=w(F());var Cb=w(F());function bb(e,t){let[n,r]=(0,Cb.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){V.error(s)}}]}var Tb=()=>/Mac/i.test(navigator.platform);var Pb=w(te()),Qn=w(F());var Eh={};Je(Eh,{enUS:()=>nN,nlNL:()=>rN});var nN={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"}]}]},rN={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 kb={root:"ti",anchor:"ni",anchorButton:"ai"};var $r=w(b()),Ch=(e,t,n)=>r=>(0,$r.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),iN=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=G(Eh),s=en(),a=A("Login",kb),l=U("productName"),u=(0,Qn.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,Qn.useCallback)(g=>{g.preventDefault(),s.send(Ki,!0)},[t]),f=(0,Qn.useMemo)(()=>g=>(0,$r.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,Qn.useCallback)(g=>(0,$r.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:p,hour:y,day:v}=(0,Qn.useMemo)(()=>({min:Ch(a,60*10,u),hour:Ch(a,60*60,u),day:Ch(a,60*60*12,u)}),[]);return(0,$r.jsxs)("div",{className:(0,Pb.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,$r.jsxs)(Qn.Fragment,{children:[(0,$r.jsx)("br",{}),i("snooze",{min:p,hour:y,day:v})]})]})},Od=iN;var Rb={root:"io",text:"di"};var tl=w(b()),aN=({title:e})=>{let t=A("SearchTrigger",Rb),n=Z();return(0,tl.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(Ct(!0)),children:[(0,tl.jsx)(qi,{}),(0,tl.jsx)("span",{className:t.text,children:e})]})},Ab=aN;var bh={};Je(bh,{enUS:()=>lN,nlNL:()=>uN});var lN={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"}]},uN={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 Ib={root:"pi",isInline:"C",toggleButton:"li",toggleButtonWrapper:"S",toggleButtonWrapperHidden:"si",isCollapsed:"ro",collapsible:"xi",hints:"to",hintsHidden:"ci",triggers:"no",triggersRight:"fi"};var we=w(b()),dN=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=A("SuggestionsOverlay",Ib),o=G(bh),i=O(Ji),s=nE(),a=Z(),l=(0,ts.useRef)(null),u=U("searchTriggerKey"),c=U("productName"),f=O(Rd),d=O(nt),p=O(Bi),[y,v]=(0,ts.useState)(null),g=U("showSearch"),m=U("showTextSuggestions"),h=U("adminUrl"),S=U("isEmbedded"),[x,T]=bb("dd-snooze-until-ms",0),C=f||x>Date.now(),k=O(K=>K.input.text),I=e.filter(K=>K.source!=="gpt").length,L=()=>{C&&T(0),a(gb(!C))},N=K=>{a(Qe({name:"suggestion feedback",data:{text:K.text,source:"overlay",context:k},options:{includeConversationData:!0}}))},z=K=>{let ee=Date.now()+K*1e3;T(ee),V.info(`Snooze until: ${new Date(ee)}`),a(Kr({collapse:!0}))};return(0,ts.useEffect)(()=>{I===0&&v(null)},[e,I]),Zi(()=>{a(Kr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||p===!1?null:d===!1?(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1}}),(0,we.jsx)("div",{className:r.triggersRight,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),(0,we.jsx)("div",{className:r.collapsible,children:(0,we.jsx)(Od,{loginUrl:h,isEmbedded:S,onLogIn:n,onSnooze:z})})]}):!s||!i?null:(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1},children:g&&(0,we.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(Tb()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,we.jsx)(Ab,{title:o("search")})})}),(0,we.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,we.jsx)("div",{className:(0,Nd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})]})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),I>0&&m&&(0,we.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,we.jsx)(vt,{children:(0,we.jsx)(Id,{onFeedback:N,suggestions:e,selectedIndex:t,reverse:!0})})})]})},fN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Lb=zn(fN)(dN);var Gd=w(te());var er=w(F());var ns=w(F());function Md(e){return e.contentEditable==="true"}function pN(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 Ob(e){let{selectionStart:t,selectionEnd:n}=Md(e)?pN(e):e;return[t,n]}function Nb(e){let[,t]=(0,ns.useState)(),n=(0,ns.useRef)(null);return n.current=Ob(e),(0,ns.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=Ob(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 Mb(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Fl);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 _b=w(F()),mN=["div","span","mark","strong","b","i","u","em"];function Th(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(mN.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,_b.cloneElement)(r,{children:Th(s,t,n+1)})]}return[...e,...t]}function Wr(e){return e.tagName.toLowerCase()==="textarea"}var un={root:"gi",container:"bi",agentText:"ao",tabText:"do",hint:"E",matchSelection:"po",focus:"hi",resetIndent:"mi",matchKeyword:"d",matchPlaceholder:"p",hover:"lo",hintText:"ui",popover:"yi",popoverRoot:"wi",popoverContentContainer:"so",popoverContent:"vi",selectionOptions:"ki",selectionOptionsIsHidden:"zi",selectionOptionsButton:"ji",caret:"qi",popoverSuggestionsRoot:"Ci",suggestionsOverlayInputStyles:"Si"};var $b=w(te());var Vd=w(F());var rs=w(F());function Db(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function _d(e){let t=(0,rs.useRef)(null),[n,r]=(0,rs.useState)(!1);return(0,rs.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=Db((c,f)=>{let d=t.current;if(!d)return;let p=c/i,y=f/i,v=d.getBoundingClientRect(),g=p>v.x&&p<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:f})=>[c,f]),[l,u]=Db(()=>{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]}function Fb(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Dd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Hb(e){return e!=null}var Ph=w(te()),Vt=w(F());var Fd=w(F()),hN=["bottom","height","left","right","top","width"],yN=(e={},t={})=>hN.some(n=>e[n]!==t[n]),Zn=new Map,Ub,jb=()=>{let e=[],t=[];Zn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();yN(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Zn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Ub=window.requestAnimationFrame(jb)};function vN(e,t){return{observe(){let n=Zn.size===0;if(Zn.has(e)){let r=Zn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Zn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&jb()},unobserve(){let n=Zn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Zn.delete(e),Zn.size||cancelAnimationFrame(Ub)}}}}function kh(e){let[t,n]=(0,Fd.useState)(null);return(0,Fd.useLayoutEffect)(()=>{if(!e.current)return;let r=vN(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var os=w(F()),Bb=w(Xu());var zb={root:"Ei"};var Vb=({children:e,parentNode:t})=>{let[n,r]=(0,os.useState)(null),o=(0,os.useContext)(gs);return(0,os.useLayoutEffect)(()=>{let i=document.createElement("div");return Ho(i),i.classList.add(zb.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,Bb.createPortal)(e,n):null};var bn={ref:"Gi",root:"o",positionAbove:"l",positionBelow:"s",positionLeft:"x",positionRight:"c",alignStart:"f",alignCenter:"g",alignEnd:"b"};var Hd=w(b()),Ud=(e=!1)=>{let[t,n]=(0,Vt.useState)(e),r=(0,Vt.useCallback)(()=>n(!0),[]),o=(0,Vt.useCallback)(()=>n(!1),[]),i=(0,Vt.useCallback)(()=>n(a=>!a),[]),s=(0,Vt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Rh(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 is=({className:e,triggerRef:t,boundaryRef:n=(0,Vt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Rh,parentNode:a,...l})=>{let u=kh(t),c=kh(n),f=(0,Vt.useMemo)(()=>s(u,c,0),[u,c]);return(0,Hd.jsx)(Vb,{parentNode:a,children:(0,Hd.jsx)("div",{className:(0,Ph.default)(bn.ref,{[bn.positionAbove]:r==="above",[bn.positionBelow]:r==="below",[bn.positionLeft]:r==="left",[bn.positionRight]:r==="right",[bn.alignStart]:o==="start",[bn.alignCenter]:o==="center",[bn.alignEnd]:o==="end"}),style:f,...l,role:"dialog",children:(0,Hd.jsx)("div",{className:(0,Ph.default)(e,bn.root),children:i})})})};var Kb=w(te()),jd=w(F());var Ah=w(b()),zd=(0,jd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,jd.useRef)(null),i=A("TabCompletion",un);return(0,Ah.jsx)("div",{ref:Dd([o,r]),className:(0,Kb.default)(e,i.popoverContentContainer),...n,children:(0,Ah.jsx)("div",{className:i.popoverContent,children:t})})});var qr=w(b()),xN=e=>t=>{let n=Rh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},EN=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=A("TabCompletion",un),s=Ud(),a=(0,Vd.useMemo)(()=>xN(e.getBoundingClientRect()),[e]),[l,u]=_d(e);return(0,Vd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,qr.jsxs)("span",{children:[(0,qr.jsx)("mark",{ref:Dd([l,s.triggerRef]),className:(0,$b.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,qr.jsx)(is,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,qr.jsx)(zd,{style:n,children:(0,qr.jsx)("div",{className:i.hintText,children:o})})})]})},Bd=class extends Wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${Fb(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(Hb);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,qr.jsx)(EN,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Wb=w(te());var Ih=w(b()),CN=({inputElement:e,children:t})=>{let n=A("TabCompletion",un),[r,o]=_d(e);return(0,Ih.jsx)("mark",{ref:r,className:(0,Wb.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Kd=class extends Wn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,Ih.jsx)(CN,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Wd=w(te());var ot=w(F());var Lh=w(b()),qb=()=>(0,Lh.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,Lh.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 Gr=w(F());var Yb=w(Qg());var Gb={root:"Ni",content:"Yi"};function $d(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 Oh(e){return e.replace("https://www.","").replace("https://","")}var Kt=w(b()),TN=3,kN=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),PN=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=TN})=>{let i=A("LinkSearch",Gb),[s,a]=(0,Gr.useState)(""),l=Z(),u=O(YC("url")),c=O(CE("URL",kN)),[f,d]=(0,Gr.useState)(c.length-1),p=U("fallbackImage"),y=h=>{let S=h.target;a(S.value)},v=(h,S)=>{h.stopPropagation(),h.preventDefault(),window.open(S,"_blank")},g=h=>{var T;let S=f-1<0?c.length-1:f-1,x=f+1===c.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(S),h.code==="ArrowDown"&&d(x),h.code==="Enter"&&e(((T=c[f])==null?void 0:T.text)||s)},m=(0,Gr.useCallback)((0,Yb.default)(h=>{l(bo({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Gr.useEffect)(()=>{s&&m(s)},[s]),(0,Gr.useEffect)(()=>()=>{l(Wc())},[]),(0,Kt.jsxs)("div",{className:i.root,children:[(0,Kt.jsx)(vt,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,S)=>(0,Kt.jsx)(ae,{selected:f===S,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Kt.jsxs)(pe,{children:[(0,Kt.jsx)(pe.Image,{src:$d(h,"small",p||void 0),title:h.title||h.text}),(0,Kt.jsxs)(pe.Content,{className:i.content,cropText:!0,children:[(0,Kt.jsx)(pe.Title,{children:h.title||Oh(h.text)}),h.title&&Oh(h.text)]}),(0,Kt.jsx)(ae.Actions,{children:(0,Kt.jsx)(ae.ActionButton,{label:r,onClick:x=>v(x,h.text)})})]})},h.text))}),(0,Kt.jsx)(_a,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:g})]})},Xb=PN;var Nh={};Je(Nh,{enUS:()=>RN,nlNL:()=>AN});var RN={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},AN={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var rt=w(b()),IN=(0,ot.forwardRef)((e,t)=>{let n=A("TabCompletion",un);return(0,rt.jsx)("mark",{ref:t,className:(0,Wd.default)(n.matchSelection)},"selection-start")}),LN=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=G(Nh),s=A("TabCompletion",un),a=(0,ot.useRef)(null),l=(0,ot.useRef)(null),[u,c]=(0,ot.useState)(null),f=Z(),d=Ud(document.activeElement===r),[p]=(0,ot.useState)(()=>document.createRange());d.triggerRef.current=p,(0,ot.useEffect)(()=>()=>p.detach(),[]),(0,ot.useEffect)(()=>{let v=e.current,g=a.current;!v||!g||(p.setStart(v,0),p.setEnd(g,0))},[e.current,a.current]),Zi(()=>{d.close()});let y=(0,ot.useCallback)(v=>{let g=p.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;f(zc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,rt.jsxs)("span",{children:[(0,rt.jsx)("mark",{ref:a,className:(0,Wd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,rt.jsx)(is,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,rt.jsxs)(zd,{style:n,ref:l,children:[(0,rt.jsx)("div",{className:(0,Wd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,rt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,rt.jsx)(qb,{}),(0,rt.jsx)("span",{children:"\xA0"}),(0,rt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,rt.jsx)(Xb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},qd=class extends Wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,ot.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,rt.jsx)(IN,{ref:this.startRef}):(0,rt.jsx)(LN,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Jn=w(b()),ON=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=A("TabCompletion",un),c=U("insertLink"),f=U("showMidSentenceSuggestions"),d=U("inlineSuggestions"),p=Nb(a),y=(0,er.useRef)(null),v=O(nt);(0,er.useEffect)(()=>{Wr(a)&&p&&Mb(a,p)},[p]);let g=(0,er.useCallback)(S=>{if(!o||!n)return S;let x=[(0,Jn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Jn.jsx)("span",{"data-testid":"tab-completion",className:(0,Gd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Jn.jsx)("span",{className:(0,Gd.default)(u.hint,u.resetIndent),children:(0,Jn.jsx)(Nl,{keyCode:"tab"},"tabHint")})),Th(S,x)},[o,n,r]),m=(0,er.useMemo)(()=>{let S=[];return c&&S.push(new qd("selection")),S.push(new Kd("placeholders")),i&&S.push(new Bd("keywords")),S},[d,c,i]),h=(0,er.useMemo)(()=>{let S=window.getComputedStyle(a);return{"--dd-color":S.color,"--dd-font-size":S.fontSize,"--dd-font-family":S.fontFamily,"--dd-font-variant":S.fontVariant}},[]);return!e||!v?null:(0,Jn.jsxs)("div",{ref:S=>{S!=null&&S.parentElement&&(y.current=S==null?void 0:S.parentElement)},className:u.root,style:h,children:[(0,Jn.jsx)($i,{tagName:"span",containerTagName:"div",className:(0,Gd.default)(u.container,u.agentText),disableLineBreaks:Wr(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:p,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!f}),(0,Jn.jsx)("br",{})]})},NN=({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??Wi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:p,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:p&&f!==!1}},Qb=zn(NN)(ON);var o1=w(te()),i1=w(F());var Zb={list:[],fetchState:"idle",isInitialRequest:null},eT=e=>e.autoflows.list||[],Jb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},tr=j("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Mh=j("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(tr(e.platformSessionId))}),_h=j("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(tr(e.platformSessionId))}),MN=q({name:"autoflows",initialState:Zb,reducers:{},extraReducers:e=>{e.addCase(Mh.pending,(t,n)=>{let r=Jb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(_h.pending,(t,n)=>{let r=Jb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(tr.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(tr.rejected,t=>{t.fetchState="error"}),e.addCase(tr.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(ue,()=>Zb)}}),tT=j("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(tr(e))}),o.on("sessionCompleted",()=>{n(tr(e))})}),nT=j("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),rT=MN.reducer;var oT={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},iT=e=>e.customMessages.list,sT=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),aT=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),lT=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),nl=j("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Yd=j("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)}),Xd=j("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)}),uT=q({name:"customMessages",initialState:oT,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(nl.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(nl.rejected,t=>{t.fetchState="error"}).addCase(nl.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Yd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Yd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Xd.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(ue,()=>oT)}}),cT=j("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(uT.actions.onCustomMessage(i))})}),dT=j("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),fT=uT.reducer;var _N={token:null,accountUrl:null,interval:null},pT=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},Dh=j("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),Fh=j("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Dh()),setInterval(()=>r(Dh()),n)}),mT=q({name:"passwordlessToken",initialState:_N,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Dh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(Fh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:gT}=mT.actions,hT=mT.reducer;function yT(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var kT=w(F());var CT=w(te()),bT=w(F());var ST=w(te());var vT={root:"Ai"};var xT=w(b()),FN=({className:e,children:t})=>{let n=A("Unicode",vT);return(0,xT.jsx)("span",{className:(0,ST.default)(e,n.root),children:t})},wT=FN;var ET={isDisabled:"Fi",buttonStart:"Hi",root:"Li",buttonStop:"xo",stateBadge:"h",isCompleted:"Mi",isStarted:"Ri",isAborted:"Ti"};var Hh={};Je(Hh,{enUS:()=>UN,nlNL:()=>jN});var UN={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"}]},jN={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 Pt=w(b()),BN=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=A("Autoflow",ET),a=G(Hh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,Pt.jsxs)(ae,{className:(0,CT.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,Pt.jsx)(pe,{children:(0,Pt.jsxs)(pe.Content,{children:[(0,Pt.jsxs)(pe.Title,{children:[t&&(0,Pt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,Pt.jsx)("span",{children:r})]})}),(0,Pt.jsx)(ae.Actions,{fixed:t==="Started",children:(0,Pt.jsx)(ae.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,Pt.jsxs)(bT.Fragment,{children:[(0,Pt.jsx)(wT,{children:u})," ",(0,Pt.jsx)("span",{children:a(l)})]})})})]})},TT=BN;var Uh=w(b()),VN=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},KN=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Uh.jsx)(kT.Fragment,{children:e.map(o=>(0,Uh.jsx)(TT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||VN(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),$N=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},WN={onStartAutoflow:Mh,onStopAutoflow:_h},PT=zn($N,WN)(KN);var RT=w(te()),jh=w(F());var nr={root:"co",title:"fo",isUsed:"Ui",quickReplies:"Bi",quickReply:"Di",hasError:"Ii",label:"Oi",errorIcon:"Xi"};var ht=w(b()),GN=({suggestion:e})=>{let t=G(Mo),n=Z(),r=O(sT(e.text)),o=O(aT(e.text)),i=O(lT(e.text)),s=O(Mc),{replyOptions:a}=e,l=(0,jh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Yd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,jh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(Xd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,ht.jsxs)(ae,{onClick:l,className:(0,RT.default)(nr.root,{[nr.isUsed]:r,[nr.hasError]:i}),children:[(0,ht.jsx)(pe,{children:(0,ht.jsxs)(pe.Content,{children:[(0,ht.jsxs)(pe.Title,{className:nr.title,children:[e.text," ",(0,ht.jsx)(Ml,{className:nr.label,children:"analyse tool"})," ",i&&(0,ht.jsx)("span",{className:nr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,ht.jsx)("ul",{className:nr.quickReplies,children:a.map(c=>(0,ht.jsx)("li",{className:nr.quickReply,children:c.title},c.title))})]})}),(0,ht.jsxs)(ae.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,ht.jsx)(ae.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,ht.jsx)(ae.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,ht.jsx)(ae.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},AT=GN;var Qd=w(F());var Vh=w(te());var zh=w(b()),Bh=()=>(0,zh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,zh.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:"Ji",entity:"r",entityText:"Ki",iconWrapper:"Pi",icon:"Qi",iconClicked:"Vi"};var Tn=w(b()),XN=({entities:e})=>{let t=A("EntitiesWidgetList",IT),[n,r]=(0,Qd.useState)(void 0),o=Z(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Po(a.text),o(Qe({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Qd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Tn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Tn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Tn.jsx)("span",{className:t.entityText,children:a.text}),(0,Tn.jsxs)("span",{className:t.iconWrapper,children:[(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon),children:(0,Tn.jsx)(Bh,{})}),(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon,n===l&&t.iconClicked),children:(0,Tn.jsx)(Bh,{})})]})]},a.text))})},LT=XN;var Kh=w(b()),OT=()=>(0,Kh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Kh.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 $h=w(b()),NT=()=>(0,$h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,$h.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 Wh=w(b()),MT=()=>(0,Wh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Wh.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{entries:BT,setPrototypeOf:_T,isFrozen:QN,getPrototypeOf:ZN,getOwnPropertyDescriptor:JN}=Object,{freeze:it,seal:dn,create:VT}=Object,{apply:Zh,construct:Jh}=typeof Reflect<"u"&&Reflect;it||(it=function(t){return t});dn||(dn=function(t){return t});Zh||(Zh=function(t,n,r){return t.apply(n,r)});Jh||(Jh=function(t,n){return new t(...n)});var Zd=At(Array.prototype.forEach),DT=At(Array.prototype.pop),rl=At(Array.prototype.push),tf=At(String.prototype.toLowerCase),qh=At(String.prototype.toString),eM=At(String.prototype.match),ol=At(String.prototype.replace),tM=At(String.prototype.indexOf),nM=At(String.prototype.trim),cn=At(Object.prototype.hasOwnProperty),Rt=At(RegExp.prototype.test),il=rM(TypeError);function At(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Zh(e,t,r)}}function rM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Jh(e,n)}}function Y(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tf;_T&&_T(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(QN(t)||(t[r]=i),o=i)}e[o]=!0}return e}function oM(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function zo(e){let t=VT(null);for(let[n,r]of BT(e))cn(e,n)&&(Array.isArray(r)?t[n]=oM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=zo(r):t[n]=r);return t}function Jd(e,t){for(;e!==null;){let r=JN(e,t);if(r){if(r.get)return At(r.get);if(typeof r.value=="function")return At(r.value)}e=ZN(e)}function n(){return null}return n}var FT=it(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gh=it(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yh=it(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iM=it(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xh=it(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),sM=it(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),HT=it(["#text"]),UT=it(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Qh=it(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),jT=it(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ef=it(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),aM=dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),lM=dn(/<%[\w\W]*|[\w\W]*%>/gm),uM=dn(/\${[\w\W]*}/gm),cM=dn(/^data-[\-\w.\u00B7-\uFFFF]/),dM=dn(/^aria-[\-\w]+$/),KT=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fM=dn(/^(?:\w+script|data):/i),pM=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$T=dn(/^html$/i),zT=Object.freeze({__proto__:null,MUSTACHE_EXPR:aM,ERB_EXPR:lM,TMPLIT_EXPR:uM,DATA_ATTR:cM,ARIA_ATTR:dM,IS_ALLOWED_URI:KT,IS_SCRIPT_OR_DATA:fM,ATTR_WHITESPACE:pM,DOCTYPE_NAME:$T}),mM=function(){return typeof window>"u"?null:window},gM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function WT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mM(),t=H=>WT(H);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=e,y=l.prototype,v=Jd(y,"cloneNode"),g=Jd(y,"nextSibling"),m=Jd(y,"childNodes"),h=Jd(y,"parentNode");if(typeof s=="function"){let H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let S,x="",{implementation:T,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:I}=n,{importNode:L}=r,N={};t.isSupported=typeof BT=="function"&&typeof h=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:K,TMPLIT_EXPR:ee,DATA_ATTR:oe,ARIA_ATTR:ze,IS_SCRIPT_OR_DATA:pn,ATTR_WHITESPACE:st}=zT,{IS_ALLOWED_URI:_}=zT,$=null,ar=Y({},[...FT,...Gh,...Yh,...Xh,...HT]),ye=null,lr=Y({},[...UT,...Qh,...jT,...ef]),W=Object.seal(VT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ur=null,yl=null,$o=!0,Qr=!0,cs=!1,vl=!0,qt=!1,Gt=!1,Sl=!1,at=!1,It=!1,wl=!1,xl=!1,my=!0,gy=!1,G1="user-content-",pf=!0,ds=!1,Wo={},qo=null,hy=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),yy=null,vy=Y({},["audio","video","img","source","image","track"]),mf=null,Sy=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),El="http://www.w3.org/1998/Math/MathML",Cl="http://www.w3.org/2000/svg",Rn="http://www.w3.org/1999/xhtml",Go=Rn,gf=!1,hf=null,Y1=Y({},[El,Cl,Rn],qh),fs=null,X1=["application/xhtml+xml","text/html"],Q1="text/html",Ne=null,Yo=null,Z1=n.createElement("form"),wy=function(E){return E instanceof RegExp||E instanceof Function},yf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yo&&Yo===E)){if((!E||typeof E!="object")&&(E={}),E=zo(E),fs=X1.indexOf(E.PARSER_MEDIA_TYPE)===-1?Q1:E.PARSER_MEDIA_TYPE,Ne=fs==="application/xhtml+xml"?qh:tf,$=cn(E,"ALLOWED_TAGS")?Y({},E.ALLOWED_TAGS,Ne):ar,ye=cn(E,"ALLOWED_ATTR")?Y({},E.ALLOWED_ATTR,Ne):lr,hf=cn(E,"ALLOWED_NAMESPACES")?Y({},E.ALLOWED_NAMESPACES,qh):Y1,mf=cn(E,"ADD_URI_SAFE_ATTR")?Y(zo(Sy),E.ADD_URI_SAFE_ATTR,Ne):Sy,yy=cn(E,"ADD_DATA_URI_TAGS")?Y(zo(vy),E.ADD_DATA_URI_TAGS,Ne):vy,qo=cn(E,"FORBID_CONTENTS")?Y({},E.FORBID_CONTENTS,Ne):hy,ur=cn(E,"FORBID_TAGS")?Y({},E.FORBID_TAGS,Ne):{},yl=cn(E,"FORBID_ATTR")?Y({},E.FORBID_ATTR,Ne):{},Wo=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,$o=E.ALLOW_ARIA_ATTR!==!1,Qr=E.ALLOW_DATA_ATTR!==!1,cs=E.ALLOW_UNKNOWN_PROTOCOLS||!1,vl=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,It=E.RETURN_DOM||!1,wl=E.RETURN_DOM_FRAGMENT||!1,xl=E.RETURN_TRUSTED_TYPE||!1,at=E.FORCE_BODY||!1,my=E.SANITIZE_DOM!==!1,gy=E.SANITIZE_NAMED_PROPS||!1,pf=E.KEEP_CONTENT!==!1,ds=E.IN_PLACE||!1,_=E.ALLOWED_URI_REGEXP||KT,Go=E.NAMESPACE||Rn,W=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&wy(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&wy(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(Qr=!1),wl&&(It=!0),Wo&&($=Y({},HT),ye=[],Wo.html===!0&&(Y($,FT),Y(ye,UT)),Wo.svg===!0&&(Y($,Gh),Y(ye,Qh),Y(ye,ef)),Wo.svgFilters===!0&&(Y($,Yh),Y(ye,Qh),Y(ye,ef)),Wo.mathMl===!0&&(Y($,Xh),Y(ye,jT),Y(ye,ef))),E.ADD_TAGS&&($===ar&&($=zo($)),Y($,E.ADD_TAGS,Ne)),E.ADD_ATTR&&(ye===lr&&(ye=zo(ye)),Y(ye,E.ADD_ATTR,Ne)),E.ADD_URI_SAFE_ATTR&&Y(mf,E.ADD_URI_SAFE_ATTR,Ne),E.FORBID_CONTENTS&&(qo===hy&&(qo=zo(qo)),Y(qo,E.FORBID_CONTENTS,Ne)),pf&&($["#text"]=!0),Gt&&Y($,["html","head","body"]),$.table&&(Y($,["tbody"]),delete ur.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=E.TRUSTED_TYPES_POLICY,x=S.createHTML("")}else S===void 0&&(S=gM(p,o)),S!==null&&typeof x=="string"&&(x=S.createHTML(""));it&&it(E),Yo=E}},xy=Y({},["mi","mo","mn","ms","mtext"]),Ey=Y({},["foreignobject","desc","title","annotation-xml"]),J1=Y({},["title","style","font","a","script"]),Cy=Y({},[...Gh,...Yh,...iM]),by=Y({},[...Xh,...sM]),ek=function(E){let R=h(E);(!R||!R.tagName)&&(R={namespaceURI:Go,tagName:"template"});let D=tf(E.tagName),de=tf(R.tagName);return hf[E.namespaceURI]?E.namespaceURI===Cl?R.namespaceURI===Rn?D==="svg":R.namespaceURI===El?D==="svg"&&(de==="annotation-xml"||xy[de]):!!Cy[D]:E.namespaceURI===El?R.namespaceURI===Rn?D==="math":R.namespaceURI===Cl?D==="math"&&Ey[de]:!!by[D]:E.namespaceURI===Rn?R.namespaceURI===Cl&&!Ey[de]||R.namespaceURI===El&&!xy[de]?!1:!by[D]&&(J1[D]||!Cy[D]):!!(fs==="application/xhtml+xml"&&hf[E.namespaceURI]):!1},Zr=function(E){rl(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},vf=function(E,R){try{rl(t.removed,{attribute:R.getAttributeNode(E),from:R})}catch{rl(t.removed,{attribute:null,from:R})}if(R.removeAttribute(E),E==="is"&&!ye[E])if(It||wl)try{Zr(R)}catch{}else try{R.setAttribute(E,"")}catch{}},Ty=function(E){let R=null,D=null;if(at)E="<remove></remove>"+E;else{let Ve=eM(E,/^[\r\n\t ]+/);D=Ve&&Ve[0]}fs==="application/xhtml+xml"&&Go===Rn&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let de=S?S.createHTML(E):E;if(Go===Rn)try{R=new d().parseFromString(de,fs)}catch{}if(!R||!R.documentElement){R=T.createDocument(Go,"template",null);try{R.documentElement.innerHTML=gf?x:de}catch{}}let Be=R.body||R.documentElement;return E&&D&&Be.insertBefore(n.createTextNode(D),Be.childNodes[0]||null),Go===Rn?I.call(R,Gt?"html":"body")[0]:Gt?R.documentElement:Be},ky=function(E){return C.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},tk=function(E){return E instanceof f&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof c)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},Py=function(E){return typeof a=="function"&&E instanceof a},An=function(E,R,D){N[E]&&Zd(N[E],de=>{de.call(t,R,D,Yo)})},Ry=function(E){let R=null;if(An("beforeSanitizeElements",E,null),tk(E))return Zr(E),!0;let D=Ne(E.nodeName);if(An("uponSanitizeElement",E,{tagName:D,allowedTags:$}),E.hasChildNodes()&&!Py(E.firstElementChild)&&Rt(/<[/\w]/g,E.innerHTML)&&Rt(/<[/\w]/g,E.textContent))return Zr(E),!0;if(!$[D]||ur[D]){if(!ur[D]&&Iy(D)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D)))return!1;if(pf&&!qo[D]){let de=h(E)||E.parentNode,Be=m(E)||E.childNodes;if(Be&&de){let Ve=Be.length;for(let lt=Ve-1;lt>=0;--lt)de.insertBefore(v(Be[lt],!0),g(E))}}return Zr(E),!0}return E instanceof l&&!ek(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Rt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Zr(E),!0):(qt&&E.nodeType===3&&(R=E.textContent,Zd([z,K,ee],de=>{R=ol(R,de," ")}),E.textContent!==R&&(rl(t.removed,{element:E.cloneNode()}),E.textContent=R)),An("afterSanitizeElements",E,null),!1)},Ay=function(E,R,D){if(my&&(R==="id"||R==="name")&&(D in n||D in Z1))return!1;if(!(Qr&&!yl[R]&&Rt(oe,R))){if(!($o&&Rt(ze,R))){if(!ye[R]||yl[R]){if(!(Iy(E)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,E)||W.tagNameCheck instanceof Function&&W.tagNameCheck(E))&&(W.attributeNameCheck instanceof RegExp&&Rt(W.attributeNameCheck,R)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(R))||R==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D))))return!1}else if(!mf[R]){if(!Rt(_,ol(D,st,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&E!=="script"&&tM(D,"data:")===0&&yy[E])){if(!(cs&&!Rt(pn,ol(D,st,"")))){if(D)return!1}}}}}}return!0},Iy=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},Ly=function(E){An("beforeSanitizeAttributes",E,null);let{attributes:R}=E;if(!R)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye},de=R.length;for(;de--;){let Be=R[de],{name:Ve,namespaceURI:lt,value:Jr}=Be,ps=Ne(Ve),ut=Ve==="value"?Jr:nM(Jr);if(D.attrName=ps,D.attrValue=ut,D.keepAttr=!0,D.forceKeepAttr=void 0,An("uponSanitizeAttribute",E,D),ut=D.attrValue,D.forceKeepAttr||(vf(Ve,E),!D.keepAttr))continue;if(!vl&&Rt(/\/>/i,ut)){vf(Ve,E);continue}qt&&Zd([z,K,ee],Ny=>{ut=ol(ut,Ny," ")});let Oy=Ne(E.nodeName);if(Ay(Oy,ps,ut)){if(gy&&(ps==="id"||ps==="name")&&(vf(Ve,E),ut=G1+ut),S&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!lt)switch(p.getAttributeType(Oy,ps)){case"TrustedHTML":{ut=S.createHTML(ut);break}case"TrustedScriptURL":{ut=S.createScriptURL(ut);break}}try{lt?E.setAttributeNS(lt,Ve,ut):E.setAttribute(Ve,ut),DT(t.removed)}catch{}}}An("afterSanitizeAttributes",E,null)},nk=function H(E){let R=null,D=ky(E);for(An("beforeSanitizeShadowDOM",E,null);R=D.nextNode();)An("uponSanitizeShadowNode",R,null),!Ry(R)&&(R.content instanceof i&&H(R.content),Ly(R));An("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(H){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,D=null,de=null,Be=null;if(gf=!H,gf&&(H="<!-->"),typeof H!="string"&&!Py(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw il("dirty is not a string, aborting")}else throw il("toString is not a function");if(!t.isSupported)return H;if(Sl||yf(E),t.removed=[],typeof H=="string"&&(ds=!1),ds){if(H.nodeName){let Jr=Ne(H.nodeName);if(!$[Jr]||ur[Jr])throw il("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)R=Ty("<!---->"),D=R.ownerDocument.importNode(H,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?R=D:R.appendChild(D);else{if(!It&&!qt&&!Gt&&H.indexOf("<")===-1)return S&&xl?S.createHTML(H):H;if(R=Ty(H),!R)return It?null:xl?x:""}R&&at&&Zr(R.firstChild);let Ve=ky(ds?H:R);for(;de=Ve.nextNode();)Ry(de)||(de.content instanceof i&&nk(de.content),Ly(de));if(ds)return H;if(It){if(wl)for(Be=k.call(R.ownerDocument);R.firstChild;)Be.appendChild(R.firstChild);else Be=R;return(ye.shadowroot||ye.shadowrootmode)&&(Be=L.call(r,Be,!0)),Be}let lt=Gt?R.outerHTML:R.innerHTML;return Gt&&$["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Rt($T,R.ownerDocument.doctype.name)&&(lt="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
24
+ `+lt),qt&&Zd([z,K,ee],Jr=>{lt=ol(lt,Jr," ")}),S&&xl?S.createHTML(lt):lt},t.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yf(H),Sl=!0},t.clearConfig=function(){Yo=null,Sl=!1},t.isValidAttribute=function(H,E,R){Yo||yf({});let D=Ne(H),de=Ne(E);return Ay(D,de,R)},t.addHook=function(H,E){typeof E=="function"&&(N[H]=N[H]||[],rl(N[H],E))},t.removeHook=function(H){if(N[H])return DT(N[H])},t.removeHooks=function(H){N[H]&&(N[H]=[])},t.removeAllHooks=function(){N={}},t}var qT=WT();var or=w(F());var hM={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function GT(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function sl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function al(e,t){var n,r,o,i,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],u="",c=t||{},f=0;function d(y){var v=hM[y[1]||""],g=l[l.length-1]==y;return v?v[1]?(g?l.pop():l.push(y),v[0|g]):v[0]:y}function p(){for(var y="";l.length;)y+=d(l[l.length-1]);return y}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(y,v,g){return c[v.toLowerCase()]=g,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(f,o.index),f=a.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((s=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+GT(sl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=al(GT(o[5].replace(/^\s*[>*+.-]/gm,""))),s==">"?s="blockquote":(s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+i+"</"+s+">"):o[8]?n='<img src="'+sl(o[8])+'" alt="'+sl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+sl(o[11]||c[r.toLowerCase()])+'">'),n=p()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+al(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+sl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(f)+p()).replace(/^\n+|\n+$/g,"")}var YT={root:"i",popover:"Wi",options:"go",copyIcon:"Zi",option:"bo",divider:"_i"};var rr=w(b()),vM=e=>`<svg class=${e} version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black" fill-opacity="0.5" stroke-opacity="0.8"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg>`,SM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=A("Markdown",YT),s=(0,or.useRef)(null),[a,l]=(0,or.useState)(null),[u,c]=(0,or.useState)(null),f=(0,or.useMemo)(()=>{let g=al(e);return qT.sanitize(g).replace(/<\/code>/g,`${vM(i.copyIcon)}</code>`)},[e]),d=()=>{l(null),c(null)},p=g=>{var S;let m=g.target,h=!!((S=s.current)!=null&&S.querySelector("code"));a||h&&m.tagName!=="CODE"||!h&&m!==s.current||(m.addEventListener("mouseleave",d,{once:!0}),c(m.textContent),l(m))},y=()=>{u&&r(u),d()},v=()=>{u&&o(u),d()};return(0,rr.jsxs)(or.Fragment,{children:[a&&(0,rr.jsx)(is,{triggerRef:{current:a},parentNode:a,className:i.popover,children:(0,rr.jsxs)("div",{className:i.options,children:[(0,rr.jsx)("button",{type:"button",className:i.option,onClick:y,children:n}),(0,rr.jsx)("div",{className:i.divider}),(0,rr.jsx)("button",{type:"button",className:i.option,onClick:v,children:t})]})}),(0,rr.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:f},onMouseOver:p})]})},XT=SM;var ey={};Je(ey,{enUS:()=>wM,nlNL:()=>xM});var wM={useCue:[{type:0,value:"Copy"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}]},xM={useCue:[{type:0,value:"Gebruik"}],copyCue:[{type:0,value:"Kopieer"}],removeCue:[{type:0,value:"Sluiten"}]};var Yr=w(b()),EM=({cue:e,onRemove:t,onCopy:n,onUse:r})=>{let o=G(ey),i=l=>{n&&n(l)},s=l=>{r&&r(l)},a=l=>{l.preventDefault(),l.stopPropagation(),t&&t(e.id)};return(0,Yr.jsxs)(ae,{"data-testid":"cue",children:[(0,Yr.jsx)(pe,{children:(0,Yr.jsxs)(pe.Content,{children:[e.title&&(0,Yr.jsx)(pe.Title,{"data-testid":"widget-cue-title",children:e.title}),(0,Yr.jsx)(XT,{content:e.text,useLabel:o("useCue"),copyLabel:o("copyCue"),onCopy:i,onUse:s})]})}),(0,Yr.jsx)(ae.CloseIcon,{title:o("removeCue"),onClick:a})]})},QT=EM;var ll=w(b()),CM=({cues:e,onCopyCue:t,onUseCue:n,onRemoveCue:r})=>(0,ll.jsx)(ll.Fragment,{children:e.map(o=>(0,ll.jsx)(QT,{cue:o,onRemove:r,onCopy:t,onUse:n},`${o.id}_${o.timestamp}`))}),ZT=CM;var e1=w(F());var bM=/(https?:\/\/[^\s]+)/,JT=e=>e.split(" ").find(t=>bM.test(t));var $t=w(b()),TM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=JT(r),i=G(Mo),s=U("showImages"),a=U("fallbackImage"),l=f=>{f.preventDefault(),f.stopPropagation(),n(r)},u=(0,e1.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$t.jsxs)(ae,{onClick:l,"data-testid":"edit-suggestion",children:[(0,$t.jsxs)(pe,{children:[s&&e.image&&(0,$t.jsx)(pe.Image,{src:$d(e,"small",a||void 0),title:e.title}),(0,$t.jsxs)(pe.Content,{children:[e.title&&(0,$t.jsx)(pe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,$t.jsx)(ae.Labels,{labels:e.searchKeywords}),(0,$t.jsx)(pe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$t.jsxs)(ae.Actions,{children:[o&&(0,$t.jsx)(ae.ActionButton,{onClick:u,label:i("visitUrl")}),(0,$t.jsx)(ae.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},t1=TM;var ul=w(b()),kM=({lines:e,suggestions:t})=>{let n=en(),r=(o,i)=>{n.send(Hr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,ul.jsx)(ul.Fragment,{children:t.map(o=>(0,ul.jsx)(t1,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},n1=kM;var ty={};Je(ty,{enUS:()=>PM,nlNL:()=>RM});var PM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},RM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var r1={root:"or",loginText:"er",stateText:"ho",sectionList:"ir",shortcutList:"rr",shortcut:"tr",link:"mo"};var X=w(b()),nf=(e,t)=>{let n=O(nt);(0,i1.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},IM=({onLogIn:e})=>{let t=G(ty),n=Z(),r=U("isEmbedded"),o=A("Widget",r1),i=U("showAutoflows"),s=U("showCustomMessages"),a=U("showSummaryCommand"),l=U("showKnowledgeSearch"),u=U("showSearch"),c=O(Vr),f=O(bd),d=O(eT),p=O(kE),y=O(Cd),v=O(iT),g=O(_c),m=O(Bi),h=O(nt),S=O(Mc),x=O(yT),T=O(Td),C=en(),k=O(XC),I=O(pT("/admin/")),L=U("adminUrl"),N=U("productName"),z=en();if(nf(()=>(n(nl(S)),n(cT(S)),()=>{n(dT(S))}),[n,m,s,S]),nf(()=>(n(tr(S)),n(tT(S)),()=>{n(nT(S))}),[n,m,i,S]),nf(()=>{f.forEach(({type:oe})=>{n(oe==="entities"?sn():ln(oe))})},[n,m,g,c]),nf(()=>(n(Fh()),()=>{n(gT())}),[n]),m===!1)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,X.jsx)("div",{className:o.loginText,children:(0,X.jsx)("div",{children:(0,X.jsx)(Od,{isEmbedded:r,loginUrl:L,onLogIn:e})})},"login");if(!c||!S||h===null||k||x)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("waiting")})})},"waiting");let K=oe=>{z.send(Hr,{text:oe,suggestion:{source:"cue",sourceText:oe}})},ee=u||a||l||I;return(0,X.jsx)("div",{className:(0,o1.default)(o.root),"data-testid":"widget",children:(0,X.jsxs)(_l,{className:o.sectionList,children:[ee&&(0,X.jsx)(Ln,{title:t("actions"),type:"shortcuts",children:(0,X.jsxs)("div",{className:o.shortcutList,children:[u&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,X.jsx)(qi,{}),t("linkSearch")]}),a&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,X.jsx)(MT,{}),t("linkSummary")]}),l&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,X.jsx)(NT,{}),t("linkKnowledgeSearch")]}),I&&(0,X.jsxs)("a",{className:o.shortcut,target:"_blank",href:I,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,X.jsx)(OT,{}),t("linkStudioLogin",{productName:N})]})]})}),s&&v.length>0&&(0,X.jsx)(Ln,{type:"custom-messages","data-testid":"custom-messages",children:(0,X.jsx)(vt,{withDivider:!0,children:v.map(oe=>(0,X.jsx)(AT,{suggestion:oe},oe.text))})}),i&&d.length>0&&(0,X.jsx)(Ln,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(PT,{})})}),f.map(({type:oe,title:ze,amount:pn,lines:st})=>{var _;switch(oe){case"entities":return y&&y.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(LT,{entities:y})},oe);case"cues":return p&&p.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(ZT,{cues:p,onRemoveCue:$=>n(RE({id:$})),onCopyCue:$=>Po($),onUseCue:K})})},oe);default:return((_=T[oe])==null?void 0:_.fetchState)==="done"&&T[oe].suggestions.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(n1,{lines:st,contentType:oe,suggestions:T[oe].suggestions.slice(0,pn)||[]})})},oe)}})]})})},s1=IM;function ss(e){let t=new Range;return t.selectNodeContents(e),t}function a1(e,t,n){try{return Xr(e,t,n),!0}catch{return!1}}function rf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function of(e){return"tagName"in e&&e.tagName==="BR"}var cl=/[\u200B-\u200D\uFEFF]/g;function Xr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(cl,""),f=o+c.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let y=s(u,t-o);y===0&&!p?r.setStartBefore(l):r.setStart(l,y)}p&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(of(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;rf(l)&&u&&!rf(u)&&!of(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function dl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(f){let d=f===n,p=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let y=f.textContent;d&&(a=u+y.substring(0,r).replace(cl,"").length),p&&(l=u+y.substring(0,i).replace(cl,"").length),u+=y.replace(cl,"").length;break}case Node.ELEMENT_NODE:{let y=f.nextSibling===null;of(f)&&!y&&u++;for(let v=0;v<f.childNodes.length;v++){let g=d&&v===r,m=p&&v===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[v]),p&&v===i-1&&(l=u),l!==void 0))break}!p&&rf(f)&&!y&&u++,p&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function fl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,p=f?i:void 0,y=u.textContent.replace(cl,"");d===0&&p===void 0?a+=y:a+=y.substring(d,p);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&of(u)&&!d&&(a+=`
25
25
  `);for(let p=c?r:0;p<(f?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[p]),s!==1);p++);!f&&s===0&&rf(u)&&!d&&(a+=`
26
- `);break}default:break}f&&s++}return l(e),a}var a1=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(a1||{}),ir=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();_r(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(a1).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function l1(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Bo=class extends ir{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),fl(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!l1(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!l1(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return dl(this.element,t);let n=this.lastKnownSelection;if(n&&s1(this.element,n.start,n.end))return n;let r=ss(this.element);return r.collapse(!1),dl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return fl(this.element,Xr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Vo=class extends ir{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function u1(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function IM(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var ny=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},ry=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=u1(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},oy=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),V.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new ry(t,this.deepdeskUrl,{debug:!0}):new ny(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=IM(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(V.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;V.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},c1=oy;var as=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var iy=e=>new Promise(t=>{setTimeout(t,e)});var ls=class extends as{name="ClientError"},sy=class extends as{name="ServerError"},fn=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:y="v1",...v}=n,g={credentials:"include",...v,headers:{"Content-Type":"application/json",...v.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof y=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":y});let m=u,h=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let S=async()=>(m--,a(s,g).then(async x=>p(x)&&!i.isAborted&&m>0?(await iy(c),S()):x.status===401&&f===!0&&h===!1?(h=!0,await this.refreshToken(),S()):x).catch(async x=>{if(d(x)&&!i.isAborted&&m>0)return await iy(c),S();throw x}));S().then(x=>x.json().catch(()=>null).then(C=>{x.status>=500?o(new sy("Server Error",C)):x.status===401?o(new ls("Unauthorized",C)):x.status===403?o(new ls("Forbidden",C)):x.status===404?o(new ls("Not Found",C)):x.status>=400&&o(new ls("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(x=>{o(x)})})}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 LM;(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||={})})(LM||={});function sf(e){return{...ne(e),tags:e.tags}}var sr=class e{constructor(t,n={}){this.options=n;this.client=new fn(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ie(t),tags:t.tags},{version:"v2"});return sf(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return ne(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${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(),V.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return V.info(`Successfully retrieved conversation ${i.id} for session ${t}`),sf(i)}async isConversationSupported(t,n={}){V.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=Ie(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return sf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ie(o),tags:o.tags})),{version:"v2"})).map(o=>sf(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",Ie({...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:Ie({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Ie(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}`,Ie(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`,Ie(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",Ie(t),{abortLatest:!0});return ne(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ie(t),{version:"v2"});return ne(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Ie({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return ne(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return ne(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return ne(t.token)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return ne(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return ne(s.cues)}async translateMessages(t){let n=await this.client.post("/api/translate",Ie(t),{version:"v2"});return ne(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Cv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var pl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Ng(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,ne(o))}catch{V.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var OM;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(OM||={});var ml=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=V;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`,Ie(n));return ne(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ie(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",Ie(t));return ne(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new pl(`${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 d1={startTime:null,stopTime:null},f1=q({name:"handlingTime",initialState:d1,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(ue,()=>d1)}}),{handlingTimeStart:p1,handlingTimeStop:af,handlingTimeReset:m1}=f1.actions,g1=f1.reducer;var h1=(e={})=>{let t={onAuthError:zi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var lf={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var Ko=j("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 lf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),NM=q({name:"styleSuggestions",initialState:lf,reducers:{},extraReducers:e=>{e.addCase(Ko.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ko.rejected,t=>{t.fetchState="error"}).addCase(Ko.fulfilled,(t,n)=>{t.fetchState="done",_r(t.list,n.payload)||(t.list=n.payload)}).addCase(Co,t=>{t.list=lf.list}).addCase(ue,()=>lf)}}),y1=NM.reducer;var v1=(e={})=>{let t,n=!0,r={getStyleSuggestions:Ko,debounce:500,...e};return o=>i=>s=>{var p;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(!((p=u.conversation.current)==null?void 0:p.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 MM(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var S1=(e={})=>{let t={getTextSuggestions:ln,getAutocompleteSuggestions:Xa,debounce:200,check:Ji,...e},n;return r=>o=>i=>{var v;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,f=(v=l.conversation.current)==null?void 0:v.id,d=i.type===kd.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:p}}=l;return MM(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=Vi(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var w1=Ko.fulfilled.toString();function _M(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 x1=e=>t=>n=>r=>{var u;if(r.type!==w1){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=_M(o,s);r.type===w1&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var DM=rc({answer:jC,auth:Vx,autoflows:nT,conversation:Zx,contentTypes:JE,customMessages:dT,passwordlessToken:gT,entities:kC,knowledgeAssistant:FC,handlingTime:g1,info:yE,input:pE,settings:Dx,profile:VC,search:bE,summary:OC,styleSuggestions:y1,ui:gb,rules:RE,textSuggestions:ZC});function E1(e){return Bw({reducer:DM,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),h1(),S1({debounce:200}),v1({debounce:500}),x1(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var FM=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},HM=e=>t=>n=>r=>{var a;let o=t.getState(),i=kg("inlineSuggestions")(o);switch(r.type){case zi.toString():{!r.payload&&e.emit("logout",void 0);break}case sn.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Yn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case Qe.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 Bc.toString():e.handleKeyDown(r.payload);break;case Co.toString():e.logSendMessage(r.payload);break;case Vc.toString():e.handleInputChanged(r.payload);break;case $n.fulfilled.toString():e.broadcast(Fg,r.payload,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case Co.toString():e.handleAfterSendMessage(r.payload);break;case Za.toString():e.onUpdateShowTabHint(r.payload);break;case af.toString():e.logHandlingTime();break;case Cn.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:FM(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0}),i&&(t.dispatch(En([])),t.dispatch(Kn()));break}case zc.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 ka.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Kc.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 En.toString():{i&&r.payload.length>0&&t.dispatch(Fr(0));break}default:break}return s},C1=HM;function ay(e){return e.toISOString().replace("T"," ").replace("Z","")}function b1(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:ay(n),timeStop:ay(r)}}function T1(e,t,n){var k,I,L;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:p,textSuggestions:y,offeredTextSuggestions:v}}=t[e],g=r.length,h=y.reduce((N,{text:z,searchTerm:K})=>N+z.length-(K?K.length:0),0),S=u??Date.now(),x=(Date.now()-S)/1e3+(c||0),C=o/x,T=y.reduce((N,{searchTerm:z})=>N+(z?z.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:p,lenTextTyped:o+T,lenTextTotal:g,lenTextAssisted:h,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:x,charsPerSecond:C,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(N=>N.source==="gpt").length}],agentId:(k=t.info.agentInfo)==null?void 0:k.agentId,agentName:(I=t.info.agentInfo)==null?void 0:I.agentName,agentEmail:(L=t.info.agentInfo)==null?void 0:L.agentEmail}}function ly(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return ly(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?ly(o,t):null}function k1(e,t){return ly(e,t)}function P1(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UM(e){return typeof e=="object"&&e!==null&&"tagName"in e}function uf(e){return UM(e)&&(Wr(e)||Md(e))}var R1,kn=new Map,jM=["bottom","height","left","right","top","width"],zM=(e={},t={})=>jM.some(n=>e[n]!==t[n]);function A1(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...A1(t)]:[]}function I1(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var cf=!1,L1=()=>{cf=!0;let e=[];if(kn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),kn.delete(n);return}let r=n.getBoundingClientRect();zM(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(I1,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),kn.size===0){cf=!1;return}R1=window.requestAnimationFrame(L1)};function uy(e,t){let n=A1(e),r=[],o=n.map((i,s)=>uy(i,a=>{r[s]=a;let l=kn.get(e);if(!l)return;let u=r.reduce(I1,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),kn.has(e)){let s=kn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else kn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!cf&&L1()},unobserve(){o.forEach(s=>s.unobserve());let i=kn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||kn.delete(e),kn.size||(cancelAnimationFrame(R1),cf=!1)}}}}var O1,Pn=new Map,N1=()=>{Pn.forEach((e,t)=>{if(!t.isConnected){Pn.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)))}),Pn.size!==0&&(O1=window.requestAnimationFrame(N1))};function M1(e,t){return{observe(){let n=Pn.size===0;Pn.has(e)?Pn.get(e).callbacks.push(t):Pn.set(e,{visible:void 0,callbacks:[t]}),n&&N1()},unobserve(){let n=Pn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Pn.delete(e),Pn.size||cancelAnimationFrame(O1)}}}}var cy=["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 dy(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function us(e){return parseFloat(e)}function df(e){return Math.round(e*1e6)}function _1(e){return e/1e6}function fy(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=us(e.width),i=us(e.borderLeftWidth),s=us(e.borderRightWidth),a=us(e.paddingRight),l=_1(df(o)-df(i)-df(s)),u=_1(df(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function gl(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Ho(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};dy(r,n,cy),fy(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=M1(e,()=>{dy(r,n,cy),fy(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=uy(e,f=>{if(f===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(dy(r,n,cy),fy(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),p=window.getComputedStyle(t.closestScrollElement),y=us(p.borderTopWidth),v=us(p.borderBottomWidth),g=d.top+y-f.top,m=f.top+f.height+-(d.top+d.height-v);n.style.clipPath=`inset(${g}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var D1=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function BM(e){return e.offsetParent!==null}function F1(e){if(!BM(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 ff(e,t,n=100){let r=F1(e);t({isVisible:r});let o=setInterval(()=>{let i=F1(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Oe=w(b());var H1=D1("showTabHint",!0),hl=class e{static version="11.1.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new sr(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[C1({broadcast:(f,d,p)=>{this.broadcastEvents.send(f,d,p)},emit:(f,d,p)=>this.emit(f,d,p),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),onUpdateShowTabHint:f=>H1.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ml(n)}),this.store=E1(c),this.broadcastEvents=new c1({debug:!0,deepdeskUrl:u,eventMap:AE(this.store),createCustomChannel:l}),this.store.dispatch(Za(H1.value())),this.store.dispatch(Oc({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(zi(null)),this.store.dispatch(Bn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();nt(r)&&Fx(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Bn())).payload}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Ig({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Dc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Fc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Lg(t))).payload}async postMessages(t){return(await this.store.dispatch(Uc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Hc(t))).payload}resetConversation(){this.store.dispatch(ue()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Yn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Oc(t))}setVisitorInfo(t){this.store.dispatch(hE(t))}async setAgentInfo(t){await this.store.dispatch(Pa(t))}async setAgentSettings(t){await this.store.dispatch(Mg(t))}async getAgentSettings(){return(await this.store.dispatch(_g())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(kd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Vc(t))}notifyKeyDown(t){this.store.dispatch(Bc(t))}notifyPaste(t,n){this.store.dispatch(uE({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(aE(t))}notifyExternalSuggestion(t){this.store.dispatch(Cn(t)),this.store.dispatch(Kn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch($n({label:t,params:n}));if(o)throw o;return r}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Kr({collapse:!1})),this.inputMediator&&this.store.dispatch(nE({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(En([])))}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(lE(Jx(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(oE()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(sE()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(ka()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Fr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Fr(-1)),this.store.dispatch(ka()),t.preventDefault()):n||(this.store.dispatch(Kr({collapse:!0})),this.store.dispatch(pb(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(Za(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&p&&p.text.startsWith(d)&&(this.store.dispatch(Cn({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Kn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(cE()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch(p1()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.info("Stop handling time"),this.store.dispatch(af()))}logSendMessage(t){let n=T1("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logHandlingTime(){let t=b1(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(m1())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Kn()),this.store.dispatch(Co(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Cn({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=gl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=gl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Ho(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),V.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(V.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(fE(r.metrics))):V.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!uf(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:p,inputMediator:y,closestScrollSelector:v,appendOverlayTo:g,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:p,isEmbedded:f,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),Ho(t),this.inputMediator=y||(Wr(t)?new Vo(t):new Bo(t)),this.inputMediator.on("change",({plainText:C})=>{this.notifyInputChanged(C)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(dE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",C=>{this.notifyKeyDown(C)}),this.inputMediator.on("paste",({pastedText:C,selectionText:T})=>{this.notifyPaste(C,T)}),this.inputMediator.on("cut",({selectionText:C})=>{this.notifyCut(C)});let S=v&&k1(t,v)||void 0;if(m){let{customStyles:C,appendOverlayTo:T}=n;if(Wr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:C,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(xb,{})})}),k),this.inputMediator.on("caret",L=>{this.store.dispatch(En([])),L?(k.style.display="block",k.style.top=`${L.top}px`,k.style.left=`${L.left}px`):k.style.display="none"});let I=this.overlayContainerFactory("floating-menu",S||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:T},C==null?void 0:C.floatingMenuRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:C,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(cb,{onLogIn:()=>this.loginViaPopup().catch(L=>V.warn(L.message))})})}),I)}else{let C=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),T=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Xb,{inputElement:t})})}),C),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Ib,{onLogIn:()=>this.loginViaPopup().catch(k=>V.warn(k.message))})})}),T)}(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(ib,{})})}),this.createContainer("deepdesk-overlays"));let x;this.inputMediator.on("selection",C=>{clearTimeout(x),C===null?x=setTimeout(()=>{C!==null&&this.store.dispatch(Og(C))},500):this.store.dispatch(Og(C))}),this.inputMediator.on("disabled",()=>{var C;(C=this.inputMediator)==null||C.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(wh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(wh(!0))),this.store.dispatch(rE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Kn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var C;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((C=this.state.conversation.current)==null?void 0:C.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&V.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(i1,{onLogIn:()=>this.loginViaPopup().catch(s=>V.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Wt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=ff(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){P1(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ya());let t=Vr(this.state);t&&(await this.store.dispatch(qa()),this.store.dispatch(Oc({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=async p=>{var y,v;if((y=p.data)!=null&&y.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((v=p.data)==null?void 0:v.jwt),await this.isLoggedIn(),this.broadcastEvents.send(Aa),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let f=async p=>{var y;if(p.origin===a.origin)switch((y=p.data)==null?void 0:y.type){case"deepdesk-popup-loaded":{try{let v=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(v,a.origin,[o.port2])}catch(v){V.error("Error posting message to popup",v),r(v)}break}case"deepdesk-popup-error":{u(),p.data.message==="Timeout"&&V.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}};window.addEventListener("message",f);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(V.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;V.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=bd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(sn()):this.store.dispatch(ln(r))})}catch(r){this.handleError(r)}}};async function U1(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 j1(e,t,n={}){let r=n.replace?Xr(e,n.replace.start,n.replace.end):ss(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
27
- `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?Xr(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 VM(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function KM(e){let t=document.createDocumentFragment();return e.split(`
28
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function z1(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:z1(e,t.parentNode)}async function B1(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?VM(t):KM(t);if(n){let c=l.startContainer===e?e.childNodes[l.startOffset]:l.startContainer,f=z1(e,c)??e.firstChild;e.insertBefore(u,(f==null?void 0:f.nextSibling)??null)}else l.insertNode(u),l.collapse(!1)};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function V1(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function K1(e,t,n){await new sr(e).authenticateWithKey(t,n)}async function $1(e){let n=await new fn(e).get("/platform/config/",{version:null});return ne(n)}async function $M(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 W1(e,t){let n=await $M(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 ak(WM);})();
26
+ `);break}default:break}f&&s++}return l(e),a}var l1=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(l1||{}),ir=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();_r(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(l1).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function u1(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Bo=class extends ir{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),fl(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!u1(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!u1(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return dl(this.element,t);let n=this.lastKnownSelection;if(n&&a1(this.element,n.start,n.end))return n;let r=ss(this.element);return r.collapse(!1),dl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return fl(this.element,Xr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Vo=class extends ir{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function c1(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function LM(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var ny=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},ry=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=c1(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},oy=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),V.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new ry(t,this.deepdeskUrl,{debug:!0}):new ny(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=LM(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(V.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;V.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},d1=oy;var as=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var iy=e=>new Promise(t=>{setTimeout(t,e)});var ls=class extends as{name="ClientError"},ay=class extends as{name="ServerError"},sy=new Map,fn=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",{useCache:u=!1,abortLatest:c=!1,attempts:f=1,retryDelay:d=500,refreshTokenOn401:p=!0,retryOnError:y=C=>C instanceof TypeError,retryOnResponse:v=C=>C.status>=500,version:g="v1",...m}=n;if(u)if(l){if(sy.has(s)){r(sy.get(s));return}}else throw new Error(`Can't use 'useCache' for ${n.method}`);let h={credentials:"include",...m,headers:{"Content-Type":"application/json",...m.headers}};!l&&this.csrfToken&&(h.headers={...h.headers,"X-CSRFToken":this.csrfToken}),typeof g=="string"&&(h.headers={...h.headers,"X-Deepdesk-API-Version":g});let S=f,x=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&c&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let T=async()=>(S--,a(s,h).then(async C=>v(C)&&!i.isAborted&&S>0?(await iy(d),T()):C.status===401&&p===!0&&x===!1?(x=!0,await this.refreshToken(),T()):C).catch(async C=>{if(y(C)&&!i.isAborted&&S>0)return await iy(d),T();throw C}));T().then(C=>C.json().catch(()=>null).then(k=>{C.status>=500?o(new ay("Server Error",k)):C.status===401?o(new ls("Unauthorized",k)):C.status===403?o(new ls("Forbidden",k)):C.status===404?o(new ls("Not Found",k)):C.status>=400&&o(new ls("Bad Request",k)),delete this.latestRequestByUrl[s],u&&sy.set(s,k),r(k)})).catch(C=>{o(C)})})}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 OM;(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||={})})(OM||={});function sf(e){return{...J(e),tags:e.tags}}var sr=class e{constructor(t,n={}){this.options=n;this.client=new fn(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ie(t),tags:t.tags},{version:"v2"});return sf(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null,useCache:!0});return J(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null,useCache:!0});return J(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null,useCache:!0});return J(t)}async getAccount(){let t=window.location.host.split(".")[0],n=await this.client.get(`/apis/admin/accounts/${t}/`,{version:null,useCache:!0});return J(n)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null,useCache:!0});return J(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),V.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return V.info(`Successfully retrieved conversation ${i.id} for session ${t}`),sf(i)}async isConversationSupported(t,n={}){V.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=Ie(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return sf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ie(o),tags:o.tags})),{version:"v2"})).map(o=>sf(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",Ie({...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:Ie({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Ie(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}`,Ie(n),{abortLatest:!0})).map(i=>({...J(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`,Ie(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 J(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",Ie(t),{abortLatest:!0});return J(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ie(t),{version:"v2"});return J(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Ie({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return J(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return J(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return J(t.token)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return J(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return J(s.cues)}async getRules(){let t=new URLSearchParams,n=await this.client.get(`/apis/admin/rule-engine/rules/?${t.toString()}`,{version:null,useCache:!0});return J(n)}async translateMessages(t){let n=await this.client.post("/api/translate",Ie(t),{version:"v2"});return J(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(bv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var pl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Ng(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,J(o))}catch{V.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var NM;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(NM||={});var ml=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=V;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return J(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Ie(n));return J(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ie(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return J(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Ie(t));return J(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new pl(`${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 f1={startTime:null,stopTime:null},p1=q({name:"handlingTime",initialState:f1,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(ue,()=>f1)}}),{handlingTimeStart:m1,handlingTimeStop:af,handlingTimeReset:g1}=p1.actions,h1=p1.reducer;var y1=(e={})=>{let t={onAuthError:zi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var lf={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var Ko=j("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 lf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),MM=q({name:"styleSuggestions",initialState:lf,reducers:{},extraReducers:e=>{e.addCase(Ko.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ko.rejected,t=>{t.fetchState="error"}).addCase(Ko.fulfilled,(t,n)=>{t.fetchState="done",_r(t.list,n.payload)||(t.list=n.payload)}).addCase(Co,t=>{t.list=lf.list}).addCase(ue,()=>lf)}}),v1=MM.reducer;var S1=(e={})=>{let t,n=!0,r={getStyleSuggestions:Ko,debounce:500,...e};return o=>i=>s=>{var p;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(!((p=u.conversation.current)==null?void 0:p.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 _M(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var w1=(e={})=>{let t={getTextSuggestions:ln,getAutocompleteSuggestions:Xa,debounce:200,check:Ji,...e},n;return r=>o=>i=>{var v;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,f=(v=l.conversation.current)==null?void 0:v.id,d=i.type===kd.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:p}}=l;return _M(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=Vi(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var x1=Ko.fulfilled.toString();function DM(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 E1=e=>t=>n=>r=>{var u;if(r.type!==x1){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=DM(o,s);r.type===x1&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var FM=rc({answer:zC,auth:Kx,autoflows:rT,conversation:Jx,contentTypes:eC,customMessages:fT,passwordlessToken:hT,entities:PC,knowledgeAssistant:HC,handlingTime:h1,info:vE,input:mE,settings:Fx,profile:KC,search:TE,summary:NC,styleSuggestions:v1,ui:hb,rules:AE,textSuggestions:JC});function C1(e){return Vw({reducer:FM,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),y1(),w1({debounce:200}),S1({debounce:500}),E1(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var HM=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},UM=e=>t=>n=>r=>{var a;let o=t.getState(),i=kg("inlineSuggestions")(o);switch(r.type){case zi.toString():{!r.payload&&e.emit("logout",void 0);break}case sn.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Yn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case Qe.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 Bc.toString():e.handleKeyDown(r.payload);break;case Co.toString():e.logSendMessage(r.payload);break;case Vc.toString():e.handleInputChanged(r.payload);break;case $n.fulfilled.toString():e.broadcast(Fg,r.payload,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case Co.toString():e.handleAfterSendMessage(r.payload);break;case Za.toString():e.onUpdateShowTabHint(r.payload);break;case af.toString():e.logHandlingTime();break;case Cn.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:HM(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0}),i&&(t.dispatch(En([])),t.dispatch(Kn()));break}case zc.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 ka.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Kc.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 En.toString():{i&&r.payload.length>0&&t.dispatch(Fr(0));break}default:break}return s},b1=UM;function ly(e){return e.toISOString().replace("T"," ").replace("Z","")}function T1(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:ly(n),timeStop:ly(r)}}function k1(e,t,n){var k,I,L;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:p,textSuggestions:y,offeredTextSuggestions:v}}=t[e],g=r.length,h=y.reduce((N,{text:z,searchTerm:K})=>N+z.length-(K?K.length:0),0),S=u??Date.now(),x=(Date.now()-S)/1e3+(c||0),T=o/x,C=y.reduce((N,{searchTerm:z})=>N+(z?z.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:p,lenTextTyped:o+C,lenTextTotal:g,lenTextAssisted:h,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:x,charsPerSecond:T,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(N=>N.source==="gpt").length}],agentId:(k=t.info.agentInfo)==null?void 0:k.agentId,agentName:(I=t.info.agentInfo)==null?void 0:I.agentName,agentEmail:(L=t.info.agentInfo)==null?void 0:L.agentEmail}}function uy(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return uy(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?uy(o,t):null}function P1(e,t){return uy(e,t)}function R1(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function jM(e){return typeof e=="object"&&e!==null&&"tagName"in e}function uf(e){return jM(e)&&(Wr(e)||Md(e))}var A1,kn=new Map,zM=["bottom","height","left","right","top","width"],BM=(e={},t={})=>zM.some(n=>e[n]!==t[n]);function I1(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...I1(t)]:[]}function L1(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var cf=!1,O1=()=>{cf=!0;let e=[];if(kn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),kn.delete(n);return}let r=n.getBoundingClientRect();BM(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(L1,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),kn.size===0){cf=!1;return}A1=window.requestAnimationFrame(O1)};function cy(e,t){let n=I1(e),r=[],o=n.map((i,s)=>cy(i,a=>{r[s]=a;let l=kn.get(e);if(!l)return;let u=r.reduce(L1,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),kn.has(e)){let s=kn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else kn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!cf&&O1()},unobserve(){o.forEach(s=>s.unobserve());let i=kn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||kn.delete(e),kn.size||(cancelAnimationFrame(A1),cf=!1)}}}}var N1,Pn=new Map,M1=()=>{Pn.forEach((e,t)=>{if(!t.isConnected){Pn.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)))}),Pn.size!==0&&(N1=window.requestAnimationFrame(M1))};function _1(e,t){return{observe(){let n=Pn.size===0;Pn.has(e)?Pn.get(e).callbacks.push(t):Pn.set(e,{visible:void 0,callbacks:[t]}),n&&M1()},unobserve(){let n=Pn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Pn.delete(e),Pn.size||cancelAnimationFrame(N1)}}}}var dy=["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 fy(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function us(e){return parseFloat(e)}function df(e){return Math.round(e*1e6)}function D1(e){return e/1e6}function py(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=us(e.width),i=us(e.borderLeftWidth),s=us(e.borderRightWidth),a=us(e.paddingRight),l=D1(df(o)-df(i)-df(s)),u=D1(df(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function gl(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Ho(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};fy(r,n,dy),py(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=_1(e,()=>{fy(r,n,dy),py(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=cy(e,f=>{if(f===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(fy(r,n,dy),py(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),p=window.getComputedStyle(t.closestScrollElement),y=us(p.borderTopWidth),v=us(p.borderBottomWidth),g=d.top+y-f.top,m=f.top+f.height+-(d.top+d.height-v);n.style.clipPath=`inset(${g}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var F1=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function VM(e){return e.offsetParent!==null}function H1(e){if(!VM(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 ff(e,t,n=100){let r=H1(e);t({isVisible:r});let o=setInterval(()=>{let i=H1(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Oe=w(b());var U1=F1("showTabHint",!0),hl=class e{static version="11.1.1-beta.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new sr(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[b1({broadcast:(f,d,p)=>{this.broadcastEvents.send(f,d,p)},emit:(f,d,p)=>this.emit(f,d,p),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),onUpdateShowTabHint:f=>U1.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ml(n)}),this.store=C1(c),this.broadcastEvents=new d1({debug:!0,deepdeskUrl:u,eventMap:IE(this.store),createCustomChannel:l}),this.store.dispatch(Za(U1.value())),this.store.dispatch(Oc({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(zi(null)),this.store.dispatch(Bn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();nt(r)&&Hx(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Bn())).payload}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Ig({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Dc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Fc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Lg(t))).payload}async postMessages(t){return(await this.store.dispatch(Uc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Hc(t))).payload}resetConversation(){this.store.dispatch(ue()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Yn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Oc(t))}setVisitorInfo(t){this.store.dispatch(yE(t))}async setAgentInfo(t){await this.store.dispatch(Pa(t))}async setAgentSettings(t){await this.store.dispatch(Mg(t))}async getAgentSettings(){return(await this.store.dispatch(_g())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(kd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Vc(t))}notifyKeyDown(t){this.store.dispatch(Bc(t))}notifyPaste(t,n){this.store.dispatch(cE({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(lE(t))}notifyExternalSuggestion(t){this.store.dispatch(Cn(t)),this.store.dispatch(Kn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch($n({label:t,params:n}));if(o)throw new Error(o.message);return r}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Kr({collapse:!1})),this.inputMediator&&this.store.dispatch(rE({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(En([])))}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(uE(eE(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(iE()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(aE()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(ka()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Fr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Fr(-1)),this.store.dispatch(ka()),t.preventDefault()):n||(this.store.dispatch(Kr({collapse:!0})),this.store.dispatch(mb(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(Za(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&p&&p.text.startsWith(d)&&(this.store.dispatch(Cn({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Kn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(dE()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch(m1()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.info("Stop handling time"),this.store.dispatch(af()))}logSendMessage(t){let n=k1("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logHandlingTime(){let t=T1(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(g1())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Kn()),this.store.dispatch(Co(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Cn({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=gl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=gl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Ho(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),V.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(V.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(pE(r.metrics))):V.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!uf(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:p,inputMediator:y,closestScrollSelector:v,appendOverlayTo:g,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:p,isEmbedded:f,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),Ho(t),this.inputMediator=y||(Wr(t)?new Vo(t):new Bo(t)),this.inputMediator.on("change",({plainText:T})=>{this.notifyInputChanged(T)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(fE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",T=>{this.notifyKeyDown(T)}),this.inputMediator.on("paste",({pastedText:T,selectionText:C})=>{this.notifyPaste(T,C)}),this.inputMediator.on("cut",({selectionText:T})=>{this.notifyCut(T)});let S=v&&P1(t,v)||void 0;if(m){let{customStyles:T,appendOverlayTo:C}=n;if(Wr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:T,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Eb,{})})}),k),this.inputMediator.on("caret",L=>{this.store.dispatch(En([])),L?(k.style.display="block",k.style.top=`${L.top}px`,k.style.left=`${L.left}px`):k.style.display="none"});let I=this.overlayContainerFactory("floating-menu",S||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:C},T==null?void 0:T.floatingMenuRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:T,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(db,{onLogIn:()=>this.loginViaPopup().catch(L=>V.warn(L.message))})})}),I)}else{let T=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Qb,{inputElement:t})})}),T),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Lb,{onLogIn:()=>this.loginViaPopup().catch(k=>V.warn(k.message))})})}),C)}(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(sb,{})})}),this.createContainer("deepdesk-overlays"));let x;this.inputMediator.on("selection",T=>{clearTimeout(x),T===null?x=setTimeout(()=>{T!==null&&this.store.dispatch(Og(T))},500):this.store.dispatch(Og(T))}),this.inputMediator.on("disabled",()=>{var T;(T=this.inputMediator)==null||T.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(wh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(wh(!0))),this.store.dispatch(oE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Kn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var T;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((T=this.state.conversation.current)==null?void 0:T.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&V.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(s1,{onLogIn:()=>this.loginViaPopup().catch(s=>V.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Wt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=ff(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){R1(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ya());let t=Vr(this.state);t&&(await this.store.dispatch(qa()),this.store.dispatch(Oc({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=async p=>{var y,v;if((y=p.data)!=null&&y.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((v=p.data)==null?void 0:v.jwt),await this.isLoggedIn(),this.broadcastEvents.send(Aa),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let f=async p=>{var y;if(p.origin===a.origin)switch((y=p.data)==null?void 0:y.type){case"deepdesk-popup-loaded":{try{let v=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(v,a.origin,[o.port2])}catch(v){V.error("Error posting message to popup",v),r(v)}break}case"deepdesk-popup-error":{u(),p.data.message==="Timeout"&&V.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}};window.addEventListener("message",f);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(V.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;V.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=bd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(sn()):this.store.dispatch(ln(r))})}catch(r){this.handleError(r)}}};async function j1(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 z1(e,t,n={}){let r=n.replace?Xr(e,n.replace.start,n.replace.end):ss(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
27
+ `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?Xr(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 KM(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function $M(e){let t=document.createDocumentFragment();return e.split(`
28
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function B1(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:B1(e,t.parentNode)}async function V1(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?KM(t):$M(t);if(n){let c=l.startContainer===e?e.childNodes[l.startOffset]:l.startContainer,f=B1(e,c)??e.firstChild;e.insertBefore(u,(f==null?void 0:f.nextSibling)??null)}else l.insertNode(u),l.collapse(!1)};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function K1(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function $1(e,t,n){await new sr(e).authenticateWithKey(t,n)}async function W1(e){let n=await new fn(e).get("/platform/config/",{version:null,useCache:!0});return J(n)}async function WM(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 q1(e,t){let n=await WM(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 lk(qM);})();
29
29
  /*! Bundled license information:
30
30
 
31
31
  classnames/index.js: