@deepdesk/deepdesk-sdk 11.2.1-beta.8 → 11.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dialogs.css +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.d.mts +73 -30
- package/dist/index.d.ts +73 -30
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +16 -16
- package/input.css +1 -1
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
- package/widget.css +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var hk=Object.create;var Rl=Object.defineProperty;var yk=Object.getOwnPropertyDescriptor;var vk=Object.getOwnPropertyNames;var Sk=Object.getPrototypeOf,wk=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qe=(e,t)=>{for(var n in t)Rl(e,n,{get:t[n],enumerable:!0})},Vy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of vk(t))!wk.call(e,o)&&o!==n&&Rl(e,o,{get:()=>t[o],enumerable:!(r=yk(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?hk(Sk(e)):{},Vy(t||!e||!e.__esModule?Rl(n,"default",{value:e,enumerable:!0}):n,e)),xk=e=>Vy(Rl({},"__esModule",{value:!0}),e);var ee=Ce((g2,Al)=>{"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 Al<"u"&&Al.exports?(n.default=n,Al.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ll=Ce((h2,Wy)=>{"use strict";var Ky=Object.getOwnPropertySymbols,Ek=Object.prototype.hasOwnProperty,Ck=Object.prototype.propertyIsEnumerable;function bk(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Tk(){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}}Wy.exports=Tk()?Object.assign:function(e,t){for(var n,r=bk(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)Ek.call(n,s)&&(r[s]=n[s]);if(Ky){o=Ky(n);for(var a=0;a<o.length;a++)Ck.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var av=Ce(Z=>{"use strict";var kf=Ll(),Yo=60103,qy=60106;Z.Fragment=60107;Z.StrictMode=60108;Z.Profiler=60114;var Yy=60109,Xy=60110,Qy=60112;Z.Suspense=60113;var Zy=60115,Jy=60116;typeof Symbol=="function"&&Symbol.for&&(It=Symbol.for,Yo=It("react.element"),qy=It("react.portal"),Z.Fragment=It("react.fragment"),Z.StrictMode=It("react.strict_mode"),Z.Profiler=It("react.profiler"),Yy=It("react.provider"),Xy=It("react.context"),Qy=It("react.forward_ref"),Z.Suspense=It("react.suspense"),Zy=It("react.memo"),Jy=It("react.lazy"));var It,$y=typeof Symbol=="function"&&Symbol.iterator;function kk(e){return e===null||typeof e!="object"?null:(e=$y&&e[$y]||e["@@iterator"],typeof e=="function"?e:null)}function hs(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 ev={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tv={};function Xo(e,t,n){this.props=e,this.context=t,this.refs=tv,this.updater=n||ev}Xo.prototype.isReactComponent={};Xo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(hs(85));this.updater.enqueueSetState(this,e,t,"setState")};Xo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nv(){}nv.prototype=Xo.prototype;function Pf(e,t,n){this.props=e,this.context=t,this.refs=tv,this.updater=n||ev}var Rf=Pf.prototype=new nv;Rf.constructor=Pf;kf(Rf,Xo.prototype);Rf.isPureReactComponent=!0;var Af={current:null},rv=Object.prototype.hasOwnProperty,ov={key:!0,ref:!0,__self:!0,__source:!0};function iv(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)rv.call(t,r)&&!ov.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:Yo,type:e,key:i,ref:s,props:o,_owner:Af.current}}function Pk(e,t){return{$$typeof:Yo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Yo}function Rk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Gy=/\/+/g;function Tf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rk(""+e.key):t.toString(36)}function Ol(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 Yo:case qy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Tf(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Gy,"$&/")+"/"),Ol(o,t,n,"",function(u){return u})):o!=null&&(Lf(o)&&(o=Pk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Gy,"$&/")+"/")+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+Tf(i,a);s+=Ol(i,t,n,l,o)}else if(l=kk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Tf(i,a++),s+=Ol(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(hs(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Il(e,t,n){if(e==null)return e;var r=[],o=0;return Ol(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Ak(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 sv={current:null};function An(){var e=sv.current;if(e===null)throw Error(hs(321));return e}var Lk={ReactCurrentDispatcher:sv,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Af,IsSomeRendererActing:{current:!1},assign:kf};Z.Children={map:Il,forEach:function(e,t,n){Il(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Il(e,function(){t++}),t},toArray:function(e){return Il(e,function(t){return t})||[]},only:function(e){if(!Lf(e))throw Error(hs(143));return e}};Z.Component=Xo;Z.PureComponent=Pf;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lk;Z.cloneElement=function(e,t,n){if(e==null)throw Error(hs(267,e));var r=kf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Af.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)rv.call(t,l)&&!ov.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:Yo,type:e.type,key:o,ref:i,props:r,_owner:s}};Z.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Xy,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Yy,_context:e},e.Consumer=e};Z.createElement=iv;Z.createFactory=function(e){var t=iv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:Qy,render:e}};Z.isValidElement=Lf;Z.lazy=function(e){return{$$typeof:Jy,_payload:{_status:-1,_result:e},_init:Ak}};Z.memo=function(e,t){return{$$typeof:Zy,type:e,compare:t===void 0?null:t}};Z.useCallback=function(e,t){return An().useCallback(e,t)};Z.useContext=function(e,t){return An().useContext(e,t)};Z.useDebugValue=function(){};Z.useEffect=function(e,t){return An().useEffect(e,t)};Z.useImperativeHandle=function(e,t,n){return An().useImperativeHandle(e,t,n)};Z.useLayoutEffect=function(e,t){return An().useLayoutEffect(e,t)};Z.useMemo=function(e,t){return An().useMemo(e,t)};Z.useReducer=function(e,t,n){return An().useReducer(e,t,n)};Z.useRef=function(e){return An().useRef(e)};Z.useState=function(e){return An().useState(e)};Z.version="17.0.2"});var _=Ce((v2,lv)=>{"use strict";lv.exports=av()});var pv=Ce(vs=>{"use strict";Ll();var Ok=_(),dv=60103;vs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(If=Symbol.for,dv=If("react.element"),vs.Fragment=If("react.fragment"));var If,Nk=Ok.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Mk=Object.prototype.hasOwnProperty,_k={key:!0,ref:!0,__self:!0,__source:!0};function fv(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)Mk.call(t,r)&&!_k.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:dv,type:e,key:i,ref:s,props:o,_owner:Nk.current}}vs.jsx=fv;vs.jsxs=fv});var b=Ce((E2,mv)=>{"use strict";mv.exports=pv()});var Bv=Ce(te=>{"use strict";var ei,xs,Wl,jf;typeof performance=="object"&&typeof performance.now=="function"?(_v=performance,te.unstable_now=function(){return _v.now()}):(_f=Date,Dv=_f.now(),te.unstable_now=function(){return _f.now()-Dv});var _v,_f,Dv;typeof window>"u"||typeof MessageChannel!="function"?(Jo=null,Df=null,Ff=function(){if(Jo!==null)try{var e=te.unstable_now();Jo(!0,e),Jo=null}catch(t){throw setTimeout(Ff,0),t}},ei=function(e){Jo!==null?setTimeout(ei,0,e):(Jo=e,setTimeout(Ff,0))},xs=function(e,t){Df=setTimeout(e,t)},Wl=function(){clearTimeout(Df)},te.unstable_shouldYield=function(){return!1},jf=te.unstable_forceFrameRate=function(){}):(Fv=window.setTimeout,Hv=window.clearTimeout,typeof console<"u"&&(Uv=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 Uv!="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")),Ss=!1,ws=null,zl=-1,Hf=5,Uf=0,te.unstable_shouldYield=function(){return te.unstable_now()>=Uf},jf=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"):Hf=0<e?Math.floor(1e3/e):5},Bf=new MessageChannel,Vl=Bf.port2,Bf.port1.onmessage=function(){if(ws!==null){var e=te.unstable_now();Uf=e+Hf;try{ws(!0,e)?Vl.postMessage(null):(Ss=!1,ws=null)}catch(t){throw Vl.postMessage(null),t}}else Ss=!1},ei=function(e){ws=e,Ss||(Ss=!0,Vl.postMessage(null))},xs=function(e,t){zl=Fv(function(){e(te.unstable_now())},t)},Wl=function(){Hv(zl),zl=-1});var Jo,Df,Ff,Fv,Hv,Uv,Ss,ws,zl,Hf,Uf,Bf,Vl;function zf(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Kl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Xt(e){return e=e[0],e===void 0?null:e}function $l(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>Kl(s,n))l!==void 0&&0>Kl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Kl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Kl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var pn=[],ur=[],iP=1,Nt=null,ze=3,Gl=!1,oo=!1,Es=!1;function Vf(e){for(var t=Xt(ur);t!==null;){if(t.callback===null)$l(ur);else if(t.startTime<=e)$l(ur),t.sortIndex=t.expirationTime,zf(pn,t);else break;t=Xt(ur)}}function Kf(e){if(Es=!1,Vf(e),!oo)if(Xt(pn)!==null)oo=!0,ei(Wf);else{var t=Xt(ur);t!==null&&xs(Kf,t.startTime-e)}}function Wf(e,t){oo=!1,Es&&(Es=!1,Wl()),Gl=!0;var n=ze;try{for(Vf(t),Nt=Xt(pn);Nt!==null&&(!(Nt.expirationTime>t)||e&&!te.unstable_shouldYield());){var r=Nt.callback;if(typeof r=="function"){Nt.callback=null,ze=Nt.priorityLevel;var o=r(Nt.expirationTime<=t);t=te.unstable_now(),typeof o=="function"?Nt.callback=o:Nt===Xt(pn)&&$l(pn),Vf(t)}else $l(pn);Nt=Xt(pn)}if(Nt!==null)var i=!0;else{var s=Xt(ur);s!==null&&xs(Kf,s.startTime-t),i=!1}return i}finally{Nt=null,ze=n,Gl=!1}}var sP=jf;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(){oo||Gl||(oo=!0,ei(Wf))};te.unstable_getCurrentPriorityLevel=function(){return ze};te.unstable_getFirstCallbackNode=function(){return Xt(pn)};te.unstable_next=function(e){switch(ze){case 1:case 2:case 3:var t=3;break;default:t=ze}var n=ze;ze=t;try{return e()}finally{ze=n}};te.unstable_pauseExecution=function(){};te.unstable_requestPaint=sP;te.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=ze;ze=e;try{return t()}finally{ze=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:iP++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,zf(ur,e),Xt(pn)===null&&e===Xt(ur)&&(Es?Wl():Es=!0,xs(Kf,n-r))):(e.sortIndex=o,zf(pn,e),oo||Gl||(oo=!0,ei(Wf))),e};te.unstable_wrapCallback=function(e){var t=ze;return function(){var n=ze;ze=t;try{return e.apply(this,arguments)}finally{ze=n}}}});var zv=Ce((m_,jv)=>{"use strict";jv.exports=Bv()});var Rw=Ce(Ut=>{"use strict";var Bu=_(),ye=Ll(),Oe=zv();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(!Bu)throw Error(P(227));var tS=new Set,Zs={};function ho(e,t){xi(e,t),xi(e+"Capture",t)}function xi(e,t){for(Zs[e]=t,e=0;e<t.length;e++)tS.add(t[e])}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),aP=/^[: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]*$/,Vv=Object.prototype.hasOwnProperty,Kv={},Wv={};function lP(e){return Vv.call(Wv,e)?!0:Vv.call(Kv,e)?!1:aP.test(e)?Wv[e]=!0:(Kv[e]=!0,!1)}function uP(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 cP(e,t,n,r){if(t===null||typeof t>"u"||uP(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 et(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 De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new et(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){De[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var em=/[\-:]([a-z])/g;function tm(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(em,tm);De[t]=new et(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(em,tm);De[t]=new et(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(em,tm);De[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function nm(e,t,n,r){var o=De.hasOwnProperty(t)?De[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||(cP(t,n,o,r)&&(n=null),r||o===null?lP(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 yo=Bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_s=60103,so=60106,dr=60107,rm=60108,Bs=60114,om=60109,im=60110,ju=60112,js=60113,yu=60120,zu=60115,sm=60116,am=60121,lm=60128,nS=60129,um=60130,mp=60131;typeof Symbol=="function"&&Symbol.for&&(ke=Symbol.for,_s=ke("react.element"),so=ke("react.portal"),dr=ke("react.fragment"),rm=ke("react.strict_mode"),Bs=ke("react.profiler"),om=ke("react.provider"),im=ke("react.context"),ju=ke("react.forward_ref"),js=ke("react.suspense"),yu=ke("react.suspense_list"),zu=ke("react.memo"),sm=ke("react.lazy"),am=ke("react.block"),ke("react.scope"),lm=ke("react.opaque.id"),nS=ke("react.debug_trace_mode"),um=ke("react.offscreen"),mp=ke("react.legacy_hidden"));var ke,$v=typeof Symbol=="function"&&Symbol.iterator;function Cs(e){return e===null||typeof e!="object"?null:(e=$v&&e[$v]||e["@@iterator"],typeof e=="function"?e:null)}var $f;function Ds(e){if($f===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$f=t&&t[1]||""}return`
|
|
2
|
-
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var Ek=Object.create;var Ll=Object.defineProperty;var Ck=Object.getOwnPropertyDescriptor;var bk=Object.getOwnPropertyNames;var Tk=Object.getPrototypeOf,kk=Object.prototype.hasOwnProperty;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var n in t)Ll(e,n,{get:t[n],enumerable:!0})},Yy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of bk(t))!kk.call(e,o)&&o!==n&&Ll(e,o,{get:()=>t[o],enumerable:!(r=Ck(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?Ek(Tk(e)):{},Yy(t||!e||!e.__esModule?Ll(n,"default",{value:e,enumerable:!0}):n,e)),Pk=e=>Yy(Ll({},"__esModule",{value:!0}),e);var ee=Ce((T2,Il)=>{"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 Il<"u"&&Il.exports?(n.default=n,Il.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Nl=Ce((k2,Qy)=>{"use strict";var Xy=Object.getOwnPropertySymbols,Rk=Object.prototype.hasOwnProperty,Ak=Object.prototype.propertyIsEnumerable;function Lk(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Ik(){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}}Qy.exports=Ik()?Object.assign:function(e,t){for(var n,r=Lk(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)Rk.call(n,s)&&(r[s]=n[s]);if(Xy){o=Xy(n);for(var a=0;a<o.length;a++)Ak.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var pv=Ce(Z=>{"use strict";var Lf=Nl(),Qo=60103,ev=60106;Z.Fragment=60107;Z.StrictMode=60108;Z.Profiler=60114;var tv=60109,nv=60110,rv=60112;Z.Suspense=60113;var ov=60115,iv=60116;typeof Symbol=="function"&&Symbol.for&&(It=Symbol.for,Qo=It("react.element"),ev=It("react.portal"),Z.Fragment=It("react.fragment"),Z.StrictMode=It("react.strict_mode"),Z.Profiler=It("react.profiler"),tv=It("react.provider"),nv=It("react.context"),rv=It("react.forward_ref"),Z.Suspense=It("react.suspense"),ov=It("react.memo"),iv=It("react.lazy"));var It,Zy=typeof Symbol=="function"&&Symbol.iterator;function Nk(e){return e===null||typeof e!="object"?null:(e=Zy&&e[Zy]||e["@@iterator"],typeof e=="function"?e:null)}function vs(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 sv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},av={};function Zo(e,t,n){this.props=e,this.context=t,this.refs=av,this.updater=n||sv}Zo.prototype.isReactComponent={};Zo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(vs(85));this.updater.enqueueSetState(this,e,t,"setState")};Zo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lv(){}lv.prototype=Zo.prototype;function If(e,t,n){this.props=e,this.context=t,this.refs=av,this.updater=n||sv}var Nf=If.prototype=new lv;Nf.constructor=If;Lf(Nf,Zo.prototype);Nf.isPureReactComponent=!0;var Of={current:null},uv=Object.prototype.hasOwnProperty,cv={key:!0,ref:!0,__self:!0,__source:!0};function dv(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)uv.call(t,r)&&!cv.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:Qo,type:e,key:i,ref:s,props:o,_owner:Of.current}}function Ok(e,t){return{$$typeof:Qo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Mf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qo}function Mk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Jy=/\/+/g;function Af(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Mk(""+e.key):t.toString(36)}function Ml(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 Qo:case ev:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Af(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Jy,"$&/")+"/"),Ml(o,t,n,"",function(u){return u})):o!=null&&(Mf(o)&&(o=Ok(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Jy,"$&/")+"/")+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+Af(i,a);s+=Ml(i,t,n,l,o)}else if(l=Nk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Af(i,a++),s+=Ml(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(vs(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ol(e,t,n){if(e==null)return e;var r=[],o=0;return Ml(e,r,"","",function(i){return t.call(n,i,o++)}),r}function _k(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 fv={current:null};function Ln(){var e=fv.current;if(e===null)throw Error(vs(321));return e}var Dk={ReactCurrentDispatcher:fv,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Of,IsSomeRendererActing:{current:!1},assign:Lf};Z.Children={map:Ol,forEach:function(e,t,n){Ol(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ol(e,function(){t++}),t},toArray:function(e){return Ol(e,function(t){return t})||[]},only:function(e){if(!Mf(e))throw Error(vs(143));return e}};Z.Component=Zo;Z.PureComponent=If;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dk;Z.cloneElement=function(e,t,n){if(e==null)throw Error(vs(267,e));var r=Lf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Of.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)uv.call(t,l)&&!cv.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:Qo,type:e.type,key:o,ref:i,props:r,_owner:s}};Z.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:nv,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:tv,_context:e},e.Consumer=e};Z.createElement=dv;Z.createFactory=function(e){var t=dv.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:rv,render:e}};Z.isValidElement=Mf;Z.lazy=function(e){return{$$typeof:iv,_payload:{_status:-1,_result:e},_init:_k}};Z.memo=function(e,t){return{$$typeof:ov,type:e,compare:t===void 0?null:t}};Z.useCallback=function(e,t){return Ln().useCallback(e,t)};Z.useContext=function(e,t){return Ln().useContext(e,t)};Z.useDebugValue=function(){};Z.useEffect=function(e,t){return Ln().useEffect(e,t)};Z.useImperativeHandle=function(e,t,n){return Ln().useImperativeHandle(e,t,n)};Z.useLayoutEffect=function(e,t){return Ln().useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Ln().useMemo(e,t)};Z.useReducer=function(e,t,n){return Ln().useReducer(e,t,n)};Z.useRef=function(e){return Ln().useRef(e)};Z.useState=function(e){return Ln().useState(e)};Z.version="17.0.2"});var _=Ce((R2,mv)=>{"use strict";mv.exports=pv()});var Sv=Ce(ws=>{"use strict";Nl();var Hk=_(),yv=60103;ws.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(_f=Symbol.for,yv=_f("react.element"),ws.Fragment=_f("react.fragment"));var _f,Uk=Hk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bk=Object.prototype.hasOwnProperty,jk={key:!0,ref:!0,__self:!0,__source:!0};function vv(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)Bk.call(t,r)&&!jk.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:yv,type:e,key:i,ref:s,props:o,_owner:Uk.current}}ws.jsx=vv;ws.jsxs=vv});var b=Ce((N2,wv)=>{"use strict";wv.exports=Sv()});var $v=Ce(ne=>{"use strict";var ni,Cs,Gl,Wf;typeof performance=="object"&&typeof performance.now=="function"?(jv=performance,ne.unstable_now=function(){return jv.now()}):(Uf=Date,zv=Uf.now(),ne.unstable_now=function(){return Uf.now()-zv});var jv,Uf,zv;typeof window>"u"||typeof MessageChannel!="function"?(ti=null,Bf=null,jf=function(){if(ti!==null)try{var e=ne.unstable_now();ti(!0,e),ti=null}catch(t){throw setTimeout(jf,0),t}},ni=function(e){ti!==null?setTimeout(ni,0,e):(ti=e,setTimeout(jf,0))},Cs=function(e,t){Bf=setTimeout(e,t)},Gl=function(){clearTimeout(Bf)},ne.unstable_shouldYield=function(){return!1},Wf=ne.unstable_forceFrameRate=function(){}):(Vv=window.setTimeout,Kv=window.clearTimeout,typeof console<"u"&&(Wv=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 Wv!="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")),xs=!1,Es=null,Kl=-1,zf=5,Vf=0,ne.unstable_shouldYield=function(){return ne.unstable_now()>=Vf},Wf=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"):zf=0<e?Math.floor(1e3/e):5},Kf=new MessageChannel,Wl=Kf.port2,Kf.port1.onmessage=function(){if(Es!==null){var e=ne.unstable_now();Vf=e+zf;try{Es(!0,e)?Wl.postMessage(null):(xs=!1,Es=null)}catch(t){throw Wl.postMessage(null),t}}else xs=!1},ni=function(e){Es=e,xs||(xs=!0,Wl.postMessage(null))},Cs=function(e,t){Kl=Vv(function(){e(ne.unstable_now())},t)},Gl=function(){Kv(Kl),Kl=-1});var ti,Bf,jf,Vv,Kv,Wv,xs,Es,Kl,zf,Vf,Kf,Wl;function $f(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<$l(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Xt(e){return e=e[0],e===void 0?null:e}function ql(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>$l(s,n))l!==void 0&&0>$l(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>$l(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function $l(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var pn=[],cr=[],dP=1,Ot=null,Ve=3,Yl=!1,io=!1,bs=!1;function Gf(e){for(var t=Xt(cr);t!==null;){if(t.callback===null)ql(cr);else if(t.startTime<=e)ql(cr),t.sortIndex=t.expirationTime,$f(pn,t);else break;t=Xt(cr)}}function qf(e){if(bs=!1,Gf(e),!io)if(Xt(pn)!==null)io=!0,ni(Yf);else{var t=Xt(cr);t!==null&&Cs(qf,t.startTime-e)}}function Yf(e,t){io=!1,bs&&(bs=!1,Gl()),Yl=!0;var n=Ve;try{for(Gf(t),Ot=Xt(pn);Ot!==null&&(!(Ot.expirationTime>t)||e&&!ne.unstable_shouldYield());){var r=Ot.callback;if(typeof r=="function"){Ot.callback=null,Ve=Ot.priorityLevel;var o=r(Ot.expirationTime<=t);t=ne.unstable_now(),typeof o=="function"?Ot.callback=o:Ot===Xt(pn)&&ql(pn),Gf(t)}else ql(pn);Ot=Xt(pn)}if(Ot!==null)var i=!0;else{var s=Xt(cr);s!==null&&Cs(qf,s.startTime-t),i=!1}return i}finally{Ot=null,Ve=n,Yl=!1}}var fP=Wf;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(){io||Yl||(io=!0,ni(Yf))};ne.unstable_getCurrentPriorityLevel=function(){return Ve};ne.unstable_getFirstCallbackNode=function(){return Xt(pn)};ne.unstable_next=function(e){switch(Ve){case 1:case 2:case 3:var t=3;break;default:t=Ve}var n=Ve;Ve=t;try{return e()}finally{Ve=n}};ne.unstable_pauseExecution=function(){};ne.unstable_requestPaint=fP;ne.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ve;Ve=e;try{return t()}finally{Ve=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:dP++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,$f(cr,e),Xt(pn)===null&&e===Xt(cr)&&(bs?Gl():bs=!0,Cs(qf,n-r))):(e.sortIndex=o,$f(pn,e),io||Yl||(io=!0,ni(Yf))),e};ne.unstable_wrapCallback=function(e){var t=Ve;return function(){var n=Ve;Ve=t;try{return e.apply(this,arguments)}finally{Ve=n}}}});var qv=Ce((b_,Gv)=>{"use strict";Gv.exports=$v()});var Mw=Ce(Ut=>{"use strict";var zu=_(),ye=Nl(),Ne=qv();function R(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(!zu)throw Error(R(227));var aS=new Set,ea={};function yo(e,t){Ci(e,t),Ci(e+"Capture",t)}function Ci(e,t){for(ea[e]=t,e=0;e<t.length;e++)aS.add(t[e])}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pP=/^[: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]*$/,Yv=Object.prototype.hasOwnProperty,Xv={},Qv={};function mP(e){return Yv.call(Qv,e)?!0:Yv.call(Xv,e)?!1:pP.test(e)?Qv[e]=!0:(Xv[e]=!0,!1)}function gP(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 hP(e,t,n,r){if(t===null||typeof t>"u"||gP(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 et(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 De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new et(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){De[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var om=/[\-:]([a-z])/g;function im(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(om,im);De[t]=new et(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(om,im);De[t]=new et(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(om,im);De[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function sm(e,t,n,r){var o=De.hasOwnProperty(t)?De[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||(hP(t,n,o,r)&&(n=null),r||o===null?mP(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 vo=zu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Fs=60103,ao=60106,fr=60107,am=60108,zs=60114,lm=60109,um=60110,Vu=60112,Vs=60113,Su=60120,Ku=60115,cm=60116,dm=60121,fm=60128,lS=60129,pm=60130,vp=60131;typeof Symbol=="function"&&Symbol.for&&(ke=Symbol.for,Fs=ke("react.element"),ao=ke("react.portal"),fr=ke("react.fragment"),am=ke("react.strict_mode"),zs=ke("react.profiler"),lm=ke("react.provider"),um=ke("react.context"),Vu=ke("react.forward_ref"),Vs=ke("react.suspense"),Su=ke("react.suspense_list"),Ku=ke("react.memo"),cm=ke("react.lazy"),dm=ke("react.block"),ke("react.scope"),fm=ke("react.opaque.id"),lS=ke("react.debug_trace_mode"),pm=ke("react.offscreen"),vp=ke("react.legacy_hidden"));var ke,Zv=typeof Symbol=="function"&&Symbol.iterator;function Ts(e){return e===null||typeof e!="object"?null:(e=Zv&&e[Zv]||e["@@iterator"],typeof e=="function"?e:null)}var Xf;function Hs(e){if(Xf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xf=t&&t[1]||""}return`
|
|
2
|
+
`+Xf+e}var Qf=!1;function Xl(e,t){if(!e||Qf)return"";Qf=!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{Gf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ds(e):""}function dP(e){switch(e.tag){case 5:return Ds(e.type);case 16:return Ds("Lazy");case 13:return Ds("Suspense");case 19:return Ds("SuspenseList");case 0:case 2:case 15:return e=ql(e.type,!1),e;case 11:return e=ql(e.type.render,!1),e;case 22:return e=ql(e.type._render,!1),e;case 1:return e=ql(e.type,!0),e;default:return""}}function di(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 dr:return"Fragment";case so:return"Portal";case Bs:return"Profiler";case rm:return"StrictMode";case js:return"Suspense";case yu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case im:return(e.displayName||"Context")+".Consumer";case om:return(e._context.displayName||"Context")+".Provider";case ju:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case zu:return di(e.type);case am:return di(e._render);case sm:t=e._payload,e=e._init;try{return di(e(t))}catch{}}return null}function Cr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function rS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fP(e){var t=rS(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 Yl(e){e._valueTracker||(e._valueTracker=fP(e))}function oS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=rS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vu(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 gp(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cr(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 iS(e,t){t=t.checked,t!=null&&nm(e,"checked",t,!1)}function hp(e,t){iS(e,t);var n=Cr(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")?yp(e,t.type,n):t.hasOwnProperty("defaultValue")&&yp(e,t.type,Cr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qv(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 yp(e,t,n){(t!=="number"||vu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function pP(e){var t="";return Bu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function vp(e,t){return e=ye({children:void 0},t),(t=pP(t.children))&&(e.children=t),e}function fi(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=""+Cr(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 Sp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yv(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:Cr(n)}}function sS(e,t){var n=Cr(t.value),r=Cr(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 Xv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var wp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function aS(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 xp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?aS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xl,lS=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!==wp.svg||"innerHTML"in e)e.innerHTML=t;else{for(Xl=Xl||document.createElement("div"),Xl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Js(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},mP=["Webkit","ms","Moz","O"];Object.keys(zs).forEach(function(e){mP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zs[t]=zs[e]})});function uS(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 cS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var gP=ye({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 Ep(e,t){if(t){if(gP[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 Cp(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 cm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bp=null,pi=null,mi=null;function Qv(e){if(e=pa(e)){if(typeof bp!="function")throw Error(P(280));var t=e.stateNode;t&&(t=qu(t),bp(e.stateNode,e.type,t))}}function dS(e){pi?mi?mi.push(e):mi=[e]:pi=e}function fS(){if(pi){var e=pi,t=mi;if(mi=pi=null,Qv(e),t)for(e=0;e<t.length;e++)Qv(t[e])}}function dm(e,t){return e(t)}function pS(e,t,n,r,o){return e(t,n,r,o)}function fm(){}var mS=dm,ao=!1,qf=!1;function pm(){(pi!==null||mi!==null)&&(fm(),fS())}function hP(e,t,n){if(qf)return e(t,n);qf=!0;try{return mS(e,t,n)}finally{qf=!1,pm()}}function ea(e,t){var n=e.stateNode;if(n===null)return null;var r=qu(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 Tp=!1;if(Fn)try{ti={},Object.defineProperty(ti,"passive",{get:function(){Tp=!0}}),window.addEventListener("test",ti,ti),window.removeEventListener("test",ti,ti)}catch{Tp=!1}var ti;function yP(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 Vs=!1,Su=null,wu=!1,kp=null,vP={onError:function(e){Vs=!0,Su=e}};function SP(e,t,n,r,o,i,s,a,l){Vs=!1,Su=null,yP.apply(vP,arguments)}function wP(e,t,n,r,o,i,s,a,l){if(SP.apply(this,arguments),Vs){if(Vs){var u=Su;Vs=!1,Su=null}else throw Error(P(198));wu||(wu=!0,kp=u)}}function vo(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 gS(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(vo(e)!==e)throw Error(P(188))}function xP(e){var t=e.alternate;if(!t){if(t=vo(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 hS(e){if(e=xP(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 Jv(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var yS,mm,vS,SS,Pp=!1,mn=[],gr=null,hr=null,yr=null,ta=new Map,na=new Map,bs=[],e0="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 Rp(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function t0(e,t){switch(e){case"focusin":case"focusout":gr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":yr=null;break;case"pointerover":case"pointerout":ta.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":na.delete(t.pointerId)}}function Ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Rp(t,n,r,o,i),t!==null&&(t=pa(t),t!==null&&mm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function EP(e,t,n,r,o){switch(t){case"focusin":return gr=Ts(gr,e,t,n,r,o),!0;case"dragenter":return hr=Ts(hr,e,t,n,r,o),!0;case"mouseover":return yr=Ts(yr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ta.set(i,Ts(ta.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,na.set(i,Ts(na.get(i)||null,e,t,n,r,o)),!0}return!1}function CP(e){var t=lo(e.target);if(t!==null){var n=vo(t);if(n!==null){if(t=n.tag,t===13){if(t=gS(n),t!==null){e.blockedOn=t,SS(e.lanePriority,function(){Oe.unstable_runWithPriority(e.priority,function(){vS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function au(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=vm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=pa(n),t!==null&&mm(t),e.blockedOn=n,!1;t.shift()}return!0}function n0(e,t,n){au(e)&&n.delete(t)}function bP(){for(Pp=!1;0<mn.length;){var e=mn[0];if(e.blockedOn!==null){e=pa(e.blockedOn),e!==null&&yS(e);break}for(var t=e.targetContainers;0<t.length;){var n=vm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&mn.shift()}gr!==null&&au(gr)&&(gr=null),hr!==null&&au(hr)&&(hr=null),yr!==null&&au(yr)&&(yr=null),ta.forEach(n0),na.forEach(n0)}function ks(e,t){e.blockedOn===t&&(e.blockedOn=null,Pp||(Pp=!0,Oe.unstable_scheduleCallback(Oe.unstable_NormalPriority,bP)))}function wS(e){function t(o){return ks(o,e)}if(0<mn.length){ks(mn[0],e);for(var n=1;n<mn.length;n++){var r=mn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gr!==null&&ks(gr,e),hr!==null&&ks(hr,e),yr!==null&&ks(yr,e),ta.forEach(t),na.forEach(t),n=0;n<bs.length;n++)r=bs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<bs.length&&(n=bs[0],n.blockedOn===null);)CP(n),n.blockedOn===null&&bs.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 ii={animationend:Ql("Animation","AnimationEnd"),animationiteration:Ql("Animation","AnimationIteration"),animationstart:Ql("Animation","AnimationStart"),transitionend:Ql("Transition","TransitionEnd")},Yf={},xS={};Fn&&(xS=document.createElement("div").style,"AnimationEvent"in window||(delete ii.animationend.animation,delete ii.animationiteration.animation,delete ii.animationstart.animation),"TransitionEvent"in window||delete ii.transitionend.transition);function Vu(e){if(Yf[e])return Yf[e];if(!ii[e])return e;var t=ii[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in xS)return Yf[e]=t[n];return e}var ES=Vu("animationend"),CS=Vu("animationiteration"),bS=Vu("animationstart"),TS=Vu("transitionend"),kS=new Map,gm=new Map,TP=["abort","abort",ES,"animationEnd",CS,"animationIteration",bS,"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",TS,"transitionEnd","waiting","waiting"];function hm(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)),gm.set(r,t),kS.set(r,o),ho(o,[r])}}var kP=Oe.unstable_now;kP();var de=8;function ri(e){if(1&e)return de=15,1;if(2&e)return de=14,2;if(4&e)return de=13,4;var t=24&e;return t!==0?(de=12,t):e&32?(de=11,32):(t=192&e,t!==0?(de=10,t):e&256?(de=9,256):(t=3584&e,t!==0?(de=8,t):e&4096?(de=7,4096):(t=4186112&e,t!==0?(de=6,t):(t=62914560&e,t!==0?(de=5,t):e&67108864?(de=4,67108864):e&134217728?(de=3,134217728):(t=805306368&e,t!==0?(de=2,t):1073741824&e?(de=1,1073741824):(de=8,e))))))}function PP(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 RP(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 ra(e,t){var n=e.pendingLanes;if(n===0)return de=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=de=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ri(l),o=de):(a&=i,a!==0&&(r=ri(a),o=de))}else i=n&~s,i!==0?(r=ri(i),o=de):a!==0&&(r=ri(a),o=de);if(r===0)return 0;if(r=31-br(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(ri(t),o<=de)return t;de=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-br(t),o=1<<n,r|=e[n],t&=~o;return r}function PS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function xu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=oi(24&~t),e===0?xu(10,t):e;case 10:return e=oi(192&~t),e===0?xu(8,t):e;case 8:return e=oi(3584&~t),e===0&&(e=oi(4186112&~t),e===0&&(e=512)),e;case 2:return t=oi(805306368&~t),t===0&&(t=268435456),t}throw Error(P(358,e))}function oi(e){return e&-e}function Xf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ku(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-br(t),e[t]=n}var br=Math.clz32?Math.clz32:IP,AP=Math.log,LP=Math.LN2;function IP(e){return e===0?32:31-(AP(e)/LP|0)|0}var OP=Oe.unstable_UserBlockingPriority,NP=Oe.unstable_runWithPriority,lu=!0;function MP(e,t,n,r){ao||fm();var o=ym,i=ao;ao=!0;try{pS(o,e,t,n,r)}finally{(ao=i)||pm()}}function _P(e,t,n,r){NP(OP,ym.bind(null,e,t,n,r))}function ym(e,t,n,r){if(lu){var o;if((o=(t&4)===0)&&0<mn.length&&-1<e0.indexOf(e))e=Rp(null,e,t,n,r),mn.push(e);else{var i=vm(e,t,n,r);if(i===null)o&&t0(e,r);else{if(o){if(-1<e0.indexOf(e)){e=Rp(i,e,t,n,r),mn.push(e);return}if(EP(i,e,t,n,r))return;t0(e,r)}BS(e,t,r,null,n)}}}}function vm(e,t,n,r){var o=cm(r);if(o=lo(o),o!==null){var i=vo(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=gS(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 BS(e,t,r,o,n),null}var fr=null,Sm=null,uu=null;function RS(){if(uu)return uu;var e,t=Sm,n=t.length,r,o="value"in fr?fr.value:fr.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 uu=o.slice(e,1<r?1-r:void 0)}function cu(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 Zl(){return!0}function r0(){return!1}function yt(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)?Zl:r0,this.isPropagationStopped=r0,this}return ye(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=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wm=yt(Ti),fa=ye({},Ti,{view:0,detail:0}),DP=yt(fa),Qf,Zf,Ps,Wu=ye({},fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xm,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!==Ps&&(Ps&&e.type==="mousemove"?(Qf=e.screenX-Ps.screenX,Zf=e.screenY-Ps.screenY):Zf=Qf=0,Ps=e),Qf)},movementY:function(e){return"movementY"in e?e.movementY:Zf}}),o0=yt(Wu),FP=ye({},Wu,{dataTransfer:0}),HP=yt(FP),UP=ye({},fa,{relatedTarget:0}),Jf=yt(UP),BP=ye({},Ti,{animationName:0,elapsedTime:0,pseudoElement:0}),jP=yt(BP),zP=ye({},Ti,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),VP=yt(zP),KP=ye({},Ti,{data:0}),i0=yt(KP),WP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$P={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"},GP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=GP[e])?!!t[e]:!1}function xm(){return qP}var YP=ye({},fa,{key:function(e){if(e.key){var t=WP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$P[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xm,charCode:function(e){return e.type==="keypress"?cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),XP=yt(YP),QP=ye({},Wu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),s0=yt(QP),ZP=ye({},fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xm}),JP=yt(ZP),eR=ye({},Ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),tR=yt(eR),nR=ye({},Wu,{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}),rR=yt(nR),oR=[9,13,27,32],Em=Fn&&"CompositionEvent"in window,Ks=null;Fn&&"documentMode"in document&&(Ks=document.documentMode);var iR=Fn&&"TextEvent"in window&&!Ks,AS=Fn&&(!Em||Ks&&8<Ks&&11>=Ks),a0=String.fromCharCode(32),l0=!1;function LS(e,t){switch(e){case"keyup":return oR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function sR(e,t){switch(e){case"compositionend":return IS(t);case"keypress":return t.which!==32?null:(l0=!0,a0);case"textInput":return e=t.data,e===a0&&l0?null:e;default:return null}}function aR(e,t){if(si)return e==="compositionend"||!Em&&LS(e,t)?(e=RS(),uu=Sm=fr=null,si=!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 AS&&t.locale!=="ko"?null:t.data;default:return null}}var lR={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 u0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!lR[e.type]:t==="textarea"}function OS(e,t,n,r){dS(r),t=Eu(t,"onChange"),0<t.length&&(n=new wm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ws=null,oa=null;function uR(e){FS(e,0)}function $u(e){var t=li(e);if(oS(t))return e}function cR(e,t){if(e==="change")return t}var NS=!1;Fn&&(Fn?(eu="oninput"in document,eu||(ep=document.createElement("div"),ep.setAttribute("oninput","return;"),eu=typeof ep.oninput=="function"),Jl=eu):Jl=!1,NS=Jl&&(!document.documentMode||9<document.documentMode));var Jl,eu,ep;function c0(){Ws&&(Ws.detachEvent("onpropertychange",MS),oa=Ws=null)}function MS(e){if(e.propertyName==="value"&&$u(oa)){var t=[];if(OS(t,oa,e,cm(e)),e=uR,ao)e(t);else{ao=!0;try{dm(e,t)}finally{ao=!1,pm()}}}}function dR(e,t,n){e==="focusin"?(c0(),Ws=t,oa=n,Ws.attachEvent("onpropertychange",MS)):e==="focusout"&&c0()}function fR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $u(oa)}function pR(e,t){if(e==="click")return $u(t)}function mR(e,t){if(e==="input"||e==="change")return $u(t)}function gR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:gR,hR=Object.prototype.hasOwnProperty;function ia(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(!hR.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function d0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function f0(e,t){var n=d0(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=d0(n)}}function _S(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_S(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function p0(){for(var e=window,t=vu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vu(e.document)}return t}function Ap(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 yR=Fn&&"documentMode"in document&&11>=document.documentMode,ai=null,Lp=null,$s=null,Ip=!1;function m0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ip||ai==null||ai!==vu(r)||(r=ai,"selectionStart"in r&&Ap(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&&ia($s,r)||($s=r,r=Eu(Lp,"onSelect"),0<r.length&&(t=new wm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ai)))}hm("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);hm("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);hm(TP,2);for(tp="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),tu=0;tu<tp.length;tu++)gm.set(tp[tu],0);var tp,tu;xi("onMouseEnter",["mouseout","mouseover"]);xi("onMouseLeave",["mouseout","mouseover"]);xi("onPointerEnter",["pointerout","pointerover"]);xi("onPointerLeave",["pointerout","pointerover"]);ho("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ho("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ho("onBeforeInput",["compositionend","keypress","textInput","paste"]);ho("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ho("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ho("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),DS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fs));function g0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,wP(r,t,void 0,e),e.currentTarget=null}function FS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;g0(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;g0(o,a,u),i=l}}}if(wu)throw e=kp,wu=!1,kp=null,e}function pe(e,t){var n=zS(t),r=e+"__bubble";n.has(r)||(US(t,e,2,!1),n.add(r))}var h0="_reactListening"+Math.random().toString(36).slice(2);function HS(e){e[h0]||(e[h0]=!0,tS.forEach(function(t){DS.has(t)||y0(t,!1,e,null),y0(t,!0,e,null)}))}function y0(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&DS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=zS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),US(i,e,o,t),s.add(a))}function US(e,t,n,r){var o=gm.get(t);switch(o===void 0?2:o){case 0:o=MP;break;case 1:o=_P;break;default:o=ym}n=o.bind(null,t,n,e),o=void 0,!Tp||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 BS(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=lo(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}hP(function(){var u=i,c=cm(n),f=[];e:{var d=kS.get(e);if(d!==void 0){var m=wm,y=e;switch(e){case"keypress":if(cu(n)===0)break e;case"keydown":case"keyup":m=XP;break;case"focusin":y="focus",m=Jf;break;case"focusout":y="blur",m=Jf;break;case"beforeblur":case"afterblur":m=Jf;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":m=o0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=HP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=JP;break;case ES:case CS:case bS:m=jP;break;case TS:m=tR;break;case"scroll":m=DP;break;case"wheel":m=rR;break;case"copy":case"cut":case"paste":m=VP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=s0}var v=(t&4)!==0,p=!v&&e==="scroll",g=v?d!==null?d+"Capture":null:d;v=[];for(var h=u,w;h!==null;){w=h;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,g!==null&&(x=ea(h,g),x!=null&&v.push(sa(h,x,w)))),p)break;h=h.return}0<v.length&&(d=new m(d,y,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(lo(y)||y[ki]))break e;if((m||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=u,y=y?lo(y):null,y!==null&&(p=vo(y),y!==p||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=u),m!==y)){if(v=o0,x="onMouseLeave",g="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=s0,x="onPointerLeave",g="onPointerEnter",h="pointer"),p=m==null?d:li(m),w=y==null?d:li(y),d=new v(x,h+"leave",m,n,c),d.target=p,d.relatedTarget=w,x=null,lo(c)===u&&(v=new v(g,h+"enter",y,n,c),v.target=w,v.relatedTarget=p,x=v),p=x,m&&y)t:{for(v=m,g=y,h=0,w=v;w;w=ni(w))h++;for(w=0,x=g;x;x=ni(x))w++;for(;0<h-w;)v=ni(v),h--;for(;0<w-h;)g=ni(g),w--;for(;h--;){if(v===g||g!==null&&v===g.alternate)break t;v=ni(v),g=ni(g)}v=null}else v=null;m!==null&&v0(f,d,m,v,!1),y!==null&&p!==null&&v0(f,p,y,v,!0)}}e:{if(d=u?li(u):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var T=cR;else if(u0(d))if(NS)T=mR;else{T=fR;var C=dR}else(m=d.nodeName)&&m.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=pR);if(T&&(T=T(e,u))){OS(f,T,n,c);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&yp(d,"number",d.value)}switch(C=u?li(u):window,e){case"focusin":(u0(C)||C.contentEditable==="true")&&(ai=C,Lp=u,$s=null);break;case"focusout":$s=Lp=ai=null;break;case"mousedown":Ip=!0;break;case"contextmenu":case"mouseup":case"dragend":Ip=!1,m0(f,n,c);break;case"selectionchange":if(yR)break;case"keydown":case"keyup":m0(f,n,c)}var k;if(Em)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else si?LS(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(AS&&n.locale!=="ko"&&(si||L!=="onCompositionStart"?L==="onCompositionEnd"&&si&&(k=RS()):(fr=c,Sm="value"in fr?fr.value:fr.textContent,si=!0)),C=Eu(u,L),0<C.length&&(L=new i0(L,e,null,n,c),f.push({event:L,listeners:C}),k?L.data=k:(k=IS(n),k!==null&&(L.data=k)))),(k=iR?sR(e,n):aR(e,n))&&(u=Eu(u,"onBeforeInput"),0<u.length&&(c=new i0("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}FS(f,t)})}function sa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Eu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ea(e,n),i!=null&&r.unshift(sa(e,i,o)),i=ea(e,t),i!=null&&r.push(sa(e,i,o))),e=e.return}return r}function ni(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function v0(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=ea(n,i),l!=null&&s.unshift(sa(n,l,a))):o||(l=ea(n,i),l!=null&&s.push(sa(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Cu(){}var np=null,rp=null;function jS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Op(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 S0=typeof setTimeout=="function"?setTimeout:void 0,vR=typeof clearTimeout=="function"?clearTimeout:void 0;function Cm(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function gi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function w0(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 op=0;function SR(e){return{$$typeof:lm,toString:e,valueOf:e}}var Gu=Math.random().toString(36).slice(2),pr="__reactFiber$"+Gu,bu="__reactProps$"+Gu,ki="__reactContainer$"+Gu,x0="__reactEvents$"+Gu;function lo(e){var t=e[pr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ki]||n[pr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=w0(e);e!==null;){if(n=e[pr])return n;e=w0(e)}return t}e=n,n=e.parentNode}return null}function pa(e){return e=e[pr]||e[ki],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function li(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function qu(e){return e[bu]||null}function zS(e){var t=e[x0];return t===void 0&&(t=e[x0]=new Set),t}var Np=[],ui=-1;function Rr(e){return{current:e}}function me(e){0>ui||(e.current=Np[ui],Np[ui]=null,ui--)}function Ee(e,t){ui++,Np[ui]=e.current,e.current=t}var Tr={},$e=Rr(Tr),dt=Rr(!1),po=Tr;function Ei(e,t){var n=e.type.contextTypes;if(!n)return Tr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ft(e){return e=e.childContextTypes,e!=null}function Tu(){me(dt),me($e)}function E0(e,t,n){if($e.current!==Tr)throw Error(P(168));Ee($e,t),Ee(dt,n)}function VS(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(P(108,di(t)||"Unknown",o));return ye({},n,r)}function du(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Tr,po=$e.current,Ee($e,e),Ee(dt,dt.current),!0}function C0(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=VS(e,t,po),r.__reactInternalMemoizedMergedChildContext=e,me(dt),me($e),Ee($e,e)):me(dt),Ee(dt,n)}var bm=null,fo=null,wR=Oe.unstable_runWithPriority,Tm=Oe.unstable_scheduleCallback,Mp=Oe.unstable_cancelCallback,xR=Oe.unstable_shouldYield,b0=Oe.unstable_requestPaint,_p=Oe.unstable_now,ER=Oe.unstable_getCurrentPriorityLevel,Yu=Oe.unstable_ImmediatePriority,KS=Oe.unstable_UserBlockingPriority,WS=Oe.unstable_NormalPriority,$S=Oe.unstable_LowPriority,GS=Oe.unstable_IdlePriority,ip={},CR=b0!==void 0?b0:function(){},On=null,fu=null,sp=!1,T0=_p(),Ke=1e4>T0?_p:function(){return _p()-T0};function Ci(){switch(ER()){case Yu:return 99;case KS:return 98;case WS:return 97;case $S:return 96;case GS:return 95;default:throw Error(P(332))}}function qS(e){switch(e){case 99:return Yu;case 98:return KS;case 97:return WS;case 96:return $S;case 95:return GS;default:throw Error(P(332))}}function mo(e,t){return e=qS(e),wR(e,t)}function aa(e,t,n){return e=qS(e),Tm(e,t,n)}function Sn(){if(fu!==null){var e=fu;fu=null,Mp(e)}YS()}function YS(){if(!sp&&On!==null){sp=!0;var e=0;try{var t=On;mo(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),On=null}catch(n){throw On!==null&&(On=On.slice(e+1)),Tm(Yu,Sn),n}finally{sp=!1}}}var bR=yo.ReactCurrentBatchConfig;function Qt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ku=Rr(null),Pu=null,ci=null,Ru=null;function km(){Ru=ci=Pu=null}function Pm(e){var t=ku.current;me(ku),e.type._context._currentValue=t}function XS(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 hi(e,t){Pu=e,Ru=ci=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zt=!0),e.firstContext=null)}function Ft(e,t){if(Ru!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Ru=e,t=1073741823),t={context:e,observedBits:t,next:null},ci===null){if(Pu===null)throw Error(P(308));ci=t,Pu.dependencies={lanes:0,firstContext:t,responders:null}}else ci=ci.next=t;return e._currentValue}var cr=!1;function Rm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function QS(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 vr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Sr(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 k0(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 la(e,t,n,r){var o=e.updateQueue;cr=!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 m=e,y=i;switch(a=t,d=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){f=m.call(d,f,a);break e}f=m;break e;case 3:m.flags=m.flags&-4097|64;case 0:if(m=y.payload,a=typeof m=="function"?m.call(d,f,a):m,a==null)break e;f=ye({},f,a);break e;case 2:cr=!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,ga|=s,e.lanes=s,e.memoizedState=f}}function P0(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 ZS=new Bu.Component().refs;function Au(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xu={isMounted:function(e){return(e=e._reactInternals)?vo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ht(),o=wr(e),i=vr(r,o);i.payload=t,n!=null&&(i.callback=n),Sr(e,i),xr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ht(),o=wr(e),i=vr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Sr(e,i),xr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ht(),r=wr(e),o=vr(n,r);o.tag=2,t!=null&&(o.callback=t),Sr(e,o),xr(e,r,n)}};function R0(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?!ia(n,r)||!ia(o,i):!0}function JS(e,t,n){var r=!1,o=Tr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(o=ft(t)?po:$e.current,r=t.contextTypes,i=(r=r!=null)?Ei(e,o):Tr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function A0(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&&Xu.enqueueReplaceState(t,t.state,null)}function Dp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ZS,Rm(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ft(i):(i=ft(t)?po:$e.current,o.context=Ei(e,i)),la(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Au(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&&Xu.enqueueReplaceState(o,o.state,null),la(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var nu=Array.isArray;function Rs(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===ZS&&(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 ru(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 ew(e){function t(p,g){if(e){var h=p.lastEffect;h!==null?(h.nextEffect=g,p.lastEffect=g):p.firstEffect=p.lastEffect=g,g.nextEffect=null,g.flags=8}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function o(p,g){return p=Pr(p,g),p.index=0,p.sibling=null,p}function i(p,g,h){return p.index=h,e?(h=p.alternate,h!==null?(h=h.index,h<g?(p.flags=2,g):h):(p.flags=2,g)):g}function s(p){return e&&p.alternate===null&&(p.flags=2),p}function a(p,g,h,w){return g===null||g.tag!==6?(g=dp(h,p.mode,w),g.return=p,g):(g=o(g,h),g.return=p,g)}function l(p,g,h,w){return g!==null&&g.elementType===h.type?(w=o(g,h.props),w.ref=Rs(p,g,h),w.return=p,w):(w=hu(h.type,h.key,h.props,null,p.mode,w),w.ref=Rs(p,g,h),w.return=p,w)}function u(p,g,h,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==h.containerInfo||g.stateNode.implementation!==h.implementation?(g=fp(h,p.mode,w),g.return=p,g):(g=o(g,h.children||[]),g.return=p,g)}function c(p,g,h,w,x){return g===null||g.tag!==7?(g=wi(h,p.mode,w,x),g.return=p,g):(g=o(g,h),g.return=p,g)}function f(p,g,h){if(typeof g=="string"||typeof g=="number")return g=dp(""+g,p.mode,h),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case _s:return h=hu(g.type,g.key,g.props,null,p.mode,h),h.ref=Rs(p,null,g),h.return=p,h;case so:return g=fp(g,p.mode,h),g.return=p,g}if(nu(g)||Cs(g))return g=wi(g,p.mode,h,null),g.return=p,g;ru(p,g)}return null}function d(p,g,h,w){var x=g!==null?g.key:null;if(typeof h=="string"||typeof h=="number")return x!==null?null:a(p,g,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case _s:return h.key===x?h.type===dr?c(p,g,h.props.children,w,x):l(p,g,h,w):null;case so:return h.key===x?u(p,g,h,w):null}if(nu(h)||Cs(h))return x!==null?null:c(p,g,h,w,null);ru(p,h)}return null}function m(p,g,h,w,x){if(typeof w=="string"||typeof w=="number")return p=p.get(h)||null,a(g,p,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _s:return p=p.get(w.key===null?h:w.key)||null,w.type===dr?c(g,p,w.props.children,x,w.key):l(g,p,w,x);case so:return p=p.get(w.key===null?h:w.key)||null,u(g,p,w,x)}if(nu(w)||Cs(w))return p=p.get(h)||null,c(g,p,w,x,null);ru(g,w)}return null}function y(p,g,h,w){for(var x=null,T=null,C=g,k=g=0,L=null;C!==null&&k<h.length;k++){C.index>k?(L=C,C=null):L=C.sibling;var I=d(p,C,h[k],w);if(I===null){C===null&&(C=L);break}e&&C&&I.alternate===null&&t(p,C),g=i(I,g,k),T===null?x=I:T.sibling=I,T=I,C=L}if(k===h.length)return n(p,C),x;if(C===null){for(;k<h.length;k++)C=f(p,h[k],w),C!==null&&(g=i(C,g,k),T===null?x=C:T.sibling=C,T=C);return x}for(C=r(p,C);k<h.length;k++)L=m(C,p,k,h[k],w),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?k:L.key),g=i(L,g,k),T===null?x=L:T.sibling=L,T=L);return e&&C.forEach(function(N){return t(p,N)}),x}function v(p,g,h,w){var x=Cs(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=g,k=g=0,L=null,I=h.next();C!==null&&!I.done;k++,I=h.next()){C.index>k?(L=C,C=null):L=C.sibling;var N=d(p,C,I.value,w);if(N===null){C===null&&(C=L);break}e&&C&&N.alternate===null&&t(p,C),g=i(N,g,k),T===null?x=N:T.sibling=N,T=N,C=L}if(I.done)return n(p,C),x;if(C===null){for(;!I.done;k++,I=h.next())I=f(p,I.value,w),I!==null&&(g=i(I,g,k),T===null?x=I:T.sibling=I,T=I);return x}for(C=r(p,C);!I.done;k++,I=h.next())I=m(C,p,k,I.value,w),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?k:I.key),g=i(I,g,k),T===null?x=I:T.sibling=I,T=I);return e&&C.forEach(function(V){return t(p,V)}),x}return function(p,g,h,w){var x=typeof h=="object"&&h!==null&&h.type===dr&&h.key===null;x&&(h=h.props.children);var T=typeof h=="object"&&h!==null;if(T)switch(h.$$typeof){case _s:e:{for(T=h.key,x=g;x!==null;){if(x.key===T){switch(x.tag){case 7:if(h.type===dr){n(p,x.sibling),g=o(x,h.props.children),g.return=p,p=g;break e}break;default:if(x.elementType===h.type){n(p,x.sibling),g=o(x,h.props),g.ref=Rs(p,x,h),g.return=p,p=g;break e}}n(p,x);break}else t(p,x);x=x.sibling}h.type===dr?(g=wi(h.props.children,p.mode,w,h.key),g.return=p,p=g):(w=hu(h.type,h.key,h.props,null,p.mode,w),w.ref=Rs(p,g,h),w.return=p,p=w)}return s(p);case so:e:{for(x=h.key;g!==null;){if(g.key===x)if(g.tag===4&&g.stateNode.containerInfo===h.containerInfo&&g.stateNode.implementation===h.implementation){n(p,g.sibling),g=o(g,h.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=fp(h,p.mode,w),g.return=p,p=g}return s(p)}if(typeof h=="string"||typeof h=="number")return h=""+h,g!==null&&g.tag===6?(n(p,g.sibling),g=o(g,h),g.return=p,p=g):(n(p,g),g=dp(h,p.mode,w),g.return=p,p=g),s(p);if(nu(h))return y(p,g,h,w);if(Cs(h))return v(p,g,h,w);if(T&&ru(p,h),typeof h>"u"&&!x)switch(p.tag){case 1:case 22:case 0:case 11:case 15:throw Error(P(152,di(p.type)||"Component"))}return n(p,g)}}var Lu=ew(!0),tw=ew(!1),ma={},yn=Rr(ma),ua=Rr(ma),ca=Rr(ma);function uo(e){if(e===ma)throw Error(P(174));return e}function Fp(e,t){switch(Ee(ca,t),Ee(ua,e),Ee(yn,ma),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xp(t,e)}me(yn),Ee(yn,t)}function bi(){me(yn),me(ua),me(ca)}function L0(e){uo(ca.current);var t=uo(yn.current),n=xp(t,e.type);t!==n&&(Ee(ua,e),Ee(yn,n))}function Am(e){ua.current===e&&(me(yn),me(ua))}var xe=Rr(0);function Iu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mn=null,mr=null,vn=!1;function nw(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 I0(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 Hp(e){if(vn){var t=mr;if(t){var n=t;if(!I0(e,t)){if(t=gi(n.nextSibling),!t||!I0(e,t)){e.flags=e.flags&-1025|2,vn=!1,Mn=e;return}nw(Mn,n)}Mn=e,mr=gi(t.firstChild)}else e.flags=e.flags&-1025|2,vn=!1,Mn=e}}function O0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function ou(e){if(e!==Mn)return!1;if(!vn)return O0(e),vn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Op(t,e.memoizedProps))for(t=mr;t;)nw(e,t),t=gi(t.nextSibling);if(O0(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){mr=gi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}mr=null}}else mr=Mn?gi(e.stateNode.nextSibling):null;return!0}function ap(){mr=Mn=null,vn=!1}var yi=[];function Lm(){for(var e=0;e<yi.length;e++)yi[e]._workInProgressVersionPrimary=null;yi.length=0}var Gs=yo.ReactCurrentDispatcher,Dt=yo.ReactCurrentBatchConfig,da=0,be=null,Ve=null,Me=null,Ou=!1,qs=!1;function ut(){throw Error(P(321))}function Im(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 Om(e,t,n,r,o,i){if(da=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gs.current=e===null||e.memoizedState===null?kR:PR,e=n(r,o),qs){i=0;do{if(qs=!1,!(25>i))throw Error(P(301));i+=1,Me=Ve=null,t.updateQueue=null,Gs.current=RR,e=n(r,o)}while(qs)}if(Gs.current=Du,t=Ve!==null&&Ve.next!==null,da=0,Me=Ve=be=null,Ou=!1,t)throw Error(P(300));return e}function co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?be.memoizedState=Me=e:Me=Me.next=e,Me}function So(){if(Ve===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ve.next;var t=Me===null?be.memoizedState:Me.next;if(t!==null)Me=t,Ve=e;else{if(e===null)throw Error(P(310));Ve=e,e={memoizedState:Ve.memoizedState,baseState:Ve.baseState,baseQueue:Ve.baseQueue,queue:Ve.queue,next:null},Me===null?be.memoizedState=Me=e:Me=Me.next=e}return Me}function gn(e,t){return typeof t=="function"?t(e):t}function As(e){var t=So(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=Ve,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((da&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,be.lanes|=u,ga|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Zt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ls(e){var t=So(),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)||(Zt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function N0(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=(da&e)===e)&&(t._workInProgressVersionPrimary=r,yi.push(t))),e)return n(t._source);throw yi.push(t),Error(P(350))}function rw(e,t,n,r){var o=Je;if(o===null)throw Error(P(349));var i=t._getVersion,s=i(t._source),a=Gs.current,l=a.useState(function(){return N0(o,t,n)}),u=l[1],c=l[0];l=Me;var f=e.memoizedState,d=f.refs,m=d.getSnapshot,y=f.source;f=f.subscribe;var v=be;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var p=i(t._source);if(!Mt(s,p)){p=n(t._source),Mt(c,p)||(u(p),p=wr(v),o.mutableReadLanes|=p&o.pendingLanes),p=o.mutableReadLanes,o.entangledLanes|=p;for(var g=o.entanglements,h=p;0<h;){var w=31-br(h),x=1<<w;g[w]|=p,h&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var p=d.getSnapshot,g=d.setSnapshot;try{g(p(t._source));var h=wr(v);o.mutableReadLanes|=h&o.pendingLanes}catch(w){g(function(){throw w})}})},[t,r]),Mt(m,n)&&Mt(y,t)&&Mt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:gn,lastRenderedState:c},e.dispatch=u=_m.bind(null,be,e),l.queue=e,l.baseQueue=null,c=N0(o,t,n),l.memoizedState=l.baseState=c),c}function ow(e,t,n){var r=So();return rw(r,e,t,n)}function Is(e){var t=co();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:gn,lastRenderedState:e},e=e.dispatch=_m.bind(null,be,e),[t.memoizedState,e]}function Nu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null},be.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 M0(e){var t=co();return e={current:e},t.memoizedState=e}function Mu(){return So().memoizedState}function Up(e,t,n,r){var o=co();be.flags|=e,o.memoizedState=Nu(1|t,n,void 0,r===void 0?null:r)}function Nm(e,t,n,r){var o=So();r=r===void 0?null:r;var i=void 0;if(Ve!==null){var s=Ve.memoizedState;if(i=s.destroy,r!==null&&Im(r,s.deps)){Nu(t,n,i,r);return}}be.flags|=e,o.memoizedState=Nu(1|t,n,i,r)}function _0(e,t){return Up(516,4,e,t)}function _u(e,t){return Nm(516,4,e,t)}function iw(e,t){return Nm(4,2,e,t)}function sw(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 aw(e,t,n){return n=n!=null?n.concat([e]):null,Nm(4,2,sw.bind(null,t,e),n)}function Mm(){}function lw(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Im(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function uw(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Im(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function TR(e,t){var n=Ci();mo(98>n?98:n,function(){e(!0)}),mo(97<n?97:n,function(){var r=Dt.transition;Dt.transition=1;try{e(!1),t()}finally{Dt.transition=r}})}function _m(e,t,n){var r=ht(),o=wr(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===be||s!==null&&s===be)qs=Ou=!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{}xr(e,o,r)}}var Du={readContext:Ft,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useOpaqueIdentifier:ut,unstable_isNewReconciler:!1},kR={readContext:Ft,useCallback:function(e,t){return co().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:_0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Up(4,2,sw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Up(4,2,e,t)},useMemo:function(e,t){var n=co();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=co();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=_m.bind(null,be,e),[r.memoizedState,e]},useRef:M0,useState:Is,useDebugValue:Mm,useDeferredValue:function(e){var t=Is(e),n=t[0],r=t[1];return _0(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=TR.bind(null,e[1]),M0(e),[e,t]},useMutableSource:function(e,t,n){var r=co();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},rw(r,e,t,n)},useOpaqueIdentifier:function(){if(vn){var e=!1,t=SR(function(){throw e||(e=!0,n("r:"+(op++).toString(36))),Error(P(355))}),n=Is(t)[1];return!(be.mode&2)&&(be.flags|=516,Nu(5,function(){n("r:"+(op++).toString(36))},void 0,null)),t}return t="r:"+(op++).toString(36),Is(t),t},unstable_isNewReconciler:!1},PR={readContext:Ft,useCallback:lw,useContext:Ft,useEffect:_u,useImperativeHandle:aw,useLayoutEffect:iw,useMemo:uw,useReducer:As,useRef:Mu,useState:function(){return As(gn)},useDebugValue:Mm,useDeferredValue:function(e){var t=As(gn),n=t[0],r=t[1];return _u(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=As(gn)[0];return[Mu().current,e]},useMutableSource:ow,useOpaqueIdentifier:function(){return As(gn)[0]},unstable_isNewReconciler:!1},RR={readContext:Ft,useCallback:lw,useContext:Ft,useEffect:_u,useImperativeHandle:aw,useLayoutEffect:iw,useMemo:uw,useReducer:Ls,useRef:Mu,useState:function(){return Ls(gn)},useDebugValue:Mm,useDeferredValue:function(e){var t=Ls(gn),n=t[0],r=t[1];return _u(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Ls(gn)[0];return[Mu().current,e]},useMutableSource:ow,useOpaqueIdentifier:function(){return Ls(gn)[0]},unstable_isNewReconciler:!1},AR=yo.ReactCurrentOwner,Zt=!1;function ct(e,t,n,r){t.child=e===null?tw(t,null,n,r):Lu(t,e.child,n,r)}function D0(e,t,n,r,o){n=n.render;var i=t.ref;return hi(t,o),r=Om(e,t,n,r,i,o),e!==null&&!Zt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,_n(e,t,o)):(t.flags|=1,ct(e,t,r,o),t.child)}function F0(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!jm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,cw(e,t,s,r,o,i)):(e=hu(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:ia,n(o,r)&&e.ref===t.ref)?_n(e,t,i):(t.flags|=1,e=Pr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function cw(e,t,n,r,o,i){if(e!==null&&ia(e.memoizedProps,r)&&e.ref===t.ref)if(Zt=!1,(i&o)!==0)e.flags&16384&&(Zt=!0);else return t.lanes=e.lanes,_n(e,t,i);return Bp(e,t,n,r,i)}function lp(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},su(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},su(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},su(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,su(t,r);return ct(e,t,o,n),t.child}function dw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Bp(e,t,n,r,o){var i=ft(n)?po:$e.current;return i=Ei(t,i),hi(t,o),n=Om(e,t,n,r,i,o),e!==null&&!Zt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,_n(e,t,o)):(t.flags|=1,ct(e,t,n,o),t.child)}function H0(e,t,n,r,o){if(ft(n)){var i=!0;du(t)}else i=!1;if(hi(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),JS(t,n,r),Dp(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=ft(n)?po:$e.current,u=Ei(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)&&A0(t,s,r,u),cr=!1;var d=t.memoizedState;s.state=d,la(t,r,s,o),l=t.memoizedState,a!==r||d!==l||dt.current||cr?(typeof c=="function"&&(Au(t,n,c,r),l=t.memoizedState),(a=cr||R0(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,QS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Qt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=ft(n)?po:$e.current,l=Ei(t,l));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&A0(t,s,r,l),cr=!1,d=t.memoizedState,s.state=d,la(t,r,s,o);var y=t.memoizedState;a!==f||d!==y||dt.current||cr?(typeof m=="function"&&(Au(t,n,m,r),y=t.memoizedState),(u=cr||R0(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 jp(e,t,n,r,i,o)}function jp(e,t,n,r,o,i){dw(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&C0(t,n,!1),_n(e,t,i);r=t.stateNode,AR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Lu(t,e.child,null,i),t.child=Lu(t,null,a,i)):ct(e,t,a,i),t.memoizedState=r.state,o&&C0(t,n,!0),t.child}function U0(e){var t=e.stateNode;t.pendingContext?E0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&E0(e,t.context,!1),Fp(e,t.containerInfo)}var iu={dehydrated:null,retryLane:0};function B0(e,t,n){var r=t.pendingProps,o=xe.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),Ee(xe,o&1),e===null?(r.fallback!==void 0&&Hp(t),e=r.children,o=r.fallback,i?(e=j0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=iu,e):typeof r.unstable_expectedLoadTime=="number"?(e=j0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=iu,t.lanes=33554432,e):(n=zm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=V0(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=iu,r):(n=z0(e,t,r.children,n),t.memoizedState=null,n):i?(r=V0(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=iu,r):(n=z0(e,t,r.children,n),t.memoizedState=null,n)}function j0(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=zm(t,o,0,null),n=wi(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function z0(e,t,n,r){var o=e.child;return e=o.sibling,n=Pr(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 V0(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=Pr(s,a),e!==null?r=Pr(e,r):(r=wi(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function K0(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),XS(e.return,t)}function up(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 W0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ct(e,t,r.children,n),r=xe.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&&K0(e,n);else if(e.tag===19)K0(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(Ee(xe,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&&Iu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),up(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&&Iu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}up(t,!0,n,null,i,t.lastEffect);break;case"together":up(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function _n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ga|=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=Pr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var fw,zp,pw,mw;fw=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}};zp=function(){};pw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,uo(yn.current);var i=null;switch(n){case"input":o=gp(e,o),r=gp(e,r),i=[];break;case"option":o=vp(e,o),r=vp(e,r),i=[];break;case"select":o=ye({},o,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":o=Sp(e,o),r=Sp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cu)}Ep(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"&&(Zs.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"&&(Zs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===lm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};mw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Os(e,t){if(!vn)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 LR(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 ft(t.type)&&Tu(),null;case 3:return bi(),me(dt),me($e),Lm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ou(t)?t.flags|=4:r.hydrate||(t.flags|=256)),zp(t),null;case 5:Am(t);var o=uo(ca.current);if(n=t.type,e!==null&&t.stateNode!=null)pw(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=uo(yn.current),ou(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[pr]=t,r[bu]=i,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(e=0;e<Fs.length;e++)pe(Fs[e],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Gv(r,i),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},pe("invalid",r);break;case"textarea":Yv(r,i),pe("invalid",r)}Ep(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]):Zs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&pe("scroll",r));switch(n){case"input":Yl(r),qv(r,i,!0);break;case"textarea":Yl(r),Xv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Cu)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===wp.html&&(e=aS(n)),e===wp.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[pr]=t,e[bu]=r,fw(e,t,!1,!1),t.stateNode=e,s=Cp(n,r),n){case"dialog":pe("cancel",e),pe("close",e),o=r;break;case"iframe":case"object":case"embed":pe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Fs.length;o++)pe(Fs[o],e);o=r;break;case"source":pe("error",e),o=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),o=r;break;case"details":pe("toggle",e),o=r;break;case"input":Gv(e,r),o=gp(e,r),pe("invalid",e);break;case"option":o=vp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ye({},r,{value:void 0}),pe("invalid",e);break;case"textarea":Yv(e,r),o=Sp(e,r),pe("invalid",e);break;default:o=r}Ep(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?cS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&lS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Js(e,l):typeof l=="number"&&Js(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Zs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&pe("scroll",e):l!=null&&nm(e,i,l,s))}switch(n){case"input":Yl(e),qv(e,r,!1);break;case"textarea":Yl(e),Xv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Cr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?fi(e,!!r.multiple,i,!1):r.defaultValue!=null&&fi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Cu)}jS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)mw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));n=uo(ca.current),uo(yn.current),ou(t)?(r=t.stateNode,n=t.memoizedProps,r[pr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[pr]=t,t.stateNode=r)}return null;case 13:return me(xe),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&ou(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||xe.current&1?_e===0&&(_e=3):((_e===0||_e===3)&&(_e=4),Je===null||!(ga&134217727)&&!(Ri&134217727)||vi(Je,We))),(r||n)&&(t.flags|=4),null);case 4:return bi(),zp(t),e===null&&HS(t.stateNode.containerInfo),null;case 10:return Pm(t),null;case 17:return ft(t.type)&&Tu(),null;case 19:if(me(xe),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Os(r,!1);else{if(_e!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Iu(e),s!==null){for(t.flags|=64,Os(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 Ee(xe,xe.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ke()>qp&&(t.flags|=64,i=!0,Os(r,!1),t.lanes=33554432)}else{if(!i)if(e=Iu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Os(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!vn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ke()-r.renderingStartTime>qp&&n!==1073741824&&(t.flags|=64,i=!0,Os(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=Ke(),n.sibling=null,t=xe.current,Ee(xe,i?t&1|2:t&1),n):null;case 23:case 24:return Bm(),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 IR(e){switch(e.tag){case 1:ft(e.type)&&Tu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(bi(),me(dt),me($e),Lm(),t=e.flags,t&64)throw Error(P(285));return e.flags=t&-4097|64,e;case 5:return Am(e),null;case 13:return me(xe),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return me(xe),null;case 4:return bi(),null;case 10:return Pm(e),null;case 23:case 24:return Bm(),null;default:return null}}function Dm(e,t){try{var n="",r=t;do n+=dP(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{Qf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hs(e):""}function yP(e){switch(e.tag){case 5:return Hs(e.type);case 16:return Hs("Lazy");case 13:return Hs("Suspense");case 19:return Hs("SuspenseList");case 0:case 2:case 15:return e=Xl(e.type,!1),e;case 11:return e=Xl(e.type.render,!1),e;case 22:return e=Xl(e.type._render,!1),e;case 1:return e=Xl(e.type,!0),e;default:return""}}function pi(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 ao:return"Portal";case zs:return"Profiler";case am:return"StrictMode";case Vs:return"Suspense";case Su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case um:return(e.displayName||"Context")+".Consumer";case lm:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Ku:return pi(e.type);case dm:return pi(e._render);case cm:t=e._payload,e=e._init;try{return pi(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 uS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vP(e){var t=uS(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 Ql(e){e._valueTracker||(e._valueTracker=vP(e))}function cS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=uS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wu(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 Sp(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jv(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 dS(e,t){t=t.checked,t!=null&&sm(e,"checked",t,!1)}function wp(e,t){dS(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")?xp(e,t.type,n):t.hasOwnProperty("defaultValue")&&xp(e,t.type,br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function e0(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 xp(e,t,n){(t!=="number"||wu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function SP(e){var t="";return zu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Ep(e,t){return e=ye({children:void 0},t),(t=SP(t.children))&&(e.children=t),e}function mi(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 Cp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(R(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function t0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(R(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(R(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:br(n)}}function fS(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 n0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var bp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function pS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Tp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zl,mS=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!==bp.svg||"innerHTML"in e)e.innerHTML=t;else{for(Zl=Zl||document.createElement("div"),Zl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ta(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ks={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},wP=["Webkit","ms","Moz","O"];Object.keys(Ks).forEach(function(e){wP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ks[t]=Ks[e]})});function gS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ks.hasOwnProperty(e)&&Ks[e]?(""+t).trim():t+"px"}function hS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=gS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var xP=ye({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kp(e,t){if(t){if(xP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Pp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function mm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rp=null,gi=null,hi=null;function r0(e){if(e=ga(e)){if(typeof Rp!="function")throw Error(R(280));var t=e.stateNode;t&&(t=Xu(t),Rp(e.stateNode,e.type,t))}}function yS(e){gi?hi?hi.push(e):hi=[e]:gi=e}function vS(){if(gi){var e=gi,t=hi;if(hi=gi=null,r0(e),t)for(e=0;e<t.length;e++)r0(t[e])}}function gm(e,t){return e(t)}function SS(e,t,n,r,o){return e(t,n,r,o)}function hm(){}var wS=gm,lo=!1,Zf=!1;function ym(){(gi!==null||hi!==null)&&(hm(),vS())}function EP(e,t,n){if(Zf)return e(t,n);Zf=!0;try{return wS(e,t,n)}finally{Zf=!1,ym()}}function na(e,t){var n=e.stateNode;if(n===null)return null;var r=Xu(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(R(231,t,typeof n));return n}var Ap=!1;if(Hn)try{ri={},Object.defineProperty(ri,"passive",{get:function(){Ap=!0}}),window.addEventListener("test",ri,ri),window.removeEventListener("test",ri,ri)}catch{Ap=!1}var ri;function CP(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 Ws=!1,xu=null,Eu=!1,Lp=null,bP={onError:function(e){Ws=!0,xu=e}};function TP(e,t,n,r,o,i,s,a,l){Ws=!1,xu=null,CP.apply(bP,arguments)}function kP(e,t,n,r,o,i,s,a,l){if(TP.apply(this,arguments),Ws){if(Ws){var u=xu;Ws=!1,xu=null}else throw Error(R(198));Eu||(Eu=!0,Lp=u)}}function So(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 xS(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 o0(e){if(So(e)!==e)throw Error(R(188))}function PP(e){var t=e.alternate;if(!t){if(t=So(e),t===null)throw Error(R(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 o0(o),e;if(i===r)return o0(o),t;i=i.sibling}throw Error(R(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(R(189))}}if(n.alternate!==r)throw Error(R(190))}if(n.tag!==3)throw Error(R(188));return n.stateNode.current===n?e:t}function ES(e){if(e=PP(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 i0(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var CS,vm,bS,TS,Ip=!1,mn=[],hr=null,yr=null,vr=null,ra=new Map,oa=new Map,ks=[],s0="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 Np(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function a0(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":ra.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oa.delete(t.pointerId)}}function Ps(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Np(t,n,r,o,i),t!==null&&(t=ga(t),t!==null&&vm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function RP(e,t,n,r,o){switch(t){case"focusin":return hr=Ps(hr,e,t,n,r,o),!0;case"dragenter":return yr=Ps(yr,e,t,n,r,o),!0;case"mouseover":return vr=Ps(vr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ra.set(i,Ps(ra.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,oa.set(i,Ps(oa.get(i)||null,e,t,n,r,o)),!0}return!1}function AP(e){var t=uo(e.target);if(t!==null){var n=So(t);if(n!==null){if(t=n.tag,t===13){if(t=xS(n),t!==null){e.blockedOn=t,TS(e.lanePriority,function(){Ne.unstable_runWithPriority(e.priority,function(){bS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Em(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=ga(n),t!==null&&vm(t),e.blockedOn=n,!1;t.shift()}return!0}function l0(e,t,n){uu(e)&&n.delete(t)}function LP(){for(Ip=!1;0<mn.length;){var e=mn[0];if(e.blockedOn!==null){e=ga(e.blockedOn),e!==null&&CS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Em(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&mn.shift()}hr!==null&&uu(hr)&&(hr=null),yr!==null&&uu(yr)&&(yr=null),vr!==null&&uu(vr)&&(vr=null),ra.forEach(l0),oa.forEach(l0)}function Rs(e,t){e.blockedOn===t&&(e.blockedOn=null,Ip||(Ip=!0,Ne.unstable_scheduleCallback(Ne.unstable_NormalPriority,LP)))}function kS(e){function t(o){return Rs(o,e)}if(0<mn.length){Rs(mn[0],e);for(var n=1;n<mn.length;n++){var r=mn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hr!==null&&Rs(hr,e),yr!==null&&Rs(yr,e),vr!==null&&Rs(vr,e),ra.forEach(t),oa.forEach(t),n=0;n<ks.length;n++)r=ks[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ks.length&&(n=ks[0],n.blockedOn===null);)AP(n),n.blockedOn===null&&ks.shift()}function Jl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ai={animationend:Jl("Animation","AnimationEnd"),animationiteration:Jl("Animation","AnimationIteration"),animationstart:Jl("Animation","AnimationStart"),transitionend:Jl("Transition","TransitionEnd")},Jf={},PS={};Hn&&(PS=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function Wu(e){if(Jf[e])return Jf[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in PS)return Jf[e]=t[n];return e}var RS=Wu("animationend"),AS=Wu("animationiteration"),LS=Wu("animationstart"),IS=Wu("transitionend"),NS=new Map,Sm=new Map,IP=["abort","abort",RS,"animationEnd",AS,"animationIteration",LS,"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",IS,"transitionEnd","waiting","waiting"];function wm(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)),Sm.set(r,t),NS.set(r,o),yo(o,[r])}}var NP=Ne.unstable_now;NP();var de=8;function ii(e){if(1&e)return de=15,1;if(2&e)return de=14,2;if(4&e)return de=13,4;var t=24&e;return t!==0?(de=12,t):e&32?(de=11,32):(t=192&e,t!==0?(de=10,t):e&256?(de=9,256):(t=3584&e,t!==0?(de=8,t):e&4096?(de=7,4096):(t=4186112&e,t!==0?(de=6,t):(t=62914560&e,t!==0?(de=5,t):e&67108864?(de=4,67108864):e&134217728?(de=3,134217728):(t=805306368&e,t!==0?(de=2,t):1073741824&e?(de=1,1073741824):(de=8,e))))))}function OP(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 MP(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(R(358,e))}}function ia(e,t){var n=e.pendingLanes;if(n===0)return de=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=de=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=ii(l),o=de):(a&=i,a!==0&&(r=ii(a),o=de))}else i=n&~s,i!==0?(r=ii(i),o=de):a!==0&&(r=ii(a),o=de);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(ii(t),o<=de)return t;de=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 OS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Cu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=si(24&~t),e===0?Cu(10,t):e;case 10:return e=si(192&~t),e===0?Cu(8,t):e;case 8:return e=si(3584&~t),e===0&&(e=si(4186112&~t),e===0&&(e=512)),e;case 2:return t=si(805306368&~t),t===0&&(t=268435456),t}throw Error(R(358,e))}function si(e){return e&-e}function ep(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $u(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:FP,_P=Math.log,DP=Math.LN2;function FP(e){return e===0?32:31-(_P(e)/DP|0)|0}var HP=Ne.unstable_UserBlockingPriority,UP=Ne.unstable_runWithPriority,cu=!0;function BP(e,t,n,r){lo||hm();var o=xm,i=lo;lo=!0;try{SS(o,e,t,n,r)}finally{(lo=i)||ym()}}function jP(e,t,n,r){UP(HP,xm.bind(null,e,t,n,r))}function xm(e,t,n,r){if(cu){var o;if((o=(t&4)===0)&&0<mn.length&&-1<s0.indexOf(e))e=Np(null,e,t,n,r),mn.push(e);else{var i=Em(e,t,n,r);if(i===null)o&&a0(e,r);else{if(o){if(-1<s0.indexOf(e)){e=Np(i,e,t,n,r),mn.push(e);return}if(RP(i,e,t,n,r))return;a0(e,r)}$S(e,t,r,null,n)}}}}function Em(e,t,n,r){var o=mm(r);if(o=uo(o),o!==null){var i=So(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=xS(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 $S(e,t,r,o,n),null}var pr=null,Cm=null,du=null;function MS(){if(du)return du;var e,t=Cm,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 du=o.slice(e,1<r?1-r:void 0)}function fu(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 eu(){return!0}function u0(){return!1}function vt(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)?eu:u0,this.isPropagationStopped=u0,this}return ye(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=eu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=eu)},persist:function(){},isPersistent:eu}),t}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bm=vt(Pi),ma=ye({},Pi,{view:0,detail:0}),zP=vt(ma),tp,np,As,Gu=ye({},ma,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tm,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!==As&&(As&&e.type==="mousemove"?(tp=e.screenX-As.screenX,np=e.screenY-As.screenY):np=tp=0,As=e),tp)},movementY:function(e){return"movementY"in e?e.movementY:np}}),c0=vt(Gu),VP=ye({},Gu,{dataTransfer:0}),KP=vt(VP),WP=ye({},ma,{relatedTarget:0}),rp=vt(WP),$P=ye({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),GP=vt($P),qP=ye({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),YP=vt(qP),XP=ye({},Pi,{data:0}),d0=vt(XP),QP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ZP={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"},JP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JP[e])?!!t[e]:!1}function Tm(){return eR}var tR=ye({},ma,{key:function(e){if(e.key){var t=QP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ZP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tm,charCode:function(e){return e.type==="keypress"?fu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nR=vt(tR),rR=ye({},Gu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),f0=vt(rR),oR=ye({},ma,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tm}),iR=vt(oR),sR=ye({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),aR=vt(sR),lR=ye({},Gu,{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}),uR=vt(lR),cR=[9,13,27,32],km=Hn&&"CompositionEvent"in window,$s=null;Hn&&"documentMode"in document&&($s=document.documentMode);var dR=Hn&&"TextEvent"in window&&!$s,_S=Hn&&(!km||$s&&8<$s&&11>=$s),p0=String.fromCharCode(32),m0=!1;function DS(e,t){switch(e){case"keyup":return cR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var li=!1;function fR(e,t){switch(e){case"compositionend":return FS(t);case"keypress":return t.which!==32?null:(m0=!0,p0);case"textInput":return e=t.data,e===p0&&m0?null:e;default:return null}}function pR(e,t){if(li)return e==="compositionend"||!km&&DS(e,t)?(e=MS(),du=Cm=pr=null,li=!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 _S&&t.locale!=="ko"?null:t.data;default:return null}}var mR={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 g0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mR[e.type]:t==="textarea"}function HS(e,t,n,r){yS(r),t=bu(t,"onChange"),0<t.length&&(n=new bm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gs=null,sa=null;function gR(e){VS(e,0)}function qu(e){var t=ci(e);if(cS(t))return e}function hR(e,t){if(e==="change")return t}var US=!1;Hn&&(Hn?(nu="oninput"in document,nu||(op=document.createElement("div"),op.setAttribute("oninput","return;"),nu=typeof op.oninput=="function"),tu=nu):tu=!1,US=tu&&(!document.documentMode||9<document.documentMode));var tu,nu,op;function h0(){Gs&&(Gs.detachEvent("onpropertychange",BS),sa=Gs=null)}function BS(e){if(e.propertyName==="value"&&qu(sa)){var t=[];if(HS(t,sa,e,mm(e)),e=gR,lo)e(t);else{lo=!0;try{gm(e,t)}finally{lo=!1,ym()}}}}function yR(e,t,n){e==="focusin"?(h0(),Gs=t,sa=n,Gs.attachEvent("onpropertychange",BS)):e==="focusout"&&h0()}function vR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qu(sa)}function SR(e,t){if(e==="click")return qu(t)}function wR(e,t){if(e==="input"||e==="change")return qu(t)}function xR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:xR,ER=Object.prototype.hasOwnProperty;function aa(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(!ER.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function y0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function v0(e,t){var n=y0(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=y0(n)}}function jS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S0(){for(var e=window,t=wu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wu(e.document)}return t}function Op(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 CR=Hn&&"documentMode"in document&&11>=document.documentMode,ui=null,Mp=null,qs=null,_p=!1;function w0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_p||ui==null||ui!==wu(r)||(r=ui,"selectionStart"in r&&Op(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}),qs&&aa(qs,r)||(qs=r,r=bu(Mp,"onSelect"),0<r.length&&(t=new bm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ui)))}wm("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);wm("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);wm(IP,2);for(ip="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ru=0;ru<ip.length;ru++)Sm.set(ip[ru],0);var ip,ru;Ci("onMouseEnter",["mouseout","mouseover"]);Ci("onMouseLeave",["mouseout","mouseover"]);Ci("onPointerEnter",["pointerout","pointerover"]);Ci("onPointerLeave",["pointerout","pointerover"]);yo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yo("onBeforeInput",["compositionend","keypress","textInput","paste"]);yo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Us="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Us));function x0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,kP(r,t,void 0,e),e.currentTarget=null}function VS(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;x0(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;x0(o,a,u),i=l}}}if(Eu)throw e=Lp,Eu=!1,Lp=null,e}function pe(e,t){var n=qS(t),r=e+"__bubble";n.has(r)||(WS(t,e,2,!1),n.add(r))}var E0="_reactListening"+Math.random().toString(36).slice(2);function KS(e){e[E0]||(e[E0]=!0,aS.forEach(function(t){zS.has(t)||C0(t,!1,e,null),C0(t,!0,e,null)}))}function C0(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&&zS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=qS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),WS(i,e,o,t),s.add(a))}function WS(e,t,n,r){var o=Sm.get(t);switch(o===void 0?2:o){case 0:o=BP;break;case 1:o=jP;break;default:o=xm}n=o.bind(null,t,n,e),o=void 0,!Ap||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 $S(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=uo(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}EP(function(){var u=i,c=mm(n),p=[];e:{var d=NS.get(e);if(d!==void 0){var g=bm,y=e;switch(e){case"keypress":if(fu(n)===0)break e;case"keydown":case"keyup":g=nR;break;case"focusin":y="focus",g=rp;break;case"focusout":y="blur",g=rp;break;case"beforeblur":case"afterblur":g=rp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=c0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=KP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=iR;break;case RS:case AS:case LS:g=GP;break;case IS:g=aR;break;case"scroll":g=zP;break;case"wheel":g=uR;break;case"copy":case"cut":case"paste":g=YP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=f0}var v=(t&4)!==0,f=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var h=u,w;h!==null;){w=h;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,m!==null&&(x=na(h,m),x!=null&&v.push(la(h,x,w)))),f)break;h=h.return}0<v.length&&(d=new g(d,y,null,n,c),p.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(uo(y)||y[Ri]))break e;if((g||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=u,y=y?uo(y):null,y!==null&&(f=So(y),y!==f||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(v=c0,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=f0,x="onPointerLeave",m="onPointerEnter",h="pointer"),f=g==null?d:ci(g),w=y==null?d:ci(y),d=new v(x,h+"leave",g,n,c),d.target=f,d.relatedTarget=w,x=null,uo(c)===u&&(v=new v(m,h+"enter",y,n,c),v.target=w,v.relatedTarget=f,x=v),f=x,g&&y)t:{for(v=g,m=y,h=0,w=v;w;w=oi(w))h++;for(w=0,x=m;x;x=oi(x))w++;for(;0<h-w;)v=oi(v),h--;for(;0<w-h;)m=oi(m),w--;for(;h--;){if(v===m||m!==null&&v===m.alternate)break t;v=oi(v),m=oi(m)}v=null}else v=null;g!==null&&b0(p,d,g,v,!1),y!==null&&f!==null&&b0(p,f,y,v,!0)}}e:{if(d=u?ci(u):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var T=hR;else if(g0(d))if(US)T=wR;else{T=vR;var C=yR}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=SR);if(T&&(T=T(e,u))){HS(p,T,n,c);break e}C&&C(e,d,u),e==="focusout"&&(C=d._wrapperState)&&C.controlled&&d.type==="number"&&xp(d,"number",d.value)}switch(C=u?ci(u):window,e){case"focusin":(g0(C)||C.contentEditable==="true")&&(ui=C,Mp=u,qs=null);break;case"focusout":qs=Mp=ui=null;break;case"mousedown":_p=!0;break;case"contextmenu":case"mouseup":case"dragend":_p=!1,w0(p,n,c);break;case"selectionchange":if(CR)break;case"keydown":case"keyup":w0(p,n,c)}var k;if(km)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else li?DS(e,n)&&(L="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(_S&&n.locale!=="ko"&&(li||L!=="onCompositionStart"?L==="onCompositionEnd"&&li&&(k=MS()):(pr=c,Cm="value"in pr?pr.value:pr.textContent,li=!0)),C=bu(u,L),0<C.length&&(L=new d0(L,e,null,n,c),p.push({event:L,listeners:C}),k?L.data=k:(k=FS(n),k!==null&&(L.data=k)))),(k=dR?fR(e,n):pR(e,n))&&(u=bu(u,"onBeforeInput"),0<u.length&&(c=new d0("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=k))}VS(p,t)})}function la(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=na(e,n),i!=null&&r.unshift(la(e,i,o)),i=na(e,t),i!=null&&r.push(la(e,i,o))),e=e.return}return r}function oi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function b0(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=na(n,i),l!=null&&s.unshift(la(n,l,a))):o||(l=na(n,i),l!=null&&s.push(la(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Tu(){}var sp=null,ap=null;function GS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Dp(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 T0=typeof setTimeout=="function"?setTimeout:void 0,bR=typeof clearTimeout=="function"?clearTimeout:void 0;function Pm(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function yi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function k0(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 lp=0;function TR(e){return{$$typeof:fm,toString:e,valueOf:e}}var Yu=Math.random().toString(36).slice(2),mr="__reactFiber$"+Yu,ku="__reactProps$"+Yu,Ri="__reactContainer$"+Yu,P0="__reactEvents$"+Yu;function uo(e){var t=e[mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=k0(e);e!==null;){if(n=e[mr])return n;e=k0(e)}return t}e=n,n=e.parentNode}return null}function ga(e){return e=e[mr]||e[Ri],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ci(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(R(33))}function Xu(e){return e[ku]||null}function qS(e){var t=e[P0];return t===void 0&&(t=e[P0]=new Set),t}var Fp=[],di=-1;function Ar(e){return{current:e}}function me(e){0>di||(e.current=Fp[di],Fp[di]=null,di--)}function Ee(e,t){di++,Fp[di]=e.current,e.current=t}var kr={},Ge=Ar(kr),ft=Ar(!1),mo=kr;function bi(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 pt(e){return e=e.childContextTypes,e!=null}function Pu(){me(ft),me(Ge)}function R0(e,t,n){if(Ge.current!==kr)throw Error(R(168));Ee(Ge,t),Ee(ft,n)}function YS(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(R(108,pi(t)||"Unknown",o));return ye({},n,r)}function pu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,mo=Ge.current,Ee(Ge,e),Ee(ft,ft.current),!0}function A0(e,t,n){var r=e.stateNode;if(!r)throw Error(R(169));n?(e=YS(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,me(ft),me(Ge),Ee(Ge,e)):me(ft),Ee(ft,n)}var Rm=null,po=null,kR=Ne.unstable_runWithPriority,Am=Ne.unstable_scheduleCallback,Hp=Ne.unstable_cancelCallback,PR=Ne.unstable_shouldYield,L0=Ne.unstable_requestPaint,Up=Ne.unstable_now,RR=Ne.unstable_getCurrentPriorityLevel,Qu=Ne.unstable_ImmediatePriority,XS=Ne.unstable_UserBlockingPriority,QS=Ne.unstable_NormalPriority,ZS=Ne.unstable_LowPriority,JS=Ne.unstable_IdlePriority,up={},AR=L0!==void 0?L0:function(){},On=null,mu=null,cp=!1,I0=Up(),We=1e4>I0?Up:function(){return Up()-I0};function Ti(){switch(RR()){case Qu:return 99;case XS:return 98;case QS:return 97;case ZS:return 96;case JS:return 95;default:throw Error(R(332))}}function ew(e){switch(e){case 99:return Qu;case 98:return XS;case 97:return QS;case 96:return ZS;case 95:return JS;default:throw Error(R(332))}}function go(e,t){return e=ew(e),kR(e,t)}function ua(e,t,n){return e=ew(e),Am(e,t,n)}function Sn(){if(mu!==null){var e=mu;mu=null,Hp(e)}tw()}function tw(){if(!cp&&On!==null){cp=!0;var e=0;try{var t=On;go(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),On=null}catch(n){throw On!==null&&(On=On.slice(e+1)),Am(Qu,Sn),n}finally{cp=!1}}}var LR=vo.ReactCurrentBatchConfig;function Qt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ru=Ar(null),Au=null,fi=null,Lu=null;function Lm(){Lu=fi=Au=null}function Im(e){var t=Ru.current;me(Ru),e.type._context._currentValue=t}function nw(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 vi(e,t){Au=e,Lu=fi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Zt=!0),e.firstContext=null)}function Ft(e,t){if(Lu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Lu=e,t=1073741823),t={context:e,observedBits:t,next:null},fi===null){if(Au===null)throw Error(R(308));fi=t,Au.dependencies={lanes:0,firstContext:t,responders:null}}else fi=fi.next=t;return e._currentValue}var dr=!1;function Nm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function rw(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 N0(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 ca(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 p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var g=e,y=i;switch(a=t,d=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){p=g.call(d,p,a);break e}p=g;break e;case 3:g.flags=g.flags&-4097|64;case 0:if(g=y.payload,a=typeof g=="function"?g.call(d,p,a):g,a==null)break e;p=ye({},p,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=p):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,ya|=s,e.lanes=s,e.memoizedState=p}}function O0(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(R(191,o));o.call(r)}}}var ow=new zu.Component().refs;function Iu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zu={isMounted:function(e){return(e=e._reactInternals)?So(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),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=yt(),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=yt(),r=xr(e),o=Sr(n,r);o.tag=2,t!=null&&(o.callback=t),wr(e,o),Er(e,r,n)}};function M0(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?!aa(n,r)||!aa(o,i):!0}function iw(e,t,n){var r=!1,o=kr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(o=pt(t)?mo:Ge.current,r=t.contextTypes,i=(r=r!=null)?bi(e,o):kr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function _0(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&&Zu.enqueueReplaceState(t,t.state,null)}function Bp(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ow,Nm(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ft(i):(i=pt(t)?mo:Ge.current,o.context=bi(e,i)),ca(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Iu(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&&Zu.enqueueReplaceState(o,o.state,null),ca(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var ou=Array.isArray;function Ls(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(R(309));var r=n.stateNode}if(!r)throw Error(R(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===ow&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(R(284));if(!n._owner)throw Error(R(290,e))}return e}function iu(e,t){if(e.type!=="textarea")throw Error(R(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function sw(e){function t(f,m){if(e){var h=f.lastEffect;h!==null?(h.nextEffect=m,f.lastEffect=m):f.firstEffect=f.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(f,m){if(!e)return null;for(;m!==null;)t(f,m),m=m.sibling;return null}function r(f,m){for(f=new Map;m!==null;)m.key!==null?f.set(m.key,m):f.set(m.index,m),m=m.sibling;return f}function o(f,m){return f=Rr(f,m),f.index=0,f.sibling=null,f}function i(f,m,h){return f.index=h,e?(h=f.alternate,h!==null?(h=h.index,h<m?(f.flags=2,m):h):(f.flags=2,m)):m}function s(f){return e&&f.alternate===null&&(f.flags=2),f}function a(f,m,h,w){return m===null||m.tag!==6?(m=gp(h,f.mode,w),m.return=f,m):(m=o(m,h),m.return=f,m)}function l(f,m,h,w){return m!==null&&m.elementType===h.type?(w=o(m,h.props),w.ref=Ls(f,m,h),w.return=f,w):(w=vu(h.type,h.key,h.props,null,f.mode,w),w.ref=Ls(f,m,h),w.return=f,w)}function u(f,m,h,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=hp(h,f.mode,w),m.return=f,m):(m=o(m,h.children||[]),m.return=f,m)}function c(f,m,h,w,x){return m===null||m.tag!==7?(m=Ei(h,f.mode,w,x),m.return=f,m):(m=o(m,h),m.return=f,m)}function p(f,m,h){if(typeof m=="string"||typeof m=="number")return m=gp(""+m,f.mode,h),m.return=f,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Fs:return h=vu(m.type,m.key,m.props,null,f.mode,h),h.ref=Ls(f,null,m),h.return=f,h;case ao:return m=hp(m,f.mode,h),m.return=f,m}if(ou(m)||Ts(m))return m=Ei(m,f.mode,h,null),m.return=f,m;iu(f,m)}return null}function d(f,m,h,w){var x=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return x!==null?null:a(f,m,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Fs:return h.key===x?h.type===fr?c(f,m,h.props.children,w,x):l(f,m,h,w):null;case ao:return h.key===x?u(f,m,h,w):null}if(ou(h)||Ts(h))return x!==null?null:c(f,m,h,w,null);iu(f,h)}return null}function g(f,m,h,w,x){if(typeof w=="string"||typeof w=="number")return f=f.get(h)||null,a(m,f,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Fs:return f=f.get(w.key===null?h:w.key)||null,w.type===fr?c(m,f,w.props.children,x,w.key):l(m,f,w,x);case ao:return f=f.get(w.key===null?h:w.key)||null,u(m,f,w,x)}if(ou(w)||Ts(w))return f=f.get(h)||null,c(m,f,w,x,null);iu(m,w)}return null}function y(f,m,h,w){for(var x=null,T=null,C=m,k=m=0,L=null;C!==null&&k<h.length;k++){C.index>k?(L=C,C=null):L=C.sibling;var I=d(f,C,h[k],w);if(I===null){C===null&&(C=L);break}e&&C&&I.alternate===null&&t(f,C),m=i(I,m,k),T===null?x=I:T.sibling=I,T=I,C=L}if(k===h.length)return n(f,C),x;if(C===null){for(;k<h.length;k++)C=p(f,h[k],w),C!==null&&(m=i(C,m,k),T===null?x=C:T.sibling=C,T=C);return x}for(C=r(f,C);k<h.length;k++)L=g(C,f,k,h[k],w),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(O){return t(f,O)}),x}function v(f,m,h,w){var x=Ts(h);if(typeof x!="function")throw Error(R(150));if(h=x.call(h),h==null)throw Error(R(151));for(var T=x=null,C=m,k=m=0,L=null,I=h.next();C!==null&&!I.done;k++,I=h.next()){C.index>k?(L=C,C=null):L=C.sibling;var O=d(f,C,I.value,w);if(O===null){C===null&&(C=L);break}e&&C&&O.alternate===null&&t(f,C),m=i(O,m,k),T===null?x=O:T.sibling=O,T=O,C=L}if(I.done)return n(f,C),x;if(C===null){for(;!I.done;k++,I=h.next())I=p(f,I.value,w),I!==null&&(m=i(I,m,k),T===null?x=I:T.sibling=I,T=I);return x}for(C=r(f,C);!I.done;k++,I=h.next())I=g(C,f,k,I.value,w),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(V){return t(f,V)}),x}return function(f,m,h,w){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 Fs:e:{for(T=h.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(h.type===fr){n(f,x.sibling),m=o(x,h.props.children),m.return=f,f=m;break e}break;default:if(x.elementType===h.type){n(f,x.sibling),m=o(x,h.props),m.ref=Ls(f,x,h),m.return=f,f=m;break e}}n(f,x);break}else t(f,x);x=x.sibling}h.type===fr?(m=Ei(h.props.children,f.mode,w,h.key),m.return=f,f=m):(w=vu(h.type,h.key,h.props,null,f.mode,w),w.ref=Ls(f,m,h),w.return=f,f=w)}return s(f);case ao: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(f,m.sibling),m=o(m,h.children||[]),m.return=f,f=m;break e}else{n(f,m);break}else t(f,m);m=m.sibling}m=hp(h,f.mode,w),m.return=f,f=m}return s(f)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(f,m.sibling),m=o(m,h),m.return=f,f=m):(n(f,m),m=gp(h,f.mode,w),m.return=f,f=m),s(f);if(ou(h))return y(f,m,h,w);if(Ts(h))return v(f,m,h,w);if(T&&iu(f,h),typeof h>"u"&&!x)switch(f.tag){case 1:case 22:case 0:case 11:case 15:throw Error(R(152,pi(f.type)||"Component"))}return n(f,m)}}var Nu=sw(!0),aw=sw(!1),ha={},yn=Ar(ha),da=Ar(ha),fa=Ar(ha);function co(e){if(e===ha)throw Error(R(174));return e}function jp(e,t){switch(Ee(fa,t),Ee(da,e),Ee(yn,ha),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Tp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Tp(t,e)}me(yn),Ee(yn,t)}function ki(){me(yn),me(da),me(fa)}function D0(e){co(fa.current);var t=co(yn.current),n=Tp(t,e.type);t!==n&&(Ee(da,e),Ee(yn,n))}function Om(e){da.current===e&&(me(yn),me(da))}var xe=Ar(0);function Ou(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,vn=!1;function lw(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 F0(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 zp(e){if(vn){var t=gr;if(t){var n=t;if(!F0(e,t)){if(t=yi(n.nextSibling),!t||!F0(e,t)){e.flags=e.flags&-1025|2,vn=!1,_n=e;return}lw(_n,n)}_n=e,gr=yi(t.firstChild)}else e.flags=e.flags&-1025|2,vn=!1,_n=e}}function H0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function su(e){if(e!==_n)return!1;if(!vn)return H0(e),vn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Dp(t,e.memoizedProps))for(t=gr;t;)lw(e,t),t=yi(t.nextSibling);if(H0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(R(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gr=yi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gr=null}}else gr=_n?yi(e.stateNode.nextSibling):null;return!0}function dp(){gr=_n=null,vn=!1}var Si=[];function Mm(){for(var e=0;e<Si.length;e++)Si[e]._workInProgressVersionPrimary=null;Si.length=0}var Ys=vo.ReactCurrentDispatcher,Dt=vo.ReactCurrentBatchConfig,pa=0,be=null,Ke=null,Me=null,Mu=!1,Xs=!1;function ct(){throw Error(R(321))}function _m(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 Dm(e,t,n,r,o,i){if(pa=i,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ys.current=e===null||e.memoizedState===null?NR:OR,e=n(r,o),Xs){i=0;do{if(Xs=!1,!(25>i))throw Error(R(301));i+=1,Me=Ke=null,t.updateQueue=null,Ys.current=MR,e=n(r,o)}while(Xs)}if(Ys.current=Hu,t=Ke!==null&&Ke.next!==null,pa=0,Me=Ke=be=null,Mu=!1,t)throw Error(R(300));return e}function fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?be.memoizedState=Me=e:Me=Me.next=e,Me}function wo(){if(Ke===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=Me===null?be.memoizedState:Me.next;if(t!==null)Me=t,Ke=e;else{if(e===null)throw Error(R(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},Me===null?be.memoizedState=Me=e:Me=Me.next=e}return Me}function gn(e,t){return typeof t=="function"?t(e):t}function Is(e){var t=wo(),n=t.queue;if(n===null)throw Error(R(311));n.lastRenderedReducer=e;var r=Ke,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((pa&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,be.lanes|=u,ya|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Zt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ns(e){var t=wo(),n=t.queue;if(n===null)throw Error(R(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)||(Zt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function U0(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=(pa&e)===e)&&(t._workInProgressVersionPrimary=r,Si.push(t))),e)return n(t._source);throw Si.push(t),Error(R(350))}function uw(e,t,n,r){var o=Je;if(o===null)throw Error(R(349));var i=t._getVersion,s=i(t._source),a=Ys.current,l=a.useState(function(){return U0(o,t,n)}),u=l[1],c=l[0];l=Me;var p=e.memoizedState,d=p.refs,g=d.getSnapshot,y=p.source;p=p.subscribe;var v=be;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var f=i(t._source);if(!Mt(s,f)){f=n(t._source),Mt(c,f)||(u(f),f=xr(v),o.mutableReadLanes|=f&o.pendingLanes),f=o.mutableReadLanes,o.entangledLanes|=f;for(var m=o.entanglements,h=f;0<h;){var w=31-Tr(h),x=1<<w;m[w]|=f,h&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var f=d.getSnapshot,m=d.setSnapshot;try{m(f(t._source));var h=xr(v);o.mutableReadLanes|=h&o.pendingLanes}catch(w){m(function(){throw w})}})},[t,r]),Mt(g,n)&&Mt(y,t)&&Mt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:gn,lastRenderedState:c},e.dispatch=u=Um.bind(null,be,e),l.queue=e,l.baseQueue=null,c=U0(o,t,n),l.memoizedState=l.baseState=c),c}function cw(e,t,n){var r=wo();return uw(r,e,t,n)}function Os(e){var t=fo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:gn,lastRenderedState:e},e=e.dispatch=Um.bind(null,be,e),[t.memoizedState,e]}function _u(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=be.updateQueue,t===null?(t={lastEffect:null},be.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 B0(e){var t=fo();return e={current:e},t.memoizedState=e}function Du(){return wo().memoizedState}function Vp(e,t,n,r){var o=fo();be.flags|=e,o.memoizedState=_u(1|t,n,void 0,r===void 0?null:r)}function Fm(e,t,n,r){var o=wo();r=r===void 0?null:r;var i=void 0;if(Ke!==null){var s=Ke.memoizedState;if(i=s.destroy,r!==null&&_m(r,s.deps)){_u(t,n,i,r);return}}be.flags|=e,o.memoizedState=_u(1|t,n,i,r)}function j0(e,t){return Vp(516,4,e,t)}function Fu(e,t){return Fm(516,4,e,t)}function dw(e,t){return Fm(4,2,e,t)}function fw(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 pw(e,t,n){return n=n!=null?n.concat([e]):null,Fm(4,2,fw.bind(null,t,e),n)}function Hm(){}function mw(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_m(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gw(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&_m(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function IR(e,t){var n=Ti();go(98>n?98:n,function(){e(!0)}),go(97<n?97:n,function(){var r=Dt.transition;Dt.transition=1;try{e(!1),t()}finally{Dt.transition=r}})}function Um(e,t,n){var r=yt(),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===be||s!==null&&s===be)Xs=Mu=!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 Hu={readContext:Ft,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useOpaqueIdentifier:ct,unstable_isNewReconciler:!1},NR={readContext:Ft,useCallback:function(e,t){return fo().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:j0,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Vp(4,2,fw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Vp(4,2,e,t)},useMemo:function(e,t){var n=fo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=fo();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=Um.bind(null,be,e),[r.memoizedState,e]},useRef:B0,useState:Os,useDebugValue:Hm,useDeferredValue:function(e){var t=Os(e),n=t[0],r=t[1];return j0(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Os(!1),t=e[0];return e=IR.bind(null,e[1]),B0(e),[e,t]},useMutableSource:function(e,t,n){var r=fo();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},uw(r,e,t,n)},useOpaqueIdentifier:function(){if(vn){var e=!1,t=TR(function(){throw e||(e=!0,n("r:"+(lp++).toString(36))),Error(R(355))}),n=Os(t)[1];return!(be.mode&2)&&(be.flags|=516,_u(5,function(){n("r:"+(lp++).toString(36))},void 0,null)),t}return t="r:"+(lp++).toString(36),Os(t),t},unstable_isNewReconciler:!1},OR={readContext:Ft,useCallback:mw,useContext:Ft,useEffect:Fu,useImperativeHandle:pw,useLayoutEffect:dw,useMemo:gw,useReducer:Is,useRef:Du,useState:function(){return Is(gn)},useDebugValue:Hm,useDeferredValue:function(e){var t=Is(gn),n=t[0],r=t[1];return Fu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Is(gn)[0];return[Du().current,e]},useMutableSource:cw,useOpaqueIdentifier:function(){return Is(gn)[0]},unstable_isNewReconciler:!1},MR={readContext:Ft,useCallback:mw,useContext:Ft,useEffect:Fu,useImperativeHandle:pw,useLayoutEffect:dw,useMemo:gw,useReducer:Ns,useRef:Du,useState:function(){return Ns(gn)},useDebugValue:Hm,useDeferredValue:function(e){var t=Ns(gn),n=t[0],r=t[1];return Fu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Ns(gn)[0];return[Du().current,e]},useMutableSource:cw,useOpaqueIdentifier:function(){return Ns(gn)[0]},unstable_isNewReconciler:!1},_R=vo.ReactCurrentOwner,Zt=!1;function dt(e,t,n,r){t.child=e===null?aw(t,null,n,r):Nu(t,e.child,n,r)}function z0(e,t,n,r,o){n=n.render;var i=t.ref;return vi(t,o),r=Dm(e,t,n,r,i,o),e!==null&&!Zt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,dt(e,t,r,o),t.child)}function V0(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Wm(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,hw(e,t,s,r,o,i)):(e=vu(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:aa,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 hw(e,t,n,r,o,i){if(e!==null&&aa(e.memoizedProps,r)&&e.ref===t.ref)if(Zt=!1,(i&o)!==0)e.flags&16384&&(Zt=!0);else return t.lanes=e.lanes,Dn(e,t,i);return Kp(e,t,n,r,i)}function fp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if(!(t.mode&4))t.memoizedState={baseLanes:0},lu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},lu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},lu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,lu(t,r);return dt(e,t,o,n),t.child}function yw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Kp(e,t,n,r,o){var i=pt(n)?mo:Ge.current;return i=bi(t,i),vi(t,o),n=Dm(e,t,n,r,i,o),e!==null&&!Zt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,dt(e,t,n,o),t.child)}function K0(e,t,n,r,o){if(pt(n)){var i=!0;pu(t)}else i=!1;if(vi(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),iw(t,n,r),Bp(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=pt(n)?mo:Ge.current,u=bi(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&_0(t,s,r,u),dr=!1;var d=t.memoizedState;s.state=d,ca(t,r,s,o),l=t.memoizedState,a!==r||d!==l||ft.current||dr?(typeof c=="function"&&(Iu(t,n,c,r),l=t.memoizedState),(a=dr||M0(t,n,a,r,d,l,u))?(p||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,rw(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Qt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=pt(n)?mo:Ge.current,l=bi(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&_0(t,s,r,l),dr=!1,d=t.memoizedState,s.state=d,ca(t,r,s,o);var y=t.memoizedState;a!==p||d!==y||ft.current||dr?(typeof g=="function"&&(Iu(t,n,g,r),y=t.memoizedState),(u=dr||M0(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 Wp(e,t,n,r,i,o)}function Wp(e,t,n,r,o,i){yw(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&A0(t,n,!1),Dn(e,t,i);r=t.stateNode,_R.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Nu(t,e.child,null,i),t.child=Nu(t,null,a,i)):dt(e,t,a,i),t.memoizedState=r.state,o&&A0(t,n,!0),t.child}function W0(e){var t=e.stateNode;t.pendingContext?R0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&R0(e,t.context,!1),jp(e,t.containerInfo)}var au={dehydrated:null,retryLane:0};function $0(e,t,n){var r=t.pendingProps,o=xe.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),Ee(xe,o&1),e===null?(r.fallback!==void 0&&zp(t),e=r.children,o=r.fallback,i?(e=G0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=au,e):typeof r.unstable_expectedLoadTime=="number"?(e=G0(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=au,t.lanes=33554432,e):(n=$m({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Y0(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=au,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n):i?(r=Y0(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=au,r):(n=q0(e,t,r.children,n),t.memoizedState=null,n)}function G0(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=$m(t,o,0,null),n=Ei(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function q0(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 Y0(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=Ei(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function X0(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),nw(e.return,t)}function pp(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 Q0(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(dt(e,t,r.children,n),r=xe.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&&X0(e,n);else if(e.tag===19)X0(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(Ee(xe,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&&Ou(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),pp(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&&Ou(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}pp(t,!0,n,null,i,t.lastEffect);break;case"together":pp(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),ya|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(R(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 vw,$p,Sw,ww;vw=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}};$p=function(){};Sw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,co(yn.current);var i=null;switch(n){case"input":o=Sp(e,o),r=Sp(e,r),i=[];break;case"option":o=Ep(e,o),r=Ep(e,r),i=[];break;case"select":o=ye({},o,{value:void 0}),r=ye({},r,{value:void 0}),i=[];break;case"textarea":o=Cp(e,o),r=Cp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tu)}kp(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ea.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"&&(ea.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&pe("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===fm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};ww=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ms(e,t){if(!vn)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 DR(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 pt(t.type)&&Pu(),null;case 3:return ki(),me(ft),me(Ge),Mm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(su(t)?t.flags|=4:r.hydrate||(t.flags|=256)),$p(t),null;case 5:Om(t);var o=co(fa.current);if(n=t.type,e!==null&&t.stateNode!=null)Sw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(R(166));return null}if(e=co(yn.current),su(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[mr]=t,r[ku]=i,n){case"dialog":pe("cancel",r),pe("close",r);break;case"iframe":case"object":case"embed":pe("load",r);break;case"video":case"audio":for(e=0;e<Us.length;e++)pe(Us[e],r);break;case"source":pe("error",r);break;case"img":case"image":case"link":pe("error",r),pe("load",r);break;case"details":pe("toggle",r);break;case"input":Jv(r,i),pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},pe("invalid",r);break;case"textarea":t0(r,i),pe("invalid",r)}kp(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):ea.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&pe("scroll",r));switch(n){case"input":Ql(r),e0(r,i,!0);break;case"textarea":Ql(r),n0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Tu)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===bp.html&&(e=pS(n)),e===bp.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[ku]=r,vw(e,t,!1,!1),t.stateNode=e,s=Pp(n,r),n){case"dialog":pe("cancel",e),pe("close",e),o=r;break;case"iframe":case"object":case"embed":pe("load",e),o=r;break;case"video":case"audio":for(o=0;o<Us.length;o++)pe(Us[o],e);o=r;break;case"source":pe("error",e),o=r;break;case"img":case"image":case"link":pe("error",e),pe("load",e),o=r;break;case"details":pe("toggle",e),o=r;break;case"input":Jv(e,r),o=Sp(e,r),pe("invalid",e);break;case"option":o=Ep(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ye({},r,{value:void 0}),pe("invalid",e);break;case"textarea":t0(e,r),o=Cp(e,r),pe("invalid",e);break;default:o=r}kp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?hS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&mS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ta(e,l):typeof l=="number"&&ta(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ea.hasOwnProperty(i)?l!=null&&i==="onScroll"&&pe("scroll",e):l!=null&&sm(e,i,l,s))}switch(n){case"input":Ql(e),e0(e,r,!1);break;case"textarea":Ql(e),n0(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?mi(e,!!r.multiple,i,!1):r.defaultValue!=null&&mi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Tu)}GS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)ww(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(R(166));n=co(fa.current),co(yn.current),su(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 me(xe),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&su(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||xe.current&1?_e===0&&(_e=3):((_e===0||_e===3)&&(_e=4),Je===null||!(ya&134217727)&&!(Li&134217727)||wi(Je,$e))),(r||n)&&(t.flags|=4),null);case 4:return ki(),$p(t),e===null&&KS(t.stateNode.containerInfo),null;case 10:return Im(t),null;case 17:return pt(t.type)&&Pu(),null;case 19:if(me(xe),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Ms(r,!1);else{if(_e!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Ou(e),s!==null){for(t.flags|=64,Ms(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 Ee(xe,xe.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>Zp&&(t.flags|=64,i=!0,Ms(r,!1),t.lanes=33554432)}else{if(!i)if(e=Ou(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ms(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!vn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>Zp&&n!==1073741824&&(t.flags|=64,i=!0,Ms(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=xe.current,Ee(xe,i?t&1|2:t&1),n):null;case 23:case 24:return Km(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(R(156,t.tag))}function FR(e){switch(e.tag){case 1:pt(e.type)&&Pu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(ki(),me(ft),me(Ge),Mm(),t=e.flags,t&64)throw Error(R(285));return e.flags=t&-4097|64,e;case 5:return Om(e),null;case 13:return me(xe),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return me(xe),null;case 4:return ki(),null;case 10:return Im(e),null;case 23:case 24:return Km(),null;default:return null}}function Bm(e,t){try{var n="",r=t;do n+=yP(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 Vp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var OR=typeof WeakMap=="function"?WeakMap:Map;function gw(e,t,n){n=vr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hu||(Hu=!0,Yp=r),Vp(e,t)},n}function hw(e,t,n){n=vr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Vp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this),Vp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var NR=typeof WeakSet=="function"?WeakSet:Set;function $0(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Er(e,n)}else t.current=null}function MR(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:Qt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Cm(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(P(163))}function _R(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&&(Tw(n,e),VR(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:Qt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&P0(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}P0(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&jS(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&&wS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(P(163))}function G0(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=uS("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 q0(e,t){if(fo&&typeof fo.onCommitFiberUnmount=="function")try{fo.onCommitFiberUnmount(bm,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)Tw(t,n);else{r=t;try{o()}catch(i){Er(r,i)}}n=n.next}while(n!==e)}break;case 1:if($0(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Er(t,i)}break;case 5:$0(t);break;case 4:yw(e,t)}}function Y0(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 X0(e){return e.tag===5||e.tag===3||e.tag===4}function Q0(e){e:{for(var t=e.return;t!==null;){if(X0(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&&(Js(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||X0(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?Kp(e,n,t):Wp(e,n,t)}function Kp(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=Cu));else if(r!==4&&(e=e.child,e!==null))for(Kp(e,t,n),e=e.sibling;e!==null;)Kp(e,t,n),e=e.sibling}function Wp(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(Wp(e,t,n),e=e.sibling;e!==null;)Wp(e,t,n),e=e.sibling}function yw(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(q0(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(q0(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 cp(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[bu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&iS(n,r),Cp(e,o),t=Cp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?cS(n,a):s==="dangerouslySetInnerHTML"?lS(n,a):s==="children"?Js(n,a):nm(n,s,a,t)}switch(e){case"input":hp(n,r);break;case"textarea":sS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?fi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?fi(n,!!r.multiple,r.defaultValue,!0):fi(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,wS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Um=Ke(),G0(t.child,!0)),Z0(t);return;case 19:Z0(t);return;case 17:return;case 23:case 24:G0(t,t.memoizedState!==null);return}throw Error(P(163))}function Z0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new NR),t.forEach(function(r){var o=$R.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function DR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var FR=Math.ceil,Fu=yo.ReactCurrentDispatcher,Fm=yo.ReactCurrentOwner,z=0,Je=null,Pe=null,We=0,go=0,$p=Rr(0),_e=0,Qu=null,Pi=0,ga=0,Ri=0,Hm=0,Gp=null,Um=0,qp=1/0;function Ai(){qp=Ke()+500}var M=null,Hu=!1,Yp=null,hn=null,kr=!1,Ys=null,Hs=90,Xp=[],Qp=[],Dn=null,Xs=0,Zp=null,pu=-1,Nn=0,mu=0,Qs=null,gu=!1;function ht(){return z&48?Ke():pu!==-1?pu:pu=Ke()}function wr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ci()===99?1:2;if(Nn===0&&(Nn=Pi),bR.transition!==0){mu!==0&&(mu=Gp!==null?Gp.pendingLanes:0),e=Nn;var t=4186112&~mu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ci(),z&4&&e===98?e=xu(12,Nn):(e=PP(e),e=xu(e,Nn)),e}function xr(e,t,n){if(50<Xs)throw Xs=0,Zp=null,Error(P(185));if(e=Zu(e,t),e===null)return null;Ku(e,t,n),e===Je&&(Ri|=t,_e===4&&vi(e,We));var r=Ci();t===1?z&8&&!(z&48)?Jp(e):(Ht(e,n),z===0&&(Ai(),Sn())):(!(z&4)||r!==98&&r!==99||(Dn===null?Dn=new Set([e]):Dn.add(e)),Ht(e,n)),Gp=e}function Zu(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-br(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,ri(l);var c=de;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=ra(e,e===Je?We:0),t=de,r===0)n!==null&&(n!==ip&&Mp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==ip&&Mp(n)}t===15?(n=Jp.bind(null,e),On===null?(On=[n],fu=Tm(Yu,YS)):On.push(n),n=ip):t===14?n=aa(99,Jp.bind(null,e)):(n=RP(t),n=aa(n,vw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function vw(e){if(pu=-1,mu=Nn=0,z&48)throw Error(P(327));var t=e.callbackNode;if(Ar()&&e.callbackNode!==t)return null;var n=ra(e,e===Je?We:0);if(n===0)return null;var r=n,o=z;z|=16;var i=Ew();(Je!==e||We!==r)&&(Ai(),Si(e,r));do try{BR();break}catch(a){xw(e,a)}while(1);if(km(),Fu.current=i,z=o,Pe!==null?r=0:(Je=null,We=0,r=_e),Pi&Ri)Si(e,0);else if(r!==0){if(r===2&&(z|=64,e.hydrate&&(e.hydrate=!1,Cm(e.containerInfo)),n=PS(e),n!==0&&(r=Us(e,n))),r===1)throw t=Qu,Si(e,0),vi(e,n),Ht(e,Ke()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(P(345));case 2:io(e);break;case 3:if(vi(e,n),(n&62914560)===n&&(r=Um+500-Ke(),10<r)){if(ra(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ht(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=S0(io.bind(null,e),r);break}io(e);break;case 4:if(vi(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-br(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ke()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*FR(n/1960))-n,10<n){e.timeoutHandle=S0(io.bind(null,e),n);break}io(e);break;case 5:io(e);break;default:throw Error(P(329))}}return Ht(e,Ke()),e.callbackNode===t?vw.bind(null,e):null}function vi(e,t){for(t&=~Hm,t&=~Ri,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-br(t),r=1<<n;e[n]=-1,t&=~r}}function Jp(e){if(z&48)throw Error(P(327));if(Ar(),e===Je&&e.expiredLanes&We){var t=We,n=Us(e,t);Pi&Ri&&(t=ra(e,t),n=Us(e,t))}else t=ra(e,0),n=Us(e,t);if(e.tag!==0&&n===2&&(z|=64,e.hydrate&&(e.hydrate=!1,Cm(e.containerInfo)),t=PS(e),t!==0&&(n=Us(e,t))),n===1)throw n=Qu,Si(e,0),vi(e,t),Ht(e,Ke()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,io(e),Ht(e,Ke()),null}function HR(){if(Dn!==null){var e=Dn;Dn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ht(t,Ke())})}Sn()}function Sw(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(Ai(),Sn())}}function ww(e,t){var n=z;z&=-2,z|=8;try{return e(t)}finally{z=n,z===0&&(Ai(),Sn())}}function su(e,t){Ee($p,go),go|=t,Pi|=t}function Bm(){go=$p.current,me($p)}function Si(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,vR(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Tu();break;case 3:bi(),me(dt),me($e),Lm();break;case 5:Am(r);break;case 4:bi();break;case 13:me(xe);break;case 19:me(xe);break;case 10:Pm(r);break;case 23:case 24:Bm()}n=n.return}Je=e,Pe=Pr(e.current,null),We=go=Pi=t,_e=0,Qu=null,Hm=Ri=ga=0}function xw(e,t){do{var n=Pe;try{if(km(),Gs.current=Du,Ou){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ou=!1}if(da=0,Me=Ve=be=null,qs=!1,Fm.current=null,n===null||n.return===null){_e=1,Qu=t,Pe=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=We,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=(xe.current&1)!==0,d=s;do{var m;if(m=d.tag===13){var y=d.memoizedState;if(y!==null)m=y.dehydrated!==null;else{var v=d.memoizedProps;m=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!f}}if(m){var p=d.updateQueue;if(p===null){var g=new Set;g.add(u),d.updateQueue=g}else p.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=vr(-1,1);h.tag=2,Sr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new OR,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=WR.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((di(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
|
|
7
|
+
`+i.stack}return{value:e,source:t,stack:o}}function Gp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var HR=typeof WeakMap=="function"?WeakMap:Map;function xw(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bu||(Bu=!0,Jp=r),Gp(e,t)},n}function Ew(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 Gp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(hn===null?hn=new Set([this]):hn.add(this),Gp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var UR=typeof WeakSet=="function"?WeakSet:Set;function Z0(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 BR(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:Qt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Pm(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(R(163))}function jR(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&&(Iw(n,e),YR(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:Qt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&O0(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}O0(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&GS(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&&kS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(R(163))}function J0(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=gS("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 eS(e,t){if(po&&typeof po.onCommitFiberUnmount=="function")try{po.onCommitFiberUnmount(Rm,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)Iw(t,n);else{r=t;try{o()}catch(i){Cr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Z0(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:Z0(t);break;case 4:Cw(e,t)}}function tS(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 nS(e){return e.tag===5||e.tag===3||e.tag===4}function rS(e){e:{for(var t=e.return;t!==null;){if(nS(t))break e;t=t.return}throw Error(R(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(R(161))}n.flags&16&&(ta(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||nS(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?qp(e,n,t):Yp(e,n,t)}function qp(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.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=Tu));else if(r!==4&&(e=e.child,e!==null))for(qp(e,t,n),e=e.sibling;e!==null;)qp(e,t,n),e=e.sibling}function Yp(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(Yp(e,t,n),e=e.sibling;e!==null;)Yp(e,t,n),e=e.sibling}function Cw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(R(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(eS(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(eS(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 mp(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[ku]=r,e==="input"&&r.type==="radio"&&r.name!=null&&dS(n,r),Pp(e,o),t=Pp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?hS(n,a):s==="dangerouslySetInnerHTML"?mS(n,a):s==="children"?ta(n,a):sm(n,s,a,t)}switch(e){case"input":wp(n,r);break;case"textarea":fS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?mi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?mi(n,!!r.multiple,r.defaultValue,!0):mi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(R(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,kS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Vm=We(),J0(t.child,!0)),oS(t);return;case 19:oS(t);return;case 17:return;case 23:case 24:J0(t,t.memoizedState!==null);return}throw Error(R(163))}function oS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new UR),t.forEach(function(r){var o=ZR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function zR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var VR=Math.ceil,Uu=vo.ReactCurrentDispatcher,jm=vo.ReactCurrentOwner,z=0,Je=null,Pe=null,$e=0,ho=0,Xp=Ar(0),_e=0,Ju=null,Ai=0,ya=0,Li=0,zm=0,Qp=null,Vm=0,Zp=1/0;function Ii(){Zp=We()+500}var M=null,Bu=!1,Jp=null,hn=null,Pr=!1,Qs=null,Bs=90,em=[],tm=[],Fn=null,Zs=0,nm=null,gu=-1,Mn=0,hu=0,Js=null,yu=!1;function yt(){return z&48?We():gu!==-1?gu:gu=We()}function xr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ti()===99?1:2;if(Mn===0&&(Mn=Ai),LR.transition!==0){hu!==0&&(hu=Qp!==null?Qp.pendingLanes:0),e=Mn;var t=4186112&~hu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ti(),z&4&&e===98?e=Cu(12,Mn):(e=OP(e),e=Cu(e,Mn)),e}function Er(e,t,n){if(50<Zs)throw Zs=0,nm=null,Error(R(185));if(e=ec(e,t),e===null)return null;$u(e,t,n),e===Je&&(Li|=t,_e===4&&wi(e,$e));var r=Ti();t===1?z&8&&!(z&48)?rm(e):(Ht(e,n),z===0&&(Ii(),Sn())):(!(z&4)||r!==98&&r!==99||(Fn===null?Fn=new Set([e]):Fn.add(e)),Ht(e,n)),Qp=e}function ec(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,ii(l);var c=de;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=ia(e,e===Je?$e:0),t=de,r===0)n!==null&&(n!==up&&Hp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==up&&Hp(n)}t===15?(n=rm.bind(null,e),On===null?(On=[n],mu=Am(Qu,tw)):On.push(n),n=up):t===14?n=ua(99,rm.bind(null,e)):(n=MP(t),n=ua(n,bw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function bw(e){if(gu=-1,hu=Mn=0,z&48)throw Error(R(327));var t=e.callbackNode;if(Lr()&&e.callbackNode!==t)return null;var n=ia(e,e===Je?$e:0);if(n===0)return null;var r=n,o=z;z|=16;var i=Rw();(Je!==e||$e!==r)&&(Ii(),xi(e,r));do try{$R();break}catch(a){Pw(e,a)}while(1);if(Lm(),Uu.current=i,z=o,Pe!==null?r=0:(Je=null,$e=0,r=_e),Ai&Li)xi(e,0);else if(r!==0){if(r===2&&(z|=64,e.hydrate&&(e.hydrate=!1,Pm(e.containerInfo)),n=OS(e),n!==0&&(r=js(e,n))),r===1)throw t=Ju,xi(e,0),wi(e,n),Ht(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(R(345));case 2:so(e);break;case 3:if(wi(e,n),(n&62914560)===n&&(r=Vm+500-We(),10<r)){if(ia(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){yt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=T0(so.bind(null,e),r);break}so(e);break;case 4:if(wi(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*VR(n/1960))-n,10<n){e.timeoutHandle=T0(so.bind(null,e),n);break}so(e);break;case 5:so(e);break;default:throw Error(R(329))}}return Ht(e,We()),e.callbackNode===t?bw.bind(null,e):null}function wi(e,t){for(t&=~zm,t&=~Li,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 rm(e){if(z&48)throw Error(R(327));if(Lr(),e===Je&&e.expiredLanes&$e){var t=$e,n=js(e,t);Ai&Li&&(t=ia(e,t),n=js(e,t))}else t=ia(e,0),n=js(e,t);if(e.tag!==0&&n===2&&(z|=64,e.hydrate&&(e.hydrate=!1,Pm(e.containerInfo)),t=OS(e),t!==0&&(n=js(e,t))),n===1)throw n=Ju,xi(e,0),wi(e,t),Ht(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,so(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())})}Sn()}function Tw(e,t){var n=z;z|=1;try{return e(t)}finally{z=n,z===0&&(Ii(),Sn())}}function kw(e,t){var n=z;z&=-2,z|=8;try{return e(t)}finally{z=n,z===0&&(Ii(),Sn())}}function lu(e,t){Ee(Xp,ho),ho|=t,Ai|=t}function Km(){ho=Xp.current,me(Xp)}function xi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,bR(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pu();break;case 3:ki(),me(ft),me(Ge),Mm();break;case 5:Om(r);break;case 4:ki();break;case 13:me(xe);break;case 19:me(xe);break;case 10:Im(r);break;case 23:case 24:Km()}n=n.return}Je=e,Pe=Rr(e.current,null),$e=ho=Ai=t,_e=0,Ju=null,zm=Li=ya=0}function Pw(e,t){do{var n=Pe;try{if(Lm(),Ys.current=Hu,Mu){for(var r=be.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Mu=!1}if(pa=0,Me=Ke=be=null,Xs=!1,jm.current=null,n===null||n.return===null){_e=1,Ju=t,Pe=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=$e,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var p=(xe.current&1)!==0,d=s;do{var g;if(g=d.tag===13){var y=d.memoizedState;if(y!==null)g=y.dehydrated!==null;else{var v=d.memoizedProps;g=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!p}}if(g){var f=d.updateQueue;if(f===null){var m=new Set;m.add(u),d.updateQueue=m}else f.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var h=Sr(-1,1);h.tag=2,wr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new HR,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=QR.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((pi(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.`)}_e!==5&&(_e=2),l=Dm(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=gw(d,i,t);k0(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"&&(hn===null||!hn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var L=hw(d,i,t);k0(d,L);break e}}d=d.return}while(d!==null)}bw(n)}catch(I){t=I,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(1)}function Ew(){var e=Fu.current;return Fu.current=Du,e===null?Du:e}function Us(e,t){var n=z;z|=16;var r=Ew();Je===e&&We===t||Si(e,t);do try{UR();break}catch(o){xw(e,o)}while(1);if(km(),z=n,Fu.current=r,Pe!==null)throw Error(P(261));return Je=null,We=0,_e}function UR(){for(;Pe!==null;)Cw(Pe)}function BR(){for(;Pe!==null&&!xR();)Cw(Pe)}function Cw(e){var t=kw(e.alternate,e,go);e.memoizedProps=e.pendingProps,t===null?bw(e):Pe=t,Fm.current=null}function bw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=IR(t),n!==null){n.flags&=2047,Pe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=LR(n,t,go),n!==null){Pe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||go&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){Pe=t;return}Pe=t=e}while(t!==null);_e===0&&(_e=5)}function io(e){var t=Ci();return mo(99,jR.bind(null,e,t)),null}function jR(e,t){do Ar();while(Ys!==null);if(z&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-br(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(Dn!==null&&!(r&24)&&Dn.has(e)&&Dn.delete(e),e===Je&&(Pe=Je=null,We=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=z,z|=32,Fm.current=null,np=lu,s=p0(),Ap(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,m=0,y=0,v=s,p=null;t:for(;;){for(var g;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),(g=v.firstChild)!==null;)p=v,v=g;for(;;){if(v===s)break t;if(p===a&&++m===i&&(f=c),p===l&&++y===u&&(d=c),(g=v.nextSibling)!==null)break;v=p,p=v.parentNode}v=g}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;rp={focusedElem:s,selectionRange:a},lu=!1,Qs=null,gu=!1,M=r;do try{zR()}catch(I){if(M===null)throw Error(P(330));Er(M,I),M=M.nextEffect}while(M!==null);Qs=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&Js(M.stateNode,""),h&128){var w=M.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(h&1038){case 2:Q0(M),M.flags&=-3;break;case 6:Q0(M),M.flags&=-3,cp(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,cp(M.alternate,M);break;case 4:cp(M.alternate,M);break;case 8:a=M,yw(s,a);var T=a.alternate;Y0(a),T!==null&&Y0(T)}M=M.nextEffect}}catch(I){if(M===null)throw Error(P(330));Er(M,I),M=M.nextEffect}while(M!==null);if(x=rp,w=p0(),h=x.focusedElem,s=x.selectionRange,w!==h&&h&&h.ownerDocument&&_S(h.ownerDocument.documentElement,h)){for(s!==null&&Ap(h)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in h?(h.selectionStart=w,h.selectionEnd=Math.min(x,h.value.length)):(x=(w=h.ownerDocument||document)&&w.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=f0(h,T),i=f0(h,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=h;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<w.length;h++)x=w[h],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}lu=!!np,rp=np=null,e.current=n,M=r;do try{for(h=e;M!==null;){var C=M.flags;if(C&36&&_R(h,M.alternate,M),C&128){w=void 0;var k=M.ref;if(k!==null){var L=M.stateNode;switch(M.tag){case 5:w=L;break;default:w=L}typeof k=="function"?k(w):k.current=w}}M=M.nextEffect}}catch(I){if(M===null)throw Error(P(330));Er(M,I),M=M.nextEffect}while(M!==null);M=null,CR(),z=o}else e.current=n;if(kr)kr=!1,Ys=e,Hs=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&&(hn=null),r===1?e===Zp?Xs++:(Xs=0,Zp=e):Xs=0,n=n.stateNode,fo&&typeof fo.onCommitFiberRoot=="function")try{fo.onCommitFiberRoot(bm,n,void 0,(n.current.flags&64)===64)}catch{}if(Ht(e,Ke()),Hu)throw Hu=!1,e=Yp,Yp=null,e;return z&8||Sn(),null}function zR(){for(;M!==null;){var e=M.alternate;gu||Qs===null||(M.flags&8?Jv(M,Qs)&&(gu=!0):M.tag===13&&DR(e,M)&&Jv(M,Qs)&&(gu=!0));var t=M.flags;t&256&&MR(e,M),!(t&512)||kr||(kr=!0,aa(97,function(){return Ar(),null})),M=M.nextEffect}}function Ar(){if(Hs!==90){var e=97<Hs?97:Hs;return Hs=90,mo(e,KR)}return!1}function VR(e,t){Xp.push(t,e),kr||(kr=!0,aa(97,function(){return Ar(),null}))}function Tw(e,t){Qp.push(t,e),kr||(kr=!0,aa(97,function(){return Ar(),null}))}function KR(){if(Ys===null)return!1;var e=Ys;if(Ys=null,z&48)throw Error(P(331));var t=z;z|=32;var n=Qp;Qp=[];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));Er(i,l)}}for(n=Xp,Xp=[],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));Er(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 z=t,Sn(),!0}function J0(e,t,n){t=Dm(n,t),t=gw(e,t,1),Sr(e,t),t=ht(),e=Zu(e,1),e!==null&&(Ku(e,1,t),Ht(e,t))}function Er(e,t){if(e.tag===3)J0(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){J0(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=Dm(t,e);var o=hw(n,e,1);if(Sr(n,o),o=ht(),n=Zu(n,1),n!==null)Ku(n,1,o),Ht(n,o);else if(typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function WR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ht(),e.pingedLanes|=e.suspendedLanes&n,Je===e&&(We&n)===n&&(_e===4||_e===3&&(We&62914560)===We&&500>Ke()-Um?Si(e,0):Hm|=n),Ht(e,t)}function $R(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(Nn===0&&(Nn=Pi),t=oi(62914560&~Nn),t===0&&(t=4194304)):t=Ci()===99?1:2:t=1),n=ht(),e=Zu(e,t),e!==null&&(Ku(e,t,n),Ht(e,n))}var kw;kw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)Zt=!0;else if(n&r)Zt=!!(e.flags&16384);else{switch(Zt=!1,t.tag){case 3:U0(t),ap();break;case 5:L0(t);break;case 1:ft(t.type)&&du(t);break;case 4:Fp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ee(ku,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?B0(e,t,n):(Ee(xe,xe.current&1),t=_n(e,t,n),t!==null?t.sibling:null);Ee(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return W0(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ee(xe,xe.current),r)break;return null;case 23:case 24:return t.lanes=0,lp(e,t,n)}return _n(e,t,n)}else Zt=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Ei(t,$e.current),hi(t,n),o=Om(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,ft(r)){var i=!0;du(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Rm(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Au(t,r,s,e),o.updater=Xu,t.stateNode=o,o._reactInternals=t,Dp(t,r,e,n),t=jp(null,t,r,!0,i,n)}else t.tag=0,ct(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=qR(o),e=Qt(o,e),i){case 0:t=Bp(null,t,o,e,n);break e;case 1:t=H0(null,t,o,e,n);break e;case 11:t=D0(null,t,o,e,n);break e;case 14:t=F0(null,t,o,Qt(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:Qt(r,o),Bp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),H0(e,t,r,o,n);case 3:if(U0(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,QS(e,t),la(t,r,null,n),r=t.memoizedState.element,r===o)ap(),t=_n(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(mr=gi(t.stateNode.containerInfo.firstChild),Mn=t,i=vn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],yi.push(i);for(n=tw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ct(e,t,r,n),ap();t=t.child}return t;case 5:return L0(t),e===null&&Hp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Op(r,o)?s=null:i!==null&&Op(r,i)&&(t.flags|=16),dw(e,t),ct(e,t,s,n),t.child;case 6:return e===null&&Hp(t),null;case 13:return B0(e,t,n);case 4:return Fp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Lu(t,null,r,n):ct(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),D0(e,t,r,o,n);case 7:return ct(e,t,t.pendingProps,n),t.child;case 8:return ct(e,t,t.pendingProps.children,n),t.child;case 12:return ct(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(Ee(ku,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&&!dt.current){t=_n(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=vr(-1,n&-n),u.tag=2,Sr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),XS(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}ct(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,hi(t,n),o=Ft(o,i.unstable_observedBits),r=r(o),t.flags|=1,ct(e,t,r,n),t.child;case 14:return o=t.type,i=Qt(o,t.pendingProps),i=Qt(o.type,i),F0(e,t,o,i,r,n);case 15:return cw(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ft(r)?(e=!0,du(t)):e=!1,hi(t,n),JS(t,r,o),Dp(t,r,o,n),jp(null,t,r,!0,e,n);case 19:return W0(e,t,n);case 23:return lp(e,t,n);case 24:return lp(e,t,n)}throw Error(P(156,t.tag))};function GR(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 GR(e,t,n,r)}function jm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qR(e){if(typeof e=="function")return jm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ju)return 11;if(e===zu)return 14}return 2}function Pr(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 hu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")jm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case dr:return wi(n.children,o,i,t);case nS:s=8,o|=16;break;case rm:s=8,o|=1;break;case Bs:return e=_t(12,n,t,o|8),e.elementType=Bs,e.type=Bs,e.lanes=i,e;case js:return e=_t(13,n,t,o),e.type=js,e.elementType=js,e.lanes=i,e;case yu:return e=_t(19,n,t,o),e.elementType=yu,e.lanes=i,e;case um:return zm(n,o,i,t);case mp:return e=_t(24,n,t,o),e.elementType=mp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case om:s=10;break e;case im:s=9;break e;case ju:s=11;break e;case zu:s=14;break e;case sm:s=16,r=null;break e;case am: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 wi(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function zm(e,t,n,r){return e=_t(23,e,r,t),e.elementType=um,e.lanes=n,e}function dp(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function fp(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 YR(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=Xf(0),this.expirationTimes=Xf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xf(0),this.mutableSourceEagerHydrationData=null}function XR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:so,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Uu(e,t,n,r){var o=t.current,i=ht(),s=wr(o);e:if(n){n=n._reactInternals;t:{if(vo(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(ft(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(ft(l)){n=VS(n,l,a);break e}}n=a}else n=Tr;return t.context===null?t.context=n:t.pendingContext=n,t=vr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Sr(o,t),xr(o,s,i),s}function pp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function eS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vm(e,t){eS(e,t),(e=e.alternate)&&eS(e,t)}function QR(){return null}function Km(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new YR(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,Rm(t),e[ki]=n.current,HS(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}Km.prototype.render=function(e){Uu(e,this._internalRoot,null,null)};Km.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Uu(null,e,null,function(){t[ki]=null})};function ha(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ZR(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 Km(e,0,t?{hydrate:!0}:void 0)}function Ju(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=pp(s);a.call(u)}}Uu(t,s,e,o)}else{if(i=n._reactRootContainer=ZR(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=pp(s);l.call(u)}}ww(function(){Uu(t,s,e,o)})}return pp(s)}yS=function(e){if(e.tag===13){var t=ht();xr(e,4,t),Vm(e,4)}};mm=function(e){if(e.tag===13){var t=ht();xr(e,67108864,t),Vm(e,67108864)}};vS=function(e){if(e.tag===13){var t=ht(),n=wr(e);xr(e,n,t),Vm(e,n)}};SS=function(e,t){return t()};bp=function(e,t,n){switch(t){case"input":if(hp(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=qu(r);if(!o)throw Error(P(90));oS(r),hp(r,o)}}}break;case"textarea":sS(e,n);break;case"select":t=n.value,t!=null&&fi(e,!!n.multiple,t,!1)}};dm=Sw;pS=function(e,t,n,r,o){var i=z;z|=4;try{return mo(98,e.bind(null,t,n,r,o))}finally{z=i,z===0&&(Ai(),Sn())}};fm=function(){!(z&49)&&(HR(),Ar())};mS=function(e,t){var n=z;z|=2;try{return e(t)}finally{z=n,z===0&&(Ai(),Sn())}};function Pw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ha(t))throw Error(P(200));return XR(e,t,null,n)}var JR={Events:[pa,li,qu,dS,fS,Ar,{current:!1}]},Ns={findFiberByHostInstance:lo,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},eA={bundleType:Ns.bundleType,version:Ns.version,rendererPackageName:Ns.rendererPackageName,rendererConfig:Ns.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:yo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hS(e),e===null?null:e.stateNode},findFiberByHostInstance:Ns.findFiberByHostInstance||QR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ms=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ms.isDisabled&&Ms.supportsFiber))try{bm=Ms.inject(eA),fo=Ms}catch{}var Ms;Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=JR;Ut.createPortal=Pw;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=hS(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e,t){var n=z;if(n&48)return e(t);z|=1;try{if(e)return mo(99,e.bind(null,t))}finally{z=n,Sn()}};Ut.hydrate=function(e,t,n){if(!ha(t))throw Error(P(200));return Ju(null,e,t,!0,n)};Ut.render=function(e,t,n){if(!ha(t))throw Error(P(200));return Ju(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!ha(e))throw Error(P(40));return e._reactRootContainer?(ww(function(){Ju(null,null,e,!1,function(){e._reactRootContainer=null,e[ki]=null})}),!0):!1};Ut.unstable_batchedUpdates=Sw;Ut.unstable_createPortal=function(e,t){return Pw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ha(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Ju(e,t,n,!1,r)};Ut.version="17.0.2"});var ec=Ce((h_,Lw)=>{"use strict";function Aw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Aw)}catch(e){console.error(e)}}Aw(),Lw.exports=Rw()});var ox=Ce(rx=>{"use strict";var _i=_();function HA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var UA=typeof Object.is=="function"?Object.is:HA,BA=_i.useState,jA=_i.useEffect,zA=_i.useLayoutEffect,VA=_i.useDebugValue;function KA(e,t){var n=t(),r=BA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return zA(function(){o.value=n,o.getSnapshot=t,yg(o)&&i({inst:o})},[e,n,t]),jA(function(){return yg(o)&&i({inst:o}),e(function(){yg(o)&&i({inst:o})})},[e]),VA(n),n}function yg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!UA(e,n)}catch{return!0}}function WA(e,t){return t()}var $A=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?WA:KA;rx.useSyncExternalStore=_i.useSyncExternalStore!==void 0?_i.useSyncExternalStore:$A});var vg=Ce((rD,ix)=>{"use strict";ix.exports=ox()});var ax=Ce(sx=>{"use strict";var lc=_(),GA=vg();function qA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YA=typeof Object.is=="function"?Object.is:qA,XA=GA.useSyncExternalStore,QA=lc.useRef,ZA=lc.useEffect,JA=lc.useMemo,eL=lc.useDebugValue;sx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=QA(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=JA(function(){function l(m){if(!u){if(u=!0,c=m,m=r(m),o!==void 0&&s.hasValue){var y=s.value;if(o(y,m))return f=y}return f=m}if(y=f,YA(c,m))return y;var v=r(m);return o!==void 0&&o(y,v)?y:(c=m,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=XA(e,i[0],i[1]);return ZA(function(){s.hasValue=!0,s.value=a},[a]),eL(a),a}});var ux=Ce((iD,lx)=>{"use strict";lx.exports=ax()});var wx=Ce(oe=>{"use strict";var Ne=typeof Symbol=="function"&&Symbol.for,wg=Ne?Symbol.for("react.element"):60103,xg=Ne?Symbol.for("react.portal"):60106,fc=Ne?Symbol.for("react.fragment"):60107,pc=Ne?Symbol.for("react.strict_mode"):60108,mc=Ne?Symbol.for("react.profiler"):60114,gc=Ne?Symbol.for("react.provider"):60109,hc=Ne?Symbol.for("react.context"):60110,Eg=Ne?Symbol.for("react.async_mode"):60111,yc=Ne?Symbol.for("react.concurrent_mode"):60111,vc=Ne?Symbol.for("react.forward_ref"):60112,Sc=Ne?Symbol.for("react.suspense"):60113,oL=Ne?Symbol.for("react.suspense_list"):60120,wc=Ne?Symbol.for("react.memo"):60115,xc=Ne?Symbol.for("react.lazy"):60116,iL=Ne?Symbol.for("react.block"):60121,sL=Ne?Symbol.for("react.fundamental"):60117,aL=Ne?Symbol.for("react.responder"):60118,lL=Ne?Symbol.for("react.scope"):60119;function St(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wg:switch(e=e.type,e){case Eg:case yc:case fc:case mc:case pc:case Sc:return e;default:switch(e=e&&e.$$typeof,e){case hc:case vc:case xc:case wc:case gc:return e;default:return t}}case xg:return t}}}function Sx(e){return St(e)===yc}oe.AsyncMode=Eg;oe.ConcurrentMode=yc;oe.ContextConsumer=hc;oe.ContextProvider=gc;oe.Element=wg;oe.ForwardRef=vc;oe.Fragment=fc;oe.Lazy=xc;oe.Memo=wc;oe.Portal=xg;oe.Profiler=mc;oe.StrictMode=pc;oe.Suspense=Sc;oe.isAsyncMode=function(e){return Sx(e)||St(e)===Eg};oe.isConcurrentMode=Sx;oe.isContextConsumer=function(e){return St(e)===hc};oe.isContextProvider=function(e){return St(e)===gc};oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wg};oe.isForwardRef=function(e){return St(e)===vc};oe.isFragment=function(e){return St(e)===fc};oe.isLazy=function(e){return St(e)===xc};oe.isMemo=function(e){return St(e)===wc};oe.isPortal=function(e){return St(e)===xg};oe.isProfiler=function(e){return St(e)===mc};oe.isStrictMode=function(e){return St(e)===pc};oe.isSuspense=function(e){return St(e)===Sc};oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fc||e===yc||e===mc||e===pc||e===Sc||e===oL||typeof e=="object"&&e!==null&&(e.$$typeof===xc||e.$$typeof===wc||e.$$typeof===gc||e.$$typeof===hc||e.$$typeof===vc||e.$$typeof===sL||e.$$typeof===aL||e.$$typeof===lL||e.$$typeof===iL)};oe.typeOf=St});var Ex=Ce((SD,xx)=>{"use strict";xx.exports=wx()});var Ax=Ce((wD,Rx)=>{"use strict";var Cg=Ex(),uL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},cL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},dL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bg={};bg[Cg.ForwardRef]=dL;bg[Cg.Memo]=kx;function Cx(e){return Cg.isMemo(e)?kx:bg[e.$$typeof]||uL}var fL=Object.defineProperty,pL=Object.getOwnPropertyNames,bx=Object.getOwnPropertySymbols,mL=Object.getOwnPropertyDescriptor,gL=Object.getPrototypeOf,Tx=Object.prototype;function Px(e,t,n){if(typeof t!="string"){if(Tx){var r=gL(t);r&&r!==Tx&&Px(e,r,n)}var o=pL(t);bx&&(o=o.concat(bx(t)));for(var i=Cx(e),s=Cx(t),a=0;a<o.length;++a){var l=o[a];if(!cL[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=mL(t,l);try{fL(e,l,u)}catch{}}}}return e}Rx.exports=Px});var Ix=Ce(ie=>{"use strict";var Tg=Symbol.for("react.element"),kg=Symbol.for("react.portal"),Ec=Symbol.for("react.fragment"),Cc=Symbol.for("react.strict_mode"),bc=Symbol.for("react.profiler"),Tc=Symbol.for("react.provider"),kc=Symbol.for("react.context"),hL=Symbol.for("react.server_context"),Pc=Symbol.for("react.forward_ref"),Rc=Symbol.for("react.suspense"),Ac=Symbol.for("react.suspense_list"),Lc=Symbol.for("react.memo"),Ic=Symbol.for("react.lazy"),yL=Symbol.for("react.offscreen"),Lx;Lx=Symbol.for("react.module.reference");function jt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Tg:switch(e=e.type,e){case Ec:case bc:case Cc:case Rc:case Ac:return e;default:switch(e=e&&e.$$typeof,e){case hL:case kc:case Pc:case Ic:case Lc:case Tc:return e;default:return t}}case kg:return t}}}ie.ContextConsumer=kc;ie.ContextProvider=Tc;ie.Element=Tg;ie.ForwardRef=Pc;ie.Fragment=Ec;ie.Lazy=Ic;ie.Memo=Lc;ie.Portal=kg;ie.Profiler=bc;ie.StrictMode=Cc;ie.Suspense=Rc;ie.SuspenseList=Ac;ie.isAsyncMode=function(){return!1};ie.isConcurrentMode=function(){return!1};ie.isContextConsumer=function(e){return jt(e)===kc};ie.isContextProvider=function(e){return jt(e)===Tc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tg};ie.isForwardRef=function(e){return jt(e)===Pc};ie.isFragment=function(e){return jt(e)===Ec};ie.isLazy=function(e){return jt(e)===Ic};ie.isMemo=function(e){return jt(e)===Lc};ie.isPortal=function(e){return jt(e)===kg};ie.isProfiler=function(e){return jt(e)===bc};ie.isStrictMode=function(e){return jt(e)===Cc};ie.isSuspense=function(e){return jt(e)===Rc};ie.isSuspenseList=function(e){return jt(e)===Ac};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ec||e===bc||e===Cc||e===Rc||e===Ac||e===yL||typeof e=="object"&&e!==null&&(e.$$typeof===Ic||e.$$typeof===Lc||e.$$typeof===Tc||e.$$typeof===kc||e.$$typeof===Pc||e.$$typeof===Lx||e.getModuleId!==void 0)};ie.typeOf=jt});var Nx=Ce((ED,Ox)=>{"use strict";Ox.exports=Ix()});var nh=Ce((U5,oE)=>{"use strict";var EI="Expected a function",nE=NaN,CI="[object Symbol]",bI=/^\s+|\s+$/g,TI=/^[-+]0x[0-9a-f]+$/i,kI=/^0b[01]+$/i,PI=/^0o[0-7]+$/i,RI=parseInt,AI=typeof global=="object"&&global&&global.Object===Object&&global,LI=typeof self=="object"&&self&&self.Object===Object&&self,II=AI||LI||Function("return this")(),OI=Object.prototype,NI=OI.toString,MI=Math.max,_I=Math.min,eh=function(){return II.Date.now()};function DI(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(EI);t=rE(t)||0,th(n)&&(c=!!n.leading,f="maxWait"in n,i=f?MI(rE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function m(C){var k=r,L=o;return r=o=void 0,u=C,s=e.apply(L,k),s}function y(C){return u=C,a=setTimeout(g,t),c?m(C):s}function v(C){var k=C-l,L=C-u,I=t-k;return f?_I(I,i-L):I}function p(C){var k=C-l,L=C-u;return l===void 0||k>=t||k<0||f&&L>=i}function g(){var C=eh();if(p(C))return h(C);a=setTimeout(g,v(C))}function h(C){return a=void 0,d&&r?m(C):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:h(eh())}function T(){var C=eh(),k=p(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return y(l);if(f)return a=setTimeout(g,t),m(l)}return a===void 0&&(a=setTimeout(g,t)),s}return T.cancel=w,T.flush=x,T}function th(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function FI(e){return!!e&&typeof e=="object"}function HI(e){return typeof e=="symbol"||FI(e)&&NI.call(e)==CI}function rE(e){if(typeof e=="number")return e;if(HI(e))return nE;if(th(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=th(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(bI,"");var n=kI.test(e);return n||PI.test(e)?RI(e.slice(2),n?2:8):TI.test(e)?nE:+e}oE.exports=DI});var pE=Ce((o6,fE)=>{"use strict";var WI=/["'&<>]/;fE.exports=$I;function $I(e){var t=""+e,n=WI.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var p2={};Qe(p2,{Card:()=>fe,ContentEditableInput:()=>jo,DeepdeskAPI:()=>or,DeepdeskSDK:()=>wl,HTTPClient:()=>fn,InputMediator:()=>rr,InputType:()=>ro,KeyboardHint:()=>Fl,Label:()=>Hl,Locale:()=>ba,Section:()=>Ln,SectionList:()=>Ul,Sources:()=>In,Suggestion:()=>re,SuggestionList:()=>gt,TextAreaInput:()=>zo,ToggleButton:()=>no,attachFile:()=>sk,authenticateWithKey:()=>ok,createFullRange:()=>as,createOverlayContainer:()=>Sl,createRangeFromOffsets:()=>qr,escapeHTML:()=>$i,fetchPlatformConfig:()=>ik,formatTextMarkup:()=>rk,getRangeOffsets:()=>gl,getRangeText:()=>hl,insertCKEditor:()=>nk,isHTML:()=>xd,isSupportedInputElement:()=>gf,updateContentEditable:()=>ek,updateTextArea:()=>JT,useStyles:()=>A,waitForElementVisibilityChange:()=>vf});var Nf=S(ee()),Ot=S(_());var Nl=S(_()),uv=S(ee()),ys=Nl.default.createContext({});function A(e,t){let{debug:n,...r}=(0,Nl.useContext)(ys),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,uv.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var cv={root:"jo"};var Zr=S(b()),Ml=()=>(0,Zr.jsxs)("svg",{className:cv.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Zr.jsx)("defs",{children:(0,Zr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Zr.jsx)("title",{children:"Failed loading image"}),(0,Zr.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 Of={root:"Yo",imageWrapper:"F",image:"qo",content:"m",title:"Co",contentIsCropped:"So",lineClamp:"Eo"};var Jr=S(b()),_l=(0,Ot.createContext)(Of),Fk=({title:e,src:t})=>{let n=(0,Ot.useContext)(_l),[r,o]=(0,Ot.useState)(!1);return(0,Ot.useEffect)(()=>{o(!1)},[t]),(0,Jr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Jr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Jr.jsx)(Ml,{})})},Hk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Ot.useContext)(_l);return(0,Jr.jsx)("div",{className:(0,Nf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Uk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Ot.useContext)(_l);return Ot.default.createElement(e,{className:(0,Nf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Dl=({children:e})=>{let t=A("Card",Of);return(0,Jr.jsx)("div",{className:t.root,children:(0,Jr.jsx)(_l.Provider,{value:t,children:e})})};Dl.Image=Fk;Dl.Content=Hk;Dl.Title=Uk;var fe=Dl;var hv=S(ee());var gv={root:"H"};var yv=S(b());var jk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},zk=({className:e,keyCode:t,...n})=>{let r=A("KeyboardHint",gv);return(0,yv.jsx)("span",{"data-key":jk[t],className:(0,hv.default)(e,r.root),...n})},Fl=zk;var Sv=S(ee());var vv={root:"Go"};var wv=S(b()),Kk=({className:e,children:t,...n})=>{let r=A("Label",vv);return(0,wv.jsx)("span",{...n,className:(0,Sv.default)(e,r.root),children:t})},Hl=Kk;var xv={root:"No",subTitleContainer:"Ao",subtitle:"Fo",suggestions:"Ho"};var Qo=S(b()),$k=({title:e,children:t,type:n,...r})=>{let o=A("Section",xv);return(0,Qo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,Qo.jsx)("div",{className:o.subTitleContainer,children:(0,Qo.jsx)("span",{className:o.subtitle,children:e})}),(0,Qo.jsx)("div",{className:o.suggestions,children:t})]})},Ln=$k;var Cv=S(ee()),bv=S(_());var Ev={root:"Lo"};var Tv=S(b()),qk=bv.default.forwardRef(({className:e,children:t},n)=>{let r=A("SectionList",Ev);return(0,Tv.jsx)("div",{ref:n,className:(0,Cv.default)(r.root,e),children:t})}),Ul=qk;var Zo=S(ee()),Ze=S(_());var Mf={fadein:"L",root:"e",isClickable:"M",isSelected:"Mo",actions:"R",actionsIsFixed:"Ro",actionButton:"t",dropdownList:"T",dropdownButton:"U",dropdownItem:"B",dropdownItemButton:"D",actionButtonIsPrimary:"To",actionButtonIsDisabled:"Uo",labels:"Bo",label:"Do",iconButtons:"I",iconButton:"n"};var lt=S(b()),eo=(0,Ze.createContext)(Mf),Xk=({fixed:e,children:t,...n})=>{let r=(0,Ze.useContext)(eo);return(0,lt.jsx)("div",{...n,className:(0,Zo.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})};function kv(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type===Pv}var Pv=({className:e,icon:t,title:n,...r})=>{let o=(0,Ze.useContext)(eo);return(0,lt.jsx)("button",{type:"button",className:(0,Zo.default)(o.iconButton,e),title:n,"aria-label":n,...r,children:t})},Qk=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,Ze.useContext)(eo);return(0,lt.jsxs)("div",{className:(0,Zo.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,lt.jsx)("ul",{className:i.dropdownList,children:o})]})},Zk=({index:e,label:t,onClick:n})=>{let r=(0,Ze.useContext)(eo);return(0,lt.jsx)("li",{className:r.dropdownItem,children:(0,lt.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,Ze.useContext)(eo);return(0,lt.jsx)("button",{type:"button",className:(0,Zo.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},eP=({labels:e})=>{let t=(0,Ze.useContext)(eo);return(0,lt.jsx)("div",{className:t.labels,children:e.map(n=>(0,lt.jsx)("span",{className:t.label,children:n},n))})},to=Ze.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=A("Suggestion",Mf),l=(0,Ze.useCallback)(f=>{f.preventDefault(),n&&n(f)},[n]),u=Ze.default.Children.toArray(r).filter(kv),c=Ze.default.Children.toArray(r).filter(f=>!kv(f));return(0,lt.jsx)(o,{...i,ref:s,className:(0,Zo.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,lt.jsxs)(eo.Provider,{value:a,children:[c,(0,lt.jsx)("div",{className:a.iconButtons,children:u})]})})});to.Labels=eP;to.Actions=Xk;to.ActionButton=Jk;to.DropdownButton=Qk;to.DropdownItem=Zk;to.IconButton=Pv;var re=to;var Av=S(ee());var Rv={root:"Io",isWithDivider:"Oo"};var Lv=S(b()),nP=({withDivider:e,children:t})=>{let n=A("SuggestionList",Rv);return(0,Lv.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Av.default)(n.root,{[n.isWithDivider]:e}),children:t})},gt=nP;var Ov=S(ee());var Iv={root:"u",isCollapsed:"O"};var Bl=S(b()),oP=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=A("ToggleButton",Iv);return(0,Bl.jsx)("button",{type:"button",className:(0,Ov.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Bl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Bl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},no=oP;var Nv=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,jl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Mv=/x-deepdesk-(([a-z0-9\-_])+-version)/,In=(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))(In||{}),ro=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(ro||{});var Gt=S(ec());var dC=S(_());function Bt(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 Hn(e){return!!e&&!!e[ve]}function Jt(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)===lA}(e)||Array.isArray(e)||!!e[Fw]||!!(!((t=e.constructor)===null||t===void 0)&&t[Fw])||Jm(e)||eg(e))}function wo(e,t,n){n===void 0&&(n=!1),Oi(e)===0?(n?Object.keys:Ii)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Oi(e){var t=e[ve];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Jm(e)?2:eg(e)?3:0}function Li(e,t){return Oi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function tA(e,t){return Oi(e)===2?e.get(t):e[t]}function Hw(e,t,n){var r=Oi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Uw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Jm(e){return sA&&e instanceof Map}function eg(e){return aA&&e instanceof Set}function Lr(e){return e.o||e.t}function tg(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=zw(e);delete t[ve];for(var n=Ii(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 ng(e,t){return t===void 0&&(t=!1),rg(e)||Hn(e)||!Jt(e)||(Oi(e)>1&&(e.set=e.add=e.clear=e.delete=nA),Object.freeze(e),t&&wo(e,function(n,r){return ng(r,!0)},!0)),e}function nA(){Bt(2)}function rg(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wn(e){var t=Zm[e];return t||Bt(18,e),t}function rA(e,t){Zm[e]||(Zm[e]=t)}function Ym(){return va}function Wm(e,t){t&&(wn("Patches"),e.u=[],e.s=[],e.v=t)}function tc(e){Xm(e),e.p.forEach(oA),e.p=null}function Xm(e){e===va&&(va=e.l)}function Iw(e){return va={p:[],l:va,h:e,m:!0,_:0}}function oA(e){var t=e[ve];t.i===0||t.i===1?t.j():t.g=!0}function $m(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||wn("ES5").S(t,e,r),r?(n[ve].P&&(tc(t),Bt(4)),Jt(e)&&(e=nc(t,e),t.l||rc(t,e)),t.u&&wn("Patches").M(n[ve].t,e,t.u,t.s)):e=nc(t,n,[]),tc(t),t.u&&t.v(t.u,t.s),e!==jw?e:void 0}function nc(e,t,n){if(rg(t))return t;var r=t[ve];if(!r)return wo(t,function(a,l){return Ow(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return rc(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=tg(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),wo(i,function(a,l){return Ow(e,r,o,a,l,n,s)}),rc(e,o,!1),n&&e.u&&wn("Patches").N(r,n,e.u,e.s)}return r.o}function Ow(e,t,n,r,o,i,s){if(Hn(o)){var a=nc(e,o,i&&t&&t.i!==3&&!Li(t.R,r)?i.concat(r):void 0);if(Hw(n,r,a),!Hn(a))return;e.m=!1}else s&&n.add(o);if(Jt(o)&&!rg(o)){if(!e.h.D&&e._<1)return;nc(e,o),t&&t.A.l||rc(e,o)}}function rc(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&ng(t,n)}function Gm(e,t){var n=e[ve];return(n?Lr(n):e)[t]}function Nw(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 Ir(e){e.P||(e.P=!0,e.l&&Ir(e.l))}function qm(e){e.o||(e.o=tg(e.t))}function Qm(e,t,n){var r=Jm(t)?wn("MapSet").F(t,n):eg(t)?wn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Ym(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Sa;s&&(l=[a],u=ya);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):wn("ES5").J(t,n);return(n?n.A:Ym()).p.push(r),r}function iA(e){return Hn(e)||Bt(22,e),function t(n){if(!Jt(n))return n;var r,o=n[ve],i=Oi(n);if(o){if(!o.P&&(o.i<4||!wn("ES5").K(o)))return o.t;o.I=!0,r=Mw(n,i),o.I=!1}else r=Mw(n,i);return wo(r,function(s,a){o&&tA(o.t,s)===a||Hw(r,s,t(a))}),i===3?new Set(r):r}(e)}function Mw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return tg(e)}function Bw(){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[ve];return Sa.get(u,s)},set:function(u){var c=this[ve];Sa.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ve];if(!l.P)switch(l.i){case 5:r(l)&&Ir(l);break;case 4:n(l)&&Ir(l)}}}function n(s){for(var a=s.t,l=s.k,u=Ii(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==ve){var d=a[f];if(d===void 0&&!Li(a,f))return!0;var m=l[f],y=m&&m[ve];if(y?y.t!==d:!Uw(m,d))return!0}}var v=!!a[ve];return u.length!==Ii(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&&Bt(3,JSON.stringify(Lr(s)))}var i={};rA("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var m=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(m,""+y,e(y,!0));return m}var v=zw(d);delete v[ve];for(var p=Ii(v),g=0;g<p.length;g++){var h=p[g];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:Ym(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ve,{value:c,writable:!0}),u},S:function(s,a,l){l?Hn(a)&&a[ve].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[ve];if(f){var d=f.t,m=f.k,y=f.R,v=f.i;if(v===4)wo(m,function(x){x!==ve&&(d[x]!==void 0||Li(d,x)?y[x]||u(m[x]):(y[x]=!0,Ir(f)))}),wo(d,function(x){m[x]!==void 0||Li(m,x)||(y[x]=!1,Ir(f))});else if(v===5){if(r(f)&&(Ir(f),y.length=!0),m.length<d.length)for(var p=m.length;p<d.length;p++)y[p]=!1;else for(var g=d.length;g<m.length;g++)y[g]=!0;for(var h=Math.min(m.length,d.length),w=0;w<h;w++)m.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&u(m[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var _w,va,og=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",sA=typeof Map<"u",aA=typeof Set<"u",Dw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",jw=og?Symbol.for("immer-nothing"):((_w={})["immer-nothing"]=!0,_w),Fw=og?Symbol.for("immer-draftable"):"__$immer_draftable",ve=og?Symbol.for("immer-state"):"__$immer_state";var lA=""+Object.prototype.constructor,Ii=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,zw=Object.getOwnPropertyDescriptors||function(e){var t={};return Ii(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Zm={},Sa={get:function(e,t){if(t===ve)return e;var n=Lr(e);if(!Li(n,t))return function(o,i,s){var a,l=Nw(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||!Jt(r)?r:r===Gm(e.t,t)?(qm(e),e.o[t]=Qm(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=Nw(Lr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Gm(Lr(e),t),i=o==null?void 0:o[ve];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Uw(n,o)&&(n!==void 0||Li(e.t,t)))return!0;qm(e),Ir(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 Gm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,qm(e),Ir(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(){Bt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Bt(12)}},ya={};wo(Sa,function(e,t){ya[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ya.deleteProperty=function(e,t){return ya.set.call(this,e,t,void 0)},ya.set=function(e,t,n){return Sa.set.call(this,e[0],t,n,e[0])};var uA=function(){function e(n){var r=this;this.O=Dw,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 p=this;v===void 0&&(v=a);for(var g=arguments.length,h=Array(g>1?g-1:0),w=1;w<g;w++)h[w-1]=arguments[w];return l.produce(v,function(x){var T;return(T=i).call.apply(T,[p,x].concat(h))})}}var u;if(typeof i!="function"&&Bt(6),s!==void 0&&typeof s!="function"&&Bt(7),Jt(o)){var c=Iw(r),f=Qm(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?tc(c):Xm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Wm(c,s),$m(v,c)},function(v){throw tc(c),v}):(Wm(c,s),$m(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===jw&&(u=void 0),r.D&&ng(u,!0),s){var m=[],y=[];wn("Patches").M(o,u,m,y),s(m,y)}return u}Bt(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(m){return o.apply(void 0,[m].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){Jt(n)||Bt(8),Hn(n)&&(n=iA(n));var r=Iw(this),o=Qm(this,n,void 0);return o[ve].C=!0,Xm(r),o},t.finishDraft=function(n,r){var o=n&&n[ve],i=o.A;return Wm(i,r),$m(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!Dw&&Bt(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=wn("Patches").$;return Hn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),vt=new uA,cA=vt.produce,y_=vt.produceWithPatches.bind(vt),v_=vt.setAutoFreeze.bind(vt),S_=vt.setUseProxies.bind(vt),w_=vt.applyPatches.bind(vt),x_=vt.createDraft.bind(vt),E_=vt.finishDraft.bind(vt),oc=cA;function Or(e){"@babel/helpers - typeof";return Or=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},Or(e)}function ig(e,t){if(Or(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Or(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sg(e){var t=ig(e,"string");return Or(t)==="symbol"?t:String(t)}function ag(e,t,n){return t=sg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vw(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 ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vw(Object(n),!0).forEach(function(r){ag(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ge(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 Kw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),lg=function(){return Math.random().toString(36).substring(7).split("").join(".")},sc={INIT:"@@redux/INIT"+lg(),REPLACE:"@@redux/REPLACE"+lg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+lg()}};function dA(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 ug(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ge(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ge(1));return n(ug)(e,t)}if(typeof e!="function")throw new Error(Ge(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(Ge(3));return i}function f(v){if(typeof v!="function")throw new Error(Ge(4));if(l)throw new Error(Ge(5));var p=!0;return u(),a.push(v),function(){if(p){if(l)throw new Error(Ge(6));p=!1,u();var h=a.indexOf(v);a.splice(h,1),s=null}}}function d(v){if(!dA(v))throw new Error(Ge(7));if(typeof v.type>"u")throw new Error(Ge(8));if(l)throw new Error(Ge(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var p=s=a,g=0;g<p.length;g++){var h=p[g];h()}return v}function m(v){if(typeof v!="function")throw new Error(Ge(10));o=v,d({type:sc.REPLACE})}function y(){var v,p=f;return v={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ge(11));function w(){h.next&&h.next(c())}w();var x=p(w);return{unsubscribe:x}}},v[Kw]=function(){return this},v}return d({type:sc.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:m},r[Kw]=y,r}function fA(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:sc.INIT});if(typeof r>"u")throw new Error(Ge(12));if(typeof n(void 0,{type:sc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ge(13))})}function ac(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{fA(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,m={},y=0;y<i.length;y++){var v=i[y],p=n[v],g=u[v],h=p(g,c);if(typeof h>"u"){var w=c&&c.type;throw new Error(Ge(14))}m[v]=h,d=d||h!==g}return d=d||i.length!==Object.keys(u).length,d?m:u}}function Ni(){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 Ww(){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(Ge(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Ni.apply(void 0,a)(o.dispatch),ic(ic({},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 Gw=$w();Gw.withExtraArgument=$w;var cg=Gw;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)}}(),pA=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}}},Mi=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},mA=Object.defineProperty,gA=Object.defineProperties,hA=Object.getOwnPropertyDescriptors,qw=Object.getOwnPropertySymbols,yA=Object.prototype.hasOwnProperty,vA=Object.prototype.propertyIsEnumerable,Yw=function(e,t,n){return t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Nr=function(e,t){for(var n in t||(t={}))yA.call(t,n)&&Yw(e,n,t[n]);if(qw)for(var r=0,o=qw(t);r<o.length;r++){var n=o[r];vA.call(t,n)&&Yw(e,n,t[n])}return e},dg=function(e,t){return gA(e,hA(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 wA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ni:Ni.apply(null,arguments)},B_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function xA(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 EA=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,Mi([void 0],n[0].concat(this)))):new(t.bind.apply(t,Mi([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,Mi([void 0],n[0].concat(this)))):new(t.bind.apply(t,Mi([void 0],n.concat(this))))},t}(Array);function mg(e){return Jt(e)?oc(e,function(){}):e}function bA(e){return typeof e=="boolean"}function TA(){return function(t){return kA(t)}}function kA(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 EA;if(n&&(bA(n)?a.push(cg):a.push(cg.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var fg=!0;function Jw(e){var t=TA(),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,m;if(typeof o=="function")m=o;else if(xA(o))m=ac(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),!fg&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!fg&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Ww.apply(void 0,y),p=Ni;l&&(p=wA(Nr({trace:!fg},typeof l=="object"&&l)));var g=new CA(v),h=g;Array.isArray(d)?h=Mi([v],d):typeof d=="function"&&(h=d(g));var w=p.apply(void 0,h);return ug(m,c,w)}function we(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 Nr(Nr({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 ex(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 PA(e){return typeof e=="function"}function RA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?ex(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(PA(e))l=function(){return mg(e())};else{var u=mg(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var m=Mi([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return m.filter(function(y){return!!y}).length===0&&(m=[a]),m.reduce(function(y,v){if(v)if(Hn(y)){var p=y,g=v(p,d);return g===void 0?y:g}else{if(Jt(y))return oc(y,function(h){return v(h,d)});var g=v(y,d);if(g===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}return y},f)}return c.getInitialState=l,c}function AA(e,t){return e+"/"+t}function G(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:mg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=AA(t,c),m,y;"reducer"in f?(m=f.reducer,y=f.prepare):m=f,i[c]=m,s[d]=m,a[c]=y?we(d,y):we(d)});function l(){var c=typeof e.extraReducers=="function"?ex(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,m=c[1],y=m===void 0?[]:m,v=c[2],p=v===void 0?void 0:v,g=Nr(Nr({},d),s);return RA(n,function(h){for(var w in g)h.addCase(w,g[w]);for(var x=0,T=y;x<T.length;x++){var C=T[x];h.addMatcher(C.matcher,C.reducer)}p&&h.addDefaultCase(p)})}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 LA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",IA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=LA[Math.random()*64|0];return t},OA=["name","message","stack","code"],pg=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Xw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),NA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=OA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},U=function(){function e(t,n,r){var o=we(t+"/fulfilled",function(c,f,d,m){return{payload:c,meta:dg(Nr({},m||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=we(t+"/pending",function(c,f,d){return{payload:void 0,meta:dg(Nr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=we(t+"/rejected",function(c,f,d,m,y){return{payload:m,error:(r&&r.serializeError||NA)(c||"Rejected"),meta:dg(Nr({},y||{}),{arg:d,requestId:f,rejectedWithValue:!!m,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,m){var y=r!=null&&r.idGenerator?r.idGenerator(c):IA(),v=new l,p,g=!1;function h(x){p=x,v.abort()}var w=function(){return SA(this,null,function(){var x,T,C,k,L,I,N;return pA(this,function(V){switch(V.label){case 0:return V.trys.push([0,4,,5]),k=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:m}),_A(k)?[4,k]:[3,2];case 1:k=V.sent(),V.label=2;case 2:if(k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return g=!0,L=new Promise(function(K,se){return v.signal.addEventListener("abort",function(){return se({name:"AbortError",message:p||"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:m}))),[4,Promise.race([L,Promise.resolve(n(c,{dispatch:f,getState:d,extra:m,requestId:y,signal:v.signal,abort:h,rejectWithValue:function(K,se){return new pg(K,se)},fulfillWithValue:function(K,se){return new Xw(K,se)}})).then(function(K){if(K instanceof pg)throw K;return K instanceof Xw?o(K.payload,y,c,K.meta):o(K,y,c)})])];case 3:return C=V.sent(),[3,5];case 4:return I=V.sent(),C=I instanceof pg?s(null,y,c,I.payload,I.meta):s(I,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(w,{abort:h,requestId:y,arg:c,unwrap:function(){return w.then(MA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function MA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _A(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var DA="task",tx="listener",nx="completed",gg="cancelled",K_="task-"+gg,W_="task-"+nx,$_=tx+"-"+gg,G_=tx+"-"+nx,q_=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=DA+" "+gg+" (reason: "+t+")"}return e}();var hg="listenerMiddleware";var Y_=we(hg+"/add"),X_=we(hg+"/removeAll"),Q_=we(hg+"/remove");var Qw,Z_=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Qw||(Qw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},FA=function(e){return function(t){setTimeout(t,e)}},J_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:FA(10);Bw();var Kx=S(vg()),Wx=S(ux());var Sg=S(ec());function tL(e){e()}var cx=tL,dx=e=>cx=e,fx=()=>cx;var Di=S(_());var gx=S(_());var uc=S(_()),px=Symbol.for(`react-redux-context-${uc.version}`),mx=globalThis;function nL(){let e=mx[px];return e||(e=(0,uc.createContext)(null),mx[px]=e),e}var qe=new Proxy({},new Proxy({},{get(e,t){let n=nL();return(r,...o)=>Reflect[t](n,...o)}}));function wa(e=qe){return function(){return(0,gx.useContext)(e)}}var cc=wa();var dc=()=>{throw new Error("uSES not initialized!")};var hx=dc,yx=e=>{hx=e},rL=(e,t)=>e===t;function vx(e=qe){let t=e===qe?cc:wa(e);return function(r,o={}){let{equalityFn:i=rL,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(),m=(0,Di.useRef)(!0),y=(0,Di.useCallback)({[r.name](p){return r(p)}}[r.name],[r,f,s]),v=hx(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Di.useDebugValue)(v),v}}var O=vx();function Un(){return Un=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},Un.apply(this,arguments)}function xa(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 Ag=S(Ax()),ae=S(_()),Bx=S(Nx());var SL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function wL(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function m(h,w){return l=h,u=w,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 p(){let h=e(l,u),w=!s(h,c);return c=h,w&&(d=n(c,f,u)),d}function g(h,w){let x=!i(w,u),T=!o(h,l,w,u);return l=h,u=w,x&&T?y():x?v():T?p():d}return function(w,x){return a?g(w,x):m(w,x)}}function Pg(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=xa(t,SL),s=n(e,i),a=r(e,i),l=o(e,i);return wL(s,a,l,e,i)}function Rg(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function Ea(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Mx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Oc(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=Mx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Mx(u),u=i(a,l)),u},i}}function Fi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function _x(e){return e&&typeof e=="object"?Ea(t=>Rg(e,t)):e?typeof e=="function"?Oc(e,"mapDispatchToProps"):Fi(e,"mapDispatchToProps"):Ea(t=>({dispatch:t}))}function Dx(e){return e?typeof e=="function"?Oc(e,"mapStateToProps"):Fi(e,"mapStateToProps"):Ea(()=>({}))}function xL(e,t,n){return Un({},n,e,t)}function EL(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function Fx(e){return e?typeof e=="function"?EL(e):Fi(e,"mergeProps"):()=>xL}function CL(){let e=fx(),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 Hx={notify(){},get:()=>[]};function Nc(e,t){let n,r=Hx;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=CL())}function u(){n&&(n(),n=void 0,r.clear(),r=Hx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Mc=S(_()),bL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hi=bL?Mc.useLayoutEffect:Mc.useEffect;function Ux(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Ui(e,t){if(Ux(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])||!Ux(e[n[o]],t[n[o]]))return!1;return!0}var TL=["reactReduxForwardedRef"],jx=dc,zx=e=>{jx=e};var kL=[null,null];function PL(e,t,n){Hi(()=>e(...t),n)}function RL(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function AL(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,m=()=>{if(f||!a.current)return;let v=t.getState(),p,g;try{p=r(v,o.current)}catch(h){g=h,d=h}g||(d=null),p===i.current?s.current||u():(i.current=p,l.current=p,s.current=!0,c())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function LL(e,t){return e===t}function IL(e,t,n,{pure:r,areStatesEqual:o=LL,areOwnPropsEqual:i=Ui,areStatePropsEqual:s=Ui,areMergedPropsEqual:a=Ui,forwardRef:l=!1,context:u=qe}={}){let c=u,f=Dx(e),d=_x(t),m=Fx(n),y=!!e;return p=>{let g=p.displayName||p.name||"Component",h=`Connect(${g})`,w={shouldHandleStateChanges:y,displayName:h,wrappedComponentName:g,WrappedComponent:p,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[L,I,N]=(0,ae.useMemo)(()=>{let{reactReduxForwardedRef:it}=k,Lt=xa(k,TL);return[k.context,it,Lt]},[k]),V=(0,ae.useMemo)(()=>L&&L.Consumer&&(0,Bx.isContextConsumer)(ae.default.createElement(L.Consumer,null))?L:c,[L,c]),K=(0,ae.useContext)(V),se=!!k.store&&!!k.store.getState&&!!k.store.dispatch,ds=!!K&&!!K.store,Rt=se?k.store:K.store,ir=ds?K.getServerState:Rt.getState,At=(0,ae.useMemo)(()=>Pg(Rt.dispatch,w),[Rt]),[F,X]=(0,ae.useMemo)(()=>{if(!y)return kL;let it=Nc(Rt,se?void 0:K.subscription),Lt=it.notifyNestedSubs.bind(it);return[it,Lt]},[Rt,se,K]),sr=(0,ae.useMemo)(()=>se?K:Un({},K,{subscription:F}),[se,K,F]),he=(0,ae.useRef)(),ar=(0,ae.useRef)(N),$=(0,ae.useRef)(),lr=(0,ae.useRef)(!1),xl=(0,ae.useRef)(!1),Ko=(0,ae.useRef)(!1),Yr=(0,ae.useRef)();Hi(()=>(Ko.current=!0,()=>{Ko.current=!1}),[]);let fs=(0,ae.useMemo)(()=>()=>$.current&&N===ar.current?$.current:At(Rt.getState(),N),[Rt,N]),El=(0,ae.useMemo)(()=>Lt=>F?AL(y,Rt,F,At,ar,he,lr,Ko,$,X,Lt):()=>{},[F]);PL(RL,[ar,he,lr,N,$,X]);let qt;try{qt=jx(El,fs,ir?()=>At(ir(),N):fs)}catch(it){throw Yr.current&&(it.message+=`
|
|
9
|
+
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}_e!==5&&(_e=2),l=Bm(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=xw(d,i,t);N0(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"&&(hn===null||!hn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var L=Ew(d,i,t);N0(d,L);break e}}d=d.return}while(d!==null)}Lw(n)}catch(I){t=I,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(1)}function Rw(){var e=Uu.current;return Uu.current=Hu,e===null?Hu:e}function js(e,t){var n=z;z|=16;var r=Rw();Je===e&&$e===t||xi(e,t);do try{WR();break}catch(o){Pw(e,o)}while(1);if(Lm(),z=n,Uu.current=r,Pe!==null)throw Error(R(261));return Je=null,$e=0,_e}function WR(){for(;Pe!==null;)Aw(Pe)}function $R(){for(;Pe!==null&&!PR();)Aw(Pe)}function Aw(e){var t=Nw(e.alternate,e,ho);e.memoizedProps=e.pendingProps,t===null?Lw(e):Pe=t,jm.current=null}function Lw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=FR(t),n!==null){n.flags&=2047,Pe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=DR(n,t,ho),n!==null){Pe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||ho&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){Pe=t;return}Pe=t=e}while(t!==null);_e===0&&(_e=5)}function so(e){var t=Ti();return go(99,GR.bind(null,e,t)),null}function GR(e,t){do Lr();while(Qs!==null);if(z&48)throw Error(R(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(R(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===Je&&(Pe=Je=null,$e=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=z,z|=32,jm.current=null,sp=cu,s=S0(),Op(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,p=-1,d=-1,g=0,y=0,v=s,f=null;t:for(;;){for(var m;v!==a||i!==0&&v.nodeType!==3||(p=c+i),v!==l||u!==0&&v.nodeType!==3||(d=c+u),v.nodeType===3&&(c+=v.nodeValue.length),(m=v.firstChild)!==null;)f=v,v=m;for(;;){if(v===s)break t;if(f===a&&++g===i&&(p=c),f===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=f,f=v.parentNode}v=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;ap={focusedElem:s,selectionRange:a},cu=!1,Js=null,yu=!1,M=r;do try{qR()}catch(I){if(M===null)throw Error(R(330));Cr(M,I),M=M.nextEffect}while(M!==null);Js=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&ta(M.stateNode,""),h&128){var w=M.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(h&1038){case 2:rS(M),M.flags&=-3;break;case 6:rS(M),M.flags&=-3,mp(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,mp(M.alternate,M);break;case 4:mp(M.alternate,M);break;case 8:a=M,Cw(s,a);var T=a.alternate;tS(a),T!==null&&tS(T)}M=M.nextEffect}}catch(I){if(M===null)throw Error(R(330));Cr(M,I),M=M.nextEffect}while(M!==null);if(x=ap,w=S0(),h=x.focusedElem,s=x.selectionRange,w!==h&&h&&h.ownerDocument&&jS(h.ownerDocument.documentElement,h)){for(s!==null&&Op(h)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in h?(h.selectionStart=w,h.selectionEnd=Math.min(x,h.value.length)):(x=(w=h.ownerDocument||document)&&w.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=v0(h,T),i=v0(h,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=h;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<w.length;h++)x=w[h],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}cu=!!sp,ap=sp=null,e.current=n,M=r;do try{for(h=e;M!==null;){var C=M.flags;if(C&36&&jR(h,M.alternate,M),C&128){w=void 0;var k=M.ref;if(k!==null){var L=M.stateNode;switch(M.tag){case 5:w=L;break;default:w=L}typeof k=="function"?k(w):k.current=w}}M=M.nextEffect}}catch(I){if(M===null)throw Error(R(330));Cr(M,I),M=M.nextEffect}while(M!==null);M=null,AR(),z=o}else e.current=n;if(Pr)Pr=!1,Qs=e,Bs=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&&(hn=null),r===1?e===nm?Zs++:(Zs=0,nm=e):Zs=0,n=n.stateNode,po&&typeof po.onCommitFiberRoot=="function")try{po.onCommitFiberRoot(Rm,n,void 0,(n.current.flags&64)===64)}catch{}if(Ht(e,We()),Bu)throw Bu=!1,e=Jp,Jp=null,e;return z&8||Sn(),null}function qR(){for(;M!==null;){var e=M.alternate;yu||Js===null||(M.flags&8?i0(M,Js)&&(yu=!0):M.tag===13&&zR(e,M)&&i0(M,Js)&&(yu=!0));var t=M.flags;t&256&&BR(e,M),!(t&512)||Pr||(Pr=!0,ua(97,function(){return Lr(),null})),M=M.nextEffect}}function Lr(){if(Bs!==90){var e=97<Bs?97:Bs;return Bs=90,go(e,XR)}return!1}function YR(e,t){em.push(t,e),Pr||(Pr=!0,ua(97,function(){return Lr(),null}))}function Iw(e,t){tm.push(t,e),Pr||(Pr=!0,ua(97,function(){return Lr(),null}))}function XR(){if(Qs===null)return!1;var e=Qs;if(Qs=null,z&48)throw Error(R(331));var t=z;z|=32;var n=tm;tm=[];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(R(330));Cr(i,l)}}for(n=em,em=[],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(R(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 z=t,Sn(),!0}function iS(e,t,n){t=Bm(n,t),t=xw(e,t,1),wr(e,t),t=yt(),e=ec(e,1),e!==null&&($u(e,1,t),Ht(e,t))}function Cr(e,t){if(e.tag===3)iS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){iS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r))){e=Bm(t,e);var o=Ew(n,e,1);if(wr(n,o),o=yt(),n=ec(n,1),n!==null)$u(n,1,o),Ht(n,o);else if(typeof r.componentDidCatch=="function"&&(hn===null||!hn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function QR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,Je===e&&($e&n)===n&&(_e===4||_e===3&&($e&62914560)===$e&&500>We()-Vm?xi(e,0):zm|=n),Ht(e,t)}function ZR(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=Ai),t=si(62914560&~Mn),t===0&&(t=4194304)):t=Ti()===99?1:2:t=1),n=yt(),e=ec(e,t),e!==null&&($u(e,t,n),Ht(e,n))}var Nw;Nw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)Zt=!0;else if(n&r)Zt=!!(e.flags&16384);else{switch(Zt=!1,t.tag){case 3:W0(t),dp();break;case 5:D0(t);break;case 1:pt(t.type)&&pu(t);break;case 4:jp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ee(Ru,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?$0(e,t,n):(Ee(xe,xe.current&1),t=Dn(e,t,n),t!==null?t.sibling:null);Ee(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Q0(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ee(xe,xe.current),r)break;return null;case 23:case 24:return t.lanes=0,fp(e,t,n)}return Dn(e,t,n)}else Zt=!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=bi(t,Ge.current),vi(t,n),o=Dm(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,pt(r)){var i=!0;pu(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Nm(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Iu(t,r,s,e),o.updater=Zu,t.stateNode=o,o._reactInternals=t,Bp(t,r,e,n),t=Wp(null,t,r,!0,i,n)}else t.tag=0,dt(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=eA(o),e=Qt(o,e),i){case 0:t=Kp(null,t,o,e,n);break e;case 1:t=K0(null,t,o,e,n);break e;case 11:t=z0(null,t,o,e,n);break e;case 14:t=V0(null,t,o,Qt(o.type,e),r,n);break e}throw Error(R(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),Kp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),K0(e,t,r,o,n);case 3:if(W0(t),r=t.updateQueue,e===null||r===null)throw Error(R(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,rw(e,t),ca(t,r,null,n),r=t.memoizedState.element,r===o)dp(),t=Dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(gr=yi(t.stateNode.containerInfo.firstChild),_n=t,i=vn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Si.push(i);for(n=aw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else dt(e,t,r,n),dp();t=t.child}return t;case 5:return D0(t),e===null&&zp(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Dp(r,o)?s=null:i!==null&&Dp(r,i)&&(t.flags|=16),yw(e,t),dt(e,t,s,n),t.child;case 6:return e===null&&zp(t),null;case 13:return $0(e,t,n);case 4:return jp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Nu(t,null,r,n):dt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),z0(e,t,r,o,n);case 7:return dt(e,t,t.pendingProps,n),t.child;case 8:return dt(e,t,t.pendingProps.children,n),t.child;case 12:return dt(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(Ee(Ru,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&&!ft.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),nw(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}dt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,vi(t,n),o=Ft(o,i.unstable_observedBits),r=r(o),t.flags|=1,dt(e,t,r,n),t.child;case 14:return o=t.type,i=Qt(o,t.pendingProps),i=Qt(o.type,i),V0(e,t,o,i,r,n);case 15:return hw(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pt(r)?(e=!0,pu(t)):e=!1,vi(t,n),iw(t,r,o),Bp(t,r,o,n),Wp(null,t,r,!0,e,n);case 19:return Q0(e,t,n);case 23:return fp(e,t,n);case 24:return fp(e,t,n)}throw Error(R(156,t.tag))};function JR(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 JR(e,t,n,r)}function Wm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eA(e){if(typeof e=="function")return Wm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===Ku)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 vu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Wm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fr:return Ei(n.children,o,i,t);case lS:s=8,o|=16;break;case am:s=8,o|=1;break;case zs:return e=_t(12,n,t,o|8),e.elementType=zs,e.type=zs,e.lanes=i,e;case Vs:return e=_t(13,n,t,o),e.type=Vs,e.elementType=Vs,e.lanes=i,e;case Su:return e=_t(19,n,t,o),e.elementType=Su,e.lanes=i,e;case pm:return $m(n,o,i,t);case vp:return e=_t(24,n,t,o),e.elementType=vp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lm:s=10;break e;case um:s=9;break e;case Vu:s=11;break e;case Ku:s=14;break e;case cm:s=16,r=null;break e;case dm:s=22;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=_t(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ei(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function $m(e,t,n,r){return e=_t(23,e,r,t),e.elementType=pm,e.lanes=n,e}function gp(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function hp(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 tA(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=ep(0),this.expirationTimes=ep(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.mutableSourceEagerHydrationData=null}function nA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ao,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ju(e,t,n,r){var o=t.current,i=yt(),s=xr(o);e:if(n){n=n._reactInternals;t:{if(So(n)!==n||n.tag!==1)throw Error(R(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(pt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(R(171))}if(n.tag===1){var l=n.type;if(pt(l)){n=YS(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 yp(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 sS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gm(e,t){sS(e,t),(e=e.alternate)&&sS(e,t)}function rA(){return null}function qm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new tA(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,Nm(t),e[Ri]=n.current,KS(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}qm.prototype.render=function(e){ju(e,this._internalRoot,null,null)};qm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;ju(null,e,null,function(){t[Ri]=null})};function va(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function oA(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 qm(e,0,t?{hydrate:!0}:void 0)}function tc(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=yp(s);a.call(u)}}ju(t,s,e,o)}else{if(i=n._reactRootContainer=oA(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=yp(s);l.call(u)}}kw(function(){ju(t,s,e,o)})}return yp(s)}CS=function(e){if(e.tag===13){var t=yt();Er(e,4,t),Gm(e,4)}};vm=function(e){if(e.tag===13){var t=yt();Er(e,67108864,t),Gm(e,67108864)}};bS=function(e){if(e.tag===13){var t=yt(),n=xr(e);Er(e,n,t),Gm(e,n)}};TS=function(e,t){return t()};Rp=function(e,t,n){switch(t){case"input":if(wp(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=Xu(r);if(!o)throw Error(R(90));cS(r),wp(r,o)}}}break;case"textarea":fS(e,n);break;case"select":t=n.value,t!=null&&mi(e,!!n.multiple,t,!1)}};gm=Tw;SS=function(e,t,n,r,o){var i=z;z|=4;try{return go(98,e.bind(null,t,n,r,o))}finally{z=i,z===0&&(Ii(),Sn())}};hm=function(){!(z&49)&&(KR(),Lr())};wS=function(e,t){var n=z;z|=2;try{return e(t)}finally{z=n,z===0&&(Ii(),Sn())}};function Ow(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!va(t))throw Error(R(200));return nA(e,t,null,n)}var iA={Events:[ga,ci,Xu,yS,vS,Lr,{current:!1}]},_s={findFiberByHostInstance:uo,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},sA={bundleType:_s.bundleType,version:_s.version,rendererPackageName:_s.rendererPackageName,rendererConfig:_s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ES(e),e===null?null:e.stateNode},findFiberByHostInstance:_s.findFiberByHostInstance||rA,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ds.isDisabled&&Ds.supportsFiber))try{Rm=Ds.inject(sA),po=Ds}catch{}var Ds;Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iA;Ut.createPortal=Ow;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(R(188)):Error(R(268,Object.keys(e)));return e=ES(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e,t){var n=z;if(n&48)return e(t);z|=1;try{if(e)return go(99,e.bind(null,t))}finally{z=n,Sn()}};Ut.hydrate=function(e,t,n){if(!va(t))throw Error(R(200));return tc(null,e,t,!0,n)};Ut.render=function(e,t,n){if(!va(t))throw Error(R(200));return tc(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!va(e))throw Error(R(40));return e._reactRootContainer?(kw(function(){tc(null,null,e,!1,function(){e._reactRootContainer=null,e[Ri]=null})}),!0):!1};Ut.unstable_batchedUpdates=Tw;Ut.unstable_createPortal=function(e,t){return Ow(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!va(n))throw Error(R(200));if(e==null||e._reactInternals===void 0)throw Error(R(38));return tc(e,t,n,!1,r)};Ut.version="17.0.2"});var nc=Ce((k_,Dw)=>{"use strict";function _w(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_w)}catch(e){console.error(e)}}_w(),Dw.exports=Mw()});var cx=Ce(ux=>{"use strict";var Fi=_();function KA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var WA=typeof Object.is=="function"?Object.is:KA,$A=Fi.useState,GA=Fi.useEffect,qA=Fi.useLayoutEffect,YA=Fi.useDebugValue;function XA(e,t){var n=t(),r=$A({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return qA(function(){o.value=n,o.getSnapshot=t,xg(o)&&i({inst:o})},[e,n,t]),GA(function(){return xg(o)&&i({inst:o}),e(function(){xg(o)&&i({inst:o})})},[e]),YA(n),n}function xg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!WA(e,n)}catch{return!0}}function QA(e,t){return t()}var ZA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?QA:XA;ux.useSyncExternalStore=Fi.useSyncExternalStore!==void 0?Fi.useSyncExternalStore:ZA});var Eg=Ce((pD,dx)=>{"use strict";dx.exports=cx()});var px=Ce(fx=>{"use strict";var cc=_(),JA=Eg();function eL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tL=typeof Object.is=="function"?Object.is:eL,nL=JA.useSyncExternalStore,rL=cc.useRef,oL=cc.useEffect,iL=cc.useMemo,sL=cc.useDebugValue;fx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=rL(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=iL(function(){function l(g){if(!u){if(u=!0,c=g,g=r(g),o!==void 0&&s.hasValue){var y=s.value;if(o(y,g))return p=y}return p=g}if(y=p,tL(c,g))return y;var v=r(g);return o!==void 0&&o(y,v)?y:(c=g,p=v)}var u=!1,c,p,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=nL(e,i[0],i[1]);return oL(function(){s.hasValue=!0,s.value=a},[a]),sL(a),a}});var gx=Ce((gD,mx)=>{"use strict";mx.exports=px()});var kx=Ce(oe=>{"use strict";var Oe=typeof Symbol=="function"&&Symbol.for,bg=Oe?Symbol.for("react.element"):60103,Tg=Oe?Symbol.for("react.portal"):60106,mc=Oe?Symbol.for("react.fragment"):60107,gc=Oe?Symbol.for("react.strict_mode"):60108,hc=Oe?Symbol.for("react.profiler"):60114,yc=Oe?Symbol.for("react.provider"):60109,vc=Oe?Symbol.for("react.context"):60110,kg=Oe?Symbol.for("react.async_mode"):60111,Sc=Oe?Symbol.for("react.concurrent_mode"):60111,wc=Oe?Symbol.for("react.forward_ref"):60112,xc=Oe?Symbol.for("react.suspense"):60113,cL=Oe?Symbol.for("react.suspense_list"):60120,Ec=Oe?Symbol.for("react.memo"):60115,Cc=Oe?Symbol.for("react.lazy"):60116,dL=Oe?Symbol.for("react.block"):60121,fL=Oe?Symbol.for("react.fundamental"):60117,pL=Oe?Symbol.for("react.responder"):60118,mL=Oe?Symbol.for("react.scope"):60119;function wt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bg:switch(e=e.type,e){case kg:case Sc:case mc:case hc:case gc:case xc:return e;default:switch(e=e&&e.$$typeof,e){case vc:case wc:case Cc:case Ec:case yc:return e;default:return t}}case Tg:return t}}}function Tx(e){return wt(e)===Sc}oe.AsyncMode=kg;oe.ConcurrentMode=Sc;oe.ContextConsumer=vc;oe.ContextProvider=yc;oe.Element=bg;oe.ForwardRef=wc;oe.Fragment=mc;oe.Lazy=Cc;oe.Memo=Ec;oe.Portal=Tg;oe.Profiler=hc;oe.StrictMode=gc;oe.Suspense=xc;oe.isAsyncMode=function(e){return Tx(e)||wt(e)===kg};oe.isConcurrentMode=Tx;oe.isContextConsumer=function(e){return wt(e)===vc};oe.isContextProvider=function(e){return wt(e)===yc};oe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bg};oe.isForwardRef=function(e){return wt(e)===wc};oe.isFragment=function(e){return wt(e)===mc};oe.isLazy=function(e){return wt(e)===Cc};oe.isMemo=function(e){return wt(e)===Ec};oe.isPortal=function(e){return wt(e)===Tg};oe.isProfiler=function(e){return wt(e)===hc};oe.isStrictMode=function(e){return wt(e)===gc};oe.isSuspense=function(e){return wt(e)===xc};oe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===mc||e===Sc||e===hc||e===gc||e===xc||e===cL||typeof e=="object"&&e!==null&&(e.$$typeof===Cc||e.$$typeof===Ec||e.$$typeof===yc||e.$$typeof===vc||e.$$typeof===wc||e.$$typeof===fL||e.$$typeof===pL||e.$$typeof===mL||e.$$typeof===dL)};oe.typeOf=wt});var Rx=Ce((AD,Px)=>{"use strict";Px.exports=kx()});var _x=Ce((LD,Mx)=>{"use strict";var Pg=Rx(),gL={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},hL={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},yL={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Rg={};Rg[Pg.ForwardRef]=yL;Rg[Pg.Memo]=Nx;function Ax(e){return Pg.isMemo(e)?Nx:Rg[e.$$typeof]||gL}var vL=Object.defineProperty,SL=Object.getOwnPropertyNames,Lx=Object.getOwnPropertySymbols,wL=Object.getOwnPropertyDescriptor,xL=Object.getPrototypeOf,Ix=Object.prototype;function Ox(e,t,n){if(typeof t!="string"){if(Ix){var r=xL(t);r&&r!==Ix&&Ox(e,r,n)}var o=SL(t);Lx&&(o=o.concat(Lx(t)));for(var i=Ax(e),s=Ax(t),a=0;a<o.length;++a){var l=o[a];if(!hL[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=wL(t,l);try{vL(e,l,u)}catch{}}}}return e}Mx.exports=Ox});var Fx=Ce(ie=>{"use strict";var Ag=Symbol.for("react.element"),Lg=Symbol.for("react.portal"),bc=Symbol.for("react.fragment"),Tc=Symbol.for("react.strict_mode"),kc=Symbol.for("react.profiler"),Pc=Symbol.for("react.provider"),Rc=Symbol.for("react.context"),EL=Symbol.for("react.server_context"),Ac=Symbol.for("react.forward_ref"),Lc=Symbol.for("react.suspense"),Ic=Symbol.for("react.suspense_list"),Nc=Symbol.for("react.memo"),Oc=Symbol.for("react.lazy"),CL=Symbol.for("react.offscreen"),Dx;Dx=Symbol.for("react.module.reference");function jt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ag:switch(e=e.type,e){case bc:case kc:case Tc:case Lc:case Ic:return e;default:switch(e=e&&e.$$typeof,e){case EL:case Rc:case Ac:case Oc:case Nc:case Pc:return e;default:return t}}case Lg:return t}}}ie.ContextConsumer=Rc;ie.ContextProvider=Pc;ie.Element=Ag;ie.ForwardRef=Ac;ie.Fragment=bc;ie.Lazy=Oc;ie.Memo=Nc;ie.Portal=Lg;ie.Profiler=kc;ie.StrictMode=Tc;ie.Suspense=Lc;ie.SuspenseList=Ic;ie.isAsyncMode=function(){return!1};ie.isConcurrentMode=function(){return!1};ie.isContextConsumer=function(e){return jt(e)===Rc};ie.isContextProvider=function(e){return jt(e)===Pc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ag};ie.isForwardRef=function(e){return jt(e)===Ac};ie.isFragment=function(e){return jt(e)===bc};ie.isLazy=function(e){return jt(e)===Oc};ie.isMemo=function(e){return jt(e)===Nc};ie.isPortal=function(e){return jt(e)===Lg};ie.isProfiler=function(e){return jt(e)===kc};ie.isStrictMode=function(e){return jt(e)===Tc};ie.isSuspense=function(e){return jt(e)===Lc};ie.isSuspenseList=function(e){return jt(e)===Ic};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bc||e===kc||e===Tc||e===Lc||e===Ic||e===CL||typeof e=="object"&&e!==null&&(e.$$typeof===Oc||e.$$typeof===Nc||e.$$typeof===Pc||e.$$typeof===Rc||e.$$typeof===Ac||e.$$typeof===Dx||e.getModuleId!==void 0)};ie.typeOf=jt});var Ux=Ce((ND,Hx)=>{"use strict";Hx.exports=Fx()});var sh=Ce((Y5,cE)=>{"use strict";var RI="Expected a function",lE=NaN,AI="[object Symbol]",LI=/^\s+|\s+$/g,II=/^[-+]0x[0-9a-f]+$/i,NI=/^0b[01]+$/i,OI=/^0o[0-7]+$/i,MI=parseInt,_I=typeof global=="object"&&global&&global.Object===Object&&global,DI=typeof self=="object"&&self&&self.Object===Object&&self,FI=_I||DI||Function("return this")(),HI=Object.prototype,UI=HI.toString,BI=Math.max,jI=Math.min,oh=function(){return FI.Date.now()};function zI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(RI);t=uE(t)||0,ih(n)&&(c=!!n.leading,p="maxWait"in n,i=p?BI(uE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function g(C){var k=r,L=o;return r=o=void 0,u=C,s=e.apply(L,k),s}function y(C){return u=C,a=setTimeout(m,t),c?g(C):s}function v(C){var k=C-l,L=C-u,I=t-k;return p?jI(I,i-L):I}function f(C){var k=C-l,L=C-u;return l===void 0||k>=t||k<0||p&&L>=i}function m(){var C=oh();if(f(C))return h(C);a=setTimeout(m,v(C))}function h(C){return a=void 0,d&&r?g(C):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:h(oh())}function T(){var C=oh(),k=f(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return y(l);if(p)return a=setTimeout(m,t),g(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=w,T.flush=x,T}function ih(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function VI(e){return!!e&&typeof e=="object"}function KI(e){return typeof e=="symbol"||VI(e)&&UI.call(e)==AI}function uE(e){if(typeof e=="number")return e;if(KI(e))return lE;if(ih(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ih(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(LI,"");var n=NI.test(e);return n||OI.test(e)?MI(e.slice(2),n?2:8):II.test(e)?lE:+e}cE.exports=zI});var SE=Ce((m6,vE)=>{"use strict";var QI=/["'&<>]/;vE.exports=ZI;function ZI(e){var t=""+e,n=QI.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var C2={};ze(C2,{Card:()=>fe,ContentEditableInput:()=>Vo,DeepdeskAPI:()=>ir,DeepdeskSDK:()=>El,HTTPClient:()=>fn,InputMediator:()=>or,InputType:()=>oo,KeyboardHint:()=>Ul,Label:()=>Bl,Locale:()=>ka,Section:()=>In,SectionList:()=>jl,Sources:()=>Nn,Suggestion:()=>te,SuggestionList:()=>ht,TextAreaInput:()=>Ko,ToggleButton:()=>ro,attachFile:()=>fk,authenticateWithKey:()=>ck,createFullRange:()=>us,createOverlayContainer:()=>xl,createRangeFromOffsets:()=>Yr,escapeHTML:()=>qi,fetchPlatformConfig:()=>dk,formatTextMarkup:()=>uk,getRangeOffsets:()=>yl,getRangeText:()=>vl,insertCKEditor:()=>lk,isHTML:()=>Cd,isSupportedInputElement:()=>Sf,updateContentEditable:()=>sk,updateTextArea:()=>ik,useStyles:()=>P,waitForElementVisibilityChange:()=>Ef});var Ff=S(ee()),Nt=S(_());var _l=S(_()),gv=S(ee()),Ss=_l.default.createContext({});function P(e,t){let{debug:n,...r}=(0,_l.useContext)(Ss),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,gv.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var hv={root:"qo"};var Jr=S(b()),Dl=()=>(0,Jr.jsxs)("svg",{className:hv.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Jr.jsx)("defs",{children:(0,Jr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Jr.jsx)("title",{children:"Failed loading image"}),(0,Jr.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 Df={root:"Co",imageWrapper:"L",image:"So",content:"m",title:"Eo",contentIsCropped:"Go",lineClamp:"No"};var eo=S(b()),Fl=(0,Nt.createContext)(Df),Vk=({title:e,src:t})=>{let n=(0,Nt.useContext)(Fl),[r,o]=(0,Nt.useState)(!1);return(0,Nt.useEffect)(()=>{o(!1)},[t]),(0,eo.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,eo.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,eo.jsx)(Dl,{})})},Kk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Nt.useContext)(Fl);return(0,eo.jsx)("div",{className:(0,Ff.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Wk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Nt.useContext)(Fl);return Nt.default.createElement(e,{className:(0,Ff.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Hl=({children:e})=>{let t=P("Card",Df);return(0,eo.jsx)("div",{className:t.root,children:(0,eo.jsx)(Fl.Provider,{value:t,children:e})})};Hl.Image=Vk;Hl.Content=Kk;Hl.Title=Wk;var fe=Hl;var Ev=S(ee());var xv={root:"M"};var Cv=S(b());var Gk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},qk=({className:e,keyCode:t,...n})=>{let r=P("KeyboardHint",xv);return(0,Cv.jsx)("span",{"data-key":Gk[t],className:(0,Ev.default)(e,r.root),...n})},Ul=qk;var Tv=S(ee());var bv={root:"Ao"};var kv=S(b()),Xk=({className:e,children:t,...n})=>{let r=P("Label",bv);return(0,kv.jsx)("span",{...n,className:(0,Tv.default)(e,r.root),children:t})},Bl=Xk;var Pv={root:"Fo",subTitleContainer:"Ho",subtitle:"Lo",suggestions:"Mo"};var Jo=S(b()),Zk=({title:e,children:t,type:n,...r})=>{let o=P("Section",Pv);return(0,Jo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,Jo.jsx)("div",{className:o.subTitleContainer,children:(0,Jo.jsx)("span",{className:o.subtitle,children:e})}),(0,Jo.jsx)("div",{className:o.suggestions,children:t})]})},In=Zk;var Av=S(ee()),Lv=S(_());var Rv={root:"Ro"};var Iv=S(b()),eP=Lv.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",Rv);return(0,Iv.jsx)("div",{ref:n,className:(0,Av.default)(r.root,e),children:t})}),jl=eP;var ei=S(ee()),Ze=S(_());var Hf={fadein:"R",root:"e",isClickable:"T",isSelected:"To",actions:"U",actionsIsFixed:"Uo",actionButton:"t",dropdownList:"B",dropdownButton:"D",dropdownItem:"I",dropdownItemButton:"O",actionButtonIsPrimary:"Bo",actionButtonIsDisabled:"Do",labels:"Io",label:"Oo",iconButtons:"Xo",iconButton:"n"};var ut=S(b()),to=(0,Ze.createContext)(Hf),nP=({fixed:e,children:t,...n})=>{let r=(0,Ze.useContext)(to);return(0,ut.jsx)("div",{...n,className:(0,ei.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})};function Nv(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type===Ov}var Ov=({className:e,icon:t,title:n,...r})=>{let o=(0,Ze.useContext)(to);return(0,ut.jsx)("button",{type:"button",className:(0,ei.default)(o.iconButton,e),title:n,"aria-label":n,...r,children:t})},rP=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,Ze.useContext)(to);return(0,ut.jsxs)("div",{className:(0,ei.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,ut.jsx)("ul",{className:i.dropdownList,children:o})]})},oP=({index:e,label:t,onClick:n})=>{let r=(0,Ze.useContext)(to);return(0,ut.jsx)("li",{className:r.dropdownItem,children:(0,ut.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},iP=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,Ze.useContext)(to);return(0,ut.jsx)("button",{type:"button",className:(0,ei.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},sP=({labels:e})=>{let t=(0,Ze.useContext)(to);return(0,ut.jsx)("div",{className:t.labels,children:e.map(n=>(0,ut.jsx)("span",{className:t.label,children:n},n))})},no=Ze.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",Hf),l=(0,Ze.useCallback)(p=>{p.preventDefault(),n&&n(p)},[n]),u=Ze.default.Children.toArray(r).filter(Nv),c=Ze.default.Children.toArray(r).filter(p=>!Nv(p));return(0,ut.jsx)(o,{...i,ref:s,className:(0,ei.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,ut.jsxs)(to.Provider,{value:a,children:[c,(0,ut.jsx)("div",{className:a.iconButtons,children:u})]})})});no.Labels=sP;no.Actions=nP;no.ActionButton=iP;no.DropdownButton=rP;no.DropdownItem=oP;no.IconButton=Ov;var te=no;var _v=S(ee());var Mv={root:"Jo",isWithDivider:"Ko"};var Dv=S(b()),lP=({withDivider:e,children:t})=>{let n=P("SuggestionList",Mv);return(0,Dv.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,_v.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=lP;var Hv=S(ee());var Fv={root:"u",isCollapsed:"X"};var zl=S(b()),cP=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",Fv);return(0,zl.jsx)("button",{type:"button",className:(0,Hv.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,zl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,zl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},ro=cP;var Uv=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Vl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Bv=/x-deepdesk-(([a-z0-9\-_])+-version)/,Nn=(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))(Nn||{}),oo=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(oo||{});var Gt=S(nc());var wC=S(_());function Bt(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[ve]}function Jt(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)===mA}(e)||Array.isArray(e)||!!e[Vw]||!!(!((t=e.constructor)===null||t===void 0)&&t[Vw])||rg(e)||og(e))}function xo(e,t,n){n===void 0&&(n=!1),Mi(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 Mi(e){var t=e[ve];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:rg(e)?2:og(e)?3:0}function Ni(e,t){return Mi(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aA(e,t){return Mi(e)===2?e.get(t):e[t]}function Kw(e,t,n){var r=Mi(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ww(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function rg(e){return fA&&e instanceof Map}function og(e){return pA&&e instanceof Set}function Ir(e){return e.o||e.t}function ig(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qw(e);delete t[ve];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 sg(e,t){return t===void 0&&(t=!1),ag(e)||Un(e)||!Jt(e)||(Mi(e)>1&&(e.set=e.add=e.clear=e.delete=lA),Object.freeze(e),t&&xo(e,function(n,r){return sg(r,!0)},!0)),e}function lA(){Bt(2)}function ag(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function wn(e){var t=ng[e];return t||Bt(18,e),t}function uA(e,t){ng[e]||(ng[e]=t)}function Jm(){return wa}function Ym(e,t){t&&(wn("Patches"),e.u=[],e.s=[],e.v=t)}function rc(e){eg(e),e.p.forEach(cA),e.p=null}function eg(e){e===wa&&(wa=e.l)}function Fw(e){return wa={p:[],l:wa,h:e,m:!0,_:0}}function cA(e){var t=e[ve];t.i===0||t.i===1?t.j():t.g=!0}function Xm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||wn("ES5").S(t,e,r),r?(n[ve].P&&(rc(t),Bt(4)),Jt(e)&&(e=oc(t,e),t.l||ic(t,e)),t.u&&wn("Patches").M(n[ve].t,e,t.u,t.s)):e=oc(t,n,[]),rc(t),t.u&&t.v(t.u,t.s),e!==Gw?e:void 0}function oc(e,t,n){if(ag(t))return t;var r=t[ve];if(!r)return xo(t,function(a,l){return Hw(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ic(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=ig(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),xo(i,function(a,l){return Hw(e,r,o,a,l,n,s)}),ic(e,o,!1),n&&e.u&&wn("Patches").N(r,n,e.u,e.s)}return r.o}function Hw(e,t,n,r,o,i,s){if(Un(o)){var a=oc(e,o,i&&t&&t.i!==3&&!Ni(t.R,r)?i.concat(r):void 0);if(Kw(n,r,a),!Un(a))return;e.m=!1}else s&&n.add(o);if(Jt(o)&&!ag(o)){if(!e.h.D&&e._<1)return;oc(e,o),t&&t.A.l||ic(e,o)}}function ic(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&sg(t,n)}function Qm(e,t){var n=e[ve];return(n?Ir(n):e)[t]}function Uw(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 Nr(e){e.P||(e.P=!0,e.l&&Nr(e.l))}function Zm(e){e.o||(e.o=ig(e.t))}function tg(e,t,n){var r=rg(t)?wn("MapSet").F(t,n):og(t)?wn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Jm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=xa;s&&(l=[a],u=Sa);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):wn("ES5").J(t,n);return(n?n.A:Jm()).p.push(r),r}function dA(e){return Un(e)||Bt(22,e),function t(n){if(!Jt(n))return n;var r,o=n[ve],i=Mi(n);if(o){if(!o.P&&(o.i<4||!wn("ES5").K(o)))return o.t;o.I=!0,r=Bw(n,i),o.I=!1}else r=Bw(n,i);return xo(r,function(s,a){o&&aA(o.t,s)===a||Kw(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 ig(e)}function $w(){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[ve];return xa.get(u,s)},set:function(u){var c=this[ve];xa.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ve];if(!l.P)switch(l.i){case 5:r(l)&&Nr(l);break;case 4:n(l)&&Nr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Oi(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==ve){var d=a[p];if(d===void 0&&!Ni(a,p))return!0;var g=l[p],y=g&&g[ve];if(y?y.t!==d:!Ww(g,d))return!0}}var v=!!a[ve];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&&Bt(3,JSON.stringify(Ir(s)))}var i={};uA("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var g=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(g,""+y,e(y,!0));return g}var v=qw(d);delete v[ve];for(var f=Oi(v),m=0;m<f.length;m++){var h=f[m];v[h]=e(h,p||!!v[h].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:Jm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ve,{value:c,writable:!0}),u},S:function(s,a,l){l?Un(a)&&a[ve].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[ve];if(p){var d=p.t,g=p.k,y=p.R,v=p.i;if(v===4)xo(g,function(x){x!==ve&&(d[x]!==void 0||Ni(d,x)?y[x]||u(g[x]):(y[x]=!0,Nr(p)))}),xo(d,function(x){g[x]!==void 0||Ni(g,x)||(y[x]=!1,Nr(p))});else if(v===5){if(r(p)&&(Nr(p),y.length=!0),g.length<d.length)for(var f=g.length;f<d.length;f++)y[f]=!1;else for(var m=d.length;m<g.length;m++)y[m]=!0;for(var h=Math.min(g.length,d.length),w=0;w<h;w++)g.hasOwnProperty(w)||(y[w]=!0),y[w]===void 0&&u(g[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var jw,wa,lg=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",fA=typeof Map<"u",pA=typeof Set<"u",zw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Gw=lg?Symbol.for("immer-nothing"):((jw={})["immer-nothing"]=!0,jw),Vw=lg?Symbol.for("immer-draftable"):"__$immer_draftable",ve=lg?Symbol.for("immer-state"):"__$immer_state";var mA=""+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,qw=Object.getOwnPropertyDescriptors||function(e){var t={};return Oi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},ng={},xa={get:function(e,t){if(t===ve)return e;var n=Ir(e);if(!Ni(n,t))return function(o,i,s){var a,l=Uw(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||!Jt(r)?r:r===Qm(e.t,t)?(Zm(e),e.o[t]=tg(e.A.h,r,e)):r},has:function(e,t){return t in Ir(e)},ownKeys:function(e){return Reflect.ownKeys(Ir(e))},set:function(e,t,n){var r=Uw(Ir(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Qm(Ir(e),t),i=o==null?void 0:o[ve];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Ww(n,o)&&(n!==void 0||Ni(e.t,t)))return!0;Zm(e),Nr(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 Qm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Zm(e),Nr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ir(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Bt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Bt(12)}},Sa={};xo(xa,function(e,t){Sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Sa.deleteProperty=function(e,t){return Sa.set.call(this,e,t,void 0)},Sa.set=function(e,t,n){return xa.set.call(this,e[0],t,n,e[0])};var gA=function(){function e(n){var r=this;this.O=zw,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(v){var f=this;v===void 0&&(v=a);for(var m=arguments.length,h=Array(m>1?m-1:0),w=1;w<m;w++)h[w-1]=arguments[w];return l.produce(v,function(x){var T;return(T=i).call.apply(T,[f,x].concat(h))})}}var u;if(typeof i!="function"&&Bt(6),s!==void 0&&typeof s!="function"&&Bt(7),Jt(o)){var c=Fw(r),p=tg(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?rc(c):eg(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Ym(c,s),Xm(v,c)},function(v){throw rc(c),v}):(Ym(c,s),Xm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===Gw&&(u=void 0),r.D&&sg(u,!0),s){var g=[],y=[];wn("Patches").M(o,u,g,y),s(g,y)}return u}Bt(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(g){return o.apply(void 0,[g].concat(p))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Jt(n)||Bt(8),Un(n)&&(n=dA(n));var r=Fw(this),o=tg(this,n,void 0);return o[ve].C=!0,eg(r),o},t.finishDraft=function(n,r){var o=n&&n[ve],i=o.A;return Ym(i,r),Xm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!zw&&Bt(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=wn("Patches").$;return Un(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),St=new gA,hA=St.produce,P_=St.produceWithPatches.bind(St),R_=St.setAutoFreeze.bind(St),A_=St.setUseProxies.bind(St),L_=St.applyPatches.bind(St),I_=St.createDraft.bind(St),N_=St.finishDraft.bind(St),sc=hA;function Or(e){"@babel/helpers - typeof";return Or=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},Or(e)}function ug(e,t){if(Or(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Or(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cg(e){var t=ug(e,"string");return Or(t)==="symbol"?t:String(t)}function dg(e,t,n){return t=cg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yw(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 ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yw(Object(n),!0).forEach(function(r){dg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qe(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 Xw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),fg=function(){return Math.random().toString(36).substring(7).split("").join(".")},lc={INIT:"@@redux/INIT"+fg(),REPLACE:"@@redux/REPLACE"+fg(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fg()}};function yA(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 pg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qe(1));return n(pg)(e,t)}if(typeof e!="function")throw new Error(qe(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(qe(3));return i}function p(v){if(typeof v!="function")throw new Error(qe(4));if(l)throw new Error(qe(5));var f=!0;return u(),a.push(v),function(){if(f){if(l)throw new Error(qe(6));f=!1,u();var h=a.indexOf(v);a.splice(h,1),s=null}}}function d(v){if(!yA(v))throw new Error(qe(7));if(typeof v.type>"u")throw new Error(qe(8));if(l)throw new Error(qe(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var f=s=a,m=0;m<f.length;m++){var h=f[m];h()}return v}function g(v){if(typeof v!="function")throw new Error(qe(10));o=v,d({type:lc.REPLACE})}function y(){var v,f=p;return v={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(qe(11));function w(){h.next&&h.next(c())}w();var x=f(w);return{unsubscribe:x}}},v[Xw]=function(){return this},v}return d({type:lc.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:g},r[Xw]=y,r}function vA(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:lc.INIT});if(typeof r>"u")throw new Error(qe(12));if(typeof n(void 0,{type:lc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qe(13))})}function uc(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{vA(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,g={},y=0;y<i.length;y++){var v=i[y],f=n[v],m=u[v],h=f(m,c);if(typeof h>"u"){var w=c&&c.type;throw new Error(qe(14))}g[v]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?g:u}}function _i(){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 Qw(){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(qe(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=_i.apply(void 0,a)(o.dispatch),ac(ac({},o),{},{dispatch:i})}}}function Zw(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 Jw=Zw();Jw.withExtraArgument=Zw;var mg=Jw;var ox=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)}}(),SA=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}}},Di=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},wA=Object.defineProperty,xA=Object.defineProperties,EA=Object.getOwnPropertyDescriptors,ex=Object.getOwnPropertySymbols,CA=Object.prototype.hasOwnProperty,bA=Object.prototype.propertyIsEnumerable,tx=function(e,t,n){return t in e?wA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mr=function(e,t){for(var n in t||(t={}))CA.call(t,n)&&tx(e,n,t[n]);if(ex)for(var r=0,o=ex(t);r<o.length;r++){var n=o[r];bA.call(t,n)&&tx(e,n,t[n])}return e},gg=function(e,t){return xA(e,EA(t))},TA=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 kA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?_i:_i.apply(null,arguments)},X_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function PA(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 RA=function(e){ox(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,Di([void 0],n[0].concat(this)))):new(t.bind.apply(t,Di([void 0],n.concat(this))))},t}(Array),AA=function(e){ox(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,Di([void 0],n[0].concat(this)))):new(t.bind.apply(t,Di([void 0],n.concat(this))))},t}(Array);function vg(e){return Jt(e)?sc(e,function(){}):e}function LA(e){return typeof e=="boolean"}function IA(){return function(t){return NA(t)}}function NA(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 RA;if(n&&(LA(n)?a.push(mg):a.push(mg.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var hg=!0;function ix(e){var t=IA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,g;if(typeof o=="function")g=o;else if(PA(o))g=uc(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),!hg&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!hg&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Qw.apply(void 0,y),f=_i;l&&(f=kA(Mr({trace:!hg},typeof l=="object"&&l)));var m=new AA(v),h=m;Array.isArray(d)?h=Di([v],d):typeof d=="function"&&(h=d(m));var w=f.apply(void 0,h);return pg(g,c,w)}function we(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 sx(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 OA(e){return typeof e=="function"}function MA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?sx(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(OA(e))l=function(){return vg(e())};else{var u=vg(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var g=Di([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return g.filter(function(y){return!!y}).length===0&&(g=[a]),g.reduce(function(y,v){if(v)if(Un(y)){var f=y,m=v(f,d);return m===void 0?y:m}else{if(Jt(y))return sc(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},p)}return c.getInitialState=l,c}function _A(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:vg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=_A(t,c),g,y;"reducer"in p?(g=p.reducer,y=p.prepare):g=p,i[c]=g,s[d]=g,a[c]=y?we(d,y):we(d)});function l(){var c=typeof e.extraReducers=="function"?sx(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,g=c[1],y=g===void 0?[]:g,v=c[2],f=v===void 0?void 0:v,m=Mr(Mr({},d),s);return MA(n,function(h){for(var w in m)h.addCase(w,m[w]);for(var x=0,T=y;x<T.length;x++){var C=T[x];h.addMatcher(C.matcher,C.reducer)}f&&h.addDefaultCase(f)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var DA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",FA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=DA[Math.random()*64|0];return t},HA=["name","message","stack","code"],yg=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),nx=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),UA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=HA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},U=function(){function e(t,n,r){var o=we(t+"/fulfilled",function(c,p,d,g){return{payload:c,meta:gg(Mr({},g||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=we(t+"/pending",function(c,p,d){return{payload:void 0,meta:gg(Mr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=we(t+"/rejected",function(c,p,d,g,y){return{payload:g,error:(r&&r.serializeError||UA)(c||"Rejected"),meta:gg(Mr({},y||{}),{arg:d,requestId:p,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(p,d,g){var y=r!=null&&r.idGenerator?r.idGenerator(c):FA(),v=new l,f,m=!1;function h(x){f=x,v.abort()}var w=function(){return TA(this,null,function(){var x,T,C,k,L,I,O;return SA(this,function(V){switch(V.label){case 0:return V.trys.push([0,4,,5]),k=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:g}),jA(k)?[4,k]:[3,2];case 1:k=V.sent(),V.label=2;case 2:if(k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,L=new Promise(function(K,se){return v.signal.addEventListener("abort",function(){return se({name:"AbortError",message:f||"Aborted"})})}),p(i(y,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:y,arg:c},{getState:d,extra:g}))),[4,Promise.race([L,Promise.resolve(n(c,{dispatch:p,getState:d,extra:g,requestId:y,signal:v.signal,abort:h,rejectWithValue:function(K,se){return new yg(K,se)},fulfillWithValue:function(K,se){return new nx(K,se)}})).then(function(K){if(K instanceof yg)throw K;return K instanceof nx?o(K.payload,y,c,K.meta):o(K,y,c)})])];case 3:return C=V.sent(),[3,5];case 4:return I=V.sent(),C=I instanceof yg?s(null,y,c,I.payload,I.meta):s(I,y,c),[3,5];case 5:return O=r&&!r.dispatchConditionRejection&&s.match(C)&&C.meta.condition,O||p(C),[2,C]}})})}();return Object.assign(w,{abort:h,requestId:y,arg:c,unwrap:function(){return w.then(BA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function BA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function jA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zA="task",ax="listener",lx="completed",Sg="cancelled",eD="task-"+Sg,tD="task-"+lx,nD=ax+"-"+Sg,rD=ax+"-"+lx,oD=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=zA+" "+Sg+" (reason: "+t+")"}return e}();var wg="listenerMiddleware";var iD=we(wg+"/add"),sD=we(wg+"/removeAll"),aD=we(wg+"/remove");var rx,lD=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(rx||(rx=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},VA=function(e){return function(t){setTimeout(t,e)}},uD=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:VA(10);$w();var Xx=S(Eg()),Qx=S(gx());var Cg=S(nc());function aL(e){e()}var hx=aL,yx=e=>hx=e,vx=()=>hx;var Hi=S(_());var xx=S(_());var dc=S(_()),Sx=Symbol.for(`react-redux-context-${dc.version}`),wx=globalThis;function lL(){let e=wx[Sx];return e||(e=(0,dc.createContext)(null),wx[Sx]=e),e}var Ye=new Proxy({},new Proxy({},{get(e,t){let n=lL();return(r,...o)=>Reflect[t](n,...o)}}));function Ea(e=Ye){return function(){return(0,xx.useContext)(e)}}var fc=Ea();var pc=()=>{throw new Error("uSES not initialized!")};var Ex=pc,Cx=e=>{Ex=e},uL=(e,t)=>e===t;function bx(e=Ye){let t=e===Ye?fc:Ea(e);return function(r,o={}){let{equalityFn:i=uL,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),g=(0,Hi.useRef)(!0),y=(0,Hi.useCallback)({[r.name](f){return r(f)}}[r.name],[r,p,s]),v=Ex(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Hi.useDebugValue)(v),v}}var N=bx();function Bn(){return Bn=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},Bn.apply(this,arguments)}function Ca(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 Og=S(_x()),ae=S(_()),$x=S(Ux());var TL=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function kL(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function g(h,w){return l=h,u=w,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function f(){let h=e(l,u),w=!s(h,c);return c=h,w&&(d=n(c,p,u)),d}function m(h,w){let x=!i(w,u),T=!o(h,l,w,u);return l=h,u=w,x&&T?y():x?v():T?f():d}return function(w,x){return a?m(w,x):g(w,x)}}function Ig(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ca(t,TL),s=n(e,i),a=r(e,i),l=o(e,i);return kL(s,a,l,e,i)}function Ng(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 ba(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 Mc(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 Ui(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function jx(e){return e&&typeof e=="object"?ba(t=>Ng(e,t)):e?typeof e=="function"?Mc(e,"mapDispatchToProps"):Ui(e,"mapDispatchToProps"):ba(t=>({dispatch:t}))}function zx(e){return e?typeof e=="function"?Mc(e,"mapStateToProps"):Ui(e,"mapStateToProps"):ba(()=>({}))}function PL(e,t,n){return Bn({},n,e,t)}function RL(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function Vx(e){return e?typeof e=="function"?RL(e):Ui(e,"mergeProps"):()=>PL}function AL(){let e=vx(),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 Kx={notify(){},get:()=>[]};function _c(e,t){let n,r=Kx;function o(p){return l(),r.subscribe(p)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=AL())}function u(){n&&(n(),n=void 0,r.clear(),r=Kx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Dc=S(_()),LL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bi=LL?Dc.useLayoutEffect:Dc.useEffect;function Wx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ji(e,t){if(Wx(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])||!Wx(e[n[o]],t[n[o]]))return!1;return!0}var IL=["reactReduxForwardedRef"],Gx=pc,qx=e=>{Gx=e};var NL=[null,null];function OL(e,t,n){Bi(()=>e(...t),n)}function ML(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function _L(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,g=()=>{if(p||!a.current)return;let v=t.getState(),f,m;try{f=r(v,o.current)}catch(h){m=h,d=h}m||(d=null),f===i.current?s.current||u():(i.current=f,l.current=f,s.current=!0,c())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function DL(e,t){return e===t}function FL(e,t,n,{pure:r,areStatesEqual:o=DL,areOwnPropsEqual:i=ji,areStatePropsEqual:s=ji,areMergedPropsEqual:a=ji,forwardRef:l=!1,context:u=Ye}={}){let c=u,p=zx(e),d=jx(t),g=Vx(n),y=!!e;return f=>{let m=f.displayName||f.name||"Component",h=`Connect(${m})`,w={shouldHandleStateChanges:y,displayName:h,wrappedComponentName:m,WrappedComponent:f,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[L,I,O]=(0,ae.useMemo)(()=>{let{reactReduxForwardedRef:st}=k,Lt=Ca(k,IL);return[k.context,st,Lt]},[k]),V=(0,ae.useMemo)(()=>L&&L.Consumer&&(0,$x.isContextConsumer)(ae.default.createElement(L.Consumer,null))?L:c,[L,c]),K=(0,ae.useContext)(V),se=!!k.store&&!!k.store.getState&&!!k.store.dispatch,ps=!!K&&!!K.store,Rt=se?k.store:K.store,sr=ps?K.getServerState:Rt.getState,At=(0,ae.useMemo)(()=>Ig(Rt.dispatch,w),[Rt]),[F,X]=(0,ae.useMemo)(()=>{if(!y)return NL;let st=_c(Rt,se?void 0:K.subscription),Lt=st.notifyNestedSubs.bind(st);return[st,Lt]},[Rt,se,K]),ar=(0,ae.useMemo)(()=>se?K:Bn({},K,{subscription:F}),[se,K,F]),he=(0,ae.useRef)(),lr=(0,ae.useRef)(O),G=(0,ae.useRef)(),ur=(0,ae.useRef)(!1),Cl=(0,ae.useRef)(!1),$o=(0,ae.useRef)(!1),Xr=(0,ae.useRef)();Bi(()=>($o.current=!0,()=>{$o.current=!1}),[]);let ms=(0,ae.useMemo)(()=>()=>G.current&&O===lr.current?G.current:At(Rt.getState(),O),[Rt,O]),bl=(0,ae.useMemo)(()=>Lt=>F?_L(y,Rt,F,At,lr,he,ur,$o,G,X,Lt):()=>{},[F]);OL(ML,[lr,he,ur,O,G,X]);let qt;try{qt=Gx(bl,ms,sr?()=>At(sr(),O):ms)}catch(st){throw Xr.current&&(st.message+=`
|
|
10
10
|
The error may be correlated with this previous error:
|
|
11
|
-
${
|
|
11
|
+
${Xr.current.stack}
|
|
12
12
|
|
|
13
|
-
`),it}Hi(()=>{Yr.current=void 0,$.current=void 0,he.current=qt});let Yt=(0,ae.useMemo)(()=>ae.default.createElement(p,Un({},qt,{ref:I})),[I,p,qt]);return(0,ae.useMemo)(()=>y?ae.default.createElement(V.Provider,{value:sr},Yt):Yt,[V,Yt,sr])}let C=ae.default.memo(x);if(C.WrappedComponent=p,C.displayName=x.displayName=h,l){let L=ae.default.forwardRef(function(N,V){return ae.default.createElement(C,Un({},N,{reactReduxForwardedRef:V}))});return L.displayName=h,L.WrappedComponent=p,(0,Ag.default)(L,p)}return(0,Ag.default)(C,p)}}var Bn=IL;var Ca=S(_());function OL({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ca.useMemo)(()=>{let u=Nc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ca.useMemo)(()=>e.getState(),[e]);Hi(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||qe;return Ca.default.createElement(l.Provider,{value:s},n)}var Lg=OL;function _c(e=qe){let t=e===qe?cc:wa(e);return function(){let{store:r}=t();return r}}var Ig=_c();function Vx(e=qe){let t=e===qe?Ig:_c(e);return function(){return t().dispatch}}var q=Vx();yx(Wx.useSyncExternalStoreWithSelector);zx(Kx.useSyncExternalStore);dx(Sg.unstable_batchedUpdates);var ba=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ba||{});var NL={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=G({name:"settings",initialState:NL,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Dc}=$x.actions,Og=e=>t=>t.settings[e],B=e=>O(Og(e)),Gx=$x.reducer;var ML={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},tt=e=>e.auth.isLoggedIn,qx=e=>e.auth.loginFetchState,Yx=e=>e.auth.verifyFetchState,Xx=e=>e.auth.showLoginOverlay,jn=U("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Qx=U("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Ta=U("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Zx=G({name:"auth",initialState:ML,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(jn.pending,t=>{t.loginFetchState="loading"}),e.addCase(jn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(jn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Ta.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Ta.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Ta.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Bi,setShowLoginOverlay:Jx}=Zx.actions,e1=Zx.reducer;function zn(){}zn.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 m(){for(var v=-1*u;v<=u;v+=2){var p=void 0,g=f[v-1],h=f[v+1],w=(h?h.newPos:0)-v;g&&(f[v-1]=void 0);var x=g&&g.newPos+1<a,T=h&&0<=w&&w<l;if(!x&&!T){f[v]=void 0;continue}if(!x||T&&g.newPos<h.newPos?(p=DL(h),i.pushComponent(p.components,void 0,!0)):(p=g,p.newPos++,i.pushComponent(p.components,!0,void 0)),w=i.extractCommon(p,n,t,v),p.newPos+1>=a&&w+1>=l)return s(_L(i,p.components,n,t,i.useLongestToken));f[v]=p}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();m()||v()},0)})();else for(;u<=c;){var y=m();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 _L(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(m,y){var v=r[l+y];return v.length>m.length?v:m}),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 DL(e){return{newPos:e.newPos,components:e.components.slice(0)}}var FL=new zn;function r1(e,t,n){return FL.diff(e,t,n)}var t1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,n1=/\S/,o1=new zn;o1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!n1.test(e)&&!n1.test(t)};o1.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]&&t1.test(t[n])&&t1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var i1=new zn;i1.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 HL=new zn;HL.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var UL=new zn;UL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Fc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fc=function(t){return typeof t}:Fc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fc(e)}var BL=Object.prototype.toString,ka=new zn;ka.useLongestToken=!0;ka.tokenize=i1.tokenize;ka.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(Ng(e,null,null,o),o," ")};ka.equals=function(e,t){return zn.prototype.equals.call(ka,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ng(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(BL.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]=Ng(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Fc(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]=Ng(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Mg=new zn;Mg.tokenize=function(e){return e.slice()};Mg.join=Mg.removeEmpty=function(e){return e};function s1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Mr(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>Mr(i,t[s],n-1)):s1(e)&&s1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Mr(e[s],t[s],n-1)):!1}function jL(e){return Math.max(...e.map(t=>t.length))}function zL(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 a1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<jL(r);o++){let i=zL(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 VL=2;function _g(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=a1(e,VL);return n&&n.text!==t?n:e[0]}var KL={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},j=KL;var l1={current:null,isSupported:null},le=we("resetConversation"),ji=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Hc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},zi=e=>e.conversation.isSupported,Dg=U("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Uc=U("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Bc=U("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),jc=U("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Fg=U("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})})}),zc=U("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Hc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),WL=[Uc.rejected,Bc.rejected,jc.rejected,zc.rejected].map(e=>e==null?void 0:e.toString()),$L=G({name:"conversation",initialState:l1,reducers:{},extraReducers:e=>{e.addCase(Dg.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Uc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Bc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Fg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(jc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(zc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(le,()=>l1).addMatcher(t=>WL.includes(t.type),(t,n)=>{var r;throw j.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),u1=$L.reducer;var _r={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 c1(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 Kc=we("input/replaceText"),Wc=we("input/keyDown"),xo=we("input/sendMessage"),$c=we("input/uiInputChange"),Gc=we("input/applyImageSuggestion"),Ye=we("input/sendEvent");function Vc(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 d1=G({name:"input",initialState:_r,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,{..._r,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=_g(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(Mr(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&Vc(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:m}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=e,{text:v}=t.payload,p=r1(y,v);y.length-v.length>1&&e.metrics.deletions.push(...p.filter(g=>g.removed).map(g=>g.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&&!m){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=_r.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&Vc(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"&&Vc(e)},commitSuggestion(e){Vc(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=_g(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(le,t=>{t.tabCompletionSuggestion=_r.tabCompletionSuggestion,t.previousKeyDownEvent=_r.previousKeyDownEvent,t.textSuggestions=_r.textSuggestions,t.selectedSuggestionIndex=_r.selectedSuggestionIndex,t.metrics=_r.metrics})}}),Vi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),GL=e=>e.input.selection,f1=()=>O(GL),{userInput:p1,changeSelection:Hg,initialInput:m1,nextTextSuggestionIndex:g1,offeredTextSuggestion:h1,previousTextSuggestionIndex:y1,registerCut:v1,registerKeyDown:S1,registerPaste:w1,reset:x1,resetToCommitted:Pa,platformInput:E1,setSelectedTextSuggestionIndex:Dr,setTextSuggestions:xn,stageSuggestion:En,commitSuggestion:Vn,setMetrics:C1}=d1.actions,b1=d1.reducer;function qL(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,[qL(n)]:J(e[n])}),{}):e}function Ug(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Re(e){return Array.isArray(e)?e.map(Re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Ug(n)]:Re(e[n])}),{}):e}var YL={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Aa=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)||""}},Ra=U("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))}),Bg=U("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}),jg=U("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),T1=e=>e.info.agentInfo,k1=G({name:"info",initialState:YL,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Ra.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.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(Bg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(jg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(le,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:P1}=k1.actions,R1=k1.reducer;var qc={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},A1=e=>e.search.isOpen,L1=e=>e.search.page,I1=e=>e.search.list,O1=e=>e.search.aggregates;function N1(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Eo=U("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:Aa(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),M1=G({name:"search",initialState:qc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=qc.fetchState,e.list=qc.list}},extraReducers:e=>{e.addCase(Eo.pending,t=>{t.fetchState="loading"}).addCase(Eo.rejected,(t,n)=>{t.fetchState="error",j.error(n.error)}).addCase(Eo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(le,()=>qc)}}),{resetSearch:Yc,setIsOpen:wt,setPage:en}=M1.actions,_1=M1.reducer;var zg="SetCues",Ki="ShowLoginOverlay",La="UserLoggedIn",XL="UserLoggedOut",Fr="ApplySuggestion",Vg="ApplyImageSuggestion",QL="ShowCommandPalette",ZL=e=>({[zg]:t=>{e.dispatch({...t,isBroadcasted:!0})},[QL]:t=>{e.dispatch(wt(t.isOpen)),t.page&&e.dispatch(en(t.page))},[Ki]:t=>{e.dispatch(Jx(t))},[La]:()=>{e.dispatch(jn())},[XL]:()=>{e.dispatch(jn())},[Vg]:t=>{e.dispatch(Gc({suggestion:t.suggestion}))},[Fr]:t=>{e.dispatch(En({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Vn())}}),D1=ZL;var Ia=S(_()),H1=S(b()),F1=Ia.default.createContext(null),Co=({broadcastEvents:e,children:t})=>{let n=Ia.default.useMemo(()=>e,[]);return(0,H1.jsx)(F1.Provider,{value:n,children:t})},zt=()=>{let e=(0,Ia.useContext)(F1);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var fd=S(ee()),nn=S(_());var ud=S(_());var Kg=function(e,t){return Kg=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])},Kg(e,t)};function Oa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Kg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var xt=function(){return xt=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},xt.apply(this,arguments)};function U1(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 Xc(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 Qc;(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"})(Qc||(Qc={}));var Zc=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 Jc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Jc||(Jc={}));function Wg(e){return e.type===tn.literal}function B1(e){return e.type===tn.argument}function ed(e){return e.type===tn.number}function td(e){return e.type===tn.date}function nd(e){return e.type===tn.time}function rd(e){return e.type===tn.select}function od(e){return e.type===tn.plural}function j1(e){return e.type===tn.pound}function id(e){return e.type===tn.tag}function sd(e){return!!(e&&typeof e=="object"&&e.type===Jc.number)}function Na(e){return!!(e&&typeof e=="object"&&e.type===Jc.dateTime)}function $g(e){e.forEach(function(t){if(delete t.location,rd(t)||od(t))for(var n in t.options)delete t.options[n].location,$g(t.options[n].value);else ed(t)&&sd(t.style)||(td(t)||nd(t))&&Na(t.style)?delete t.style.location:id(t)&&$g(t.children)})}function z1(e,t){t===void 0&&(t={}),t=xt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Zc(e,t).parse();if(n.err){var r=SyntaxError(Qc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||$g(n.val),n.val}function ad(e,t){var n=t&&t.cache?t.cache:oI,r=t&&t.serializer?t.serializer:rI,o=t&&t.strategy?t.strategy:eI;return o(e,{cache:n,serializer:r})}function JL(e){return e==null||typeof e=="number"||typeof e=="boolean"}function V1(e,t,n,r){var o=JL(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function K1(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 Gg(e,t,n,r,o){return n.bind(t,e,r,o)}function eI(e,t){var n=e.length===1?V1:K1;return Gg(e,this,n,t.cache.create(),t.serializer)}function tI(e,t){return Gg(e,this,K1,t.cache.create(),t.serializer)}function nI(e,t){return Gg(e,this,V1,t.cache.create(),t.serializer)}var rI=function(){return JSON.stringify(arguments)};function qg(){this.cache=Object.create(null)}qg.prototype.get=function(e){return this.cache[e]};qg.prototype.set=function(e,t){this.cache[e]=t};var oI={create:function(){return new qg}},ld={variadic:tI,monadic:nI};var bo;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(bo||(bo={}));var Ma=function(e){Oa(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Yg=function(e){Oa(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),bo.INVALID_VALUE,i)||this}return t}(Ma);var W1=function(e){Oa(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),bo.INVALID_VALUE,o)||this}return t}(Ma);var $1=function(e){Oa(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),bo.MISSING_VALUE,r)||this}return t}(Ma);var Xe;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Xe||(Xe={}));function iI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Xe.literal||n.type!==Xe.literal?t.push(n):r.value+=n.value,t},[])}function sI(e){return typeof e=="function"}function _a(e,t,n,r,o,i,s){if(e.length===1&&Wg(e[0]))return[{type:Xe.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Wg(c)){a.push({type:Xe.literal,value:c.value});continue}if(j1(c)){typeof i=="number"&&a.push({type:Xe.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new $1(f,s);var d=o[f];if(B1(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Xe.literal:Xe.object,value:d});continue}if(td(c)){var m=typeof c.style=="string"?r.date[c.style]:Na(c.style)?c.style.parsedOptions:void 0;a.push({type:Xe.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(nd(c)){var m=typeof c.style=="string"?r.time[c.style]:Na(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Xe.literal,value:n.getDateTimeFormat(t,m).format(d)});continue}if(ed(c)){var m=typeof c.style=="string"?r.number[c.style]:sd(c.style)?c.style.parsedOptions:void 0;m&&m.scale&&(d=d*(m.scale||1)),a.push({type:Xe.literal,value:n.getNumberFormat(t,m).format(d)});continue}if(id(c)){var y=c.children,v=c.value,p=o[v];if(!sI(p))throw new W1(v,"function",s);var g=_a(y,t,n,r,o,i),h=p(g.map(function(T){return T.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(T){return{type:typeof T=="string"?Xe.literal:Xe.object,value:T}}))}if(rd(c)){var w=c.options[d]||c.options.other;if(!w)throw new Yg(c.value,d,Object.keys(c.options),s);a.push.apply(a,_a(w.value,t,n,r,o));continue}if(od(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Ma(`Intl.PluralRules is not available in this environment.
|
|
13
|
+
`),st}Bi(()=>{Xr.current=void 0,G.current=void 0,he.current=qt});let Yt=(0,ae.useMemo)(()=>ae.default.createElement(f,Bn({},qt,{ref:I})),[I,f,qt]);return(0,ae.useMemo)(()=>y?ae.default.createElement(V.Provider,{value:ar},Yt):Yt,[V,Yt,ar])}let C=ae.default.memo(x);if(C.WrappedComponent=f,C.displayName=x.displayName=h,l){let L=ae.default.forwardRef(function(O,V){return ae.default.createElement(C,Bn({},O,{reactReduxForwardedRef:V}))});return L.displayName=h,L.WrappedComponent=f,(0,Og.default)(L,f)}return(0,Og.default)(C,f)}}var jn=FL;var Ta=S(_());function HL({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ta.useMemo)(()=>{let u=_c(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ta.useMemo)(()=>e.getState(),[e]);Bi(()=>{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||Ye;return Ta.default.createElement(l.Provider,{value:s},n)}var Mg=HL;function Fc(e=Ye){let t=e===Ye?fc:Ea(e);return function(){let{store:r}=t();return r}}var _g=Fc();function Yx(e=Ye){let t=e===Ye?_g:Fc(e);return function(){return t().dispatch}}var Y=Yx();Cx(Qx.useSyncExternalStoreWithSelector);qx(Xx.useSyncExternalStore);yx(Cg.unstable_batchedUpdates);var ka=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ka||{});var UL={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"},Zx=q({name:"settings",initialState:UL,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Hc}=Zx.actions,Dg=e=>t=>t.settings[e],B=e=>N(Dg(e)),Jx=Zx.reducer;var BL={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},tt=e=>e.auth.isLoggedIn,e1=e=>e.auth.loginFetchState,t1=e=>e.auth.verifyFetchState,n1=e=>e.auth.showLoginOverlay,zn=U("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),r1=U("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Pa=U("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),o1=q({name:"auth",initialState:BL,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(zn.pending,t=>{t.loginFetchState="loading"}),e.addCase(zn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(zn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Pa.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Pa.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Pa.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:zi,setShowLoginOverlay:i1}=o1.actions,s1=o1.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 p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function g(){for(var v=-1*u;v<=u;v+=2){var f=void 0,m=p[v-1],h=p[v+1],w=(h?h.newPos:0)-v;m&&(p[v-1]=void 0);var x=m&&m.newPos+1<a,T=h&&0<=w&&w<l;if(!x&&!T){p[v]=void 0;continue}if(!x||T&&m.newPos<h.newPos?(f=zL(h),i.pushComponent(f.components,void 0,!0)):(f=m,f.newPos++,i.pushComponent(f.components,!0,void 0)),w=i.extractCommon(f,n,t,v),f.newPos+1>=a&&w+1>=l)return s(jL(i,f.components,n,t,i.useLongestToken));p[v]=f}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();g()||v()},0)})();else for(;u<=c;){var y=g();if(y)return y}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function jL(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(g,y){var v=r[l+y];return v.length>g.length?v:g}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function zL(e){return{newPos:e.newPos,components:e.components.slice(0)}}var VL=new Vn;function u1(e,t,n){return VL.diff(e,t,n)}var a1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,l1=/\S/,c1=new Vn;c1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!l1.test(e)&&!l1.test(t)};c1.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]&&a1.test(t[n])&&a1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var d1=new Vn;d1.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 KL=new Vn;KL.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var WL=new Vn;WL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Uc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Uc=function(t){return typeof t}:Uc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(e)}var $L=Object.prototype.toString,Ra=new Vn;Ra.useLongestToken=!0;Ra.tokenize=d1.tokenize;Ra.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify(Fg(e,null,null,o),o," ")};Ra.equals=function(e,t){return Vn.prototype.equals.call(Ra,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Fg(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($L.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]=Fg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Uc(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]=Fg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Hg=new Vn;Hg.tokenize=function(e){return e.slice()};Hg.join=Hg.removeEmpty=function(e){return e};function f1(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)):f1(e)&&f1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>_r(e[s],t[s],n-1)):!1}function GL(e){return Math.max(...e.map(t=>t.length))}function qL(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 p1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<GL(r);o++){let i=qL(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 YL=2;function Ug(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=p1(e,YL);return n&&n.text!==t?n:e[0]}var XL={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},j=XL;var m1={current:null,isSupported:null},le=we("resetConversation"),Vi=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Bc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Ki=e=>e.conversation.isSupported,Bg=U("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),jc=U("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),zc=U("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Vc=U("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Bc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),jg=U("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})})}),Kc=U("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Bc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),QL=[jc.rejected,zc.rejected,Vc.rejected,Kc.rejected].map(e=>e==null?void 0:e.toString()),ZL=q({name:"conversation",initialState:m1,reducers:{},extraReducers:e=>{e.addCase(Bg.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(jc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(zc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(jg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Kc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(le,()=>m1).addMatcher(t=>QL.includes(t.type),(t,n)=>{var r;throw j.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),g1=ZL.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 h1(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var $c=we("input/replaceText"),Gc=we("input/keyDown"),Eo=we("input/sendMessage"),qc=we("input/uiInputChange"),Yc=we("input/applyImageSuggestion"),Xe=we("input/sendEvent");function Wc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var y1=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=Ug(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&&Wc(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:p,metaKey:d,altKey:g}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=e,{text:v}=t.payload,f=u1(y,v);y.length-v.length>1&&e.metrics.deletions.push(...f.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=y.length-v.length;break}case"C":case"V":case"X":if(!p&&!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(!p&&!d&&!g){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&&Wc(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"&&Wc(e)},commitSuggestion(e){Wc(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=Ug(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(le,t=>{t.tabCompletionSuggestion=Dr.tabCompletionSuggestion,t.previousKeyDownEvent=Dr.previousKeyDownEvent,t.textSuggestions=Dr.textSuggestions,t.selectedSuggestionIndex=Dr.selectedSuggestionIndex,t.metrics=Dr.metrics})}}),Wi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),JL=e=>e.input.selection,v1=()=>N(JL),{userInput:S1,changeSelection:zg,initialInput:w1,nextTextSuggestionIndex:x1,offeredTextSuggestion:E1,previousTextSuggestionIndex:C1,registerCut:b1,registerKeyDown:T1,registerPaste:k1,reset:P1,resetToCommitted:Aa,platformInput:R1,setSelectedTextSuggestionIndex:Fr,setTextSuggestions:xn,stageSuggestion:En,commitSuggestion:Kn,setMetrics:A1}=y1.actions,L1=y1.reducer;function eI(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,[eI(n)]:J(e[n])}),{}):e}function Vg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Re(e){return Array.isArray(e)?e.map(Re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Vg(n)]:Re(e[n])}),{}):e}var tI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Ia=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)||""}},La=U("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))}),Kg=U("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}),Wg=U("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),I1=e=>e.info.agentInfo,N1=q({name:"info",initialState:tI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(La.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(La.rejected,t=>{t.fetchState="error"}).addCase(La.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(Kg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Wg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(le,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:O1}=N1.actions,M1=N1.reducer;var Xc={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},_1=e=>e.search.isOpen,D1=e=>e.search.page,F1=e=>e.search.list,H1=e=>e.search.aggregates;function U1(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Co=U("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:Ia(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),B1=q({name:"search",initialState:Xc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Xc.fetchState,e.list=Xc.list}},extraReducers:e=>{e.addCase(Co.pending,t=>{t.fetchState="loading"}).addCase(Co.rejected,(t,n)=>{t.fetchState="error",j.error(n.error)}).addCase(Co.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(le,()=>Xc)}}),{resetSearch:Qc,setIsOpen:xt,setPage:en}=B1.actions,j1=B1.reducer;var $g="SetCues",$i="ShowLoginOverlay",Na="UserLoggedIn",nI="UserLoggedOut",Hr="ApplySuggestion",Gg="ApplyImageSuggestion",rI="ShowCommandPalette",oI=e=>({[$g]:t=>{e.dispatch({...t,isBroadcasted:!0})},[rI]:t=>{e.dispatch(xt(t.isOpen)),t.page&&e.dispatch(en(t.page))},[$i]:t=>{e.dispatch(i1(t))},[Na]:()=>{e.dispatch(zn())},[nI]:()=>{e.dispatch(zn())},[Gg]:t=>{e.dispatch(Yc({suggestion:t.suggestion}))},[Hr]:t=>{e.dispatch(En({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Kn())}}),z1=oI;var Oa=S(_()),K1=S(b()),V1=Oa.default.createContext(null),bo=({broadcastEvents:e,children:t})=>{let n=Oa.default.useMemo(()=>e,[]);return(0,K1.jsx)(V1.Provider,{value:n,children:t})},zt=()=>{let e=(0,Oa.useContext)(V1);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var md=S(ee()),nn=S(_());var dd=S(_());var qg=function(e,t){return qg=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])},qg(e,t)};function Ma(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");qg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Et=function(){return Et=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Et.apply(this,arguments)};function W1(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 Zc(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 Jc;(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"})(Jc||(Jc={}));var ed=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 td;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(td||(td={}));function Yg(e){return e.type===tn.literal}function $1(e){return e.type===tn.argument}function nd(e){return e.type===tn.number}function rd(e){return e.type===tn.date}function od(e){return e.type===tn.time}function id(e){return e.type===tn.select}function sd(e){return e.type===tn.plural}function G1(e){return e.type===tn.pound}function ad(e){return e.type===tn.tag}function ld(e){return!!(e&&typeof e=="object"&&e.type===td.number)}function _a(e){return!!(e&&typeof e=="object"&&e.type===td.dateTime)}function Xg(e){e.forEach(function(t){if(delete t.location,id(t)||sd(t))for(var n in t.options)delete t.options[n].location,Xg(t.options[n].value);else nd(t)&&ld(t.style)||(rd(t)||od(t))&&_a(t.style)?delete t.style.location:ad(t)&&Xg(t.children)})}function q1(e,t){t===void 0&&(t={}),t=Et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ed(e,t).parse();if(n.err){var r=SyntaxError(Jc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Xg(n.val),n.val}function ud(e,t){var n=t&&t.cache?t.cache:cI,r=t&&t.serializer?t.serializer:uI,o=t&&t.strategy?t.strategy:sI;return o(e,{cache:n,serializer:r})}function iI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Y1(e,t,n,r){var o=iI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function X1(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 Qg(e,t,n,r,o){return n.bind(t,e,r,o)}function sI(e,t){var n=e.length===1?Y1:X1;return Qg(e,this,n,t.cache.create(),t.serializer)}function aI(e,t){return Qg(e,this,X1,t.cache.create(),t.serializer)}function lI(e,t){return Qg(e,this,Y1,t.cache.create(),t.serializer)}var uI=function(){return JSON.stringify(arguments)};function Zg(){this.cache=Object.create(null)}Zg.prototype.get=function(e){return this.cache[e]};Zg.prototype.set=function(e,t){this.cache[e]=t};var cI={create:function(){return new Zg}},cd={variadic:aI,monadic:lI};var To;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(To||(To={}));var Da=function(e){Ma(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 Jg=function(e){Ma(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('", "'),'"'),To.INVALID_VALUE,i)||this}return t}(Da);var Q1=function(e){Ma(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),To.INVALID_VALUE,o)||this}return t}(Da);var Z1=function(e){Ma(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,'"'),To.MISSING_VALUE,r)||this}return t}(Da);var Qe;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Qe||(Qe={}));function dI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Qe.literal||n.type!==Qe.literal?t.push(n):r.value+=n.value,t},[])}function fI(e){return typeof e=="function"}function Fa(e,t,n,r,o,i,s){if(e.length===1&&Yg(e[0]))return[{type:Qe.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Yg(c)){a.push({type:Qe.literal,value:c.value});continue}if(G1(c)){typeof i=="number"&&a.push({type:Qe.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Z1(p,s);var d=o[p];if($1(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Qe.literal:Qe.object,value:d});continue}if(rd(c)){var g=typeof c.style=="string"?r.date[c.style]:_a(c.style)?c.style.parsedOptions:void 0;a.push({type:Qe.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(od(c)){var g=typeof c.style=="string"?r.time[c.style]:_a(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Qe.literal,value:n.getDateTimeFormat(t,g).format(d)});continue}if(nd(c)){var g=typeof c.style=="string"?r.number[c.style]:ld(c.style)?c.style.parsedOptions:void 0;g&&g.scale&&(d=d*(g.scale||1)),a.push({type:Qe.literal,value:n.getNumberFormat(t,g).format(d)});continue}if(ad(c)){var y=c.children,v=c.value,f=o[v];if(!fI(f))throw new Q1(v,"function",s);var m=Fa(y,t,n,r,o,i),h=f(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"?Qe.literal:Qe.object,value:T}}))}if(id(c)){var w=c.options[d]||c.options.other;if(!w)throw new Jg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Fa(w.value,t,n,r,o));continue}if(sd(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Da(`Intl.PluralRules is not available in this environment.
|
|
14
14
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
15
|
-
`,bo.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Yg(c.value,d,Object.keys(c.options),s);a.push.apply(a,_a(w.value,t,n,r,o,d-(c.offset||0)));continue}}return iI(a)}function aI(e,t){return t?xt(xt(xt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=xt(xt({},e[r]),t[r]||{}),n},{})):e}function lI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=aI(e[r],t[r]),n},xt({},e)):e}function Xg(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function uI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ad(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Xc([void 0],n,!1)))},{cache:Xg(e.number),strategy:ld.variadic}),getDateTimeFormat:ad(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Xc([void 0],n,!1)))},{cache:Xg(e.dateTime),strategy:ld.variadic}),getPluralRules:ad(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Xc([void 0],n,!1)))},{cache:Xg(e.pluralRules),strategy:ld.variadic})}}var G1=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,m){return!d.length||m.type!==Xe.literal||typeof d[d.length-1]!="string"?d.push(m.value):d[d.length-1]+=m.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return _a(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=U1(s,["formatters"]);this.ast=e.__parse(t,xt(xt({},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=lI(e.formats,r),this.formatters=o&&o.formatters||uI(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=z1,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 cI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var dI="dummy",Qg=(0,ud.createContext)(null);function Y(e){let t=(0,ud.useContext)(Qg);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=cI(n,r);return i?new G1(i).format(o):(t!==dI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var cd=S(_());var q1={root:"X",content:"Xo"};var Zg=S(b()),pI=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,cd.useRef)(null),u=A("Dialog",q1),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,cd.useEffect)(()=>{var d,m;!l.current||!e||!t||(m=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||m.focus()},[e,t,l]),e?(0,Zg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:f,children:(0,Zg.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},dd=pI;var X1=S(ee());var Y1={root:"y"};var Q1=S(b()),gI=({className:e,value:t,...n})=>{let r=A("TextInput",Y1);return(0,Q1.jsx)("input",{className:(0,X1.default)(e,r.root),type:"text",value:t,...n})},Da=gI;var Jg={};Qe(Jg,{enUS:()=>hI,nlNL:()=>yI});var hI={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"}]},yI={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 Z1={root:"Jo",anchorButton:"Ko",errorMessage:"Po",title:"Qo",subtitle:"Vo",text:"Wo",input:"Zo",actions:"_o",button:"w",primaryButton:"oe"};var Te=S(b());var SI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},wI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=Y(Jg),s=A("LoginTokenDialog",Z1),a=O(Yx),l=q(),u=B("productName"),[c,f]=(0,nn.useState)(e||""),[d,m]=(0,nn.useState)(0),[y,v]=(0,nn.useState)(""),p=(0,nn.useCallback)(async x=>{x.preventDefault(),l(Qx({email:c})),m(1)},[n,c]),g=()=>{v(""),m(0)},h=(0,nn.useCallback)(async x=>{x.preventDefault();let T=SI(x.target.elements.token.value);if(!T){v(i("verifyCodeError",{login:w}));return}l(Ta({token:T}))},[n]),w=(0,nn.useMemo)(()=>x=>(0,Te.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:g,children:x},"back-button"),[]);return(0,nn.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:w})),a==="done"&&r()},[a]),(0,Te.jsx)(dd,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,Te.jsxs)("div",{className:s.root,children:[(0,Te.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,Te.jsxs)("form",{onSubmit:p,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,Te.jsx)(Da,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>f(x.target.value)}),(0,Te.jsx)("div",{className:s.actions,children:(0,Te.jsx)("button",{type:"submit",className:(0,fd.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,Te.jsxs)("form",{onSubmit:h,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,Te.jsx)(Da,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,Te.jsx)("div",{className:s.errorMessage,children:y}),(0,Te.jsxs)("div",{className:s.actions,children:[(0,Te.jsx)("button",{type:"button",className:(0,fd.default)(s.button),onClick:g,children:i("back")}),(0,Te.jsx)("button",{type:"submit",className:(0,fd.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},J1=wI;var tE=S(b()),xI=()=>{let e=O(Xx),t=O(T1),n=B("adminUrl"),r=zt(),o=()=>r.send(Ki,!1),i=()=>{r.send(Ki,!1),r.send(La)};return(0,tE.jsx)(J1,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},eE=xI;var uC=S(nh()),pt=S(_());var UI={data:null,fetchState:"idle"},iE=e=>e.contentTypes.data,Fa=U("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),BI=G({name:"contentTypes",initialState:UI,reducers:{},extraReducers:e=>{e.addCase(Fa.pending,t=>{t.fetchState="loading"}).addCase(Fa.rejected,t=>{t.fetchState="error"}).addCase(Fa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),sE=BI.reducer;function To(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 $n=S(_());var aE=S(_()),pd=S(ee());var Vt={root:"ee",list:"ie",listWrapper:"re",listHorizontal:"J",page:"v",search:"K",pageNav:"te",pageTitle:"ne",pageBackButton:"P",listHeader:"ae",listHeading:"pe",listMoreButton:"de",listItem:"Q",listItemContent:"a",listItemText:"le",listItemDescription:"se",listItemActions:"V",truncate:"ce",lineClamp:"xe",listItemTitle:"fe",listItemAction:"ge",listItemPrimaryAction:"be",listItemSelected:"he",sources:"me",sourcesTitle:"ue",source:"ye",icon:"W",searchIcon:"we",searchInputWrapper:"ve",searchInput:"k",select:"ke",selectType:"ze",selectWrapper:"z",image:"je",imageSrc:"Ye",imageSrcHidden:"qe",imageSrcStatus:"Ce",imageTitle:"Se",actions:"Ee",actionsWrapper:"Ge",actionsBar:"Ne",actionButton:"Z",hasShortKeys:"Ae",actionShortcut:"Fe",actionShortcutFixKerning:"He"};var ko={};Qe(ko,{enUS:()=>zI,nlNL:()=>VI});var zI={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"}]},VI={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 Hr=S(b()),KI=({src:e,title:t})=>{let n=A("CommandPalette",Vt),[r,o]=(0,aE.useState)("loading"),i=Y(ko);return(0,Hr.jsxs)("div",{className:n.image,children:[(0,Hr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,pd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Hr.jsx)("span",{className:(0,pd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Hr.jsx)("span",{className:(0,pd.default)(n.imageSrc,n.imageSrcStatus),children:(0,Hr.jsx)(Ml,{})}),t&&(0,Hr.jsx)("span",{className:n.imageTitle,children:t})]})},lE=KI;var uE=S(_()),cE=S(ee());var Po=S(b());function rh({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=Y(ko),s=A("CommandPalette",Vt);return uE.default.Children.count(e)===0?null:(0,Po.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Po.jsxs)("div",{className:s.listHeader,children:[t&&(0,Po.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Po.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Po.jsx)("div",{className:(0,cE.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var za=S(ee());var md=S(_());function Ha(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ne=1,ih=2,sh=4,Ae=8,gd=16,Ua=32,rn=64,oh={a:{content:ne|Ae,self:!1,type:ne|Ae|Ua|rn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:ne|Ae,void:!0},body:{content:ne|ih|sh|Ae|gd|Ua|rn},button:{content:Ae,type:ne|Ae|Ua|rn},caption:{content:ne,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:ne|Ua|rn},dd:{content:ne,parent:["dl"]},dl:{children:["dt","dd"],type:ne},dt:{content:ne,invalid:["footer","header"],parent:["dl"]},figcaption:{content:ne,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:ne,void:!0},img:{void:!0},li:{content:ne,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:ne},picture:{children:["source","img"],type:ne|Ae|gd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Ae,parent:["ruby","rtc"]},rtc:{content:Ae,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Ae,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:ne},tbody:{parent:["table"],children:["tr"]},td:{content:ne,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:ne,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:ne},video:{children:["track","source"]},wbr:{type:ne|Ae,void:!0}};function Ao(e){return t=>{oh[t]={...e,...oh[t]}}}["address","main","div","figure","p","pre"].forEach(Ao({content:ne,type:ne|rn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Ao({content:Ae,type:ne|Ae|rn}));["p","pre"].forEach(Ao({content:Ae,type:ne|rn}));["s","small","span","del","ins"].forEach(Ao({content:Ae,type:ne|Ae}));["article","aside","footer","header","nav","section","blockquote"].forEach(Ao({content:ne,type:ne|ih|rn}));["h1","h2","h3","h4","h5","h6"].forEach(Ao({content:Ae,type:ne|sh|rn}));["audio","canvas","iframe","img","video"].forEach(Ao({type:ne|Ae|gd|rn}));var ja=Object.freeze(oh),ah=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],lh=Object.keys(ja).filter(e=>e!=="canvas"&&e!=="iframe"),ue=1,uh=2,Ro=3,Ur=4,yd=5,vd=Object.freeze({alt:ue,cite:ue,class:ue,colspan:Ro,controls:Ur,datetime:ue,default:Ur,disabled:Ur,dir:ue,height:ue,href:ue,id:ue,kind:ue,label:ue,lang:ue,loading:ue,loop:Ur,media:ue,muted:Ur,poster:ue,rel:ue,role:ue,rowspan:Ro,scope:ue,sizes:ue,span:Ro,start:Ro,style:yd,src:ue,srclang:ue,srcset:ue,tabindex:ue,target:ue,title:ue,type:ue,width:ue}),ch=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function hd(){return hd=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},hd.apply(this,arguments)}function Sd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?md.default.createElement(i,hd({className:t},e)):md.default.createElement(i,hd({className:t},e),n)}var Ba=class{attribute(t,n){return n}node(t,n){return n}};function dE(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 Kn=class{constructor(t,n,r){Ha(this,"greedy",!1),Ha(this,"options",void 0),Ha(this,"propName",void 0),Ha(this,"inverseName",void 0),Ha(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?md.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return dE(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Lo=S(_()),gE=S(pE());function Wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var GI=/(url|image|image-set)\(/i,dh=class extends Ba{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(GI)&&delete n[r]}),n}},mE=1,qI=3,YI=/^<(!doctype|(html|head|body)(\s|>))/i,XI=/^(aria-|data-|\w+:)/iu,QI=/{{{(\w+)\/?}}}/;function ZI(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var wd=class{constructor(t,n={},r=[],o=[]){var i;Wn(this,"allowed",void 0),Wn(this,"banned",void 0),Wn(this,"blocked",void 0),Wn(this,"container",void 0),Wn(this,"content",[]),Wn(this,"props",void 0),Wn(this,"matchers",void 0),Wn(this,"filters",void 0),Wn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new dh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:lh),this.banned=new Set(ah),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:m,match:y,valid:v,void:p,...g}=a,h=l.propName+String(s);d>0&&(f+=i.slice(0,d)),v?(f+=p?`{{{${h}/}}}`:`{{{${h}}}}${y}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:y,matcher:l,props:{...o,...g,key:this.keyIndex}}):f+=y,l.greedy?(i=f+i.slice(d+m),f=""):i=i.slice(d+(m||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
|
+
`,To.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Jg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Fa(w.value,t,n,r,o,d-(c.offset||0)));continue}}return dI(a)}function pI(e,t){return t?Et(Et(Et({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Et(Et({},e[r]),t[r]||{}),n},{})):e}function mI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=pI(e[r],t[r]),n},Et({},e)):e}function eh(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function gI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:ud(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Zc([void 0],n,!1)))},{cache:eh(e.number),strategy:cd.variadic}),getDateTimeFormat:ud(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Zc([void 0],n,!1)))},{cache:eh(e.dateTime),strategy:cd.variadic}),getPluralRules:ud(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Zc([void 0],n,!1)))},{cache:eh(e.pluralRules),strategy:cd.variadic})}}var J1=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var p=c.reduce(function(d,g){return!d.length||g.type!==Qe.literal||typeof d[d.length-1]!="string"?d.push(g.value):d[d.length-1]+=g.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Fa(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=W1(s,["formatters"]);this.ast=e.__parse(t,Et(Et({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=mI(e.formats,r),this.formatters=o&&o.formatters||gI(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=q1,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 hI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var yI="dummy",th=(0,dd.createContext)(null);function W(e){let t=(0,dd.useContext)(th);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=hI(n,r);return i?new J1(i).format(o):(t!==yI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var fd=S(_());var eE={root:"J",content:"Po"};var nh=S(b()),SI=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,fd.useRef)(null),u=P("Dialog",eE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},p=d=>{d.target===l.current&&e&&r()};return(0,fd.useEffect)(()=>{var d,g;!l.current||!e||!t||(g=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||g.focus()},[e,t,l]),e?(0,nh.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:p,children:(0,nh.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},pd=SI;var nE=S(ee());var tE={root:"y"};var rE=S(b()),xI=({className:e,value:t,...n})=>{let r=P("TextInput",tE);return(0,rE.jsx)("input",{className:(0,nE.default)(e,r.root),type:"text",value:t,...n})},Ha=xI;var rh={};ze(rh,{enUS:()=>EI,nlNL:()=>CI});var EI={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"}]},CI={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 oE={root:"Qo",anchorButton:"Vo",errorMessage:"Wo",title:"Zo",subtitle:"_o",text:"oe",input:"ee",actions:"ie",button:"w",primaryButton:"re"};var Te=S(b());var TI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},kI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=W(rh),s=P("LoginTokenDialog",oE),a=N(t1),l=Y(),u=B("productName"),[c,p]=(0,nn.useState)(e||""),[d,g]=(0,nn.useState)(0),[y,v]=(0,nn.useState)(""),f=(0,nn.useCallback)(async x=>{x.preventDefault(),l(r1({email:c})),g(1)},[n,c]),m=()=>{v(""),g(0)},h=(0,nn.useCallback)(async x=>{x.preventDefault();let T=TI(x.target.elements.token.value);if(!T){v(i("verifyCodeError",{login:w}));return}l(Pa({token:T}))},[n]),w=(0,nn.useMemo)(()=>x=>(0,Te.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:w})),a==="done"&&r()},[a]),(0,Te.jsx)(pd,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,Te.jsxs)("div",{className:s.root,children:[(0,Te.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,Te.jsxs)("form",{onSubmit:f,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,Te.jsx)(Ha,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>p(x.target.value)}),(0,Te.jsx)("div",{className:s.actions,children:(0,Te.jsx)("button",{type:"submit",className:(0,md.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,Te.jsxs)("form",{onSubmit:h,children:[(0,Te.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,Te.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,Te.jsx)(Ha,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,Te.jsx)("div",{className:s.errorMessage,children:y}),(0,Te.jsxs)("div",{className:s.actions,children:[(0,Te.jsx)("button",{type:"button",className:(0,md.default)(s.button),onClick:m,children:i("back")}),(0,Te.jsx)("button",{type:"submit",className:(0,md.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},iE=kI;var aE=S(b()),PI=()=>{let e=N(n1),t=N(I1),n=B("adminUrl"),r=zt(),o=()=>r.send($i,!1),i=()=>{r.send($i,!1),r.send(Na)};return(0,aE.jsx)(iE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},sE=PI;var vC=S(sh()),mt=S(_());var WI={data:null,fetchState:"idle"},dE=e=>e.contentTypes.data,Ua=U("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),$I=q({name:"contentTypes",initialState:WI,reducers:{},extraReducers:e=>{e.addCase(Ua.pending,t=>{t.fetchState="loading"}).addCase(Ua.rejected,t=>{t.fetchState="error"}).addCase(Ua.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),fE=$I.reducer;function ko(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=S(_());var pE=S(_()),gd=S(ee());var Vt={root:"te",list:"ne",listWrapper:"ae",listHorizontal:"K",page:"v",search:"P",pageNav:"pe",pageTitle:"de",pageBackButton:"Q",listHeader:"le",listHeading:"se",listMoreButton:"ce",listItem:"V",listItemContent:"a",listItemText:"xe",listItemDescription:"fe",listItemActions:"W",truncate:"ge",lineClamp:"be",listItemTitle:"he",listItemAction:"me",listItemPrimaryAction:"ue",listItemSelected:"ye",sources:"we",sourcesTitle:"ve",source:"ke",icon:"Z",searchIcon:"ze",searchInputWrapper:"je",searchInput:"k",select:"Ye",selectType:"qe",selectWrapper:"z",image:"Ce",imageSrc:"Se",imageSrcHidden:"Ee",imageSrcStatus:"Ge",imageTitle:"Ne",actions:"Ae",actionsWrapper:"Fe",actionsBar:"He",actionButton:"_",hasShortKeys:"Le",actionShortcut:"Me",actionShortcutFixKerning:"Re"};var Po={};ze(Po,{enUS:()=>qI,nlNL:()=>YI});var qI={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"}]},YI={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=S(b()),XI=({src:e,title:t})=>{let n=P("CommandPalette",Vt),[r,o]=(0,pE.useState)("loading"),i=W(Po);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,gd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Ur.jsx)("span",{className:(0,gd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Ur.jsx)("span",{className:(0,gd.default)(n.imageSrc,n.imageSrcStatus),children:(0,Ur.jsx)(Dl,{})}),t&&(0,Ur.jsx)("span",{className:n.imageTitle,children:t})]})},mE=XI;var gE=S(_()),hE=S(ee());var Ro=S(b());function ah({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=W(Po),s=P("CommandPalette",Vt);return gE.default.Children.count(e)===0?null:(0,Ro.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Ro.jsxs)("div",{className:s.listHeader,children:[t&&(0,Ro.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Ro.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Ro.jsx)("div",{className:(0,hE.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Ka=S(ee());var hd=S(_());function Ba(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,uh=2,ch=4,Ae=8,yd=16,ja=32,rn=64,lh={a:{content:re|Ae,self:!1,type:re|Ae|ja|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|Ae,void:!0},body:{content:re|uh|ch|Ae|yd|ja|rn},button:{content:Ae,type:re|Ae|ja|rn},caption:{content:re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:re|ja|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|Ae|yd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Ae,parent:["ruby","rtc"]},rtc:{content:Ae,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Ae,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|Ae,void:!0}};function Lo(e){return t=>{lh[t]={...e,...lh[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:Ae,type:re|Ae|rn}));["p","pre"].forEach(Lo({content:Ae,type:re|rn}));["s","small","span","del","ins"].forEach(Lo({content:Ae,type:re|Ae}));["article","aside","footer","header","nav","section","blockquote"].forEach(Lo({content:re,type:re|uh|rn}));["h1","h2","h3","h4","h5","h6"].forEach(Lo({content:Ae,type:re|ch|rn}));["audio","canvas","iframe","img","video"].forEach(Lo({type:re|Ae|yd|rn}));var Va=Object.freeze(lh),dh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],fh=Object.keys(Va).filter(e=>e!=="canvas"&&e!=="iframe"),ue=1,ph=2,Ao=3,Br=4,Sd=5,wd=Object.freeze({alt:ue,cite:ue,class:ue,colspan:Ao,controls:Br,datetime:ue,default:Br,disabled:Br,dir:ue,height:ue,href:ue,id:ue,kind:ue,label:ue,lang:ue,loading:ue,loop:Br,media:ue,muted:Br,poster:ue,rel:ue,role:ue,rowspan:Ao,scope:ue,sizes:ue,span:Ao,start:Ao,style:Sd,src:ue,srclang:ue,srcset:ue,tabindex:ue,target:ue,title:ue,type:ue,width:ue}),mh=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function vd(){return vd=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},vd.apply(this,arguments)}function xd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?hd.default.createElement(i,vd({className:t},e)):hd.default.createElement(i,vd({className:t},e),n)}var za=class{attribute(t,n){return n}node(t,n){return n}};function yE(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){Ba(this,"greedy",!1),Ba(this,"options",void 0),Ba(this,"propName",void 0),Ba(this,"inverseName",void 0),Ba(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?hd.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return yE(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Io=S(_()),xE=S(SE());function $n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JI=/(url|image|image-set)\(/i,gh=class extends za{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(JI)&&delete n[r]}),n}},wE=1,eN=3,tN=/^<(!doctype|(html|head|body)(\s|>))/i,nN=/^(aria-|data-|\w+:)/iu,rN=/{{{(\w+)\/?}}}/;function oN(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ed=class{constructor(t,n={},r=[],o=[]){var i;$n(this,"allowed",void 0),$n(this,"banned",void 0),$n(this,"blocked",void 0),$n(this,"container",void 0),$n(this,"content",[]),$n(this,"props",void 0),$n(this,"matchers",void 0),$n(this,"filters",void 0),$n(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new gh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:fh),this.banned=new Set(dh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let p="";for(;i&&(a=l.match(i));){let{index:d,length:g,match:y,valid:v,void:f,...m}=a,h=l.propName+String(s);d>0&&(p+=i.slice(0,d)),v?(p+=f?`{{{${h}/}}}`:`{{{${h}}}}${y}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=y,l.greedy?(i=p+i.slice(d+g),p=""):i=i.slice(d+(g||y.length))}l.greedy||(i=p+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
|
|
16
16
|
`);return o=o.replace(/\n{3,}/g,`
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||ZI)();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(YI)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,gE.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==mE||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=vd[l]||vd[s];if(!this.isSafe(t)||!l.match(XI)&&(!n&&(!u||u===uh)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===Ur?c=!0:u===Ro?c=Number.parseFloat(String(c)):u!==yd&&(c=String(c)),r[ch[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===mE){let d=c.nodeName.toLowerCase(),m=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 p=this.keyIndex;v=this.parseNode(y,m);let g=s(y,v,m);if(g===null)return;if(typeof g<"u"){l.push(Lo.default.cloneElement(g,{key:p}));return}this.keyIndex=p-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,m))){var f;this.keyIndex+=1;let p=this.extractAttributes(y),g={tagName:d};p&&(g.attributes=p),m.void&&(g.selfClose=m.void),l.push(Lo.default.createElement(Sd,{...g,key:this.keyIndex},(f=v)!==null&&f!==void 0?f:this.parseNode(y,m)))}else l=[...l,...this.parseNode(y,m.tagName?m:n)]}else if(c.nodeType===qI){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(QI);){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],m;if(u)m=s.length,r.push(f.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));m=y.index+y[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(m)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function JI(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 m=new wd(i??"",e).parse();m.length>0&&(d=m)}return d||(d=s),f?Lo.default.createElement(Lo.default.Fragment,null,d):Lo.default.createElement(Sd,{attributes:n,className:r,tagName:c},d)}function Wi(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,...m}=e,y=i?[]:l,v=o?[]:a,p=c?[c]:[],g=u?[u]:[];y.forEach(T=>{T.onBeforeParse&&p.push(T.onBeforeParse.bind(T)),T.onAfterParse&&g.push(T.onAfterParse.bind(T))});let h=p.reduce((T,C)=>C(T,e),r??""),w=new wd(h,m,y,v),x=g.reduce((T,C)=>C(T,e),w.parse());return Lo.default.createElement(JI,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var eO=/[.*+?^${}()|[\]\\]/g,tO=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function nO(e){return e.replace(eO,"\\$&")}function rO(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function oO(e){return e.search(tO)}function hE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${nO(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function yE(e){return e.replace(jl,'<mark data-type="placeholder">$1</mark>')}function $i(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function iO(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 fh(e,t,n={}){if(t){let r=rO(t.toLowerCase(),e.toLowerCase()),o=$i(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=oO(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Nv).length>3||t.length>30?iO(t.trim(),r):0;return`${`${s>0?"\u2026":""}${$i(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var sO=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function xd(e){return sO.test(e)}function vE(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var He=S(_()),SE=S(ee());var ph={root:"Le",trigger:"_",content:"Me",contentOpen:"Re",contentTop:"Te",contentBottom:"Ue",item:"oo"};var Io=S(b()),lO=0,wE=He.default.createContext(null),uO=()=>{let e=(0,He.useContext)(wE);if(!e)throw new Error("Invalid DropdownContext");return e},xE=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,He.useMemo)(()=>++lO,[]),o=(0,He.useRef)(null),i=(0,He.useRef)(null),s=A("Dropdown",ph),[a,l]=(0,He.useState)(!1),[u,c]=(0,He.useState)(n),f=m=>{m.preventDefault(),m.stopPropagation(),l(!a)},d=(0,He.useCallback)(([m])=>{!m.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,He.useEffect)(()=>{let m=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}},[]),(0,He.useEffect)(()=>{if(!i.current&&!a)return()=>{};let m=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&m.observe(i.current),()=>{i.current&&m.unobserve(i.current)}},[i,a]),(0,Io.jsx)(wE.Provider,{value:{setIsOpen:l},children:(0,Io.jsxs)("div",{ref:o,className:s.root,children:[(0,Io.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,Io.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,SE.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function cO({as:e,children:t,onClick:n,...r}){let o=e||"button",i=A("Dropdown",ph),{setIsOpen:s}=uO(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,Io.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}xE.Item=cO;var mh=xE;var gh=S(b()),EE=e=>(0,gh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,gh.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 Oo={};Qe(Oo,{enUS:()=>dO,nlNL:()=>fO});var dO={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"}]},fO={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 Ed=S(b()),pO="%0d%0a%0d%0a%0d%0a",mO=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(pO)}`},gO=({suggestion:e,onFeedback:t})=>{let n=Y(Oo),r=B("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Ed.jsx)(mh,{trigger:(0,Ed.jsx)(EE,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Ed.jsx)(mh.Item,{as:"a",href:mO(r,e),onClick:t,children:n("giveFeedback")})})},Cd=gO;var bd=S(_()),TE=S(b()),CE=bd.default.createContext(void 0);function Br(){let e=bd.default.useContext(CE);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var bE=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=bd.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,TE.jsx)(CE.Provider,{value:s,children:e})};var Et=S(b());function hh({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}=Br(),m=A("CommandPalette",Vt);function y(v){r(v),e&&d(!1)}return(0,Et.jsxs)("div",{className:(0,za.default)(m.listItem,l===f&&m.listItemSelected),children:[(0,Et.jsx)("button",{type:"button",className:(0,za.default)(m.listItemAction,m.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,Et.jsxs)("div",{className:m.listItemContent,children:[typeof n=="string"?(0,Et.jsx)("p",{className:(0,za.default)(m.listItemText,m.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,Et.jsx)(Wi,{tagName:"p",allowList:[],content:xd(s)?vE(s):s,className:(0,za.default)(m.listItemDescription,u==null?void 0:u.description,t?m.lineClamp:m.truncate)})]})}),o&&(0,Et.jsx)("div",{className:m.listItemActions,children:(0,Et.jsx)(Cd,{suggestion:String(n),onFeedback:o})}),a&&(0,Et.jsxs)("div",{className:m.sources,children:[(0,Et.jsx)("span",{className:m.sourcesTitle,children:"Sources"}),a.map(v=>v.url?(0,Et.jsx)("a",{className:m.source,href:v.url,target:"_blank",title:v.url,rel:"noopener noreferrer",onClick:()=>i&&i(v),children:v.name},v.url):(0,Et.jsx)("span",{className:m.source,children:v.name},v.name))]})]})}var Va=S(b()),kE=()=>(0,Va.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Va.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Va.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 No=S(b());function yh({children:e,title:t,id:n,onDismiss:r}){let o=Y(ko),i=A("CommandPalette",Vt),{page:s}=Br();return s!==n?null:(0,No.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,No.jsxs)("div",{className:i.pageNav,children:[(0,No.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,No.jsx)(kE,{}),o("back")]}),t&&(0,No.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var PE=S(_());var Ka=S(b()),Gi=()=>(0,Ka.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Ka.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Ka.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=S(b());function hO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=A("CommandPalette",Vt);return(0,on.jsxs)("div",{className:l.search,children:[(0,on.jsx)("div",{className:l.searchIcon,children:(0,on.jsx)(Gi,{})}),(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 RE=(0,PE.forwardRef)(hO);var vh=S(ee());var Td=S(b()),yO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=A("CommandPalette",Vt);return(0,Td.jsxs)("button",{type:"button",...r,onClick:e,className:(0,vh.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Td.jsx)("span",{className:(0,vh.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},AE=yO;var Wa=S(b()),vO="[data-command-palette-item]";function qi({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[m,y]=(0,$n.useState)(),v=(0,$n.useRef)(null),p=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{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=w();N.length!==0&&y(N[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(vO)||[]),x=N=>document.querySelector(`[data-item-id=${N}]`),T=N=>{let V=x(N);V&&y(V.dataset.itemId)},C=N=>{let V=x(N);V&&V.scrollIntoView({behavior:"smooth"})},k=()=>{if(!m)return;let N=w(),V=x(m);if(!V)return;let K=N.indexOf(V),se=N[K+1];se&&se.dataset.itemId?T(se.dataset.itemId):h()},L=()=>{if(!m)return;let N=w(),V=x(m);if(!V)return;let K=N.indexOf(V),se=N[K-1];se&&se.dataset.itemId?T(se.dataset.itemId):T(N[N.length-1].dataset.itemId)},I=(0,$n.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),k();break}case"ArrowUp":{N.preventDefault(),L();break}case"Enter":{if(m){let V=x(m);V==null||V.click()}break}}},[m]);return(0,$n.useEffect)(()=>{h()},[d,r,l,f]),(0,$n.useEffect)(()=>{m&&C(m)},[m]),(0,Wa.jsx)(dd,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:g,onClose:p,onKeyDown:I,children:(0,Wa.jsxs)(bE,{selected:m,setSelected:y,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,Wa.jsx)(RE,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}qi.Page=yh;qi.List=rh;qi.Image=lE;qi.ListItem=hh;qi.Button=AE;var ge=qi;var LE=S(_());function IE(e,t){(0,LE.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=S(_());var OE={data:null,fetchState:"idle"},kd=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=U("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)}),SO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),wO=G({name:"entities",initialState:OE,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=SO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(le,()=>OE)}}),NE=wO.reducer;var Sh={};Qe(Sh,{enUS:()=>xO,nlNL:()=>EO});var xO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},EO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var ME={root:"Be",empty:"De"};var Yi=S(b()),bO=({onCopy:e})=>{let t=(0,$a.useRef)(null),n=A("EntitiesList",ME),r=O(kd),{setSelected:o}=Br(),i=Y(Sh),s=q();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)(ge.List,{children:r.map((a,l)=>(0,Yi.jsx)(ge.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")})]})},_E=bO;var an=S(_());var DE={data:null,fetchState:"idle"},FE=e=>e.summary.data,HE=e=>e.summary.fetchState==="error",UE=e=>e.summary.model,Gn=U("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"))}),TO=G({name:"summary",initialState:DE,reducers:{},extraReducers:e=>{e.addCase(Gn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Gn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Gn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary,t.model=n.payload.model)}).addCase(le,()=>DE)}}),BE=TO.reducer;var wh={};Qe(wh,{enUS:()=>kO,nlNL:()=>PO});var kO={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."}]},PO={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 jE={root:"Ie",actions:"Oe",main:"Xe",textInput:"eo",loading:"Je",error:"Ke"};var qn=S(b()),AO=({onCopy:e})=>{let t=(0,an.useRef)(null),n=A("SummaryForm",jE),[r,o]=(0,an.useState)(""),i=Y(wh),s=O(UE),a=O(FE),l=O(HE),u=q(),c=()=>{u(Ye({name:"summary copied to clipboard",data:{originalText:a,finalText:r,model:s},options:{includeConversationData:!0}})),e(r)},f=()=>{let d=document.getSelection();d&&u(Ye({name:"summary copied to clipboard",data:{originalText:a,finalText:d==null?void 0:d.toString(),model:s},options:{includeConversationData:!0}}))};return(0,an.useEffect)(()=>{u(Gn())},[]),(0,an.useEffect)(()=>{o(a||"")},[a]),(0,an.useEffect)(()=>{t.current&&a&&t.current.focus()},[t,a]),(0,an.useEffect)(()=>{let d=m=>{m.key==="Enter"&&m.shiftKey&&c()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[r]),(0,qn.jsx)("div",{className:n.root,tabIndex:-1,children:l?(0,qn.jsx)("p",{className:n.error,children:i("error")}):(0,qn.jsxs)(an.Fragment,{children:[(0,qn.jsx)("div",{className:n.main,children:(0,qn.jsx)("textarea",{placeholder:a?void 0:i("loading"),disabled:!a,className:n.textInput,ref:t,value:r,onCopy:f,onChange:d=>o(d.target.value)})}),(0,qn.jsx)("div",{className:n.actions,children:(0,qn.jsx)(ge.Button,{shortKeys:[8679,8629],onClick:c,children:i("copy")})})]})})},zE=AO;var Ga={};Qe(Ga,{enUS:()=>LO,nlNL:()=>IO});var LO={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?"}]},IO={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 jr=S(_());var xh={};Qe(xh,{enUS:()=>OO,nlNL:()=>NO});var OO={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"}]},NO={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 VE={root:"io",title:"Pe",empty:"Qe",status:"Ve",form:"ro",input:"to",submit:"We",question:"Ze",answer:"_e",alignRight:"oi"};var _O={data:null,fetchState:"idle"},KE=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},qa=U("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}),DO=G({name:"knowledgeAssistant",initialState:_O,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})}}),WE=DO.reducer;var Eh={data:[],fetchState:"idle"},$E=e=>{var t;return(t=e.answer)==null?void 0:t.data},GE=e=>e.answer.fetchState,Qi=we("answer/resetKnowledgeSearch"),Xi=U("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=KE(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({customerInstruction:o.customerInstruction,doNotKnowAnswer:o.doNotKnowAnswer,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),FO=G({name:"answer",initialState:Eh,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(le,()=>Eh).addCase(Qi,()=>Eh)}}),qE=FO.reducer;var Ya=S(b()),YE=()=>(0,Ya.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ya.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ya.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 Ct=S(b()),HO=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=jr.default.useState(""),{setSelected:i}=Br(),s=(0,jr.useRef)(null),a=A("EntitiesList",VE),l=Y(xh),u=q(),c=O($E),f=O(GE),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Xi(r))},m=(y,v)=>{u(Ye({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,jr.useEffect)(()=>{var y;n&&f==="idle"?u(Xi(n)):(y=s.current)==null||y.focus()},[s,f]),(0,jr.useEffect)(()=>{f==="done"&&(u(Ye({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,jr.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,Ct.jsxs)("div",{className:a.root,children:[c.length>0&&(0,Ct.jsx)("div",{className:a.alignRight,children:(0,Ct.jsx)(ge.Button,{onClick:t,children:l("reset")})}),c.map(({question:y,answer:v},p)=>(0,Ct.jsx)(ge.List,{children:(0,Ct.jsx)(ge.ListItem,{id:`knowledge-assist-${p}`,"data-testid":"knowledge-search-answer",description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:g=>m(g,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${p}`)),f==="loading"&&(0,Ct.jsx)("p",{className:a.status,children:l("loading")}),f==="error"&&(0,Ct.jsx)("p",{className:a.status,children:l("error")}),(0,Ct.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,Ct.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,Ct.jsx)("button",{type:"submit",className:a.submit,children:(0,Ct.jsx)(YE,{})})]})]})},XE=HO;var UO={data:null,fetchState:"idle"},Yn=e=>e.profile.data,Pd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Xa=U("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)}),BO=G({name:"profile",initialState:UO,reducers:{},extraReducers:e=>{e.addCase(Xa.pending,t=>{t.fetchState="loading"}).addCase(Xa.rejected,t=>{t.fetchState="error"}).addCase(Xa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),QE=BO.reducer;var sC=S(_());var jO=["{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}"],zO=new RegExp(jO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function ZE(e,t){let n=e.split(zO),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 JE(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var tC={suggestions:[],fetchState:"idle"},eC={default:tC},nC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Rd=e=>e.textSuggestions,rC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Ad=we("textSuggestions/refresh"),ln=U("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,Aa(r),e);if(e==="default"){let c=s?l.filter(rC(a)):l;t.dispatch(xn(c.slice(0,i)))}return l}),Qa=U("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,{...Aa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(rC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?ZE(c.text,e):c.text}))),l=JE(l,i),t.dispatch(xn(l)),l}),oC=G({name:"textSuggestions",initialState:eC,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]||tC;return{...t,[r]:{...o,fetchState:"loading"}}}).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(Qa.pending,t=>{t.default.fetchState="loading"}).addCase(Qa.rejected,t=>{t.default.fetchState="error"}).addCase(Qa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(le,()=>eC)}}),{setTextSuggestions:yF,setSuggestionState:vF}=oC.actions,iC=oC.reducer;var Mo=S(b()),VO=({commands:e,onClick:t})=>{var a,l,u;let n=q(),r=Y(Ga),o=O(Yn),i=O(Rd),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,sC.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(ln(c))})},[]),(0,Mo.jsxs)("div",{children:[e.length>0&&(0,Mo.jsx)(ge.List,{heading:r("commands"),children:e.map((c,f)=>(0,Mo.jsx)(ge.ListItem,{id:`command-${f}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:f})=>{var d;return(0,Mo.jsx)(ge.List,{heading:f,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((m,y)=>(0,Mo.jsx)(ge.ListItem,{id:`${c}-${y}`,closeOnSelect:!1,description:m.text,onClick:()=>t(m.text,m),"data-testid":"search-overlay-suggestion",children:m.title},`${m.id}-${m.text}`))},c)})]})},aC=VO;var Ue=S(b()),WO=200,$O=5,GO=4,lC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),qO=()=>{let e=q(),t=zt(),n=Y(Ga),[r,o]=(0,pt.useState)(!1),[i,s]=(0,pt.useState)(""),a=O(L1),l=O(Yn),[u,c]=(0,pt.useState)(),f=O(tt),d=B("showSearch"),m=B("showEntitiesCommand"),y=B("showSummaryCommand"),v=B("showKnowledgeSearch"),p=B("showImageSearch"),g=B("searchTriggerKey"),h=O(iE),w=O(I1),x=O(O1),T=O(A1),C=F=>ir(w.filter(X=>X.type===F.toUpperCase()),F),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:p}].filter(F=>F.shouldShow),L=[{label:n("entitiesClipboard"),onClick:()=>e(en("entities")),shouldShow:m&&lC(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(en("summary")),shouldShow:y&&lC(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(en("knowledgeAssist")),shouldShow:v}].filter(F=>F.shouldShow),I=(h==null?void 0:h.map(F=>({value:F.code.toUpperCase(),label:`${F.name}s`,list:C(F.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],N=(0,pt.useCallback)((0,uC.default)((F,X)=>{e(Eo({query:F,type:X,tags:["search-overlay"],size:u?50:20}))},WO),[u]),V=(0,pt.useCallback)((F,X)=>{switch(X.type){case"IMAGE":t.send(Vg,{suggestion:X});break;default:t.send(Fr,{text:F,suggestion:X})}e(wt(!1))},[e]),K=F=>{To(F.text),e(Ye({name:"entity copied",data:{entity:F,type:"copy"}})),e(wt(!1))},se=(0,pt.useCallback)(F=>{e(Ye({name:"suggestion feedback",data:{text:F.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),ds=F=>{t.send(Fr,{text:F,suggestion:{source:"knowledge-assist",text:F}}),e(Ye({name:"answer used",data:{originalText:F},options:{includeConversationData:!0}})),s(""),e(en("search")),e(Qi()),e(wt(!1))},Rt=F=>{To(F),e(wt(!1))};function ir(F,X){return F.slice(0,u?10:X.toLowerCase()==="image"?GO:$O)}function At(F){return X=>{r?window.confirm(n("warning"))&&(F(X),o(!1)):F(X)}}return(0,pt.useEffect)(()=>{i?N(i,u):e(Yc())},[i,u]),(0,pt.useEffect)(()=>{a==="search"&&e(Qi())},[a]),(0,pt.useEffect)(()=>{f&&e(Fa())},[f]),IE(g,()=>e(wt(!0))),!d||!l?null:(0,Ue.jsxs)(ge,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:At(F=>e(wt(F))),onChangeType:F=>c(F),onChangePage:At(F=>e(en(F))),selectedType:u,search:i,page:a,isOpen:T,types:[...I,...k],children:[(0,Ue.jsxs)(ge.Page,{id:"search",children:[i.length===0&&(0,Ue.jsx)(aC,{commands:L,onClick:V}),i.length>0&&(0,Ue.jsxs)(pt.Fragment,{children:[L.length>0&&(0,Ue.jsx)(ge.List,{heading:n("commands"),children:L.map((F,X)=>(0,Ue.jsx)(ge.ListItem,{closeOnSelect:!1,onClick:F.onClick,id:`commands-${X}`,children:F.label},F.label))}),[...I,...k].map(({value:F,label:X,list:sr,lineClamp:he,listOrientation:ar})=>(0,Ue.jsx)(ge.List,{heading:X,orientation:ar==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(F),hasMore:!u&&x[F.toLowerCase()]>ir(sr,F).length,children:ir(sr,F).map($=>(0,Ue.jsx)(ge.ListItem,{id:`${F}-${$.id}`,closeOnSelect:!1,lineClamp:he,onClick:()=>V($.text,$),description:F!=="IMAGE"?$.title&&$.text:void 0,onFeedback:F!=="IMAGE"?()=>se($):void 0,children:F==="IMAGE"?(0,Ue.jsx)(ge.Image,{title:$.title||$.text,src:$.image}):$.title||$.text},`${$.id}-${$.text}`))},F))]})]}),(0,Ue.jsx)(ge.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:At(()=>{e(en("search"))}),children:(0,Ue.jsx)(_E,{onCopy:K})}),(0,Ue.jsx)(ge.Page,{id:"summary",title:n("summaryTitle"),onDismiss:At(()=>{e(en("search"))}),children:(0,Ue.jsx)(zE,{onCopy:Rt})}),(0,Ue.jsx)(ge.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:At(()=>{e(Qi()),e(en("search"))}),children:(0,Ue.jsx)(XE,{question:i,onUse:ds,onResetQuestion:()=>{e(Qi()),s("")}})})]})},cC=qO;var Za=S(b()),YO=()=>{let e=B("showSearch"),t=B("isEmbedded");return(0,Za.jsxs)(dC.Fragment,{children:[e&&(0,Za.jsx)(cC,{}),t&&(0,Za.jsx)(eE,{})]})},fC=YO;var hC=S(ee());var Ld=S(b()),pC=({className:e})=>(0,Ld.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,Ld.jsx)("g",{children:(0,Ld.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||oN)();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(tN)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,xE.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==wE||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=wd[l]||wd[s];if(!this.isSafe(t)||!l.match(nN)&&(!n&&(!u||u===ph)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===Br?c=!0:u===Ao?c=Number.parseFloat(String(c)):u!==Sd&&(c=String(c)),r[mh[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 Va[t]?{...n,...Va[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===wE){let d=c.nodeName.toLowerCase(),g=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let v;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let f=this.keyIndex;v=this.parseNode(y,g);let m=s(y,v,g);if(m===null)return;if(typeof m<"u"){l.push(Io.default.cloneElement(m,{key:f}));return}this.keyIndex=f-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,g))){var p;this.keyIndex+=1;let f=this.extractAttributes(y),m={tagName:d};f&&(m.attributes=f),g.void&&(m.selfClose=g.void),l.push(Io.default.createElement(xd,{...m,key:this.keyIndex},(p=v)!==null&&p!==void 0?p:this.parseNode(y,g)))}else l=[...l,...this.parseNode(y,g.tagName?g:n)]}else if(c.nodeType===eN){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(rN);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:p,props:d}=n[a],g;if(u)g=s.length,r.push(p.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));g=y.index+y[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(g)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function iN(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",p=c==="fragment"?!0:u,d;if(a)d=a;else{let g=new Ed(i??"",e).parse();g.length>0&&(d=g)}return d||(d=s),p?Io.default.createElement(Io.default.Fragment,null,d):Io.default.createElement(xd,{attributes:n,className:r,tagName:c},d)}function Gi(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:p="span",noWrap:d=!1,...g}=e,y=i?[]:l,v=o?[]:a,f=c?[c]:[],m=u?[u]:[];y.forEach(T=>{T.onBeforeParse&&f.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let h=f.reduce((T,C)=>C(T,e),r??""),w=new Ed(h,g,y,v),x=m.reduce((T,C)=>C(T,e),w.parse());return Io.default.createElement(iN,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:p})}var sN=/[.*+?^${}()|[\]\\]/g,aN=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function lN(e){return e.replace(sN,"\\$&")}function uN(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function cN(e){return e.search(aN)}function EE(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${lN(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function CE(e){return e.replace(Vl,'<mark data-type="placeholder">$1</mark>')}function qi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function dN(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 hh(e,t,n={}){if(t){let r=uN(t.toLowerCase(),e.toLowerCase()),o=qi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=cN(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Uv).length>3||t.length>30?dN(t.trim(),r):0;return`${`${s>0?"\u2026":""}${qi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var fN=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Cd(e){return fN.test(e)}function bE(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var He=S(_()),TE=S(ee());var yh={root:"Te",trigger:"oo",content:"Ue",contentOpen:"Be",contentTop:"De",contentBottom:"Ie",item:"eo"};var No=S(b()),mN=0,kE=He.default.createContext(null),gN=()=>{let e=(0,He.useContext)(kE);if(!e)throw new Error("Invalid DropdownContext");return e},PE=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,He.useMemo)(()=>++mN,[]),o=(0,He.useRef)(null),i=(0,He.useRef)(null),s=P("Dropdown",yh),[a,l]=(0,He.useState)(!1),[u,c]=(0,He.useState)(n),p=g=>{g.preventDefault(),g.stopPropagation(),l(!a)},d=(0,He.useCallback)(([g])=>{!g.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,He.useEffect)(()=>{let g=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",g),()=>{document.removeEventListener("click",g)}},[]),(0,He.useEffect)(()=>{if(!i.current&&!a)return()=>{};let g=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&g.observe(i.current),()=>{i.current&&g.unobserve(i.current)}},[i,a]),(0,No.jsx)(kE.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:p,children:e}),(0,No.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,TE.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function hN({as:e,children:t,onClick:n,...r}){let o=e||"button",i=P("Dropdown",yh),{setIsOpen:s}=gN(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,No.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}PE.Item=hN;var vh=PE;var Sh=S(b()),RE=e=>(0,Sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,Sh.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 Oo={};ze(Oo,{enUS:()=>yN,nlNL:()=>vN});var yN={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"}]},vN={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 bd=S(b()),SN="%0d%0a%0d%0a%0d%0a",wN=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(SN)}`},xN=({suggestion:e,onFeedback:t})=>{let n=W(Oo),r=B("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,bd.jsx)(vh,{trigger:(0,bd.jsx)(RE,{"data-testid":"feedback-dropdown-trigger"}),children:(0,bd.jsx)(vh.Item,{as:"a",href:wN(r,e),onClick:t,children:n("giveFeedback")})})},Td=xN;var kd=S(_()),IE=S(b()),AE=kd.default.createContext(void 0);function jr(){let e=kd.default.useContext(AE);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var LE=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=kd.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,IE.jsx)(AE.Provider,{value:s,children:e})};var Ct=S(b());function wh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,extra:i,onSourceClick:s,description:a,sources:l,id:u,styles:c,...p}){let{selected:d,onChangeOpen:g}=jr(),y=P("CommandPalette",Vt);function v(f){r(f),e&&g(!1)}return(0,Ct.jsxs)("div",{className:(0,Ka.default)(y.listItem,u===d&&y.listItemSelected),children:[(0,Ct.jsx)("button",{type:"button",className:(0,Ka.default)(y.listItemAction,y.listItemPrimaryAction),"aria-disabled":p.disabled??!1,onClick:v,"data-command-palette-item":!0,"data-item-id":u,...p,children:(0,Ct.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,Ct.jsx)("p",{className:(0,Ka.default)(y.listItemText,y.truncate,c==null?void 0:c.title),children:n}):n,a&&(0,Ct.jsx)(Gi,{tagName:"p",allowList:[],content:Cd(a)?bE(a):a,className:(0,Ka.default)(y.listItemDescription,c==null?void 0:c.description,t?y.lineClamp:y.truncate)})]})}),i,o&&(0,Ct.jsx)("div",{className:y.listItemActions,children:(0,Ct.jsx)(Td,{suggestion:String(n),onFeedback:o})}),l&&l.length>0&&(0,Ct.jsxs)("div",{className:y.sources,children:[(0,Ct.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(f=>f.url?(0,Ct.jsx)("a",{className:y.source,href:f.url,target:"_blank",title:f.url,rel:"noopener noreferrer",onClick:()=>s&&s(f),children:f.name},f.url):(0,Ct.jsx)("span",{className:y.source,children:f.name},f.name))]})]})}var Wa=S(b()),NE=()=>(0,Wa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Wa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Wa.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 Mo=S(b());function xh({children:e,title:t,id:n,onDismiss:r}){let o=W(Po),i=P("CommandPalette",Vt),{page:s}=jr();return s!==n?null:(0,Mo.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Mo.jsxs)("div",{className:i.pageNav,children:[(0,Mo.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Mo.jsx)(NE,{}),o("back")]}),t&&(0,Mo.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var OE=S(_());var $a=S(b()),Yi=()=>(0,$a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,$a.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,$a.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var on=S(b());function EN({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Vt);return(0,on.jsxs)("div",{className:l.search,children:[(0,on.jsx)("div",{className:l.searchIcon,children:(0,on.jsx)(Yi,{})}),(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 ME=(0,OE.forwardRef)(EN);var Eh=S(ee());var Pd=S(b()),CN=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Vt);return(0,Pd.jsxs)("button",{type:"button",...r,onClick:e,className:(0,Eh.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Pd.jsx)("span",{className:(0,Eh.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},_E=CN;var Ga=S(b()),bN="[data-command-palette-item]";function Xi({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:p,search:d}){let[g,y]=(0,Gn.useState)(),v=(0,Gn.useRef)(null),f=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var O;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(O=v.current)==null||O.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let O=w();O.length!==0&&y(O[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(bN)||[]),x=O=>document.querySelector(`[data-item-id=${O}]`),T=O=>{let V=x(O);V&&y(V.dataset.itemId)},C=O=>{let V=x(O);V&&V.scrollIntoView({behavior:"smooth"})},k=()=>{if(!g)return;let O=w(),V=x(g);if(!V)return;let K=O.indexOf(V),se=O[K+1];se&&se.dataset.itemId?T(se.dataset.itemId):h()},L=()=>{if(!g)return;let O=w(),V=x(g);if(!V)return;let K=O.indexOf(V),se=O[K-1];se&&se.dataset.itemId?T(se.dataset.itemId):T(O[O.length-1].dataset.itemId)},I=(0,Gn.useCallback)(O=>{switch(O.key){case"ArrowDown":{O.preventDefault(),k();break}case"ArrowUp":{O.preventDefault(),L();break}case"Enter":{if(g){let V=x(g);V==null||V.click()}break}}},[g]);return(0,Gn.useEffect)(()=>{h()},[d,r,l,p]),(0,Gn.useEffect)(()=>{g&&C(g)},[g]),(0,Ga.jsx)(pd,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:f,onKeyDown:I,children:(0,Ga.jsxs)(LE,{selected:g,setSelected:y,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,Ga.jsx)(ME,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Xi.Page=xh;Xi.List=ah;Xi.Image=mE;Xi.ListItem=wh;Xi.Button=_E;var ge=Xi;var DE=S(_());function FE(e,t){(0,DE.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 qa=S(_());var HE={data:null,fetchState:"idle"},Rd=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=U("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)}),TN=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),kN=q({name:"entities",initialState:HE,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=TN(t.data?[...t.data,...n.payload]:n.payload)}).addCase(le,()=>HE)}}),UE=kN.reducer;var Ch={};ze(Ch,{enUS:()=>PN,nlNL:()=>RN});var PN={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},RN={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var BE={root:"Oe",empty:"Xe"};var Qi=S(b()),LN=({onCopy:e})=>{let t=(0,qa.useRef)(null),n=P("EntitiesList",BE),r=N(Rd),{setSelected:o}=jr(),i=W(Ch),s=Y();return(0,qa.useEffect)(()=>{s(sn())},[]),(0,qa.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Qi.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Qi.jsx)(ge.List,{children:r.map((a,l)=>(0,Qi.jsx)(ge.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Qi.jsx)("p",{className:n.empty,children:i("noResults")})]})},jE=LN;var an=S(_());var zE={data:null,fetchState:"idle"},VE=e=>e.summary.data,KE=e=>e.summary.fetchState==="error",WE=e=>e.summary.model,qn=U("summary/getSummary",async(e,t)=>{var c,p,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(p=t.getState().info)==null?void 0:p.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"))}),IN=q({name:"summary",initialState:zE,reducers:{},extraReducers:e=>{e.addCase(qn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(qn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(qn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary,t.model=n.payload.model)}).addCase(le,()=>zE)}}),$E=IN.reducer;var bh={};ze(bh,{enUS:()=>NN,nlNL:()=>ON});var NN={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."}]},ON={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 GE={root:"Je",actions:"Ke",main:"Pe",textInput:"io",loading:"Qe",error:"Ve"};var Rh=S(ee()),XE=S(_());var Th=S(b()),Ad=e=>(0,Th.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Th.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})});var kh=S(b()),Ld=e=>(0,kh.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,kh.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})});function Yn(e,t){var r;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",n.classList.add(t),n.addEventListener("animationend",()=>n.remove()),(r=e.parentElement)==null||r.appendChild(n)}var Ph={};ze(Ph,{enUS:()=>_N,nlNL:()=>DN});var _N={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},DN={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function qE(e){return U("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,{conversationId:r,...o,data:t.data})})(e)}function Zi(){let e=Y();return async(t,n)=>{await e(qE({name:t,data:n}))}}var YE={fadeup:"j",fadedown:"Y",thumbs:"We",selected:"ro",thumbsUp:"Ze",thumbsDown:"_e"};var _o=S(b()),HN=({eventName:e,eventData:t})=>{let n=P("FeedbackThumbs",YE),r=W(Ph),o=Zi(),[i,s]=(0,XE.useState)(null),a=u=>{u.preventDefault(),u.stopPropagation(),Yn(u.target,n.fadeup),s("up"),o(e,{...t,rating:"up"})},l=u=>{u.preventDefault(),u.stopPropagation(),Yn(u.target,n.fadedown),s("down"),o(e,{...t,rating:"down"})};return(0,_o.jsxs)("div",{className:n.thumbs,children:[(0,_o.jsx)(te.IconButton,{title:r("thumbsUp"),onClick:a,icon:(0,_o.jsx)(Ld,{}),className:(0,Rh.default)(n.thumbsUp,i==="up"&&n.selected),disabled:!!i}),(0,_o.jsx)(te.IconButton,{title:r("thumbsDown"),onClick:l,icon:(0,_o.jsx)(Ad,{}),className:(0,Rh.default)(n.thumbsDown,i==="down"&&n.selected),disabled:!!i})]})},Id=HN;var Cn=S(b()),UN=({onCopy:e})=>{let t=(0,an.useRef)(null),n=P("SummaryForm",GE),[r,o]=(0,an.useState)(""),i=W(bh),s=N(WE),a=N(VE),l=N(KE),u=Y(),c=()=>{u(Xe({name:"summary copied to clipboard",data:{originalText:a,finalText:r,model:s},options:{includeConversationData:!0}})),e(r)},p=()=>{let d=document.getSelection();d&&u(Xe({name:"summary copied to clipboard",data:{originalText:a,finalText:d==null?void 0:d.toString(),model:s},options:{includeConversationData:!0}}))};return(0,an.useEffect)(()=>{u(qn())},[]),(0,an.useEffect)(()=>{o(a||"")},[a]),(0,an.useEffect)(()=>{t.current&&a&&t.current.focus()},[t,a]),(0,an.useEffect)(()=>{let d=g=>{g.key==="Enter"&&g.shiftKey&&c()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[r]),(0,Cn.jsx)("div",{className:n.root,tabIndex:-1,children:l?(0,Cn.jsx)("p",{className:n.error,children:i("error")}):(0,Cn.jsxs)(an.Fragment,{children:[(0,Cn.jsx)("div",{className:n.main,children:(0,Cn.jsx)("textarea",{placeholder:a?void 0:i("loading"),disabled:!a,className:n.textInput,ref:t,value:r,onCopy:p,onChange:d=>o(d.target.value)})}),(0,Cn.jsxs)("div",{className:n.actions,children:[(0,Cn.jsx)(Id,{eventName:"summary feedback",eventData:{summary:a}}),(0,Cn.jsx)(ge.Button,{shortKeys:[8679,8629],onClick:c,children:i("copy")})]})]})})},QE=UN;var Ya={};ze(Ya,{enUS:()=>BN,nlNL:()=>jN});var BN={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?"}]},jN={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 zr=S(_());var Ah={};ze(Ah,{enUS:()=>zN,nlNL:()=>VN});var zN={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"}]},VN={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 ZE={root:"to",title:"oi",empty:"ei",status:"ii",form:"no",input:"ao",submit:"ri",question:"ti",answer:"ni",alignRight:"ai",listItemFeedback:"pi"};var WN={data:null,fetchState:"idle"},JE=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},Xa=U("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}),$N=q({name:"knowledgeAssistant",initialState:WN,reducers:{},extraReducers:e=>{e.addCase(Xa.pending,t=>{t.fetchState="loading"}).addCase(Xa.rejected,t=>{t.fetchState="error"}).addCase(Xa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),eC=$N.reducer;var Lh={data:[],fetchState:"idle"},tC=e=>{var t;return(t=e.answer)==null?void 0:t.data},nC=e=>e.answer.fetchState,es=we("answer/resetKnowledgeSearch"),Ji=U("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=JE(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({customerInstruction:o.customerInstruction,doNotKnowAnswer:o.doNotKnowAnswer,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),GN=q({name:"answer",initialState:Lh,reducers:{},extraReducers:e=>{e.addCase(Ji.pending,t=>{t.fetchState="loading"}).addCase(Ji.rejected,t=>{t.fetchState="error"}).addCase(Ji.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(le,()=>Lh).addCase(es,()=>Lh)}}),rC=GN.reducer;var Qa=S(b()),oC=()=>(0,Qa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Qa.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Qa.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var nt=S(b()),qN=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=zr.default.useState(""),{setSelected:i}=jr(),s=(0,zr.useRef)(null),a=P("KnowledgeSearchStyles",ZE),l=W(Ah),u=Y(),c=N(tC),p=N(nC),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Ji(r))},g=(y,v)=>{u(Xe({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,zr.useEffect)(()=>{var y;n&&p==="idle"?u(Ji(n)):(y=s.current)==null||y.focus()},[s,p]),(0,zr.useEffect)(()=>{p==="done"&&(u(Xe({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(""))},[p,c]),(0,zr.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,nt.jsxs)("div",{className:a.root,children:[c.length>0&&(0,nt.jsx)("div",{className:a.alignRight,children:(0,nt.jsx)(ge.Button,{onClick:t,children:l("reset")})}),c.map(({question:y,answer:v},f)=>(0,nt.jsx)(ge.List,{children:(0,nt.jsx)(ge.ListItem,{id:`knowledge-assist-${f}`,"data-testid":"knowledge-search-answer",description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:m=>g(m,y),sources:v.sources,styles:{title:a.question,description:a.answer},extra:(0,nt.jsx)("div",{className:a.listItemFeedback,children:(0,nt.jsx)(Id,{eventName:"knowledge assist feedback",eventData:{question:y,isAgent:n!==y,isFollowUpQuestion:c.length>1,...v}})}),children:y})},`${v.answer}_${f}`)),p==="loading"&&(0,nt.jsx)("p",{className:a.status,children:l("loading")}),p==="error"&&(0,nt.jsx)("p",{className:a.status,children:l("error")}),(0,nt.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,nt.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,nt.jsx)("button",{type:"submit",className:a.submit,children:(0,nt.jsx)(oC,{})})]})]})},iC=qN;var YN={data:null,fetchState:"idle"},Xn=e=>e.profile.data,Nd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Za=U("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)}),XN=q({name:"profile",initialState:YN,reducers:{},extraReducers:e=>{e.addCase(Za.pending,t=>{t.fetchState="loading"}).addCase(Za.rejected,t=>{t.fetchState="error"}).addCase(Za.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),sC=XN.reducer;var gC=S(_());var QN=["{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}"],ZN=new RegExp(QN.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function aC(e,t){let n=e.split(ZN),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let p=a.charAt(0),d=0;do u=p?t.indexOf(p,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function lC(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var cC={suggestions:[],fetchState:"idle"},uC={default:cC},dC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Od=e=>e.textSuggestions,fC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Md=we("textSuggestions/refresh"),ln=U("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=Wi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ia(r),e);if(e==="default"){let c=s?l.filter(fC(a)):l;t.dispatch(xn(c.slice(0,i)))}return l}),Ja=U("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,{...Ia(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(fC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?aC(c.text,e):c.text}))),l=lC(l,i),t.dispatch(xn(l)),l}),pC=q({name:"textSuggestions",initialState:uC,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]||cC;return{...t,[r]:{...o,fetchState:"loading"}}}).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(Ja.pending,t=>{t.default.fetchState="loading"}).addCase(Ja.rejected,t=>{t.default.fetchState="error"}).addCase(Ja.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(le,()=>uC)}}),{setTextSuggestions:YF,setSuggestionState:XF}=pC.actions,mC=pC.reducer;var Do=S(b()),JN=({commands:e,onClick:t})=>{var a,l,u;let n=Y(),r=W(Ya),o=N(Xn),i=N(Od),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,gC.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)(ge.List,{heading:r("commands"),children:e.map((c,p)=>(0,Do.jsx)(ge.ListItem,{id:`command-${p}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:p})=>{var d;return(0,Do.jsx)(ge.List,{heading:p,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((g,y)=>(0,Do.jsx)(ge.ListItem,{id:`${c}-${y}`,closeOnSelect:!1,description:g.text,onClick:()=>t(g.text,g),"data-testid":"search-overlay-suggestion",children:g.title},`${g.id}-${g.text}`))},c)})]})},hC=JN;var Ue=S(b()),tO=200,nO=5,rO=4,yC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),oO=()=>{let e=Y(),t=zt(),n=W(Ya),[r,o]=(0,mt.useState)(!1),[i,s]=(0,mt.useState)(""),a=N(D1),l=N(Xn),[u,c]=(0,mt.useState)(),p=N(tt),d=B("showSearch"),g=B("showEntitiesCommand"),y=B("showSummaryCommand"),v=B("showKnowledgeSearch"),f=B("showImageSearch"),m=B("searchTriggerKey"),h=N(dE),w=N(F1),x=N(H1),T=N(_1),C=F=>sr(w.filter(X=>X.type===F.toUpperCase()),F),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:f}].filter(F=>F.shouldShow),L=[{label:n("entitiesClipboard"),onClick:()=>e(en("entities")),shouldShow:g&&yC(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(en("summary")),shouldShow:y&&yC(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(en("knowledgeAssist")),shouldShow:v}].filter(F=>F.shouldShow),I=(h==null?void 0:h.map(F=>({value:F.code.toUpperCase(),label:`${F.name}s`,list:C(F.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],O=(0,mt.useCallback)((0,vC.default)((F,X)=>{e(Co({query:F,type:X,tags:["search-overlay"],size:u?50:20}))},tO),[u]),V=(0,mt.useCallback)((F,X)=>{switch(X.type){case"IMAGE":t.send(Gg,{suggestion:X});break;default:t.send(Hr,{text:F,suggestion:X})}e(xt(!1))},[e]),K=F=>{ko(F.text),e(Xe({name:"entity copied",data:{entity:F,type:"copy"}})),e(xt(!1))},se=(0,mt.useCallback)(F=>{e(Xe({name:"suggestion feedback",data:{text:F.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),ps=F=>{t.send(Hr,{text:F,suggestion:{source:"knowledge-assist",text:F}}),e(Xe({name:"answer used",data:{originalText:F},options:{includeConversationData:!0}})),s(""),e(en("search")),e(es()),e(xt(!1))},Rt=F=>{ko(F),e(xt(!1))};function sr(F,X){return F.slice(0,u?10:X.toLowerCase()==="image"?rO:nO)}function At(F){return X=>{r?window.confirm(n("warning"))&&(F(X),o(!1)):F(X)}}return(0,mt.useEffect)(()=>{i?O(i,u):e(Qc())},[i,u]),(0,mt.useEffect)(()=>{a==="search"&&e(es())},[a]),(0,mt.useEffect)(()=>{p&&e(Ua())},[p]),FE(m,()=>e(xt(!0))),!d||!l?null:(0,Ue.jsxs)(ge,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:At(F=>e(xt(F))),onChangeType:F=>c(F),onChangePage:At(F=>e(en(F))),selectedType:u,search:i,page:a,isOpen:T,types:[...I,...k],children:[(0,Ue.jsxs)(ge.Page,{id:"search",children:[i.length===0&&(0,Ue.jsx)(hC,{commands:L,onClick:V}),i.length>0&&(0,Ue.jsxs)(mt.Fragment,{children:[L.length>0&&(0,Ue.jsx)(ge.List,{heading:n("commands"),children:L.map((F,X)=>(0,Ue.jsx)(ge.ListItem,{closeOnSelect:!1,onClick:F.onClick,id:`commands-${X}`,children:F.label},F.label))}),[...I,...k].map(({value:F,label:X,list:ar,lineClamp:he,listOrientation:lr})=>(0,Ue.jsx)(ge.List,{heading:X,orientation:lr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(F),hasMore:!u&&x[F.toLowerCase()]>sr(ar,F).length,children:sr(ar,F).map(G=>(0,Ue.jsx)(ge.ListItem,{id:`${F}-${G.id}`,closeOnSelect:!1,lineClamp:he,onClick:()=>V(G.text,G),description:F!=="IMAGE"?G.title&&G.text:void 0,onFeedback:F!=="IMAGE"?()=>se(G):void 0,children:F==="IMAGE"?(0,Ue.jsx)(ge.Image,{title:G.title||G.text,src:G.image}):G.title||G.text},`${G.id}-${G.text}`))},F))]})]}),(0,Ue.jsx)(ge.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:At(()=>{e(en("search"))}),children:(0,Ue.jsx)(jE,{onCopy:K})}),(0,Ue.jsx)(ge.Page,{id:"summary",title:n("summaryTitle"),onDismiss:At(()=>{e(en("search"))}),children:(0,Ue.jsx)(QE,{onCopy:Rt})}),(0,Ue.jsx)(ge.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:At(()=>{e(es()),e(en("search"))}),children:(0,Ue.jsx)(iC,{question:i,onUse:ps,onResetQuestion:()=>{e(es()),s("")}})})]})},SC=oO;var el=S(b()),iO=()=>{let e=B("showSearch"),t=B("isEmbedded");return(0,el.jsxs)(wC.Fragment,{children:[e&&(0,el.jsx)(SC,{}),t&&(0,el.jsx)(sE,{})]})},xC=iO;var TC=S(ee());var _d=S(b()),EC=({className:e})=>(0,_d.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,_d.jsx)("g",{children:(0,_d.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 Ch=S(b()),XO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},mC=({className:e,color:t})=>(0,Ch.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ch.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:XO[t||"pink"]})});var gC={root:"j",text:"Y",isLoggedIn:"ei",isLoggedOut:"no",icon:"ii",logo:"ri",lock:"ti"};var bh={};Qe(bh,{enUS:()=>ZO,nlNL:()=>JO});var ZO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},JO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var _o=S(b()),yC=({onLogIn:e})=>{let t=Y(bh),n=B("floatingMenu"),r=B("productName"),o=q(),i=O(tt),s=A("FloatingMenu",gC);if(i===null||n===!1)return null;let a=()=>{i===!0?o(wt(!0)):e()};return(0,_o.jsxs)("button",{className:(0,hC.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,_o.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,_o.jsxs)("div",{className:s.icon,children:[(0,_o.jsx)(mC,{className:s.logo,color:"pink"}),i===!1&&(0,_o.jsx)(pC,{className:s.lock})]})]})};var Md=S(_());var vC=S(_());function Zi(e){(0,vC.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Do(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 eN={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Id=({ui:e})=>e.overlayCollapsed;var SC=G({name:"ui",initialState:eN,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:Ja,setInputHasFocus:Th,setOverlayCollapsed:zr,setOpenOverlayWhenTyping:wC,setOverlayCollapsedUserOverwrite:xC}=SC.actions,EC=SC.reducer;var Od=S(_());var es=S(_());var CC=S(_());function bC(e,t,n){(0,CC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var TC={root:"ni",actions:"ai",badge:"pi",formattedText:"ao"};var Fo=S(b()),rN=["search","personal-collection-search","search-autocomplete"];function oN(e,t,n,r={}){let o="";return rN.includes(t)?o=hE(fh(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=fh(e,n,r),r.placeholders===!0&&(o=yE(o)),o}var iN=()=>{},sN=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=B("inlineSuggestions"),i=O(Vi),s=q(),a=A("TextSuggestion",TC),l=(0,es.useRef)(null);(0,es.useEffect)(()=>{let c=setTimeout(()=>{s(h1({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),bC(l,"click",()=>{s(Dr(e)),s(En({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,es.useMemo)(()=>oN(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,Fo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(Dr(e)),children:[(0,Fo.jsx)(re,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:iN,children:(0,Fo.jsx)(Wi,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,Fo.jsx)("div",{className:a.actions,children:(0,Fo.jsx)(Cd,{onFeedback:()=>r(n),suggestion:n.text})})]})},kC=sN;var kh=S(b()),aN=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Od.useMemo)(()=>{let i=t.map((s,a)=>(0,kh.jsx)(kC,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,kh.jsx)(Od.Fragment,{children:o})},Nd=aN;var PC={root:"di",paper:"li"};var el=S(b()),uN=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Md.useRef)(null),r=A("InlineSuggestionsOverlay",PC),o=O(Ji),i=q(),s=O(tt),a=O(zi),l=O(Id),u=B("showTextSuggestions");return Zi(()=>{setTimeout(()=>{i(zr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Md.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,el.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,el.jsx)("div",{ref:n,className:r.paper,children:(0,el.jsx)(gt,{children:(0,el.jsx)(Nd,{suggestions:e,selectedIndex:t})})})})},cN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),RC=Bn(cN)(uN);var tl=S(b()),dN=({children:e})=>{let n=B("locale").replace("-","");return(0,tl.jsx)(Qg.Provider,{value:n,children:e})},fN=({store:e,customStyles:t={},children:n})=>(0,tl.jsx)(Lg,{store:e,children:(0,tl.jsx)(dN,{children:(0,tl.jsx)(ys.Provider,{value:t,children:n})})}),Ho=fN;var Dd=S(ee()),ts=S(_());var AC=S(_());function LC(e,t){let[n,r]=(0,AC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return j.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){j.error(s)}}]}var IC=()=>/Mac/i.test(navigator.platform);var NC=S(ee()),Xn=S(_());var Ph={};Qe(Ph,{enUS:()=>pN,nlNL:()=>mN});var pN={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"}]}]},mN={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 OC={root:"si",anchor:"ci",anchorButton:"xi"};var Vr=S(b()),Rh=(e,t,n)=>r=>(0,Vr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),hN=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=Y(Ph),s=zt(),a=A("Login",OC),l=B("productName"),u=(0,Xn.useCallback)(p=>{p.preventDefault(),r&&r(parseInt(p.target.value,10))},[]),c=(0,Xn.useCallback)(p=>{p.preventDefault(),s.send(Ki,!0)},[t]),f=(0,Xn.useMemo)(()=>p=>(0,Vr.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:p},"login"),[t]),d=(0,Xn.useCallback)(p=>(0,Vr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:p},"prompt"),[c]),{min:m,hour:y,day:v}=(0,Xn.useMemo)(()=>({min:Rh(a,60*10,u),hour:Rh(a,60*60,u),day:Rh(a,60*60*12,u)}),[]);return(0,Vr.jsxs)("div",{className:(0,NC.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,Vr.jsxs)(Xn.Fragment,{children:[(0,Vr.jsx)("br",{}),i("snooze",{min:m,hour:y,day:v})]})]})},_d=hN;var MC={root:"po",text:"fi"};var nl=S(b()),vN=({title:e})=>{let t=A("SearchTrigger",MC),n=q();return(0,nl.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(wt(!0)),children:[(0,nl.jsx)(Gi,{}),(0,nl.jsx)("span",{className:t.text,children:e})]})},_C=vN;var Ah={};Qe(Ah,{enUS:()=>SN,nlNL:()=>wN});var SN={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"}]},wN={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 DC={root:"gi",isInline:"q",toggleButton:"bi",toggleButtonWrapper:"C",toggleButtonWrapperHidden:"hi",isCollapsed:"do",collapsible:"mi",hints:"lo",hintsHidden:"ui",triggers:"so",triggersRight:"yi"};var Se=S(b()),EN=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=A("SuggestionsOverlay",DC),o=Y(Ah),i=O(Ji),s=f1(),a=q(),l=(0,ts.useRef)(null),u=B("searchTriggerKey"),c=B("productName"),f=O(Id),d=O(tt),m=O(zi),[y,v]=(0,ts.useState)(null),p=B("showSearch"),g=B("showTextSuggestions"),h=B("adminUrl"),w=B("isEmbedded"),[x,T]=LC("dd-snooze-until-ms",0),C=f||x>Date.now(),k=O(K=>K.input.text),L=e.filter(K=>K.source!=="gpt").length,I=()=>{C&&T(0),a(xC(!C))},N=K=>{a(Ye({name:"suggestion feedback",data:{text:K.text,source:"overlay",context:k},options:{includeConversationData:!0}}))},V=K=>{let se=Date.now()+K*1e3;T(se),j.info(`Snooze until: ${new Date(se)}`),a(zr({collapse:!0}))};return(0,ts.useEffect)(()=>{L===0&&v(null)},[e,L]),Zi(()=>{a(zr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||m===!1?null:d===!1?(0,Se.jsxs)("div",{ref:l,className:(0,Dd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1}}),(0,Se.jsx)("div",{className:r.triggersRight,children:(0,Se.jsx)(no,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(no,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),(0,Se.jsx)("div",{className:r.collapsible,children:(0,Se.jsx)(_d,{loginUrl:h,isEmbedded:w,onLogIn:n,onSnooze:V})})]}):!s||!i?null:(0,Se.jsxs)("div",{ref:l,className:(0,Dd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1},children:p&&(0,Se.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(IC()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,Se.jsx)(_C,{title:o("search")})})}),(0,Se.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Se.jsx)("div",{className:(0,Dd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,Se.jsx)(no,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})]})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(no,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),L>0&&g&&(0,Se.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Se.jsx)(gt,{children:(0,Se.jsx)(Nd,{onFeedback:N,suggestions:e,selectedIndex:t,reverse:!0})})})]})},CN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),FC=Bn(CN)(EN);var Qd=S(ee());var Jn=S(_());var ns=S(_());function Fd(e){return e.contentEditable==="true"}function bN(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 HC(e){let{selectionStart:t,selectionEnd:n}=Fd(e)?bN(e):e;return[t,n]}function UC(e){let[,t]=(0,ns.useState)(),n=(0,ns.useRef)(null);return n.current=HC(e),(0,ns.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=HC(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function BC(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(jl);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 jC=S(_()),TN=["div","span","mark","strong","b","i","u","em"];function Lh(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(TN.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,jC.cloneElement)(r,{children:Lh(s,t,n+1)})]}return[...e,...t]}function Kr(e){return e.tagName.toLowerCase()==="textarea"}var un={root:"wi",container:"vi",agentText:"co",tabText:"xo",hint:"S",matchSelection:"fo",focus:"ki",resetIndent:"zi",matchKeyword:"p",matchPlaceholder:"d",hover:"go",hintText:"ji",popover:"Yi",popoverRoot:"qi",popoverContentContainer:"bo",popoverContent:"Ci",selectionOptions:"Si",selectionOptionsIsHidden:"Ei",selectionOptionsButton:"Gi",caret:"Ni",popoverSuggestionsRoot:"Ai",suggestionsOverlayInputStyles:"Fi"};var QC=S(ee());var $d=S(_());var rs=S(_());function zC(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Hd(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]=zC((c,f)=>{let d=t.current;if(!d)return;let m=c/i,y=f/i,v=d.getBoundingClientRect(),p=m>v.x&&m<v.x+v.width&&y>v.y&&y<v.y+v.height;p&&!o?(o=!0,r(!0)):!p&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=zC(()=>{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 VC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Ud(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function KC(e){return e!=null}var Oh=S(ee()),Kt=S(_());var Bd=S(_()),PN=["bottom","height","left","right","top","width"],RN=(e={},t={})=>PN.some(n=>e[n]!==t[n]),Qn=new Map,WC,$C=()=>{let e=[],t=[];Qn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();RN(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Qn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),WC=window.requestAnimationFrame($C)};function AN(e,t){return{observe(){let n=Qn.size===0;if(Qn.has(e)){let r=Qn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Qn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&$C()},unobserve(){let n=Qn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Qn.delete(e),Qn.size||cancelAnimationFrame(WC)}}}}function Ih(e){let[t,n]=(0,Bd.useState)(null);return(0,Bd.useLayoutEffect)(()=>{if(!e.current)return;let r=AN(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var os=S(_()),qC=S(ec());var GC={root:"Hi"};var YC=({children:e,parentNode:t})=>{let[n,r]=(0,os.useState)(null),o=(0,os.useContext)(ys);return(0,os.useLayoutEffect)(()=>{let i=document.createElement("div");return Do(i),i.classList.add(GC.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,qC.createPortal)(e,n):null};var Cn={ref:"Li",root:"o",positionAbove:"l",positionBelow:"s",positionLeft:"c",positionRight:"x",alignStart:"f",alignCenter:"g",alignEnd:"b"};var jd=S(b()),zd=(e=!1)=>{let[t,n]=(0,Kt.useState)(e),r=(0,Kt.useCallback)(()=>n(!0),[]),o=(0,Kt.useCallback)(()=>n(!1),[]),i=(0,Kt.useCallback)(()=>n(a=>!a),[]),s=(0,Kt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Nh(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,Kt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Nh,parentNode:a,...l})=>{let u=Ih(t),c=Ih(n),f=(0,Kt.useMemo)(()=>s(u,c,0),[u,c]);return(0,jd.jsx)(YC,{parentNode:a,children:(0,jd.jsx)("div",{className:(0,Oh.default)(Cn.ref,{[Cn.positionAbove]:r==="above",[Cn.positionBelow]:r==="below",[Cn.positionLeft]:r==="left",[Cn.positionRight]:r==="right",[Cn.alignStart]:o==="start",[Cn.alignCenter]:o==="center",[Cn.alignEnd]:o==="end"}),style:f,...l,role:"dialog",children:(0,jd.jsx)("div",{className:(0,Oh.default)(e,Cn.root),children:i})})})};var XC=S(ee()),Vd=S(_());var Mh=S(b()),Kd=(0,Vd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Vd.useRef)(null),i=A("TabCompletion",un);return(0,Mh.jsx)("div",{ref:Ud([o,r]),className:(0,XC.default)(e,i.popoverContentContainer),...n,children:(0,Mh.jsx)("div",{className:i.popoverContent,children:t})})});var Wr=S(b()),ON=e=>t=>{let n=Nh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},NN=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=A("TabCompletion",un),s=zd(),a=(0,$d.useMemo)(()=>ON(e.getBoundingClientRect()),[e]),[l,u]=Hd(e);return(0,$d.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Wr.jsxs)("span",{children:[(0,Wr.jsx)("mark",{ref:Ud([l,s.triggerRef]),className:(0,QC.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Wr.jsx)(is,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Wr.jsx)(Kd,{style:n,children:(0,Wr.jsx)("div",{className:i.hintText,children:o})})})]})},Wd=class extends Kn{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${VC(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(KC);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,Wr.jsx)(NN,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ZC=S(ee());var _h=S(b()),MN=({inputElement:e,children:t})=>{let n=A("TabCompletion",un),[r,o]=Hd(e);return(0,_h.jsx)("mark",{ref:r,className:(0,ZC.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Gd=class extends Kn{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,_h.jsx)(MN,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Yd=S(ee());var rt=S(_());var Dh=S(b()),JC=()=>(0,Dh.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,Dh.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var $r=S(_());var tb=S(nh());var eb={root:"Mi",content:"Ri"};function qd(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 Fh(e){return e.replace("https://www.","").replace("https://","")}var Wt=S(b()),DN=3,FN=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),HN=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=DN})=>{let i=A("LinkSearch",eb),[s,a]=(0,$r.useState)(""),l=q(),u=O(nC("url")),c=O(N1("URL",FN)),[f,d]=(0,$r.useState)(c.length-1),m=B("fallbackImage"),y=h=>{let w=h.target;a(w.value)},v=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},p=h=>{var T;let w=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(w),h.code==="ArrowDown"&&d(x),h.code==="Enter"&&e(((T=c[f])==null?void 0:T.text)||s)},g=(0,$r.useCallback)((0,tb.default)(h=>{l(Eo({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,$r.useEffect)(()=>{s&&g(s)},[s]),(0,$r.useEffect)(()=>()=>{l(Yc())},[]),(0,Wt.jsxs)("div",{className:i.root,children:[(0,Wt.jsx)(gt,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,w)=>(0,Wt.jsx)(re,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Wt.jsxs)(fe,{children:[(0,Wt.jsx)(fe.Image,{src:qd(h,"small",m||void 0),title:h.title||h.text}),(0,Wt.jsxs)(fe.Content,{className:i.content,cropText:!0,children:[(0,Wt.jsx)(fe.Title,{children:h.title||Fh(h.text)}),h.title&&Fh(h.text)]}),(0,Wt.jsx)(re.Actions,{children:(0,Wt.jsx)(re.ActionButton,{label:r,onClick:x=>v(x,h.text)})})]})},h.text))}),(0,Wt.jsx)(Da,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:p})]})},nb=HN;var Hh={};Qe(Hh,{enUS:()=>UN,nlNL:()=>BN});var UN={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},BN={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var nt=S(b()),jN=(0,rt.forwardRef)((e,t)=>{let n=A("TabCompletion",un);return(0,nt.jsx)("mark",{ref:t,className:(0,Yd.default)(n.matchSelection)},"selection-start")}),zN=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=Y(Hh),s=A("TabCompletion",un),a=(0,rt.useRef)(null),l=(0,rt.useRef)(null),[u,c]=(0,rt.useState)(null),f=q(),d=zd(document.activeElement===r),[m]=(0,rt.useState)(()=>document.createRange());d.triggerRef.current=m,(0,rt.useEffect)(()=>()=>m.detach(),[]),(0,rt.useEffect)(()=>{let v=e.current,p=a.current;!v||!p||(m.setStart(v,0),m.setEnd(p,0))},[e.current,a.current]),Zi(()=>{d.close()});let y=(0,rt.useCallback)(v=>{let p=m.toString(),g=/^http(s?):\/\//.test(v)?v:`https://${v}`;f(Kc({text:`[${p}](${g})`,replace:"selection"}))},[]);return(0,nt.jsxs)("span",{children:[(0,nt.jsx)("mark",{ref:a,className:(0,Yd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,nt.jsx)(is,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,nt.jsxs)(Kd,{style:n,ref:l,children:[(0,nt.jsx)("div",{className:(0,Yd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,nt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,nt.jsx)(JC,{}),(0,nt.jsx)("span",{children:"\xA0"}),(0,nt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,nt.jsx)(nb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},Xd=class extends Kn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,rt.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,nt.jsx)(jN,{ref:this.startRef}):(0,nt.jsx)(zN,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Zn=S(b()),VN=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=A("TabCompletion",un),c=B("insertLink"),f=B("showMidSentenceSuggestions"),d=B("inlineSuggestions"),m=UC(a),y=(0,Jn.useRef)(null),v=O(tt);(0,Jn.useEffect)(()=>{Kr(a)&&m&&BC(a,m)},[m]);let p=(0,Jn.useCallback)(w=>{if(!o||!n)return w;let x=[(0,Zn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Zn.jsx)("span",{"data-testid":"tab-completion",className:(0,Qd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Zn.jsx)("span",{className:(0,Qd.default)(u.hint,u.resetIndent),children:(0,Zn.jsx)(Fl,{keyCode:"tab"},"tabHint")})),Lh(w,x)},[o,n,r]),g=(0,Jn.useMemo)(()=>{let w=[];return c&&w.push(new Xd("selection")),w.push(new Gd("placeholders")),i&&w.push(new Wd("keywords")),w},[d,c,i]),h=(0,Jn.useMemo)(()=>{let w=window.getComputedStyle(a);return{"--dd-color":w.color,"--dd-font-size":w.fontSize,"--dd-font-family":w.fontFamily,"--dd-font-variant":w.fontVariant}},[]);return!e||!v?null:(0,Zn.jsxs)("div",{ref:w=>{w!=null&&w.parentElement&&(y.current=w==null?void 0:w.parentElement)},className:u.root,style:h,children:[(0,Zn.jsx)(Wi,{tagName:"span",containerTagName:"div",className:(0,Qd.default)(u.container,u.agentText),disableLineBreaks:Kr(a),content:t||"\u200B",onAfterParse:p,matchers:g,selection:m,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!f}),(0,Zn.jsx)("br",{})]})},KN=({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??$i(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:m,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:m&&f!==!1}},rb=Bn(KN)(VN);var vT=S(ee()),lf=S(_());var ob={list:[],fetchState:"idle"},sb=e=>e.autoflows.list||[],ib=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},er=U("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Uh=U("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(er(e.platformSessionId))}),Bh=U("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(er(e.platformSessionId))}),WN=G({name:"autoflows",initialState:ob,reducers:{},extraReducers:e=>{e.addCase(Uh.pending,(t,n)=>{let r=ib(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Bh.pending,(t,n)=>{let r=ib(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(er.pending,t=>{t.fetchState="loading"}),e.addCase(er.rejected,t=>{t.fetchState="error"}),e.addCase(er.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(le,()=>ob)}}),ab=U("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(er(e))}),o.on("sessionCompleted",()=>{n(er(e))})}),lb=U("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),ub=WN.reducer;var cb={list:[],fetchState:"idle",sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},db=e=>e.customMessages.list,fb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),pb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),mb=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),rl=U("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Zd=U("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)}),Jd=U("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)}),gb=G({name:"customMessages",initialState:cb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(rl.pending,t=>{t.fetchState="loading"}).addCase(rl.rejected,t=>{t.fetchState="error"}).addCase(rl.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Zd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Zd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Jd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Jd.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(le,()=>cb)}}),hb=U("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(gb.actions.onCustomMessage(i))})}),yb=U("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),vb=gb.reducer;var $N={token:null,accountUrl:null,interval:null},Sb=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},jh=U("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),zh=U("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(jh()),setInterval(()=>r(jh()),n)}),wb=G({name:"passwordlessToken",initialState:$N,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(jh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(zh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:xb}=wb.actions,Eb=wb.reducer;var Vh={cues:[],fetchState:"idle"},Cb=e=>{var t;return(t=e.rules)==null?void 0:t.cues},GN=we("rules/resetCues"),Uo=U("rules/evaluate",async(e,t)=>{var n,r;try{let{deepdeskAPI:o}=t.extra,i=t.getState(),s=(n=i.conversation.current)==null?void 0:n.id;if(!s)throw new Error("No current conversation to evaluate rules");if(!(await o.getAccount()).ruleEngine)throw new Error("Rule engine is not enabled for this account");if(!(await o.getRules()).some(c=>c.label===e.label))throw new Error(`No rules found with label: ${e.label}`);return await o.evaluateRule(e.label,s,{tags:((r=i.conversation.current)==null?void 0:r.tags)||void 0,...e.params})}catch(o){return j.info(o.message),[]}}),bb=G({name:"answer",initialState:Vh,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.rule.id!==t.payload.id)}},extraReducers:e=>{e.addCase(Uo.pending,t=>{t.fetchState="loading"}).addCase(Uo.rejected,t=>{t.fetchState="error"}).addCase(Uo.fulfilled,(t,n)=>{let r=n.payload.map(i=>i.rule.id),o=t.cues.filter(i=>!r.includes(i.rule.id));t.fetchState="done",t.cues=[...n.payload,...o]}).addCase(le,()=>Vh).addCase(GN.toString(),()=>Vh)}}),{removeCue:Tb}=bb.actions,kb=bb.reducer;var _b=S(_());var Ob=S(ee()),Nb=S(_());var Rb=S(ee());var Pb={root:"Ti"};var Lb=S(b()),YN=({className:e,children:t})=>{let n=A("Unicode",Pb);return(0,Lb.jsx)("span",{className:(0,Rb.default)(e,n.root),children:t})},Ab=YN;var Ib={isDisabled:"Ui",buttonStart:"Bi",root:"Di",buttonStop:"ho",stateBadge:"h",isCompleted:"Ii",isStarted:"Oi",isAborted:"Xi"};var Kh={};Qe(Kh,{enUS:()=>QN,nlNL:()=>ZN});var QN={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"}]},ZN={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 bt=S(b()),eM=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=A("Autoflow",Ib),a=Y(Kh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,bt.jsxs)(re,{className:(0,Ob.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,bt.jsx)(fe,{children:(0,bt.jsxs)(fe.Content,{children:[(0,bt.jsxs)(fe.Title,{children:[t&&(0,bt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,bt.jsx)("span",{children:r})]})}),(0,bt.jsx)(re.Actions,{fixed:t==="Started",children:(0,bt.jsx)(re.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,bt.jsxs)(Nb.Fragment,{children:[(0,bt.jsx)(Ab,{children:u})," ",(0,bt.jsx)("span",{children:a(l)})]})})})]})},Mb=eM;var Wh=S(b()),tM=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},nM=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Wh.jsx)(_b.Fragment,{children:e.map(o=>(0,Wh.jsx)(Mb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||tM(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),rM=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},oM={onStartAutoflow:Uh,onStopAutoflow:Bh},Db=Bn(rM,oM)(nM);var Fb=S(ee()),$h=S(_());var tr={root:"mo",title:"uo",isUsed:"Ji",quickReplies:"Ki",quickReply:"Pi",hasError:"Qi",label:"Vi",errorIcon:"Wi"};var mt=S(b()),sM=({suggestion:e})=>{let t=Y(Oo),n=q(),r=O(fb(e.text)),o=O(pb(e.text)),i=O(mb(e.text)),s=O(ji),{replyOptions:a}=e,l=(0,$h.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Zd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,$h.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(Jd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,mt.jsxs)(re,{onClick:l,className:(0,Fb.default)(tr.root,{[tr.isUsed]:r,[tr.hasError]:i}),children:[(0,mt.jsx)(fe,{children:(0,mt.jsxs)(fe.Content,{children:[(0,mt.jsxs)(fe.Title,{className:tr.title,children:[e.text," ",(0,mt.jsx)(Hl,{className:tr.label,children:"analyse tool"})," ",i&&(0,mt.jsx)("span",{className:tr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,mt.jsx)("ul",{className:tr.quickReplies,children:a.map(c=>(0,mt.jsx)("li",{className:tr.quickReply,children:c.title},c.title))})]})}),(0,mt.jsxs)(re.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,mt.jsx)(re.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,mt.jsx)(re.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,mt.jsx)(re.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Hb=sM;var ef=S(_());var Yh=S(ee());var Gh=S(b()),qh=()=>(0,Gh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,Gh.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 Ub={root:"Zi",entity:"r",entityText:"_i",iconWrapper:"or",icon:"er",iconClicked:"ir"};var bn=S(b()),lM=({entities:e})=>{let t=A("EntitiesWidgetList",Ub),[n,r]=(0,ef.useState)(void 0),o=q(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),To(a.text),o(Ye({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,ef.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,bn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,bn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,bn.jsx)("span",{className:t.entityText,children:a.text}),(0,bn.jsxs)("span",{className:t.iconWrapper,children:[(0,bn.jsx)("span",{className:(0,Yh.default)(t.icon),children:(0,bn.jsx)(qh,{})}),(0,bn.jsx)("span",{className:(0,Yh.default)(t.icon,n===l&&t.iconClicked),children:(0,bn.jsx)(qh,{})})]})]},a.text))})},Bb=lM;var Xh=S(b()),jb=()=>(0,Xh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Xh.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 Qh=S(b()),zb=()=>(0,Qh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Qh.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 Zh=S(b()),Vb=()=>(0,Zh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Zh.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"})});function Kb(e){return U("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,{conversationId:r,...o,data:t.data})})(e)}function tf(){let e=q();return async(t,n)=>{await e(Kb({name:t,data:n}))}}var cy=S(ee()),af=S(_());var ol=S(b()),Wb=({className:e})=>(0,ol.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,ol.jsx)("line",{x1:"2",y1:"10",x2:"10",y2:"2",stroke:"black",strokeWidth:"1"}),(0,ol.jsx)("line",{x1:"2",y1:"2",x2:"10",y2:"10",stroke:"black",strokeWidth:"1"})]});var Jh=S(b()),$b=e=>(0,Jh.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Jh.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})});var ey=S(b()),Gb=e=>(0,ey.jsx)("svg",{width:"16",height:"16",fill:"#000000",...e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,ey.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})});function ss(e,t){var r;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",n.classList.add(t),n.addEventListener("animationend",()=>n.remove()),(r=e.parentElement)==null||r.appendChild(n)}var{entries:tT,setPrototypeOf:qb,isFrozen:uM,getPrototypeOf:cM,getOwnPropertyDescriptor:dM}=Object,{freeze:ot,seal:dn,create:nT}=Object,{apply:sy,construct:ay}=typeof Reflect<"u"&&Reflect;ot||(ot=function(t){return t});dn||(dn=function(t){return t});sy||(sy=function(t,n,r){return t.apply(n,r)});ay||(ay=function(t,n){return new t(...n)});var nf=kt(Array.prototype.forEach),Yb=kt(Array.prototype.pop),il=kt(Array.prototype.push),sf=kt(String.prototype.toLowerCase),ty=kt(String.prototype.toString),fM=kt(String.prototype.match),sl=kt(String.prototype.replace),pM=kt(String.prototype.indexOf),mM=kt(String.prototype.trim),cn=kt(Object.prototype.hasOwnProperty),Tt=kt(RegExp.prototype.test),al=gM(TypeError);function kt(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 sy(e,t,r)}}function gM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ay(e,n)}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:sf;qb&&qb(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(uM(t)||(t[r]=i),o=i)}e[o]=!0}return e}function hM(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function Bo(e){let t=nT(null);for(let[n,r]of tT(e))cn(e,n)&&(Array.isArray(r)?t[n]=hM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Bo(r):t[n]=r);return t}function rf(e,t){for(;e!==null;){let r=dM(e,t);if(r){if(r.get)return kt(r.get);if(typeof r.value=="function")return kt(r.value)}e=cM(e)}function n(){return null}return n}var Xb=ot(["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"]),ny=ot(["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"]),ry=ot(["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"]),yM=ot(["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"]),oy=ot(["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"]),vM=ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qb=ot(["#text"]),Zb=ot(["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"]),iy=ot(["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"]),Jb=ot(["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"]),of=ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),SM=dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),wM=dn(/<%[\w\W]*|[\w\W]*%>/gm),xM=dn(/\${[\w\W]*}/gm),EM=dn(/^data-[\-\w.\u00B7-\uFFFF]/),CM=dn(/^aria-[\-\w]+$/),rT=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bM=dn(/^(?:\w+script|data):/i),TM=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oT=dn(/^html$/i),eT=Object.freeze({__proto__:null,MUSTACHE_EXPR:SM,ERB_EXPR:wM,TMPLIT_EXPR:xM,DATA_ATTR:EM,ARIA_ATTR:CM,IS_ALLOWED_URI:rT,IS_SCRIPT_OR_DATA:bM,ATTR_WHITESPACE:TM,DOCTYPE_NAME:oT}),kM=function(){return typeof window>"u"?null:window},PM=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 iT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kM(),t=H=>iT(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:m}=e,y=l.prototype,v=rf(y,"cloneNode"),p=rf(y,"nextSibling"),g=rf(y,"childNodes"),h=rf(y,"parentNode");if(typeof s=="function"){let H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let w,x="",{implementation:T,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:L}=n,{importNode:I}=r,N={};t.isSupported=typeof tT=="function"&&typeof h=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:V,ERB_EXPR:K,TMPLIT_EXPR:se,DATA_ATTR:ds,ARIA_ATTR:Rt,IS_SCRIPT_OR_DATA:ir,ATTR_WHITESPACE:At}=eT,{IS_ALLOWED_URI:F}=eT,X=null,sr=Q({},[...Xb,...ny,...ry,...oy,...Qb]),he=null,ar=Q({},[...Zb,...iy,...Jb,...of]),$=Object.seal(nT(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}})),lr=null,xl=null,Ko=!0,Yr=!0,fs=!1,El=!0,qt=!1,Yt=!1,Cl=!1,it=!1,Lt=!1,bl=!1,Tl=!1,Cy=!0,by=!1,ak="user-content-",Sf=!0,ps=!1,Wo={},$o=null,Ty=Q({},["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"]),ky=null,Py=Q({},["audio","video","img","source","image","track"]),wf=null,Ry=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kl="http://www.w3.org/1998/Math/MathML",Pl="http://www.w3.org/2000/svg",Pn="http://www.w3.org/1999/xhtml",Go=Pn,xf=!1,Ef=null,lk=Q({},[kl,Pl,Pn],ty),ms=null,uk=["application/xhtml+xml","text/html"],ck="text/html",Ie=null,qo=null,dk=n.createElement("form"),Ay=function(E){return E instanceof RegExp||E instanceof Function},Cf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(qo&&qo===E)){if((!E||typeof E!="object")&&(E={}),E=Bo(E),ms=uk.indexOf(E.PARSER_MEDIA_TYPE)===-1?ck:E.PARSER_MEDIA_TYPE,Ie=ms==="application/xhtml+xml"?ty:sf,X=cn(E,"ALLOWED_TAGS")?Q({},E.ALLOWED_TAGS,Ie):sr,he=cn(E,"ALLOWED_ATTR")?Q({},E.ALLOWED_ATTR,Ie):ar,Ef=cn(E,"ALLOWED_NAMESPACES")?Q({},E.ALLOWED_NAMESPACES,ty):lk,wf=cn(E,"ADD_URI_SAFE_ATTR")?Q(Bo(Ry),E.ADD_URI_SAFE_ATTR,Ie):Ry,ky=cn(E,"ADD_DATA_URI_TAGS")?Q(Bo(Py),E.ADD_DATA_URI_TAGS,Ie):Py,$o=cn(E,"FORBID_CONTENTS")?Q({},E.FORBID_CONTENTS,Ie):Ty,lr=cn(E,"FORBID_TAGS")?Q({},E.FORBID_TAGS,Ie):{},xl=cn(E,"FORBID_ATTR")?Q({},E.FORBID_ATTR,Ie):{},Wo=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,Ko=E.ALLOW_ARIA_ATTR!==!1,Yr=E.ALLOW_DATA_ATTR!==!1,fs=E.ALLOW_UNKNOWN_PROTOCOLS||!1,El=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Yt=E.WHOLE_DOCUMENT||!1,Lt=E.RETURN_DOM||!1,bl=E.RETURN_DOM_FRAGMENT||!1,Tl=E.RETURN_TRUSTED_TYPE||!1,it=E.FORCE_BODY||!1,Cy=E.SANITIZE_DOM!==!1,by=E.SANITIZE_NAMED_PROPS||!1,Sf=E.KEEP_CONTENT!==!1,ps=E.IN_PLACE||!1,F=E.ALLOWED_URI_REGEXP||rT,Go=E.NAMESPACE||Pn,$=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Ay(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Ay(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(Yr=!1),bl&&(Lt=!0),Wo&&(X=Q({},Qb),he=[],Wo.html===!0&&(Q(X,Xb),Q(he,Zb)),Wo.svg===!0&&(Q(X,ny),Q(he,iy),Q(he,of)),Wo.svgFilters===!0&&(Q(X,ry),Q(he,iy),Q(he,of)),Wo.mathMl===!0&&(Q(X,oy),Q(he,Jb),Q(he,of))),E.ADD_TAGS&&(X===sr&&(X=Bo(X)),Q(X,E.ADD_TAGS,Ie)),E.ADD_ATTR&&(he===ar&&(he=Bo(he)),Q(he,E.ADD_ATTR,Ie)),E.ADD_URI_SAFE_ATTR&&Q(wf,E.ADD_URI_SAFE_ATTR,Ie),E.FORBID_CONTENTS&&($o===Ty&&($o=Bo($o)),Q($o,E.FORBID_CONTENTS,Ie)),Sf&&(X["#text"]=!0),Yt&&Q(X,["html","head","body"]),X.table&&(Q(X,["tbody"]),delete lr.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw al('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw al('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=E.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else w===void 0&&(w=PM(m,o)),w!==null&&typeof x=="string"&&(x=w.createHTML(""));ot&&ot(E),qo=E}},Ly=Q({},["mi","mo","mn","ms","mtext"]),Iy=Q({},["foreignobject","desc","title","annotation-xml"]),fk=Q({},["title","style","font","a","script"]),Oy=Q({},[...ny,...ry,...yM]),Ny=Q({},[...oy,...vM]),pk=function(E){let R=h(E);(!R||!R.tagName)&&(R={namespaceURI:Go,tagName:"template"});let D=sf(E.tagName),ce=sf(R.tagName);return Ef[E.namespaceURI]?E.namespaceURI===Pl?R.namespaceURI===Pn?D==="svg":R.namespaceURI===kl?D==="svg"&&(ce==="annotation-xml"||Ly[ce]):!!Oy[D]:E.namespaceURI===kl?R.namespaceURI===Pn?D==="math":R.namespaceURI===Pl?D==="math"&&Iy[ce]:!!Ny[D]:E.namespaceURI===Pn?R.namespaceURI===Pl&&!Iy[ce]||R.namespaceURI===kl&&!Ly[ce]?!1:!Ny[D]&&(fk[D]||!Oy[D]):!!(ms==="application/xhtml+xml"&&Ef[E.namespaceURI]):!1},Xr=function(E){il(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},bf=function(E,R){try{il(t.removed,{attribute:R.getAttributeNode(E),from:R})}catch{il(t.removed,{attribute:null,from:R})}if(R.removeAttribute(E),E==="is"&&!he[E])if(Lt||bl)try{Xr(R)}catch{}else try{R.setAttribute(E,"")}catch{}},My=function(E){let R=null,D=null;if(it)E="<remove></remove>"+E;else{let je=fM(E,/^[\r\n\t ]+/);D=je&&je[0]}ms==="application/xhtml+xml"&&Go===Pn&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let ce=w?w.createHTML(E):E;if(Go===Pn)try{R=new d().parseFromString(ce,ms)}catch{}if(!R||!R.documentElement){R=T.createDocument(Go,"template",null);try{R.documentElement.innerHTML=xf?x:ce}catch{}}let Be=R.body||R.documentElement;return E&&D&&Be.insertBefore(n.createTextNode(D),Be.childNodes[0]||null),Go===Pn?L.call(R,Yt?"html":"body")[0]:Yt?R.documentElement:Be},_y=function(E){return C.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},mk=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")},Dy=function(E){return typeof a=="function"&&E instanceof a},Rn=function(E,R,D){N[E]&&nf(N[E],ce=>{ce.call(t,R,D,qo)})},Fy=function(E){let R=null;if(Rn("beforeSanitizeElements",E,null),mk(E))return Xr(E),!0;let D=Ie(E.nodeName);if(Rn("uponSanitizeElement",E,{tagName:D,allowedTags:X}),E.hasChildNodes()&&!Dy(E.firstElementChild)&&Tt(/<[/\w]/g,E.innerHTML)&&Tt(/<[/\w]/g,E.textContent))return Xr(E),!0;if(!X[D]||lr[D]){if(!lr[D]&&Uy(D)&&($.tagNameCheck instanceof RegExp&&Tt($.tagNameCheck,D)||$.tagNameCheck instanceof Function&&$.tagNameCheck(D)))return!1;if(Sf&&!$o[D]){let ce=h(E)||E.parentNode,Be=g(E)||E.childNodes;if(Be&&ce){let je=Be.length;for(let st=je-1;st>=0;--st)ce.insertBefore(v(Be[st],!0),p(E))}}return Xr(E),!0}return E instanceof l&&!pk(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Tt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Xr(E),!0):(qt&&E.nodeType===3&&(R=E.textContent,nf([V,K,se],ce=>{R=sl(R,ce," ")}),E.textContent!==R&&(il(t.removed,{element:E.cloneNode()}),E.textContent=R)),Rn("afterSanitizeElements",E,null),!1)},Hy=function(E,R,D){if(Cy&&(R==="id"||R==="name")&&(D in n||D in dk))return!1;if(!(Yr&&!xl[R]&&Tt(ds,R))){if(!(Ko&&Tt(Rt,R))){if(!he[R]||xl[R]){if(!(Uy(E)&&($.tagNameCheck instanceof RegExp&&Tt($.tagNameCheck,E)||$.tagNameCheck instanceof Function&&$.tagNameCheck(E))&&($.attributeNameCheck instanceof RegExp&&Tt($.attributeNameCheck,R)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(R))||R==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&Tt($.tagNameCheck,D)||$.tagNameCheck instanceof Function&&$.tagNameCheck(D))))return!1}else if(!wf[R]){if(!Tt(F,sl(D,At,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&E!=="script"&&pM(D,"data:")===0&&ky[E])){if(!(fs&&!Tt(ir,sl(D,At,"")))){if(D)return!1}}}}}}return!0},Uy=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},By=function(E){Rn("beforeSanitizeAttributes",E,null);let{attributes:R}=E;if(!R)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he},ce=R.length;for(;ce--;){let Be=R[ce],{name:je,namespaceURI:st,value:Qr}=Be,gs=Ie(je),at=je==="value"?Qr:mM(Qr);if(D.attrName=gs,D.attrValue=at,D.keepAttr=!0,D.forceKeepAttr=void 0,Rn("uponSanitizeAttribute",E,D),at=D.attrValue,D.forceKeepAttr||(bf(je,E),!D.keepAttr))continue;if(!El&&Tt(/\/>/i,at)){bf(je,E);continue}qt&&nf([V,K,se],zy=>{at=sl(at,zy," ")});let jy=Ie(E.nodeName);if(Hy(jy,gs,at)){if(by&&(gs==="id"||gs==="name")&&(bf(je,E),at=ak+at),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!st)switch(m.getAttributeType(jy,gs)){case"TrustedHTML":{at=w.createHTML(at);break}case"TrustedScriptURL":{at=w.createScriptURL(at);break}}try{st?E.setAttributeNS(st,je,at):E.setAttribute(je,at),Yb(t.removed)}catch{}}}Rn("afterSanitizeAttributes",E,null)},gk=function H(E){let R=null,D=_y(E);for(Rn("beforeSanitizeShadowDOM",E,null);R=D.nextNode();)Rn("uponSanitizeShadowNode",R,null),!Fy(R)&&(R.content instanceof i&&H(R.content),By(R));Rn("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(H){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,D=null,ce=null,Be=null;if(xf=!H,xf&&(H="<!-->"),typeof H!="string"&&!Dy(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw al("dirty is not a string, aborting")}else throw al("toString is not a function");if(!t.isSupported)return H;if(Cl||Cf(E),t.removed=[],typeof H=="string"&&(ps=!1),ps){if(H.nodeName){let Qr=Ie(H.nodeName);if(!X[Qr]||lr[Qr])throw al("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)R=My("<!---->"),D=R.ownerDocument.importNode(H,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?R=D:R.appendChild(D);else{if(!Lt&&!qt&&!Yt&&H.indexOf("<")===-1)return w&&Tl?w.createHTML(H):H;if(R=My(H),!R)return Lt?null:Tl?x:""}R&&it&&Xr(R.firstChild);let je=_y(ps?H:R);for(;ce=je.nextNode();)Fy(ce)||(ce.content instanceof i&&gk(ce.content),By(ce));if(ps)return H;if(Lt){if(bl)for(Be=k.call(R.ownerDocument);R.firstChild;)Be.appendChild(R.firstChild);else Be=R;return(he.shadowroot||he.shadowrootmode)&&(Be=I.call(r,Be,!0)),Be}let st=Yt?R.outerHTML:R.innerHTML;return Yt&&X["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Tt(oT,R.ownerDocument.doctype.name)&&(st="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
|
|
24
|
-
`+
|
|
25
|
-
`)}var OM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=A("Markdown",lT),s=(0,Gr.useRef)(null),[a,l]=(0,Gr.useState)(null),u=(0,Gr.useMemo)(()=>{let y=ul(IM(e));return sT.sanitize(y).replace(/<\/code>/g,`${LM(i.copyIcon)}</code>`)},[e]),c=y=>{var g;let v=y.target,p=!!((g=s.current)!=null&&g.querySelector("code"));a||p&&v.tagName!=="CODE"||!p&&v!==s.current||(v.addEventListener("mouseleave",()=>l(null),{once:!0}),l(v))},f=()=>{if(!a)return;l(null);let y=a.querySelector("button");y&&(ss(y,i.fadeup),r(ly(a)))},d=y=>{y.target.tagName.toLowerCase()==="button"&&(ss(y.target,i.fadeup),r(ly(y.target.parentElement)))},m=()=>{a&&(l(null),o(ly(a)))};return(0,nr.jsxs)(Gr.Fragment,{children:[a&&(0,nr.jsx)(is,{triggerRef:{current:a},parentNode:a,className:i.popover,children:(0,nr.jsxs)("div",{className:i.options,children:[(0,nr.jsx)("button",{type:"button",className:i.option,onClick:f,children:n}),(0,nr.jsx)("div",{className:i.divider}),(0,nr.jsx)("button",{type:"button",className:i.option,onClick:m,children:t})]})}),(0,nr.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:u},onMouseOver:c,onClick:d})]})},uT=OM;var uy={};Qe(uy,{enUS:()=>NM,nlNL:()=>MM});var NM={useCue:[{type:0,value:"Use"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},MM={useCue:[{type:0,value:"Gebruik"}],copyCue:[{type:0,value:"Kopieer"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var cT={fadeup:"N",fadedown:"A",selected:"vo",thumbsUp:"nr",thumbsDown:"ar"};var Pt=S(b()),DM=({cue:e,onRemove:t,onCopy:n,onUse:r,onThumbsUp:o,onThumbsDown:i})=>{let s=A("WidgetCue",cT),a=Y(uy),l=tf(),[u,c]=(0,af.useState)(null),f=p=>{n&&n(p,e)},d=p=>{r&&r(p,e)},m=p=>{p.preventDefault(),p.stopPropagation(),t(e)},y=p=>{p.preventDefault(),p.stopPropagation(),ss(p.target,s.fadeup),c("up"),o(e)},v=p=>{p.preventDefault(),p.stopPropagation(),ss(p.target,s.fadedown),c("down"),i(e)};return(0,af.useEffect)(()=>{l("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label})},[]),(0,Pt.jsxs)(re,{"data-testid":"cue",children:[(0,Pt.jsx)(fe,{children:(0,Pt.jsxs)(fe.Content,{children:[e.title&&(0,Pt.jsx)(fe.Title,{"data-testid":"widget-cue-title",children:e.title}),(0,Pt.jsx)(uT,{content:e.text,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:f,onUse:d})]})}),(0,Pt.jsx)(re.IconButton,{title:a("thumbsUp"),onClick:y,icon:(0,Pt.jsx)(Gb,{}),className:(0,cy.default)(s.thumbsUp,u==="up"&&s.selected),disabled:!!u}),(0,Pt.jsx)(re.IconButton,{title:a("thumbsDown"),onClick:v,icon:(0,Pt.jsx)($b,{}),className:(0,cy.default)(s.thumbsDown,u==="down"&&s.selected),disabled:!!u}),(0,Pt.jsx)(re.IconButton,{title:a("removeCue"),onClick:m,icon:(0,Pt.jsx)(Wb,{})})]})},dT=DM;var cl=S(b()),FM=({cues:e})=>{let t=q(),n=zt(),r=tf(),o=u=>{t(Tb({id:u.rule.id})),r("Assistant response closed",{name:u.rule.name,group:u.rule.label,description:u.rule.description})},i=(u,c)=>{To(u),r("Assistant response copied",{name:c.rule.name,group:c.rule.label,description:c.rule.description,copiedText:u})},s=(u,c)=>{n.send(Fr,{text:u,suggestion:{source:"cue",sourceText:u}}),r("Assistant response used",{name:c.rule.name,group:c.rule.label,description:c.rule.description,usedText:u})},a=u=>{r("Assistant response feedback",{name:u.rule.name,group:u.rule.label,description:u.rule.description,thumb:"up"})},l=u=>{r("Assistant response feedback",{name:u.rule.name,group:u.rule.label,description:u.rule.description,thumb:"down"})};return(0,cl.jsx)(cl.Fragment,{children:e.map(u=>(0,cl.jsx)(dT,{cue:u,onRemove:o,onCopy:i,onUse:s,onThumbsDown:l,onThumbsUp:a},u.rule.id))})},fT=FM;var mT=S(_());var HM=/(https?:\/\/[^\s]+)/,pT=e=>e.split(" ").find(t=>HM.test(t));var $t=S(b()),UM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=pT(r),i=Y(Oo),s=B("showImages"),a=B("fallbackImage"),l=f=>{f.preventDefault(),f.stopPropagation(),n(r)},u=(0,mT.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$t.jsxs)(re,{onClick:l,"data-testid":"edit-suggestion",children:[(0,$t.jsxs)(fe,{children:[s&&e.image&&(0,$t.jsx)(fe.Image,{src:qd(e,"small",a||void 0),title:e.title}),(0,$t.jsxs)(fe.Content,{children:[e.title&&(0,$t.jsx)(fe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,$t.jsx)(re.Labels,{labels:e.searchKeywords}),(0,$t.jsx)(fe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$t.jsxs)(re.Actions,{children:[o&&(0,$t.jsx)(re.ActionButton,{onClick:u,label:i("visitUrl")}),(0,$t.jsx)(re.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},gT=UM;var dl=S(b()),BM=({lines:e,suggestions:t})=>{let n=zt(),r=(o,i)=>{n.send(Fr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,dl.jsx)(dl.Fragment,{children:t.map(o=>(0,dl.jsx)(gT,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},hT=BM;var fl={};Qe(fl,{enUS:()=>jM,nlNL:()=>zM});var jM={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"}]},zM={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 pl={root:"pr",loginText:"dr",stateText:"ko",sectionList:"lr",shortcutList:"sr",shortcut:"cr",link:"zo"};var W=S(b()),uf=(e,t)=>{let n=O(tt);(0,lf.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},KM=({onLogIn:e})=>{let t=A("Widget",pl),n=B("isEmbedded"),r=B("adminUrl");return(0,W.jsx)("div",{className:t.loginText,children:(0,W.jsx)("div",{children:(0,W.jsx)(_d,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},yT=({text:e})=>{let t=A("Widget",pl);return(0,W.jsx)("div",{className:t.stateText,children:(0,W.jsx)("div",{children:(0,W.jsx)("p",{children:e})})},"notification")},WM=()=>{let e=Y(fl),t=q(),n=A("Widget",pl),r=B("showSearch"),o=B("showSummaryCommand"),i=B("showKnowledgeSearch"),s=O(Sb("/admin/")),a=zt(),l=B("productName"),u=r||o||i||s;return uf(()=>(t(zh()),()=>{t(xb())}),[t]),u?(0,W.jsx)(Ln,{title:e("actions"),type:"shortcuts",children:(0,W.jsxs)("div",{className:n.shortcutList,children:[r&&(0,W.jsxs)("button",{className:n.shortcut,"data-testid":"shortcut-search",onClick:()=>a.send("ShowCommandPalette",{isOpen:!0}),children:[(0,W.jsx)(Gi,{}),e("linkSearch")]}),o&&(0,W.jsxs)("button",{className:n.shortcut,"data-testid":"shortcut-summary",onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,W.jsx)(Vb,{}),e("linkSummary")]}),i&&(0,W.jsxs)("button",{className:n.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,W.jsx)(zb,{}),e("linkKnowledgeSearch")]}),s&&(0,W.jsxs)("a",{className:n.shortcut,target:"_blank",href:s,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,W.jsx)(jb,{}),e("linkStudioLogin",{productName:l})]})]})}):null},$M=()=>{let e=q(),t=B("showCustomMessages"),n=O(db),r=O(ji);return uf(()=>(e(rl(r)),e(hb(r)),()=>{e(yb(r))}),[e,t,r]),!t||n.length===0?null:(0,W.jsx)(Ln,{type:"custom-messages","data-testid":"custom-messages",children:(0,W.jsx)(gt,{withDivider:!0,children:n.map(o=>(0,W.jsx)(Hb,{suggestion:o},o.text))})})},GM=()=>{let e=Y(fl),t=q(),n=B("showAutoflows"),r=O(sb),o=O(ji);return uf(()=>(t(er(o)),t(ab(o)),()=>{t(lb(o))}),[t,n,o]),!n||r.length===0?null:(0,W.jsx)(Ln,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,W.jsx)(gt,{withDivider:!0,children:(0,W.jsx)(Db,{})})})},qM=()=>{let e=q(),t=O(Pd),n=O(Cb),r=O(kd),o=O(Rd),i=O(Yn),s=O(Hc);return uf(()=>{t.forEach(({type:a})=>{a==="entities"?e(sn()):["cues"].includes(a)||e(ln(a))})},[e,s,i]),(0,W.jsx)(lf.Fragment,{children:t.map(({type:a,title:l,amount:u,lines:c})=>{var f,d;switch(a){case"entities":return r&&r.length>0&&(0,W.jsx)(Ln,{type:a,title:l,"data-testid":`type-${a}`,children:(0,W.jsx)(Bb,{entities:r})},a);case"cues":return n&&n.length>0&&(0,W.jsx)(Ln,{type:a,title:l,"data-testid":`type-${a}`,children:(0,W.jsx)(gt,{withDivider:!0,children:(0,W.jsx)(fT,{cues:n})})},a);default:return((d=(f=o[a])==null?void 0:f.suggestions)==null?void 0:d.length)>0&&(0,W.jsx)(Ln,{type:a,title:l,"data-testid":`type-${a}`,children:(0,W.jsx)(gt,{withDivider:!0,children:(0,W.jsx)(hT,{lines:c,contentType:a,suggestions:o[a].suggestions.slice(0,u)||[]})})},a)}})})},YM=({onLogIn:e})=>{let t=Y(fl),n=A("Widget",pl),r=O(zi),o=O(tt),i=O(ji),s=O(Yn);return r===!1?(0,W.jsx)(yT,{text:t("notSupported")}):o===!1?(0,W.jsx)(KM,{onLogIn:e}):!s||!i||o===null?(0,W.jsx)(yT,{text:t("waiting")}):(0,W.jsx)("div",{className:(0,vT.default)(n.root),"data-testid":"widget",children:(0,W.jsxs)(Ul,{className:n.sectionList,children:[(0,W.jsx)(WM,{}),(0,W.jsx)($M,{}),(0,W.jsx)(GM,{}),(0,W.jsx)(qM,{})]})})},ST=YM;function as(e){let t=new Range;return t.selectNodeContents(e),t}function wT(e,t,n){try{return qr(e,t,n),!0}catch{return!1}}function cf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function df(e){return"tagName"in e&&e.tagName==="BR"}var ml=/[\u200B-\u200D\uFEFF]/g;function qr(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(ml,""),f=o+c.length,d=t>=o&&t<=f,m=n>=o&&n<=f;if(d){let y=s(u,t-o);y===0&&!m?r.setStartBefore(l):r.setStart(l,y)}m&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(df(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;cf(l)&&u&&!cf(u)&&!df(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gl(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,m=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let y=f.textContent;d&&(a=u+y.substring(0,r).replace(ml,"").length),m&&(l=u+y.substring(0,i).replace(ml,"").length),u+=y.replace(ml,"").length;break}case Node.ELEMENT_NODE:{let y=f.nextSibling===null;df(f)&&!y&&u++;for(let v=0;v<f.childNodes.length;v++){let p=d&&v===r,g=m&&v===i;if(p&&(a=u),g&&(l=u),l!==void 0||((!p||!s)&&c(f.childNodes[v]),m&&v===i-1&&(l=u),l!==void 0))break}!m&&cf(f)&&!y&&u++,m&&(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 hl(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,m=f?i:void 0,y=u.textContent.replace(ml,"");d===0&&m===void 0?a+=y:a+=y.substring(d,m);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&df(u)&&!d&&(a+=`
|
|
26
|
-
`);for(let
|
|
27
|
-
`);break}default:break}f&&s++}return l(e),a}var xT=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(xT||{}),rr=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();Mr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(xT).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(t={shouldObserve:!0}){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t!=null&&t.shouldObserve&&n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.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 ET(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var jo=class extends rr{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),hl(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!ET(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!ET(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return gl(this.element,t);let n=this.lastKnownSelection;if(n&&wT(this.element,n.start,n.end))return n;let r=as(this.element);return r.collapse(!1),gl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return hl(this.element,qr(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(t={shouldObserve:!0}){super.listen(t),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),t!=null&&t.shouldObserve&&this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var zo=class extends rr{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 CT(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 XM(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var dy=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()}},fy=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=CT(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()}},py=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(),j.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 fy(t,this.deepdeskUrl,{debug:!0}):new dy(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=XM(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(j.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;j.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)}},bT=py;var ls=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var my=e=>new Promise(t=>{setTimeout(t,e)});var us=class extends ls{name="ClientError"},hy=class extends ls{name="ServerError"},gy=new Map;function QM(e){return e.status===204||["0",null].includes(e.headers.get("content-length"))}var 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:m=!0,retryOnError:y=C=>C instanceof TypeError,retryOnResponse:v=C=>C.status>=500,version:p="v1",...g}=n;if(u)if(l){if(gy.has(s)){r(gy.get(s));return}}else throw new Error(`Can't use 'useCache' for ${n.method}`);let h={credentials:"include",...g,headers:{"Content-Type":"application/json",...g.headers}};!l&&this.csrfToken&&(h.headers={...h.headers,"X-CSRFToken":this.csrfToken}),typeof p=="string"&&(h.headers={...h.headers,"X-Deepdesk-API-Version":p});let w=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()=>(w--,a(s,h).then(async C=>v(C)&&!i.isAborted&&w>0?(await my(d),T()):C.status===401&&m===!0&&x===!1?(x=!0,await this.refreshToken(),T()):C).catch(async C=>{if(y(C)&&!i.isAborted&&w>0)return await my(d),T();throw C}));T().then(async C=>{let k=await C.json().catch(L=>{if(QM(C))return null;throw L});if(delete this.latestRequestByUrl[s],C.status>=500){o(new hy("Server Error",k));return}else if(C.status===401){o(new us("Unauthorized",k));return}else if(C.status===403){o(new us("Forbidden",k));return}else if(C.status===404){o(new us("Not Found",k));return}else if(C.status>=400){o(new us("Bad Request",k));return}u&&gy.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 ZM;(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||={})})(ZM||={});function ff(e){return{...J(e),tags:e.tags}}var or=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(),j.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Re(t),tags:t.tags},{version:"v2"});return ff(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=await this.client.get("/apis/admin/account/",{version:null,useCache:!0});return J(t)}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(),j.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 j.info(`Successfully retrieved conversation ${i.id} for session ${t}`),ff(i)}async isConversationSupported(t,n={}){j.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=Re(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return ff(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Re(o),tags:o.tags})),{version:"v2"})).map(o=>ff(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",Re({...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:Re({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){let r=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});return J(r)}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 j.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Re(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}`,Re(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`,Re(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",Re(t),{abortLatest:!0});return J(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Re(t),{version:"v2"});return J(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Re({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,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",Re(t),{version:"v2"});return J(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Mv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&j.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var yl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Ug(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,J(o))}catch{j.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 JM;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(JM||={});var vl=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=j;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`,Re(n));return J(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Re(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",Re(t));return J(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new yl(`${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 TT={startTime:null,stopTime:null},kT=G({name:"handlingTime",initialState:TT,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(le,()=>TT)}}),{handlingTimeStart:PT,handlingTimeStop:pf,handlingTimeReset:RT}=kT.actions,AT=kT.reducer;var LT=(e={})=>{let t={onAuthError:Bi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mf={list:{keywordMatches:[]},fetchState:"idle"};var Vo=U("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 mf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),e2=G({name:"styleSuggestions",initialState:mf,reducers:{},extraReducers:e=>{e.addCase(Vo.pending,t=>{t.fetchState="loading"}).addCase(Vo.rejected,t=>{t.fetchState="error"}).addCase(Vo.fulfilled,(t,n)=>{t.fetchState="done",Mr(t.list,n.payload)||(t.list=n.payload)}).addCase(xo,t=>{t.list=mf.list}).addCase(le,()=>mf)}}),IT=e2.reducer;var OT=(e={})=>{let t,n=!0,r={getStyleSuggestions:Vo,debounce:500,...e};return o=>i=>s=>{var m;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(!((m=u.conversation.current)==null?void 0:m.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 t2(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var NT=(e={})=>{let t={getTextSuggestions:ln,getAutocompleteSuggestions:Qa,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===Ad.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:m}}=l;return t2(m,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let p=Vi(l);p===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(p))},d?0:t.debounce)),a}};var MT=Vo.fulfilled.toString();function n2(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 _T=e=>t=>n=>r=>{var u;if(r.type!==MT){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=n2(o,s);r.type===MT&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var r2=ac({answer:qE,auth:e1,autoflows:ub,conversation:u1,contentTypes:sE,customMessages:vb,passwordlessToken:Eb,entities:NE,knowledgeAssistant:WE,handlingTime:AT,info:R1,input:b1,settings:Gx,profile:QE,search:_1,summary:BE,styleSuggestions:IT,ui:EC,rules:kb,textSuggestions:iC});function DT(e){return Jw({reducer:r2,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),LT(),NT({debounce:200}),OT({debounce:500}),_T(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var o2=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},i2=e=>t=>n=>r=>{var a;let o=t.getState(),i=Og("inlineSuggestions")(o);switch(r.type){case Bi.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 Ye.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case Wc.toString():e.handleKeyDown(r.payload);break;case xo.toString():e.logSendMessage(r.payload);break;case $c.toString():e.handleInputChanged(r.payload);break;case Uo.fulfilled.toString():r.isBroadcasted||e.broadcast(zg,r,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case xo.toString():e.handleAfterSendMessage(r.payload);break;case Ja.toString():e.onUpdateShowTabHint(r.payload);break;case pf.toString():e.logHandlingTime();break;case En.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:o2(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0}),i&&(t.dispatch(xn([])),t.dispatch(Vn()));break}case Kc.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 Pa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Gc.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 xn.toString():{i&&r.payload.length>0&&t.dispatch(Dr(0));break}case Gn.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary,model:t.getState().summary.model}});break}default:break}return s},FT=i2;function yy(e){return e.toISOString().replace("T"," ").replace("Z","")}function HT(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:yy(n),timeStop:yy(r)}}function UT(e,t,n){var k,L,I;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:m,textSuggestions:y,offeredTextSuggestions:v}}=t[e],p=r.length,h=y.reduce((N,{text:V,searchTerm:K})=>N+V.length-(K?K.length:0),0),w=u??Date.now(),x=(Date.now()-w)/1e3+(c||0),T=o/x,C=y.reduce((N,{searchTerm:V})=>N+(V?V.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:m,lenTextTyped:o+C,lenTextTotal:p,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:(L=t.info.agentInfo)==null?void 0:L.agentName,agentEmail:(I=t.info.agentInfo)==null?void 0:I.agentEmail}}function vy(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return vy(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?vy(o,t):null}function BT(e,t){return vy(e,t)}function jT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function s2(e){return typeof e=="object"&&e!==null&&"tagName"in e}function gf(e){return s2(e)&&(Kr(e)||Fd(e))}var zT,Tn=new Map,a2=["bottom","height","left","right","top","width"],l2=(e={},t={})=>a2.some(n=>e[n]!==t[n]);function VT(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,...VT(t)]:[]}function KT(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var hf=!1,WT=()=>{hf=!0;let e=[];if(Tn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Tn.delete(n);return}let r=n.getBoundingClientRect();l2(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(KT,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),Tn.size===0){hf=!1;return}zT=window.requestAnimationFrame(WT)};function Sy(e,t){let n=VT(e),r=[],o=n.map((i,s)=>Sy(i,a=>{r[s]=a;let l=Tn.get(e);if(!l)return;let u=r.reduce(KT,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Tn.has(e)){let s=Tn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Tn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!hf&&WT()},unobserve(){o.forEach(s=>s.unobserve());let i=Tn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Tn.delete(e),Tn.size||(cancelAnimationFrame(zT),hf=!1)}}}}var $T,kn=new Map,GT=()=>{kn.forEach((e,t)=>{if(!t.isConnected){kn.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)))}),kn.size!==0&&($T=window.requestAnimationFrame(GT))};function qT(e,t){return{observe(){let n=kn.size===0;kn.has(e)?kn.get(e).callbacks.push(t):kn.set(e,{visible:void 0,callbacks:[t]}),n&>()},unobserve(){let n=kn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||kn.delete(e),kn.size||cancelAnimationFrame($T)}}}}var wy=["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 xy(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function cs(e){return parseFloat(e)}function yf(e){return Math.round(e*1e6)}function YT(e){return e/1e6}function Ey(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=cs(e.width),i=cs(e.borderLeftWidth),s=cs(e.borderRightWidth),a=cs(e.paddingRight),l=YT(yf(o)-yf(i)-yf(s)),u=YT(yf(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function Sl(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",Do(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};xy(r,n,wy),Ey(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=qT(e,()=>{xy(r,n,wy),Ey(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=Sy(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(xy(r,n,wy),Ey(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(),m=window.getComputedStyle(t.closestScrollElement),y=cs(m.borderTopWidth),v=cs(m.borderBottomWidth),p=d.top+y-f.top,g=f.top+f.height+-(d.top+d.height-v);n.style.clipPath=`inset(${p}px 0px ${g}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 XT=(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{j.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function u2(e){return e.offsetParent!==null}function QT(e){if(!u2(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 vf(e,t,n=100){let r=QT(e);t({isVisible:r});let o=setInterval(()=>{let i=QT(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Le=S(b());var ZT=XT("showTabHint",!0),wl=class e{static version="11.2.1-beta.8";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 or(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[FT({broadcast:(f,d,m)=>{this.broadcastEvents.send(f,d,m)},emit:(f,d,m)=>this.emit(f,d,m),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=>ZT.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new vl(n)}),this.store=DT(c),this.broadcastEvents=new bT({debug:!0,deepdeskUrl:u,eventMap:D1(this.store),createCustomChannel:l}),this.store.dispatch(Ja(ZT.value())),this.store.dispatch(Dc({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?(j.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(j.warn("Profile has not been loaded (yet)"),!0):(j.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Bi(null)),this.store.dispatch(jn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();tt(r)&&qx(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(jn())).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){j.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Dg({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Uc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Bc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Fg(t))).payload}async postMessages(t){return(await this.store.dispatch(zc(t))).payload}async updateConversation(t){return(await this.store.dispatch(jc(t))).payload}resetConversation(){this.store.dispatch(le()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Gn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Dc(t))}setVisitorInfo(t){this.store.dispatch(P1(t))}async setAgentInfo(t){await this.store.dispatch(Ra(t))}async setAgentSettings(t){await this.store.dispatch(Bg(t))}async getAgentSettings(){return(await this.store.dispatch(jg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Ad()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch($c(t))}notifyKeyDown(t){this.store.dispatch(Wc(t))}notifyPaste(t,n){this.store.dispatch(w1({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(v1(t))}notifyExternalSuggestion(t){this.store.dispatch(En(t)),this.store.dispatch(Vn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch(Uo({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(zr({collapse:!1})),this.inputMediator&&this.store.dispatch(p1({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(xn([])))}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(S1(c1(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(g1()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(y1()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(Pa()):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(Dr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Dr(-1)),this.store.dispatch(Pa()),t.preventDefault()):n||(this.store.dispatch(zr({collapse:!0})),this.store.dispatch(wC(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:m}=this.state.input;this.store.dispatch(Ja(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&m&&m.text.startsWith(d)&&(this.store.dispatch(En({text:m.text,suggestion:m,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Vn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(x1()),this.store.dispatch(xn([]))}handlingTimeStart(){this.state.handlingTime.startTime||(j.info("Start handling time"),this.store.dispatch(PT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(j.info("Stop handling time"),this.store.dispatch(pf()))}logSendMessage(t){let n=UT("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=HT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(RT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Vn()),this.store.dispatch(xo(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(En({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){j.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),j.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]=Sl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Gt.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]=Sl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Gt.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 Do(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,Gt.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),j.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()?(j.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(C1(r.metrics))):j.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(!gf(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:m,inputMediator:y,closestScrollSelector:v,appendOverlayTo:p,inlineSuggestions:g,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:m,isEmbedded:f,inlineSuggestions:g,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),Do(t),this.inputMediator=y||(Kr(t)?new zo(t):new jo(t)),this.inputMediator.on("change",({plainText:T})=>{this.notifyInputChanged(T)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(E1({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 w=v&&BT(t,v)||void 0;if(g){let{customStyles:T,appendOverlayTo:C}=n;if(Kr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:T,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(RC,{})})}),k),this.inputMediator.on("caret",I=>{this.store.dispatch(xn([])),I?(k.style.display="block",k.style.top=`${I.top}px`,k.style.left=`${I.left}px`):k.style.display="none"});let L=this.overlayContainerFactory("floating-menu",w||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:C},T==null?void 0:T.floatingMenuRootNode);(0,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:T,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(yC,{onLogIn:()=>this.loginViaPopup().catch(I=>j.warn(I.message))})})}),L)}else{let T=this.overlayContainerFactory("deepdesk-tab-completion",w||t,{appendTo:p,closestScrollElement:w,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",w||t,{appendTo:p},r==null?void 0:r.suggestionsRootNode);(0,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:r,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(rb,{inputElement:t})})}),T),(0,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:r,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(FC,{onLogIn:()=>this.loginViaPopup().catch(k=>j.warn(k.message))})})}),C)}(0,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:r,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(fC,{})})}),this.createContainer("deepdesk-overlays"));let x;this.inputMediator.on("selection",T=>{clearTimeout(x),T===null?x=setTimeout(()=>{T!==null&&this.store.dispatch(Hg(T))},500):this.store.dispatch(Hg(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(Th(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Th(!0))),this.store.dispatch(m1({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Vn()),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&&j.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,Gt.render)((0,Le.jsx)(Ho,{store:this.store,customStyles:r,children:(0,Le.jsx)(Co,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(ST,{onLogIn:()=>this.loginViaPopup().catch(s=>j.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,Gt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=vf(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){jT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Xa());let t=Yn(this.state);t&&(await this.store.dispatch(qa()),this.store.dispatch(Dc({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 m=>{var y,v;if((y=m.data)!=null&&y.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((v=m.data)==null?void 0:v.jwt),await this.isLoggedIn(),this.broadcastEvents.send(La),l=!0,o.port1.close(),n()}catch(p){console.error(p),r(p)}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 m=>{var y;if(m.origin===a.origin)switch((y=m.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){j.error("Error posting message to popup",v),r(v)}break}case"deepdesk-popup-error":{u(),m.data.message==="Timeout"&&j.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(m.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(j.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;j.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=Pd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(sn()):["cues"].includes(r)||this.store.dispatch(ln(r))})}catch(r){this.handleError(r)}}};async function JT(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 ek(e,t,n={}){let r=n.replace?qr(e,n.replace.start,n.replace.end):as(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(`
|
|
28
|
-
`).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?
|
|
29
|
-
`).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
|
|
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 Ih=S(b()),sO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},CC=({className:e,color:t})=>(0,Ih.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ih.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:sO[t||"pink"]})});var bC={root:"q",text:"C",isLoggedIn:"di",isLoggedOut:"po",icon:"li",logo:"si",lock:"ci"};var Nh={};ze(Nh,{enUS:()=>lO,nlNL:()=>uO});var lO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},uO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Fo=S(b()),kC=({onLogIn:e})=>{let t=W(Nh),n=B("floatingMenu"),r=B("productName"),o=Y(),i=N(tt),s=P("FloatingMenu",bC);if(i===null||n===!1)return null;let a=()=>{i===!0?o(xt(!0)):e()};return(0,Fo.jsxs)("button",{className:(0,TC.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)(CC,{className:s.logo,color:"pink"}),i===!1&&(0,Fo.jsx)(EC,{className:s.lock})]})]})};var Ud=S(_());var PC=S(_());function ts(e){(0,PC.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 ns(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 cO={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Dd=({ui:e})=>e.overlayCollapsed;var RC=q({name:"ui",initialState:cO,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:tl,setInputHasFocus:Oh,setOverlayCollapsed:Vr,setOpenOverlayWhenTyping:AC,setOverlayCollapsedUserOverwrite:LC}=RC.actions,IC=RC.reducer;var Fd=S(_());var rs=S(_());var NC=S(_());function OC(e,t,n){(0,NC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var MC={root:"xi",actions:"fi",badge:"gi",formattedText:"do"};var Uo=S(b()),pO=["search","personal-collection-search","search-autocomplete"];function mO(e,t,n,r={}){let o="";return pO.includes(t)?o=EE(hh(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=hh(e,n,r),r.placeholders===!0&&(o=CE(o)),o}var gO=()=>{},hO=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=B("inlineSuggestions"),i=N(Wi),s=Y(),a=P("TextSuggestion",MC),l=(0,rs.useRef)(null);(0,rs.useEffect)(()=>{let c=setTimeout(()=>{s(E1({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),OC(l,"click",()=>{s(Fr(e)),s(En({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,rs.useMemo)(()=>mO(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)(te,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:gO,children:(0,Uo.jsx)(Gi,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,Uo.jsx)("div",{className:a.actions,children:(0,Uo.jsx)(Td,{onFeedback:()=>r(n),suggestion:n.text})})]})},_C=hO;var Mh=S(b()),yO=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Fd.useMemo)(()=>{let i=t.map((s,a)=>(0,Mh.jsx)(_C,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,Mh.jsx)(Fd.Fragment,{children:o})},Hd=yO;var DC={root:"bi",paper:"hi"};var nl=S(b()),SO=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Ud.useRef)(null),r=P("InlineSuggestionsOverlay",DC),o=N(ns),i=Y(),s=N(tt),a=N(Ki),l=N(Dd),u=B("showTextSuggestions");return ts(()=>{setTimeout(()=>{i(Vr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Ud.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,nl.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,nl.jsx)("div",{ref:n,className:r.paper,children:(0,nl.jsx)(ht,{children:(0,nl.jsx)(Hd,{suggestions:e,selectedIndex:t})})})})},wO=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),FC=jn(wO)(SO);var rl=S(b()),xO=({children:e})=>{let n=B("locale").replace("-","");return(0,rl.jsx)(th.Provider,{value:n,children:e})},EO=({store:e,customStyles:t={},children:n})=>(0,rl.jsx)(Mg,{store:e,children:(0,rl.jsx)(xO,{children:(0,rl.jsx)(Ss.Provider,{value:t,children:n})})}),Bo=EO;var jd=S(ee()),os=S(_());var HC=S(_());function UC(e,t){let[n,r]=(0,HC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return j.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){j.error(s)}}]}var BC=()=>/Mac/i.test(navigator.platform);var zC=S(ee()),Qn=S(_());var _h={};ze(_h,{enUS:()=>CO,nlNL:()=>bO});var CO={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"}]}]},bO={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 jC={root:"mi",anchor:"ui",anchorButton:"yi"};var Kr=S(b()),Dh=(e,t,n)=>r=>(0,Kr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),kO=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=W(_h),s=zt(),a=P("Login",jC),l=B("productName"),u=(0,Qn.useCallback)(f=>{f.preventDefault(),r&&r(parseInt(f.target.value,10))},[]),c=(0,Qn.useCallback)(f=>{f.preventDefault(),s.send($i,!0)},[t]),p=(0,Qn.useMemo)(()=>f=>(0,Kr.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:f},"login"),[t]),d=(0,Qn.useCallback)(f=>(0,Kr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:f},"prompt"),[c]),{min:g,hour:y,day:v}=(0,Qn.useMemo)(()=>({min:Dh(a,60*10,u),hour:Dh(a,60*60,u),day:Dh(a,60*60*12,u)}),[]);return(0,Kr.jsxs)("div",{className:(0,zC.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,Kr.jsxs)(Qn.Fragment,{children:[(0,Kr.jsx)("br",{}),i("snooze",{min:g,hour:y,day:v})]})]})},Bd=kO;var VC={root:"lo",text:"wi"};var ol=S(b()),RO=({title:e})=>{let t=P("SearchTrigger",VC),n=Y();return(0,ol.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(xt(!0)),children:[(0,ol.jsx)(Yi,{}),(0,ol.jsx)("span",{className:t.text,children:e})]})},KC=RO;var Fh={};ze(Fh,{enUS:()=>AO,nlNL:()=>LO});var AO={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"}]},LO={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 WC={root:"vi",isInline:"S",toggleButton:"ki",toggleButtonWrapper:"E",toggleButtonWrapperHidden:"zi",isCollapsed:"so",collapsible:"ji",hints:"co",hintsHidden:"Yi",triggers:"xo",triggersRight:"qi"};var Se=S(b()),NO=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=P("SuggestionsOverlay",WC),o=W(Fh),i=N(ns),s=v1(),a=Y(),l=(0,os.useRef)(null),u=B("searchTriggerKey"),c=B("productName"),p=N(Dd),d=N(tt),g=N(Ki),[y,v]=(0,os.useState)(null),f=B("showSearch"),m=B("showTextSuggestions"),h=B("adminUrl"),w=B("isEmbedded"),[x,T]=UC("dd-snooze-until-ms",0),C=p||x>Date.now(),k=N(K=>K.input.text),L=e.filter(K=>K.source!=="gpt").length,I=()=>{C&&T(0),a(LC(!C))},O=K=>{a(Xe({name:"suggestion feedback",data:{text:K.text,source:"overlay",context:k},options:{includeConversationData:!0}}))},V=K=>{let se=Date.now()+K*1e3;T(se),j.info(`Snooze until: ${new Date(se)}`),a(Vr({collapse:!0}))};return(0,os.useEffect)(()=>{L===0&&v(null)},[e,L]),ts(()=>{a(Vr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||g===!1?null:d===!1?(0,Se.jsxs)("div",{ref:l,className:(0,jd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1}}),(0,Se.jsx)("div",{className:r.triggersRight,children:(0,Se.jsx)(ro,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(ro,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),(0,Se.jsx)("div",{className:r.collapsible,children:(0,Se.jsx)(Bd,{loginUrl:h,isEmbedded:w,onLogIn:n,onSnooze:V})})]}):!s||!i?null:(0,Se.jsxs)("div",{ref:l,className:(0,jd.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Se.jsxs)("div",{className:r.triggers,children:[(0,Se.jsx)("div",{style:{flex:1},children:f&&(0,Se.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(BC()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,Se.jsx)(KC,{title:o("search")})})}),(0,Se.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Se.jsx)("div",{className:(0,jd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,Se.jsx)(ro,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})]})]}),(0,Se.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Se.jsx)(ro,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),L>0&&m&&(0,Se.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Se.jsx)(ht,{children:(0,Se.jsx)(Hd,{onFeedback:O,suggestions:e,selectedIndex:t,reverse:!0})})})]})},OO=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),$C=jn(OO)(NO);var nf=S(ee());var er=S(_());var is=S(_());function zd(e){return e.contentEditable==="true"}function MO(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 GC(e){let{selectionStart:t,selectionEnd:n}=zd(e)?MO(e):e;return[t,n]}function qC(e){let[,t]=(0,is.useState)(),n=(0,is.useRef)(null);return n.current=GC(e),(0,is.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=GC(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 YC(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Vl);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 XC=S(_()),_O=["div","span","mark","strong","b","i","u","em"];function Hh(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(_O.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,XC.cloneElement)(r,{children:Hh(s,t,n+1)})]}return[...e,...t]}function Wr(e){return e.tagName.toLowerCase()==="textarea"}var un={root:"Ci",container:"Si",agentText:"fo",tabText:"go",hint:"G",matchSelection:"bo",focus:"Ei",resetIndent:"Gi",matchKeyword:"p",matchPlaceholder:"d",hover:"ho",hintText:"Ni",popover:"Ai",popoverRoot:"Fi",popoverContentContainer:"mo",popoverContent:"Hi",selectionOptions:"Li",selectionOptionsIsHidden:"Mi",selectionOptionsButton:"Ri",caret:"Ti",popoverSuggestionsRoot:"Ui",suggestionsOverlayInputStyles:"Bi"};var sb=S(ee());var Qd=S(_());var ss=S(_());function QC(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Vd(e){let t=(0,ss.useRef)(null),[n,r]=(0,ss.useState)(!1);return(0,ss.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=QC((c,p)=>{let d=t.current;if(!d)return;let g=c/i,y=p/i,v=d.getBoundingClientRect(),f=g>v.x&&g<v.x+v.width&&y>v.y&&y<v.y+v.height;f&&!o?(o=!0,r(!0)):!f&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=QC(()=>{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 ZC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Kd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function JC(e){return e!=null}var Bh=S(ee()),Kt=S(_());var Wd=S(_()),FO=["bottom","height","left","right","top","width"],HO=(e={},t={})=>FO.some(n=>e[n]!==t[n]),Zn=new Map,eb,tb=()=>{let e=[],t=[];Zn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();HO(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))}),eb=window.requestAnimationFrame(tb)};function UO(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&&tb()},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(eb)}}}}function Uh(e){let[t,n]=(0,Wd.useState)(null);return(0,Wd.useLayoutEffect)(()=>{if(!e.current)return;let r=UO(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var as=S(_()),rb=S(nc());var nb={root:"Di"};var ob=({children:e,parentNode:t})=>{let[n,r]=(0,as.useState)(null),o=(0,as.useContext)(Ss);return(0,as.useLayoutEffect)(()=>{let i=document.createElement("div");return Ho(i),i.classList.add(nb.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,rb.createPortal)(e,n):null};var bn={ref:"Ii",root:"o",positionAbove:"l",positionBelow:"s",positionLeft:"c",positionRight:"x",alignStart:"f",alignCenter:"g",alignEnd:"b"};var $d=S(b()),Gd=(e=!1)=>{let[t,n]=(0,Kt.useState)(e),r=(0,Kt.useCallback)(()=>n(!0),[]),o=(0,Kt.useCallback)(()=>n(!1),[]),i=(0,Kt.useCallback)(()=>n(a=>!a),[]),s=(0,Kt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function jh(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 ls=({className:e,triggerRef:t,boundaryRef:n=(0,Kt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=jh,parentNode:a,...l})=>{let u=Uh(t),c=Uh(n),p=(0,Kt.useMemo)(()=>s(u,c,0),[u,c]);return(0,$d.jsx)(ob,{parentNode:a,children:(0,$d.jsx)("div",{className:(0,Bh.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:p,...l,role:"dialog",children:(0,$d.jsx)("div",{className:(0,Bh.default)(e,bn.root),children:i})})})};var ib=S(ee()),qd=S(_());var zh=S(b()),Yd=(0,qd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,qd.useRef)(null),i=P("TabCompletion",un);return(0,zh.jsx)("div",{ref:Kd([o,r]),className:(0,ib.default)(e,i.popoverContentContainer),...n,children:(0,zh.jsx)("div",{className:i.popoverContent,children:t})})});var $r=S(b()),zO=e=>t=>{let n=jh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},VO=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",un),s=Gd(),a=(0,Qd.useMemo)(()=>zO(e.getBoundingClientRect()),[e]),[l,u]=Vd(e);return(0,Qd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,$r.jsxs)("span",{children:[(0,$r.jsx)("mark",{ref:Kd([l,s.triggerRef]),className:(0,sb.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,$r.jsx)(ls,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,$r.jsx)(Yd,{style:n,children:(0,$r.jsx)("div",{className:i.hintText,children:o})})})]})},Xd=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${ZC(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(JC);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,$r.jsx)(VO,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ab=S(ee());var Vh=S(b()),KO=({inputElement:e,children:t})=>{let n=P("TabCompletion",un),[r,o]=Vd(e);return(0,Vh.jsx)("mark",{ref:r,className:(0,ab.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Zd=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,Vh.jsx)(KO,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ef=S(ee());var ot=S(_());var Kh=S(b()),lb=()=>(0,Kh.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,Kh.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=S(_());var cb=S(sh());var ub={root:"Oi",content:"Xi"};function Jd(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 Wh(e){return e.replace("https://www.","").replace("https://","")}var Wt=S(b()),$O=3,GO=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),qO=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=$O})=>{let i=P("LinkSearch",ub),[s,a]=(0,Gr.useState)(""),l=Y(),u=N(dC("url")),c=N(U1("URL",GO)),[p,d]=(0,Gr.useState)(c.length-1),g=B("fallbackImage"),y=h=>{let w=h.target;a(w.value)},v=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},f=h=>{var T;let w=p-1<0?c.length-1:p-1,x=p+1===c.length?0:p+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(w),h.code==="ArrowDown"&&d(x),h.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,Gr.useCallback)((0,cb.default)(h=>{l(Co({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Gr.useEffect)(()=>{s&&m(s)},[s]),(0,Gr.useEffect)(()=>()=>{l(Qc())},[]),(0,Wt.jsxs)("div",{className:i.root,children:[(0,Wt.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,w)=>(0,Wt.jsx)(te,{selected:p===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Wt.jsxs)(fe,{children:[(0,Wt.jsx)(fe.Image,{src:Jd(h,"small",g||void 0),title:h.title||h.text}),(0,Wt.jsxs)(fe.Content,{className:i.content,cropText:!0,children:[(0,Wt.jsx)(fe.Title,{children:h.title||Wh(h.text)}),h.title&&Wh(h.text)]}),(0,Wt.jsx)(te.Actions,{children:(0,Wt.jsx)(te.ActionButton,{label:r,onClick:x=>v(x,h.text)})})]})},h.text))}),(0,Wt.jsx)(Ha,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:f})]})},db=qO;var $h={};ze($h,{enUS:()=>YO,nlNL:()=>XO});var YO={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},XO={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var rt=S(b()),QO=(0,ot.forwardRef)((e,t)=>{let n=P("TabCompletion",un);return(0,rt.jsx)("mark",{ref:t,className:(0,ef.default)(n.matchSelection)},"selection-start")}),ZO=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=W($h),s=P("TabCompletion",un),a=(0,ot.useRef)(null),l=(0,ot.useRef)(null),[u,c]=(0,ot.useState)(null),p=Y(),d=Gd(document.activeElement===r),[g]=(0,ot.useState)(()=>document.createRange());d.triggerRef.current=g,(0,ot.useEffect)(()=>()=>g.detach(),[]),(0,ot.useEffect)(()=>{let v=e.current,f=a.current;!v||!f||(g.setStart(v,0),g.setEnd(f,0))},[e.current,a.current]),ts(()=>{d.close()});let y=(0,ot.useCallback)(v=>{let f=g.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;p($c({text:`[${f}](${m})`,replace:"selection"}))},[]);return(0,rt.jsxs)("span",{children:[(0,rt.jsx)("mark",{ref:a,className:(0,ef.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,rt.jsx)(ls,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,rt.jsxs)(Yd,{style:n,ref:l,children:[(0,rt.jsx)("div",{className:(0,ef.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)(lb,{}),(0,rt.jsx)("span",{children:"\xA0"}),(0,rt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,rt.jsx)(db,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},tf=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)(QO,{ref:this.startRef}):(0,rt.jsx)(ZO,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Jn=S(b()),JO=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",un),c=B("insertLink"),p=B("showMidSentenceSuggestions"),d=B("inlineSuggestions"),g=qC(a),y=(0,er.useRef)(null),v=N(tt);(0,er.useEffect)(()=>{Wr(a)&&g&&YC(a,g)},[g]);let f=(0,er.useCallback)(w=>{if(!o||!n)return w;let x=[(0,Jn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Jn.jsx)("span",{"data-testid":"tab-completion",className:(0,nf.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Jn.jsx)("span",{className:(0,nf.default)(u.hint,u.resetIndent),children:(0,Jn.jsx)(Ul,{keyCode:"tab"},"tabHint")})),Hh(w,x)},[o,n,r]),m=(0,er.useMemo)(()=>{let w=[];return c&&w.push(new tf("selection")),w.push(new Zd("placeholders")),i&&w.push(new Xd("keywords")),w},[d,c,i]),h=(0,er.useMemo)(()=>{let w=window.getComputedStyle(a);return{"--dd-color":w.color,"--dd-font-size":w.fontSize,"--dd-font-family":w.fontFamily,"--dd-font-variant":w.fontVariant}},[]);return!e||!v?null:(0,Jn.jsxs)("div",{ref:w=>{w!=null&&w.parentElement&&(y.current=w==null?void 0:w.parentElement)},className:u.root,style:h,children:[(0,Jn.jsx)(Gi,{tagName:"span",containerTagName:"div",className:(0,nf.default)(u.container,u.agentText),disableLineBreaks:Wr(a),content:t||"\u200B",onAfterParse:f,matchers:m,selection:g,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!p}),(0,Jn.jsx)("br",{})]})},eM=({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??qi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:g,showStyleSuggestions:y}=n;return{showTabHint:c,showStyleSuggestions:y,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((v=r.list)==null?void 0:v.keywordMatches)??[],enabled:g&&p!==!1}},fb=jn(eM)(JO);var bT=S(ee()),ff=S(_());var pb={list:[],fetchState:"idle"},gb=e=>e.autoflows.list||[],mb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},tr=U("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gh=U("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))}),qh=U("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))}),tM=q({name:"autoflows",initialState:pb,reducers:{},extraReducers:e=>{e.addCase(Gh.pending,(t,n)=>{let r=mb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(qh.pending,(t,n)=>{let r=mb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(tr.pending,t=>{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(le,()=>pb)}}),hb=U("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))})}),yb=U("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),vb=tM.reducer;var Sb={list:[],fetchState:"idle",sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},wb=e=>e.customMessages.list,xb=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),Eb=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),Cb=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),il=U("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),rf=U("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)}),of=U("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)}),bb=q({name:"customMessages",initialState:Sb,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(il.pending,t=>{t.fetchState="loading"}).addCase(il.rejected,t=>{t.fetchState="error"}).addCase(il.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(rf.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(rf.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(of.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(of.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(le,()=>Sb)}}),Tb=U("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(bb.actions.onCustomMessage(i))})}),kb=U("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Pb=bb.reducer;var nM={token:null,accountUrl:null,interval:null},Rb=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},Yh=U("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),Xh=U("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Yh()),setInterval(()=>r(Yh()),n)}),Ab=q({name:"passwordlessToken",initialState:nM,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Yh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(Xh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:Lb}=Ab.actions,Ib=Ab.reducer;var Qh={cues:[],fetchState:"idle"},Nb=e=>{var t;return(t=e.rules)==null?void 0:t.cues},rM=we("rules/resetCues"),jo=U("rules/evaluate",async(e,t)=>{var n,r;try{let{deepdeskAPI:o}=t.extra,i=t.getState(),s=(n=i.conversation.current)==null?void 0:n.id;if(!s)throw new Error("No current conversation to evaluate rules");if(!(await o.getAccount()).ruleEngine)throw new Error("Rule engine is not enabled for this account");if(!(await o.getRules()).some(c=>c.label===e.label))throw new Error(`No rules found with label: ${e.label}`);return await o.evaluateRule(e.label,s,{tags:((r=i.conversation.current)==null?void 0:r.tags)||void 0,...e.params})}catch(o){return j.info(o.message),[]}}),Ob=q({name:"answer",initialState:Qh,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.rule.id!==t.payload.id)}},extraReducers:e=>{e.addCase(jo.pending,t=>{t.fetchState="loading"}).addCase(jo.rejected,t=>{t.fetchState="error"}).addCase(jo.fulfilled,(t,n)=>{let r=n.payload.map(i=>i.rule.id),o=t.cues.filter(i=>!r.includes(i.rule.id));t.fetchState="done",t.cues=[...n.payload,...o]}).addCase(le,()=>Qh).addCase(rM.toString(),()=>Qh)}}),{removeCue:Mb}=Ob.actions,_b=Ob.reducer;var Kb=S(_());var jb=S(ee()),zb=S(_());var Fb=S(ee());var Db={root:"Ji"};var Ub=S(b()),iM=({className:e,children:t})=>{let n=P("Unicode",Db);return(0,Ub.jsx)("span",{className:(0,Fb.default)(e,n.root),children:t})},Hb=iM;var Bb={isDisabled:"Ki",buttonStart:"Pi",root:"Qi",buttonStop:"uo",stateBadge:"h",isCompleted:"Vi",isStarted:"Wi",isAborted:"Zi"};var Zh={};ze(Zh,{enUS:()=>aM,nlNL:()=>lM});var aM={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"}]},lM={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 bt=S(b()),cM=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",Bb),a=W(Zh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,bt.jsxs)(te,{className:(0,jb.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,bt.jsx)(fe,{children:(0,bt.jsxs)(fe.Content,{children:[(0,bt.jsxs)(fe.Title,{children:[t&&(0,bt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,bt.jsx)("span",{children:r})]})}),(0,bt.jsx)(te.Actions,{fixed:t==="Started",children:(0,bt.jsx)(te.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,bt.jsxs)(zb.Fragment,{children:[(0,bt.jsx)(Hb,{children:u})," ",(0,bt.jsx)("span",{children:a(l)})]})})})]})},Vb=cM;var Jh=S(b()),dM=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},fM=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jh.jsx)(Kb.Fragment,{children:e.map(o=>(0,Jh.jsx)(Vb,{displayName:o.displayName,description:o.description,disabled:o.isBusy||dM(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),pM=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},mM={onStartAutoflow:Gh,onStopAutoflow:qh},Wb=jn(pM,mM)(fM);var $b=S(ee()),ey=S(_());var nr={root:"yo",title:"wo",isUsed:"_i",quickReplies:"or",quickReply:"er",hasError:"ir",label:"rr",errorIcon:"tr"};var gt=S(b()),hM=({suggestion:e})=>{let t=W(Oo),n=Y(),r=N(xb(e.text)),o=N(Eb(e.text)),i=N(Cb(e.text)),s=N(Vi),{replyOptions:a}=e,l=(0,ey.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(rf({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,ey.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(of({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,gt.jsxs)(te,{onClick:l,className:(0,$b.default)(nr.root,{[nr.isUsed]:r,[nr.hasError]:i}),children:[(0,gt.jsx)(fe,{children:(0,gt.jsxs)(fe.Content,{children:[(0,gt.jsxs)(fe.Title,{className:nr.title,children:[e.text," ",(0,gt.jsx)(Bl,{className:nr.label,children:"analyse tool"})," ",i&&(0,gt.jsx)("span",{className:nr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,gt.jsx)("ul",{className:nr.quickReplies,children:a.map(c=>(0,gt.jsx)("li",{className:nr.quickReply,children:c.title},c.title))})]})}),(0,gt.jsxs)(te.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,gt.jsx)(te.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,gt.jsx)(te.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,gt.jsx)(te.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},Gb=hM;var sf=S(_());var ry=S(ee());var ty=S(b()),ny=()=>(0,ty.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,ty.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 qb={root:"nr",entity:"r",entityText:"ar",iconWrapper:"pr",icon:"dr",iconClicked:"lr"};var Tn=S(b()),vM=({entities:e})=>{let t=P("EntitiesWidgetList",qb),[n,r]=(0,sf.useState)(void 0),o=Y(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ko(a.text),o(Xe({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,sf.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,ry.default)(t.icon),children:(0,Tn.jsx)(ny,{})}),(0,Tn.jsx)("span",{className:(0,ry.default)(t.icon,n===l&&t.iconClicked),children:(0,Tn.jsx)(ny,{})})]})]},a.text))})},Yb=vM;var oy=S(b()),Xb=()=>(0,oy.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oy.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 iy=S(b()),Qb=()=>(0,iy.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,iy.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 sy=S(b()),Zb=()=>(0,sy.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,sy.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 hy=S(ee()),df=S(_());var sl=S(b()),Jb=({className:e})=>(0,sl.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,sl.jsx)("line",{x1:"2",y1:"10",x2:"10",y2:"2",stroke:"black",strokeWidth:"1"}),(0,sl.jsx)("line",{x1:"2",y1:"2",x2:"10",y2:"10",stroke:"black",strokeWidth:"1"})]});var{entries:aT,setPrototypeOf:eT,isFrozen:SM,getPrototypeOf:wM,getOwnPropertyDescriptor:xM}=Object,{freeze:it,seal:dn,create:lT}=Object,{apply:fy,construct:py}=typeof Reflect<"u"&&Reflect;it||(it=function(t){return t});dn||(dn=function(t){return t});fy||(fy=function(t,n,r){return t.apply(n,r)});py||(py=function(t,n){return new t(...n)});var af=kt(Array.prototype.forEach),tT=kt(Array.prototype.pop),al=kt(Array.prototype.push),cf=kt(String.prototype.toLowerCase),ay=kt(String.prototype.toString),EM=kt(String.prototype.match),ll=kt(String.prototype.replace),CM=kt(String.prototype.indexOf),bM=kt(String.prototype.trim),cn=kt(Object.prototype.hasOwnProperty),Tt=kt(RegExp.prototype.test),ul=TM(TypeError);function kt(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 fy(e,t,r)}}function TM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return py(e,n)}}function Q(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cf;eT&&eT(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(SM(t)||(t[r]=i),o=i)}e[o]=!0}return e}function kM(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function zo(e){let t=lT(null);for(let[n,r]of aT(e))cn(e,n)&&(Array.isArray(r)?t[n]=kM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=zo(r):t[n]=r);return t}function lf(e,t){for(;e!==null;){let r=xM(e,t);if(r){if(r.get)return kt(r.get);if(typeof r.value=="function")return kt(r.value)}e=wM(e)}function n(){return null}return n}var nT=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"]),ly=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"]),uy=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"]),PM=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"]),cy=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"]),RM=it(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rT=it(["#text"]),oT=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"]),dy=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"]),iT=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"]),uf=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),IM=dn(/\${[\w\W]*}/gm),NM=dn(/^data-[\-\w.\u00B7-\uFFFF]/),OM=dn(/^aria-[\-\w]+$/),uT=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),MM=dn(/^(?:\w+script|data):/i),_M=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),cT=dn(/^html$/i),sT=Object.freeze({__proto__:null,MUSTACHE_EXPR:AM,ERB_EXPR:LM,TMPLIT_EXPR:IM,DATA_ATTR:NM,ARIA_ATTR:OM,IS_ALLOWED_URI:uT,IS_SCRIPT_OR_DATA:MM,ATTR_WHITESPACE:_M,DOCTYPE_NAME:cT}),DM=function(){return typeof window>"u"?null:window},FM=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 dT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DM(),t=H=>dT(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:p,DOMParser:d,trustedTypes:g}=e,y=l.prototype,v=lf(y,"cloneNode"),f=lf(y,"nextSibling"),m=lf(y,"childNodes"),h=lf(y,"parentNode");if(typeof s=="function"){let H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let w,x="",{implementation:T,createNodeIterator:C,createDocumentFragment:k,getElementsByTagName:L}=n,{importNode:I}=r,O={};t.isSupported=typeof aT=="function"&&typeof h=="function"&&T&&T.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:V,ERB_EXPR:K,TMPLIT_EXPR:se,DATA_ATTR:ps,ARIA_ATTR:Rt,IS_SCRIPT_OR_DATA:sr,ATTR_WHITESPACE:At}=sT,{IS_ALLOWED_URI:F}=sT,X=null,ar=Q({},[...nT,...ly,...uy,...cy,...rT]),he=null,lr=Q({},[...oT,...dy,...iT,...uf]),G=Object.seal(lT(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,Cl=null,$o=!0,Xr=!0,ms=!1,bl=!0,qt=!1,Yt=!1,Tl=!1,st=!1,Lt=!1,kl=!1,Pl=!1,Ay=!0,Ly=!1,pk="user-content-",Cf=!0,gs=!1,Go={},qo=null,Iy=Q({},["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"]),Ny=null,Oy=Q({},["audio","video","img","source","image","track"]),bf=null,My=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rl="http://www.w3.org/1998/Math/MathML",Al="http://www.w3.org/2000/svg",Rn="http://www.w3.org/1999/xhtml",Yo=Rn,Tf=!1,kf=null,mk=Q({},[Rl,Al,Rn],ay),hs=null,gk=["application/xhtml+xml","text/html"],hk="text/html",Ie=null,Xo=null,yk=n.createElement("form"),_y=function(E){return E instanceof RegExp||E instanceof Function},Pf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Xo&&Xo===E)){if((!E||typeof E!="object")&&(E={}),E=zo(E),hs=gk.indexOf(E.PARSER_MEDIA_TYPE)===-1?hk:E.PARSER_MEDIA_TYPE,Ie=hs==="application/xhtml+xml"?ay:cf,X=cn(E,"ALLOWED_TAGS")?Q({},E.ALLOWED_TAGS,Ie):ar,he=cn(E,"ALLOWED_ATTR")?Q({},E.ALLOWED_ATTR,Ie):lr,kf=cn(E,"ALLOWED_NAMESPACES")?Q({},E.ALLOWED_NAMESPACES,ay):mk,bf=cn(E,"ADD_URI_SAFE_ATTR")?Q(zo(My),E.ADD_URI_SAFE_ATTR,Ie):My,Ny=cn(E,"ADD_DATA_URI_TAGS")?Q(zo(Oy),E.ADD_DATA_URI_TAGS,Ie):Oy,qo=cn(E,"FORBID_CONTENTS")?Q({},E.FORBID_CONTENTS,Ie):Iy,ur=cn(E,"FORBID_TAGS")?Q({},E.FORBID_TAGS,Ie):{},Cl=cn(E,"FORBID_ATTR")?Q({},E.FORBID_ATTR,Ie):{},Go=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,$o=E.ALLOW_ARIA_ATTR!==!1,Xr=E.ALLOW_DATA_ATTR!==!1,ms=E.ALLOW_UNKNOWN_PROTOCOLS||!1,bl=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Yt=E.WHOLE_DOCUMENT||!1,Lt=E.RETURN_DOM||!1,kl=E.RETURN_DOM_FRAGMENT||!1,Pl=E.RETURN_TRUSTED_TYPE||!1,st=E.FORCE_BODY||!1,Ay=E.SANITIZE_DOM!==!1,Ly=E.SANITIZE_NAMED_PROPS||!1,Cf=E.KEEP_CONTENT!==!1,gs=E.IN_PLACE||!1,F=E.ALLOWED_URI_REGEXP||uT,Yo=E.NAMESPACE||Rn,G=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&_y(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&_y(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(Xr=!1),kl&&(Lt=!0),Go&&(X=Q({},rT),he=[],Go.html===!0&&(Q(X,nT),Q(he,oT)),Go.svg===!0&&(Q(X,ly),Q(he,dy),Q(he,uf)),Go.svgFilters===!0&&(Q(X,uy),Q(he,dy),Q(he,uf)),Go.mathMl===!0&&(Q(X,cy),Q(he,iT),Q(he,uf))),E.ADD_TAGS&&(X===ar&&(X=zo(X)),Q(X,E.ADD_TAGS,Ie)),E.ADD_ATTR&&(he===lr&&(he=zo(he)),Q(he,E.ADD_ATTR,Ie)),E.ADD_URI_SAFE_ATTR&&Q(bf,E.ADD_URI_SAFE_ATTR,Ie),E.FORBID_CONTENTS&&(qo===Iy&&(qo=zo(qo)),Q(qo,E.FORBID_CONTENTS,Ie)),Cf&&(X["#text"]=!0),Yt&&Q(X,["html","head","body"]),X.table&&(Q(X,["tbody"]),delete ur.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw ul('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ul('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=E.TRUSTED_TYPES_POLICY,x=w.createHTML("")}else w===void 0&&(w=FM(g,o)),w!==null&&typeof x=="string"&&(x=w.createHTML(""));it&&it(E),Xo=E}},Dy=Q({},["mi","mo","mn","ms","mtext"]),Fy=Q({},["foreignobject","desc","title","annotation-xml"]),vk=Q({},["title","style","font","a","script"]),Hy=Q({},[...ly,...uy,...PM]),Uy=Q({},[...cy,...RM]),Sk=function(E){let A=h(E);(!A||!A.tagName)&&(A={namespaceURI:Yo,tagName:"template"});let D=cf(E.tagName),ce=cf(A.tagName);return kf[E.namespaceURI]?E.namespaceURI===Al?A.namespaceURI===Rn?D==="svg":A.namespaceURI===Rl?D==="svg"&&(ce==="annotation-xml"||Dy[ce]):!!Hy[D]:E.namespaceURI===Rl?A.namespaceURI===Rn?D==="math":A.namespaceURI===Al?D==="math"&&Fy[ce]:!!Uy[D]:E.namespaceURI===Rn?A.namespaceURI===Al&&!Fy[ce]||A.namespaceURI===Rl&&!Dy[ce]?!1:!Uy[D]&&(vk[D]||!Hy[D]):!!(hs==="application/xhtml+xml"&&kf[E.namespaceURI]):!1},Qr=function(E){al(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},Rf=function(E,A){try{al(t.removed,{attribute:A.getAttributeNode(E),from:A})}catch{al(t.removed,{attribute:null,from:A})}if(A.removeAttribute(E),E==="is"&&!he[E])if(Lt||kl)try{Qr(A)}catch{}else try{A.setAttribute(E,"")}catch{}},By=function(E){let A=null,D=null;if(st)E="<remove></remove>"+E;else{let je=EM(E,/^[\r\n\t ]+/);D=je&&je[0]}hs==="application/xhtml+xml"&&Yo===Rn&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let ce=w?w.createHTML(E):E;if(Yo===Rn)try{A=new d().parseFromString(ce,hs)}catch{}if(!A||!A.documentElement){A=T.createDocument(Yo,"template",null);try{A.documentElement.innerHTML=Tf?x:ce}catch{}}let Be=A.body||A.documentElement;return E&&D&&Be.insertBefore(n.createTextNode(D),Be.childNodes[0]||null),Yo===Rn?L.call(A,Yt?"html":"body")[0]:Yt?A.documentElement:Be},jy=function(E){return C.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},wk=function(E){return E instanceof p&&(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")},zy=function(E){return typeof a=="function"&&E instanceof a},An=function(E,A,D){O[E]&&af(O[E],ce=>{ce.call(t,A,D,Xo)})},Vy=function(E){let A=null;if(An("beforeSanitizeElements",E,null),wk(E))return Qr(E),!0;let D=Ie(E.nodeName);if(An("uponSanitizeElement",E,{tagName:D,allowedTags:X}),E.hasChildNodes()&&!zy(E.firstElementChild)&&Tt(/<[/\w]/g,E.innerHTML)&&Tt(/<[/\w]/g,E.textContent))return Qr(E),!0;if(!X[D]||ur[D]){if(!ur[D]&&Wy(D)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,D)||G.tagNameCheck instanceof Function&&G.tagNameCheck(D)))return!1;if(Cf&&!qo[D]){let ce=h(E)||E.parentNode,Be=m(E)||E.childNodes;if(Be&&ce){let je=Be.length;for(let at=je-1;at>=0;--at)ce.insertBefore(v(Be[at],!0),f(E))}}return Qr(E),!0}return E instanceof l&&!Sk(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Tt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Qr(E),!0):(qt&&E.nodeType===3&&(A=E.textContent,af([V,K,se],ce=>{A=ll(A,ce," ")}),E.textContent!==A&&(al(t.removed,{element:E.cloneNode()}),E.textContent=A)),An("afterSanitizeElements",E,null),!1)},Ky=function(E,A,D){if(Ay&&(A==="id"||A==="name")&&(D in n||D in yk))return!1;if(!(Xr&&!Cl[A]&&Tt(ps,A))){if(!($o&&Tt(Rt,A))){if(!he[A]||Cl[A]){if(!(Wy(E)&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,E)||G.tagNameCheck instanceof Function&&G.tagNameCheck(E))&&(G.attributeNameCheck instanceof RegExp&&Tt(G.attributeNameCheck,A)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(A))||A==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Tt(G.tagNameCheck,D)||G.tagNameCheck instanceof Function&&G.tagNameCheck(D))))return!1}else if(!bf[A]){if(!Tt(F,ll(D,At,""))){if(!((A==="src"||A==="xlink:href"||A==="href")&&E!=="script"&&CM(D,"data:")===0&&Ny[E])){if(!(ms&&!Tt(sr,ll(D,At,"")))){if(D)return!1}}}}}}return!0},Wy=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},$y=function(E){An("beforeSanitizeAttributes",E,null);let{attributes:A}=E;if(!A)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he},ce=A.length;for(;ce--;){let Be=A[ce],{name:je,namespaceURI:at,value:Zr}=Be,ys=Ie(je),lt=je==="value"?Zr:bM(Zr);if(D.attrName=ys,D.attrValue=lt,D.keepAttr=!0,D.forceKeepAttr=void 0,An("uponSanitizeAttribute",E,D),lt=D.attrValue,D.forceKeepAttr||(Rf(je,E),!D.keepAttr))continue;if(!bl&&Tt(/\/>/i,lt)){Rf(je,E);continue}qt&&af([V,K,se],qy=>{lt=ll(lt,qy," ")});let Gy=Ie(E.nodeName);if(Ky(Gy,ys,lt)){if(Ly&&(ys==="id"||ys==="name")&&(Rf(je,E),lt=pk+lt),w&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!at)switch(g.getAttributeType(Gy,ys)){case"TrustedHTML":{lt=w.createHTML(lt);break}case"TrustedScriptURL":{lt=w.createScriptURL(lt);break}}try{at?E.setAttributeNS(at,je,lt):E.setAttribute(je,lt),tT(t.removed)}catch{}}}An("afterSanitizeAttributes",E,null)},xk=function H(E){let A=null,D=jy(E);for(An("beforeSanitizeShadowDOM",E,null);A=D.nextNode();)An("uponSanitizeShadowNode",A,null),!Vy(A)&&(A.content instanceof i&&H(A.content),$y(A));An("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(H){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=null,D=null,ce=null,Be=null;if(Tf=!H,Tf&&(H="<!-->"),typeof H!="string"&&!zy(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw ul("dirty is not a string, aborting")}else throw ul("toString is not a function");if(!t.isSupported)return H;if(Tl||Pf(E),t.removed=[],typeof H=="string"&&(gs=!1),gs){if(H.nodeName){let Zr=Ie(H.nodeName);if(!X[Zr]||ur[Zr])throw ul("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)A=By("<!---->"),D=A.ownerDocument.importNode(H,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?A=D:A.appendChild(D);else{if(!Lt&&!qt&&!Yt&&H.indexOf("<")===-1)return w&&Pl?w.createHTML(H):H;if(A=By(H),!A)return Lt?null:Pl?x:""}A&&st&&Qr(A.firstChild);let je=jy(gs?H:A);for(;ce=je.nextNode();)Vy(ce)||(ce.content instanceof i&&xk(ce.content),$y(ce));if(gs)return H;if(Lt){if(kl)for(Be=k.call(A.ownerDocument);A.firstChild;)Be.appendChild(A.firstChild);else Be=A;return(he.shadowroot||he.shadowrootmode)&&(Be=I.call(r,Be,!0)),Be}let at=Yt?A.outerHTML:A.innerHTML;return Yt&&X["!doctype"]&&A.ownerDocument&&A.ownerDocument.doctype&&A.ownerDocument.doctype.name&&Tt(cT,A.ownerDocument.doctype.name)&&(at="<!DOCTYPE "+A.ownerDocument.doctype.name+`>
|
|
24
|
+
`+at),qt&&af([V,K,se],Zr=>{at=ll(at,Zr," ")}),w&&Pl?w.createHTML(at):at},t.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pf(H),Tl=!0},t.clearConfig=function(){Xo=null,Tl=!1},t.isValidAttribute=function(H,E,A){Xo||Pf({});let D=Ie(H),ce=Ie(E);return Ky(D,ce,A)},t.addHook=function(H,E){typeof E=="function"&&(O[H]=O[H]||[],al(O[H],E))},t.removeHook=function(H){if(O[H])return tT(O[H])},t.removeHooks=function(H){O[H]&&(O[H]=[])},t.removeAllHooks=function(){O={}},t}var fT=dT();var qr=S(_());var HM={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function pT(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function cl(e){return(e+"").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function dl(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||{},p=0;function d(y){var v=HM[y[1]||""],f=l[l.length-1]==y;return v?v[1]?(f?l.pop():l.push(y),v[0|f]):v[0]:y}function g(){for(var y="";l.length;)y+=d(l[l.length-1]);return y}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(y,v,f){return c[v.toLowerCase()]=f,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(p,o.index),p=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()+'"':"")+">"+pT(cl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=dl(pT(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="'+cl(o[8])+'" alt="'+cl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+cl(o[11]||c[r.toLowerCase()])+'">'),n=g()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+dl(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+cl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(p)+g()).replace(/^\n+|\n+$/g,"")}var mT={fadeup:"N",root:"i",popover:"sr",options:"vo",copyIcon:"A",option:"ko",divider:"cr"};var rr=S(b());function BM(e){return`<button type="button" class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><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></button>`}function my(e){let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(n=>n.remove()),t.textContent??""}function jM(e){return e.replace(/\r\n/g,`
|
|
25
|
+
`)}var zM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=P("Markdown",mT),s=(0,qr.useRef)(null),[a,l]=(0,qr.useState)(null),u=(0,qr.useMemo)(()=>{let y=dl(jM(e));return fT.sanitize(y).replace(/<\/code>/g,`${BM(i.copyIcon)}</code>`)},[e]),c=y=>{var m;let v=y.target,f=!!((m=s.current)!=null&&m.querySelector("code"));a||f&&v.tagName!=="CODE"||!f&&v!==s.current||(v.addEventListener("mouseleave",()=>l(null),{once:!0}),l(v))},p=()=>{if(!a)return;l(null);let y=a.querySelector("button");y&&(Yn(y,i.fadeup),r(my(a)))},d=y=>{y.target.tagName.toLowerCase()==="button"&&(Yn(y.target,i.fadeup),r(my(y.target.parentElement)))},g=()=>{a&&(l(null),o(my(a)))};return(0,rr.jsxs)(qr.Fragment,{children:[a&&(0,rr.jsx)(ls,{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:p,children:n}),(0,rr.jsx)("div",{className:i.divider}),(0,rr.jsx)("button",{type:"button",className:i.option,onClick:g,children:t})]})}),(0,rr.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:u},onMouseOver:c,onClick:d})]})},gT=zM;var gy={};ze(gy,{enUS:()=>VM,nlNL:()=>KM});var VM={useCue:[{type:0,value:"Use"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},KM={useCue:[{type:0,value:"Gebruik"}],copyCue:[{type:0,value:"Kopieer"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var hT={fadeup:"F",fadedown:"H",selected:"zo",thumbsUp:"xr",thumbsDown:"fr"};var Pt=S(b()),$M=({cue:e,onRemove:t,onCopy:n,onUse:r,onThumbsUp:o,onThumbsDown:i})=>{let s=P("WidgetCue",hT),a=W(gy),l=Zi(),[u,c]=(0,df.useState)(null),p=f=>{n&&n(f,e)},d=f=>{r&&r(f,e)},g=f=>{f.preventDefault(),f.stopPropagation(),t(e)},y=f=>{f.preventDefault(),f.stopPropagation(),Yn(f.target,s.fadeup),c("up"),o(e)},v=f=>{f.preventDefault(),f.stopPropagation(),Yn(f.target,s.fadedown),c("down"),i(e)};return(0,df.useEffect)(()=>{l("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label})},[]),(0,Pt.jsxs)(te,{"data-testid":"cue",children:[(0,Pt.jsx)(fe,{children:(0,Pt.jsxs)(fe.Content,{children:[e.title&&(0,Pt.jsx)(fe.Title,{"data-testid":"widget-cue-title",children:e.title}),(0,Pt.jsx)(gT,{content:e.text,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:p,onUse:d})]})}),(0,Pt.jsx)(te.IconButton,{title:a("thumbsUp"),onClick:y,icon:(0,Pt.jsx)(Ld,{}),className:(0,hy.default)(s.thumbsUp,u==="up"&&s.selected),disabled:!!u}),(0,Pt.jsx)(te.IconButton,{title:a("thumbsDown"),onClick:v,icon:(0,Pt.jsx)(Ad,{}),className:(0,hy.default)(s.thumbsDown,u==="down"&&s.selected),disabled:!!u}),(0,Pt.jsx)(te.IconButton,{title:a("removeCue"),onClick:g,icon:(0,Pt.jsx)(Jb,{})})]})},yT=$M;var fl=S(b()),GM=({cues:e})=>{let t=Y(),n=zt(),r=Zi(),o=u=>{t(Mb({id:u.rule.id})),r("Assistant response closed",{name:u.rule.name,group:u.rule.label,description:u.rule.description})},i=(u,c)=>{ko(u),r("Assistant response copied",{name:c.rule.name,group:c.rule.label,description:c.rule.description,copiedText:u})},s=(u,c)=>{n.send(Hr,{text:u,suggestion:{source:"cue",sourceText:u}}),r("Assistant response used",{name:c.rule.name,group:c.rule.label,description:c.rule.description,usedText:u})},a=u=>{r("Assistant response feedback",{name:u.rule.name,group:u.rule.label,description:u.rule.description,thumb:"up"})},l=u=>{r("Assistant response feedback",{name:u.rule.name,group:u.rule.label,description:u.rule.description,thumb:"down"})};return(0,fl.jsx)(fl.Fragment,{children:e.map(u=>(0,fl.jsx)(yT,{cue:u,onRemove:o,onCopy:i,onUse:s,onThumbsDown:l,onThumbsUp:a},u.rule.id))})},vT=GM;var wT=S(_());var qM=/(https?:\/\/[^\s]+)/,ST=e=>e.split(" ").find(t=>qM.test(t));var $t=S(b()),YM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=ST(r),i=W(Oo),s=B("showImages"),a=B("fallbackImage"),l=p=>{p.preventDefault(),p.stopPropagation(),n(r)},u=(0,wT.useCallback)(p=>{window.open(o,"_blank"),p.stopPropagation(),p.preventDefault()},[o]);return(0,$t.jsxs)(te,{onClick:l,"data-testid":"edit-suggestion",children:[(0,$t.jsxs)(fe,{children:[s&&e.image&&(0,$t.jsx)(fe.Image,{src:Jd(e,"small",a||void 0),title:e.title}),(0,$t.jsxs)(fe.Content,{children:[e.title&&(0,$t.jsx)(fe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,$t.jsx)(te.Labels,{labels:e.searchKeywords}),(0,$t.jsx)(fe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$t.jsxs)(te.Actions,{children:[o&&(0,$t.jsx)(te.ActionButton,{onClick:u,label:i("visitUrl")}),(0,$t.jsx)(te.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},xT=YM;var pl=S(b()),XM=({lines:e,suggestions:t})=>{let n=zt(),r=(o,i)=>{n.send(Hr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,pl.jsx)(pl.Fragment,{children:t.map(o=>(0,pl.jsx)(xT,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},ET=XM;var ml={};ze(ml,{enUS:()=>QM,nlNL:()=>ZM});var QM={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"}]},ZM={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 gl={root:"gr",loginText:"br",stateText:"jo",sectionList:"hr",shortcutList:"mr",shortcut:"ur",link:"Yo"};var $=S(b()),pf=(e,t)=>{let n=N(tt);(0,ff.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},e2=({onLogIn:e})=>{let t=P("Widget",gl),n=B("isEmbedded"),r=B("adminUrl");return(0,$.jsx)("div",{className:t.loginText,children:(0,$.jsx)("div",{children:(0,$.jsx)(Bd,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},CT=({text:e})=>{let t=P("Widget",gl);return(0,$.jsx)("div",{className:t.stateText,children:(0,$.jsx)("div",{children:(0,$.jsx)("p",{children:e})})},"notification")},t2=()=>{let e=W(ml),t=Y(),n=P("Widget",gl),r=B("showSearch"),o=B("showSummaryCommand"),i=B("showKnowledgeSearch"),s=N(Rb("/admin/")),a=zt(),l=B("productName"),u=r||o||i||s;return pf(()=>(t(Xh()),()=>{t(Lb())}),[t]),u?(0,$.jsx)(In,{title:e("actions"),type:"shortcuts",children:(0,$.jsxs)("div",{className:n.shortcutList,children:[r&&(0,$.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-search",title:e("linkSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0}),children:[(0,$.jsx)(Yi,{}),e("linkSearch")]}),o&&(0,$.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-summary",title:e("linkSummary"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,$.jsx)(Zb,{}),e("linkSummary")]}),i&&(0,$.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-knowledge-assist",title:e("linkKnowledgeSearch"),onClick:()=>a.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,$.jsx)(Qb,{}),e("linkKnowledgeSearch")]}),s&&(0,$.jsxs)("a",{className:n.shortcut,target:"_blank",href:s,"data-testid":"shortcut-studio-login",title:e("linkStudioLogin",{productName:l}),rel:"noreferrer",children:[(0,$.jsx)(Xb,{}),e("linkStudioLogin",{productName:l})]})]})}):null},n2=()=>{let e=Y(),t=B("showCustomMessages"),n=N(wb),r=N(Vi);return pf(()=>(e(il(r)),e(Tb(r)),()=>{e(kb(r))}),[e,t,r]),!t||n.length===0?null:(0,$.jsx)(In,{type:"custom-messages","data-testid":"custom-messages",children:(0,$.jsx)(ht,{withDivider:!0,children:n.map(o=>(0,$.jsx)(Gb,{suggestion:o},o.text))})})},r2=()=>{let e=W(ml),t=Y(),n=B("showAutoflows"),r=N(gb),o=N(Vi);return pf(()=>(t(tr(o)),t(hb(o)),()=>{t(yb(o))}),[t,n,o]),!n||r.length===0?null:(0,$.jsx)(In,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,$.jsx)(ht,{withDivider:!0,children:(0,$.jsx)(Wb,{})})})},o2=()=>{let e=Y(),t=N(Nd),n=N(Nb),r=N(Rd),o=N(Od),i=N(Xn),s=N(Bc);return pf(()=>{t.forEach(({type:a})=>{a==="entities"?e(sn()):["cues"].includes(a)||e(ln(a))})},[e,s,i]),(0,$.jsx)(ff.Fragment,{children:t.map(({type:a,title:l,amount:u,lines:c})=>{var p,d;switch(a){case"entities":return r&&r.length>0&&(0,$.jsx)(In,{type:a,title:l,"data-testid":`type-${a}`,children:(0,$.jsx)(Yb,{entities:r})},a);case"cues":return n&&n.length>0&&(0,$.jsx)(In,{type:a,title:l,"data-testid":`type-${a}`,children:(0,$.jsx)(ht,{withDivider:!0,children:(0,$.jsx)(vT,{cues:n})})},a);default:return((d=(p=o[a])==null?void 0:p.suggestions)==null?void 0:d.length)>0&&(0,$.jsx)(In,{type:a,title:l,"data-testid":`type-${a}`,children:(0,$.jsx)(ht,{withDivider:!0,children:(0,$.jsx)(ET,{lines:c,contentType:a,suggestions:o[a].suggestions.slice(0,u)||[]})})},a)}})})},i2=({onLogIn:e})=>{let t=W(ml),n=P("Widget",gl),r=N(Ki),o=N(tt),i=N(Vi),s=N(Xn);return r===!1?(0,$.jsx)(CT,{text:t("notSupported")}):o===!1?(0,$.jsx)(e2,{onLogIn:e}):!s||!i||o===null?(0,$.jsx)(CT,{text:t("waiting")}):(0,$.jsx)("div",{className:(0,bT.default)(n.root),"data-testid":"widget",children:(0,$.jsxs)(jl,{className:n.sectionList,children:[(0,$.jsx)(t2,{}),(0,$.jsx)(n2,{}),(0,$.jsx)(r2,{}),(0,$.jsx)(o2,{})]})})},TT=i2;function us(e){let t=new Range;return t.selectNodeContents(e),t}function kT(e,t,n){try{return Yr(e,t,n),!0}catch{return!1}}function mf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function gf(e){return"tagName"in e&&e.tagName==="BR"}var hl=/[\u200B-\u200D\uFEFF]/g;function Yr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(hl,""),p=o+c.length,d=t>=o&&t<=p,g=n>=o&&n<=p;if(d){let y=s(u,t-o);y===0&&!g?r.setStartBefore(l):r.setStart(l,y)}g&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(gf(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;mf(l)&&u&&!mf(u)&&!gf(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function yl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,g=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let y=p.textContent;d&&(a=u+y.substring(0,r).replace(hl,"").length),g&&(l=u+y.substring(0,i).replace(hl,"").length),u+=y.replace(hl,"").length;break}case Node.ELEMENT_NODE:{let y=p.nextSibling===null;gf(p)&&!y&&u++;for(let v=0;v<p.childNodes.length;v++){let f=d&&v===r,m=g&&v===i;if(f&&(a=u),m&&(l=u),l!==void 0||((!f||!s)&&c(p.childNodes[v]),g&&v===i-1&&(l=u),l!==void 0))break}!g&&mf(p)&&!y&&u++,g&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function vl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,g=p?i:void 0,y=u.textContent.replace(hl,"");d===0&&g===void 0?a+=y:a+=y.substring(d,g);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&gf(u)&&!d&&(a+=`
|
|
26
|
+
`);for(let g=c?r:0;g<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[g]),s!==1);g++);!p&&s===0&&mf(u)&&!d&&(a+=`
|
|
27
|
+
`);break}default:break}p&&s++}return l(e),a}var PT=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(PT||{}),or=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(PT).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(t={shouldObserve:!0}){this.addEventListener("keydown",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t!=null&&t.shouldObserve&&n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.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 RT(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Vo=class extends or{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),vl(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!RT(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!RT(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return yl(this.element,t);let n=this.lastKnownSelection;if(n&&kT(this.element,n.start,n.end))return n;let r=us(this.element);return r.collapse(!1),yl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return vl(this.element,Yr(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(t={shouldObserve:!0}){super.listen(t),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),t!=null&&t.shouldObserve&&this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let n=this.element.isContentEditable,r=new MutationObserver(()=>{this.element.isContentEditable!==n&&(n=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>r.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Ko=class extends or{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 AT(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 s2(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var yy=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()}},vy=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=AT(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()}},Sy=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(),j.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 vy(t,this.deepdeskUrl,{debug:!0}):new yy(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=s2(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(j.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;j.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)}},LT=Sy;var cs=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var wy=e=>new Promise(t=>{setTimeout(t,e)});var ds=class extends cs{name="ClientError"},Ey=class extends cs{name="ServerError"},xy=new Map;function a2(e){return e.status===204||["0",null].includes(e.headers.get("content-length"))}var 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:p=1,retryDelay:d=500,refreshTokenOn401:g=!0,retryOnError:y=C=>C instanceof TypeError,retryOnResponse:v=C=>C.status>=500,version:f="v1",...m}=n;if(u)if(l){if(xy.has(s)){r(xy.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 f=="string"&&(h.headers={...h.headers,"X-Deepdesk-API-Version":f});let w=p,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()=>(w--,a(s,h).then(async C=>v(C)&&!i.isAborted&&w>0?(await wy(d),T()):C.status===401&&g===!0&&x===!1?(x=!0,await this.refreshToken(),T()):C).catch(async C=>{if(y(C)&&!i.isAborted&&w>0)return await wy(d),T();throw C}));T().then(async C=>{let k=await C.json().catch(L=>{if(a2(C))return null;throw L});if(delete this.latestRequestByUrl[s],C.status>=500){o(new Ey("Server Error",k));return}else if(C.status===401){o(new ds("Unauthorized",k));return}else if(C.status===403){o(new ds("Forbidden",k));return}else if(C.status===404){o(new ds("Not Found",k));return}else if(C.status>=400){o(new ds("Bad Request",k));return}u&&xy.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 l2;(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||={})})(l2||={});function hf(e){return{...J(e),tags:e.tags}}var ir=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(),j.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Re(t),tags:t.tags},{version:"v2"});return hf(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=await this.client.get("/apis/admin/account/",{version:null,useCache:!0});return J(t)}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(),j.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 j.info(`Successfully retrieved conversation ${i.id} for session ${t}`),hf(i)}async isConversationSupported(t,n={}){j.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=Re(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return hf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Re(o),tags:o.tags})),{version:"v2"})).map(o=>hf(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",Re({...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:Re({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){let r=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});return J(r)}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 j.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Re(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}`,Re(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`,Re(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",Re(t),{abortLatest:!0});return J(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Re(t),{version:"v2"});return J(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Re({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,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",Re(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&&j.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Sl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Vg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,J(o))}catch{j.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 u2;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(u2||={});var wl=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=j;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`,Re(n));return J(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Re(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",Re(t));return J(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Sl(`${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 IT={startTime:null,stopTime:null},NT=q({name:"handlingTime",initialState:IT,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(le,()=>IT)}}),{handlingTimeStart:OT,handlingTimeStop:yf,handlingTimeReset:MT}=NT.actions,_T=NT.reducer;var DT=(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 vf={list:{keywordMatches:[]},fetchState:"idle"};var Wo=U("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 vf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),c2=q({name:"styleSuggestions",initialState:vf,reducers:{},extraReducers:e=>{e.addCase(Wo.pending,t=>{t.fetchState="loading"}).addCase(Wo.rejected,t=>{t.fetchState="error"}).addCase(Wo.fulfilled,(t,n)=>{t.fetchState="done",_r(t.list,n.payload)||(t.list=n.payload)}).addCase(Eo,t=>{t.list=vf.list}).addCase(le,()=>vf)}}),FT=c2.reducer;var HT=(e={})=>{let t,n=!0,r={getStyleSuggestions:Wo,debounce:500,...e};return o=>i=>s=>{var g;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((g=u.conversation.current)==null?void 0:g.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function d2(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var UT=(e={})=>{let t={getTextSuggestions:ln,getAutocompleteSuggestions:Ja,debounce:200,check:ns,...e},n;return r=>o=>i=>{var v;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,p=(v=l.conversation.current)==null?void 0:v.id,d=i.type===Md.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:g}}=l;return d2(g,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let f=Wi(l);f===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(f))},d?0:t.debounce)),a}};var BT=Wo.fulfilled.toString();function f2(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 jT=e=>t=>n=>r=>{var u;if(r.type!==BT){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=f2(o,s);r.type===BT&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var p2=uc({answer:rC,auth:s1,autoflows:vb,conversation:g1,contentTypes:fE,customMessages:Pb,passwordlessToken:Ib,entities:UE,knowledgeAssistant:eC,handlingTime:_T,info:M1,input:L1,settings:Jx,profile:sC,search:j1,summary:$E,styleSuggestions:FT,ui:IC,rules:_b,textSuggestions:mC});function zT(e){return ix({reducer:p2,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),DT(),UT({debounce:200}),HT({debounce:500}),jT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var m2=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},g2=e=>t=>n=>r=>{var a;let o=t.getState(),i=Dg("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 Xe.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 Gc.toString():e.handleKeyDown(r.payload);break;case Eo.toString():e.logSendMessage(r.payload);break;case qc.toString():e.handleInputChanged(r.payload);break;case jo.fulfilled.toString():r.isBroadcasted||e.broadcast($g,r,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case Eo.toString():e.handleAfterSendMessage(r.payload);break;case tl.toString():e.onUpdateShowTabHint(r.payload);break;case yf.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case En.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:m2(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0}),i&&(t.dispatch(xn([])),t.dispatch(Kn()));break}case $c.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case Aa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Yc.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 xn.toString():{i&&r.payload.length>0&&t.dispatch(Fr(0));break}case qn.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary,model:t.getState().summary.model}});break}default:break}return s},VT=g2;function Cy(e){return e.toISOString().replace("T"," ").replace("Z","")}function KT(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:Cy(n),timeStop:Cy(r)}}function WT(e,t,n){var k,L,I;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:g,textSuggestions:y,offeredTextSuggestions:v}}=t[e],f=r.length,h=y.reduce((O,{text:V,searchTerm:K})=>O+V.length-(K?K.length:0),0),w=u??Date.now(),x=(Date.now()-w)/1e3+(c||0),T=o/x,C=y.reduce((O,{searchTerm:V})=>O+(V?V.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:g,lenTextTyped:o+C,lenTextTotal:f,lenTextAssisted:h,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:x,charsPerSecond:T,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(O=>O.source==="gpt").length}],agentId:(k=t.info.agentInfo)==null?void 0:k.agentId,agentName:(L=t.info.agentInfo)==null?void 0:L.agentName,agentEmail:(I=t.info.agentInfo)==null?void 0:I.agentEmail}}function by(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return by(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?by(o,t):null}function $T(e,t){return by(e,t)}function GT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function h2(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Sf(e){return h2(e)&&(Wr(e)||zd(e))}var qT,kn=new Map,y2=["bottom","height","left","right","top","width"],v2=(e={},t={})=>y2.some(n=>e[n]!==t[n]);function YT(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,...YT(t)]:[]}function XT(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var wf=!1,QT=()=>{wf=!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();v2(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(XT,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),kn.size===0){wf=!1;return}qT=window.requestAnimationFrame(QT)};function Ty(e,t){let n=YT(e),r=[],o=n.map((i,s)=>Ty(i,a=>{r[s]=a;let l=kn.get(e);if(!l)return;let u=r.reduce(XT,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&&!wf&&QT()},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(qT),wf=!1)}}}}var ZT,Pn=new Map,JT=()=>{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&&(ZT=window.requestAnimationFrame(JT))};function ek(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&&JT()},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(ZT)}}}}var ky=["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 Py(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function fs(e){return parseFloat(e)}function xf(e){return Math.round(e*1e6)}function tk(e){return e/1e6}function Ry(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=fs(e.width),i=fs(e.borderLeftWidth),s=fs(e.borderRightWidth),a=fs(e.paddingRight),l=tk(xf(o)-xf(i)-xf(s)),u=tk(xf(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function xl(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};Py(r,n,ky),Ry(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=ek(e,()=>{Py(r,n,ky),Ry(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=Ty(e,p=>{if(p===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),p.height===0&&p.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(Py(r,n,ky),Ry(r,e,n),i(),n.style.top=`${p.top}px`,n.style.left=`${p.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),g=window.getComputedStyle(t.closestScrollElement),y=fs(g.borderTopWidth),v=fs(g.borderBottomWidth),f=d.top+y-p.top,m=p.top+p.height+-(d.top+d.height-v);n.style.clipPath=`inset(${f}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 nk=(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{j.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function S2(e){return e.offsetParent!==null}function rk(e){if(!S2(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 Ef(e,t,n=100){let r=rk(e);t({isVisible:r});let o=setInterval(()=>{let i=rk(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Le=S(b());var ok=nk("showTabHint",!0),El=class e{static version="11.3.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 ir(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[VT({broadcast:(p,d,g)=>{this.broadcastEvents.send(p,d,g)},emit:(p,d,g)=>this.emit(p,d,g),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),onUpdateShowTabHint:p=>ok.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new wl(n)}),this.store=zT(c),this.broadcastEvents=new LT({debug:!0,deepdeskUrl:u,eventMap:z1(this.store),createCustomChannel:l}),this.store.dispatch(tl(ok.value())),this.store.dispatch(Hc({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?(j.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(j.warn("Profile has not been loaded (yet)"),!0):(j.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(zi(null)),this.store.dispatch(zn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();tt(r)&&e1(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(zn())).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){j.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Bg({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(jc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(zc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(jg(t))).payload}async postMessages(t){return(await this.store.dispatch(Kc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Vc(t))).payload}resetConversation(){this.store.dispatch(le()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(qn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Hc(t))}setVisitorInfo(t){this.store.dispatch(O1(t))}async setAgentInfo(t){await this.store.dispatch(La(t))}async setAgentSettings(t){await this.store.dispatch(Kg(t))}async getAgentSettings(){return(await this.store.dispatch(Wg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Md()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(qc(t))}notifyKeyDown(t){this.store.dispatch(Gc(t))}notifyPaste(t,n){this.store.dispatch(k1({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(b1(t))}notifyExternalSuggestion(t){this.store.dispatch(En(t)),this.store.dispatch(Kn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch(jo({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(Vr({collapse:!1})),this.inputMediator&&this.store.dispatch(S1({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(xn([])))}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(T1(h1(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(x1()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(C1()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(Aa()):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(Aa()),t.preventDefault()):n||(this.store.dispatch(Vr({collapse:!0})),this.store.dispatch(AC(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:g}=this.state.input;this.store.dispatch(tl(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&g&&g.text.startsWith(d)&&(this.store.dispatch(En({text:g.text,suggestion:g,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(P1()),this.store.dispatch(xn([]))}handlingTimeStart(){this.state.handlingTime.startTime||(j.info("Start handling time"),this.store.dispatch(OT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(j.info("Stop handling time"),this.store.dispatch(yf()))}logSendMessage(t){let n=WT("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=KT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(MT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Kn()),this.store.dispatch(Eo(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(En({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){j.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),j.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]=xl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Gt.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]=xl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Gt.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,Gt.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),j.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()?(j.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(A1(r.metrics))):j.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(!Sf(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:p,detectSubmit:d,insertLink:g,inputMediator:y,closestScrollSelector:v,appendOverlayTo:f,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:g,isEmbedded:p,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),Ho(t),this.inputMediator=y||(Wr(t)?new Ko(t):new Vo(t)),this.inputMediator.on("change",({plainText:T})=>{this.notifyInputChanged(T)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(R1({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 w=v&&$T(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,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:T,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(FC,{})})}),k),this.inputMediator.on("caret",I=>{this.store.dispatch(xn([])),I?(k.style.display="block",k.style.top=`${I.top}px`,k.style.left=`${I.left}px`):k.style.display="none"});let L=this.overlayContainerFactory("floating-menu",w||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:C},T==null?void 0:T.floatingMenuRootNode);(0,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:T,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(kC,{onLogIn:()=>this.loginViaPopup().catch(I=>j.warn(I.message))})})}),L)}else{let T=this.overlayContainerFactory("deepdesk-tab-completion",w||t,{appendTo:f,closestScrollElement:w,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",w||t,{appendTo:f},r==null?void 0:r.suggestionsRootNode);(0,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:r,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(fb,{inputElement:t})})}),T),(0,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:r,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)($C,{onLogIn:()=>this.loginViaPopup().catch(k=>j.warn(k.message))})})}),C)}(0,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:r,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(xC,{})})}),this.createContainer("deepdesk-overlays"));let x;this.inputMediator.on("selection",T=>{clearTimeout(x),T===null?x=setTimeout(()=>{T!==null&&this.store.dispatch(zg(T))},500):this.store.dispatch(zg(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(Oh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(Oh(!0))),this.store.dispatch(w1({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&&j.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,Gt.render)((0,Le.jsx)(Bo,{store:this.store,customStyles:r,children:(0,Le.jsx)(bo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(TT,{onLogIn:()=>this.loginViaPopup().catch(s=>j.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,Gt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Ef(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){GT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Za());let t=Xn(this.state);t&&(await this.store.dispatch(Xa()),this.store.dispatch(Hc({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",p),clearInterval(d)};i.onmessage=async g=>{var y,v;if((y=g.data)!=null&&y.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((v=g.data)==null?void 0:v.jwt),await this.isLoggedIn(),this.broadcastEvents.send(Na),l=!0,o.port1.close(),n()}catch(f){console.error(f),r(f)}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 p=async g=>{var y;if(g.origin===a.origin)switch((y=g.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){j.error("Error posting message to popup",v),r(v)}break}case"deepdesk-popup-error":{u(),g.data.message==="Timeout"&&j.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(g.data.message));break}}};window.addEventListener("message",p);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(j.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;j.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=Nd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(sn()):["cues"].includes(r)||this.store.dispatch(ln(r))})}catch(r){this.handleError(r)}}};async function ik(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 sk(e,t,n={}){let r=n.replace?Yr(e,n.replace.start,n.replace.end):us(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(`
|
|
28
|
+
`).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?Yr(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 w2(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 x2(e){let t=document.createDocumentFragment();return e.split(`
|
|
29
|
+
`).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 ak(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:ak(e,t.parentNode)}async function lk(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?w2(t):x2(t);if(n){let c=l.startContainer===e?e.childNodes[l.startOffset]:l.startContainer,p=ak(e,c)??e.firstChild;e.insertBefore(u,(p==null?void 0:p.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 uk(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ck(e,t,n){await new ir(e).authenticateWithKey(t,n)}async function dk(e){let n=await new fn(e).get("/platform/config/",{version:null,useCache:!0});return J(n)}async function E2(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 fk(e,t){let n=await E2(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 Pk(C2);})();
|
|
30
30
|
/*! Bundled license information:
|
|
31
31
|
|
|
32
32
|
classnames/index.js:
|