@deepdesk/deepdesk-sdk 17.1.1 → 17.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,43 @@
1
- "use strict";var Deepdesk=(()=>{var ZA=Object.create;var Ya=Object.defineProperty,JA=Object.defineProperties,eI=Object.getOwnPropertyDescriptor,tI=Object.getOwnPropertyDescriptors,nI=Object.getOwnPropertyNames,Su=Object.getOwnPropertySymbols,rI=Object.getPrototypeOf,Pm=Object.prototype.hasOwnProperty,cx=Object.prototype.propertyIsEnumerable;var Am=Math.pow,Rm=(e,t,n)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))Pm.call(t,n)&&Rm(e,n,t[n]);if(Su)for(var n of Su(t))cx.call(t,n)&&Rm(e,n,t[n]);return e},P=(e,t)=>JA(e,tI(t));var Im=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)Pm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Su)for(var r of Su(e))t.indexOf(r)<0&&cx.call(e,r)&&(n[r]=e[r]);return n};var nn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wt=(e,t)=>{for(var n in t)Ya(e,n,{get:t[n],enumerable:!0})},ux=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nI(t))!Pm.call(e,o)&&o!==n&&Ya(e,o,{get:()=>t[o],enumerable:!(r=eI(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?ZA(rI(e)):{},ux(t||!e||!e.__esModule?Ya(n,"default",{value:e,enumerable:!0}):n,e)),oI=e=>ux(Ya({},"__esModule",{value:!0}),e);var Ee=(e,t,n)=>Rm(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(c){o(c)}},i=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);a((n=n.apply(e,t)).next())});var Ne=nn((d5,bu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(o=r(o,n(i)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var i in o)e.call(o,i)&&o[i]&&(s=r(s,i));return s}function r(o,s){return s?o?o+" "+s:o+s:o}typeof bu!="undefined"&&bu.exports?(t.default=t,bu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var bx=nn(he=>{"use strict";var Xa=Symbol.for("react.element"),sI=Symbol.for("react.portal"),iI=Symbol.for("react.fragment"),aI=Symbol.for("react.strict_mode"),lI=Symbol.for("react.profiler"),cI=Symbol.for("react.provider"),uI=Symbol.for("react.context"),dI=Symbol.for("react.forward_ref"),fI=Symbol.for("react.suspense"),pI=Symbol.for("react.memo"),mI=Symbol.for("react.lazy"),dx=Symbol.iterator;function gI(e){return e===null||typeof e!="object"?null:(e=dx&&e[dx]||e["@@iterator"],typeof e=="function"?e:null)}var mx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gx=Object.assign,hx={};function Ci(e,t,n){this.props=e,this.context=t,this.refs=hx,this.updater=n||mx}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yx(){}yx.prototype=Ci.prototype;function Om(e,t,n){this.props=e,this.context=t,this.refs=hx,this.updater=n||mx}var Mm=Om.prototype=new yx;Mm.constructor=Om;gx(Mm,Ci.prototype);Mm.isPureReactComponent=!0;var fx=Array.isArray,vx=Object.prototype.hasOwnProperty,Nm={current:null},xx={key:!0,ref:!0,__self:!0,__source:!0};function wx(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)vx.call(t,r)&&!xx.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),c=0;c<a;c++)l[c]=arguments[c+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:Xa,type:e,key:s,ref:i,props:o,_owner:Nm.current}}function hI(e,t){return{$$typeof:Xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _m(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xa}function yI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var px=/\/+/g;function Lm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yI(""+e.key):t.toString(36)}function Tu(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Xa:case sI:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Lm(i,0):r,fx(o)?(n="",e!=null&&(n=e.replace(px,"$&/")+"/"),Tu(o,t,n,"",function(c){return c})):o!=null&&(_m(o)&&(o=hI(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(px,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",fx(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Lm(s,a);i+=Tu(s,t,n,l,o)}else if(l=gI(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Lm(s,a++),i+=Tu(s,t,n,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Eu(e,t,n){if(e==null)return e;var r=[],o=0;return Tu(e,r,"","",function(s){return t.call(n,s,o++)}),r}function vI(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ft={current:null},Cu={transition:null},xI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:Cu,ReactCurrentOwner:Nm};function Sx(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:Eu,forEach:function(e,t,n){Eu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Eu(e,function(){t++}),t},toArray:function(e){return Eu(e,function(t){return t})||[]},only:function(e){if(!_m(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Ci;he.Fragment=iI;he.Profiler=lI;he.PureComponent=Om;he.StrictMode=aI;he.Suspense=fI;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xI;he.act=Sx;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=gx({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Nm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)vx.call(t,l)&&!xx.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Xa,type:e.type,key:o,ref:s,props:r,_owner:i}};he.createContext=function(e){return e={$$typeof:uI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:cI,_context:e},e.Consumer=e};he.createElement=wx;he.createFactory=function(e){var t=wx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:dI,render:e}};he.isValidElement=_m;he.lazy=function(e){return{$$typeof:mI,_payload:{_status:-1,_result:e},_init:vI}};he.memo=function(e,t){return{$$typeof:pI,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=Cu.transition;Cu.transition={};try{e()}finally{Cu.transition=t}};he.unstable_act=Sx;he.useCallback=function(e,t){return Ft.current.useCallback(e,t)};he.useContext=function(e){return Ft.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};he.useEffect=function(e,t){return Ft.current.useEffect(e,t)};he.useId=function(){return Ft.current.useId()};he.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ft.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};he.useRef=function(e){return Ft.current.useRef(e)};he.useState=function(e){return Ft.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ft.current.useTransition()};he.version="18.3.1"});var Y=nn((p5,Ex)=>{"use strict";Ex.exports=bx()});var Rx=nn(Ru=>{"use strict";var wI=Y(),SI=Symbol.for("react.element"),bI=Symbol.for("react.fragment"),EI=Object.prototype.hasOwnProperty,TI=wI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,CI={key:!0,ref:!0,__self:!0,__source:!0};function kx(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)EI.call(t,r)&&!CI.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:SI,type:e,key:s,ref:i,props:o,_owner:TI.current}}Ru.Fragment=bI;Ru.jsx=kx;Ru.jsxs=kx});var R=nn((S5,Px)=>{"use strict";Px.exports=Rx()});var aw=nn(_e=>{"use strict";function $m(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<_u(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Fu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var i=2*(r+1)-1,a=e[i],l=i+1,c=e[l];if(0>_u(a,n))l<o&&0>_u(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else if(l<o&&0>_u(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function _u(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Zx=performance,_e.unstable_now=function(){return Zx.now()}):(Bm=Date,Jx=Bm.now(),_e.unstable_now=function(){return Bm.now()-Jx});var Zx,Bm,Jx,Sr=[],Po=[],$I=1,In=null,Rt=3,zu=!1,ws=!1,Ja=!1,nw=typeof setTimeout=="function"?setTimeout:null,rw=typeof clearTimeout=="function"?clearTimeout:null,ew=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function jm(e){for(var t=jn(Po);t!==null;){if(t.callback===null)Fu(Po);else if(t.startTime<=e)Fu(Po),t.sortIndex=t.expirationTime,$m(Sr,t);else break;t=jn(Po)}}function Wm(e){if(Ja=!1,jm(e),!ws)if(jn(Sr)!==null)ws=!0,Gm(Km);else{var t=jn(Po);t!==null&&qm(Wm,t.startTime-e)}}function Km(e,t){ws=!1,Ja&&(Ja=!1,rw(el),el=-1),zu=!0;var n=Rt;try{for(jm(t),In=jn(Sr);In!==null&&(!(In.expirationTime>t)||e&&!iw());){var r=In.callback;if(typeof r=="function"){In.callback=null,Rt=In.priorityLevel;var o=r(In.expirationTime<=t);t=_e.unstable_now(),typeof o=="function"?In.callback=o:In===jn(Sr)&&Fu(Sr),jm(t)}else Fu(Sr);In=jn(Sr)}if(In!==null)var s=!0;else{var i=jn(Po);i!==null&&qm(Wm,i.startTime-t),s=!1}return s}finally{In=null,Rt=n,zu=!1}}var Hu=!1,Du=null,el=-1,ow=5,sw=-1;function iw(){return!(_e.unstable_now()-sw<ow)}function Um(){if(Du!==null){var e=_e.unstable_now();sw=e;var t=!0;try{t=Du(!0,e)}finally{t?Za():(Hu=!1,Du=null)}}else Hu=!1}var Za;typeof ew=="function"?Za=function(){ew(Um)}:typeof MessageChannel!="undefined"?(Vm=new MessageChannel,tw=Vm.port2,Vm.port1.onmessage=Um,Za=function(){tw.postMessage(null)}):Za=function(){nw(Um,0)};var Vm,tw;function Gm(e){Du=e,Hu||(Hu=!0,Za())}function qm(e,t){el=nw(function(){e(_e.unstable_now())},t)}_e.unstable_IdlePriority=5;_e.unstable_ImmediatePriority=1;_e.unstable_LowPriority=4;_e.unstable_NormalPriority=3;_e.unstable_Profiling=null;_e.unstable_UserBlockingPriority=2;_e.unstable_cancelCallback=function(e){e.callback=null};_e.unstable_continueExecution=function(){ws||zu||(ws=!0,Gm(Km))};_e.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"):ow=0<e?Math.floor(1e3/e):5};_e.unstable_getCurrentPriorityLevel=function(){return Rt};_e.unstable_getFirstCallbackNode=function(){return jn(Sr)};_e.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};_e.unstable_pauseExecution=function(){};_e.unstable_requestPaint=function(){};_e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};_e.unstable_scheduleCallback=function(e,t,n){var r=_e.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:$I++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,$m(Po,e),jn(Sr)===null&&e===jn(Po)&&(Ja?(rw(el),el=-1):Ja=!0,qm(Wm,n-r))):(e.sortIndex=o,$m(Sr,e),ws||zu||(ws=!0,Gm(Km))),e};_e.unstable_shouldYield=iw;_e.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var cw=nn((G6,lw)=>{"use strict";lw.exports=aw()});var pE=nn(wn=>{"use strict";var jI=Y(),vn=cw();function D(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 hS=new Set,bl={};function Ms(e,t){Xi(e,t),Xi(e+"Capture",t)}function Xi(e,t){for(bl[e]=t,e=0;e<t.length;e++)hS.add(t[e])}var qr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),yg=Object.prototype.hasOwnProperty,WI=/^[: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]*$/,uw={},dw={};function KI(e){return yg.call(dw,e)?!0:yg.call(uw,e)?!1:WI.test(e)?dw[e]=!0:(uw[e]=!0,!1)}function GI(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 qI(e,t,n,r){if(t===null||typeof t=="undefined"||GI(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 Vt(e,t,n,r,o,s,i){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=s,this.removeEmptyString=i}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new Vt(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){Et[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var ch=/[\-:]([a-z])/g;function uh(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(ch,uh);Et[t]=new Vt(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(ch,uh);Et[t]=new Vt(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(ch,uh);Et[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function dh(e,t,n,r){var o=Et.hasOwnProperty(t)?Et[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(qI(t,n,o,r)&&(n=null),r||o===null?KI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zr=jI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Bu=Symbol.for("react.element"),Oi=Symbol.for("react.portal"),Mi=Symbol.for("react.fragment"),fh=Symbol.for("react.strict_mode"),vg=Symbol.for("react.profiler"),yS=Symbol.for("react.provider"),vS=Symbol.for("react.context"),ph=Symbol.for("react.forward_ref"),xg=Symbol.for("react.suspense"),wg=Symbol.for("react.suspense_list"),mh=Symbol.for("react.memo"),Io=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var xS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var fw=Symbol.iterator;function tl(e){return e===null||typeof e!="object"?null:(e=fw&&e[fw]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Ym;function cl(e){if(Ym===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ym=t&&t[1]||""}return`
2
- `+Ym+e}var Xm=!1;function Qm(e,t){if(!e||Xm)return"";Xm=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
1
+ "use strict";var Deepdesk=(()=>{var rI=Object.create;var Ya=Object.defineProperty,oI=Object.defineProperties,sI=Object.getOwnPropertyDescriptor,iI=Object.getOwnPropertyDescriptors,aI=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,lI=Object.getPrototypeOf,Im=Object.prototype.hasOwnProperty,fx=Object.prototype.propertyIsEnumerable;var Lm=Math.pow,Am=(e,t,n)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))Im.call(t,n)&&Am(e,n,t[n]);if(bu)for(var n of bu(t))fx.call(t,n)&&Am(e,n,t[n]);return e},P=(e,t)=>oI(e,iI(t));var Mm=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)Im.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&bu)for(var r of bu(e))t.indexOf(r)<0&&fx.call(e,r)&&(n[r]=e[r]);return n};var nn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pt=(e,t)=>{for(var n in t)Ya(e,n,{get:t[n],enumerable:!0})},px=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of aI(t))!Im.call(e,o)&&o!==n&&Ya(e,o,{get:()=>t[o],enumerable:!(r=sI(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?rI(lI(e)):{},px(t||!e||!e.__esModule?Ya(n,"default",{value:e,enumerable:!0}):n,e)),cI=e=>px(Ya({},"__esModule",{value:!0}),e);var Te=(e,t,n)=>Am(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(c){o(c)}},i=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);a((n=n.apply(e,t)).next())});var Oe=nn((v5,Eu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(o=r(o,n(i)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var i in o)e.call(o,i)&&o[i]&&(s=r(s,i));return s}function r(o,s){return s?o?o+" "+s:o+s:o}typeof Eu!="undefined"&&Eu.exports?(t.default=t,Eu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Cx=nn(ye=>{"use strict";var Xa=Symbol.for("react.element"),uI=Symbol.for("react.portal"),dI=Symbol.for("react.fragment"),fI=Symbol.for("react.strict_mode"),pI=Symbol.for("react.profiler"),mI=Symbol.for("react.provider"),gI=Symbol.for("react.context"),hI=Symbol.for("react.forward_ref"),yI=Symbol.for("react.suspense"),vI=Symbol.for("react.memo"),xI=Symbol.for("react.lazy"),mx=Symbol.iterator;function wI(e){return e===null||typeof e!="object"?null:(e=mx&&e[mx]||e["@@iterator"],typeof e=="function"?e:null)}var yx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vx=Object.assign,xx={};function Ci(e,t,n){this.props=e,this.context=t,this.refs=xx,this.updater=n||yx}Ci.prototype.isReactComponent={};Ci.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ci.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function wx(){}wx.prototype=Ci.prototype;function Om(e,t,n){this.props=e,this.context=t,this.refs=xx,this.updater=n||yx}var _m=Om.prototype=new wx;_m.constructor=Om;vx(_m,Ci.prototype);_m.isPureReactComponent=!0;var gx=Array.isArray,Sx=Object.prototype.hasOwnProperty,Dm={current:null},bx={key:!0,ref:!0,__self:!0,__source:!0};function Ex(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Sx.call(t,r)&&!bx.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),c=0;c<a;c++)l[c]=arguments[c+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:Xa,type:e,key:s,ref:i,props:o,_owner:Dm.current}}function SI(e,t){return{$$typeof:Xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Fm(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xa}function bI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hx=/\/+/g;function Nm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?bI(""+e.key):t.toString(36)}function Cu(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Xa:case uI:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Nm(i,0):r,gx(o)?(n="",e!=null&&(n=e.replace(hx,"$&/")+"/"),Cu(o,t,n,"",function(c){return c})):o!=null&&(Fm(o)&&(o=SI(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(hx,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",gx(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Nm(s,a);i+=Cu(s,t,n,l,o)}else if(l=wI(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Nm(s,a++),i+=Cu(s,t,n,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Tu(e,t,n){if(e==null)return e;var r=[],o=0;return Cu(e,r,"","",function(s){return t.call(n,s,o++)}),r}function EI(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ft={current:null},ku={transition:null},TI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:ku,ReactCurrentOwner:Dm};function Tx(){throw Error("act(...) is not supported in production builds of React.")}ye.Children={map:Tu,forEach:function(e,t,n){Tu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tu(e,function(){t++}),t},toArray:function(e){return Tu(e,function(t){return t})||[]},only:function(e){if(!Fm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Ci;ye.Fragment=dI;ye.Profiler=pI;ye.PureComponent=Om;ye.StrictMode=fI;ye.Suspense=yI;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=TI;ye.act=Tx;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=vx({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Dm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Sx.call(t,l)&&!bx.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 c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Xa,type:e.type,key:o,ref:s,props:r,_owner:i}};ye.createContext=function(e){return e={$$typeof:gI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mI,_context:e},e.Consumer=e};ye.createElement=Ex;ye.createFactory=function(e){var t=Ex.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:hI,render:e}};ye.isValidElement=Fm;ye.lazy=function(e){return{$$typeof:xI,_payload:{_status:-1,_result:e},_init:EI}};ye.memo=function(e,t){return{$$typeof:vI,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=ku.transition;ku.transition={};try{e()}finally{ku.transition=t}};ye.unstable_act=Tx;ye.useCallback=function(e,t){return Ft.current.useCallback(e,t)};ye.useContext=function(e){return Ft.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};ye.useEffect=function(e,t){return Ft.current.useEffect(e,t)};ye.useId=function(){return Ft.current.useId()};ye.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Ft.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};ye.useRef=function(e){return Ft.current.useRef(e)};ye.useState=function(e){return Ft.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return Ft.current.useTransition()};ye.version="18.3.1"});var Y=nn((w5,kx)=>{"use strict";kx.exports=Cx()});var Ix=nn(Pu=>{"use strict";var CI=Y(),kI=Symbol.for("react.element"),RI=Symbol.for("react.fragment"),PI=Object.prototype.hasOwnProperty,AI=CI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,II={key:!0,ref:!0,__self:!0,__source:!0};function Ax(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)PI.call(t,r)&&!II.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:kI,type:e,key:s,ref:i,props:o,_owner:AI.current}}Pu.Fragment=RI;Pu.jsx=Ax;Pu.jsxs=Ax});var R=nn((P5,Lx)=>{"use strict";Lx.exports=Ix()});var cw=nn(_e=>{"use strict";function Wm(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Fu(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Hu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var i=2*(r+1)-1,a=e[i],l=i+1,c=e[l];if(0>Fu(a,n))l<o&&0>Fu(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else if(l<o&&0>Fu(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function Fu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(ew=performance,_e.unstable_now=function(){return ew.now()}):(Vm=Date,tw=Vm.now(),_e.unstable_now=function(){return Vm.now()-tw});var ew,Vm,tw,Sr=[],Po=[],qI=1,In=null,Rt=3,Bu=!1,ws=!1,Ja=!1,ow=typeof setTimeout=="function"?setTimeout:null,sw=typeof clearTimeout=="function"?clearTimeout:null,nw=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Km(e){for(var t=jn(Po);t!==null;){if(t.callback===null)Hu(Po);else if(t.startTime<=e)Hu(Po),t.sortIndex=t.expirationTime,Wm(Sr,t);else break;t=jn(Po)}}function Gm(e){if(Ja=!1,Km(e),!ws)if(jn(Sr)!==null)ws=!0,Ym(qm);else{var t=jn(Po);t!==null&&Xm(Gm,t.startTime-e)}}function qm(e,t){ws=!1,Ja&&(Ja=!1,sw(el),el=-1),Bu=!0;var n=Rt;try{for(Km(t),In=jn(Sr);In!==null&&(!(In.expirationTime>t)||e&&!lw());){var r=In.callback;if(typeof r=="function"){In.callback=null,Rt=In.priorityLevel;var o=r(In.expirationTime<=t);t=_e.unstable_now(),typeof o=="function"?In.callback=o:In===jn(Sr)&&Hu(Sr),Km(t)}else Hu(Sr);In=jn(Sr)}if(In!==null)var s=!0;else{var i=jn(Po);i!==null&&Xm(Gm,i.startTime-t),s=!1}return s}finally{In=null,Rt=n,Bu=!1}}var Uu=!1,zu=null,el=-1,iw=5,aw=-1;function lw(){return!(_e.unstable_now()-aw<iw)}function $m(){if(zu!==null){var e=_e.unstable_now();aw=e;var t=!0;try{t=zu(!0,e)}finally{t?Za():(Uu=!1,zu=null)}}else Uu=!1}var Za;typeof nw=="function"?Za=function(){nw($m)}:typeof MessageChannel!="undefined"?(jm=new MessageChannel,rw=jm.port2,jm.port1.onmessage=$m,Za=function(){rw.postMessage(null)}):Za=function(){ow($m,0)};var jm,rw;function Ym(e){zu=e,Uu||(Uu=!0,Za())}function Xm(e,t){el=ow(function(){e(_e.unstable_now())},t)}_e.unstable_IdlePriority=5;_e.unstable_ImmediatePriority=1;_e.unstable_LowPriority=4;_e.unstable_NormalPriority=3;_e.unstable_Profiling=null;_e.unstable_UserBlockingPriority=2;_e.unstable_cancelCallback=function(e){e.callback=null};_e.unstable_continueExecution=function(){ws||Bu||(ws=!0,Ym(qm))};_e.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"):iw=0<e?Math.floor(1e3/e):5};_e.unstable_getCurrentPriorityLevel=function(){return Rt};_e.unstable_getFirstCallbackNode=function(){return jn(Sr)};_e.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};_e.unstable_pauseExecution=function(){};_e.unstable_requestPaint=function(){};_e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};_e.unstable_scheduleCallback=function(e,t,n){var r=_e.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:qI++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Wm(Po,e),jn(Sr)===null&&e===jn(Po)&&(Ja?(sw(el),el=-1):Ja=!0,Xm(Gm,n-r))):(e.sortIndex=o,Wm(Sr,e),ws||Bu||(ws=!0,Ym(qm))),e};_e.unstable_shouldYield=lw;_e.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var dw=nn((ez,uw)=>{"use strict";uw.exports=cw()});var gE=nn(wn=>{"use strict";var YI=Y(),vn=dw();function D(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 vS=new Set,bl={};function Ns(e,t){Xi(e,t),Xi(e+"Capture",t)}function Xi(e,t){for(bl[e]=t,e=0;e<t.length;e++)vS.add(t[e])}var qr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),xg=Object.prototype.hasOwnProperty,XI=/^[: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]*$/,fw={},pw={};function QI(e){return xg.call(pw,e)?!0:xg.call(fw,e)?!1:XI.test(e)?pw[e]=!0:(fw[e]=!0,!1)}function ZI(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 JI(e,t,n,r){if(t===null||typeof t=="undefined"||ZI(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 Vt(e,t,n,r,o,s,i){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=s,this.removeEmptyString=i}var Et={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Et[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Et[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Et[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Et[e]=new Vt(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){Et[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Et[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Et[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Et[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Et[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var dh=/[\-:]([a-z])/g;function fh(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(dh,fh);Et[t]=new Vt(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(dh,fh);Et[t]=new Vt(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(dh,fh);Et[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Et[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});Et.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Et[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function ph(e,t,n,r){var o=Et.hasOwnProperty(t)?Et[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(JI(t,n,o,r)&&(n=null),r||o===null?QI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Zr=YI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vu=Symbol.for("react.element"),Mi=Symbol.for("react.portal"),Ni=Symbol.for("react.fragment"),mh=Symbol.for("react.strict_mode"),wg=Symbol.for("react.profiler"),xS=Symbol.for("react.provider"),wS=Symbol.for("react.context"),gh=Symbol.for("react.forward_ref"),Sg=Symbol.for("react.suspense"),bg=Symbol.for("react.suspense_list"),hh=Symbol.for("react.memo"),Io=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var SS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var mw=Symbol.iterator;function tl(e){return e===null||typeof e!="object"?null:(e=mw&&e[mw]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Qm;function cl(e){if(Qm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qm=t&&t[1]||""}return`
2
+ `+Qm+e}var Zm=!1;function Jm(e,t){if(!e||Zm)return"";Zm=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
3
3
  `),s=r.stack.split(`
4
4
  `),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
5
- `+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Xm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?cl(e):""}function YI(e){switch(e.tag){case 5:return cl(e.type);case 16:return cl("Lazy");case 13:return cl("Suspense");case 19:return cl("SuspenseList");case 0:case 2:case 15:return e=Qm(e.type,!1),e;case 11:return e=Qm(e.type.render,!1),e;case 1:return e=Qm(e.type,!0),e;default:return""}}function Sg(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 Mi:return"Fragment";case Oi:return"Portal";case vg:return"Profiler";case fh:return"StrictMode";case xg:return"Suspense";case wg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vS:return(e.displayName||"Context")+".Consumer";case yS:return(e._context.displayName||"Context")+".Provider";case ph:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mh:return t=e.displayName||null,t!==null?t:Sg(e.type)||"Memo";case Io:t=e._payload,e=e._init;try{return Sg(e(t))}catch(n){}}return null}function XI(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sg(t);case 8:return t===fh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QI(e){var t=wS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Uu(e){e._valueTracker||(e._valueTracker=QI(e))}function SS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gd(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function bg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function pw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(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 bS(e,t){t=t.checked,t!=null&&dh(e,"checked",t,!1)}function Eg(e,t){bS(e,t);var n=jo(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")?Tg(e,t.type,n):t.hasOwnProperty("defaultValue")&&Tg(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mw(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 Tg(e,t,n){(t!=="number"||gd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ul=Array.isArray;function ji(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=""+jo(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 Cg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ul(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:jo(n)}}function ES(e,t){var n=jo(t.value),r=jo(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 hw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function TS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?TS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Vu,CS=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Vu=Vu||document.createElement("div"),Vu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Vu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function El(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pl={animationIterationCount:!0,aspectRatio:!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},ZI=["Webkit","ms","Moz","O"];Object.keys(pl).forEach(function(e){ZI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pl[t]=pl[e]})});function kS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pl.hasOwnProperty(e)&&pl[e]?(""+t).trim():t+"px"}function RS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=kS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var JI=Ge({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 Rg(e,t){if(t){if(JI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Pg(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}}var Ag=null;function gh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ig=null,Wi=null,Ki=null;function yw(e){if(e=Ul(e)){if(typeof Ig!="function")throw Error(D(280));var t=e.stateNode;t&&(t=$d(t),Ig(e.stateNode,e.type,t))}}function PS(e){Wi?Ki?Ki.push(e):Ki=[e]:Wi=e}function AS(){if(Wi){var e=Wi,t=Ki;if(Ki=Wi=null,yw(e),t)for(e=0;e<t.length;e++)yw(t[e])}}function IS(e,t){return e(t)}function LS(){}var Zm=!1;function OS(e,t,n){if(Zm)return e(t,n);Zm=!0;try{return IS(e,t,n)}finally{Zm=!1,(Wi!==null||Ki!==null)&&(LS(),AS())}}function Tl(e,t){var n=e.stateNode;if(n===null)return null;var r=$d(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(D(231,t,typeof n));return n}var Lg=!1;if(qr)try{Ii={},Object.defineProperty(Ii,"passive",{get:function(){Lg=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch(e){Lg=!1}var Ii;function eL(e,t,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ml=!1,hd=null,yd=!1,Og=null,tL={onError:function(e){ml=!0,hd=e}};function nL(e,t,n,r,o,s,i,a,l){ml=!1,hd=null,eL.apply(tL,arguments)}function rL(e,t,n,r,o,s,i,a,l){if(nL.apply(this,arguments),ml){if(ml){var c=hd;ml=!1,hd=null}else throw Error(D(198));yd||(yd=!0,Og=c)}}function Ns(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function MS(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 vw(e){if(Ns(e)!==e)throw Error(D(188))}function oL(e){var t=e.alternate;if(!t){if(t=Ns(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return vw(o),e;if(s===r)return vw(o),t;s=s.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function NS(e){return e=oL(e),e!==null?_S(e):null}function _S(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_S(e);if(t!==null)return t;e=e.sibling}return null}var DS=vn.unstable_scheduleCallback,xw=vn.unstable_cancelCallback,sL=vn.unstable_shouldYield,iL=vn.unstable_requestPaint,Je=vn.unstable_now,aL=vn.unstable_getCurrentPriorityLevel,hh=vn.unstable_ImmediatePriority,FS=vn.unstable_UserBlockingPriority,vd=vn.unstable_NormalPriority,lL=vn.unstable_LowPriority,zS=vn.unstable_IdlePriority,Hd=null,Cr=null;function cL(e){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Hd,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:fL,uL=Math.log,dL=Math.LN2;function fL(e){return e>>>=0,e===0?32:31-(uL(e)/dL|0)|0}var $u=64,ju=4194304;function dl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=dl(a):(s&=i,s!==0&&(r=dl(s)))}else i=n&~o,i!==0?r=dl(i):s!==0&&(r=dl(s));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function pL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Yn(s),a=1<<i,l=o[i];l===-1?((a&n)===0||(a&r)!==0)&&(o[i]=pL(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Mg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function HS(){var e=$u;return $u<<=1,($u&4194240)===0&&($u=64),e}function Jm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function gL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Yn(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function yh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ie=0;function BS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var US,vh,VS,$S,jS,Ng=!1,Wu=[],Do=null,Fo=null,zo=null,Cl=new Map,kl=new Map,Oo=[],hL="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 ww(e,t){switch(e){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function nl(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Ul(t),t!==null&&vh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function yL(e,t,n,r,o){switch(t){case"focusin":return Do=nl(Do,e,t,n,r,o),!0;case"dragenter":return Fo=nl(Fo,e,t,n,r,o),!0;case"mouseover":return zo=nl(zo,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Cl.set(s,nl(Cl.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,kl.set(s,nl(kl.get(s)||null,e,t,n,r,o)),!0}return!1}function WS(e){var t=Es(e.target);if(t!==null){var n=Ns(t);if(n!==null){if(t=n.tag,t===13){if(t=MS(n),t!==null){e.blockedOn=t,jS(e.priority,function(){VS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_g(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ag=r,n.target.dispatchEvent(r),Ag=null}else return t=Ul(n),t!==null&&vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Sw(e,t,n){sd(e)&&n.delete(t)}function vL(){Ng=!1,Do!==null&&sd(Do)&&(Do=null),Fo!==null&&sd(Fo)&&(Fo=null),zo!==null&&sd(zo)&&(zo=null),Cl.forEach(Sw),kl.forEach(Sw)}function rl(e,t){e.blockedOn===t&&(e.blockedOn=null,Ng||(Ng=!0,vn.unstable_scheduleCallback(vn.unstable_NormalPriority,vL)))}function Rl(e){function t(o){return rl(o,e)}if(0<Wu.length){rl(Wu[0],e);for(var n=1;n<Wu.length;n++){var r=Wu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Do!==null&&rl(Do,e),Fo!==null&&rl(Fo,e),zo!==null&&rl(zo,e),Cl.forEach(t),kl.forEach(t),n=0;n<Oo.length;n++)r=Oo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Oo.length&&(n=Oo[0],n.blockedOn===null);)WS(n),n.blockedOn===null&&Oo.shift()}var Gi=Zr.ReactCurrentBatchConfig,wd=!0;function xL(e,t,n,r){var o=Ie,s=Gi.transition;Gi.transition=null;try{Ie=1,xh(e,t,n,r)}finally{Ie=o,Gi.transition=s}}function wL(e,t,n,r){var o=Ie,s=Gi.transition;Gi.transition=null;try{Ie=4,xh(e,t,n,r)}finally{Ie=o,Gi.transition=s}}function xh(e,t,n,r){if(wd){var o=_g(e,t,n,r);if(o===null)ig(e,t,r,Sd,n),ww(e,r);else if(yL(o,e,t,n,r))r.stopPropagation();else if(ww(e,r),t&4&&-1<hL.indexOf(e)){for(;o!==null;){var s=Ul(o);if(s!==null&&US(s),s=_g(e,t,n,r),s===null&&ig(e,t,r,Sd,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else ig(e,t,r,null,n)}}var Sd=null;function _g(e,t,n,r){if(Sd=null,e=gh(r),e=Es(e),e!==null)if(t=Ns(e),t===null)e=null;else if(n=t.tag,n===13){if(e=MS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sd=e,null}function KS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(aL()){case hh:return 1;case FS:return 4;case vd:case lL:return 16;case zS:return 536870912;default:return 16}default:return 16}}var No=null,wh=null,id=null;function GS(){if(id)return id;var e,t=wh,n=t.length,r,o="value"in No?No.value:No.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return id=o.slice(e,1<r?1-r:void 0)}function ad(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 Ku(){return!0}function bw(){return!1}function xn(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ku:bw,this.isPropagationStopped=bw,this}return Ge(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=Ku)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ku)},persist:function(){},isPersistent:Ku}),t}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sh=xn(ra),Bl=Ge({},ra,{view:0,detail:0}),SL=xn(Bl),eg,tg,ol,Bd=Ge({},Bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bh,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!==ol&&(ol&&e.type==="mousemove"?(eg=e.screenX-ol.screenX,tg=e.screenY-ol.screenY):tg=eg=0,ol=e),eg)},movementY:function(e){return"movementY"in e?e.movementY:tg}}),Ew=xn(Bd),bL=Ge({},Bd,{dataTransfer:0}),EL=xn(bL),TL=Ge({},Bl,{relatedTarget:0}),ng=xn(TL),CL=Ge({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),kL=xn(CL),RL=Ge({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PL=xn(RL),AL=Ge({},ra,{data:0}),Tw=xn(AL),IL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LL={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"},OL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ML(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=OL[e])?!!t[e]:!1}function bh(){return ML}var NL=Ge({},Bl,{key:function(e){if(e.key){var t=IL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ad(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?LL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bh,charCode:function(e){return e.type==="keypress"?ad(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ad(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_L=xn(NL),DL=Ge({},Bd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cw=xn(DL),FL=Ge({},Bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bh}),zL=xn(FL),HL=Ge({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),BL=xn(HL),UL=Ge({},Bd,{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}),VL=xn(UL),$L=[9,13,27,32],Eh=qr&&"CompositionEvent"in window,gl=null;qr&&"documentMode"in document&&(gl=document.documentMode);var jL=qr&&"TextEvent"in window&&!gl,qS=qr&&(!Eh||gl&&8<gl&&11>=gl),kw=" ",Rw=!1;function YS(e,t){switch(e){case"keyup":return $L.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function XS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ni=!1;function WL(e,t){switch(e){case"compositionend":return XS(t);case"keypress":return t.which!==32?null:(Rw=!0,kw);case"textInput":return e=t.data,e===kw&&Rw?null:e;default:return null}}function KL(e,t){if(Ni)return e==="compositionend"||!Eh&&YS(e,t)?(e=GS(),id=wh=No=null,Ni=!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 qS&&t.locale!=="ko"?null:t.data;default:return null}}var GL={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 Pw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!GL[e.type]:t==="textarea"}function QS(e,t,n,r){PS(r),t=bd(t,"onChange"),0<t.length&&(n=new Sh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hl=null,Pl=null;function qL(e){lb(e,0)}function Ud(e){var t=Fi(e);if(SS(t))return e}function YL(e,t){if(e==="change")return t}var ZS=!1;qr&&(qr?(qu="oninput"in document,qu||(rg=document.createElement("div"),rg.setAttribute("oninput","return;"),qu=typeof rg.oninput=="function"),Gu=qu):Gu=!1,ZS=Gu&&(!document.documentMode||9<document.documentMode));var Gu,qu,rg;function Aw(){hl&&(hl.detachEvent("onpropertychange",JS),Pl=hl=null)}function JS(e){if(e.propertyName==="value"&&Ud(Pl)){var t=[];QS(t,Pl,e,gh(e)),OS(qL,t)}}function XL(e,t,n){e==="focusin"?(Aw(),hl=t,Pl=n,hl.attachEvent("onpropertychange",JS)):e==="focusout"&&Aw()}function QL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ud(Pl)}function ZL(e,t){if(e==="click")return Ud(t)}function JL(e,t){if(e==="input"||e==="change")return Ud(t)}function eO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:eO;function Al(e,t){if(Qn(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++){var o=n[r];if(!yg.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function Iw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lw(e,t){var n=Iw(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=Iw(n)}}function eb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tb(){for(var e=window,t=gd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=gd(e.document)}return t}function Th(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")}function tO(e){var t=tb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&eb(n.ownerDocument.documentElement,n)){if(r!==null&&Th(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Lw(n,s);var i=Lw(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var nO=qr&&"documentMode"in document&&11>=document.documentMode,_i=null,Dg=null,yl=null,Fg=!1;function Ow(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fg||_i==null||_i!==gd(r)||(r=_i,"selectionStart"in r&&Th(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}),yl&&Al(yl,r)||(yl=r,r=bd(Dg,"onSelect"),0<r.length&&(t=new Sh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_i)))}function Yu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Di={animationend:Yu("Animation","AnimationEnd"),animationiteration:Yu("Animation","AnimationIteration"),animationstart:Yu("Animation","AnimationStart"),transitionend:Yu("Transition","TransitionEnd")},og={},nb={};qr&&(nb=document.createElement("div").style,"AnimationEvent"in window||(delete Di.animationend.animation,delete Di.animationiteration.animation,delete Di.animationstart.animation),"TransitionEvent"in window||delete Di.transitionend.transition);function Vd(e){if(og[e])return og[e];if(!Di[e])return e;var t=Di[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nb)return og[e]=t[n];return e}var rb=Vd("animationend"),ob=Vd("animationiteration"),sb=Vd("animationstart"),ib=Vd("transitionend"),ab=new Map,Mw="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ko(e,t){ab.set(e,t),Ms(t,[e])}for(Xu=0;Xu<Mw.length;Xu++)Qu=Mw[Xu],Nw=Qu.toLowerCase(),_w=Qu[0].toUpperCase()+Qu.slice(1),Ko(Nw,"on"+_w);var Qu,Nw,_w,Xu;Ko(rb,"onAnimationEnd");Ko(ob,"onAnimationIteration");Ko(sb,"onAnimationStart");Ko("dblclick","onDoubleClick");Ko("focusin","onFocus");Ko("focusout","onBlur");Ko(ib,"onTransitionEnd");Xi("onMouseEnter",["mouseout","mouseover"]);Xi("onMouseLeave",["mouseout","mouseover"]);Xi("onPointerEnter",["pointerout","pointerover"]);Xi("onPointerLeave",["pointerout","pointerover"]);Ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ms("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rO=new Set("cancel close invalid load scroll toggle".split(" ").concat(fl));function Dw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,rL(r,t,void 0,e),e.currentTarget=null}function lb(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 s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;Dw(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;Dw(o,a,c),s=l}}}if(yd)throw e=Og,yd=!1,Og=null,e}function Fe(e,t){var n=t[Vg];n===void 0&&(n=t[Vg]=new Set);var r=e+"__bubble";n.has(r)||(cb(t,e,2,!1),n.add(r))}function sg(e,t,n){var r=0;t&&(r|=4),cb(n,e,r,t)}var Zu="_reactListening"+Math.random().toString(36).slice(2);function Il(e){if(!e[Zu]){e[Zu]=!0,hS.forEach(function(n){n!=="selectionchange"&&(rO.has(n)||sg(n,!1,e),sg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zu]||(t[Zu]=!0,sg("selectionchange",!1,t))}}function cb(e,t,n,r){switch(KS(t)){case 1:var o=xL;break;case 4:o=wL;break;default:o=xh}n=o.bind(null,t,n,e),o=void 0,!Lg||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 ig(e,t,n,r,o){var s=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Es(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}OS(function(){var c=s,u=gh(n),d=[];e:{var f=ab.get(e);if(f!==void 0){var p=Sh,v=e;switch(e){case"keypress":if(ad(n)===0)break e;case"keydown":case"keyup":p=_L;break;case"focusin":v="focus",p=ng;break;case"focusout":v="blur",p=ng;break;case"beforeblur":case"afterblur":p=ng;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Ew;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=EL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=zL;break;case rb:case ob:case sb:p=kL;break;case ib:p=BL;break;case"scroll":p=SL;break;case"wheel":p=VL;break;case"copy":case"cut":case"paste":p=PL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Cw}var m=(t&4)!==0,x=!m&&e==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var g=c,h;g!==null;){h=g;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,y!==null&&(w=Tl(g,y),w!=null&&m.push(Ll(g,w,h)))),x)break;g=g.return}0<m.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:m}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Ag&&(v=n.relatedTarget||n.fromElement)&&(Es(v)||v[Yr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?Es(v):null,v!==null&&(x=Ns(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(m=Ew,w="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Cw,w="onPointerLeave",y="onPointerEnter",g="pointer"),x=p==null?f:Fi(p),h=v==null?f:Fi(v),f=new m(w,g+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,Es(u)===c&&(m=new m(y,g+"enter",v,n,u),m.target=h,m.relatedTarget=x,w=m),x=w,p&&v)t:{for(m=p,y=v,g=0,h=m;h;h=Li(h))g++;for(h=0,w=y;w;w=Li(w))h++;for(;0<g-h;)m=Li(m),g--;for(;0<h-g;)y=Li(y),h--;for(;g--;){if(m===y||y!==null&&m===y.alternate)break t;m=Li(m),y=Li(y)}m=null}else m=null;p!==null&&Fw(d,f,p,m,!1),v!==null&&x!==null&&Fw(d,x,v,m,!0)}}e:{if(f=c?Fi(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=YL;else if(Pw(f))if(ZS)E=JL;else{E=QL;var k=XL}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=ZL);if(E&&(E=E(e,c))){QS(d,E,n,u);break e}k&&k(e,f,c),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Tg(f,"number",f.value)}switch(k=c?Fi(c):window,e){case"focusin":(Pw(k)||k.contentEditable==="true")&&(_i=k,Dg=c,yl=null);break;case"focusout":yl=Dg=_i=null;break;case"mousedown":Fg=!0;break;case"contextmenu":case"mouseup":case"dragend":Fg=!1,Ow(d,n,u);break;case"selectionchange":if(nO)break;case"keydown":case"keyup":Ow(d,n,u)}var C;if(Eh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ni?YS(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(qS&&n.locale!=="ko"&&(Ni||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ni&&(C=GS()):(No=u,wh="value"in No?No.value:No.textContent,Ni=!0)),k=bd(c,A),0<k.length&&(A=new Tw(A,e,null,n,u),d.push({event:A,listeners:k}),C?A.data=C:(C=XS(n),C!==null&&(A.data=C)))),(C=jL?WL(e,n):KL(e,n))&&(c=bd(c,"onBeforeInput"),0<c.length&&(u=new Tw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}lb(d,t)})}function Ll(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Tl(e,n),s!=null&&r.unshift(Ll(e,s,o)),s=Tl(e,t),s!=null&&r.push(Ll(e,s,o))),e=e.return}return r}function Li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fw(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=Tl(n,s),l!=null&&i.unshift(Ll(n,l,a))):o||(l=Tl(n,s),l!=null&&i.push(Ll(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var oO=/\r\n?/g,sO=/\u0000|\uFFFD/g;function zw(e){return(typeof e=="string"?e:""+e).replace(oO,`
6
- `).replace(sO,"")}function Ju(e,t,n){if(t=zw(t),zw(e)!==t&&n)throw Error(D(425))}function Ed(){}var zg=null,Hg=null;function Bg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ug=typeof setTimeout=="function"?setTimeout:void 0,iO=typeof clearTimeout=="function"?clearTimeout:void 0,Hw=typeof Promise=="function"?Promise:void 0,aO=typeof queueMicrotask=="function"?queueMicrotask:typeof Hw!="undefined"?function(e){return Hw.resolve(null).then(e).catch(lO)}:Ug;function lO(e){setTimeout(function(){throw e})}function ag(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Rl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Rl(t)}function Ho(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Bw(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 oa=Math.random().toString(36).slice(2),Tr="__reactFiber$"+oa,Ol="__reactProps$"+oa,Yr="__reactContainer$"+oa,Vg="__reactEvents$"+oa,cO="__reactListeners$"+oa,uO="__reactHandles$"+oa;function Es(e){var t=e[Tr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yr]||n[Tr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bw(e);e!==null;){if(n=e[Tr])return n;e=Bw(e)}return t}e=n,n=e.parentNode}return null}function Ul(e){return e=e[Tr]||e[Yr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function $d(e){return e[Ol]||null}var $g=[],zi=-1;function Go(e){return{current:e}}function ze(e){0>zi||(e.current=$g[zi],$g[zi]=null,zi--)}function De(e,t){zi++,$g[zi]=e.current,e.current=t}var Wo={},Lt=Go(Wo),an=Go(!1),Ps=Wo;function Qi(e,t){var n=e.type.contextTypes;if(!n)return Wo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ln(e){return e=e.childContextTypes,e!=null}function Td(){ze(an),ze(Lt)}function Uw(e,t,n){if(Lt.current!==Wo)throw Error(D(168));De(Lt,t),De(an,n)}function ub(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,XI(e)||"Unknown",o));return Ge({},n,r)}function Cd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wo,Ps=Lt.current,De(Lt,e),De(an,an.current),!0}function Vw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=ub(e,t,Ps),r.__reactInternalMemoizedMergedChildContext=e,ze(an),ze(Lt),De(Lt,e)):ze(an),De(an,n)}var jr=null,jd=!1,lg=!1;function db(e){jr===null?jr=[e]:jr.push(e)}function dO(e){jd=!0,db(e)}function qo(){if(!lg&&jr!==null){lg=!0;var e=0,t=Ie;try{var n=jr;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jr=null,jd=!1}catch(o){throw jr!==null&&(jr=jr.slice(e+1)),DS(hh,qo),o}finally{Ie=t,lg=!1}}return null}var Hi=[],Bi=0,kd=null,Rd=0,Ln=[],On=0,As=null,Wr=1,Kr="";function Ss(e,t){Hi[Bi++]=Rd,Hi[Bi++]=kd,kd=e,Rd=t}function fb(e,t,n){Ln[On++]=Wr,Ln[On++]=Kr,Ln[On++]=As,As=e;var r=Wr;e=Kr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var s=32-Yn(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Wr=1<<32-Yn(t)+o|n<<o|r,Kr=s+e}else Wr=1<<s|n<<o|r,Kr=e}function Ch(e){e.return!==null&&(Ss(e,1),fb(e,1,0))}function kh(e){for(;e===kd;)kd=Hi[--Bi],Hi[Bi]=null,Rd=Hi[--Bi],Hi[Bi]=null;for(;e===As;)As=Ln[--On],Ln[On]=null,Kr=Ln[--On],Ln[On]=null,Wr=Ln[--On],Ln[On]=null}var yn=null,hn=null,Ue=!1,qn=null;function pb(e,t){var n=Mn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function $w(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,yn=e,hn=Ho(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=As!==null?{id:Wr,overflow:Kr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Mn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yn=e,hn=null,!0):!1;default:return!1}}function jg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wg(e){if(Ue){var t=hn;if(t){var n=t;if(!$w(e,t)){if(jg(e))throw Error(D(418));t=Ho(n.nextSibling);var r=yn;t&&$w(e,t)?pb(r,n):(e.flags=e.flags&-4097|2,Ue=!1,yn=e)}}else{if(jg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,yn=e}}}function jw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yn=e}function ed(e){if(e!==yn)return!1;if(!Ue)return jw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bg(e.type,e.memoizedProps)),t&&(t=hn)){if(jg(e))throw mb(),Error(D(418));for(;t;)pb(e,t),t=Ho(t.nextSibling)}if(jw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){hn=Ho(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}hn=null}}else hn=yn?Ho(e.stateNode.nextSibling):null;return!0}function mb(){for(var e=hn;e;)e=Ho(e.nextSibling)}function Zi(){hn=yn=null,Ue=!1}function Rh(e){qn===null?qn=[e]:qn.push(e)}var fO=Zr.ReactCurrentBatchConfig;function sl(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(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function td(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ww(e){var t=e._init;return t(e._payload)}function gb(e){function t(y,g){if(e){var h=y.deletions;h===null?(y.deletions=[g],y.flags|=16):h.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function o(y,g){return y=$o(y,g),y.index=0,y.sibling=null,y}function s(y,g,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<g?(y.flags|=2,g):h):(y.flags|=2,g)):(y.flags|=1048576,g)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,g,h,w){return g===null||g.tag!==6?(g=gg(h,y.mode,w),g.return=y,g):(g=o(g,h),g.return=y,g)}function l(y,g,h,w){var E=h.type;return E===Mi?u(y,g,h.props.children,w,h.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Io&&Ww(E)===g.type)?(w=o(g,h.props),w.ref=sl(y,g,h),w.return=y,w):(w=md(h.type,h.key,h.props,null,y.mode,w),w.ref=sl(y,g,h),w.return=y,w)}function c(y,g,h,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==h.containerInfo||g.stateNode.implementation!==h.implementation?(g=hg(h,y.mode,w),g.return=y,g):(g=o(g,h.children||[]),g.return=y,g)}function u(y,g,h,w,E){return g===null||g.tag!==7?(g=Rs(h,y.mode,w,E),g.return=y,g):(g=o(g,h),g.return=y,g)}function d(y,g,h){if(typeof g=="string"&&g!==""||typeof g=="number")return g=gg(""+g,y.mode,h),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Bu:return h=md(g.type,g.key,g.props,null,y.mode,h),h.ref=sl(y,null,g),h.return=y,h;case Oi:return g=hg(g,y.mode,h),g.return=y,g;case Io:var w=g._init;return d(y,w(g._payload),h)}if(ul(g)||tl(g))return g=Rs(g,y.mode,h,null),g.return=y,g;td(y,g)}return null}function f(y,g,h,w){var E=g!==null?g.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:a(y,g,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Bu:return h.key===E?l(y,g,h,w):null;case Oi:return h.key===E?c(y,g,h,w):null;case Io:return E=h._init,f(y,g,E(h._payload),w)}if(ul(h)||tl(h))return E!==null?null:u(y,g,h,w,null);td(y,h)}return null}function p(y,g,h,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(h)||null,a(g,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Bu:return y=y.get(w.key===null?h:w.key)||null,l(g,y,w,E);case Oi:return y=y.get(w.key===null?h:w.key)||null,c(g,y,w,E);case Io:var k=w._init;return p(y,g,h,k(w._payload),E)}if(ul(w)||tl(w))return y=y.get(h)||null,u(g,y,w,E,null);td(g,w)}return null}function v(y,g,h,w){for(var E=null,k=null,C=g,A=g=0,V=null;C!==null&&A<h.length;A++){C.index>A?(V=C,C=null):V=C.sibling;var N=f(y,C,h[A],w);if(N===null){C===null&&(C=V);break}e&&C&&N.alternate===null&&t(y,C),g=s(N,g,A),k===null?E=N:k.sibling=N,k=N,C=V}if(A===h.length)return n(y,C),Ue&&Ss(y,A),E;if(C===null){for(;A<h.length;A++)C=d(y,h[A],w),C!==null&&(g=s(C,g,A),k===null?E=C:k.sibling=C,k=C);return Ue&&Ss(y,A),E}for(C=r(y,C);A<h.length;A++)V=p(C,y,A,h[A],w),V!==null&&(e&&V.alternate!==null&&C.delete(V.key===null?A:V.key),g=s(V,g,A),k===null?E=V:k.sibling=V,k=V);return e&&C.forEach(function(L){return t(y,L)}),Ue&&Ss(y,A),E}function m(y,g,h,w){var E=tl(h);if(typeof E!="function")throw Error(D(150));if(h=E.call(h),h==null)throw Error(D(151));for(var k=E=null,C=g,A=g=0,V=null,N=h.next();C!==null&&!N.done;A++,N=h.next()){C.index>A?(V=C,C=null):V=C.sibling;var L=f(y,C,N.value,w);if(L===null){C===null&&(C=V);break}e&&C&&L.alternate===null&&t(y,C),g=s(L,g,A),k===null?E=L:k.sibling=L,k=L,C=V}if(N.done)return n(y,C),Ue&&Ss(y,A),E;if(C===null){for(;!N.done;A++,N=h.next())N=d(y,N.value,w),N!==null&&(g=s(N,g,A),k===null?E=N:k.sibling=N,k=N);return Ue&&Ss(y,A),E}for(C=r(y,C);!N.done;A++,N=h.next())N=p(C,y,A,N.value,w),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?A:N.key),g=s(N,g,A),k===null?E=N:k.sibling=N,k=N);return e&&C.forEach(function(J){return t(y,J)}),Ue&&Ss(y,A),E}function x(y,g,h,w){if(typeof h=="object"&&h!==null&&h.type===Mi&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Bu:e:{for(var E=h.key,k=g;k!==null;){if(k.key===E){if(E=h.type,E===Mi){if(k.tag===7){n(y,k.sibling),g=o(k,h.props.children),g.return=y,y=g;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Io&&Ww(E)===k.type){n(y,k.sibling),g=o(k,h.props),g.ref=sl(y,k,h),g.return=y,y=g;break e}n(y,k);break}else t(y,k);k=k.sibling}h.type===Mi?(g=Rs(h.props.children,y.mode,w,h.key),g.return=y,y=g):(w=md(h.type,h.key,h.props,null,y.mode,w),w.ref=sl(y,g,h),w.return=y,y=w)}return i(y);case Oi:e:{for(k=h.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===h.containerInfo&&g.stateNode.implementation===h.implementation){n(y,g.sibling),g=o(g,h.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=hg(h,y.mode,w),g.return=y,y=g}return i(y);case Io:return k=h._init,x(y,g,k(h._payload),w)}if(ul(h))return v(y,g,h,w);if(tl(h))return m(y,g,h,w);td(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,g!==null&&g.tag===6?(n(y,g.sibling),g=o(g,h),g.return=y,y=g):(n(y,g),g=gg(h,y.mode,w),g.return=y,y=g),i(y)):n(y,g)}return x}var Ji=gb(!0),hb=gb(!1),Pd=Go(null),Ad=null,Ui=null,Ph=null;function Ah(){Ph=Ui=Ad=null}function Ih(e){var t=Pd.current;ze(Pd),e._currentValue=t}function Kg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qi(e,t){Ad=e,Ph=Ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(sn=!0),e.firstContext=null)}function _n(e){var t=e._currentValue;if(Ph!==e)if(e={context:e,memoizedValue:t,next:null},Ui===null){if(Ad===null)throw Error(D(308));Ui=e,Ad.dependencies={lanes:0,firstContext:e}}else Ui=Ui.next=e;return t}var Ts=null;function Lh(e){Ts===null?Ts=[e]:Ts.push(e)}function yb(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Lh(t)):(n.next=o.next,o.next=n),t.interleaved=n,Xr(e,r)}function Xr(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}var Lo=!1;function Oh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vb(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 Gr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Se&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Xr(e,n)}return o=r.interleaved,o===null?(t.next=t,Lh(r)):(t.next=o.next,o.next=t),r.interleaved=t,Xr(e,n)}function ld(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yh(e,n)}}function Kw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,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 Id(e,t,n,r){var o=e.updateQueue;Lo=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,m=a;switch(f=t,p=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ge({},d,f);break e;case 2:Lo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Ls|=i,e.lanes=i,e.memoizedState=d}}function Gw(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(D(191,o));o.call(r)}}}var Vl={},kr=Go(Vl),Ml=Go(Vl),Nl=Go(Vl);function Cs(e){if(e===Vl)throw Error(D(174));return e}function Mh(e,t){switch(De(Nl,t),De(Ml,e),De(kr,Vl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kg(t,e)}ze(kr),De(kr,t)}function ea(){ze(kr),ze(Ml),ze(Nl)}function xb(e){Cs(Nl.current);var t=Cs(kr.current),n=kg(t,e.type);t!==n&&(De(Ml,e),De(kr,n))}function Nh(e){Ml.current===e&&(ze(kr),ze(Ml))}var We=Go(0);function Ld(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&128)!==0)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 cg=[];function _h(){for(var e=0;e<cg.length;e++)cg[e]._workInProgressVersionPrimary=null;cg.length=0}var cd=Zr.ReactCurrentDispatcher,ug=Zr.ReactCurrentBatchConfig,Is=0,Ke=null,ot=null,pt=null,Od=!1,vl=!1,_l=0,pO=0;function Pt(){throw Error(D(321))}function Dh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Fh(e,t,n,r,o,s){if(Is=s,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cd.current=e===null||e.memoizedState===null?yO:vO,e=n(r,o),vl){s=0;do{if(vl=!1,_l=0,25<=s)throw Error(D(301));s+=1,pt=ot=null,t.updateQueue=null,cd.current=xO,e=n(r,o)}while(vl)}if(cd.current=Md,t=ot!==null&&ot.next!==null,Is=0,pt=ot=Ke=null,Od=!1,t)throw Error(D(300));return e}function zh(){var e=_l!==0;return _l=0,e}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ke.memoizedState=pt=e:pt=pt.next=e,pt}function Dn(){if(ot===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=pt===null?Ke.memoizedState:pt.next;if(t!==null)pt=t,ot=e;else{if(e===null)throw Error(D(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},pt===null?Ke.memoizedState=pt=e:pt=pt.next=e}return pt}function Dl(e,t){return typeof t=="function"?t(e):t}function dg(e){var t=Dn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Is&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=r):l=l.next=d,Ke.lanes|=u,Ls|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Qn(r,t.memoizedState)||(sn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ke.lanes|=s,Ls|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function fg(e){var t=Dn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Qn(s,t.memoizedState)||(sn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function wb(){}function Sb(e,t){var n=Ke,r=Dn(),o=t(),s=!Qn(r.memoizedState,o);if(s&&(r.memoizedState=o,sn=!0),r=r.queue,Hh(Tb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,Fl(9,Eb.bind(null,n,r,o,t),void 0,null),mt===null)throw Error(D(349));(Is&30)!==0||bb(n,t,o)}return o}function bb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Eb(e,t,n,r){t.value=n,t.getSnapshot=r,Cb(t)&&kb(e)}function Tb(e,t,n){return n(function(){Cb(t)&&kb(e)})}function Cb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function kb(e){var t=Xr(e,1);t!==null&&Xn(t,e,1,-1)}function qw(e){var t=Er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:e},t.queue=e,e=e.dispatch=hO.bind(null,Ke,e),[t.memoizedState,e]}function Fl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 Rb(){return Dn().memoizedState}function ud(e,t,n,r){var o=Er();Ke.flags|=e,o.memoizedState=Fl(1|t,n,void 0,r===void 0?null:r)}function Wd(e,t,n,r){var o=Dn();r=r===void 0?null:r;var s=void 0;if(ot!==null){var i=ot.memoizedState;if(s=i.destroy,r!==null&&Dh(r,i.deps)){o.memoizedState=Fl(t,n,s,r);return}}Ke.flags|=e,o.memoizedState=Fl(1|t,n,s,r)}function Yw(e,t){return ud(8390656,8,e,t)}function Hh(e,t){return Wd(2048,8,e,t)}function Pb(e,t){return Wd(4,2,e,t)}function Ab(e,t){return Wd(4,4,e,t)}function Ib(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 Lb(e,t,n){return n=n!=null?n.concat([e]):null,Wd(4,4,Ib.bind(null,t,e),n)}function Bh(){}function Ob(e,t){var n=Dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Mb(e,t){var n=Dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Dh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Nb(e,t,n){return(Is&21)===0?(e.baseState&&(e.baseState=!1,sn=!0),e.memoizedState=n):(Qn(n,t)||(n=HS(),Ke.lanes|=n,Ls|=n,e.baseState=!0),t)}function mO(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=ug.transition;ug.transition={};try{e(!1),t()}finally{Ie=n,ug.transition=r}}function _b(){return Dn().memoizedState}function gO(e,t,n){var r=Vo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Db(e))Fb(t,n);else if(n=yb(e,t,n,r),n!==null){var o=Ut();Xn(n,e,r,o),zb(n,t,r)}}function hO(e,t,n){var r=Vo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Db(e))Fb(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,i)){var l=t.interleaved;l===null?(o.next=o,Lh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=yb(e,t,o,r),n!==null&&(o=Ut(),Xn(n,e,r,o),zb(n,t,r))}}function Db(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Fb(e,t){vl=Od=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zb(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yh(e,n)}}var Md={readContext:_n,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},yO={readContext:_n,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:Yw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ud(4194308,4,Ib.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ud(4194308,4,e,t)},useInsertionEffect:function(e,t){return ud(4,2,e,t)},useMemo:function(e,t){var n=Er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Er();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gO.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:qw,useDebugValue:Bh,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=qw(!1),t=e[0];return e=mO.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Er();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),mt===null)throw Error(D(349));(Is&30)!==0||bb(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Yw(Tb.bind(null,r,s,e),[e]),r.flags|=2048,Fl(9,Eb.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Er(),t=mt.identifierPrefix;if(Ue){var n=Kr,r=Wr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_l++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vO={readContext:_n,useCallback:Ob,useContext:_n,useEffect:Hh,useImperativeHandle:Lb,useInsertionEffect:Pb,useLayoutEffect:Ab,useMemo:Mb,useReducer:dg,useRef:Rb,useState:function(){return dg(Dl)},useDebugValue:Bh,useDeferredValue:function(e){var t=Dn();return Nb(t,ot.memoizedState,e)},useTransition:function(){var e=dg(Dl)[0],t=Dn().memoizedState;return[e,t]},useMutableSource:wb,useSyncExternalStore:Sb,useId:_b,unstable_isNewReconciler:!1},xO={readContext:_n,useCallback:Ob,useContext:_n,useEffect:Hh,useImperativeHandle:Lb,useInsertionEffect:Pb,useLayoutEffect:Ab,useMemo:Mb,useReducer:fg,useRef:Rb,useState:function(){return fg(Dl)},useDebugValue:Bh,useDeferredValue:function(e){var t=Dn();return ot===null?t.memoizedState=e:Nb(t,ot.memoizedState,e)},useTransition:function(){var e=fg(Dl)[0],t=Dn().memoizedState;return[e,t]},useMutableSource:wb,useSyncExternalStore:Sb,useId:_b,unstable_isNewReconciler:!1};function Kn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Gg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Kd={isMounted:function(e){return(e=e._reactInternals)?Ns(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Vo(e),s=Gr(r,o);s.payload=t,n!=null&&(s.callback=n),t=Bo(e,s,o),t!==null&&(Xn(t,e,o,r),ld(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Vo(e),s=Gr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Bo(e,s,o),t!==null&&(Xn(t,e,o,r),ld(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Vo(e),o=Gr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Bo(e,o,r),t!==null&&(Xn(t,e,r,n),ld(t,e,r))}};function Xw(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Al(n,r)||!Al(o,s):!0}function Hb(e,t,n){var r=!1,o=Wo,s=t.contextType;return typeof s=="object"&&s!==null?s=_n(s):(o=ln(t)?Ps:Lt.current,r=t.contextTypes,s=(r=r!=null)?Qi(e,o):Wo),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Kd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Qw(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&&Kd.enqueueReplaceState(t,t.state,null)}function qg(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Oh(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=_n(s):(s=ln(t)?Ps:Lt.current,o.context=Qi(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Gg(e,t,s,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&&Kd.enqueueReplaceState(o,o.state,null),Id(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ta(e,t){try{var n="",r=t;do n+=YI(r),r=r.return;while(r);var o=n}catch(s){o=`
5
+ `+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Zm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?cl(e):""}function eL(e){switch(e.tag){case 5:return cl(e.type);case 16:return cl("Lazy");case 13:return cl("Suspense");case 19:return cl("SuspenseList");case 0:case 2:case 15:return e=Jm(e.type,!1),e;case 11:return e=Jm(e.type.render,!1),e;case 1:return e=Jm(e.type,!0),e;default:return""}}function Eg(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 Ni:return"Fragment";case Mi:return"Portal";case wg:return"Profiler";case mh:return"StrictMode";case Sg:return"Suspense";case bg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case wS:return(e.displayName||"Context")+".Consumer";case xS:return(e._context.displayName||"Context")+".Provider";case gh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hh:return t=e.displayName||null,t!==null?t:Eg(e.type)||"Memo";case Io:t=e._payload,e=e._init;try{return Eg(e(t))}catch(n){}}return null}function tL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Eg(t);case 8:return t===mh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nL(e){var t=bS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $u(e){e._valueTracker||(e._valueTracker=nL(e))}function ES(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=bS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yd(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Tg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function gw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jo(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 TS(e,t){t=t.checked,t!=null&&ph(e,"checked",t,!1)}function Cg(e,t){TS(e,t);var n=jo(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")?kg(e,t.type,n):t.hasOwnProperty("defaultValue")&&kg(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hw(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 kg(e,t,n){(t!=="number"||yd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ul=Array.isArray;function ji(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=""+jo(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 Rg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ul(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:jo(n)}}function CS(e,t){var n=jo(t.value),r=jo(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 vw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kS(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 Pg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ju,RS=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ju=ju||document.createElement("div"),ju.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ju.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function El(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pl={animationIterationCount:!0,aspectRatio:!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},rL=["Webkit","ms","Moz","O"];Object.keys(pl).forEach(function(e){rL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pl[t]=pl[e]})});function PS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pl.hasOwnProperty(e)&&pl[e]?(""+t).trim():t+"px"}function AS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=PS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var oL=Ge({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 Ag(e,t){if(t){if(oL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Ig(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}}var Lg=null;function yh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mg=null,Wi=null,Ki=null;function xw(e){if(e=Ul(e)){if(typeof Mg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Wd(t),Mg(e.stateNode,e.type,t))}}function IS(e){Wi?Ki?Ki.push(e):Ki=[e]:Wi=e}function LS(){if(Wi){var e=Wi,t=Ki;if(Ki=Wi=null,xw(e),t)for(e=0;e<t.length;e++)xw(t[e])}}function MS(e,t){return e(t)}function NS(){}var eg=!1;function OS(e,t,n){if(eg)return e(t,n);eg=!0;try{return MS(e,t,n)}finally{eg=!1,(Wi!==null||Ki!==null)&&(NS(),LS())}}function Tl(e,t){var n=e.stateNode;if(n===null)return null;var r=Wd(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(D(231,t,typeof n));return n}var Ng=!1;if(qr)try{Ii={},Object.defineProperty(Ii,"passive",{get:function(){Ng=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch(e){Ng=!1}var Ii;function sL(e,t,n,r,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ml=!1,vd=null,xd=!1,Og=null,iL={onError:function(e){ml=!0,vd=e}};function aL(e,t,n,r,o,s,i,a,l){ml=!1,vd=null,sL.apply(iL,arguments)}function lL(e,t,n,r,o,s,i,a,l){if(aL.apply(this,arguments),ml){if(ml){var c=vd;ml=!1,vd=null}else throw Error(D(198));xd||(xd=!0,Og=c)}}function Os(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function _S(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 ww(e){if(Os(e)!==e)throw Error(D(188))}function cL(e){var t=e.alternate;if(!t){if(t=Os(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return ww(o),e;if(s===r)return ww(o),t;s=s.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function DS(e){return e=cL(e),e!==null?FS(e):null}function FS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=FS(e);if(t!==null)return t;e=e.sibling}return null}var zS=vn.unstable_scheduleCallback,Sw=vn.unstable_cancelCallback,uL=vn.unstable_shouldYield,dL=vn.unstable_requestPaint,Je=vn.unstable_now,fL=vn.unstable_getCurrentPriorityLevel,vh=vn.unstable_ImmediatePriority,HS=vn.unstable_UserBlockingPriority,wd=vn.unstable_NormalPriority,pL=vn.unstable_LowPriority,BS=vn.unstable_IdlePriority,Ud=null,Cr=null;function mL(e){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Ud,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:yL,gL=Math.log,hL=Math.LN2;function yL(e){return e>>>=0,e===0?32:31-(gL(e)/hL|0)|0}var Wu=64,Ku=4194304;function dl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=dl(a):(s&=i,s!==0&&(r=dl(s)))}else i=n&~o,i!==0?r=dl(i):s!==0&&(r=dl(s));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function vL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Yn(s),a=1<<i,l=o[i];l===-1?((a&n)===0||(a&r)!==0)&&(o[i]=vL(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function _g(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function US(){var e=Wu;return Wu<<=1,(Wu&4194240)===0&&(Wu=64),e}function tg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function wL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Yn(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function xh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ie=0;function VS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var $S,wh,jS,WS,KS,Dg=!1,Gu=[],Do=null,Fo=null,zo=null,Cl=new Map,kl=new Map,Mo=[],SL="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 bw(e,t){switch(e){case"focusin":case"focusout":Do=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":Cl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function nl(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Ul(t),t!==null&&wh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function bL(e,t,n,r,o){switch(t){case"focusin":return Do=nl(Do,e,t,n,r,o),!0;case"dragenter":return Fo=nl(Fo,e,t,n,r,o),!0;case"mouseover":return zo=nl(zo,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Cl.set(s,nl(Cl.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,kl.set(s,nl(kl.get(s)||null,e,t,n,r,o)),!0}return!1}function GS(e){var t=Es(e.target);if(t!==null){var n=Os(t);if(n!==null){if(t=n.tag,t===13){if(t=_S(n),t!==null){e.blockedOn=t,KS(e.priority,function(){jS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ad(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Fg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Lg=r,n.target.dispatchEvent(r),Lg=null}else return t=Ul(n),t!==null&&wh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ew(e,t,n){ad(e)&&n.delete(t)}function EL(){Dg=!1,Do!==null&&ad(Do)&&(Do=null),Fo!==null&&ad(Fo)&&(Fo=null),zo!==null&&ad(zo)&&(zo=null),Cl.forEach(Ew),kl.forEach(Ew)}function rl(e,t){e.blockedOn===t&&(e.blockedOn=null,Dg||(Dg=!0,vn.unstable_scheduleCallback(vn.unstable_NormalPriority,EL)))}function Rl(e){function t(o){return rl(o,e)}if(0<Gu.length){rl(Gu[0],e);for(var n=1;n<Gu.length;n++){var r=Gu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Do!==null&&rl(Do,e),Fo!==null&&rl(Fo,e),zo!==null&&rl(zo,e),Cl.forEach(t),kl.forEach(t),n=0;n<Mo.length;n++)r=Mo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mo.length&&(n=Mo[0],n.blockedOn===null);)GS(n),n.blockedOn===null&&Mo.shift()}var Gi=Zr.ReactCurrentBatchConfig,bd=!0;function TL(e,t,n,r){var o=Ie,s=Gi.transition;Gi.transition=null;try{Ie=1,Sh(e,t,n,r)}finally{Ie=o,Gi.transition=s}}function CL(e,t,n,r){var o=Ie,s=Gi.transition;Gi.transition=null;try{Ie=4,Sh(e,t,n,r)}finally{Ie=o,Gi.transition=s}}function Sh(e,t,n,r){if(bd){var o=Fg(e,t,n,r);if(o===null)lg(e,t,r,Ed,n),bw(e,r);else if(bL(o,e,t,n,r))r.stopPropagation();else if(bw(e,r),t&4&&-1<SL.indexOf(e)){for(;o!==null;){var s=Ul(o);if(s!==null&&$S(s),s=Fg(e,t,n,r),s===null&&lg(e,t,r,Ed,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else lg(e,t,r,null,n)}}var Ed=null;function Fg(e,t,n,r){if(Ed=null,e=yh(r),e=Es(e),e!==null)if(t=Os(e),t===null)e=null;else if(n=t.tag,n===13){if(e=_S(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ed=e,null}function qS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fL()){case vh:return 1;case HS:return 4;case wd:case pL:return 16;case BS:return 536870912;default:return 16}default:return 16}}var Oo=null,bh=null,ld=null;function YS(){if(ld)return ld;var e,t=bh,n=t.length,r,o="value"in Oo?Oo.value:Oo.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return ld=o.slice(e,1<r?1-r:void 0)}function cd(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 qu(){return!0}function Tw(){return!1}function xn(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?qu:Tw,this.isPropagationStopped=Tw,this}return Ge(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=qu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qu)},persist:function(){},isPersistent:qu}),t}var ra={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Eh=xn(ra),Bl=Ge({},ra,{view:0,detail:0}),kL=xn(Bl),ng,rg,ol,Vd=Ge({},Bl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Th,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!==ol&&(ol&&e.type==="mousemove"?(ng=e.screenX-ol.screenX,rg=e.screenY-ol.screenY):rg=ng=0,ol=e),ng)},movementY:function(e){return"movementY"in e?e.movementY:rg}}),Cw=xn(Vd),RL=Ge({},Vd,{dataTransfer:0}),PL=xn(RL),AL=Ge({},Bl,{relatedTarget:0}),og=xn(AL),IL=Ge({},ra,{animationName:0,elapsedTime:0,pseudoElement:0}),LL=xn(IL),ML=Ge({},ra,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),NL=xn(ML),OL=Ge({},ra,{data:0}),kw=xn(OL),_L={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DL={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"},FL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=FL[e])?!!t[e]:!1}function Th(){return zL}var HL=Ge({},Bl,{key:function(e){if(e.key){var t=_L[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?DL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Th,charCode:function(e){return e.type==="keypress"?cd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),BL=xn(HL),UL=Ge({},Vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rw=xn(UL),VL=Ge({},Bl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Th}),$L=xn(VL),jL=Ge({},ra,{propertyName:0,elapsedTime:0,pseudoElement:0}),WL=xn(jL),KL=Ge({},Vd,{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}),GL=xn(KL),qL=[9,13,27,32],Ch=qr&&"CompositionEvent"in window,gl=null;qr&&"documentMode"in document&&(gl=document.documentMode);var YL=qr&&"TextEvent"in window&&!gl,XS=qr&&(!Ch||gl&&8<gl&&11>=gl),Pw=" ",Aw=!1;function QS(e,t){switch(e){case"keyup":return qL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oi=!1;function XL(e,t){switch(e){case"compositionend":return ZS(t);case"keypress":return t.which!==32?null:(Aw=!0,Pw);case"textInput":return e=t.data,e===Pw&&Aw?null:e;default:return null}}function QL(e,t){if(Oi)return e==="compositionend"||!Ch&&QS(e,t)?(e=YS(),ld=bh=Oo=null,Oi=!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 XS&&t.locale!=="ko"?null:t.data;default:return null}}var ZL={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 Iw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ZL[e.type]:t==="textarea"}function JS(e,t,n,r){IS(r),t=Td(t,"onChange"),0<t.length&&(n=new Eh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hl=null,Pl=null;function JL(e){ub(e,0)}function $d(e){var t=Fi(e);if(ES(t))return e}function eM(e,t){if(e==="change")return t}var eb=!1;qr&&(qr?(Xu="oninput"in document,Xu||(sg=document.createElement("div"),sg.setAttribute("oninput","return;"),Xu=typeof sg.oninput=="function"),Yu=Xu):Yu=!1,eb=Yu&&(!document.documentMode||9<document.documentMode));var Yu,Xu,sg;function Lw(){hl&&(hl.detachEvent("onpropertychange",tb),Pl=hl=null)}function tb(e){if(e.propertyName==="value"&&$d(Pl)){var t=[];JS(t,Pl,e,yh(e)),OS(JL,t)}}function tM(e,t,n){e==="focusin"?(Lw(),hl=t,Pl=n,hl.attachEvent("onpropertychange",tb)):e==="focusout"&&Lw()}function nM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $d(Pl)}function rM(e,t){if(e==="click")return $d(t)}function oM(e,t){if(e==="input"||e==="change")return $d(t)}function sM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:sM;function Al(e,t){if(Qn(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++){var o=n[r];if(!xg.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function Mw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nw(e,t){var n=Mw(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=Mw(n)}}function nb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rb(){for(var e=window,t=yd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=yd(e.document)}return t}function kh(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")}function iM(e){var t=rb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nb(n.ownerDocument.documentElement,n)){if(r!==null&&kh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Nw(n,s);var i=Nw(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var aM=qr&&"documentMode"in document&&11>=document.documentMode,_i=null,zg=null,yl=null,Hg=!1;function Ow(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hg||_i==null||_i!==yd(r)||(r=_i,"selectionStart"in r&&kh(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}),yl&&Al(yl,r)||(yl=r,r=Td(zg,"onSelect"),0<r.length&&(t=new Eh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_i)))}function Qu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Di={animationend:Qu("Animation","AnimationEnd"),animationiteration:Qu("Animation","AnimationIteration"),animationstart:Qu("Animation","AnimationStart"),transitionend:Qu("Transition","TransitionEnd")},ig={},ob={};qr&&(ob=document.createElement("div").style,"AnimationEvent"in window||(delete Di.animationend.animation,delete Di.animationiteration.animation,delete Di.animationstart.animation),"TransitionEvent"in window||delete Di.transitionend.transition);function jd(e){if(ig[e])return ig[e];if(!Di[e])return e;var t=Di[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ob)return ig[e]=t[n];return e}var sb=jd("animationend"),ib=jd("animationiteration"),ab=jd("animationstart"),lb=jd("transitionend"),cb=new Map,_w="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ko(e,t){cb.set(e,t),Ns(t,[e])}for(Zu=0;Zu<_w.length;Zu++)Ju=_w[Zu],Dw=Ju.toLowerCase(),Fw=Ju[0].toUpperCase()+Ju.slice(1),Ko(Dw,"on"+Fw);var Ju,Dw,Fw,Zu;Ko(sb,"onAnimationEnd");Ko(ib,"onAnimationIteration");Ko(ab,"onAnimationStart");Ko("dblclick","onDoubleClick");Ko("focusin","onFocus");Ko("focusout","onBlur");Ko(lb,"onTransitionEnd");Xi("onMouseEnter",["mouseout","mouseover"]);Xi("onMouseLeave",["mouseout","mouseover"]);Xi("onPointerEnter",["pointerout","pointerover"]);Xi("onPointerLeave",["pointerout","pointerover"]);Ns("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ns("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ns("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ns("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ns("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ns("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lM=new Set("cancel close invalid load scroll toggle".split(" ").concat(fl));function zw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lL(r,t,void 0,e),e.currentTarget=null}function ub(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 s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;zw(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;zw(o,a,c),s=l}}}if(xd)throw e=Og,xd=!1,Og=null,e}function Fe(e,t){var n=t[jg];n===void 0&&(n=t[jg]=new Set);var r=e+"__bubble";n.has(r)||(db(t,e,2,!1),n.add(r))}function ag(e,t,n){var r=0;t&&(r|=4),db(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function Il(e){if(!e[ed]){e[ed]=!0,vS.forEach(function(n){n!=="selectionchange"&&(lM.has(n)||ag(n,!1,e),ag(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ed]||(t[ed]=!0,ag("selectionchange",!1,t))}}function db(e,t,n,r){switch(qS(t)){case 1:var o=TL;break;case 4:o=CL;break;default:o=Sh}n=o.bind(null,t,n,e),o=void 0,!Ng||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 lg(e,t,n,r,o){var s=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=Es(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}OS(function(){var c=s,u=yh(n),d=[];e:{var f=cb.get(e);if(f!==void 0){var p=Eh,v=e;switch(e){case"keypress":if(cd(n)===0)break e;case"keydown":case"keyup":p=BL;break;case"focusin":v="focus",p=og;break;case"focusout":v="blur",p=og;break;case"beforeblur":case"afterblur":p=og;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Cw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=PL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=$L;break;case sb:case ib:case ab:p=LL;break;case lb:p=WL;break;case"scroll":p=kL;break;case"wheel":p=GL;break;case"copy":case"cut":case"paste":p=NL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Rw}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var h=c,m;h!==null;){m=h;var w=m.stateNode;if(m.tag===5&&w!==null&&(m=w,y!==null&&(w=Tl(h,y),w!=null&&g.push(Ll(h,w,m)))),x)break;h=h.return}0<g.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==Lg&&(v=n.relatedTarget||n.fromElement)&&(Es(v)||v[Yr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?Es(v):null,v!==null&&(x=Os(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(g=Cw,w="onMouseLeave",y="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(g=Rw,w="onPointerLeave",y="onPointerEnter",h="pointer"),x=p==null?f:Fi(p),m=v==null?f:Fi(v),f=new g(w,h+"leave",p,n,u),f.target=x,f.relatedTarget=m,w=null,Es(u)===c&&(g=new g(y,h+"enter",v,n,u),g.target=m,g.relatedTarget=x,w=g),x=w,p&&v)t:{for(g=p,y=v,h=0,m=g;m;m=Li(m))h++;for(m=0,w=y;w;w=Li(w))m++;for(;0<h-m;)g=Li(g),h--;for(;0<m-h;)y=Li(y),m--;for(;h--;){if(g===y||y!==null&&g===y.alternate)break t;g=Li(g),y=Li(y)}g=null}else g=null;p!==null&&Hw(d,f,p,g,!1),v!==null&&x!==null&&Hw(d,x,v,g,!0)}}e:{if(f=c?Fi(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=eM;else if(Iw(f))if(eb)E=oM;else{E=nM;var k=tM}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=rM);if(E&&(E=E(e,c))){JS(d,E,n,u);break e}k&&k(e,f,c),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&kg(f,"number",f.value)}switch(k=c?Fi(c):window,e){case"focusin":(Iw(k)||k.contentEditable==="true")&&(_i=k,zg=c,yl=null);break;case"focusout":yl=zg=_i=null;break;case"mousedown":Hg=!0;break;case"contextmenu":case"mouseup":case"dragend":Hg=!1,Ow(d,n,u);break;case"selectionchange":if(aM)break;case"keydown":case"keyup":Ow(d,n,u)}var C;if(Ch)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Oi?QS(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(XS&&n.locale!=="ko"&&(Oi||A!=="onCompositionStart"?A==="onCompositionEnd"&&Oi&&(C=YS()):(Oo=u,bh="value"in Oo?Oo.value:Oo.textContent,Oi=!0)),k=Td(c,A),0<k.length&&(A=new kw(A,e,null,n,u),d.push({event:A,listeners:k}),C?A.data=C:(C=ZS(n),C!==null&&(A.data=C)))),(C=YL?XL(e,n):QL(e,n))&&(c=Td(c,"onBeforeInput"),0<c.length&&(u=new kw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=C))}ub(d,t)})}function Ll(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Tl(e,n),s!=null&&r.unshift(Ll(e,s,o)),s=Tl(e,t),s!=null&&r.push(Ll(e,s,o))),e=e.return}return r}function Li(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Hw(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=Tl(n,s),l!=null&&i.unshift(Ll(n,l,a))):o||(l=Tl(n,s),l!=null&&i.push(Ll(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var cM=/\r\n?/g,uM=/\u0000|\uFFFD/g;function Bw(e){return(typeof e=="string"?e:""+e).replace(cM,`
6
+ `).replace(uM,"")}function td(e,t,n){if(t=Bw(t),Bw(e)!==t&&n)throw Error(D(425))}function Cd(){}var Bg=null,Ug=null;function Vg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $g=typeof setTimeout=="function"?setTimeout:void 0,dM=typeof clearTimeout=="function"?clearTimeout:void 0,Uw=typeof Promise=="function"?Promise:void 0,fM=typeof queueMicrotask=="function"?queueMicrotask:typeof Uw!="undefined"?function(e){return Uw.resolve(null).then(e).catch(pM)}:$g;function pM(e){setTimeout(function(){throw e})}function cg(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Rl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Rl(t)}function Ho(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Vw(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 oa=Math.random().toString(36).slice(2),Tr="__reactFiber$"+oa,Ml="__reactProps$"+oa,Yr="__reactContainer$"+oa,jg="__reactEvents$"+oa,mM="__reactListeners$"+oa,gM="__reactHandles$"+oa;function Es(e){var t=e[Tr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yr]||n[Tr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vw(e);e!==null;){if(n=e[Tr])return n;e=Vw(e)}return t}e=n,n=e.parentNode}return null}function Ul(e){return e=e[Tr]||e[Yr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Wd(e){return e[Ml]||null}var Wg=[],zi=-1;function Go(e){return{current:e}}function ze(e){0>zi||(e.current=Wg[zi],Wg[zi]=null,zi--)}function De(e,t){zi++,Wg[zi]=e.current,e.current=t}var Wo={},Lt=Go(Wo),an=Go(!1),Ps=Wo;function Qi(e,t){var n=e.type.contextTypes;if(!n)return Wo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ln(e){return e=e.childContextTypes,e!=null}function kd(){ze(an),ze(Lt)}function $w(e,t,n){if(Lt.current!==Wo)throw Error(D(168));De(Lt,t),De(an,n)}function fb(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,tL(e)||"Unknown",o));return Ge({},n,r)}function Rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wo,Ps=Lt.current,De(Lt,e),De(an,an.current),!0}function jw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=fb(e,t,Ps),r.__reactInternalMemoizedMergedChildContext=e,ze(an),ze(Lt),De(Lt,e)):ze(an),De(an,n)}var jr=null,Kd=!1,ug=!1;function pb(e){jr===null?jr=[e]:jr.push(e)}function hM(e){Kd=!0,pb(e)}function qo(){if(!ug&&jr!==null){ug=!0;var e=0,t=Ie;try{var n=jr;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jr=null,Kd=!1}catch(o){throw jr!==null&&(jr=jr.slice(e+1)),zS(vh,qo),o}finally{Ie=t,ug=!1}}return null}var Hi=[],Bi=0,Pd=null,Ad=0,Ln=[],Mn=0,As=null,Wr=1,Kr="";function Ss(e,t){Hi[Bi++]=Ad,Hi[Bi++]=Pd,Pd=e,Ad=t}function mb(e,t,n){Ln[Mn++]=Wr,Ln[Mn++]=Kr,Ln[Mn++]=As,As=e;var r=Wr;e=Kr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var s=32-Yn(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Wr=1<<32-Yn(t)+o|n<<o|r,Kr=s+e}else Wr=1<<s|n<<o|r,Kr=e}function Rh(e){e.return!==null&&(Ss(e,1),mb(e,1,0))}function Ph(e){for(;e===Pd;)Pd=Hi[--Bi],Hi[Bi]=null,Ad=Hi[--Bi],Hi[Bi]=null;for(;e===As;)As=Ln[--Mn],Ln[Mn]=null,Kr=Ln[--Mn],Ln[Mn]=null,Wr=Ln[--Mn],Ln[Mn]=null}var yn=null,hn=null,Ue=!1,qn=null;function gb(e,t){var n=Nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ww(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,yn=e,hn=Ho(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=As!==null?{id:Wr,overflow:Kr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yn=e,hn=null,!0):!1;default:return!1}}function Kg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gg(e){if(Ue){var t=hn;if(t){var n=t;if(!Ww(e,t)){if(Kg(e))throw Error(D(418));t=Ho(n.nextSibling);var r=yn;t&&Ww(e,t)?gb(r,n):(e.flags=e.flags&-4097|2,Ue=!1,yn=e)}}else{if(Kg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,yn=e}}}function Kw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yn=e}function nd(e){if(e!==yn)return!1;if(!Ue)return Kw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vg(e.type,e.memoizedProps)),t&&(t=hn)){if(Kg(e))throw hb(),Error(D(418));for(;t;)gb(e,t),t=Ho(t.nextSibling)}if(Kw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){hn=Ho(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}hn=null}}else hn=yn?Ho(e.stateNode.nextSibling):null;return!0}function hb(){for(var e=hn;e;)e=Ho(e.nextSibling)}function Zi(){hn=yn=null,Ue=!1}function Ah(e){qn===null?qn=[e]:qn.push(e)}var yM=Zr.ReactCurrentBatchConfig;function sl(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(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function rd(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gw(e){var t=e._init;return t(e._payload)}function yb(e){function t(y,h){if(e){var m=y.deletions;m===null?(y.deletions=[h],y.flags|=16):m.push(h)}}function n(y,h){if(!e)return null;for(;h!==null;)t(y,h),h=h.sibling;return null}function r(y,h){for(y=new Map;h!==null;)h.key!==null?y.set(h.key,h):y.set(h.index,h),h=h.sibling;return y}function o(y,h){return y=$o(y,h),y.index=0,y.sibling=null,y}function s(y,h,m){return y.index=m,e?(m=y.alternate,m!==null?(m=m.index,m<h?(y.flags|=2,h):m):(y.flags|=2,h)):(y.flags|=1048576,h)}function i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,h,m,w){return h===null||h.tag!==6?(h=yg(m,y.mode,w),h.return=y,h):(h=o(h,m),h.return=y,h)}function l(y,h,m,w){var E=m.type;return E===Ni?u(y,h,m.props.children,w,m.key):h!==null&&(h.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Io&&Gw(E)===h.type)?(w=o(h,m.props),w.ref=sl(y,h,m),w.return=y,w):(w=hd(m.type,m.key,m.props,null,y.mode,w),w.ref=sl(y,h,m),w.return=y,w)}function c(y,h,m,w){return h===null||h.tag!==4||h.stateNode.containerInfo!==m.containerInfo||h.stateNode.implementation!==m.implementation?(h=vg(m,y.mode,w),h.return=y,h):(h=o(h,m.children||[]),h.return=y,h)}function u(y,h,m,w,E){return h===null||h.tag!==7?(h=Rs(m,y.mode,w,E),h.return=y,h):(h=o(h,m),h.return=y,h)}function d(y,h,m){if(typeof h=="string"&&h!==""||typeof h=="number")return h=yg(""+h,y.mode,m),h.return=y,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Vu:return m=hd(h.type,h.key,h.props,null,y.mode,m),m.ref=sl(y,null,h),m.return=y,m;case Mi:return h=vg(h,y.mode,m),h.return=y,h;case Io:var w=h._init;return d(y,w(h._payload),m)}if(ul(h)||tl(h))return h=Rs(h,y.mode,m,null),h.return=y,h;rd(y,h)}return null}function f(y,h,m,w){var E=h!==null?h.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return E!==null?null:a(y,h,""+m,w);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vu:return m.key===E?l(y,h,m,w):null;case Mi:return m.key===E?c(y,h,m,w):null;case Io:return E=m._init,f(y,h,E(m._payload),w)}if(ul(m)||tl(m))return E!==null?null:u(y,h,m,w,null);rd(y,m)}return null}function p(y,h,m,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(m)||null,a(h,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vu:return y=y.get(w.key===null?m:w.key)||null,l(h,y,w,E);case Mi:return y=y.get(w.key===null?m:w.key)||null,c(h,y,w,E);case Io:var k=w._init;return p(y,h,m,k(w._payload),E)}if(ul(w)||tl(w))return y=y.get(m)||null,u(h,y,w,E,null);rd(h,w)}return null}function v(y,h,m,w){for(var E=null,k=null,C=h,A=h=0,V=null;C!==null&&A<m.length;A++){C.index>A?(V=C,C=null):V=C.sibling;var O=f(y,C,m[A],w);if(O===null){C===null&&(C=V);break}e&&C&&O.alternate===null&&t(y,C),h=s(O,h,A),k===null?E=O:k.sibling=O,k=O,C=V}if(A===m.length)return n(y,C),Ue&&Ss(y,A),E;if(C===null){for(;A<m.length;A++)C=d(y,m[A],w),C!==null&&(h=s(C,h,A),k===null?E=C:k.sibling=C,k=C);return Ue&&Ss(y,A),E}for(C=r(y,C);A<m.length;A++)V=p(C,y,A,m[A],w),V!==null&&(e&&V.alternate!==null&&C.delete(V.key===null?A:V.key),h=s(V,h,A),k===null?E=V:k.sibling=V,k=V);return e&&C.forEach(function(L){return t(y,L)}),Ue&&Ss(y,A),E}function g(y,h,m,w){var E=tl(m);if(typeof E!="function")throw Error(D(150));if(m=E.call(m),m==null)throw Error(D(151));for(var k=E=null,C=h,A=h=0,V=null,O=m.next();C!==null&&!O.done;A++,O=m.next()){C.index>A?(V=C,C=null):V=C.sibling;var L=f(y,C,O.value,w);if(L===null){C===null&&(C=V);break}e&&C&&L.alternate===null&&t(y,C),h=s(L,h,A),k===null?E=L:k.sibling=L,k=L,C=V}if(O.done)return n(y,C),Ue&&Ss(y,A),E;if(C===null){for(;!O.done;A++,O=m.next())O=d(y,O.value,w),O!==null&&(h=s(O,h,A),k===null?E=O:k.sibling=O,k=O);return Ue&&Ss(y,A),E}for(C=r(y,C);!O.done;A++,O=m.next())O=p(C,y,A,O.value,w),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?A:O.key),h=s(O,h,A),k===null?E=O:k.sibling=O,k=O);return e&&C.forEach(function(J){return t(y,J)}),Ue&&Ss(y,A),E}function x(y,h,m,w){if(typeof m=="object"&&m!==null&&m.type===Ni&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Vu:e:{for(var E=m.key,k=h;k!==null;){if(k.key===E){if(E=m.type,E===Ni){if(k.tag===7){n(y,k.sibling),h=o(k,m.props.children),h.return=y,y=h;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Io&&Gw(E)===k.type){n(y,k.sibling),h=o(k,m.props),h.ref=sl(y,k,m),h.return=y,y=h;break e}n(y,k);break}else t(y,k);k=k.sibling}m.type===Ni?(h=Rs(m.props.children,y.mode,w,m.key),h.return=y,y=h):(w=hd(m.type,m.key,m.props,null,y.mode,w),w.ref=sl(y,h,m),w.return=y,y=w)}return i(y);case Mi:e:{for(k=m.key;h!==null;){if(h.key===k)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(y,h.sibling),h=o(h,m.children||[]),h.return=y,y=h;break e}else{n(y,h);break}else t(y,h);h=h.sibling}h=vg(m,y.mode,w),h.return=y,y=h}return i(y);case Io:return k=m._init,x(y,h,k(m._payload),w)}if(ul(m))return v(y,h,m,w);if(tl(m))return g(y,h,m,w);rd(y,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(y,h.sibling),h=o(h,m),h.return=y,y=h):(n(y,h),h=yg(m,y.mode,w),h.return=y,y=h),i(y)):n(y,h)}return x}var Ji=yb(!0),vb=yb(!1),Id=Go(null),Ld=null,Ui=null,Ih=null;function Lh(){Ih=Ui=Ld=null}function Mh(e){var t=Id.current;ze(Id),e._currentValue=t}function qg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qi(e,t){Ld=e,Ih=Ui=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(sn=!0),e.firstContext=null)}function _n(e){var t=e._currentValue;if(Ih!==e)if(e={context:e,memoizedValue:t,next:null},Ui===null){if(Ld===null)throw Error(D(308));Ui=e,Ld.dependencies={lanes:0,firstContext:e}}else Ui=Ui.next=e;return t}var Ts=null;function Nh(e){Ts===null?Ts=[e]:Ts.push(e)}function xb(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Nh(t)):(n.next=o.next,o.next=n),t.interleaved=n,Xr(e,r)}function Xr(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}var Lo=!1;function Oh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wb(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 Gr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(be&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Xr(e,n)}return o=r.interleaved,o===null?(t.next=t,Nh(r)):(t.next=o.next,o.next=t),r.interleaved=t,Xr(e,n)}function ud(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xh(e,n)}}function qw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,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 Md(e,t,n,r){var o=e.updateQueue;Lo=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(f=t,p=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ge({},d,f);break e;case 2:Lo=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,i|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Ls|=i,e.lanes=i,e.memoizedState=d}}function Yw(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(D(191,o));o.call(r)}}}var Vl={},kr=Go(Vl),Nl=Go(Vl),Ol=Go(Vl);function Cs(e){if(e===Vl)throw Error(D(174));return e}function _h(e,t){switch(De(Ol,t),De(Nl,e),De(kr,Vl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pg(t,e)}ze(kr),De(kr,t)}function ea(){ze(kr),ze(Nl),ze(Ol)}function Sb(e){Cs(Ol.current);var t=Cs(kr.current),n=Pg(t,e.type);t!==n&&(De(Nl,e),De(kr,n))}function Dh(e){Nl.current===e&&(ze(kr),ze(Nl))}var We=Go(0);function Nd(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&128)!==0)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 dg=[];function Fh(){for(var e=0;e<dg.length;e++)dg[e]._workInProgressVersionPrimary=null;dg.length=0}var dd=Zr.ReactCurrentDispatcher,fg=Zr.ReactCurrentBatchConfig,Is=0,Ke=null,st=null,mt=null,Od=!1,vl=!1,_l=0,vM=0;function Pt(){throw Error(D(321))}function zh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Hh(e,t,n,r,o,s){if(Is=s,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dd.current=e===null||e.memoizedState===null?bM:EM,e=n(r,o),vl){s=0;do{if(vl=!1,_l=0,25<=s)throw Error(D(301));s+=1,mt=st=null,t.updateQueue=null,dd.current=TM,e=n(r,o)}while(vl)}if(dd.current=_d,t=st!==null&&st.next!==null,Is=0,mt=st=Ke=null,Od=!1,t)throw Error(D(300));return e}function Bh(){var e=_l!==0;return _l=0,e}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Ke.memoizedState=mt=e:mt=mt.next=e,mt}function Dn(){if(st===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=mt===null?Ke.memoizedState:mt.next;if(t!==null)mt=t,st=e;else{if(e===null)throw Error(D(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},mt===null?Ke.memoizedState=mt=e:mt=mt.next=e}return mt}function Dl(e,t){return typeof t=="function"?t(e):t}function pg(e){var t=Dn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=st,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Is&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=r):l=l.next=d,Ke.lanes|=u,Ls|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Qn(r,t.memoizedState)||(sn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ke.lanes|=s,Ls|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function mg(e){var t=Dn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Qn(s,t.memoizedState)||(sn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function bb(){}function Eb(e,t){var n=Ke,r=Dn(),o=t(),s=!Qn(r.memoizedState,o);if(s&&(r.memoizedState=o,sn=!0),r=r.queue,Uh(kb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||mt!==null&&mt.memoizedState.tag&1){if(n.flags|=2048,Fl(9,Cb.bind(null,n,r,o,t),void 0,null),gt===null)throw Error(D(349));(Is&30)!==0||Tb(n,t,o)}return o}function Tb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cb(e,t,n,r){t.value=n,t.getSnapshot=r,Rb(t)&&Pb(e)}function kb(e,t,n){return n(function(){Rb(t)&&Pb(e)})}function Rb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function Pb(e){var t=Xr(e,1);t!==null&&Xn(t,e,1,-1)}function Xw(e){var t=Er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dl,lastRenderedState:e},t.queue=e,e=e.dispatch=SM.bind(null,Ke,e),[t.memoizedState,e]}function Fl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.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 Ab(){return Dn().memoizedState}function fd(e,t,n,r){var o=Er();Ke.flags|=e,o.memoizedState=Fl(1|t,n,void 0,r===void 0?null:r)}function Gd(e,t,n,r){var o=Dn();r=r===void 0?null:r;var s=void 0;if(st!==null){var i=st.memoizedState;if(s=i.destroy,r!==null&&zh(r,i.deps)){o.memoizedState=Fl(t,n,s,r);return}}Ke.flags|=e,o.memoizedState=Fl(1|t,n,s,r)}function Qw(e,t){return fd(8390656,8,e,t)}function Uh(e,t){return Gd(2048,8,e,t)}function Ib(e,t){return Gd(4,2,e,t)}function Lb(e,t){return Gd(4,4,e,t)}function Mb(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 Nb(e,t,n){return n=n!=null?n.concat([e]):null,Gd(4,4,Mb.bind(null,t,e),n)}function Vh(){}function Ob(e,t){var n=Dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _b(e,t){var n=Dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Db(e,t,n){return(Is&21)===0?(e.baseState&&(e.baseState=!1,sn=!0),e.memoizedState=n):(Qn(n,t)||(n=US(),Ke.lanes|=n,Ls|=n,e.baseState=!0),t)}function xM(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=fg.transition;fg.transition={};try{e(!1),t()}finally{Ie=n,fg.transition=r}}function Fb(){return Dn().memoizedState}function wM(e,t,n){var r=Vo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zb(e))Hb(t,n);else if(n=xb(e,t,n,r),n!==null){var o=Ut();Xn(n,e,r,o),Bb(n,t,r)}}function SM(e,t,n){var r=Vo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zb(e))Hb(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,i)){var l=t.interleaved;l===null?(o.next=o,Nh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=xb(e,t,o,r),n!==null&&(o=Ut(),Xn(n,e,r,o),Bb(n,t,r))}}function zb(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Hb(e,t){vl=Od=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bb(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xh(e,n)}}var _d={readContext:_n,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},bM={readContext:_n,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:_n,useEffect:Qw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fd(4194308,4,Mb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fd(4194308,4,e,t)},useInsertionEffect:function(e,t){return fd(4,2,e,t)},useMemo:function(e,t){var n=Er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Er();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=wM.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:Xw,useDebugValue:Vh,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=Xw(!1),t=e[0];return e=xM.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Er();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),gt===null)throw Error(D(349));(Is&30)!==0||Tb(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Qw(kb.bind(null,r,s,e),[e]),r.flags|=2048,Fl(9,Cb.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Er(),t=gt.identifierPrefix;if(Ue){var n=Kr,r=Wr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=_l++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vM++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},EM={readContext:_n,useCallback:Ob,useContext:_n,useEffect:Uh,useImperativeHandle:Nb,useInsertionEffect:Ib,useLayoutEffect:Lb,useMemo:_b,useReducer:pg,useRef:Ab,useState:function(){return pg(Dl)},useDebugValue:Vh,useDeferredValue:function(e){var t=Dn();return Db(t,st.memoizedState,e)},useTransition:function(){var e=pg(Dl)[0],t=Dn().memoizedState;return[e,t]},useMutableSource:bb,useSyncExternalStore:Eb,useId:Fb,unstable_isNewReconciler:!1},TM={readContext:_n,useCallback:Ob,useContext:_n,useEffect:Uh,useImperativeHandle:Nb,useInsertionEffect:Ib,useLayoutEffect:Lb,useMemo:_b,useReducer:mg,useRef:Ab,useState:function(){return mg(Dl)},useDebugValue:Vh,useDeferredValue:function(e){var t=Dn();return st===null?t.memoizedState=e:Db(t,st.memoizedState,e)},useTransition:function(){var e=mg(Dl)[0],t=Dn().memoizedState;return[e,t]},useMutableSource:bb,useSyncExternalStore:Eb,useId:Fb,unstable_isNewReconciler:!1};function Kn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qd={isMounted:function(e){return(e=e._reactInternals)?Os(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Vo(e),s=Gr(r,o);s.payload=t,n!=null&&(s.callback=n),t=Bo(e,s,o),t!==null&&(Xn(t,e,o,r),ud(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Vo(e),s=Gr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Bo(e,s,o),t!==null&&(Xn(t,e,o,r),ud(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Vo(e),o=Gr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Bo(e,o,r),t!==null&&(Xn(t,e,r,n),ud(t,e,r))}};function Zw(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Al(n,r)||!Al(o,s):!0}function Ub(e,t,n){var r=!1,o=Wo,s=t.contextType;return typeof s=="object"&&s!==null?s=_n(s):(o=ln(t)?Ps:Lt.current,r=t.contextTypes,s=(r=r!=null)?Qi(e,o):Wo),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Jw(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&&qd.enqueueReplaceState(t,t.state,null)}function Xg(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Oh(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=_n(s):(s=ln(t)?Ps:Lt.current,o.context=Qi(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Yg(e,t,s,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&&qd.enqueueReplaceState(o,o.state,null),Md(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ta(e,t){try{var n="",r=t;do n+=eL(r),r=r.return;while(r);var o=n}catch(s){o=`
7
7
  Error generating stack: `+s.message+`
8
- `+s.stack}return{value:e,source:t,stack:o,digest:null}}function pg(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Yg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wO=typeof WeakMap=="function"?WeakMap:Map;function Bb(e,t,n){n=Gr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_d||(_d=!0,sh=r),Yg(e,t)},n}function Ub(e,t,n){n=Gr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Yg(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Yg(e,t),typeof r!="function"&&(Uo===null?Uo=new Set([this]):Uo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Zw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wO;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=NO.bind(null,e,t,n),t.then(e,e))}function Jw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function eS(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gr(-1,1),t.tag=2,Bo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var SO=Zr.ReactCurrentOwner,sn=!1;function Bt(e,t,n,r){t.child=e===null?hb(t,null,n,r):Ji(t,e.child,n,r)}function tS(e,t,n,r,o){n=n.render;var s=t.ref;return qi(t,o),r=Fh(e,t,n,r,s,o),n=zh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Ue&&n&&Ch(t),t.flags|=1,Bt(e,t,r,o),t.child)}function nS(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!qh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Vb(e,t,s,r,o)):(e=md(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,(e.lanes&o)===0){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Al,n(i,r)&&e.ref===t.ref)return Qr(e,t,o)}return t.flags|=1,e=$o(s,r),e.ref=t.ref,e.return=t,t.child=e}function Vb(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Al(s,r)&&e.ref===t.ref)if(sn=!1,t.pendingProps=r=s,(e.lanes&o)!==0)(e.flags&131072)!==0&&(sn=!0);else return t.lanes=e.lanes,Qr(e,t,o)}return Xg(e,t,n,r,o)}function $b(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De($i,gn),gn|=n;else{if((n&1073741824)===0)return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De($i,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De($i,gn),gn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De($i,gn),gn|=r;return Bt(e,t,o,n),t.child}function jb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xg(e,t,n,r,o){var s=ln(n)?Ps:Lt.current;return s=Qi(t,s),qi(t,o),n=Fh(e,t,n,r,s,o),r=zh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Ue&&r&&Ch(t),t.flags|=1,Bt(e,t,n,o),t.child)}function rS(e,t,n,r,o){if(ln(n)){var s=!0;Cd(t)}else s=!1;if(qi(t,o),t.stateNode===null)dd(e,t),Hb(t,n,r),qg(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=_n(c):(c=ln(n)?Ps:Lt.current,c=Qi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Qw(t,i,r,c),Lo=!1;var f=t.memoizedState;i.state=f,Id(t,r,i,o),l=t.memoizedState,a!==r||f!==l||an.current||Lo?(typeof u=="function"&&(Gg(t,n,u,r),l=t.memoizedState),(a=Lo||Xw(t,n,a,r,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vb(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kn(t.type,a),i.props=c,d=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=_n(l):(l=ln(n)?Ps:Lt.current,l=Qi(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Qw(t,i,r,l),Lo=!1,f=t.memoizedState,i.state=f,Id(t,r,i,o);var v=t.memoizedState;a!==d||f!==v||an.current||Lo?(typeof p=="function"&&(Gg(t,n,p,r),v=t.memoizedState),(c=Lo||Xw(t,n,c,r,f,v,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Qg(e,t,n,r,s,o)}function Qg(e,t,n,r,o,s){jb(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&Vw(t,n,!1),Qr(e,t,s);r=t.stateNode,SO.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Ji(t,e.child,null,s),t.child=Ji(t,null,a,s)):Bt(e,t,a,s),t.memoizedState=r.state,o&&Vw(t,n,!0),t.child}function Wb(e){var t=e.stateNode;t.pendingContext?Uw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uw(e,t.context,!1),Mh(e,t.containerInfo)}function oS(e,t,n,r,o){return Zi(),Rh(o),t.flags|=256,Bt(e,t,n,r),t.child}var Zg={dehydrated:null,treeContext:null,retryLane:0};function Jg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Kb(e,t,n){var r=t.pendingProps,o=We.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(We,o&1),e===null)return Wg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},(r&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Yd(i,r,0,null),e=Rs(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Jg(n),t.memoizedState=Zg,e):Uh(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return bO(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=$o(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=$o(a,s):(s=Rs(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Jg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Zg,r}return s=e.child,e=s.sibling,r=$o(s,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Uh(e,t){return t=Yd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function nd(e,t,n,r){return r!==null&&Rh(r),Ji(t,e.child,null,n),e=Uh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bO(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=pg(Error(D(422))),nd(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Yd({mode:"visible",children:r.children},o,0,null),s=Rs(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,(t.mode&1)!==0&&Ji(t,e.child,null,i),t.child.memoizedState=Jg(i),t.memoizedState=Zg,s);if((t.mode&1)===0)return nd(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(D(419)),r=pg(s,r,void 0),nd(e,t,i,r)}if(a=(i&e.childLanes)!==0,sn||a){if(r=mt,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|i))!==0?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Xr(e,o),Xn(r,e,o,-1))}return Gh(),r=pg(Error(D(421))),nd(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=_O.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,hn=Ho(o.nextSibling),yn=t,Ue=!0,qn=null,e!==null&&(Ln[On++]=Wr,Ln[On++]=Kr,Ln[On++]=As,Wr=e.id,Kr=e.overflow,As=t),t=Uh(t,r.children),t.flags|=4096,t)}function sS(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kg(e.return,t,n)}function mg(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Gb(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Bt(e,t,r.children,n),r=We.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sS(e,n,t);else if(e.tag===19)sS(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(We,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ld(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),mg(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ld(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}mg(t,!0,n,null,s);break;case"together":mg(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dd(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ls|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=$o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function EO(e,t,n){switch(t.tag){case 3:Wb(t),Zi();break;case 5:xb(t);break;case 1:ln(t.type)&&Cd(t);break;case 4:Mh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Pd,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Kb(e,t,n):(De(We,We.current&1),e=Qr(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Gb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,$b(e,t,n)}return Qr(e,t,n)}var qb,eh,Yb,Xb;qb=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}};eh=function(){};Yb=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Cs(kr.current);var s=null;switch(n){case"input":o=bg(e,o),r=bg(e,r),s=[];break;case"select":o=Ge({},o,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case"textarea":o=Cg(e,o),r=Cg(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ed)}Rg(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(bl.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(bl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Xb=function(e,t,n,r){n!==r&&(t.flags|=4)};function il(e,t){if(!Ue)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 At(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function TO(e,t,n){var r=t.pendingProps;switch(kh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return ln(t.type)&&Td(),At(t),null;case 3:return r=t.stateNode,ea(),ze(an),ze(Lt),_h(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ed(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qn!==null&&(lh(qn),qn=null))),eh(e,t),At(t),null;case 5:Nh(t);var o=Cs(Nl.current);if(n=t.type,e!==null&&t.stateNode!=null)Yb(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return At(t),null}if(e=Cs(kr.current),ed(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Tr]=t,r[Ol]=s,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<fl.length;o++)Fe(fl[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":pw(r,s),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Fe("invalid",r);break;case"textarea":gw(r,s),Fe("invalid",r)}Rg(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Ju(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Ju(r.textContent,a,e),o=["children",""+a]):bl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Uu(r),mw(r,s,!0);break;case"textarea":Uu(r),hw(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ed)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=TS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Tr]=t,e[Ol]=r,qb(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<fl.length;o++)Fe(fl[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":pw(e,r),o=bg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ge({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":gw(e,r),o=Cg(e,r),Fe("invalid",e);break;default:o=r}Rg(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?RS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&CS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&El(e,l):typeof l=="number"&&El(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(bl.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Fe("scroll",e):l!=null&&dh(e,s,l,i))}switch(n){case"input":Uu(e),mw(e,r,!1);break;case"textarea":Uu(e),hw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+jo(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ji(e,!!r.multiple,s,!1):r.defaultValue!=null&&ji(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ed)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return At(t),null;case 6:if(e&&t.stateNode!=null)Xb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Cs(Nl.current),Cs(kr.current),ed(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tr]=t,(s=r.nodeValue!==n)&&(e=yn,e!==null))switch(e.tag){case 3:Ju(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ju(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tr]=t,t.stateNode=r}return At(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&hn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)mb(),Zi(),t.flags|=98560,s=!1;else if(s=ed(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(D(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(D(317));s[Tr]=t}else Zi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;At(t),s=!1}else qn!==null&&(lh(qn),qn=null),s=!0;if(!s)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(We.current&1)!==0?st===0&&(st=3):Gh())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return ea(),eh(e,t),e===null&&Il(t.stateNode.containerInfo),At(t),null;case 10:return Ih(t.type._context),At(t),null;case 17:return ln(t.type)&&Td(),At(t),null;case 19:if(ze(We),s=t.memoizedState,s===null)return At(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)il(s,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ld(e),i!==null){for(t.flags|=128,il(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}s.tail!==null&&Je()>na&&(t.flags|=128,r=!0,il(s,!1),t.lanes=4194304)}else{if(!r)if(e=Ld(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),il(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ue)return At(t),null}else 2*Je()-s.renderingStartTime>na&&n!==1073741824&&(t.flags|=128,r=!0,il(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return Kh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(gn&1073741824)!==0&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function CO(e,t){switch(kh(t),t.tag){case 1:return ln(t.type)&&Td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(),ze(an),ze(Lt),_h(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Nh(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return ea(),null;case 10:return Ih(t.type._context),null;case 22:case 23:return Kh(),null;case 24:return null;default:return null}}var rd=!1,It=!1,kO=typeof WeakSet=="function"?WeakSet:Set,q=null;function Vi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function th(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var iS=!1;function RO(e,t){if(zg=wd,e=tb(),Th(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(w){n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=i),f===s&&++u===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hg={focusedElem:e,selectionRange:n},wd=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,x=v.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Kn(t.type,m),x);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return v=iS,iS=!1,v}function xl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&th(t,n,s)}o=o.next}while(o!==r)}}function Gd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Qb(e){var t=e.alternate;t!==null&&(e.alternate=null,Qb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Ol],delete t[Vg],delete t[cO],delete t[uO])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zb(e){return e.tag===5||e.tag===3||e.tag===4}function aS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,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=Ed));else if(r!==4&&(e=e.child,e!==null))for(rh(e,t,n),e=e.sibling;e!==null;)rh(e,t,n),e=e.sibling}function oh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(oh(e,t,n),e=e.sibling;e!==null;)oh(e,t,n),e=e.sibling}var St=null,Gn=!1;function Ao(e,t,n){for(n=n.child;n!==null;)Jb(e,t,n),n=n.sibling}function Jb(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Hd,n)}catch(a){}switch(n.tag){case 5:It||Vi(n,t);case 6:var r=St,o=Gn;St=null,Ao(e,t,n),St=r,Gn=o,St!==null&&(Gn?(e=St,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):St.removeChild(n.stateNode));break;case 18:St!==null&&(Gn?(e=St,n=n.stateNode,e.nodeType===8?ag(e.parentNode,n):e.nodeType===1&&ag(e,n),Rl(e)):ag(St,n.stateNode));break;case 4:r=St,o=Gn,St=n.stateNode.containerInfo,Gn=!0,Ao(e,t,n),St=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&((s&2)!==0||(s&4)!==0)&&th(n,t,i),o=o.next}while(o!==r)}Ao(e,t,n);break;case 1:if(!It&&(Vi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Ao(e,t,n);break;case 21:Ao(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Ao(e,t,n),It=r):Ao(e,t,n);break;default:Ao(e,t,n)}}function lS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kO),t.forEach(function(r){var o=DO.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:St=a.stateNode,Gn=!1;break e;case 3:St=a.stateNode.containerInfo,Gn=!0;break e;case 4:St=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(St===null)throw Error(D(160));Jb(s,i,o),St=null,Gn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)eE(t,e),t=t.sibling}function eE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),br(e),r&4){try{xl(3,e,e.return),Gd(3,e)}catch(m){Ye(e,e.return,m)}try{xl(5,e,e.return)}catch(m){Ye(e,e.return,m)}}break;case 1:Wn(t,e),br(e),r&512&&n!==null&&Vi(n,n.return);break;case 5:if(Wn(t,e),br(e),r&512&&n!==null&&Vi(n,n.return),e.flags&32){var o=e.stateNode;try{El(o,"")}catch(m){Ye(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&bS(o,s),Pg(a,i);var c=Pg(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?RS(o,d):u==="dangerouslySetInnerHTML"?CS(o,d):u==="children"?El(o,d):dh(o,u,d,c)}switch(a){case"input":Eg(o,s);break;case"textarea":ES(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?ji(o,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?ji(o,!!s.multiple,s.defaultValue,!0):ji(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ol]=s}catch(m){Ye(e,e.return,m)}}break;case 6:if(Wn(t,e),br(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){Ye(e,e.return,m)}}break;case 3:if(Wn(t,e),br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rl(t.containerInfo)}catch(m){Ye(e,e.return,m)}break;case 4:Wn(t,e),br(e);break;case 13:Wn(t,e),br(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(jh=Je())),r&4&&lS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||u,Wn(t,e),It=c):Wn(t,e),br(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(q=e,u=e.child;u!==null;){for(d=q=u;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:xl(4,f,f.return);break;case 1:Vi(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){Ye(r,n,m)}}break;case 5:Vi(f,f.return);break;case 22:if(f.memoizedState!==null){uS(d);continue}}p!==null?(p.return=f,q=p):uS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=kS("display",i))}catch(m){Ye(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Ye(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Wn(t,e),br(e),r&4&&lS(e);break;case 21:break;default:Wn(t,e),br(e)}}function br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Zb(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(El(o,""),r.flags&=-33);var s=aS(e);oh(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=aS(e);rh(e,a,i);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function PO(e,t,n){q=e,tE(e,t,n)}function tE(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||rd;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||It;a=rd;var c=It;if(rd=i,(It=l)&&!c)for(q=o;q!==null;)i=q,l=i.child,i.tag===22&&i.memoizedState!==null?dS(o):l!==null?(l.return=i,q=l):dS(o);for(;s!==null;)q=s,tE(s,t,n),s=s.sibling;q=o,rd=a,It=c}cS(e,t,n)}else(o.subtreeFlags&8772)!==0&&s!==null?(s.return=o,q=s):cS(e,t,n)}}function cS(e){for(;q!==null;){var t=q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:It||Gd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Gw(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Gw(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Rl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}It||t.flags&512&&nh(t)}catch(f){Ye(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function uS(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function dS(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Gd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var s=t.return;try{nh(t)}catch(l){Ye(t,s,l)}break;case 5:var i=t.return;try{nh(t)}catch(l){Ye(t,i,l)}}}catch(l){Ye(t,t.return,l)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var AO=Math.ceil,Nd=Zr.ReactCurrentDispatcher,Vh=Zr.ReactCurrentOwner,Nn=Zr.ReactCurrentBatchConfig,Se=0,mt=null,et=null,bt=0,gn=0,$i=Go(0),st=0,zl=null,Ls=0,qd=0,$h=0,wl=null,on=null,jh=0,na=1/0,$r=null,_d=!1,sh=null,Uo=null,od=!1,_o=null,Dd=0,Sl=0,ih=null,fd=-1,pd=0;function Ut(){return(Se&6)!==0?Je():fd!==-1?fd:fd=Je()}function Vo(e){return(e.mode&1)===0?1:(Se&2)!==0&&bt!==0?bt&-bt:fO.transition!==null?(pd===0&&(pd=HS()),pd):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:KS(e.type)),e)}function Xn(e,t,n,r){if(50<Sl)throw Sl=0,ih=null,Error(D(185));Hl(e,n,r),((Se&2)===0||e!==mt)&&(e===mt&&((Se&2)===0&&(qd|=n),st===4&&Mo(e,bt)),cn(e,r),n===1&&Se===0&&(t.mode&1)===0&&(na=Je()+500,jd&&qo()))}function cn(e,t){var n=e.callbackNode;mL(e,t);var r=xd(e,e===mt?bt:0);if(r===0)n!==null&&xw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xw(n),t===1)e.tag===0?dO(fS.bind(null,e)):db(fS.bind(null,e)),aO(function(){(Se&6)===0&&qo()}),n=null;else{switch(BS(r)){case 1:n=hh;break;case 4:n=FS;break;case 16:n=vd;break;case 536870912:n=zS;break;default:n=vd}n=cE(n,nE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nE(e,t){if(fd=-1,pd=0,(Se&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Yi()&&e.callbackNode!==n)return null;var r=xd(e,e===mt?bt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Fd(e,r);else{t=r;var o=Se;Se|=2;var s=oE();(mt!==e||bt!==t)&&($r=null,na=Je()+500,ks(e,t));do try{OO();break}catch(a){rE(e,a)}while(!0);Ah(),Nd.current=s,Se=o,et!==null?t=0:(mt=null,bt=0,t=st)}if(t!==0){if(t===2&&(o=Mg(e),o!==0&&(r=o,t=ah(e,o))),t===1)throw n=zl,ks(e,0),Mo(e,r),cn(e,Je()),n;if(t===6)Mo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!IO(o)&&(t=Fd(e,r),t===2&&(s=Mg(e),s!==0&&(r=s,t=ah(e,s))),t===1))throw n=zl,ks(e,0),Mo(e,r),cn(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:bs(e,on,$r);break;case 3:if(Mo(e,r),(r&130023424)===r&&(t=jh+500-Je(),10<t)){if(xd(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ug(bs.bind(null,e,on,$r),t);break}bs(e,on,$r);break;case 4:if(Mo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Yn(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*AO(r/1960))-r,10<r){e.timeoutHandle=Ug(bs.bind(null,e,on,$r),r);break}bs(e,on,$r);break;case 5:bs(e,on,$r);break;default:throw Error(D(329))}}}return cn(e,Je()),e.callbackNode===n?nE.bind(null,e):null}function ah(e,t){var n=wl;return e.current.memoizedState.isDehydrated&&(ks(e,t).flags|=256),e=Fd(e,t),e!==2&&(t=on,on=n,t!==null&&lh(t)),e}function lh(e){on===null?on=e:on.push.apply(on,e)}function IO(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Qn(s(),o))return!1}catch(i){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mo(e,t){for(t&=~$h,t&=~qd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function fS(e){if((Se&6)!==0)throw Error(D(327));Yi();var t=xd(e,0);if((t&1)===0)return cn(e,Je()),null;var n=Fd(e,t);if(e.tag!==0&&n===2){var r=Mg(e);r!==0&&(t=r,n=ah(e,r))}if(n===1)throw n=zl,ks(e,0),Mo(e,t),cn(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bs(e,on,$r),cn(e,Je()),null}function Wh(e,t){var n=Se;Se|=1;try{return e(t)}finally{Se=n,Se===0&&(na=Je()+500,jd&&qo())}}function Os(e){_o!==null&&_o.tag===0&&(Se&6)===0&&Yi();var t=Se;Se|=1;var n=Nn.transition,r=Ie;try{if(Nn.transition=null,Ie=1,e)return e()}finally{Ie=r,Nn.transition=n,Se=t,(Se&6)===0&&qo()}}function Kh(){gn=$i.current,ze($i)}function ks(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,iO(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(kh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Td();break;case 3:ea(),ze(an),ze(Lt),_h();break;case 5:Nh(r);break;case 4:ea();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Ih(r.type._context);break;case 22:case 23:Kh()}n=n.return}if(mt=e,et=e=$o(e.current,null),bt=gn=t,st=0,zl=null,$h=qd=Ls=0,on=wl=null,Ts!==null){for(t=0;t<Ts.length;t++)if(n=Ts[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Ts=null}return e}function rE(e,t){do{var n=et;try{if(Ah(),cd.current=Md,Od){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Od=!1}if(Is=0,pt=ot=Ke=null,vl=!1,_l=0,Vh.current=null,n===null||n.return===null){st=1,zl=t,et=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=bt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Jw(i);if(p!==null){p.flags&=-257,eS(p,i,a,s,t),p.mode&1&&Zw(s,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var m=new Set;m.add(l),t.updateQueue=m}else v.add(l);break e}else{if((t&1)===0){Zw(s,c,t),Gh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Jw(i);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),eS(x,i,a,s,t),Rh(ta(l,a));break e}}s=l=ta(l,a),st!==4&&(st=2),wl===null?wl=[s]:wl.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Bb(s,l,t);Kw(s,y);break e;case 1:a=l;var g=s.type,h=s.stateNode;if((s.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Uo===null||!Uo.has(h)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Ub(s,a,t);Kw(s,w);break e}}s=s.return}while(s!==null)}iE(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function oE(){var e=Nd.current;return Nd.current=Md,e===null?Md:e}function Gh(){(st===0||st===3||st===2)&&(st=4),mt===null||(Ls&268435455)===0&&(qd&268435455)===0||Mo(mt,bt)}function Fd(e,t){var n=Se;Se|=2;var r=oE();(mt!==e||bt!==t)&&($r=null,ks(e,t));do try{LO();break}catch(o){rE(e,o)}while(!0);if(Ah(),Se=n,Nd.current=r,et!==null)throw Error(D(261));return mt=null,bt=0,st}function LO(){for(;et!==null;)sE(et)}function OO(){for(;et!==null&&!sL();)sE(et)}function sE(e){var t=lE(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?iE(e):et=t,Vh.current=null}function iE(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=TO(n,t,gn),n!==null){et=n;return}}else{if(n=CO(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{st=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);st===0&&(st=5)}function bs(e,t,n){var r=Ie,o=Nn.transition;try{Nn.transition=null,Ie=1,MO(e,t,n,r)}finally{Nn.transition=o,Ie=r}return null}function MO(e,t,n,r){do Yi();while(_o!==null);if((Se&6)!==0)throw Error(D(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(gL(e,s),e===mt&&(et=mt=null,bt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||od||(od=!0,cE(vd,function(){return Yi(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=Nn.transition,Nn.transition=null;var i=Ie;Ie=1;var a=Se;Se|=4,Vh.current=null,RO(e,n),eE(n,e),tO(Hg),wd=!!zg,Hg=zg=null,e.current=n,PO(n,e,o),iL(),Se=a,Ie=i,Nn.transition=s}else e.current=n;if(od&&(od=!1,_o=e,Dd=o),s=e.pendingLanes,s===0&&(Uo=null),cL(n.stateNode,r),cn(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(_d)throw _d=!1,e=sh,sh=null,e;return(Dd&1)!==0&&e.tag!==0&&Yi(),s=e.pendingLanes,(s&1)!==0?e===ih?Sl++:(Sl=0,ih=e):Sl=0,qo(),null}function Yi(){if(_o!==null){var e=BS(Dd),t=Nn.transition,n=Ie;try{if(Nn.transition=null,Ie=16>e?16:e,_o===null)var r=!1;else{if(e=_o,_o=null,Dd=0,(Se&6)!==0)throw Error(D(331));var o=Se;for(Se|=4,q=e.current;q!==null;){var s=q,i=s.child;if((q.flags&16)!==0){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(q=c;q!==null;){var u=q;switch(u.tag){case 0:case 11:case 15:xl(8,u,s)}var d=u.child;if(d!==null)d.return=u,q=d;else for(;q!==null;){u=q;var f=u.sibling,p=u.return;if(Qb(u),u===c){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var v=s.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}q=s}}if((s.subtreeFlags&2064)!==0&&i!==null)i.return=s,q=i;else e:for(;q!==null;){if(s=q,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:xl(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,q=y;break e}q=s.return}}var g=e.current;for(q=g;q!==null;){i=q;var h=i.child;if((i.subtreeFlags&2064)!==0&&h!==null)h.return=i,q=h;else e:for(i=g;q!==null;){if(a=q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Gd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===i){q=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,q=w;break e}q=a.return}}if(Se=o,qo(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Hd,e)}catch(E){}r=!0}return r}finally{Ie=n,Nn.transition=t}}return!1}function pS(e,t,n){t=ta(n,t),t=Bb(e,t,1),e=Bo(e,t,1),t=Ut(),e!==null&&(Hl(e,1,t),cn(e,t))}function Ye(e,t,n){if(e.tag===3)pS(e,e,n);else for(;t!==null;){if(t.tag===3){pS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Uo===null||!Uo.has(r))){e=ta(n,e),e=Ub(t,e,1),t=Bo(t,e,1),e=Ut(),t!==null&&(Hl(t,1,e),cn(t,e));break}}t=t.return}}function NO(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(bt&n)===n&&(st===4||st===3&&(bt&130023424)===bt&&500>Je()-jh?ks(e,0):$h|=n),cn(e,t)}function aE(e,t){t===0&&((e.mode&1)===0?t=1:(t=ju,ju<<=1,(ju&130023424)===0&&(ju=4194304)));var n=Ut();e=Xr(e,t),e!==null&&(Hl(e,t,n),cn(e,n))}function _O(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aE(e,n)}function DO(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),aE(e,n)}var lE;lE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||an.current)sn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return sn=!1,EO(e,t,n);sn=(e.flags&131072)!==0}else sn=!1,Ue&&(t.flags&1048576)!==0&&fb(t,Rd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dd(e,t),e=t.pendingProps;var o=Qi(t,Lt.current);qi(t,n),o=Fh(null,t,r,e,o,n);var s=zh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ln(r)?(s=!0,Cd(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Oh(t),o.updater=Kd,t.stateNode=o,o._reactInternals=t,qg(t,r,e,n),t=Qg(null,t,r,!0,s,n)):(t.tag=0,Ue&&s&&Ch(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=zO(r),e=Kn(r,e),o){case 0:t=Xg(null,t,r,e,n);break e;case 1:t=rS(null,t,r,e,n);break e;case 11:t=tS(null,t,r,e,n);break e;case 14:t=nS(null,t,r,Kn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Xg(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),rS(e,t,r,o,n);case 3:e:{if(Wb(t),e===null)throw Error(D(387));r=t.pendingProps,s=t.memoizedState,o=s.element,vb(e,t),Id(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=ta(Error(D(423)),t),t=oS(e,t,r,n,o);break e}else if(r!==o){o=ta(Error(D(424)),t),t=oS(e,t,r,n,o);break e}else for(hn=Ho(t.stateNode.containerInfo.firstChild),yn=t,Ue=!0,qn=null,n=hb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zi(),r===o){t=Qr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return xb(t),e===null&&Wg(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Bg(r,o)?i=null:s!==null&&Bg(r,s)&&(t.flags|=32),jb(e,t),Bt(e,t,i,n),t.child;case 6:return e===null&&Wg(t),null;case 13:return Kb(e,t,n);case 4:return Mh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ji(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),tS(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,De(Pd,r._currentValue),r._currentValue=i,s!==null)if(Qn(s.value,i)){if(s.children===o.children&&!an.current){t=Qr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gr(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Kg(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(D(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Kg(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,qi(t,n),o=_n(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),nS(e,t,r,o,n);case 15:return Vb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),dd(e,t),t.tag=1,ln(r)?(e=!0,Cd(t)):e=!1,qi(t,n),Hb(t,r,o),qg(t,r,o,n),Qg(null,t,r,!0,e,n);case 19:return Gb(e,t,n);case 22:return $b(e,t,n)}throw Error(D(156,t.tag))};function cE(e,t){return DS(e,t)}function FO(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(e,t,n,r){return new FO(e,t,n,r)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zO(e){if(typeof e=="function")return qh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ph)return 11;if(e===mh)return 14}return 2}function $o(e,t){var n=e.alternate;return n===null?(n=Mn(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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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 md(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")qh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Mi:return Rs(n.children,o,s,t);case fh:i=8,o|=8;break;case vg:return e=Mn(12,n,t,o|2),e.elementType=vg,e.lanes=s,e;case xg:return e=Mn(13,n,t,o),e.elementType=xg,e.lanes=s,e;case wg:return e=Mn(19,n,t,o),e.elementType=wg,e.lanes=s,e;case xS:return Yd(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yS:i=10;break e;case vS:i=9;break e;case ph:i=11;break e;case mh:i=14;break e;case Io:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Mn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Rs(e,t,n,r){return e=Mn(7,e,r,t),e.lanes=n,e}function Yd(e,t,n,r){return e=Mn(22,e,r,t),e.elementType=xS,e.lanes=n,e.stateNode={isHidden:!1},e}function gg(e,t,n){return e=Mn(6,e,null,t),e.lanes=n,e}function hg(e,t,n){return t=Mn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function HO(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Jm(0),this.expirationTimes=Jm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jm(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Yh(e,t,n,r,o,s,i,a,l){return e=new HO(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Mn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oh(s),e}function BO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Oi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function uE(e){if(!e)return Wo;e=e._reactInternals;e:{if(Ns(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(ln(n))return ub(e,n,t)}return t}function dE(e,t,n,r,o,s,i,a,l){return e=Yh(n,r,!0,e,o,s,i,a,l),e.context=uE(null),n=e.current,r=Ut(),o=Vo(n),s=Gr(r,o),s.callback=t!=null?t:null,Bo(n,s,o),e.current.lanes=o,Hl(e,o,r),cn(e,r),e}function Xd(e,t,n,r){var o=t.current,s=Ut(),i=Vo(o);return n=uE(n),t.context===null?t.context=n:t.pendingContext=n,t=Gr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bo(o,t,i),e!==null&&(Xn(e,o,i,s),ld(e,o,i)),i}function zd(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 mS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xh(e,t){mS(e,t),(e=e.alternate)&&mS(e,t)}function UO(){return null}var fE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Qh(e){this._internalRoot=e}Qd.prototype.render=Qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Xd(e,t,null,null)};Qd.prototype.unmount=Qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Os(function(){Xd(null,e,null,null)}),t[Yr]=null}};function Qd(e){this._internalRoot=e}Qd.prototype.unstable_scheduleHydration=function(e){if(e){var t=$S();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Oo.length&&t!==0&&t<Oo[n].priority;n++);Oo.splice(n,0,e),n===0&&WS(e)}};function Zh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gS(){}function VO(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=zd(i);s.call(c)}}var i=dE(t,r,e,0,null,!1,!1,"",gS);return e._reactRootContainer=i,e[Yr]=i.current,Il(e.nodeType===8?e.parentNode:e),Os(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=zd(l);a.call(c)}}var l=Yh(e,0,!1,null,null,!1,!1,"",gS);return e._reactRootContainer=l,e[Yr]=l.current,Il(e.nodeType===8?e.parentNode:e),Os(function(){Xd(t,l,n,r)}),l}function Jd(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=zd(i);a.call(l)}}Xd(t,i,e,o)}else i=VO(n,t,e,o,r);return zd(i)}US=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dl(t.pendingLanes);n!==0&&(yh(t,n|1),cn(t,Je()),(Se&6)===0&&(na=Je()+500,qo()))}break;case 13:Os(function(){var r=Xr(e,1);if(r!==null){var o=Ut();Xn(r,e,1,o)}}),Xh(e,1)}};vh=function(e){if(e.tag===13){var t=Xr(e,134217728);if(t!==null){var n=Ut();Xn(t,e,134217728,n)}Xh(e,134217728)}};VS=function(e){if(e.tag===13){var t=Vo(e),n=Xr(e,t);if(n!==null){var r=Ut();Xn(n,e,t,r)}Xh(e,t)}};$S=function(){return Ie};jS=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Ig=function(e,t,n){switch(t){case"input":if(Eg(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=$d(r);if(!o)throw Error(D(90));SS(r),Eg(r,o)}}}break;case"textarea":ES(e,n);break;case"select":t=n.value,t!=null&&ji(e,!!n.multiple,t,!1)}};IS=Wh;LS=Os;var $O={usingClientEntryPoint:!1,Events:[Ul,Fi,$d,PS,AS,Wh]},al={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},jO={bundleType:al.bundleType,version:al.version,rendererPackageName:al.rendererPackageName,rendererConfig:al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=NS(e),e===null?null:e.stateNode},findFiberByHostInstance:al.findFiberByHostInstance||UO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ll=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ll.isDisabled&&ll.supportsFiber))try{Hd=ll.inject(jO),Cr=ll}catch(e){}var ll;wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$O;wn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zh(t))throw Error(D(200));return BO(e,t,null,n)};wn.createRoot=function(e,t){if(!Zh(e))throw Error(D(299));var n=!1,r="",o=fE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Yh(e,1,!1,null,null,n,!1,r,o),e[Yr]=t.current,Il(e.nodeType===8?e.parentNode:e),new Qh(t)};wn.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(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=NS(t),e=e===null?null:e.stateNode,e};wn.flushSync=function(e){return Os(e)};wn.hydrate=function(e,t,n){if(!Zd(t))throw Error(D(200));return Jd(null,e,t,!0,n)};wn.hydrateRoot=function(e,t,n){if(!Zh(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=fE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=dE(t,null,e,1,n!=null?n:null,o,!1,s,i),e[Yr]=t.current,Il(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Qd(t)};wn.render=function(e,t,n){if(!Zd(t))throw Error(D(200));return Jd(null,e,t,!1,n)};wn.unmountComponentAtNode=function(e){if(!Zd(e))throw Error(D(40));return e._reactRootContainer?(Os(function(){Jd(null,null,e,!1,function(){e._reactRootContainer=null,e[Yr]=null})}),!0):!1};wn.unstable_batchedUpdates=Wh;wn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zd(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return Jd(e,t,n,!1,r)};wn.version="18.3.1-next-f1338f8080-20240426"});var $l=nn((Y6,gE)=>{"use strict";function mE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mE)}catch(e){console.error(e)}}mE(),gE.exports=pE()});var yE=nn(Jh=>{"use strict";var hE=$l();Jh.createRoot=hE.createRoot,Jh.hydrateRoot=hE.hydrateRoot;var X6});var ZE=nn(QE=>{"use strict";var Gl=Y();function BM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var UM=typeof Object.is=="function"?Object.is:BM,VM=Gl.useSyncExternalStore,$M=Gl.useRef,jM=Gl.useEffect,WM=Gl.useMemo,KM=Gl.useDebugValue;QE.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=$M(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=WM(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&i.hasValue){var v=i.value;if(o(v,p))return d=v}return d=p}if(v=d,UM(u,p))return v;var m=r(p);return o!==void 0&&o(v,m)?(u=p,v):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=VM(e,s[0],s[1]);return jM(function(){i.hasValue=!0,i.value=a},[a]),KM(a),a}});var e1=nn((Fz,JE)=>{"use strict";JE.exports=ZE()});var Gy=nn((gH,PT)=>{"use strict";var N_="Expected a function",kT=NaN,__="[object Symbol]",D_=/^\s+|\s+$/g,F_=/^[-+]0x[0-9a-f]+$/i,z_=/^0b[01]+$/i,H_=/^0o[0-7]+$/i,B_=parseInt,U_=typeof global=="object"&&global&&global.Object===Object&&global,V_=typeof self=="object"&&self&&self.Object===Object&&self,$_=U_||V_||Function("return this")(),j_=Object.prototype,W_=j_.toString,K_=Math.max,G_=Math.min,Wy=function(){return $_.Date.now()};function q_(e,t,n){var r,o,s,i,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(N_);t=RT(t)||0,Ky(n)&&(u=!!n.leading,d="maxWait"in n,s=d?K_(RT(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(k){var C=r,A=o;return r=o=void 0,c=k,i=e.apply(A,C),i}function v(k){return c=k,a=setTimeout(y,t),u?p(k):i}function m(k){var C=k-l,A=k-c,V=t-C;return d?G_(V,s-A):V}function x(k){var C=k-l,A=k-c;return l===void 0||C>=t||C<0||d&&A>=s}function y(){var k=Wy();if(x(k))return g(k);a=setTimeout(y,m(k))}function g(k){return a=void 0,f&&r?p(k):(r=o=void 0,i)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?i:g(Wy())}function E(){var k=Wy(),C=x(k);if(r=arguments,o=this,l=k,C){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),i}return E.cancel=h,E.flush=w,E}function Ky(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Y_(e){return!!e&&typeof e=="object"}function X_(e){return typeof e=="symbol"||Y_(e)&&W_.call(e)==__}function RT(e){if(typeof e=="number")return e;if(X_(e))return kT;if(Ky(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ky(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(D_,"");var n=z_.test(e);return n||H_.test(e)?B_(e.slice(2),n?2:8):F_.test(e)?kT:+e}PT.exports=q_});var cC=nn((p7,lC)=>{"use strict";var V2=/["'&<>]/;lC.exports=$2;function $2(e){var t=""+e,n=V2.exec(t);if(!n)return t;var r,o="",s=0,i=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}i!==s&&(o+=t.substring(i,s)),i=s+1,o+=r}return i!==s?o+t.substring(i,s):o}});var c5={};wt(c5,{Card:()=>Te,ContentEditableInput:()=>yi,DeepdeskAPI:()=>Eo,DeepdeskSDK:()=>gu,HTTPClient:()=>xi,InputMediator:()=>bo,InputType:()=>Ai,KeyboardHint:()=>Lu,Label:()=>Nx,Locale:()=>ql,Section:()=>wr,SectionList:()=>Ri,Sources:()=>Ro,Suggestion:()=>ye,SuggestionList:()=>Ht,TextAreaInput:()=>vi,ToggleButton:()=>xs,attachFile:()=>zA,authenticateWithKey:()=>HA,createFullRange:()=>Va,createOverlayContainer:()=>pu,createRangeFromOffsets:()=>fs,escapeHTML:()=>ha,formatTextMarkup:()=>BA,getRangeOffsets:()=>du,getRangeText:()=>fu,insertCKEditor:()=>jA,isHTML:()=>Ac,isSupportedInputElement:()=>ym,updateContentEditable:()=>VA,updateTextArea:()=>UA,useClickOutsideRoot:()=>ss,useStyles:()=>_,waitForElementVisibilityChange:()=>wm});var Fm=b(Ne()),An=b(Y());var ku=b(Y()),Tx=b(Ne());var Qa=ku.default.createContext({});function _(e,t){let s=(0,ku.useContext)(Qa),{debug:n}=s,o=oe(s,["debug"])[e];return Object.entries(t).reduce((i,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},i),{[a]:(0,Tx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var Cx={root:"dd-4s9wq"};var ys=b(R()),Pu=()=>(0,ys.jsxs)("svg",{className:Cx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,ys.jsx)("defs",{children:(0,ys.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,ys.jsx)("title",{children:"Failed loading image"}),(0,ys.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 Dm={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var vs=b(R()),Au=(0,An.createContext)(Dm),kI=({title:e,src:t})=>{let n=(0,An.useContext)(Au),[r,o]=(0,An.useState)(!1);return(0,An.useEffect)(()=>{o(!1)},[t]),(0,vs.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,vs.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,vs.jsx)(Pu,{})})},RI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,An.useContext)(Au);return(0,vs.jsx)("div",{className:(0,Fm.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},PI=s=>{var i=s,{as:e="h1",cropText:t=!1,className:n,children:r}=i,o=oe(i,["as","cropText","className","children"]);let a=(0,An.useContext)(Au);return An.default.createElement(e,S({className:(0,Fm.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Iu=({children:e})=>{let t=_("Card",Dm);return(0,vs.jsx)("div",{className:t.root,children:(0,vs.jsx)(Au.Provider,{value:t,children:e})})};Iu.Image=kI;Iu.Content=RI;Iu.Title=PI;var Te=Iu;var Ix=b(Ne());var Ax={root:"dd-llBx9"};var Lx=b(R());var AI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},II=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let s=_("KeyboardHint",Ax);return(0,Lx.jsx)("span",S({"data-key":AI[t],className:(0,Ix.default)(e,s.root)},n))},Lu=II;var Mx=b(Ne());var Ox={root:"dd-e6HXZ"};var _x=b(R()),LI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let s=_("Label",Ox);return(0,_x.jsx)("span",P(S({},n),{className:(0,Mx.default)(e,s.root),children:t}))},Nx=LI;var Dx={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var ki=b(R()),OI=o=>{var s=o,{title:e,children:t,type:n}=s,r=oe(s,["title","children","type"]);let i=_("Section",Dx);return(0,ki.jsxs)("section",P(S({},r),{className:i.root,"data-section-type":n,children:[e&&(0,ki.jsx)("div",{className:i.subTitleContainer,children:(0,ki.jsx)("span",{className:i.subtitle,children:e})}),(0,ki.jsx)("div",{className:i.suggestions,children:t})]}))},wr=OI;var Vx=b(Ne()),$x=b(Y());var To=b(Y()),Bx=b(R()),Fx=(0,To.createContext)(null),zx=({scrollContainerRef:e,children:t})=>{let n=(0,To.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:s}=o.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();o.scrollTo({top:i-s})},[]);return(0,Bx.jsx)(Fx.Provider,{value:n,children:t})},Hx=e=>{let t=(0,To.useContext)(Fx);(0,To.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Ux={root:"dd-uoTXh"};var zm=b(R()),MI=({className:e,children:t})=>{let n=_("SectionList",Ux),r=(0,$x.useRef)(null);return(0,zm.jsx)(zx,{scrollContainerRef:r,children:(0,zm.jsx)("div",{ref:r,className:(0,Vx.default)(n.root,e),children:t})})},Ri=MI;var Pi=b(Ne()),rn=b(Y());var Hm={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var zt=b(R()),Co=(0,rn.createContext)(Hm),NI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let s=(0,rn.useContext)(Co);return(0,zt.jsx)("div",P(S({},n),{className:(0,Pi.default)(s.actions,{[s.actionsIsFixed]:e}),children:t}))};function _I(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:s}=l,i=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,rn.useContext)(Co);return(0,zt.jsxs)(e||"button",P(S({type:"button",className:(0,Pi.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:s},t),title:r,"aria-label":r},i),{children:[n&&(0,zt.jsx)("span",{className:c.icon,children:n}),o]}))}var DI=({children:e})=>{let t=(0,rn.useContext)(Co);return(0,zt.jsx)("div",{className:t.buttonsContainer,children:e})},FI=({className:e,primary:t,disabled:n,label:r,children:o})=>{let s=(0,rn.useContext)(Co);return(0,zt.jsxs)("div",{className:(0,Pi.default)(e,s.actionButton,s.dropdownButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onMouseDown:i=>i.stopPropagation(),onClick:i=>i.stopPropagation(),children:[r,(0,zt.jsx)("ul",{className:s.dropdownList,children:o})]})},zI=({index:e,label:t,onClick:n})=>{let r=(0,rn.useContext)(Co);return(0,zt.jsx)("li",{className:r.dropdownItem,children:(0,zt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},HI=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let s=(0,rn.useContext)(Co);return(0,zt.jsx)("button",{type:"button",className:(0,Pi.default)(e,s.actionButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onClick:r!=null?r:i=>i.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},BI=({labels:e})=>{let t=(0,rn.useContext)(Co);return(0,zt.jsx)("div",{className:t.labels,children:e.map(n=>(0,zt.jsx)("span",{className:t.label,children:n},n))})},ko=rn.default.forwardRef((a,i)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,s=oe(l,["className","selected","onClick","children","as"]);let c=_("Suggestion",Hm),u=(0,rn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,zt.jsx)(o,P(S({},s),{ref:i,className:(0,Pi.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,zt.jsx)(Co.Provider,{value:c,children:r})}))});ko.Labels=BI;ko.Actions=NI;ko.ActionButton=HI;ko.DropdownButton=FI;ko.DropdownItem=zI;ko.ButtonsContainer=DI;ko.Button=_I;var ye=ko;var Wx=b(Ne());var jx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var Kx=b(R()),UI=({withDivider:e,children:t})=>{let n=_("SuggestionList",jx);return(0,Kx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Wx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Ht=UI;var qx=b(Ne());var Gx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Ou=b(R()),VI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=_("ToggleButton",Gx);return(0,Ou.jsx)("button",{type:"button",className:(0,qx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ou.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ou.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},xs=VI;var Yx=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Mu=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Xx=/x-deepdesk-(([a-z0-9\-_])+-version)/,Nu=["cues","custom-data","custom-data-banner","knowledge-assist"],Qx=Intl.DateTimeFormat().resolvedOptions().timeZone,Ro=(m=>(m.SEARCH="search",m.TEMPLATE="template",m.ELASTIC_SEARCH="search-autocomplete",m.GPT="gpt",m.TRIE="trie",m.TRIE_WITH_TYPOS="trie-with-typos",m.SEMANTIC="semantic",m.TEXT_RECOMMENDATION="text_recommendation",m.URL_RECOMMENDATION="url_recommendation",m.LINK_RECOMMENDATION="link_recommendation",m.PERSONAL_COLLECTION="personal-collection",m.PERSONAL_COLLECTION_SEARCH="personal-collection-search",m.SEARCH_OVERLAY="search-overlay",m.SEARCH_PREVIEW="search-preview",m.SEARCH_URL="search-url",m))(Ro||{}),Ai=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i.SPACE="space",i))(Ai||{});var ms=b(yE());var _R=b(Y());function Tt(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 WO=typeof Symbol=="function"&&Symbol.observable||"@@observable",vE=WO,ey=()=>Math.random().toString(36).substring(7).split("").join("."),KO={INIT:`@@redux/INIT${ey()}`,REPLACE:`@@redux/REPLACE${ey()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ey()}`},ef=KO;function tf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ty(e,t,n){if(typeof e!="function")throw new Error(Tt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Tt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Tt(1));return n(ty)(e,t)}let r=e,o=t,s=new Map,i=s,a=0,l=!1;function c(){i===s&&(i=new Map,s.forEach((x,y)=>{i.set(y,x)}))}function u(){if(l)throw new Error(Tt(3));return o}function d(x){if(typeof x!="function")throw new Error(Tt(4));if(l)throw new Error(Tt(5));let y=!0;c();let g=a++;return i.set(g,x),function(){if(y){if(l)throw new Error(Tt(6));y=!1,c(),i.delete(g),s=null}}}function f(x){if(!tf(x))throw new Error(Tt(7));if(typeof x.type=="undefined")throw new Error(Tt(8));if(typeof x.type!="string")throw new Error(Tt(17));if(l)throw new Error(Tt(9));try{l=!0,o=r(o,x)}finally{l=!1}return(s=i).forEach(g=>{g()}),x}function p(x){if(typeof x!="function")throw new Error(Tt(10));r=x,f({type:ef.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Tt(11));function g(){let w=y;w.next&&w.next(u())}return g(),{unsubscribe:x(g)}},[vE](){return this}}}return f({type:ef.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[vE]:v}}function GO(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:ef.INIT})=="undefined")throw new Error(Tt(12));if(typeof n(void 0,{type:ef.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Tt(13))})}function nf(e){let t=Object.keys(e),n={};for(let i=0;i<t.length;i++){let a=t[i];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,s;try{GO(n)}catch(i){s=i}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],m=p(v,l);if(typeof m=="undefined"){let x=l&&l.type;throw new Error(Tt(14))}u[f]=m,c=c||m!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function sa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function xE(...e){return t=>(n,r)=>{let o=t(n,r),s=()=>{throw new Error(Tt(15))},i={getState:o.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(i));return s=sa(...a)(o.dispatch),P(S({},o),{dispatch:s})}}function wE(e){return tf(e)&&"type"in e&&typeof e.type=="string"}var kE=Symbol.for("immer-nothing"),SE=Symbol.for("immer-draftable"),Sn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ia=Object.getPrototypeOf;function Yo(e){return!!e&&!!e[Sn]}function Jn(e){var t;return e?RE(e)||Array.isArray(e)||!!e[SE]||!!((t=e.constructor)!=null&&t[SE])||lf(e)||cf(e):!1}var qO=Object.prototype.constructor.toString();function RE(e){if(!e||typeof e!="object")return!1;let t=ia(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===qO}function rf(e,t){af(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function af(e){let t=e[Sn];return t?t.type_:Array.isArray(e)?1:lf(e)?2:cf(e)?3:0}function oy(e,t){return af(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function PE(e,t,n){let r=af(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function YO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function lf(e){return e instanceof Map}function cf(e){return e instanceof Set}function _s(e){return e.copy_||e.base_}function sy(e,t){if(lf(e))return new Map(e);if(cf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=RE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[Sn];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){let i=o[s],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(ia(e),r)}else{let r=ia(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function uy(e,t=!1){return uf(e)||Yo(e)||!Jn(e)||(af(e)>1&&(e.set=e.add=e.clear=e.delete=XO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>uy(r,!0))),e}function XO(){Zn(2)}function uf(e){return Object.isFrozen(e)}var QO={};function Ds(e){let t=QO[e];return t||Zn(0,e),t}var jl;function AE(){return jl}function ZO(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function bE(e,t){t&&(Ds("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function iy(e){ay(e),e.drafts_.forEach(JO),e.drafts_=null}function ay(e){e===jl&&(jl=e.parent_)}function EE(e){return jl=ZO(jl,e)}function JO(e){let t=e[Sn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function TE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Sn].modified_&&(iy(t),Zn(4)),Jn(e)&&(e=of(t,e),t.parent_||sf(t,e)),t.patches_&&Ds("Patches").generateReplacementPatches_(n[Sn].base_,e,t.patches_,t.inversePatches_)):e=of(t,n,[]),iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==kE?e:void 0}function of(e,t,n){if(uf(t))return t;let r=t[Sn];if(!r)return rf(t,(o,s)=>CE(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return sf(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),rf(s,(a,l)=>CE(e,r,o,a,l,n,i)),sf(e,o,!1),n&&e.patches_&&Ds("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function CE(e,t,n,r,o,s,i){if(Yo(o)){let a=s&&t&&t.type_!==3&&!oy(t.assigned_,r)?s.concat(r):void 0,l=of(e,o,a);if(PE(n,r,l),Yo(l))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Jn(o)&&!uf(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;of(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&sf(e,o)}}function sf(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&uy(t,n)}function eM(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:AE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,s=dy;n&&(o=[r],s=Wl);let{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var dy={get(e,t){if(t===Sn)return e;let n=_s(e);if(!oy(n,t))return tM(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===ny(e.base_,t)?(ry(e),e.copy_[t]=cy(r,e)):r},has(e,t){return t in _s(e)},ownKeys(e){return Reflect.ownKeys(_s(e))},set(e,t,n){let r=IE(_s(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=ny(_s(e),t),s=o==null?void 0:o[Sn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(YO(n,o)&&(n!==void 0||oy(e.base_,t)))return!0;ry(e),ly(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ny(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ry(e),ly(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=_s(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ia(e.base_)},setPrototypeOf(){Zn(12)}},Wl={};rf(dy,(e,t)=>{Wl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wl.deleteProperty=function(e,t){return Wl.set.call(this,e,t,void 0)};Wl.set=function(e,t,n){return dy.set.call(this,e[0],t,n,e[0])};function ny(e,t){let n=e[Sn];return(n?_s(n):e)[t]}function tM(e,t,n){var o;let r=IE(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function IE(e,t){if(!(t in e))return;let n=ia(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ia(n)}}function ly(e){e.modified_||(e.modified_=!0,e.parent_&&ly(e.parent_))}function ry(e){e.copy_||(e.copy_=sy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var nM=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let s=n;n=t;let i=this;return function(l=s,...c){return i.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let s=EE(this),i=cy(t,void 0),a=!0;try{o=n(i),a=!1}finally{a?iy(s):ay(s)}return bE(s,r),TE(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===kE&&(o=void 0),this.autoFreeze_&&uy(o,!0),r){let s=[],i=[];Ds("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,l=>t(l,...a));let r,o;return[this.produce(t,n,(i,a)=>{r=i,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),Yo(e)&&(e=rM(e));let t=EE(this),n=cy(e,void 0);return n[Sn].isManual_=!0,ay(t),n}finishDraft(e,t){let n=e&&e[Sn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return bE(r,t),TE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=Ds("Patches").applyPatches_;return Yo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function cy(e,t){let n=lf(e)?Ds("MapSet").proxyMap_(e,t):cf(e)?Ds("MapSet").proxySet_(e,t):eM(e,t);return(t?t.scope_:AE()).drafts_.push(n),n}function rM(e){return Yo(e)||Zn(10,e),LE(e)}function LE(e){if(!Jn(e)||uf(e))return e;let t=e[Sn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=sy(e,t.scope_.immer_.useStrictShallowCopy_)}else n=sy(e,!0);return rf(n,(r,o)=>{PE(n,r,LE(o))}),t&&(t.finalized_=!1),n}var bn=new nM,df=bn.produce,ez=bn.produceWithPatches.bind(bn),tz=bn.setAutoFreeze.bind(bn),nz=bn.setUseStrictShallowCopy.bind(bn),rz=bn.applyPatches.bind(bn),oz=bn.createDraft.bind(bn),sz=bn.finishDraft.bind(bn);function oM(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sM(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function iM(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var OE=e=>Array.isArray(e)?e:[e];function aM(e){let t=Array.isArray(e[0])?e[0]:e;return iM(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function lM(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var cz=Symbol();var uz=Object.getPrototypeOf({});var cM=class{constructor(e){this.value=e}deref(){return this.value}},uM=typeof WeakRef!="undefined"?WeakRef:cM,dM=0,ME=1;function ff(){return{s:dM,v:void 0,o:null,p:null}}function fy(e,t={}){let n=ff(),{resultEqualityCheck:r}=t,o,s=0;function i(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let m=arguments[p];if(typeof m=="function"||typeof m=="object"&&m!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(m);y===void 0?(a=ff(),x.set(m,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(m);y===void 0?(a=ff(),x.set(m,a)):a=y}}let c=a,u;if(a.s===ME)u=a.v;else if(u=e.apply(null,arguments),s++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new uM(u):u}return c.s=ME,c.v=u,u}return i.clearCache=()=>{n=ff(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function NE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),oM(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=fy,argsMemoizeOptions:v=[],devModeChecks:m={}}=u,x=OE(f),y=OE(v),g=aM(o),h=d(function(){return s++,c.apply(null,arguments)},...x),w=!0,E=p(function(){i++;let C=lM(g,arguments);return a=h.apply(null,C),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var $t=NE(fy),fM=Object.assign((e,t=$t)=>{sM(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>fM});function _E(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var DE=_E(),FE=_E;var pM=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sa:sa.apply(null,arguments)},xz=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},mM=e=>e&&typeof e.match=="function";function it(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Jr(0));return S(S({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>wE(r)&&r.type===e,n}var $E=class Kl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kl.prototype)}static get[Symbol.species](){return Kl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kl(...t[0].concat(this)):new Kl(...t.concat(this))}};function zE(e){return Jn(e)?df(e,()=>{}):e}function HE(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function gM(e){return typeof e=="boolean"}var hM=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t!=null?t:{},i=new $E;return n&&(gM(n)?i.push(DE):i.push(FE(n.extraArgument))),i},yM="RTK_autoBatch";var BE=e=>t=>{setTimeout(t,e)},vM=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,s=!1,i=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:BE(10):e.type==="callback"?e.queueNotification:BE(e.timeout),c=()=>{i=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[yM]),s=!o,s&&(i||(i=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},xM=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new $E(e);return r&&o.push(vM(typeof r=="object"?r:void 0)),o};function jE(e){let t=hM(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{},a;if(typeof n=="function")a=n;else if(tf(n))a=nf(n);else throw new Error(Jr(1));let l;typeof r=="function"?l=r(t):l=t();let c=sa;o&&(c=pM(S({trace:!1},typeof o=="object"&&o)));let u=xE(...l),d=xM(u),f=typeof i=="function"?i(d):d(),p=c(...f);return ty(a,s,p)}function WE(e){let t={},n=[],r,o={addCase(s,i){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(Jr(28));if(a in t)throw new Error(Jr(29));return t[a]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function wM(e){return typeof e=="function"}function SM(e,t){let[n,r,o]=WE(t),s;if(wM(e))s=()=>zE(e());else{let a=zE(e);s=()=>a}function i(a=s(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(Yo(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return df(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return i.getInitialState=s,i}var bM=(e,t)=>mM(e)?e.match(t):e(t);function EM(...e){return t=>e.some(n=>bM(n,t))}var TM="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",CM=(e=21)=>{let t="",n=e;for(;n--;)t+=TM[Math.random()*64|0];return t},kM=["name","message","stack","code"],py=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},UE=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},RM=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of kM)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},VE="External signal was aborted",ge=(()=>{function e(t,n,r){let o=it(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),s=it(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),i=it(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||RM)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):CM(),v=new AbortController,m,x;function y(h){x=h,v.abort()}c&&(c.aborted?y(VE):c.addEventListener("abort",()=>y(VE),{once:!0}));let g=function(){return I(this,null,function*(){var E,k;let h;try{let C=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(AM(C)&&(C=yield C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((V,N)=>{m=()=>{N({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",m)});u(s(p,l,(k=r==null?void 0:r.getPendingMeta)==null?void 0:k.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),h=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(V,N)=>new py(V,N),fulfillWithValue:(V,N)=>new UE(V,N)})).then(V=>{if(V instanceof py)throw V;return V instanceof UE?o(V.payload,p,l,V.meta):o(V,p,l)})])}catch(C){h=C instanceof py?i(null,p,l,C.payload,C.meta):i(C,p,l)}finally{m&&v.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&i.match(h)&&h.meta.condition||u(h),h})}();return Object.assign(g,{abort:y,requestId:p,arg:l,unwrap(){return g.then(PM)}})}}return Object.assign(a,{pending:s,rejected:i,fulfilled:o,settled:EM(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function PM(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function AM(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var KE=Symbol.for("rtk-slice-createasyncthunk"),Tz={[KE]:ge};function IM(e,t){return`${e}/${t}`}function LM({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[KE];return function(o){let{name:s,reducerPath:i=s}=o;if(!s)throw new Error(Jr(11));let a=(typeof o.reducers=="function"?o.reducers(MM()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(h,w){let E=typeof h=="string"?h:h.type;if(!E)throw new Error(Jr(12));if(E in c.sliceCaseReducersByType)throw new Error(Jr(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(h,w){return c.sliceMatchers.push({matcher:h,reducer:w}),u},exposeAction(h,w){return c.actionCreators[h]=w,u},exposeCaseReducer(h,w){return c.sliceCaseReducersByName[h]=w,u}};l.forEach(h=>{let w=a[h],E={reducerName:h,type:IM(s,h),createNotation:typeof o.reducers=="function"};_M(w)?FM(E,w,u,t):NM(E,w,u)});function d(){let[h={},w=[],E=void 0]=typeof o.extraReducers=="function"?WE(o.extraReducers):[o.extraReducers],k=S(S({},h),c.sliceCaseReducersByType);return SM(o.initialState,C=>{for(let A in k)C.addCase(A,k[A]);for(let A of c.sliceMatchers)C.addMatcher(A.matcher,A.reducer);for(let A of w)C.addMatcher(A.matcher,A.reducer);E&&C.addDefaultCase(E)})}let f=h=>h,p=new Map,v;function m(h,w){return v||(v=d()),v(h,w)}function x(){return v||(v=d()),v.getInitialState()}function y(h,w=!1){function E(C){let A=C[h];return typeof A=="undefined"&&w&&(A=x()),A}function k(C=f){let A=HE(p,w,()=>new WeakMap);return HE(A,C,()=>{var N;let V={};for(let[L,J]of Object.entries((N=o.selectors)!=null?N:{}))V[L]=OM(J,C,x,w);return V})}return{reducerPath:h,getSelectors:k,get selectors(){return k(E)},selectSlice:E}}let g=P(S({name:s,reducer:m,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(i)),{injectInto(h,k={}){var C=k,{reducerPath:w}=C,E=oe(C,["reducerPath"]);let A=w!=null?w:i;return h.inject({reducerPath:A,reducer:m},E),S(S({},g),y(A,!0))}});return g}}function OM(e,t,n,r){function o(s,...i){let a=t(s);return typeof a=="undefined"&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var ke=LM();function MM(){function e(t,n){return S({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function NM({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!DM(r))throw new Error(Jr(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?it(e,i):it(e))}function _M(e){return e._reducerDefinitionType==="asyncThunk"}function DM(e){return e._reducerDefinitionType==="reducerWithPrepare"}function FM({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Jr(18));let{payloadCreator:s,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,s,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||pf,pending:a||pf,rejected:l||pf,settled:c||pf})}function pf(){}var GE="listener",qE="completed",YE="cancelled",Cz=`task-${YE}`,kz=`task-${qE}`,Rz=`${GE}-${YE}`,Pz=`${GE}-${qE}`;var{assign:XE}=Object;var my="listenerMiddleware";var zM=XE(it(`${my}/add`),{withTypes:()=>zM}),Az=it(`${my}/removeAll`),HM=XE(it(`${my}/remove`),{withTypes:()=>HM});var Iz=Symbol.for("rtk-state-proxy-original");function Jr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var le=b(Y(),1),g1=b(e1(),1);var GM=le.version.startsWith("19"),qM=Symbol.for(GM?"react.transitional.element":"react.element"),YM=Symbol.for("react.portal"),XM=Symbol.for("react.fragment"),QM=Symbol.for("react.strict_mode"),ZM=Symbol.for("react.profiler"),JM=Symbol.for("react.consumer"),eN=Symbol.for("react.context"),a1=Symbol.for("react.forward_ref"),tN=Symbol.for("react.suspense"),nN=Symbol.for("react.suspense_list"),wy=Symbol.for("react.memo"),rN=Symbol.for("react.lazy");var oN=a1,sN=wy;function iN(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case qM:switch(e=e.type,e){case XM:case ZM:case QM:case tN:case nN:return e;default:switch(e=e&&e.$$typeof,e){case eN:case a1:case rN:case wy:return e;case JM:return e;default:return t}}case YM:return t}}}function aN(e){return iN(e)===wy}function lN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let a=!1,l,c,u,d,f;function p(g,h){return l=g,c=h,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function m(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let g=e(l,c),h=!i(g,u);return u=g,h&&(f=n(u,d,c)),f}function y(g,h){let w=!s(h,c),E=!o(g,l,h,c);return l=g,c=h,w&&E?v():w?m():E?x():f}return function(h,w){return a?y(h,w):p(h,w)}}function cN(e,s){var i=s,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=i,o=oe(i,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return lN(a,l,c,e,o)}function uN(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function vy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function t1(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function l1(e,t){return function(r,{displayName:o}){let s=function(a,l){return s.dependsOnOwnProps?s.mapToProps(a,l):s.mapToProps(a,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(a,l){s.mapToProps=e,s.dependsOnOwnProps=t1(e);let c=s(a,l);return typeof c=="function"&&(s.mapToProps=c,s.dependsOnOwnProps=t1(c),c=s(a,l)),c},s}}function Sy(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function dN(e){return e&&typeof e=="object"?vy(t=>uN(e,t)):e?typeof e=="function"?l1(e,"mapDispatchToProps"):Sy(e,"mapDispatchToProps"):vy(t=>({dispatch:t}))}function fN(e){return e?typeof e=="function"?l1(e,"mapStateToProps"):Sy(e,"mapStateToProps"):vy(()=>({}))}function pN(e,t,n){return S(S(S({},n),e),t)}function mN(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(l,c,u){let d=e(l,c,u);return s?o(d,i)||(i=d):(s=!0,i=d),i}}}function gN(e){return e?typeof e=="function"?mN(e):Sy(e,"mergeProps"):()=>pN}function hN(e){e()}function yN(){let e=null,t=null;return{clear(){e=null,t=null},notify(){hN(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var n1={notify(){},get:()=>[]};function c1(e,t){let n,r=n1,o=0,s=!1;function i(m){u();let x=r.subscribe(m),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return s}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=yN())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=n1)}function f(){s||(s=!0,u())}function p(){s&&(s=!1,d())}let v={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var vN=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",xN=vN(),wN=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",SN=wN(),bN=()=>xN||SN?le.useLayoutEffect:le.useEffect,mf=bN();function r1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function gy(e,t){if(r1(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])||!r1(e[n[o]],t[n[o]]))return!1;return!0}var EN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},TN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},CN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kN={[oN]:CN,[sN]:u1};function o1(e){return aN(e)?u1:kN[e.$$typeof]||EN}var RN=Object.defineProperty,PN=Object.getOwnPropertyNames,s1=Object.getOwnPropertySymbols,AN=Object.getOwnPropertyDescriptor,IN=Object.getPrototypeOf,i1=Object.prototype;function xy(e,t){if(typeof t!="string"){if(i1){let s=IN(t);s&&s!==i1&&xy(e,s)}let n=PN(t);s1&&(n=n.concat(s1(t)));let r=o1(e),o=o1(t);for(let s=0;s<n.length;++s){let i=n[s];if(!TN[i]&&!(o&&o[i])&&!(r&&r[i])){let a=AN(t,i);try{RN(e,i,a)}catch(l){}}}}return e}var hy=Symbol.for("react-redux-context"),yy=typeof globalThis!="undefined"?globalThis:{};function LN(){var n;if(!le.createContext)return{};let e=(n=yy[hy])!=null?n:yy[hy]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var eo=LN(),ON=[null,null];function MN(e,t,n){mf(()=>e(...t),n)}function NN(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function _N(e,t,n,r,o,s,i,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let m=t.getState(),x,y;try{x=r(m,o.current)}catch(g){y=g,f=g}y||(f=null),x===s.current?i.current||c():(s.current=x,l.current=x,i.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function DN(e,t){return e===t}function FN(e,t,n,{pure:r,areStatesEqual:o=DN,areOwnPropsEqual:s=gy,areStatePropsEqual:i=gy,areMergedPropsEqual:a=gy,forwardRef:l=!1,context:c=eo}={}){let u=c,d=fN(e),f=dN(t),p=gN(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",g=`Connect(${y})`,h={shouldHandleStateChanges:v,displayName:g,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:a};function w(C){let[A,V,N]=le.useMemo(()=>{let pe=C,{reactReduxForwardedRef:Q}=pe,ae=oe(pe,["reactReduxForwardedRef"]);return[C.context,Q,ae]},[C]),L=le.useMemo(()=>{let Q=u;return A!=null&&A.Consumer,Q},[A,u]),J=le.useContext(L),X=!!C.store&&!!C.store.getState&&!!C.store.dispatch,M=!!J&&!!J.store,F=X?C.store:J.store,se=M?J.getServerState:F.getState,G=le.useMemo(()=>cN(F.dispatch,h),[F]),[U,B]=le.useMemo(()=>{if(!v)return ON;let Q=c1(F,X?void 0:J.subscription),ae=Q.notifyNestedSubs.bind(Q);return[Q,ae]},[F,X,J]),K=le.useMemo(()=>X?J:P(S({},J),{subscription:U}),[X,J,U]),$=le.useRef(void 0),W=le.useRef(N),z=le.useRef(void 0),fe=le.useRef(!1),de=le.useRef(!1),be=le.useRef(void 0);mf(()=>(de.current=!0,()=>{de.current=!1}),[]);let me=le.useMemo(()=>()=>z.current&&N===W.current?z.current:G(F.getState(),N),[F,N]),re=le.useMemo(()=>ae=>U?_N(v,F,U,G,W,$,fe,de,z,B,ae):()=>{},[U]);MN(NN,[W,$,fe,N,z,B]);let Ce;try{Ce=le.useSyncExternalStore(re,me,se?()=>G(se(),N):me)}catch(Q){throw be.current&&(Q.message+=`
8
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function gg(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Qg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var CM=typeof WeakMap=="function"?WeakMap:Map;function Vb(e,t,n){n=Gr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fd||(Fd=!0,ah=r),Qg(e,t)},n}function $b(e,t,n){n=Gr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Qg(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Qg(e,t),typeof r!="function"&&(Uo===null?Uo=new Set([this]):Uo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function eS(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new CM;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=HM.bind(null,e,t,n),t.then(e,e))}function tS(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nS(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gr(-1,1),t.tag=2,Bo(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var kM=Zr.ReactCurrentOwner,sn=!1;function Bt(e,t,n,r){t.child=e===null?vb(t,null,n,r):Ji(t,e.child,n,r)}function rS(e,t,n,r,o){n=n.render;var s=t.ref;return qi(t,o),r=Hh(e,t,n,r,s,o),n=Bh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Ue&&n&&Rh(t),t.flags|=1,Bt(e,t,r,o),t.child)}function oS(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Xh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,jb(e,t,s,r,o)):(e=hd(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,(e.lanes&o)===0){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Al,n(i,r)&&e.ref===t.ref)return Qr(e,t,o)}return t.flags|=1,e=$o(s,r),e.ref=t.ref,e.return=t,t.child=e}function jb(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Al(s,r)&&e.ref===t.ref)if(sn=!1,t.pendingProps=r=s,(e.lanes&o)!==0)(e.flags&131072)!==0&&(sn=!0);else return t.lanes=e.lanes,Qr(e,t,o)}return Zg(e,t,n,r,o)}function Wb(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De($i,gn),gn|=n;else{if((n&1073741824)===0)return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De($i,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De($i,gn),gn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De($i,gn),gn|=r;return Bt(e,t,o,n),t.child}function Kb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zg(e,t,n,r,o){var s=ln(n)?Ps:Lt.current;return s=Qi(t,s),qi(t,o),n=Hh(e,t,n,r,s,o),r=Bh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Qr(e,t,o)):(Ue&&r&&Rh(t),t.flags|=1,Bt(e,t,n,o),t.child)}function sS(e,t,n,r,o){if(ln(n)){var s=!0;Rd(t)}else s=!1;if(qi(t,o),t.stateNode===null)pd(e,t),Ub(t,n,r),Xg(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=_n(c):(c=ln(n)?Ps:Lt.current,c=Qi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Jw(t,i,r,c),Lo=!1;var f=t.memoizedState;i.state=f,Md(t,r,i,o),l=t.memoizedState,a!==r||f!==l||an.current||Lo?(typeof u=="function"&&(Yg(t,n,u,r),l=t.memoizedState),(a=Lo||Zw(t,n,a,r,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,wb(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kn(t.type,a),i.props=c,d=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=_n(l):(l=ln(n)?Ps:Lt.current,l=Qi(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Jw(t,i,r,l),Lo=!1,f=t.memoizedState,i.state=f,Md(t,r,i,o);var v=t.memoizedState;a!==d||f!==v||an.current||Lo?(typeof p=="function"&&(Yg(t,n,p,r),v=t.memoizedState),(c=Lo||Zw(t,n,c,r,f,v,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Jg(e,t,n,r,s,o)}function Jg(e,t,n,r,o,s){Kb(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&jw(t,n,!1),Qr(e,t,s);r=t.stateNode,kM.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Ji(t,e.child,null,s),t.child=Ji(t,null,a,s)):Bt(e,t,a,s),t.memoizedState=r.state,o&&jw(t,n,!0),t.child}function Gb(e){var t=e.stateNode;t.pendingContext?$w(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$w(e,t.context,!1),_h(e,t.containerInfo)}function iS(e,t,n,r,o){return Zi(),Ah(o),t.flags|=256,Bt(e,t,n,r),t.child}var eh={dehydrated:null,treeContext:null,retryLane:0};function th(e){return{baseLanes:e,cachePool:null,transitions:null}}function qb(e,t,n){var r=t.pendingProps,o=We.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(We,o&1),e===null)return Gg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},(r&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Qd(i,r,0,null),e=Rs(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=th(n),t.memoizedState=eh,e):$h(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return RM(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(i&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=$o(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=$o(a,s):(s=Rs(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?th(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=eh,r}return s=e.child,e=s.sibling,r=$o(s,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $h(e,t){return t=Qd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function od(e,t,n,r){return r!==null&&Ah(r),Ji(t,e.child,null,n),e=$h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function RM(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=gg(Error(D(422))),od(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Qd({mode:"visible",children:r.children},o,0,null),s=Rs(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,(t.mode&1)!==0&&Ji(t,e.child,null,i),t.child.memoizedState=th(i),t.memoizedState=eh,s);if((t.mode&1)===0)return od(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(D(419)),r=gg(s,r,void 0),od(e,t,i,r)}if(a=(i&e.childLanes)!==0,sn||a){if(r=gt,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|i))!==0?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Xr(e,o),Xn(r,e,o,-1))}return Yh(),r=gg(Error(D(421))),od(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=BM.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,hn=Ho(o.nextSibling),yn=t,Ue=!0,qn=null,e!==null&&(Ln[Mn++]=Wr,Ln[Mn++]=Kr,Ln[Mn++]=As,Wr=e.id,Kr=e.overflow,As=t),t=$h(t,r.children),t.flags|=4096,t)}function aS(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qg(e.return,t,n)}function hg(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Yb(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(Bt(e,t,r.children,n),r=We.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&aS(e,n,t);else if(e.tag===19)aS(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(We,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Nd(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),hg(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Nd(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}hg(t,!0,n,null,s);break;case"together":hg(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pd(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Qr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ls|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=$o(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$o(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function PM(e,t,n){switch(t.tag){case 3:Gb(t),Zi();break;case 5:Sb(t);break;case 1:ln(t.type)&&Rd(t);break;case 4:_h(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Id,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?qb(e,t,n):(De(We,We.current&1),e=Qr(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Yb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,Wb(e,t,n)}return Qr(e,t,n)}var Xb,nh,Qb,Zb;Xb=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}};nh=function(){};Qb=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Cs(kr.current);var s=null;switch(n){case"input":o=Tg(e,o),r=Tg(e,r),s=[];break;case"select":o=Ge({},o,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case"textarea":o=Rg(e,o),r=Rg(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cd)}Ag(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(bl.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(bl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Zb=function(e,t,n,r){n!==r&&(t.flags|=4)};function il(e,t){if(!Ue)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 At(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function AM(e,t,n){var r=t.pendingProps;switch(Ph(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return ln(t.type)&&kd(),At(t),null;case 3:return r=t.stateNode,ea(),ze(an),ze(Lt),Fh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qn!==null&&(uh(qn),qn=null))),nh(e,t),At(t),null;case 5:Dh(t);var o=Cs(Ol.current);if(n=t.type,e!==null&&t.stateNode!=null)Qb(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return At(t),null}if(e=Cs(kr.current),nd(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Tr]=t,r[Ml]=s,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<fl.length;o++)Fe(fl[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":gw(r,s),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Fe("invalid",r);break;case"textarea":yw(r,s),Fe("invalid",r)}Ag(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&td(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&td(r.textContent,a,e),o=["children",""+a]):bl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Fe("scroll",r)}switch(n){case"input":$u(r),hw(r,s,!0);break;case"textarea":$u(r),vw(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Cd)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Tr]=t,e[Ml]=r,Xb(e,t,!1,!1),t.stateNode=e;e:{switch(i=Ig(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<fl.length;o++)Fe(fl[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":gw(e,r),o=Tg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ge({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":yw(e,r),o=Rg(e,r),Fe("invalid",e);break;default:o=r}Ag(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?AS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&RS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&El(e,l):typeof l=="number"&&El(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(bl.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Fe("scroll",e):l!=null&&ph(e,s,l,i))}switch(n){case"input":$u(e),hw(e,r,!1);break;case"textarea":$u(e),vw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+jo(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ji(e,!!r.multiple,s,!1):r.defaultValue!=null&&ji(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Cd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return At(t),null;case 6:if(e&&t.stateNode!=null)Zb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Cs(Ol.current),Cs(kr.current),nd(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tr]=t,(s=r.nodeValue!==n)&&(e=yn,e!==null))switch(e.tag){case 3:td(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&td(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tr]=t,t.stateNode=r}return At(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&hn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)hb(),Zi(),t.flags|=98560,s=!1;else if(s=nd(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(D(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(D(317));s[Tr]=t}else Zi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;At(t),s=!1}else qn!==null&&(uh(qn),qn=null),s=!0;if(!s)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(We.current&1)!==0?it===0&&(it=3):Yh())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return ea(),nh(e,t),e===null&&Il(t.stateNode.containerInfo),At(t),null;case 10:return Mh(t.type._context),At(t),null;case 17:return ln(t.type)&&kd(),At(t),null;case 19:if(ze(We),s=t.memoizedState,s===null)return At(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)il(s,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Nd(e),i!==null){for(t.flags|=128,il(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}s.tail!==null&&Je()>na&&(t.flags|=128,r=!0,il(s,!1),t.lanes=4194304)}else{if(!r)if(e=Nd(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),il(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ue)return At(t),null}else 2*Je()-s.renderingStartTime>na&&n!==1073741824&&(t.flags|=128,r=!0,il(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Je(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return qh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(gn&1073741824)!==0&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function IM(e,t){switch(Ph(t),t.tag){case 1:return ln(t.type)&&kd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(),ze(an),ze(Lt),Fh(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Dh(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return ea(),null;case 10:return Mh(t.type._context),null;case 22:case 23:return qh(),null;case 24:return null;default:return null}}var sd=!1,It=!1,LM=typeof WeakSet=="function"?WeakSet:Set,q=null;function Vi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function rh(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var lS=!1;function MM(e,t){if(Bg=bd,e=rb(),kh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(w){n=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=i),f===s&&++u===r&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ug={focusedElem:e,selectionRange:n},bd=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,x=v.memoizedState,y=t.stateNode,h=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Kn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return v=lS,lS=!1,v}function xl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&rh(t,n,s)}o=o.next}while(o!==r)}}function Yd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function oh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jb(e){var t=e.alternate;t!==null&&(e.alternate=null,Jb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Ml],delete t[jg],delete t[mM],delete t[gM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function eE(e){return e.tag===5||e.tag===3||e.tag===4}function cS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,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=Cd));else if(r!==4&&(e=e.child,e!==null))for(sh(e,t,n),e=e.sibling;e!==null;)sh(e,t,n),e=e.sibling}function ih(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ih(e,t,n),e=e.sibling;e!==null;)ih(e,t,n),e=e.sibling}var St=null,Gn=!1;function Ao(e,t,n){for(n=n.child;n!==null;)tE(e,t,n),n=n.sibling}function tE(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Ud,n)}catch(a){}switch(n.tag){case 5:It||Vi(n,t);case 6:var r=St,o=Gn;St=null,Ao(e,t,n),St=r,Gn=o,St!==null&&(Gn?(e=St,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):St.removeChild(n.stateNode));break;case 18:St!==null&&(Gn?(e=St,n=n.stateNode,e.nodeType===8?cg(e.parentNode,n):e.nodeType===1&&cg(e,n),Rl(e)):cg(St,n.stateNode));break;case 4:r=St,o=Gn,St=n.stateNode.containerInfo,Gn=!0,Ao(e,t,n),St=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&((s&2)!==0||(s&4)!==0)&&rh(n,t,i),o=o.next}while(o!==r)}Ao(e,t,n);break;case 1:if(!It&&(Vi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Ao(e,t,n);break;case 21:Ao(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Ao(e,t,n),It=r):Ao(e,t,n);break;default:Ao(e,t,n)}}function uS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new LM),t.forEach(function(r){var o=UM.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:St=a.stateNode,Gn=!1;break e;case 3:St=a.stateNode.containerInfo,Gn=!0;break e;case 4:St=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(St===null)throw Error(D(160));tE(s,i,o),St=null,Gn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)nE(t,e),t=t.sibling}function nE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),br(e),r&4){try{xl(3,e,e.return),Yd(3,e)}catch(g){Ye(e,e.return,g)}try{xl(5,e,e.return)}catch(g){Ye(e,e.return,g)}}break;case 1:Wn(t,e),br(e),r&512&&n!==null&&Vi(n,n.return);break;case 5:if(Wn(t,e),br(e),r&512&&n!==null&&Vi(n,n.return),e.flags&32){var o=e.stateNode;try{El(o,"")}catch(g){Ye(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&TS(o,s),Ig(a,i);var c=Ig(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?AS(o,d):u==="dangerouslySetInnerHTML"?RS(o,d):u==="children"?El(o,d):ph(o,u,d,c)}switch(a){case"input":Cg(o,s);break;case"textarea":CS(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?ji(o,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?ji(o,!!s.multiple,s.defaultValue,!0):ji(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ml]=s}catch(g){Ye(e,e.return,g)}}break;case 6:if(Wn(t,e),br(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(g){Ye(e,e.return,g)}}break;case 3:if(Wn(t,e),br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rl(t.containerInfo)}catch(g){Ye(e,e.return,g)}break;case 4:Wn(t,e),br(e);break;case 13:Wn(t,e),br(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Kh=Je())),r&4&&uS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||u,Wn(t,e),It=c):Wn(t,e),br(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(q=e,u=e.child;u!==null;){for(d=q=u;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:xl(4,f,f.return);break;case 1:Vi(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Ye(r,n,g)}}break;case 5:Vi(f,f.return);break;case 22:if(f.memoizedState!==null){fS(d);continue}}p!==null?(p.return=f,q=p):fS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=PS("display",i))}catch(g){Ye(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Ye(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Wn(t,e),br(e),r&4&&uS(e);break;case 21:break;default:Wn(t,e),br(e)}}function br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(eE(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(El(o,""),r.flags&=-33);var s=cS(e);ih(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=cS(e);sh(e,a,i);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NM(e,t,n){q=e,rE(e,t,n)}function rE(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||sd;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||It;a=sd;var c=It;if(sd=i,(It=l)&&!c)for(q=o;q!==null;)i=q,l=i.child,i.tag===22&&i.memoizedState!==null?pS(o):l!==null?(l.return=i,q=l):pS(o);for(;s!==null;)q=s,rE(s,t,n),s=s.sibling;q=o,sd=a,It=c}dS(e,t,n)}else(o.subtreeFlags&8772)!==0&&s!==null?(s.return=o,q=s):dS(e,t,n)}}function dS(e){for(;q!==null;){var t=q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:It||Yd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Yw(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Yw(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Rl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}It||t.flags&512&&oh(t)}catch(f){Ye(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function fS(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function pS(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Yd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var s=t.return;try{oh(t)}catch(l){Ye(t,s,l)}break;case 5:var i=t.return;try{oh(t)}catch(l){Ye(t,i,l)}}}catch(l){Ye(t,t.return,l)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var OM=Math.ceil,Dd=Zr.ReactCurrentDispatcher,jh=Zr.ReactCurrentOwner,On=Zr.ReactCurrentBatchConfig,be=0,gt=null,et=null,bt=0,gn=0,$i=Go(0),it=0,zl=null,Ls=0,Xd=0,Wh=0,wl=null,on=null,Kh=0,na=1/0,$r=null,Fd=!1,ah=null,Uo=null,id=!1,_o=null,zd=0,Sl=0,lh=null,md=-1,gd=0;function Ut(){return(be&6)!==0?Je():md!==-1?md:md=Je()}function Vo(e){return(e.mode&1)===0?1:(be&2)!==0&&bt!==0?bt&-bt:yM.transition!==null?(gd===0&&(gd=US()),gd):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:qS(e.type)),e)}function Xn(e,t,n,r){if(50<Sl)throw Sl=0,lh=null,Error(D(185));Hl(e,n,r),((be&2)===0||e!==gt)&&(e===gt&&((be&2)===0&&(Xd|=n),it===4&&No(e,bt)),cn(e,r),n===1&&be===0&&(t.mode&1)===0&&(na=Je()+500,Kd&&qo()))}function cn(e,t){var n=e.callbackNode;xL(e,t);var r=Sd(e,e===gt?bt:0);if(r===0)n!==null&&Sw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Sw(n),t===1)e.tag===0?hM(mS.bind(null,e)):pb(mS.bind(null,e)),fM(function(){(be&6)===0&&qo()}),n=null;else{switch(VS(r)){case 1:n=vh;break;case 4:n=HS;break;case 16:n=wd;break;case 536870912:n=BS;break;default:n=wd}n=dE(n,oE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oE(e,t){if(md=-1,gd=0,(be&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Yi()&&e.callbackNode!==n)return null;var r=Sd(e,e===gt?bt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Hd(e,r);else{t=r;var o=be;be|=2;var s=iE();(gt!==e||bt!==t)&&($r=null,na=Je()+500,ks(e,t));do try{FM();break}catch(a){sE(e,a)}while(!0);Lh(),Dd.current=s,be=o,et!==null?t=0:(gt=null,bt=0,t=it)}if(t!==0){if(t===2&&(o=_g(e),o!==0&&(r=o,t=ch(e,o))),t===1)throw n=zl,ks(e,0),No(e,r),cn(e,Je()),n;if(t===6)No(e,r);else{if(o=e.current.alternate,(r&30)===0&&!_M(o)&&(t=Hd(e,r),t===2&&(s=_g(e),s!==0&&(r=s,t=ch(e,s))),t===1))throw n=zl,ks(e,0),No(e,r),cn(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:bs(e,on,$r);break;case 3:if(No(e,r),(r&130023424)===r&&(t=Kh+500-Je(),10<t)){if(Sd(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=$g(bs.bind(null,e,on,$r),t);break}bs(e,on,$r);break;case 4:if(No(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Yn(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*OM(r/1960))-r,10<r){e.timeoutHandle=$g(bs.bind(null,e,on,$r),r);break}bs(e,on,$r);break;case 5:bs(e,on,$r);break;default:throw Error(D(329))}}}return cn(e,Je()),e.callbackNode===n?oE.bind(null,e):null}function ch(e,t){var n=wl;return e.current.memoizedState.isDehydrated&&(ks(e,t).flags|=256),e=Hd(e,t),e!==2&&(t=on,on=n,t!==null&&uh(t)),e}function uh(e){on===null?on=e:on.push.apply(on,e)}function _M(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Qn(s(),o))return!1}catch(i){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function No(e,t){for(t&=~Wh,t&=~Xd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function mS(e){if((be&6)!==0)throw Error(D(327));Yi();var t=Sd(e,0);if((t&1)===0)return cn(e,Je()),null;var n=Hd(e,t);if(e.tag!==0&&n===2){var r=_g(e);r!==0&&(t=r,n=ch(e,r))}if(n===1)throw n=zl,ks(e,0),No(e,t),cn(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bs(e,on,$r),cn(e,Je()),null}function Gh(e,t){var n=be;be|=1;try{return e(t)}finally{be=n,be===0&&(na=Je()+500,Kd&&qo())}}function Ms(e){_o!==null&&_o.tag===0&&(be&6)===0&&Yi();var t=be;be|=1;var n=On.transition,r=Ie;try{if(On.transition=null,Ie=1,e)return e()}finally{Ie=r,On.transition=n,be=t,(be&6)===0&&qo()}}function qh(){gn=$i.current,ze($i)}function ks(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dM(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(Ph(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&kd();break;case 3:ea(),ze(an),ze(Lt),Fh();break;case 5:Dh(r);break;case 4:ea();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Mh(r.type._context);break;case 22:case 23:qh()}n=n.return}if(gt=e,et=e=$o(e.current,null),bt=gn=t,it=0,zl=null,Wh=Xd=Ls=0,on=wl=null,Ts!==null){for(t=0;t<Ts.length;t++)if(n=Ts[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Ts=null}return e}function sE(e,t){do{var n=et;try{if(Lh(),dd.current=_d,Od){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Od=!1}if(Is=0,mt=st=Ke=null,vl=!1,_l=0,jh.current=null,n===null||n.return===null){it=1,zl=t,et=null;break}e:{var s=e,i=n.return,a=n,l=t;if(t=bt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=tS(i);if(p!==null){p.flags&=-257,nS(p,i,a,s,t),p.mode&1&&eS(s,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if((t&1)===0){eS(s,c,t),Yh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=tS(i);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),nS(x,i,a,s,t),Ah(ta(l,a));break e}}s=l=ta(l,a),it!==4&&(it=2),wl===null?wl=[s]:wl.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Vb(s,l,t);qw(s,y);break e;case 1:a=l;var h=s.type,m=s.stateNode;if((s.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Uo===null||!Uo.has(m)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=$b(s,a,t);qw(s,w);break e}}s=s.return}while(s!==null)}lE(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function iE(){var e=Dd.current;return Dd.current=_d,e===null?_d:e}function Yh(){(it===0||it===3||it===2)&&(it=4),gt===null||(Ls&268435455)===0&&(Xd&268435455)===0||No(gt,bt)}function Hd(e,t){var n=be;be|=2;var r=iE();(gt!==e||bt!==t)&&($r=null,ks(e,t));do try{DM();break}catch(o){sE(e,o)}while(!0);if(Lh(),be=n,Dd.current=r,et!==null)throw Error(D(261));return gt=null,bt=0,it}function DM(){for(;et!==null;)aE(et)}function FM(){for(;et!==null&&!uL();)aE(et)}function aE(e){var t=uE(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?lE(e):et=t,jh.current=null}function lE(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=AM(n,t,gn),n!==null){et=n;return}}else{if(n=IM(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);it===0&&(it=5)}function bs(e,t,n){var r=Ie,o=On.transition;try{On.transition=null,Ie=1,zM(e,t,n,r)}finally{On.transition=o,Ie=r}return null}function zM(e,t,n,r){do Yi();while(_o!==null);if((be&6)!==0)throw Error(D(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(wL(e,s),e===gt&&(et=gt=null,bt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||id||(id=!0,dE(wd,function(){return Yi(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=On.transition,On.transition=null;var i=Ie;Ie=1;var a=be;be|=4,jh.current=null,MM(e,n),nE(n,e),iM(Ug),bd=!!Bg,Ug=Bg=null,e.current=n,NM(n,e,o),dL(),be=a,Ie=i,On.transition=s}else e.current=n;if(id&&(id=!1,_o=e,zd=o),s=e.pendingLanes,s===0&&(Uo=null),mL(n.stateNode,r),cn(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Fd)throw Fd=!1,e=ah,ah=null,e;return(zd&1)!==0&&e.tag!==0&&Yi(),s=e.pendingLanes,(s&1)!==0?e===lh?Sl++:(Sl=0,lh=e):Sl=0,qo(),null}function Yi(){if(_o!==null){var e=VS(zd),t=On.transition,n=Ie;try{if(On.transition=null,Ie=16>e?16:e,_o===null)var r=!1;else{if(e=_o,_o=null,zd=0,(be&6)!==0)throw Error(D(331));var o=be;for(be|=4,q=e.current;q!==null;){var s=q,i=s.child;if((q.flags&16)!==0){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(q=c;q!==null;){var u=q;switch(u.tag){case 0:case 11:case 15:xl(8,u,s)}var d=u.child;if(d!==null)d.return=u,q=d;else for(;q!==null;){u=q;var f=u.sibling,p=u.return;if(Jb(u),u===c){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var v=s.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}q=s}}if((s.subtreeFlags&2064)!==0&&i!==null)i.return=s,q=i;else e:for(;q!==null;){if(s=q,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:xl(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,q=y;break e}q=s.return}}var h=e.current;for(q=h;q!==null;){i=q;var m=i.child;if((i.subtreeFlags&2064)!==0&&m!==null)m.return=i,q=m;else e:for(i=h;q!==null;){if(a=q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Yd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===i){q=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,q=w;break e}q=a.return}}if(be=o,qo(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Ud,e)}catch(E){}r=!0}return r}finally{Ie=n,On.transition=t}}return!1}function gS(e,t,n){t=ta(n,t),t=Vb(e,t,1),e=Bo(e,t,1),t=Ut(),e!==null&&(Hl(e,1,t),cn(e,t))}function Ye(e,t,n){if(e.tag===3)gS(e,e,n);else for(;t!==null;){if(t.tag===3){gS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Uo===null||!Uo.has(r))){e=ta(n,e),e=$b(t,e,1),t=Bo(t,e,1),e=Ut(),t!==null&&(Hl(t,1,e),cn(t,e));break}}t=t.return}}function HM(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,gt===e&&(bt&n)===n&&(it===4||it===3&&(bt&130023424)===bt&&500>Je()-Kh?ks(e,0):Wh|=n),cn(e,t)}function cE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ku,Ku<<=1,(Ku&130023424)===0&&(Ku=4194304)));var n=Ut();e=Xr(e,t),e!==null&&(Hl(e,t,n),cn(e,n))}function BM(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cE(e,n)}function UM(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),cE(e,n)}var uE;uE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||an.current)sn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return sn=!1,PM(e,t,n);sn=(e.flags&131072)!==0}else sn=!1,Ue&&(t.flags&1048576)!==0&&mb(t,Ad,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pd(e,t),e=t.pendingProps;var o=Qi(t,Lt.current);qi(t,n),o=Hh(null,t,r,e,o,n);var s=Bh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ln(r)?(s=!0,Rd(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Oh(t),o.updater=qd,t.stateNode=o,o._reactInternals=t,Xg(t,r,e,n),t=Jg(null,t,r,!0,s,n)):(t.tag=0,Ue&&s&&Rh(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=$M(r),e=Kn(r,e),o){case 0:t=Zg(null,t,r,e,n);break e;case 1:t=sS(null,t,r,e,n);break e;case 11:t=rS(null,t,r,e,n);break e;case 14:t=oS(null,t,r,Kn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Zg(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),sS(e,t,r,o,n);case 3:e:{if(Gb(t),e===null)throw Error(D(387));r=t.pendingProps,s=t.memoizedState,o=s.element,wb(e,t),Md(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=ta(Error(D(423)),t),t=iS(e,t,r,n,o);break e}else if(r!==o){o=ta(Error(D(424)),t),t=iS(e,t,r,n,o);break e}else for(hn=Ho(t.stateNode.containerInfo.firstChild),yn=t,Ue=!0,qn=null,n=vb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zi(),r===o){t=Qr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return Sb(t),e===null&&Gg(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Vg(r,o)?i=null:s!==null&&Vg(r,s)&&(t.flags|=32),Kb(e,t),Bt(e,t,i,n),t.child;case 6:return e===null&&Gg(t),null;case 13:return qb(e,t,n);case 4:return _h(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ji(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),rS(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,De(Id,r._currentValue),r._currentValue=i,s!==null)if(Qn(s.value,i)){if(s.children===o.children&&!an.current){t=Qr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gr(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),qg(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(D(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),qg(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,qi(t,n),o=_n(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),oS(e,t,r,o,n);case 15:return jb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),pd(e,t),t.tag=1,ln(r)?(e=!0,Rd(t)):e=!1,qi(t,n),Ub(t,r,o),Xg(t,r,o,n),Jg(null,t,r,!0,e,n);case 19:return Yb(e,t,n);case 22:return Wb(e,t,n)}throw Error(D(156,t.tag))};function dE(e,t){return zS(e,t)}function VM(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.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nn(e,t,n,r){return new VM(e,t,n,r)}function Xh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $M(e){if(typeof e=="function")return Xh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gh)return 11;if(e===hh)return 14}return 2}function $o(e,t){var n=e.alternate;return n===null?(n=Nn(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.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,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 hd(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Xh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ni:return Rs(n.children,o,s,t);case mh:i=8,o|=8;break;case wg:return e=Nn(12,n,t,o|2),e.elementType=wg,e.lanes=s,e;case Sg:return e=Nn(13,n,t,o),e.elementType=Sg,e.lanes=s,e;case bg:return e=Nn(19,n,t,o),e.elementType=bg,e.lanes=s,e;case SS:return Qd(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xS:i=10;break e;case wS:i=9;break e;case gh:i=11;break e;case hh:i=14;break e;case Io:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Nn(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Rs(e,t,n,r){return e=Nn(7,e,r,t),e.lanes=n,e}function Qd(e,t,n,r){return e=Nn(22,e,r,t),e.elementType=SS,e.lanes=n,e.stateNode={isHidden:!1},e}function yg(e,t,n){return e=Nn(6,e,null,t),e.lanes=n,e}function vg(e,t,n){return t=Nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jM(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tg(0),this.expirationTimes=tg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tg(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Qh(e,t,n,r,o,s,i,a,l){return e=new jM(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Nn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oh(s),e}function WM(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Mi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function fE(e){if(!e)return Wo;e=e._reactInternals;e:{if(Os(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(ln(n))return fb(e,n,t)}return t}function pE(e,t,n,r,o,s,i,a,l){return e=Qh(n,r,!0,e,o,s,i,a,l),e.context=fE(null),n=e.current,r=Ut(),o=Vo(n),s=Gr(r,o),s.callback=t!=null?t:null,Bo(n,s,o),e.current.lanes=o,Hl(e,o,r),cn(e,r),e}function Zd(e,t,n,r){var o=t.current,s=Ut(),i=Vo(o);return n=fE(n),t.context===null?t.context=n:t.pendingContext=n,t=Gr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Bo(o,t,i),e!==null&&(Xn(e,o,i,s),ud(e,o,i)),i}function Bd(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 hS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zh(e,t){hS(e,t),(e=e.alternate)&&hS(e,t)}function KM(){return null}var mE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Jh(e){this._internalRoot=e}Jd.prototype.render=Jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Zd(e,t,null,null)};Jd.prototype.unmount=Jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ms(function(){Zd(null,e,null,null)}),t[Yr]=null}};function Jd(e){this._internalRoot=e}Jd.prototype.unstable_scheduleHydration=function(e){if(e){var t=WS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mo.length&&t!==0&&t<Mo[n].priority;n++);Mo.splice(n,0,e),n===0&&GS(e)}};function ey(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ef(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yS(){}function GM(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var c=Bd(i);s.call(c)}}var i=pE(t,r,e,0,null,!1,!1,"",yS);return e._reactRootContainer=i,e[Yr]=i.current,Il(e.nodeType===8?e.parentNode:e),Ms(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=Bd(l);a.call(c)}}var l=Qh(e,0,!1,null,null,!1,!1,"",yS);return e._reactRootContainer=l,e[Yr]=l.current,Il(e.nodeType===8?e.parentNode:e),Ms(function(){Zd(t,l,n,r)}),l}function tf(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=Bd(i);a.call(l)}}Zd(t,i,e,o)}else i=GM(n,t,e,o,r);return Bd(i)}$S=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dl(t.pendingLanes);n!==0&&(xh(t,n|1),cn(t,Je()),(be&6)===0&&(na=Je()+500,qo()))}break;case 13:Ms(function(){var r=Xr(e,1);if(r!==null){var o=Ut();Xn(r,e,1,o)}}),Zh(e,1)}};wh=function(e){if(e.tag===13){var t=Xr(e,134217728);if(t!==null){var n=Ut();Xn(t,e,134217728,n)}Zh(e,134217728)}};jS=function(e){if(e.tag===13){var t=Vo(e),n=Xr(e,t);if(n!==null){var r=Ut();Xn(n,e,t,r)}Zh(e,t)}};WS=function(){return Ie};KS=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Mg=function(e,t,n){switch(t){case"input":if(Cg(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=Wd(r);if(!o)throw Error(D(90));ES(r),Cg(r,o)}}}break;case"textarea":CS(e,n);break;case"select":t=n.value,t!=null&&ji(e,!!n.multiple,t,!1)}};MS=Gh;NS=Ms;var qM={usingClientEntryPoint:!1,Events:[Ul,Fi,Wd,IS,LS,Gh]},al={findFiberByHostInstance:Es,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},YM={bundleType:al.bundleType,version:al.version,rendererPackageName:al.rendererPackageName,rendererConfig:al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Zr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=DS(e),e===null?null:e.stateNode},findFiberByHostInstance:al.findFiberByHostInstance||KM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ll=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ll.isDisabled&&ll.supportsFiber))try{Ud=ll.inject(YM),Cr=ll}catch(e){}var ll;wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qM;wn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ey(t))throw Error(D(200));return WM(e,t,null,n)};wn.createRoot=function(e,t){if(!ey(e))throw Error(D(299));var n=!1,r="",o=mE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Qh(e,1,!1,null,null,n,!1,r,o),e[Yr]=t.current,Il(e.nodeType===8?e.parentNode:e),new Jh(t)};wn.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(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=DS(t),e=e===null?null:e.stateNode,e};wn.flushSync=function(e){return Ms(e)};wn.hydrate=function(e,t,n){if(!ef(t))throw Error(D(200));return tf(null,e,t,!0,n)};wn.hydrateRoot=function(e,t,n){if(!ey(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=mE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=pE(t,null,e,1,n!=null?n:null,o,!1,s,i),e[Yr]=t.current,Il(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jd(t)};wn.render=function(e,t,n){if(!ef(t))throw Error(D(200));return tf(null,e,t,!1,n)};wn.unmountComponentAtNode=function(e){if(!ef(e))throw Error(D(40));return e._reactRootContainer?(Ms(function(){tf(null,null,e,!1,function(){e._reactRootContainer=null,e[Yr]=null})}),!0):!1};wn.unstable_batchedUpdates=Gh;wn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ef(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return tf(e,t,n,!1,r)};wn.version="18.3.1-next-f1338f8080-20240426"});var $l=nn((nz,yE)=>{"use strict";function hE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hE)}catch(e){console.error(e)}}hE(),yE.exports=gE()});var xE=nn(ty=>{"use strict";var vE=$l();ty.createRoot=vE.createRoot,ty.hydrateRoot=vE.hydrateRoot;var rz});var e1=nn(JE=>{"use strict";var Gl=Y();function WN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KN=typeof Object.is=="function"?Object.is:WN,GN=Gl.useSyncExternalStore,qN=Gl.useRef,YN=Gl.useEffect,XN=Gl.useMemo,QN=Gl.useDebugValue;JE.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=qN(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=XN(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&i.hasValue){var v=i.value;if(o(v,p))return d=v}return d=p}if(v=d,KN(u,p))return v;var g=r(p);return o!==void 0&&o(v,g)?(u=p,v):(u=p,d=g)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=GN(e,s[0],s[1]);return YN(function(){i.hasValue=!0,i.value=a},[a]),QN(a),a}});var n1=nn((jz,t1)=>{"use strict";t1.exports=e1()});var Yy=nn((bH,IT)=>{"use strict";var H_="Expected a function",PT=NaN,B_="[object Symbol]",U_=/^\s+|\s+$/g,V_=/^[-+]0x[0-9a-f]+$/i,$_=/^0b[01]+$/i,j_=/^0o[0-7]+$/i,W_=parseInt,K_=typeof global=="object"&&global&&global.Object===Object&&global,G_=typeof self=="object"&&self&&self.Object===Object&&self,q_=K_||G_||Function("return this")(),Y_=Object.prototype,X_=Y_.toString,Q_=Math.max,Z_=Math.min,Gy=function(){return q_.Date.now()};function J_(e,t,n){var r,o,s,i,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(H_);t=AT(t)||0,qy(n)&&(u=!!n.leading,d="maxWait"in n,s=d?Q_(AT(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(k){var C=r,A=o;return r=o=void 0,c=k,i=e.apply(A,C),i}function v(k){return c=k,a=setTimeout(y,t),u?p(k):i}function g(k){var C=k-l,A=k-c,V=t-C;return d?Z_(V,s-A):V}function x(k){var C=k-l,A=k-c;return l===void 0||C>=t||C<0||d&&A>=s}function y(){var k=Gy();if(x(k))return h(k);a=setTimeout(y,g(k))}function h(k){return a=void 0,f&&r?p(k):(r=o=void 0,i)}function m(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?i:h(Gy())}function E(){var k=Gy(),C=x(k);if(r=arguments,o=this,l=k,C){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),i}return E.cancel=m,E.flush=w,E}function qy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function e2(e){return!!e&&typeof e=="object"}function t2(e){return typeof e=="symbol"||e2(e)&&X_.call(e)==B_}function AT(e){if(typeof e=="number")return e;if(t2(e))return PT;if(qy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(U_,"");var n=$_.test(e);return n||j_.test(e)?W_(e.slice(2),n?2:8):V_.test(e)?PT:+e}IT.exports=J_});var dC=nn((w7,uC)=>{"use strict";var G2=/["'&<>]/;uC.exports=q2;function q2(e){var t=""+e,n=G2.exec(t);if(!n)return t;var r,o="",s=0,i=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}i!==s&&(o+=t.substring(i,s)),i=s+1,o+=r}return i!==s?o+t.substring(i,s):o}});var h5={};pt(h5,{Card:()=>Se,ContentEditableInput:()=>yi,DeepdeskAPI:()=>Eo,DeepdeskSDK:()=>hu,HTTPClient:()=>xi,InputMediator:()=>bo,InputType:()=>Ai,KeyboardHint:()=>Mu,Label:()=>Fx,Locale:()=>ql,Section:()=>wr,SectionList:()=>Ri,Sources:()=>Ro,Suggestion:()=>ge,SuggestionList:()=>Ht,TextAreaInput:()=>vi,ToggleButton:()=>xs,attachFile:()=>$A,authenticateWithKey:()=>jA,createFullRange:()=>Va,createOverlayContainer:()=>mu,createRangeFromOffsets:()=>fs,escapeHTML:()=>ha,formatTextMarkup:()=>WA,getRangeOffsets:()=>fu,getRangeText:()=>pu,insertCKEditor:()=>YA,isHTML:()=>Ac,isSupportedInputElement:()=>xm,updateContentEditable:()=>GA,updateTextArea:()=>KA,useClickOutsideRoot:()=>ss,useStyles:()=>_,waitForElementVisibilityChange:()=>bm});var Hm=b(Oe()),An=b(Y());var Ru=b(Y()),Rx=b(Oe());var Qa=Ru.default.createContext({});function _(e,t){let s=(0,Ru.useContext)(Qa),{debug:n}=s,o=oe(s,["debug"])[e];return Object.entries(t).reduce((i,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},i),{[a]:(0,Rx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var Px={root:"dd-4s9wq"};var ys=b(R()),Au=()=>(0,ys.jsxs)("svg",{className:Px.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,ys.jsx)("defs",{children:(0,ys.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,ys.jsx)("title",{children:"Failed loading image"}),(0,ys.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 zm={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var vs=b(R()),Iu=(0,An.createContext)(zm),LI=({title:e,src:t})=>{let n=(0,An.useContext)(Iu),[r,o]=(0,An.useState)(!1);return(0,An.useEffect)(()=>{o(!1)},[t]),(0,vs.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,vs.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,vs.jsx)(Au,{})})},MI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,An.useContext)(Iu);return(0,vs.jsx)("div",{className:(0,Hm.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},NI=s=>{var i=s,{as:e="h1",cropText:t=!1,className:n,children:r}=i,o=oe(i,["as","cropText","className","children"]);let a=(0,An.useContext)(Iu);return An.default.createElement(e,S({className:(0,Hm.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Lu=({children:e})=>{let t=_("Card",zm);return(0,vs.jsx)("div",{className:t.root,children:(0,vs.jsx)(Iu.Provider,{value:t,children:e})})};Lu.Image=LI;Lu.Content=MI;Lu.Title=NI;var Se=Lu;var Nx=b(Oe());var Mx={root:"dd-llBx9"};var Ox=b(R());var OI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},_I=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let s=_("KeyboardHint",Mx);return(0,Ox.jsx)("span",S({"data-key":OI[t],className:(0,Nx.default)(e,s.root)},n))},Mu=_I;var Dx=b(Oe());var _x={root:"dd-e6HXZ"};var zx=b(R()),DI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let s=_("Label",_x);return(0,zx.jsx)("span",P(S({},n),{className:(0,Dx.default)(e,s.root),children:t}))},Fx=DI;var Hx={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var ki=b(R()),FI=o=>{var s=o,{title:e,children:t,type:n}=s,r=oe(s,["title","children","type"]);let i=_("Section",Hx);return(0,ki.jsxs)("section",P(S({},r),{className:i.root,"data-section-type":n,children:[e&&(0,ki.jsx)("div",{className:i.subTitleContainer,children:(0,ki.jsx)("span",{className:i.subtitle,children:e})}),(0,ki.jsx)("div",{className:i.suggestions,children:t})]}))},wr=FI;var jx=b(Oe()),Wx=b(Y());var To=b(Y()),Vx=b(R()),Bx=(0,To.createContext)(null),Ux=({scrollContainerRef:e,children:t})=>{let n=(0,To.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:s}=o.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();o.scrollTo({top:i-s})},[]);return(0,Vx.jsx)(Bx.Provider,{value:n,children:t})},Nu=e=>{let t=(0,To.useContext)(Bx);(0,To.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var $x={root:"dd-uoTXh"};var Bm=b(R()),zI=({className:e,children:t})=>{let n=_("SectionList",$x),r=(0,Wx.useRef)(null);return(0,Bm.jsx)(Ux,{scrollContainerRef:r,children:(0,Bm.jsx)("div",{ref:r,className:(0,jx.default)(n.root,e),children:t})})},Ri=zI;var Pi=b(Oe()),rn=b(Y());var Um={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var zt=b(R()),Co=(0,rn.createContext)(Um),HI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let s=(0,rn.useContext)(Co);return(0,zt.jsx)("div",P(S({},n),{className:(0,Pi.default)(s.actions,{[s.actionsIsFixed]:e}),children:t}))};function BI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:s}=l,i=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,rn.useContext)(Co);return(0,zt.jsxs)(e||"button",P(S({type:"button",className:(0,Pi.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:s},t),title:r,"aria-label":r},i),{children:[n&&(0,zt.jsx)("span",{className:c.icon,children:n}),o]}))}var UI=({children:e})=>{let t=(0,rn.useContext)(Co);return(0,zt.jsx)("div",{className:t.buttonsContainer,children:e})},VI=({className:e,primary:t,disabled:n,label:r,children:o})=>{let s=(0,rn.useContext)(Co);return(0,zt.jsxs)("div",{className:(0,Pi.default)(e,s.actionButton,s.dropdownButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onMouseDown:i=>i.stopPropagation(),onClick:i=>i.stopPropagation(),children:[r,(0,zt.jsx)("ul",{className:s.dropdownList,children:o})]})},$I=({index:e,label:t,onClick:n})=>{let r=(0,rn.useContext)(Co);return(0,zt.jsx)("li",{className:r.dropdownItem,children:(0,zt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},jI=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let s=(0,rn.useContext)(Co);return(0,zt.jsx)("button",{type:"button",className:(0,Pi.default)(e,s.actionButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onClick:r!=null?r:i=>i.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},WI=({labels:e})=>{let t=(0,rn.useContext)(Co);return(0,zt.jsx)("div",{className:t.labels,children:e.map(n=>(0,zt.jsx)("span",{className:t.label,children:n},n))})},ko=rn.default.forwardRef((a,i)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,s=oe(l,["className","selected","onClick","children","as"]);let c=_("Suggestion",Um),u=(0,rn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,zt.jsx)(o,P(S({},s),{ref:i,className:(0,Pi.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,zt.jsx)(Co.Provider,{value:c,children:r})}))});ko.Labels=WI;ko.Actions=HI;ko.ActionButton=jI;ko.DropdownButton=VI;ko.DropdownItem=$I;ko.ButtonsContainer=UI;ko.Button=BI;var ge=ko;var Gx=b(Oe());var Kx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var qx=b(R()),KI=({withDivider:e,children:t})=>{let n=_("SuggestionList",Kx);return(0,qx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Gx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Ht=KI;var Xx=b(Oe());var Yx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Ou=b(R()),GI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=_("ToggleButton",Yx);return(0,Ou.jsx)("button",{type:"button",className:(0,Xx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ou.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ou.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},xs=GI;var Qx=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,_u=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Zx=/x-deepdesk-(([a-z0-9\-_])+-version)/,Du=["cues","custom-data","custom-data-banner","knowledge-assist"],Jx=Intl.DateTimeFormat().resolvedOptions().timeZone,Ro=(g=>(g.SEARCH="search",g.TEMPLATE="template",g.ELASTIC_SEARCH="search-autocomplete",g.GPT="gpt",g.TRIE="trie",g.TRIE_WITH_TYPOS="trie-with-typos",g.SEMANTIC="semantic",g.TEXT_RECOMMENDATION="text_recommendation",g.URL_RECOMMENDATION="url_recommendation",g.LINK_RECOMMENDATION="link_recommendation",g.PERSONAL_COLLECTION="personal-collection",g.PERSONAL_COLLECTION_SEARCH="personal-collection-search",g.SEARCH_OVERLAY="search-overlay",g.SEARCH_PREVIEW="search-preview",g.SEARCH_URL="search-url",g))(Ro||{}),Ai=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i.SPACE="space",i))(Ai||{});var ms=b(xE());var FR=b(Y());function Tt(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 XM=typeof Symbol=="function"&&Symbol.observable||"@@observable",wE=XM,ny=()=>Math.random().toString(36).substring(7).split("").join("."),QM={INIT:`@@redux/INIT${ny()}`,REPLACE:`@@redux/REPLACE${ny()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ny()}`},nf=QM;function rf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ry(e,t,n){if(typeof e!="function")throw new Error(Tt(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Tt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Tt(1));return n(ry)(e,t)}let r=e,o=t,s=new Map,i=s,a=0,l=!1;function c(){i===s&&(i=new Map,s.forEach((x,y)=>{i.set(y,x)}))}function u(){if(l)throw new Error(Tt(3));return o}function d(x){if(typeof x!="function")throw new Error(Tt(4));if(l)throw new Error(Tt(5));let y=!0;c();let h=a++;return i.set(h,x),function(){if(y){if(l)throw new Error(Tt(6));y=!1,c(),i.delete(h),s=null}}}function f(x){if(!rf(x))throw new Error(Tt(7));if(typeof x.type=="undefined")throw new Error(Tt(8));if(typeof x.type!="string")throw new Error(Tt(17));if(l)throw new Error(Tt(9));try{l=!0,o=r(o,x)}finally{l=!1}return(s=i).forEach(h=>{h()}),x}function p(x){if(typeof x!="function")throw new Error(Tt(10));r=x,f({type:nf.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Tt(11));function h(){let w=y;w.next&&w.next(u())}return h(),{unsubscribe:x(h)}},[wE](){return this}}}return f({type:nf.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[wE]:v}}function ZM(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:nf.INIT})=="undefined")throw new Error(Tt(12));if(typeof n(void 0,{type:nf.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Tt(13))})}function of(e){let t=Object.keys(e),n={};for(let i=0;i<t.length;i++){let a=t[i];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,s;try{ZM(n)}catch(i){s=i}return function(a={},l){if(s)throw s;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],g=p(v,l);if(typeof g=="undefined"){let x=l&&l.type;throw new Error(Tt(14))}u[f]=g,c=c||g!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function sa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function SE(...e){return t=>(n,r)=>{let o=t(n,r),s=()=>{throw new Error(Tt(15))},i={getState:o.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(i));return s=sa(...a)(o.dispatch),P(S({},o),{dispatch:s})}}function bE(e){return rf(e)&&"type"in e&&typeof e.type=="string"}var PE=Symbol.for("immer-nothing"),EE=Symbol.for("immer-draftable"),Sn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ia=Object.getPrototypeOf;function Yo(e){return!!e&&!!e[Sn]}function Jn(e){var t;return e?AE(e)||Array.isArray(e)||!!e[EE]||!!((t=e.constructor)!=null&&t[EE])||uf(e)||df(e):!1}var JM=Object.prototype.constructor.toString();function AE(e){if(!e||typeof e!="object")return!1;let t=ia(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===JM}function sf(e,t){cf(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cf(e){let t=e[Sn];return t?t.type_:Array.isArray(e)?1:uf(e)?2:df(e)?3:0}function iy(e,t){return cf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function IE(e,t,n){let r=cf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function eN(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function uf(e){return e instanceof Map}function df(e){return e instanceof Set}function _s(e){return e.copy_||e.base_}function ay(e,t){if(uf(e))return new Map(e);if(df(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=AE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[Sn];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){let i=o[s],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}return Object.create(ia(e),r)}else{let r=ia(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function fy(e,t=!1){return ff(e)||Yo(e)||!Jn(e)||(cf(e)>1&&(e.set=e.add=e.clear=e.delete=tN),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>fy(r,!0))),e}function tN(){Zn(2)}function ff(e){return Object.isFrozen(e)}var nN={};function Ds(e){let t=nN[e];return t||Zn(0,e),t}var jl;function LE(){return jl}function rN(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function TE(e,t){t&&(Ds("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ly(e){cy(e),e.drafts_.forEach(oN),e.drafts_=null}function cy(e){e===jl&&(jl=e.parent_)}function CE(e){return jl=rN(jl,e)}function oN(e){let t=e[Sn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Sn].modified_&&(ly(t),Zn(4)),Jn(e)&&(e=af(t,e),t.parent_||lf(t,e)),t.patches_&&Ds("Patches").generateReplacementPatches_(n[Sn].base_,e,t.patches_,t.inversePatches_)):e=af(t,n,[]),ly(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==PE?e:void 0}function af(e,t,n){if(ff(t))return t;let r=t[Sn];if(!r)return sf(t,(o,s)=>RE(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return lf(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),sf(s,(a,l)=>RE(e,r,o,a,l,n,i)),lf(e,o,!1),n&&e.patches_&&Ds("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function RE(e,t,n,r,o,s,i){if(Yo(o)){let a=s&&t&&t.type_!==3&&!iy(t.assigned_,r)?s.concat(r):void 0,l=af(e,o,a);if(IE(n,r,l),Yo(l))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Jn(o)&&!ff(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;af(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&lf(e,o)}}function lf(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&fy(t,n)}function sN(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:LE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,s=py;n&&(o=[r],s=Wl);let{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var py={get(e,t){if(t===Sn)return e;let n=_s(e);if(!iy(n,t))return iN(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===oy(e.base_,t)?(sy(e),e.copy_[t]=dy(r,e)):r},has(e,t){return t in _s(e)},ownKeys(e){return Reflect.ownKeys(_s(e))},set(e,t,n){let r=ME(_s(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=oy(_s(e),t),s=o==null?void 0:o[Sn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(eN(n,o)&&(n!==void 0||iy(e.base_,t)))return!0;sy(e),uy(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oy(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sy(e),uy(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=_s(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ia(e.base_)},setPrototypeOf(){Zn(12)}},Wl={};sf(py,(e,t)=>{Wl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wl.deleteProperty=function(e,t){return Wl.set.call(this,e,t,void 0)};Wl.set=function(e,t,n){return py.set.call(this,e[0],t,n,e[0])};function oy(e,t){let n=e[Sn];return(n?_s(n):e)[t]}function iN(e,t,n){var o;let r=ME(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ME(e,t){if(!(t in e))return;let n=ia(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ia(n)}}function uy(e){e.modified_||(e.modified_=!0,e.parent_&&uy(e.parent_))}function sy(e){e.copy_||(e.copy_=ay(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aN=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let s=n;n=t;let i=this;return function(l=s,...c){return i.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let s=CE(this),i=dy(t,void 0),a=!0;try{o=n(i),a=!1}finally{a?ly(s):cy(s)}return TE(s,r),kE(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===PE&&(o=void 0),this.autoFreeze_&&fy(o,!0),r){let s=[],i=[];Ds("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,l=>t(l,...a));let r,o;return[this.produce(t,n,(i,a)=>{r=i,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),Yo(e)&&(e=lN(e));let t=CE(this),n=dy(e,void 0);return n[Sn].isManual_=!0,cy(t),n}finishDraft(e,t){let n=e&&e[Sn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return TE(r,t),kE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=Ds("Patches").applyPatches_;return Yo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function dy(e,t){let n=uf(e)?Ds("MapSet").proxyMap_(e,t):df(e)?Ds("MapSet").proxySet_(e,t):sN(e,t);return(t?t.scope_:LE()).drafts_.push(n),n}function lN(e){return Yo(e)||Zn(10,e),NE(e)}function NE(e){if(!Jn(e)||ff(e))return e;let t=e[Sn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ay(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ay(e,!0);return sf(n,(r,o)=>{IE(n,r,NE(o))}),t&&(t.finalized_=!1),n}var bn=new aN,pf=bn.produce,az=bn.produceWithPatches.bind(bn),lz=bn.setAutoFreeze.bind(bn),cz=bn.setUseStrictShallowCopy.bind(bn),uz=bn.applyPatches.bind(bn),dz=bn.createDraft.bind(bn),fz=bn.finishDraft.bind(bn);function cN(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function uN(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function dN(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var OE=e=>Array.isArray(e)?e:[e];function fN(e){let t=Array.isArray(e[0])?e[0]:e;return dN(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pN(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var hz=Symbol();var yz=Object.getPrototypeOf({});var mN=class{constructor(e){this.value=e}deref(){return this.value}},gN=typeof WeakRef!="undefined"?WeakRef:mN,hN=0,_E=1;function mf(){return{s:hN,v:void 0,o:null,p:null}}function my(e,t={}){let n=mf(),{resultEqualityCheck:r}=t,o,s=0;function i(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(g);y===void 0?(a=mf(),x.set(g,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(g);y===void 0?(a=mf(),x.set(g,a)):a=y}}let c=a,u;if(a.s===_E)u=a.v;else if(u=e.apply(null,arguments),s++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new gN(u):u}return c.s=_E,c.v=u,u}return i.clearCache=()=>{n=mf(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function DE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),cN(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=my,argsMemoizeOptions:v=[],devModeChecks:g={}}=u,x=OE(f),y=OE(v),h=fN(o),m=d(function(){return s++,c.apply(null,arguments)},...x),w=!0,E=p(function(){i++;let C=pN(h,arguments);return a=m.apply(null,C),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:m,dependencies:h,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var $t=DE(my),yN=Object.assign((e,t=$t)=>{uN(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>yN});function FE(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var zE=FE(),HE=FE;var vN=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?sa:sa.apply(null,arguments)},kz=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},xN=e=>e&&typeof e.match=="function";function at(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Jr(0));return S(S({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>bE(r)&&r.type===e,n}var WE=class Kl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Kl.prototype)}static get[Symbol.species](){return Kl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Kl(...t[0].concat(this)):new Kl(...t.concat(this))}};function BE(e){return Jn(e)?pf(e,()=>{}):e}function UE(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function wN(e){return typeof e=="boolean"}var SN=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t!=null?t:{},i=new WE;return n&&(wN(n)?i.push(zE):i.push(HE(n.extraArgument))),i},bN="RTK_autoBatch";var VE=e=>t=>{setTimeout(t,e)},EN=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,s=!1,i=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:VE(10):e.type==="callback"?e.queueNotification:VE(e.timeout),c=()=>{i=!1,s&&(s=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[bN]),s=!o,s&&(i||(i=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},TN=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new WE(e);return r&&o.push(EN(typeof r=="object"?r:void 0)),o};function KE(e){let t=SN(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{},a;if(typeof n=="function")a=n;else if(rf(n))a=of(n);else throw new Error(Jr(1));let l;typeof r=="function"?l=r(t):l=t();let c=sa;o&&(c=vN(S({trace:!1},typeof o=="object"&&o)));let u=SE(...l),d=TN(u),f=typeof i=="function"?i(d):d(),p=c(...f);return ry(a,s,p)}function GE(e){let t={},n=[],r,o={addCase(s,i){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(Jr(28));if(a in t)throw new Error(Jr(29));return t[a]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function CN(e){return typeof e=="function"}function kN(e,t){let[n,r,o]=GE(t),s;if(CN(e))s=()=>BE(e());else{let a=BE(e);s=()=>a}function i(a=s(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(Yo(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return pf(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return i.getInitialState=s,i}var RN=(e,t)=>xN(e)?e.match(t):e(t);function PN(...e){return t=>e.some(n=>RN(n,t))}var AN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",IN=(e=21)=>{let t="",n=e;for(;n--;)t+=AN[Math.random()*64|0];return t},LN=["name","message","stack","code"],gy=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},$E=class{constructor(e,t){Te(this,"_type");this.payload=e,this.meta=t}},MN=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of LN)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},jE="External signal was aborted",he=(()=>{function e(t,n,r){let o=at(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),s=at(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),i=at(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||MN)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):IN(),v=new AbortController,g,x;function y(m){x=m,v.abort()}c&&(c.aborted?y(jE):c.addEventListener("abort",()=>y(jE),{once:!0}));let h=function(){return I(this,null,function*(){var E,k;let m;try{let C=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(ON(C)&&(C=yield C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((V,O)=>{g=()=>{O({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",g)});u(s(p,l,(k=r==null?void 0:r.getPendingMeta)==null?void 0:k.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),m=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(V,O)=>new gy(V,O),fulfillWithValue:(V,O)=>new $E(V,O)})).then(V=>{if(V instanceof gy)throw V;return V instanceof $E?o(V.payload,p,l,V.meta):o(V,p,l)})])}catch(C){m=C instanceof gy?i(null,p,l,C.payload,C.meta):i(C,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&i.match(m)&&m.meta.condition||u(m),m})}();return Object.assign(h,{abort:y,requestId:p,arg:l,unwrap(){return h.then(NN)}})}}return Object.assign(a,{pending:s,rejected:i,fulfilled:o,settled:PN(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function NN(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ON(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var qE=Symbol.for("rtk-slice-createasyncthunk"),Lz={[qE]:he};function _N(e,t){return`${e}/${t}`}function DN({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[qE];return function(o){let{name:s,reducerPath:i=s}=o;if(!s)throw new Error(Jr(11));let a=(typeof o.reducers=="function"?o.reducers(zN()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(m,w){let E=typeof m=="string"?m:m.type;if(!E)throw new Error(Jr(12));if(E in c.sliceCaseReducersByType)throw new Error(Jr(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(m,w){return c.sliceMatchers.push({matcher:m,reducer:w}),u},exposeAction(m,w){return c.actionCreators[m]=w,u},exposeCaseReducer(m,w){return c.sliceCaseReducersByName[m]=w,u}};l.forEach(m=>{let w=a[m],E={reducerName:m,type:_N(s,m),createNotation:typeof o.reducers=="function"};BN(w)?VN(E,w,u,t):HN(E,w,u)});function d(){let[m={},w=[],E=void 0]=typeof o.extraReducers=="function"?GE(o.extraReducers):[o.extraReducers],k=S(S({},m),c.sliceCaseReducersByType);return kN(o.initialState,C=>{for(let A in k)C.addCase(A,k[A]);for(let A of c.sliceMatchers)C.addMatcher(A.matcher,A.reducer);for(let A of w)C.addMatcher(A.matcher,A.reducer);E&&C.addDefaultCase(E)})}let f=m=>m,p=new Map,v;function g(m,w){return v||(v=d()),v(m,w)}function x(){return v||(v=d()),v.getInitialState()}function y(m,w=!1){function E(C){let A=C[m];return typeof A=="undefined"&&w&&(A=x()),A}function k(C=f){let A=UE(p,w,()=>new WeakMap);return UE(A,C,()=>{var O;let V={};for(let[L,J]of Object.entries((O=o.selectors)!=null?O:{}))V[L]=FN(J,C,x,w);return V})}return{reducerPath:m,getSelectors:k,get selectors(){return k(E)},selectSlice:E}}let h=P(S({name:s,reducer:g,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(i)),{injectInto(m,k={}){var C=k,{reducerPath:w}=C,E=oe(C,["reducerPath"]);let A=w!=null?w:i;return m.inject({reducerPath:A,reducer:g},E),S(S({},h),y(A,!0))}});return h}}function FN(e,t,n,r){function o(s,...i){let a=t(s);return typeof a=="undefined"&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var ke=DN();function zN(){function e(t,n){return S({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function HN({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!UN(r))throw new Error(Jr(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?at(e,i):at(e))}function BN(e){return e._reducerDefinitionType==="asyncThunk"}function UN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function VN({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Jr(18));let{payloadCreator:s,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,s,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||gf,pending:a||gf,rejected:l||gf,settled:c||gf})}function gf(){}var YE="listener",XE="completed",QE="cancelled",Mz=`task-${QE}`,Nz=`task-${XE}`,Oz=`${YE}-${QE}`,_z=`${YE}-${XE}`;var{assign:ZE}=Object;var hy="listenerMiddleware";var $N=ZE(at(`${hy}/add`),{withTypes:()=>$N}),Dz=at(`${hy}/removeAll`),jN=ZE(at(`${hy}/remove`),{withTypes:()=>jN});var Fz=Symbol.for("rtk-state-proxy-original");function Jr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ce=b(Y(),1),y1=b(n1(),1);var ZN=ce.version.startsWith("19"),JN=Symbol.for(ZN?"react.transitional.element":"react.element"),eO=Symbol.for("react.portal"),tO=Symbol.for("react.fragment"),nO=Symbol.for("react.strict_mode"),rO=Symbol.for("react.profiler"),oO=Symbol.for("react.consumer"),sO=Symbol.for("react.context"),c1=Symbol.for("react.forward_ref"),iO=Symbol.for("react.suspense"),aO=Symbol.for("react.suspense_list"),by=Symbol.for("react.memo"),lO=Symbol.for("react.lazy");var cO=c1,uO=by;function dO(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case JN:switch(e=e.type,e){case tO:case rO:case nO:case iO:case aO:return e;default:switch(e=e&&e.$$typeof,e){case sO:case c1:case lO:case by:return e;case oO:return e;default:return t}}case eO:return t}}}function fO(e){return dO(e)===by}function pO(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let a=!1,l,c,u,d,f;function p(h,m){return l=h,c=m,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let h=e(l,c),m=!i(h,u);return u=h,m&&(f=n(u,d,c)),f}function y(h,m){let w=!s(m,c),E=!o(h,l,m,c);return l=h,c=m,w&&E?v():w?g():E?x():f}return function(m,w){return a?y(m,w):p(m,w)}}function mO(e,s){var i=s,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=i,o=oe(i,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return pO(a,l,c,e,o)}function gO(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function wy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function r1(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function u1(e,t){return function(r,{displayName:o}){let s=function(a,l){return s.dependsOnOwnProps?s.mapToProps(a,l):s.mapToProps(a,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(a,l){s.mapToProps=e,s.dependsOnOwnProps=r1(e);let c=s(a,l);return typeof c=="function"&&(s.mapToProps=c,s.dependsOnOwnProps=r1(c),c=s(a,l)),c},s}}function Ey(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function hO(e){return e&&typeof e=="object"?wy(t=>gO(e,t)):e?typeof e=="function"?u1(e,"mapDispatchToProps"):Ey(e,"mapDispatchToProps"):wy(t=>({dispatch:t}))}function yO(e){return e?typeof e=="function"?u1(e,"mapStateToProps"):Ey(e,"mapStateToProps"):wy(()=>({}))}function vO(e,t,n){return S(S(S({},n),e),t)}function xO(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(l,c,u){let d=e(l,c,u);return s?o(d,i)||(i=d):(s=!0,i=d),i}}}function wO(e){return e?typeof e=="function"?xO(e):Ey(e,"mergeProps"):()=>vO}function SO(e){e()}function bO(){let e=null,t=null;return{clear(){e=null,t=null},notify(){SO(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var o1={notify(){},get:()=>[]};function d1(e,t){let n,r=o1,o=0,s=!1;function i(g){u();let x=r.subscribe(g),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return s}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=bO())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=o1)}function f(){s||(s=!0,u())}function p(){s&&(s=!1,d())}let v={addNestedSub:i,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var EO=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",TO=EO(),CO=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",kO=CO(),RO=()=>TO||kO?ce.useLayoutEffect:ce.useEffect,hf=RO();function s1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function yy(e,t){if(s1(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])||!s1(e[n[o]],t[n[o]]))return!1;return!0}var PO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},AO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},IO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},f1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},LO={[cO]:IO,[uO]:f1};function i1(e){return fO(e)?f1:LO[e.$$typeof]||PO}var MO=Object.defineProperty,NO=Object.getOwnPropertyNames,a1=Object.getOwnPropertySymbols,OO=Object.getOwnPropertyDescriptor,_O=Object.getPrototypeOf,l1=Object.prototype;function Sy(e,t){if(typeof t!="string"){if(l1){let s=_O(t);s&&s!==l1&&Sy(e,s)}let n=NO(t);a1&&(n=n.concat(a1(t)));let r=i1(e),o=i1(t);for(let s=0;s<n.length;++s){let i=n[s];if(!AO[i]&&!(o&&o[i])&&!(r&&r[i])){let a=OO(t,i);try{MO(e,i,a)}catch(l){}}}}return e}var vy=Symbol.for("react-redux-context"),xy=typeof globalThis!="undefined"?globalThis:{};function DO(){var n;if(!ce.createContext)return{};let e=(n=xy[vy])!=null?n:xy[vy]=new Map,t=e.get(ce.createContext);return t||(t=ce.createContext(null),e.set(ce.createContext,t)),t}var eo=DO(),FO=[null,null];function zO(e,t,n){hf(()=>e(...t),n)}function HO(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function BO(e,t,n,r,o,s,i,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let g=t.getState(),x,y;try{x=r(g,o.current)}catch(h){y=h,f=h}y||(f=null),x===s.current?i.current||c():(s.current=x,l.current=x,i.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function UO(e,t){return e===t}function VO(e,t,n,{pure:r,areStatesEqual:o=UO,areOwnPropsEqual:s=yy,areStatePropsEqual:i=yy,areMergedPropsEqual:a=yy,forwardRef:l=!1,context:c=eo}={}){let u=c,d=yO(e),f=hO(t),p=wO(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",h=`Connect(${y})`,m={shouldHandleStateChanges:v,displayName:h,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:a};function w(C){let[A,V,O]=ce.useMemo(()=>{let pe=C,{reactReduxForwardedRef:Q}=pe,le=oe(pe,["reactReduxForwardedRef"]);return[C.context,Q,le]},[C]),L=ce.useMemo(()=>{let Q=u;return A!=null&&A.Consumer,Q},[A,u]),J=ce.useContext(L),X=!!C.store&&!!C.store.getState&&!!C.store.dispatch,N=!!J&&!!J.store,F=X?C.store:J.store,se=N?J.getServerState:F.getState,G=ce.useMemo(()=>mO(F.dispatch,m),[F]),[U,B]=ce.useMemo(()=>{if(!v)return FO;let Q=d1(F,X?void 0:J.subscription),le=Q.notifyNestedSubs.bind(Q);return[Q,le]},[F,X,J]),K=ce.useMemo(()=>X?J:P(S({},J),{subscription:U}),[X,J,U]),$=ce.useRef(void 0),W=ce.useRef(O),z=ce.useRef(void 0),fe=ce.useRef(!1),de=ce.useRef(!1),Ee=ce.useRef(void 0);hf(()=>(de.current=!0,()=>{de.current=!1}),[]);let me=ce.useMemo(()=>()=>z.current&&O===W.current?z.current:G(F.getState(),O),[F,O]),re=ce.useMemo(()=>le=>U?BO(v,F,U,G,W,$,fe,de,z,B,le):()=>{},[U]);zO(HO,[W,$,fe,O,z,B]);let Ce;try{Ce=ce.useSyncExternalStore(re,me,se?()=>G(se(),O):me)}catch(Q){throw Ee.current&&(Q.message+=`
9
9
  The error may be correlated with this previous error:
10
- ${be.current.stack}
10
+ ${Ee.current.stack}
11
11
 
12
- `),Q}mf(()=>{be.current=void 0,z.current=void 0,$.current=Ce});let rt=le.useMemo(()=>le.createElement(x,P(S({},Ce),{ref:V})),[V,x,Ce]);return le.useMemo(()=>v?le.createElement(L.Provider,{value:K},rt):rt,[L,rt,K])}let k=le.memo(w);if(k.WrappedComponent=x,k.displayName=w.displayName=g,l){let A=le.forwardRef(function(N,L){return le.createElement(k,P(S({},N),{reactReduxForwardedRef:L}))});return A.displayName=g,A.WrappedComponent=x,xy(A,x)}return xy(k,x)}}var d1=FN;function zN(e){let{children:t,context:n,serverState:r,store:o}=e,s=le.useMemo(()=>{let l=c1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),i=le.useMemo(()=>o.getState(),[o]);return mf(()=>{let{subscription:l}=s;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[s,i]),le.createElement((n||eo).Provider,{value:s},t)}var f1=zN;function by(e=eo){return function(){return le.useContext(e)}}var p1=by();function m1(e=eo){let t=e===eo?p1:by(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var HN=m1();function BN(e=eo){let t=e===eo?HN:m1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ve=BN(),UN=(e,t)=>e===t;function VN(e=eo){let t=e===eo?p1:by(e),n=(r,o={})=>{let{equalityFn:s=UN}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:a,subscription:l,getServerState:c}=i,u=le.useRef(!0),d=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=(0,g1.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,d,s);return le.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var j=VN();var ql=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ql||{});var $N={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!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,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},h1=ke({name:"settings",initialState:$N,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:gf}=h1.actions,Yl=e=>t=>t.settings[e],te=e=>j(Yl(e)),y1=h1.reducer;var jN={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},jt=e=>e.auth.isLoggedIn,v1=e=>e.auth.loginFetchState,x1=e=>e.auth.verifyFetchState,w1=e=>e.auth.showLoginOverlay,to=ge("auth/validate",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),S1=ge("auth/requestLogin",(n,r)=>I(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),Xl=ge("auth/verifyLoginToken",(n,r)=>I(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),b1=ke({name:"auth",initialState:jN,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(to.pending,t=>{t.loginFetchState="loading"}),e.addCase(to.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(to.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Xl.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Xl.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Xl.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:aa,setShowLoginOverlay:E1}=b1.actions,T1=b1.reducer;function no(){}no.prototype={diff:function(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(w){return s?(setTimeout(function(){s(void 0,w)},0),!0):w}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,u=1,d=l+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var f=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,v=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=c&&m+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function g(){for(var w=Math.max(x,-u);w<=Math.min(y,u);w+=2){var E=void 0,k=v[w-1],C=v[w+1];k&&(v[w-1]=void 0);var A=!1;if(C){var V=C.oldPos-w;A=C&&0<=V&&V<l}var N=k&&k.oldPos+1<c;if(!A&&!N){v[w]=void 0;continue}if(!N||A&&k.oldPos+1<C.oldPos?E=i.addToPath(C,!0,void 0,0):E=i.addToPath(k,void 0,!0,1),m=i.extractCommon(E,n,t,w),E.oldPos+1>=c&&m+1>=l)return a(WN(i,E.lastComponent,n,t,i.useLongestToken));v[w]=E,E.oldPos+1>=c&&(y=Math.min(y,w-1)),m+1>=l&&(x=Math.max(x,w+1))}u++}if(s)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return s();g()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var h=g();if(h)return h}},addToPath:function(t,n,r,o){var s=t.lastComponent;return s&&s.added===n&&s.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}},extractCommon:function(t,n,r,o){for(var s=n.length,i=r.length,a=t.oldPos,l=a-o,c=0;l+1<s&&a+1<i&&this.equals(n[l+1],r[a+1]);)l++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=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 WN(e,t,n,r,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,l=s.length,c=0,u=0;a<l;a++){var d=s[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&s[a-1].added){var p=s[a-1];s[a-1]=s[a],s[a]=p}}else{if(!d.added&&o){var f=n.slice(c,c+d.count);f=f.map(function(m,x){var y=r[u+x];return y.length>m.length?y:m}),d.value=e.join(f)}else d.value=e.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}var v=s[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(s[l-2].value+=v.value,s.pop()),s}var KN=new no;function R1(e,t,n){return KN.diff(e,t,n)}var C1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,k1=/\S/,P1=new no;P1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!k1.test(e)&&!k1.test(t)};P1.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]&&C1.test(t[n])&&C1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var A1=new no;A1.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
13
- `));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 GN=new no;GN.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var qN=new no;qN.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function hf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hf=function(t){return typeof t}:hf=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hf(e)}var YN=Object.prototype.toString,Ql=new no;Ql.useLongestToken=!0;Ql.tokenize=A1.tokenize;Ql.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(s,i){return typeof i=="undefined"?n:i}:r;return typeof e=="string"?e:JSON.stringify(Ey(e,null,null,o),o," ")};Ql.equals=function(e,t){return no.prototype.equals.call(Ql,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ey(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var i;if(YN.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=Ey(e[s],t,n,r,o);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),hf(e)==="object"&&e!==null){t.push(e),i={},n.push(i);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],i[l]=Ey(e[l],t,n,r,l);t.pop(),n.pop()}else i=e;return i}var Ty=new no;Ty.tokenize=function(e){return e.slice()};Ty.join=Ty.removeEmpty=function(e){return e};function I1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Xo(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((s,i)=>Xo(s,t[i],n-1)):I1(e)&&I1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>Xo(e[i],t[i],n-1)):!1}function XN(e){return Math.max(...e.map(t=>t.length))}function QN(e,t){let n=e.reduce((r,o)=>{if(o){let s=r[o]?r[o]+1:1;return P(S({},r),{[o]:s})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function L1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<XN(r);o++){let s=QN(r.map(a=>a[o]),t),i=r.filter(a=>!s.includes(a[o]));if(i.length>=t)r=i;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var ZN=2;function O1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=L1(e,ZN);return n&&n.text!==t?n:e[0]}var JN={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},Z=JN;var M1={current:null,isSupported:null},at=it("resetConversation"),N1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Rr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},la=e=>e.conversation.isSupported,Cy=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),yf=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),vf=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),xf=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),ky=ge("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:s,agentEmail:i,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:i,agentName:s,agentNickname:a,metadata:l})})}),Ry=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),e_=[yf.rejected,vf.rejected,xf.rejected,Ry.rejected].map(e=>e==null?void 0:e.toString());function t_(e){return e_.includes(e.type)}var n_=ke({name:"conversation",initialState:M1,reducers:{},extraReducers:e=>{e.addCase(Cy.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(yf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(vf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(ky.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(at,()=>M1).addMatcher(t_,(t,n)=>{var r;throw Z.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),_1=n_.reducer;var Fs={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],pinnedSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Py(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}}var wf=it("input/replaceText"),Sf=it("input/applyImageSuggestion"),ro=it("input/sendEvent"),D1=ke({name:"input",initialState:Fs,reducers:{setInput(e,t){var s,i;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=Fs.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=R1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((s=n.selection)==null?void 0:s.start)!==void 0&&((i=n.selection)==null?void 0:i.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},sendMessage(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(n=>!e.metrics.textSuggestions.some(r=>r.text===n.text&&r.source===n.source))},setSelection(e,t){t.payload!==null&&(Xo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:s,abTestName:i,trainingJobs:a,sourceText:l,searchTerm:c,assistantCode:u,text:d},eventMetrics:{inputType:f},replace:p}=n,v=o==="search"||o==="personal-collection-search",m=r.slice(e.text.substring(0,e.selection.start).length);(v||p==="selection")&&(m=r),n.suggestion.source==="search-overlay"&&(m=d),e.metrics.textSuggestions.push({text:m,source:o,assistantCode:u,abVariant:s,abTestName:i,inputType:f,sourceText:l,trainingJobs:a||[],searchTerm:v?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(s=>s.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=P(S({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,s=n.numCharsDeleted+(o!=null&&o.length?o.length:0),i=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:s,deletions:i,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=e.text.substring(0,e.selection.end),r=O1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setPinnedSuggestions(e,t){e.pinnedSuggestions=t.payload},removePinnedSuggestions(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(r=>r.source!==t.payload.source||t.payload.assistantCode&&r.assistantCode!==t.payload.assistantCode?!0:t.payload.text?r.text!==t.payload.text:!1);let n=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex>n-1&&(e.selectedSuggestionIndex=-1)},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Fs.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=Fs.mixedSuggestion,t.textSuggestions=Fs.textSuggestions,t.selectedSuggestionIndex=Fs.selectedSuggestionIndex,t.metrics=Fs.metrics})}}),ca=e=>e.input.text.substring(0,e.input.selection.end),r_=e=>e.input.mixedSuggestion,o_=e=>e.input.pinnedSuggestions,s_=e=>e.input.textSuggestions,Zl=e=>e.input.selectedSuggestionIndex,zs=$t([s_,o_],(e,t)=>[...e,...t]),ua=$t([zs,r_,Zl],(e,t,n)=>n>-1?e[n]:t),F1=e=>e.input.selection,{commitSuggestion:er,offeredTextSuggestion:z1,registerCut:H1,registerKeyDown:B1,registerKeyUp:U1,registerPaste:V1,selectNextTextSuggestion:$1,selectPreviousTextSuggestion:j1,selectTextSuggestionByIndex:bf,setInput:Ef,setMetrics:W1,setPinnedSuggestions:Tf,removePinnedSuggestions:Hs,setSelection:Cf,setTextSuggestions:Qo,resetMetrics:K1,sendMessage:Bs}=D1.actions,G1=D1.reducer;function q1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var i_={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},da=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},Y1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},X1=e=>{var t;return(t=e.info.customData)!=null?t:null},ec=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&q1(e.visitorTimeZone)?e.visitorTimeZone:Qx,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},a_=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Jl=ge("info/setAgentInfo",(e,t)=>I(void 0,null,function*(){var s,i,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=a_.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(s=r.nickname)!=null?s:e.agentNickname,agentEmail:(i=r.email)!=null?i:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),Ay=ge("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),Iy=ge("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),Q1=ke({name:"info",initialState:i_,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Jl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Jl.rejected,t=>{t.fetchState="error"}).addCase(Jl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(Ay.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Iy.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(at,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:Z1,setCustomData:J1,setPlatformVariables:eT}=Q1.actions,tT=Q1.reducer;function un(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var kf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},nT=e=>e.search.isOpen,rT=e=>e.search.page,Ly=e=>e.search.list,oT=e=>e.search.aggregates,l_=$t([Ly,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),sT=e=>t=>l_(t,e),Us=ge("search/getAll",(e,t)=>I(void 0,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:s}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:ec(r)});return{results:i.map(c=>P(S(S({},c),c.title&&s?{title:un(c.title,s)}:{}),{text:un(c.text,s!=null?s:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),iT=ke({name:"search",initialState:kf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=kf.fetchState,e.list=kf.list}},extraReducers:e=>{e.addCase(Us.pending,t=>{t.fetchState="loading"}).addCase(Us.rejected,(t,n)=>{t.fetchState="error",Z.error(n.error)}).addCase(Us.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>kf)}}),{resetSearch:Rf,setIsOpen:Fn,setPage:oo}=iT.actions,aT=iT.reducer;var Oy="SetOutputs",fa="ShowLoginOverlay",tc="UserLoggedIn",c_="UserLoggedOut",Pr="ApplySuggestion",My="ApplyImageSuggestion",u_="ShowCommandPalette",Pf="ReduxAction",d_="RemovePinnedSuggestion",f_=e=>({[Oy]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[Pf]:t=>{t.isBroadcasted||e.dispatch(P(S({},t),{isBroadcasted:!0}))},[d_]:t=>{e.dispatch(Hs(t))},[u_]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(oo(t.page))},[fa]:t=>{e.dispatch(E1(t))},[tc]:()=>{e.dispatch(to())},[c_]:()=>{e.dispatch(to())},[My]:t=>{e.dispatch(Sf({suggestion:t.suggestion}))},[Pr]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),lT=f_;var nc=b(Y()),uT=b(R()),cT=nc.default.createContext(null),Zo=({broadcastEvents:e,children:t})=>{let n=nc.default.useMemo(()=>e,[]);return(0,uT.jsx)(cT.Provider,{value:n,children:t})},dn=()=>{let e=(0,nc.useContext)(cT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var Hf=b(Ne()),tr=b(Y());var Df=b(Y());var Ny=function(e,t){return Ny=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])},Ny(e,t)};function rc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ny(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Tn=function(){return Tn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Tn.apply(this,arguments)};function dT(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 Af(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function If(e,t){var n=t&&t.cache?t.cache:x_,r=t&&t.serializer?t.serializer:y_,o=t&&t.strategy?t.strategy:m_;return o(e,{cache:n,serializer:r})}function p_(e){return e==null||typeof e=="number"||typeof e=="boolean"}function fT(e,t,n,r){var o=p_(r)?r:n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.call(this,r),t.set(o,s)),s}function pT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.apply(this,r),t.set(o,s)),s}function _y(e,t,n,r,o){return n.bind(t,e,r,o)}function m_(e,t){var n=e.length===1?fT:pT;return _y(e,this,n,t.cache.create(),t.serializer)}function g_(e,t){return _y(e,this,pT,t.cache.create(),t.serializer)}function h_(e,t){return _y(e,this,fT,t.cache.create(),t.serializer)}var y_=function(){return JSON.stringify(arguments)},v_=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),x_={create:function(){return new v_}},Lf={variadic:g_,monadic:h_};var Of;(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"})(Of||(Of={}));var Mf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(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"})(zn||(zn={}));var Nf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Nf||(Nf={}));function Dy(e){return e.type===zn.literal}function Fy(e){return e.type===zn.argument}function oc(e){return e.type===zn.number}function sc(e){return e.type===zn.date}function ic(e){return e.type===zn.time}function ac(e){return e.type===zn.select}function lc(e){return e.type===zn.plural}function mT(e){return e.type===zn.pound}function cc(e){return e.type===zn.tag}function _f(e){return!!(e&&typeof e=="object"&&e.type===Nf.number)}function uc(e){return!!(e&&typeof e=="object"&&e.type===Nf.dateTime)}function zy(e){e.forEach(function(t){if(delete t.location,ac(t)||lc(t))for(var n in t.options)delete t.options[n].location,zy(t.options[n].value);else oc(t)&&_f(t.style)||(sc(t)||ic(t))&&uc(t.style)?delete t.style.location:cc(t)&&zy(t.children)})}function gT(e,t){t===void 0&&(t={}),t=Tn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Mf(e,t).parse();if(n.err){var r=SyntaxError(Of[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||zy(n.val),n.val}var Vs;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Vs||(Vs={}));var dc=function(e){rc(t,e);function t(n,r,o){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=o,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Hy=function(e){rc(t,e);function t(n,r,o,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Vs.INVALID_VALUE,s)||this}return t}(dc);var hT=function(e){rc(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Vs.INVALID_VALUE,o)||this}return t}(dc);var yT=function(e){rc(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,'"'),Vs.MISSING_VALUE,r)||this}return t}(dc);var Ot;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ot||(Ot={}));function w_(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ot.literal||n.type!==Ot.literal?t.push(n):r.value+=n.value,t},[])}function S_(e){return typeof e=="function"}function fc(e,t,n,r,o,s,i){if(e.length===1&&Dy(e[0]))return[{type:Ot.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(Dy(u)){a.push({type:Ot.literal,value:u.value});continue}if(mT(u)){typeof s=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(s)});continue}var d=u.value;if(!(o&&d in o))throw new yT(d,i);var f=o[d];if(Fy(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Ot.literal:Ot.object,value:f});continue}if(sc(u)){var p=typeof u.style=="string"?r.date[u.style]:uc(u.style)?u.style.parsedOptions:void 0;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(ic(u)){var p=typeof u.style=="string"?r.time[u.style]:uc(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(oc(u)){var p=typeof u.style=="string"?r.number[u.style]:_f(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Ot.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(cc(u)){var v=u.children,m=u.value,x=o[m];if(!S_(x))throw new hT(m,"function",i);var y=fc(v,t,n,r,o,s),g=x(y.map(function(E){return E.value}));Array.isArray(g)||(g=[g]),a.push.apply(a,g.map(function(E){return{type:typeof E=="string"?Ot.literal:Ot.object,value:E}}))}if(ac(u)){var h=u.options[f]||u.options.other;if(!h)throw new Hy(u.value,f,Object.keys(u.options),i);a.push.apply(a,fc(h.value,t,n,r,o));continue}if(lc(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new dc(`Intl.PluralRules is not available in this environment.
12
+ `),Q}hf(()=>{Ee.current=void 0,z.current=void 0,$.current=Ce});let ot=ce.useMemo(()=>ce.createElement(x,P(S({},Ce),{ref:V})),[V,x,Ce]);return ce.useMemo(()=>v?ce.createElement(L.Provider,{value:K},ot):ot,[L,ot,K])}let k=ce.memo(w);if(k.WrappedComponent=x,k.displayName=w.displayName=h,l){let A=ce.forwardRef(function(O,L){return ce.createElement(k,P(S({},O),{reactReduxForwardedRef:L}))});return A.displayName=h,A.WrappedComponent=x,Sy(A,x)}return Sy(k,x)}}var p1=VO;function $O(e){let{children:t,context:n,serverState:r,store:o}=e,s=ce.useMemo(()=>{let l=d1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),i=ce.useMemo(()=>o.getState(),[o]);return hf(()=>{let{subscription:l}=s;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[s,i]),ce.createElement((n||eo).Provider,{value:s},t)}var m1=$O;function Ty(e=eo){return function(){return ce.useContext(e)}}var g1=Ty();function h1(e=eo){let t=e===eo?g1:Ty(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jO=h1();function WO(e=eo){let t=e===eo?jO:h1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ve=WO(),KO=(e,t)=>e===t;function GO(e=eo){let t=e===eo?g1:Ty(e),n=(r,o={})=>{let{equalityFn:s=KO}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:a,subscription:l,getServerState:c}=i,u=ce.useRef(!0),d=ce.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=(0,y1.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,d,s);return ce.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var j=GO();var ql=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ql||{});var qO={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!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,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},v1=ke({name:"settings",initialState:qO,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:yf}=v1.actions,Yl=e=>t=>t.settings[e],te=e=>j(Yl(e)),x1=v1.reducer;var YO={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},jt=e=>e.auth.isLoggedIn,w1=e=>e.auth.loginFetchState,S1=e=>e.auth.verifyFetchState,b1=e=>e.auth.showLoginOverlay,to=he("auth/validate",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),E1=he("auth/requestLogin",(n,r)=>I(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),Xl=he("auth/verifyLoginToken",(n,r)=>I(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),T1=ke({name:"auth",initialState:YO,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(to.pending,t=>{t.loginFetchState="loading"}),e.addCase(to.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(to.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Xl.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Xl.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Xl.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:aa,setShowLoginOverlay:C1}=T1.actions,k1=T1.reducer;function no(){}no.prototype={diff:function(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(w){return s?(setTimeout(function(){s(void 0,w)},0),!0):w}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,u=1,d=l+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var f=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,v=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=c&&g+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function h(){for(var w=Math.max(x,-u);w<=Math.min(y,u);w+=2){var E=void 0,k=v[w-1],C=v[w+1];k&&(v[w-1]=void 0);var A=!1;if(C){var V=C.oldPos-w;A=C&&0<=V&&V<l}var O=k&&k.oldPos+1<c;if(!A&&!O){v[w]=void 0;continue}if(!O||A&&k.oldPos+1<C.oldPos?E=i.addToPath(C,!0,void 0,0):E=i.addToPath(k,void 0,!0,1),g=i.extractCommon(E,n,t,w),E.oldPos+1>=c&&g+1>=l)return a(XO(i,E.lastComponent,n,t,i.useLongestToken));v[w]=E,E.oldPos+1>=c&&(y=Math.min(y,w-1)),g+1>=l&&(x=Math.max(x,w+1))}u++}if(s)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return s();h()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var m=h();if(m)return m}},addToPath:function(t,n,r,o){var s=t.lastComponent;return s&&s.added===n&&s.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}},extractCommon:function(t,n,r,o){for(var s=n.length,i=r.length,a=t.oldPos,l=a-o,c=0;l+1<s&&a+1<i&&this.equals(n[l+1],r[a+1]);)l++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=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 XO(e,t,n,r,o){for(var s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,l=s.length,c=0,u=0;a<l;a++){var d=s[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&s[a-1].added){var p=s[a-1];s[a-1]=s[a],s[a]=p}}else{if(!d.added&&o){var f=n.slice(c,c+d.count);f=f.map(function(g,x){var y=r[u+x];return y.length>g.length?y:g}),d.value=e.join(f)}else d.value=e.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}var v=s[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(s[l-2].value+=v.value,s.pop()),s}var QO=new no;function A1(e,t,n){return QO.diff(e,t,n)}var R1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,P1=/\S/,I1=new no;I1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!P1.test(e)&&!P1.test(t)};I1.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]&&R1.test(t[n])&&R1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var L1=new no;L1.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
13
+ `));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 ZO=new no;ZO.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var JO=new no;JO.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function vf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vf=function(t){return typeof t}:vf=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}var e_=Object.prototype.toString,Ql=new no;Ql.useLongestToken=!0;Ql.tokenize=L1.tokenize;Ql.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(s,i){return typeof i=="undefined"?n:i}:r;return typeof e=="string"?e:JSON.stringify(Cy(e,null,null,o),o," ")};Ql.equals=function(e,t){return no.prototype.equals.call(Ql,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Cy(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var i;if(e_.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=Cy(e[s],t,n,r,o);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),vf(e)==="object"&&e!==null){t.push(e),i={},n.push(i);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],i[l]=Cy(e[l],t,n,r,l);t.pop(),n.pop()}else i=e;return i}var ky=new no;ky.tokenize=function(e){return e.slice()};ky.join=ky.removeEmpty=function(e){return e};function M1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Xo(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((s,i)=>Xo(s,t[i],n-1)):M1(e)&&M1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>Xo(e[i],t[i],n-1)):!1}function t_(e){return Math.max(...e.map(t=>t.length))}function n_(e,t){let n=e.reduce((r,o)=>{if(o){let s=r[o]?r[o]+1:1;return P(S({},r),{[o]:s})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function N1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<t_(r);o++){let s=n_(r.map(a=>a[o]),t),i=r.filter(a=>!s.includes(a[o]));if(i.length>=t)r=i;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var r_=2;function O1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=N1(e,r_);return n&&n.text!==t?n:e[0]}var o_={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},Z=o_;var _1={current:null,isSupported:null},lt=at("resetConversation"),D1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Rr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},la=e=>e.conversation.isSupported,Ry=he("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),xf=he("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),wf=he("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),Sf=he("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Py=he("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:s,agentEmail:i,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:i,agentName:s,agentNickname:a,metadata:l})})}),Ay=he("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),s_=[xf.rejected,wf.rejected,Sf.rejected,Ay.rejected].map(e=>e==null?void 0:e.toString());function i_(e){return s_.includes(e.type)}var a_=ke({name:"conversation",initialState:_1,reducers:{},extraReducers:e=>{e.addCase(Ry.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(xf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(wf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(Py.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(Sf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(lt,()=>_1).addMatcher(i_,(t,n)=>{var r;throw Z.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),F1=a_.reducer;var Fs={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],pinnedSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Iy(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}}var bf=at("input/replaceText"),Ef=at("input/applyImageSuggestion"),ro=at("input/sendEvent"),z1=ke({name:"input",initialState:Fs,reducers:{setInput(e,t){var s,i;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=Fs.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=A1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((s=n.selection)==null?void 0:s.start)!==void 0&&((i=n.selection)==null?void 0:i.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},sendMessage(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(n=>!e.metrics.textSuggestions.some(r=>r.text===n.text&&r.source===n.source))},setSelection(e,t){t.payload!==null&&(Xo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:s,abTestName:i,trainingJobs:a,sourceText:l,searchTerm:c,assistantCode:u,text:d},eventMetrics:{inputType:f},replace:p}=n,v=o==="search"||o==="personal-collection-search",g=r.slice(e.text.substring(0,e.selection.start).length);(v||p==="selection")&&(g=r),n.suggestion.source==="search-overlay"&&(g=d),e.metrics.textSuggestions.push({text:g,source:o,assistantCode:u,abVariant:s,abTestName:i,inputType:f,sourceText:l,trainingJobs:a||[],searchTerm:v?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(s=>s.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=P(S({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,s=n.numCharsDeleted+(o!=null&&o.length?o.length:0),i=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:s,deletions:i,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=e.text.substring(0,e.selection.end),r=O1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setPinnedSuggestions(e,t){e.pinnedSuggestions=t.payload},removePinnedSuggestions(e,t){e.pinnedSuggestions=e.pinnedSuggestions.filter(r=>r.source!==t.payload.source||t.payload.assistantCode&&r.assistantCode!==t.payload.assistantCode?!0:t.payload.text?r.text!==t.payload.text:!1);let n=e.textSuggestions.length+e.pinnedSuggestions.length;e.selectedSuggestionIndex>n-1&&(e.selectedSuggestionIndex=-1)},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Fs.metrics}},extraReducers:e=>{e.addCase(lt,t=>{t.mixedSuggestion=Fs.mixedSuggestion,t.textSuggestions=Fs.textSuggestions,t.selectedSuggestionIndex=Fs.selectedSuggestionIndex,t.metrics=Fs.metrics})}}),ca=e=>e.input.text.substring(0,e.input.selection.end),l_=e=>e.input.mixedSuggestion,c_=e=>e.input.pinnedSuggestions,u_=e=>e.input.textSuggestions,Zl=e=>e.input.selectedSuggestionIndex,zs=$t([u_,c_],(e,t)=>[...e,...t]),ua=$t([zs,l_,Zl],(e,t,n)=>n>-1?e[n]:t),H1=e=>e.input.selection,{commitSuggestion:er,offeredTextSuggestion:B1,registerCut:U1,registerKeyDown:V1,registerKeyUp:$1,registerPaste:j1,selectNextTextSuggestion:W1,selectPreviousTextSuggestion:K1,selectTextSuggestionByIndex:Tf,setInput:Cf,setMetrics:G1,setPinnedSuggestions:kf,removePinnedSuggestions:Hs,setSelection:Rf,setTextSuggestions:Qo,resetMetrics:q1,sendMessage:Bs}=z1.actions,Y1=z1.reducer;function X1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var d_={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},da=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},Q1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},Z1=e=>{var t;return(t=e.info.customData)!=null?t:null},ec=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&X1(e.visitorTimeZone)?e.visitorTimeZone:Jx,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},f_=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Jl=he("info/setAgentInfo",(e,t)=>I(void 0,null,function*(){var s,i,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=f_.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(s=r.nickname)!=null?s:e.agentNickname,agentEmail:(i=r.email)!=null?i:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),Ly=he("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),My=he("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),J1=ke({name:"info",initialState:d_,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Jl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Jl.rejected,t=>{t.fetchState="error"}).addCase(Jl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(Ly.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(My.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(lt,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:eT,setCustomData:tT,setPlatformVariables:nT}=J1.actions,rT=J1.reducer;function un(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var Pf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},oT=e=>e.search.isOpen,sT=e=>e.search.page,Ny=e=>e.search.list,iT=e=>e.search.aggregates,p_=$t([Ny,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),aT=e=>t=>p_(t,e),Us=he("search/getAll",(e,t)=>I(void 0,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:s}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:ec(r)});return{results:i.map(c=>P(S(S({},c),c.title&&s?{title:un(c.title,s)}:{}),{text:un(c.text,s!=null?s:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),lT=ke({name:"search",initialState:Pf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Pf.fetchState,e.list=Pf.list}},extraReducers:e=>{e.addCase(Us.pending,t=>{t.fetchState="loading"}).addCase(Us.rejected,(t,n)=>{t.fetchState="error",Z.error(n.error)}).addCase(Us.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(lt,()=>Pf)}}),{resetSearch:Af,setIsOpen:Fn,setPage:oo}=lT.actions,cT=lT.reducer;var Oy="SetOutputs",fa="ShowLoginOverlay",tc="UserLoggedIn",m_="UserLoggedOut",Pr="ApplySuggestion",_y="ApplyImageSuggestion",g_="ShowCommandPalette",If="ReduxAction",h_="RemovePinnedSuggestion",y_=e=>({[Oy]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[If]:t=>{t.isBroadcasted||e.dispatch(P(S({},t),{isBroadcasted:!0}))},[h_]:t=>{e.dispatch(Hs(t))},[g_]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(oo(t.page))},[fa]:t=>{e.dispatch(C1(t))},[tc]:()=>{e.dispatch(to())},[m_]:()=>{e.dispatch(to())},[_y]:t=>{e.dispatch(Ef({suggestion:t.suggestion}))},[Pr]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),uT=y_;var nc=b(Y()),fT=b(R()),dT=nc.default.createContext(null),Zo=({broadcastEvents:e,children:t})=>{let n=nc.default.useMemo(()=>e,[]);return(0,fT.jsx)(dT.Provider,{value:n,children:t})},dn=()=>{let e=(0,nc.useContext)(dT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var Uf=b(Oe()),tr=b(Y());var zf=b(Y());var Dy=function(e,t){return Dy=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])},Dy(e,t)};function rc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Dy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Tn=function(){return Tn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Tn.apply(this,arguments)};function pT(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 Lf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Mf(e,t){var n=t&&t.cache?t.cache:T_,r=t&&t.serializer?t.serializer:b_,o=t&&t.strategy?t.strategy:x_;return o(e,{cache:n,serializer:r})}function v_(e){return e==null||typeof e=="number"||typeof e=="boolean"}function mT(e,t,n,r){var o=v_(r)?r:n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.call(this,r),t.set(o,s)),s}function gT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.apply(this,r),t.set(o,s)),s}function Fy(e,t,n,r,o){return n.bind(t,e,r,o)}function x_(e,t){var n=e.length===1?mT:gT;return Fy(e,this,n,t.cache.create(),t.serializer)}function w_(e,t){return Fy(e,this,gT,t.cache.create(),t.serializer)}function S_(e,t){return Fy(e,this,mT,t.cache.create(),t.serializer)}var b_=function(){return JSON.stringify(arguments)},E_=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),T_={create:function(){return new E_}},Nf={variadic:w_,monadic:S_};var Of;(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"})(Of||(Of={}));var _f=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(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"})(zn||(zn={}));var Df;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Df||(Df={}));function zy(e){return e.type===zn.literal}function Hy(e){return e.type===zn.argument}function oc(e){return e.type===zn.number}function sc(e){return e.type===zn.date}function ic(e){return e.type===zn.time}function ac(e){return e.type===zn.select}function lc(e){return e.type===zn.plural}function hT(e){return e.type===zn.pound}function cc(e){return e.type===zn.tag}function Ff(e){return!!(e&&typeof e=="object"&&e.type===Df.number)}function uc(e){return!!(e&&typeof e=="object"&&e.type===Df.dateTime)}function By(e){e.forEach(function(t){if(delete t.location,ac(t)||lc(t))for(var n in t.options)delete t.options[n].location,By(t.options[n].value);else oc(t)&&Ff(t.style)||(sc(t)||ic(t))&&uc(t.style)?delete t.style.location:cc(t)&&By(t.children)})}function yT(e,t){t===void 0&&(t={}),t=Tn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new _f(e,t).parse();if(n.err){var r=SyntaxError(Of[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||By(n.val),n.val}var Vs;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Vs||(Vs={}));var dc=function(e){rc(t,e);function t(n,r,o){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=o,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Uy=function(e){rc(t,e);function t(n,r,o,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Vs.INVALID_VALUE,s)||this}return t}(dc);var vT=function(e){rc(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Vs.INVALID_VALUE,o)||this}return t}(dc);var xT=function(e){rc(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,'"'),Vs.MISSING_VALUE,r)||this}return t}(dc);var Mt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Mt||(Mt={}));function C_(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Mt.literal||n.type!==Mt.literal?t.push(n):r.value+=n.value,t},[])}function k_(e){return typeof e=="function"}function fc(e,t,n,r,o,s,i){if(e.length===1&&zy(e[0]))return[{type:Mt.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(zy(u)){a.push({type:Mt.literal,value:u.value});continue}if(hT(u)){typeof s=="number"&&a.push({type:Mt.literal,value:n.getNumberFormat(t).format(s)});continue}var d=u.value;if(!(o&&d in o))throw new xT(d,i);var f=o[d];if(Hy(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Mt.literal:Mt.object,value:f});continue}if(sc(u)){var p=typeof u.style=="string"?r.date[u.style]:uc(u.style)?u.style.parsedOptions:void 0;a.push({type:Mt.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(ic(u)){var p=typeof u.style=="string"?r.time[u.style]:uc(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Mt.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(oc(u)){var p=typeof u.style=="string"?r.number[u.style]:Ff(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Mt.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(cc(u)){var v=u.children,g=u.value,x=o[g];if(!k_(x))throw new vT(g,"function",i);var y=fc(v,t,n,r,o,s),h=x(y.map(function(E){return E.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(E){return{type:typeof E=="string"?Mt.literal:Mt.object,value:E}}))}if(ac(u)){var m=u.options[f]||u.options.other;if(!m)throw new Uy(u.value,f,Object.keys(u.options),i);a.push.apply(a,fc(m.value,t,n,r,o));continue}if(lc(u)){var m=u.options["=".concat(f)];if(!m){if(!Intl.PluralRules)throw new dc(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,Vs.MISSING_INTL_API,i);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Hy(u.value,f,Object.keys(u.options),i);a.push.apply(a,fc(h.value,t,n,r,o,f-(u.offset||0)));continue}}return w_(a)}function b_(e,t){return t?Tn(Tn(Tn({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Tn(Tn({},e[r]),t[r]||{}),n},{})):e}function E_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=b_(e[r],t[r]),n},Tn({},e)):e}function By(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function T_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:If(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Af([void 0],n,!1)))},{cache:By(e.number),strategy:Lf.variadic}),getDateTimeFormat:If(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Af([void 0],n,!1)))},{cache:By(e.dateTime),strategy:Lf.variadic}),getPluralRules:If(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Af([void 0],n,!1)))},{cache:By(e.pluralRules),strategy:Lf.variadic})}}var Uy=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=s.formatToParts(c);if(u.length===1)return u[0].value;var d=u.reduce(function(f,p){return!f.length||p.type!==Ot.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return fc(s.ast,s.locales,s.formatters,s.formats,c,void 0,s.message)},this.resolvedOptions=function(){var c;return{locale:((c=s.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 i=o||{},a=i.formatters,l=dT(i,["formatters"]);this.ast=e.__parse(t,Tn(Tn({},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=E_(e.formats,r),this.formatters=o&&o.formatters||T_(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!="undefined"){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=gT,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 C_(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var k_="dummy",Vy=(0,Df.createContext)(null);function ce(e){var r;let t=(0,Df.useContext)(Vy);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,s)=>{let i=C_(n,o);return i?new Uy(i).format(s):(t!==k_&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var Ff=b(Y());var vT={root:"dd-tvkOF",content:"dd-eXA1D"};var $y=b(R()),R_=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:s,overlayAriaLabel:i,contentAriaLabel:a})=>{let l=(0,Ff.useRef)(null),c=_("Dialog",vT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}s&&s(f)},d=f=>{f.target===l.current&&e&&r()};return(0,Ff.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,$y.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":i,ref:l,onKeyDown:u,onMouseDown:d,children:(0,$y.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},zf=R_;var wT=b(Ne());var xT={root:"dd-ranhW"};var ST=b(R()),P_=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let s=_("TextInput",xT);return(0,ST.jsx)("input",S({className:(0,wT.default)(e,s.root),type:"text",value:t},n))},pc=P_;var jy={};wt(jy,{enUS:()=>A_,nlNL:()=>I_});var A_={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"}]},I_={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 bT={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var tt=b(R());var L_=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},O_=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let s=ce(jy),i=_("LoginTokenDialog",bT),a=j(x1),l=ve(),c=te("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,m]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(S1({email:u})),p(1)}),[n,u]),y=()=>{m(""),p(0)},g=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=L_(w.target.elements.token.value);if(!E){m(s("verifyCodeError",{login:h}));return}l(Xl({token:E}))}),[n]),h=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:i.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&m(s("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(zf,{autoFocus:!0,isOpen:t,contentAriaLabel:s("promptTitle",{productName:c}),overlayAriaLabel:s("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:i.root,children:[(0,tt.jsx)("h1",{className:i.title,children:s("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("requestCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("requestCodeBody",{productName:c})}),(0,tt.jsx)(pc,{className:i.input,name:"email",placeholder:s("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:i.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Hf.default)(i.button,i.primaryButton),children:s("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:g,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("verifyCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("verifyCodeBody")}),(0,tt.jsx)(pc,{className:i.input,name:"token",placeholder:s("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:i.errorMessage,children:v}),(0,tt.jsxs)("div",{className:i.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Hf.default)(i.button),onClick:y,children:s("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Hf.default)(i.button,i.primaryButton),disabled:["loading","done"].includes(a),children:s("verifyCodeSubmitLabel")})]})]})]})})},ET=O_;var CT=b(R()),M_=()=>{let e=j(w1),t=j(da),n=te("adminUrl"),r=dn(),o=()=>r.send(fa,!1),s=()=>{r.send(fa,!1),r.send(tc)};return(0,CT.jsx)(ET,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:s})},TT=M_;var MR=b(Gy()),Qt=b(Y());function Yy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ws=Yy();function NT(e){Ws=e}var hc={exec:()=>null};function Pe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(Wt.caret,"$1"),n=n.replace(o,i),r},getRegex:()=>new RegExp(n,t)};return r}var Wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Q_=/^(?:[ \t]*(?:\n|$))+/,Z_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,J_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,e2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Xy=/(?:[*+-]|\d{1,9}[.)])/,_T=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,DT=Pe(_T).replace(/bull/g,Xy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),t2=Pe(_T).replace(/bull/g,Xy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Qy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,n2=/^[^\n]+/,Zy=/(?!\s*\])(?:\\.|[^\[\]\\])+/,r2=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Zy).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),o2=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Xy).getRegex(),Vf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Jy=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,s2=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Jy).replace("tag",Vf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),FT=Pe(Qy).replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex(),i2=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",FT).getRegex(),ev={blockquote:i2,code:Z_,def:r2,fences:J_,heading:e2,hr:xc,html:s2,lheading:DT,list:o2,newline:Q_,paragraph:FT,table:hc,text:n2},AT=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex(),a2=P(S({},ev),{lheading:t2,table:AT,paragraph:Pe(Qy).replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",AT).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Vf).getRegex()}),l2=P(S({},ev),{html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Jy).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(Qy).replace("hr",xc).replace("heading",` *#{1,6} *[^
16
- ]`).replace("lheading",DT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),c2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,u2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zT=/^( {2,}|\\)\n(?!\s*$)/,d2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$f=/[\p{P}\p{S}]/u,tv=/[\s\p{P}\p{S}]/u,HT=/[^\s\p{P}\p{S}]/u,f2=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tv).getRegex(),BT=/(?!~)[\p{P}\p{S}]/u,p2=/(?!~)[\s\p{P}\p{S}]/u,m2=/(?:[^\s\p{P}\p{S}]|~)/u,g2=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,UT=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,h2=Pe(UT,"u").replace(/punct/g,$f).getRegex(),y2=Pe(UT,"u").replace(/punct/g,BT).getRegex(),VT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",v2=Pe(VT,"gu").replace(/notPunctSpace/g,HT).replace(/punctSpace/g,tv).replace(/punct/g,$f).getRegex(),x2=Pe(VT,"gu").replace(/notPunctSpace/g,m2).replace(/punctSpace/g,p2).replace(/punct/g,BT).getRegex(),w2=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,HT).replace(/punctSpace/g,tv).replace(/punct/g,$f).getRegex(),S2=Pe(/\\(punct)/,"gu").replace(/punct/g,$f).getRegex(),b2=Pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),E2=Pe(Jy).replace("(?:-->|$)","-->").getRegex(),T2=Pe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",E2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Uf=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,C2=Pe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Uf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),$T=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Uf).replace("ref",Zy).getRegex(),jT=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Zy).getRegex(),k2=Pe("reflink|nolink(?!\\()","g").replace("reflink",$T).replace("nolink",jT).getRegex(),nv={_backpedal:hc,anyPunctuation:S2,autolink:b2,blockSkip:g2,br:zT,code:u2,del:hc,emStrongLDelim:h2,emStrongRDelimAst:v2,emStrongRDelimUnd:w2,escape:c2,link:C2,nolink:jT,punctuation:f2,reflink:$T,reflinkSearch:k2,tag:T2,text:d2,url:hc},R2=P(S({},nv),{link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Uf).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Uf).getRegex()}),qy=P(S({},nv),{emStrongRDelimAst:x2,emStrongLDelim:y2,url:Pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),P2=P(S({},qy),{br:Pe(zT).replace("{2,}","*").getRegex(),text:Pe(qy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Bf={normal:ev,gfm:a2,pedantic:l2},mc={normal:nv,gfm:qy,breaks:P2,pedantic:R2},A2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},IT=e=>A2[e];function Ar(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,IT)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,IT);return e}function LT(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch(t){return null}return e}function OT(e,t){var s;let n=e.replace(Wt.findPipe,(i,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Wt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Wt.slashPipe,"|");return r}function gc(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function I2(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function MT(e,t,n,r,o){let s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:s,title:i,text:a}}function L2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
15
+ `,Vs.MISSING_INTL_API,i);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));m=u.options[w]||u.options.other}if(!m)throw new Uy(u.value,f,Object.keys(u.options),i);a.push.apply(a,fc(m.value,t,n,r,o,f-(u.offset||0)));continue}}return C_(a)}function R_(e,t){return t?Tn(Tn(Tn({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Tn(Tn({},e[r]),t[r]||{}),n},{})):e}function P_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=R_(e[r],t[r]),n},Tn({},e)):e}function Vy(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function A_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Mf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Lf([void 0],n,!1)))},{cache:Vy(e.number),strategy:Nf.variadic}),getDateTimeFormat:Mf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Lf([void 0],n,!1)))},{cache:Vy(e.dateTime),strategy:Nf.variadic}),getPluralRules:Mf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Lf([void 0],n,!1)))},{cache:Vy(e.pluralRules),strategy:Nf.variadic})}}var $y=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=s.formatToParts(c);if(u.length===1)return u[0].value;var d=u.reduce(function(f,p){return!f.length||p.type!==Mt.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return fc(s.ast,s.locales,s.formatters,s.formats,c,void 0,s.message)},this.resolvedOptions=function(){var c;return{locale:((c=s.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 i=o||{},a=i.formatters,l=pT(i,["formatters"]);this.ast=e.__parse(t,Tn(Tn({},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=P_(e.formats,r),this.formatters=o&&o.formatters||A_(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!="undefined"){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=yT,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 I_(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var L_="dummy",jy=(0,zf.createContext)(null);function ie(e){var r;let t=(0,zf.useContext)(jy);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,s)=>{let i=I_(n,o);return i?new $y(i).format(s):(t!==L_&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var Hf=b(Y());var wT={root:"dd-tvkOF",content:"dd-eXA1D"};var Wy=b(R()),M_=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:s,overlayAriaLabel:i,contentAriaLabel:a})=>{let l=(0,Hf.useRef)(null),c=_("Dialog",wT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}s&&s(f)},d=f=>{f.target===l.current&&e&&r()};return(0,Hf.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,Wy.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":i,ref:l,onKeyDown:u,onMouseDown:d,children:(0,Wy.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},Bf=M_;var bT=b(Oe());var ST={root:"dd-ranhW"};var ET=b(R()),N_=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let s=_("TextInput",ST);return(0,ET.jsx)("input",S({className:(0,bT.default)(e,s.root),type:"text",value:t},n))},pc=N_;var Ky={};pt(Ky,{enUS:()=>O_,nlNL:()=>__});var O_={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"}]},__={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 TT={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var tt=b(R());var D_=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},F_=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let s=ie(Ky),i=_("LoginTokenDialog",TT),a=j(S1),l=ve(),c=te("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,g]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(E1({email:u})),p(1)}),[n,u]),y=()=>{g(""),p(0)},h=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=D_(w.target.elements.token.value);if(!E){g(s("verifyCodeError",{login:m}));return}l(Xl({token:E}))}),[n]),m=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:i.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&g(s("verifyCodeError",{login:m})),a==="done"&&r()},[a]),(0,tt.jsx)(Bf,{autoFocus:!0,isOpen:t,contentAriaLabel:s("promptTitle",{productName:c}),overlayAriaLabel:s("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:i.root,children:[(0,tt.jsx)("h1",{className:i.title,children:s("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("requestCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("requestCodeBody",{productName:c})}),(0,tt.jsx)(pc,{className:i.input,name:"email",placeholder:s("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:i.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Uf.default)(i.button,i.primaryButton),children:s("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:h,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("verifyCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("verifyCodeBody")}),(0,tt.jsx)(pc,{className:i.input,name:"token",placeholder:s("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:i.errorMessage,children:v}),(0,tt.jsxs)("div",{className:i.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Uf.default)(i.button),onClick:y,children:s("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Uf.default)(i.button,i.primaryButton),disabled:["loading","done"].includes(a),children:s("verifyCodeSubmitLabel")})]})]})]})})},CT=F_;var RT=b(R()),z_=()=>{let e=j(b1),t=j(da),n=te("adminUrl"),r=dn(),o=()=>r.send(fa,!1),s=()=>{r.send(fa,!1),r.send(tc)};return(0,RT.jsx)(CT,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:s})},kT=z_;var _R=b(Yy()),Qt=b(Y());function Qy(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ws=Qy();function DT(e){Ws=e}var hc={exec:()=>null};function Pe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(Wt.caret,"$1"),n=n.replace(o,i),r},getRegex:()=>new RegExp(n,t)};return r}var Wt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},n2=/^(?:[ \t]*(?:\n|$))+/,r2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,o2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Zy=/(?:[*+-]|\d{1,9}[.)])/,FT=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,zT=Pe(FT).replace(/bull/g,Zy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),i2=Pe(FT).replace(/bull/g,Zy).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Jy=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,a2=/^[^\n]+/,ev=/(?!\s*\])(?:\\.|[^\[\]\\])+/,l2=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ev).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),c2=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Zy).getRegex(),jf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,u2=Pe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",tv).replace("tag",jf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),HT=Pe(Jy).replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jf).getRegex(),d2=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",HT).getRegex(),nv={blockquote:d2,code:r2,def:l2,fences:o2,heading:s2,hr:xc,html:u2,lheading:zT,list:c2,newline:n2,paragraph:HT,table:hc,text:a2},LT=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jf).getRegex(),f2=P(S({},nv),{lheading:i2,table:LT,paragraph:Pe(Jy).replace("hr",xc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",LT).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",jf).getRegex()}),p2=P(S({},nv),{html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(Jy).replace("hr",xc).replace("heading",` *#{1,6} *[^
16
+ ]`).replace("lheading",zT).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),m2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,g2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,BT=/^( {2,}|\\)\n(?!\s*$)/,h2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wf=/[\p{P}\p{S}]/u,rv=/[\s\p{P}\p{S}]/u,UT=/[^\s\p{P}\p{S}]/u,y2=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rv).getRegex(),VT=/(?!~)[\p{P}\p{S}]/u,v2=/(?!~)[\s\p{P}\p{S}]/u,x2=/(?:[^\s\p{P}\p{S}]|~)/u,w2=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,$T=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,S2=Pe($T,"u").replace(/punct/g,Wf).getRegex(),b2=Pe($T,"u").replace(/punct/g,VT).getRegex(),jT="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E2=Pe(jT,"gu").replace(/notPunctSpace/g,UT).replace(/punctSpace/g,rv).replace(/punct/g,Wf).getRegex(),T2=Pe(jT,"gu").replace(/notPunctSpace/g,x2).replace(/punctSpace/g,v2).replace(/punct/g,VT).getRegex(),C2=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,UT).replace(/punctSpace/g,rv).replace(/punct/g,Wf).getRegex(),k2=Pe(/\\(punct)/,"gu").replace(/punct/g,Wf).getRegex(),R2=Pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),P2=Pe(tv).replace("(?:-->|$)","-->").getRegex(),A2=Pe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",P2).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$f=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,I2=Pe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",$f).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),WT=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",$f).replace("ref",ev).getRegex(),KT=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ev).getRegex(),L2=Pe("reflink|nolink(?!\\()","g").replace("reflink",WT).replace("nolink",KT).getRegex(),ov={_backpedal:hc,anyPunctuation:k2,autolink:R2,blockSkip:w2,br:BT,code:g2,del:hc,emStrongLDelim:S2,emStrongRDelimAst:E2,emStrongRDelimUnd:C2,escape:m2,link:I2,nolink:KT,punctuation:y2,reflink:WT,reflinkSearch:L2,tag:A2,text:h2,url:hc},M2=P(S({},ov),{link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",$f).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$f).getRegex()}),Xy=P(S({},ov),{emStrongRDelimAst:T2,emStrongLDelim:b2,url:Pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),N2=P(S({},Xy),{br:Pe(BT).replace("{2,}","*").getRegex(),text:Pe(Xy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Vf={normal:nv,gfm:f2,pedantic:p2},mc={normal:ov,gfm:Xy,breaks:N2,pedantic:M2},O2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},MT=e=>O2[e];function Ar(e,t){if(t){if(Wt.escapeTest.test(e))return e.replace(Wt.escapeReplace,MT)}else if(Wt.escapeTestNoEncode.test(e))return e.replace(Wt.escapeReplaceNoEncode,MT);return e}function NT(e){try{e=encodeURI(e).replace(Wt.percentDecode,"%")}catch(t){return null}return e}function OT(e,t){var s;let n=e.replace(Wt.findPipe,(i,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Wt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Wt.slashPipe,"|");return r}function gc(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function _2(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function _T(e,t,n,r,o){let s=t.href,i=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:n,href:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:s,title:i,text:a}}function D2(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
17
17
  `).map(s=>{let i=s.match(n.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(`
18
- `)}var pa=class{constructor(t){Ee(this,"options");Ee(this,"rules");Ee(this,"lexer");this.options=t||Ws}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:gc(r,`
19
- `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=L2(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let o=gc(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:gc(n[0],`
18
+ `)}var pa=class{constructor(t){Te(this,"options");Te(this,"rules");Te(this,"lexer");this.options=t||Ws}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:gc(r,`
19
+ `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=D2(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let o=gc(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:gc(n[0],`
20
20
  `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=gc(n[0],`
21
21
  `).split(`
22
22
  `),o="",s="",i=[];for(;r.length>0;){let a=!1,l=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))l.push(r[c]),a=!0;else if(!a)l.push(r[c]);else break;r=r.slice(c);let u=l.join(`
23
23
  `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
24
24
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
25
25
  ${u}`:u,s=s?`${s}
26
- ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,m=v.raw+`
26
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,g=v.raw+`
27
27
  `+r.join(`
28
- `),x=this.blockquote(m);i[i.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,s=s.substring(0,s.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,m=v.raw+`
28
+ `),x=this.blockquote(g);i[i.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,s=s.substring(0,s.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,g=v.raw+`
29
29
  `+r.join(`
30
- `),x=this.list(m);i[i.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,s=s.substring(0,s.length-v.raw.length)+x.raw,r=m.substring(i.at(-1).raw.length).split(`
30
+ `),x=this.list(g);i[i.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,s=s.substring(0,s.length-v.raw.length)+x.raw,r=g.substring(i.at(-1).raw.length).split(`
31
31
  `);continue}}return{type:"blockquote",raw:o,tokens:i,text:s}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),o=r.length>1,s={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=i.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let f=n[2].split(`
32
- `,1)[0].replace(this.rules.other.listReplaceTabs,g=>" ".repeat(3*g.length)),p=t.split(`
33
- `,1)[0],v=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):v?m=n[1].length+1:(m=n[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=n[1].length),v&&this.rules.other.blankLine.test(p)&&(u+=p+`
34
- `,t=t.substring(p.length+1),c=!0),!c){let g=this.rules.other.nextBulletRegex(m),h=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),E=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m);for(;t;){let C=t.split(`
35
- `,1)[0],A;if(p=C,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||E.test(p)||k.test(p)||g.test(p)||h.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=m||!p.trim())d+=`
36
- `+A.slice(m);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||E.test(f)||h.test(f))break;d+=`
32
+ `,1)[0].replace(this.rules.other.listReplaceTabs,h=>" ".repeat(3*h.length)),p=t.split(`
33
+ `,1)[0],v=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):v?g=n[1].length+1:(g=n[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=n[1].length),v&&this.rules.other.blankLine.test(p)&&(u+=p+`
34
+ `,t=t.substring(p.length+1),c=!0),!c){let h=this.rules.other.nextBulletRegex(g),m=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),E=this.rules.other.headingBeginRegex(g),k=this.rules.other.htmlBeginRegex(g);for(;t;){let C=t.split(`
35
+ `,1)[0],A;if(p=C,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||E.test(p)||k.test(p)||h.test(p)||m.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=`
36
+ `+A.slice(g);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||E.test(f)||m.test(f))break;d+=`
37
37
  `+p}!v&&!p.trim()&&(v=!0),u+=C+`
38
- `,t=t.substring(C.length+1),f=A.slice(m)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:s}}}table(t){var a;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=OT(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
38
+ `,t=t.substring(C.length+1),f=A.slice(g)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:s}}}table(t){var a;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=OT(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
39
39
  `):[],i={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<r.length;l++)i.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:i.align[l]});for(let l of s)i.rows.push(OT(l,i.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[u]})));return i}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
40
- `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=gc(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=I2(n[2],"()");if(i>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),MT(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[o.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return MT(r,s,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let i=[...o[0]].length-1,a,l,c=i,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+i);(o=d.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);let f=[...o[0]][0].length,p=t.slice(0,i+o.index+f+l);if(Math.min(i,l)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let v=p.slice(2,-2);return{type:"strong",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=n[1],o="mailto:"+r):(r=n[1],o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r,o;let n;if(n=this.rules.inline.url.exec(t)){let s,i;if(n[2]==="@")s=n[0],i="mailto:"+s;else{let a;do a=n[0],n[0]=(o=(r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])!=null?o:"";while(a!==n[0]);s=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},nr=class e{constructor(t){Ee(this,"tokens");Ee(this,"options");Ee(this,"state");Ee(this,"tokenizer");Ee(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ws,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Wt,block:Bf.normal,inline:mc.normal};this.options.pedantic?(n.block=Bf.pedantic,n.inline=mc.pedantic):this.options.gfm&&(n.block=Bf.gfm,this.options.breaks?n.inline=mc.breaks:n.inline=mc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Bf,inline:mc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
40
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=gc(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=_2(n[2],"()");if(i>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),_T(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=n[o.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return _T(r,s,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let i=[...o[0]].length-1,a,l,c=i,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+i);(o=d.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&i%3&&!((i+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);let f=[...o[0]][0].length,p=t.slice(0,i+o.index+f+l);if(Math.min(i,l)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let v=p.slice(2,-2);return{type:"strong",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=n[1],o="mailto:"+r):(r=n[1],o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r,o;let n;if(n=this.rules.inline.url.exec(t)){let s,i;if(n[2]==="@")s=n[0],i="mailto:"+s;else{let a;do a=n[0],n[0]=(o=(r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])!=null?o:"";while(a!==n[0]);s=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},nr=class e{constructor(t){Te(this,"tokens");Te(this,"options");Te(this,"state");Te(this,"tokenizer");Te(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ws,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Wt,block:Vf.normal,inline:mc.normal};this.options.pedantic?(n.block=Vf.pedantic,n.inline=mc.pedantic):this.options.gfm&&(n.block=Vf.gfm,this.options.breaks?n.inline=mc.breaks:n.inline=mc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Vf,inline:mc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(Wt.carriageReturn,`
41
41
  `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,s,i;for(this.options.pedantic&&(t=t.replace(Wt.tabCharGlobal," ").replace(Wt.spaceLine,""));t;){let a;if((s=(o=this.options.extensions)==null?void 0:o.block)!=null&&s.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
42
42
  `:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
43
43
  `+a.raw,c.text+=`
@@ -47,7 +47,7 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
47
47
  `+a.raw,c.text+=`
48
48
  `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a),r=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
49
49
  `+a.raw,c.text+=`
50
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,i="";for(;t;){s||(i=""),s=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(u=f.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=n.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,i)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0,p=t.slice(1),v;this.options.extensions.startInline.forEach(m=>{v=m.call({lexer:this},p),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),s=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},ma=class{constructor(t){Ee(this,"options");Ee(this,"parser");this.options=t||Ws}space(t){return""}code({text:t,lang:n,escaped:r}){var i;let o=(i=(n||"").match(Wt.notSpaceStart))==null?void 0:i[0],s=t.replace(Wt.endingNewline,"")+`
50
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,i="";for(;t;){s||(i=""),s=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(u=f.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=n.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,i)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0,p=t.slice(1),v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),s=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},ma=class{constructor(t){Te(this,"options");Te(this,"parser");this.options=t||Ws}space(t){return""}code({text:t,lang:n,escaped:r}){var i;let o=(i=(n||"").match(Wt.notSpaceStart))==null?void 0:i[0],s=t.replace(Wt.endingNewline,"")+`
51
51
  `;return o?'<pre><code class="language-'+Ar(o)+'">'+(r?s:Ar(s,!0))+`</code></pre>
52
52
  `:"<pre><code>"+(r?s:Ar(s,!0))+`</code></pre>
53
53
  `}blockquote({tokens:t}){return`<blockquote>
@@ -65,23 +65,23 @@ ${this.parser.parse(t)}</blockquote>
65
65
  `}tablerow({text:t}){return`<tr>
66
66
  ${t}</tr>
67
67
  `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
68
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ar(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),s=LT(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return n&&(i+=' title="'+Ar(n)+'"'),i+=">"+o+"</a>",i}image({href:t,title:n,text:r}){let o=LT(t);if(o===null)return Ar(r);t=o;let s=`<img src="${t}" alt="${r}"`;return n&&(s+=` title="${Ar(n)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ar(t.text)}},yc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},rr=class e{constructor(t){Ee(this,"options");Ee(this,"renderer");Ee(this,"textRenderer");this.options=t||Ws,this.options.renderer=this.options.renderer||new ma,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){var o,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
69
- `+this.renderer.text(c);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(t,n=this.renderer){var o,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=c||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},$s=class{constructor(t){Ee(this,"options");Ee(this,"block");this.options=t||Ws}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?nr.lex:nr.lexInline}provideParser(){return this.block?rr.parse:rr.parseInline}};Ee($s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var vc=class{constructor(...t){Ee(this,"defaults",Yy());Ee(this,"options",this.setOptions);Ee(this,"parse",this.parseMarkdown(!0));Ee(this,"parseInline",this.parseMarkdown(!1));Ee(this,"Parser",rr);Ee(this,"Renderer",ma);Ee(this,"TextRenderer",yc);Ee(this,"Lexer",nr);Ee(this,"Tokenizer",pa);Ee(this,"Hooks",$s);this.use(...t)}walkTokens(t,n){var o,s;let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let l of a.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of a.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o=S({},r);if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=n.renderers[s.name];i?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=n[s.level];i?i.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),o.extensions=n),r.renderer){let s=this.defaults.renderer||new ma(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}o.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new pa(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new $s;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=r.hooks[a],c=s[a];$s.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>c.call(s,f));let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults=S(S({},this.defaults),o)}),this}setOptions(t){return this.defaults=S(S({},this.defaults),t),this}lexer(t,n){return nr.lex(t,n!=null?n:this.defaults)}parser(t,n){return rr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let s=S({},o),i=S(S({},this.defaults),s),a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r=="undefined"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let l=i.hooks?i.hooks.provideLexer():t?nr.lex:nr.lexInline,c=i.hooks?i.hooks.provideParser():t?rr.parse:rr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(r=i.hooks.preprocess(r));let u=l(r,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
70
- Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Ar(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},js=new vc;function Re(e,t){return js.parse(e,t)}Re.options=Re.setOptions=function(e){return js.setOptions(e),Re.defaults=js.defaults,NT(Re.defaults),Re};Re.getDefaults=Yy;Re.defaults=Ws;Re.use=function(...e){return js.use(...e),Re.defaults=js.defaults,NT(Re.defaults),Re};Re.walkTokens=function(e,t){return js.walkTokens(e,t)};Re.parseInline=js.parseInline;Re.Parser=rr;Re.parser=rr.parse;Re.Renderer=ma;Re.TextRenderer=yc;Re.Lexer=nr;Re.lexer=nr.lex;Re.Tokenizer=pa;Re.Hooks=$s;Re.parse=Re;var hH=Re.options,yH=Re.setOptions,vH=Re.use,xH=Re.walkTokens,wH=Re.parseInline;var SH=rr.parse,bH=nr.lex;var WT=(e,t)=>{let n=[],r=new vc,o=s=>{s.type==="code"&&s.lang===t&&n.push(s.text)};return r.use({walkTokens:o}),r.parse(e),n};var wc="__summarizerAssistant__",KT={cues:[],threads:{},pending:[]},GT=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var Sc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},jf=it("assistants/callToAction"),so=ge("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let s=yield t.dispatch(or(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(s.error)throw new Error(s.error.message);if(typeof s.payload!="string")throw Z.warn("Unexpected summary output",s),new Error("Unexpected summary output");return s.payload})),O2=1,Ks=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,m,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:s}=t.extra,i=t.getState(),{platformVariables:a}=i.info;n||(n=O2++,r&&r(n));let l=(p=Sc(n)(i))!=null?p:[],c=yield s.getKnowledgeAssistant(e.assistantCode),u=(v=i.conversation.current)==null?void 0:v.externalId,d=(x=(m=i.info)==null?void 0:m.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield s.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=un(f.answer,a)),{threadId:n,question:o,answer:f}})),Gs=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,s=t.getState(),{platformVariables:i}=s.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(or(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:un(l.response,i!=null?i:{}),sources:l.sources}}})),_H=it("assistants/extractedTextSuggestions"),or=ge("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:s={},expectFormat:i,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(s,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:i,input:s,transcript:d,externalConversationId:u,threadId:a});switch(i){case"text":return un(f,c);case"json-schema:cues":{if(!Array.isArray(f))return[];let v=f.map(x=>P(S({},x),{name:un(x.name,c),response:un(x.response,c)})),m=[];return v.forEach(x=>{let y=WT(x.response,"reply");m.push(...y.map(g=>({text:g,type:"text",source:"assistant",assistantCode:x.code,sourceLabel:x.name})))}),m.length>0&&t.dispatch(Tf(m)),v}case"json-schema:knowledge-assist":{let v=f;return P(S({},v),{answer:un(v.response,c)})}default:return f}})),qT=ke({name:"assistants",initialState:KT,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]}},extraReducers:e=>{e.addCase(or.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&Z.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(or.rejected,(t,n)=>{var o;Z.warn((o=n.error)==null?void 0:o.message);let r=t.pending.indexOf(n.meta.arg.assistantCode);r!==-1&&t.pending.splice(r,1)}).addCase(or.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let o=n.payload,s=o.map(a=>a.code),i=t.cues.filter(a=>!s.includes(a.code));t.cues=[...i,...o];break}}}).addCase(Gs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Ks.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(so.pending,t=>{let n={code:wc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==wc);t.cues=[...r,n]}).addCase(so.rejected,t=>{let n=t.cues.filter(r=>r.code!==wc);t.cues=n}).addCase(so.fulfilled,(t,n)=>{let r={code:wc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(s=>s.code!==wc);t.cues=[...o,r]}).addCase(at,()=>KT)}}),{removeCueByCode:Wf,resetCues:DH,removeThreadById:ga}=qT.actions,YT=qT.reducer;var M2={data:null,fetchState:"idle"},XT=e=>e.contentTypes.data,bc=ge("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),N2=ke({name:"contentTypes",initialState:M2,reducers:{},extraReducers:e=>{e.addCase(bc.pending,t=>{t.fetchState="loading"}).addCase(bc.rejected,t=>{t.fetchState="error"}).addCase(bc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),QT=N2.reducer;var _2={data:null,fetchState:"idle"},D2=[],qs=e=>e.profile.data,F2=e=>e.profile.data?e.profile.data.uiConfig.widget.types:D2,Tc=$t([F2],e=>e.filter(t=>t.isActive)),ZT=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.summarizerAssistantNew)!=null?n:null},JT=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},eC=e=>t=>Tc(t).find(n=>n.type===e),tC=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,Kf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},Gf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistant)!=null?n:null},Ec=ge("profile/getProfile",(e,t)=>I(void 0,null,function*(){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");return((s=r.profile.data)==null?void 0:s.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),z2=ke({name:"profile",initialState:_2,reducers:{},extraReducers:e=>{e.addCase(Ec.pending,t=>{t.fetchState="loading"}).addCase(Ec.rejected,t=>{t.fetchState="error"}).addCase(Ec.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),nC=z2.reducer;function Ir(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 fo=b(Y());var rC=b(Y()),qf=b(Ne());var Cn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var io={};wt(io,{enUS:()=>H2,nlNL:()=>B2});var H2={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"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},B2={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"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Jo=b(R()),U2=({src:e,title:t})=>{let n=_("CommandPalette",Cn),[r,o]=(0,rC.useState)("loading"),s=ce(io);return(0,Jo.jsxs)("div",{className:n.image,children:[(0,Jo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,qf.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Jo.jsx)("span",{className:(0,qf.default)(n.imageSrc,n.imageSrcStatus),children:s("loading")}),r==="error"&&(0,Jo.jsx)("span",{className:(0,qf.default)(n.imageSrc,n.imageSrcStatus),children:(0,Jo.jsx)(Pu,{})}),t&&(0,Jo.jsx)("span",{className:n.imageTitle,children:t})]})},oC=U2;var sC=b(Y()),iC=b(Ne());var Ys=b(R());function rv({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let s=ce(io),i=_("CommandPalette",Cn);return sC.default.Children.count(e)===0?null:(0,Ys.jsxs)("div",{"data-testid":"commandpalette-list",className:i.list,children:[(t||r)&&(0,Ys.jsxs)("div",{className:i.listHeader,children:[t&&(0,Ys.jsx)("h4",{className:i.listHeading,children:t}),r&&o&&(0,Ys.jsx)("button",{onClick:o,className:i.listMoreButton,type:"button",children:s("showAll")})]}),(0,Ys.jsx)("div",{className:(0,iC.default)(i.listWrapper,n==="horizontal"&&i.listHorizontal),children:e})]})}var Hc=b(Ne());var Yf=b(Y());function Cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ae=1,sv=2,iv=4,lt=8,Xf=16,kc=32,sr=64,ov={a:{content:Ae|lt,self:!1,type:Ae|lt|kc|sr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Ae|lt,void:!0},body:{content:Ae|sv|iv|lt|Xf|kc|sr},button:{content:lt,type:Ae|lt|kc|sr},caption:{content:Ae,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Ae|kc|sr},dd:{content:Ae,parent:["dl"]},dl:{children:["dt","dd"],type:Ae},dt:{content:Ae,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Ae,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Ae,void:!0},img:{void:!0},li:{content:Ae,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Ae},picture:{children:["source","img"],type:Ae|lt|Xf},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:lt,parent:["ruby","rtc"]},rtc:{content:lt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:lt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Ae},tbody:{parent:["table"],children:["tr"]},td:{content:Ae,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Ae,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:Ae},video:{children:["track","source"]},wbr:{type:Ae|lt,void:!0}};function Qs(e){return t=>{ov[t]=S(S({},e),ov[t])}}["address","main","div","figure","p","pre"].forEach(Qs({content:Ae,type:Ae|sr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Qs({content:lt,type:Ae|lt|sr}));["p","pre"].forEach(Qs({content:lt,type:Ae|sr}));["s","small","span","del","ins"].forEach(Qs({content:lt,type:Ae|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach(Qs({content:Ae,type:Ae|sv|sr}));["h1","h2","h3","h4","h5","h6"].forEach(Qs({content:lt,type:Ae|iv|sr}));["audio","canvas","iframe","img","video"].forEach(Qs({type:Ae|lt|Xf|sr}));var Pc=Object.freeze(ov),av=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],lv=Object.keys(Pc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,cv=2,Xs=3,es=4,Zf=5,Jf=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:Xs,controls:es,datetime:Oe,default:es,disabled:es,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:es,media:Oe,muted:es,poster:Oe,rel:Oe,role:Oe,rowspan:Xs,scope:Oe,sizes:Oe,span:Xs,start:Xs,style:Zf,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),uv=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Qf(){return Qf=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},Qf.apply(this,arguments)}function ep({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let s=o;return r?Yf.default.createElement(s,Qf({className:t},e)):Yf.default.createElement(s,Qf({className:t},e),n)}var Rc=class{attribute(t,n){return n}node(t,n){return n}};function aC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var ao=class{constructor(t,n,r){Cc(this,"greedy",!1),Cc(this,"options",void 0),Cc(this,"propName",void 0),Cc(this,"inverseName",void 0),Cc(this,"factory",void 0),this.options=S({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?Yf.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return aC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Zs=b(Y()),dC=b(cC());function lo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j2=/(url|image|image-set)\(/i,dv=class extends Rc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(j2)&&delete n[r]}),n}},uC=1,W2=3,K2=/^<(!doctype|(html|head|body)(\s|>))/i,G2=/^(aria-|data-|\w+:)/iu,q2=/{{{(\w+)\/?}}}/;function Y2(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var tp=class{constructor(t,n={},r=[],o=[]){var s;lo(this,"allowed",void 0),lo(this,"banned",void 0),lo(this,"blocked",void 0),lo(this,"container",void 0),lo(this,"content",[]),lo(this,"props",void 0),lo(this,"matchers",void 0),lo(this,"filters",void 0),lo(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new dv],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((s=n.allowList)!==null&&s!==void 0?s:lv),this.banned=new Set(av),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,s=t,i=0,a=null;return this.matchers.forEach(l=>{let c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let d="";for(;s&&(a=l.match(s));){let f=a,{index:p,length:v,match:m,valid:x,void:y}=f,g=oe(f,["index","length","match","valid","void"]),h=l.propName+String(i);p>0&&(d+=s.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${m}{{{/${h}}}}`,this.keyIndex+=1,i+=1,r[h]={children:m,matcher:l,props:P(S(S({},o),g),{key:this.keyIndex})}):d+=m,l.greedy?(s=d+s.slice(p+v),d=""):s=s.slice(p+(v||m.length))}l.greedy||(s=d+s)}),i===0?t:this.replaceTokens(s,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,`
68
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ar(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),s=NT(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return n&&(i+=' title="'+Ar(n)+'"'),i+=">"+o+"</a>",i}image({href:t,title:n,text:r}){let o=NT(t);if(o===null)return Ar(r);t=o;let s=`<img src="${t}" alt="${r}"`;return n&&(s+=` title="${Ar(n)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ar(t.text)}},yc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},rr=class e{constructor(t){Te(this,"options");Te(this,"renderer");Te(this,"textRenderer");this.options=t||Ws,this.options.renderer=this.options.renderer||new ma,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new yc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){var o,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
69
+ `+this.renderer.text(c);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(t,n=this.renderer){var o,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=c||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},$s=class{constructor(t){Te(this,"options");Te(this,"block");this.options=t||Ws}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?nr.lex:nr.lexInline}provideParser(){return this.block?rr.parse:rr.parseInline}};Te($s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var vc=class{constructor(...t){Te(this,"defaults",Qy());Te(this,"options",this.setOptions);Te(this,"parse",this.parseMarkdown(!0));Te(this,"parseInline",this.parseMarkdown(!1));Te(this,"Parser",rr);Te(this,"Renderer",ma);Te(this,"TextRenderer",yc);Te(this,"Lexer",nr);Te(this,"Tokenizer",pa);Te(this,"Hooks",$s);this.use(...t)}walkTokens(t,n){var o,s;let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;for(let l of a.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of a.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let a=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o=S({},r);if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=n.renderers[s.name];i?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=n[s.level];i?i.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),o.extensions=n),r.renderer){let s=this.defaults.renderer||new ma(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}o.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new pa(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new $s;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=r.hooks[a],c=s[a];$s.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>c.call(s,f));let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.call(this,a))),l}}this.defaults=S(S({},this.defaults),o)}),this}setOptions(t){return this.defaults=S(S({},this.defaults),t),this}lexer(t,n){return nr.lex(t,n!=null?n:this.defaults)}parser(t,n){return rr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let s=S({},o),i=S(S({},this.defaults),s),a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r=="undefined"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let l=i.hooks?i.hooks.provideLexer():t?nr.lex:nr.lexInline,c=i.hooks?i.hooks.provideParser():t?rr.parse:rr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(r=i.hooks.preprocess(r));let u=l(r,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
70
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Ar(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},js=new vc;function Re(e,t){return js.parse(e,t)}Re.options=Re.setOptions=function(e){return js.setOptions(e),Re.defaults=js.defaults,DT(Re.defaults),Re};Re.getDefaults=Qy;Re.defaults=Ws;Re.use=function(...e){return js.use(...e),Re.defaults=js.defaults,DT(Re.defaults),Re};Re.walkTokens=function(e,t){return js.walkTokens(e,t)};Re.parseInline=js.parseInline;Re.Parser=rr;Re.parser=rr.parse;Re.Renderer=ma;Re.TextRenderer=yc;Re.Lexer=nr;Re.lexer=nr.lex;Re.Tokenizer=pa;Re.Hooks=$s;Re.parse=Re;var EH=Re.options,TH=Re.setOptions,CH=Re.use,kH=Re.walkTokens,RH=Re.parseInline;var PH=rr.parse,AH=nr.lex;var GT=(e,t)=>{let n=[],r=new vc,o=s=>{s.type==="code"&&s.lang===t&&n.push(s.text)};return r.use({walkTokens:o}),r.parse(e),n};var wc="__summarizerAssistant__",qT={cues:[],threads:{},pending:[]},YT=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var Sc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Kf=at("assistants/callToAction"),so=he("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let s=yield t.dispatch(or(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(s.error)throw new Error(s.error.message);if(typeof s.payload!="string")throw Z.warn("Unexpected summary output",s),new Error("Unexpected summary output");return s.payload})),F2=1,Ks=he("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,g,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:s}=t.extra,i=t.getState(),{platformVariables:a}=i.info;n||(n=F2++,r&&r(n));let l=(p=Sc(n)(i))!=null?p:[],c=yield s.getKnowledgeAssistant(e.assistantCode),u=(v=i.conversation.current)==null?void 0:v.externalId,d=(x=(g=i.info)==null?void 0:g.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield s.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=un(f.answer,a)),{threadId:n,question:o,answer:f}})),Gs=he("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,s=t.getState(),{platformVariables:i}=s.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(or(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:un(l.response,i!=null?i:{}),sources:l.sources}}})),VH=at("assistants/extractedTextSuggestions"),or=he("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:s={},expectFormat:i,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(s,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:i,input:s,transcript:d,externalConversationId:u,threadId:a});switch(i){case"text":return un(f,c);case"json-schema:cues":{if(!Array.isArray(f))return[];let v=f.map(x=>P(S({},x),{name:un(x.name,c),response:un(x.response,c)})),g=[];return v.forEach(x=>{let y=GT(x.response,"reply");g.push(...y.map(h=>({text:h,type:"text",source:"assistant",assistantCode:x.code,sourceLabel:x.name})))}),g.length>0&&t.dispatch(kf(g)),v}case"json-schema:knowledge-assist":{let v=f;if(v==="")throw new Error("No output from assistant");return P(S({},v),{answer:un(v.response,c)})}default:return f}})),XT=ke({name:"assistants",initialState:qT,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]}},extraReducers:e=>{e.addCase(or.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&Z.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(or.rejected,(t,n)=>{var o;Z.warn((o=n.error)==null?void 0:o.message);let r=t.pending.indexOf(n.meta.arg.assistantCode);r!==-1&&t.pending.splice(r,1)}).addCase(or.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let o=n.payload,s=o.map(a=>a.code),i=t.cues.filter(a=>!s.includes(a.code));t.cues=[...i,...o];break}}}).addCase(Gs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Ks.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(so.pending,t=>{let n={code:wc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==wc);t.cues=[...r,n]}).addCase(so.rejected,t=>{let n=t.cues.filter(r=>r.code!==wc);t.cues=n}).addCase(so.fulfilled,(t,n)=>{let r={code:wc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(s=>s.code!==wc);t.cues=[...o,r]}).addCase(lt,()=>qT)}}),{removeCueByCode:Gf,resetCues:$H,removeThreadById:ga}=XT.actions,QT=XT.reducer;var z2={data:null,fetchState:"idle"},ZT=e=>e.contentTypes.data,bc=he("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),H2=ke({name:"contentTypes",initialState:z2,reducers:{},extraReducers:e=>{e.addCase(bc.pending,t=>{t.fetchState="loading"}).addCase(bc.rejected,t=>{t.fetchState="error"}).addCase(bc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),JT=H2.reducer;var B2={data:null,fetchState:"idle"},U2=[],qs=e=>e.profile.data,V2=e=>e.profile.data?e.profile.data.uiConfig.widget.types:U2,Tc=$t([V2],e=>e.filter(t=>t.isActive)),eC=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.summarizerAssistantNew)!=null?n:null},tC=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},nC=e=>t=>Tc(t).find(n=>n.type===e),rC=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,qf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},Yf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistant)!=null?n:null},Ec=he("profile/getProfile",(e,t)=>I(void 0,null,function*(){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");return((s=r.profile.data)==null?void 0:s.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),$2=ke({name:"profile",initialState:B2,reducers:{},extraReducers:e=>{e.addCase(Ec.pending,t=>{t.fetchState="loading"}).addCase(Ec.rejected,t=>{t.fetchState="error"}).addCase(Ec.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),oC=$2.reducer;function Ir(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 fo=b(Y());var sC=b(Y()),Xf=b(Oe());var Cn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var io={};pt(io,{enUS:()=>j2,nlNL:()=>W2});var j2={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"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},W2={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"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Jo=b(R()),K2=({src:e,title:t})=>{let n=_("CommandPalette",Cn),[r,o]=(0,sC.useState)("loading"),s=ie(io);return(0,Jo.jsxs)("div",{className:n.image,children:[(0,Jo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Xf.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Jo.jsx)("span",{className:(0,Xf.default)(n.imageSrc,n.imageSrcStatus),children:s("loading")}),r==="error"&&(0,Jo.jsx)("span",{className:(0,Xf.default)(n.imageSrc,n.imageSrcStatus),children:(0,Jo.jsx)(Au,{})}),t&&(0,Jo.jsx)("span",{className:n.imageTitle,children:t})]})},iC=K2;var aC=b(Y()),lC=b(Oe());var Ys=b(R());function sv({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let s=ie(io),i=_("CommandPalette",Cn);return aC.default.Children.count(e)===0?null:(0,Ys.jsxs)("div",{"data-testid":"commandpalette-list",className:i.list,children:[(t||r)&&(0,Ys.jsxs)("div",{className:i.listHeader,children:[t&&(0,Ys.jsx)("h4",{className:i.listHeading,children:t}),r&&o&&(0,Ys.jsx)("button",{onClick:o,className:i.listMoreButton,type:"button",children:s("showAll")})]}),(0,Ys.jsx)("div",{className:(0,lC.default)(i.listWrapper,n==="horizontal"&&i.listHorizontal),children:e})]})}var Hc=b(Oe());var Qf=b(Y());function Cc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ae=1,av=2,lv=4,ct=8,Zf=16,kc=32,sr=64,iv={a:{content:Ae|ct,self:!1,type:Ae|ct|kc|sr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Ae|ct,void:!0},body:{content:Ae|av|lv|ct|Zf|kc|sr},button:{content:ct,type:Ae|ct|kc|sr},caption:{content:Ae,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Ae|kc|sr},dd:{content:Ae,parent:["dl"]},dl:{children:["dt","dd"],type:Ae},dt:{content:Ae,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Ae,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Ae,void:!0},img:{void:!0},li:{content:Ae,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Ae},picture:{children:["source","img"],type:Ae|ct|Zf},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:ct,parent:["ruby","rtc"]},rtc:{content:ct,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:ct,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Ae},tbody:{parent:["table"],children:["tr"]},td:{content:Ae,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Ae,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:Ae},video:{children:["track","source"]},wbr:{type:Ae|ct,void:!0}};function Qs(e){return t=>{iv[t]=S(S({},e),iv[t])}}["address","main","div","figure","p","pre"].forEach(Qs({content:Ae,type:Ae|sr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Qs({content:ct,type:Ae|ct|sr}));["p","pre"].forEach(Qs({content:ct,type:Ae|sr}));["s","small","span","del","ins"].forEach(Qs({content:ct,type:Ae|ct}));["article","aside","footer","header","nav","section","blockquote"].forEach(Qs({content:Ae,type:Ae|av|sr}));["h1","h2","h3","h4","h5","h6"].forEach(Qs({content:ct,type:Ae|lv|sr}));["audio","canvas","iframe","img","video"].forEach(Qs({type:Ae|ct|Zf|sr}));var Pc=Object.freeze(iv),cv=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],uv=Object.keys(Pc).filter(e=>e!=="canvas"&&e!=="iframe"),Me=1,dv=2,Xs=3,es=4,ep=5,tp=Object.freeze({alt:Me,cite:Me,class:Me,colspan:Xs,controls:es,datetime:Me,default:es,disabled:es,dir:Me,height:Me,href:Me,id:Me,kind:Me,label:Me,lang:Me,loading:Me,loop:es,media:Me,muted:es,poster:Me,rel:Me,role:Me,rowspan:Xs,scope:Me,sizes:Me,span:Xs,start:Xs,style:ep,src:Me,srclang:Me,srcset:Me,tabindex:Me,target:Me,title:Me,type:Me,width:Me}),fv=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Jf(){return Jf=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},Jf.apply(this,arguments)}function np({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let s=o;return r?Qf.default.createElement(s,Jf({className:t},e)):Qf.default.createElement(s,Jf({className:t},e),n)}var Rc=class{attribute(t,n){return n}node(t,n){return n}};function cC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var ao=class{constructor(t,n,r){Cc(this,"greedy",!1),Cc(this,"options",void 0),Cc(this,"propName",void 0),Cc(this,"inverseName",void 0),Cc(this,"factory",void 0),this.options=S({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?Qf.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return cC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Zs=b(Y()),pC=b(dC());function lo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y2=/(url|image|image-set)\(/i,pv=class extends Rc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Y2)&&delete n[r]}),n}},fC=1,X2=3,Q2=/^<(!doctype|(html|head|body)(\s|>))/i,Z2=/^(aria-|data-|\w+:)/iu,J2=/{{{(\w+)\/?}}}/;function eD(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var rp=class{constructor(t,n={},r=[],o=[]){var s;lo(this,"allowed",void 0),lo(this,"banned",void 0),lo(this,"blocked",void 0),lo(this,"container",void 0),lo(this,"content",[]),lo(this,"props",void 0),lo(this,"matchers",void 0),lo(this,"filters",void 0),lo(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new pv],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((s=n.allowList)!==null&&s!==void 0?s:uv),this.banned=new Set(cv),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,s=t,i=0,a=null;return this.matchers.forEach(l=>{let c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let d="";for(;s&&(a=l.match(s));){let f=a,{index:p,length:v,match:g,valid:x,void:y}=f,h=oe(f,["index","length","match","valid","void"]),m=l.propName+String(i);p>0&&(d+=s.slice(0,p)),x?(d+=y?`{{{${m}/}}}`:`{{{${m}}}}${g}{{{/${m}}}}`,this.keyIndex+=1,i+=1,r[m]={children:g,matcher:l,props:P(S(S({},o),h),{key:this.keyIndex})}):d+=g,l.greedy?(s=d+s.slice(p+v),d=""):s=s.slice(p+(v||g.length))}l.greedy||(s=d+s)}),i===0?t:this.replaceTokens(s,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,`
71
71
  `);return o=o.replace(/\n{3,}/g,`
72
72
 
73
73
 
74
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||Y2)();if(!o)return;let s=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",i=s==="body"||s==="fragment"?o.body:o.createElement(s);return t.match(K2)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,dC.default)(t):t)),i}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==uC||!t.attributes||([...t.attributes].forEach(s=>{let{name:i,value:a}=s,l=i.toLowerCase(),c=Jf[l]||Jf[i];if(!this.isSafe(t)||!l.match(G2)&&(!n&&(!c||c===cv)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===es?u=!0:c===Xs?u=Number.parseFloat(String(u)):c!==Zf&&(u=String(u)),r[uv[l]||l]=this.applyAttributeFilters(l,u),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,(s,i)=>String(i).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Pc[t]?P(S(S({},n),Pc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&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:s,transform:i,transformOnlyAllowList:a}=this.props,l=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===uC){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let m;if(i&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;m=this.parseNode(v,p);let y=i(v,m,p);if(y===null)return;if(typeof y!="undefined"){l.push(Zs.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(s||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(Zs.default.createElement(ep,P(S({},y),{key:this.keyIndex}),(d=m)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===W2){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,s=null;for(;s=o.match(q2);){let[i,a]=s,l=s.index,c=i.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:d,props:f}=n[a],p;if(c)p=i.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(i.length,v.index),n),f))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function X2(e){var t;let{attributes:n,className:r,containerTagName:o,content:s,emptyContent:i,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new tp(s!=null?s:"",e).parse();p.length>0&&(f=p)}return f||(f=i),d?Zs.default.createElement(Zs.default.Fragment,null,f):Zs.default.createElement(ep,{attributes:n,className:r,tagName:u},f)}function Js(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:s=!1,emptyContent:i=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=s?[]:l,m=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(k=>{k.onBeforeParse&&x.push(k.onBeforeParse.bind(k)),k.onAfterParse&&y.push(k.onAfterParse.bind(k))});let g=x.reduce((k,C)=>C(k,e),r!=null?r:""),h=new tp(g,p,v,m),w=y.reduce((k,C)=>C(k,e),h.parse());return Zs.default.createElement(X2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:i,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var os=b(Y());var Q2=/[.*+?^${}()|[\]\\]/g,Z2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function J2(e){return e.replace(Q2,"\\$&")}function eD(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function tD(e){return e.search(Z2)}function fC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${J2(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function pC(e){return e.replace(Mu,'<mark data-type="placeholder">$1</mark>')}function ha(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function nD(e,t){return e.split("").map((i,a)=>({char:i,index:a})).filter(({char:i,index:a})=>/\s/.test(i)&&a<=t).map(({index:i})=>i).reverse()[0]}function fv(e,t,n={}){if(t){let r=eD(t.toLowerCase(),e.toLowerCase()),o=ha(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=tD(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let i=t.split(Yx).length>3||t.length>30?nD(t.trim(),r):0;return`${`${i>0?"\u2026":""}${ha(e.substring(i,r))}`}<strong>${o}</strong>`}return e}var rD=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Ac(e){return rD.test(e)}function pv(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var np=b(Y()),hC=b(R()),mC=np.default.createContext(void 0);function ts(){let e=np.default.useContext(mC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var gC=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s})=>{let i=np.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s}),[n,t,o]);return(0,hC.jsx)(mC.Provider,{value:i,children:e})};var Or=b(Y());var O=b(Y(),1),Pa=b(Y(),1);function op(){return typeof window!="undefined"}function Lr(e){return yC(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ar(e){var t;return(t=(yC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yC(e){return op()?e instanceof Node||e instanceof Kt(e).Node:!1}function Me(e){return op()?e instanceof Element||e instanceof Kt(e).Element:!1}function Xe(e){return op()?e instanceof HTMLElement||e instanceof Kt(e).HTMLElement:!1}function rp(e){return!op()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot}function ya(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function vC(e){return["table","td","th"].includes(Lr(e))}function Ic(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function sp(e){let t=va(),n=Me(e)?fn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function xC(e){let t=ir(e);for(;Xe(t)&&!lr(t);){if(sp(t))return t;if(Ic(t))return null;t=ir(t)}return null}function va(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lr(e){return["html","body","#document"].includes(Lr(e))}function fn(e){return Kt(e).getComputedStyle(e)}function Lc(e){return Me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ir(e){if(Lr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||rp(e)&&e.host||ar(e);return rp(t)?t.host:t}function wC(e){let t=ir(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&ya(t)?t:wC(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=wC(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Kt(o);if(s){let a=ip(i);return t.concat(i,i.visualViewport||[],ya(o)?o:[],a&&n?kn(a):[])}return t.concat(o,kn(o,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ns(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&rp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function SC(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function gv(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function bC(e){return e.mozInputSource===0&&e.isTrusted?!0:mv()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function EC(e){return oD()?!1:!mv()&&e.width===0&&e.height===0||mv()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function TC(){return/apple/i.test(navigator.vendor)}function mv(){let e=/android/i;return e.test(SC())||e.test(gv())}function oD(){return gv().includes("jsdom/")}function xa(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function CC(e){return"nativeEvent"in e}function kC(e){return e.matches("html,body")}function ht(e){return(e==null?void 0:e.ownerDocument)||document}function ap(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function co(e){return"composedPath"in e?e.composedPath()[0]:e.target}var sD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function hv(e){return Xe(e)&&e.matches(sD)}function lp(e){e.preventDefault(),e.stopPropagation()}function yv(e){return e?e.getAttribute("role")==="combobox"&&hv(e):!1}var wa=Math.min,uo=Math.max,Mc=Math.round,Nc=Math.floor,cr=e=>({x:e,y:e}),iD={left:"right",right:"left",bottom:"top",top:"bottom"},aD={start:"end",end:"start"};function vv(e,t,n){return uo(e,wa(t,n))}function _c(e,t){return typeof e=="function"?e(t):e}function rs(e){return e.split("-")[0]}function Dc(e){return e.split("-")[1]}function xv(e){return e==="x"?"y":"x"}function wv(e){return e==="y"?"height":"width"}function ei(e){return["top","bottom"].includes(rs(e))?"y":"x"}function Sv(e){return xv(ei(e))}function RC(e,t,n){n===void 0&&(n=!1);let r=Dc(e),o=Sv(e),s=wv(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Oc(i)),[i,Oc(i)]}function PC(e){let t=Oc(e);return[cp(e),t,cp(t)]}function cp(e){return e.replace(/start|end/g,t=>aD[t])}function lD(e,t,n){let r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function AC(e,t,n,r){let o=Dc(e),s=lD(rs(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(cp)))),s}function Oc(e){return e.replace(/left|right|bottom|top/g,t=>iD[t])}function cD(e){return S({top:0,right:0,bottom:0,left:0},e)}function IC(e){return typeof e!="number"?cD(e):{top:e,right:e,bottom:e,left:e}}function ti(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var mn=b(R(),1);var uD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],up=uD.join(","),OC=typeof Element=="undefined",Sa=OC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dp=!OC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},fp=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},dD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},fD=function(t,n,r){if(fp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(up));return n&&Sa.call(t,up)&&o.unshift(t),o=o.filter(r),o},pD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!fp(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Sa.call(i,up);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!fp(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var p=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},MC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},NC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||dD(t))&&!MC(t)?0:t.tabIndex},mD=function(t,n){var r=NC(t);return r<0&&n&&!MC(t)?0:r},gD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},_C=function(t){return t.tagName==="INPUT"},hD=function(t){return _C(t)&&t.type==="hidden"},yD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},vD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xD=function(t){if(!t.name)return!0;var n=t.form||dp(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=vD(o,t.form);return!s||s===t},wD=function(t){return _C(t)&&t.type==="radio"},SD=function(t){return wD(t)&&!xD(t)},bD=function(t){var n,r=t&&dp(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=dp(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},LC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},ED=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Sa.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Sa.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=dp(t);if(l&&!l.shadowRoot&&o(l)===!0)return LC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(bD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return LC(t);return!1},TD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Sa.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},CD=function(t,n){return!(n.disabled||fp(n)||hD(n)||ED(n,t)||yD(n)||TD(n))},bv=function(t,n){return!(SD(n)||NC(n)<0||!CD(t,n))},kD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},RD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=mD(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(gD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Fc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=pD([t],n.includeContainer,{filter:bv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:kD}):r=fD(t,n.includeContainer,bv.bind(null,n)),RD(r)};var DC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Sa.call(t,up)===!1?!1:bv(n,t)};var Fv=b($l(),1);function FC(e,t,n){let{reference:r,floating:o}=e,s=ei(t),i=Sv(t),a=wv(i),l=rs(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Dc(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1);break}return p}var zC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=yield i.isRTL==null?void 0:i.isRTL(t),c=yield i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=FC(c,r,l),f=r,p={},v=0;for(let m=0;m<a.length;m++){let{name:x,fn:y}=a[m],{x:g,y:h,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=g!=null?g:u,d=h!=null?h:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=FC(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function Ev(e,t){return I(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=_c(t,e),v=IC(p),x=a[f?d==="floating"?"reference":"floating":d],y=ti(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(x))==null||n?x:x.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,h=yield s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating),w=(yield s.isElement==null?void 0:s.isElement(h))?(yield s.getScale==null?void 0:s.getScale(h))||{x:1,y:1}:{x:1,y:1},E=ti(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:h,strategy:l}):g);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var HC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=n,F=_c(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:x=!0}=F,y=oe(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let g=rs(s),h=ei(l),w=rs(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),k=p||(w||!x?[Oc(l)]:PC(l)),C=m!=="none";!p&&C&&k.push(...AC(l,x,m,E));let A=[l,...k],V=yield Ev(n,y),N=[],L=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&N.push(V[g]),f){let se=RC(s,a,E);N.push(V[se[0]],V[se[1]])}if(L=[...L,{placement:s,overflows:N}],!N.every(se=>se<=0)){var J,X;let se=(((J=i.flip)==null?void 0:J.index)||0)+1,G=A[se];if(G)return{data:{index:se,overflows:L},reset:{placement:G}};let U=(X=L.filter(B=>B.overflows[0]<=0).sort((B,K)=>B.overflows[1]-K.overflows[1])[0])==null?void 0:X.placement;if(!U)switch(v){case"bestFit":{var M;let B=(M=L.filter(K=>{if(C){let $=ei(K.placement);return $===h||$==="y"}return!0}).map(K=>[K.placement,K.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((K,$)=>K[1]-$[1])[0])==null?void 0:M[0];B&&(U=B);break}case"initialPlacement":U=l;break}if(s!==U)return{reset:{placement:U}}}return{}})}}};function PD(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,s=yield r.isRTL==null?void 0:r.isRTL(o.floating),i=rs(n),a=Dc(n),l=ei(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=_c(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var BC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:s,y:i,placement:a,middlewareData:l}=n,c=yield PD(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:P(S({},c),{placement:a})}})}}},UC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:s}=n,y=_c(e,n),{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:h,y:w}=g;return{x:h,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield Ev(n,c),f=ei(rs(s)),p=xv(f),v=u[p],m=u[f];if(i){let g=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[g],E=v-d[h];v=vv(w,v,E)}if(a){let g=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=m+d[g],E=m-d[h];m=vv(w,m,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:m}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:i,[f]:a}}})})}}};function jC(e){let t=fn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Mc(n)!==s||Mc(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Cv(e){return Me(e)?e:e.contextElement}function ba(e){let t=Cv(e);if(!Xe(t))return cr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:s}=jC(t),i=(s?Mc(n.width):n.width)/r,a=(s?Mc(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var AD=cr(0);function WC(e){let t=Kt(e);return!va()||!t.visualViewport?AD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ID(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kt(e)?!1:t}function ni(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Cv(e),i=cr(1);t&&(r?Me(r)&&(i=ba(r)):i=ba(e));let a=ID(s,n,r)?WC(s):cr(0),l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){let f=Kt(s),p=r&&Me(r)?Kt(r):r,v=f,m=ip(v);for(;m&&r&&p!==v;){let x=ba(m),y=m.getBoundingClientRect(),g=fn(m),h=y.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,w=y.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=h,c+=w,v=Kt(m),m=ip(v)}}return ti({width:u,height:d,x:l,y:c})}function kv(e,t){let n=Lc(e).scrollLeft;return t?t.left+n:ni(ar(e)).left+n}function KC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:kv(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function LD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,s=o==="fixed",i=ar(r),a=t?Ic(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=cr(1),u=cr(0),d=Xe(r);if((d||!d&&!s)&&((Lr(r)!=="body"||ya(i))&&(l=Lc(r)),Xe(r))){let p=ni(r);c=ba(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=i&&!d&&!s?KC(i,l,!0):cr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function OD(e){return Array.from(e.getClientRects())}function MD(e){let t=ar(e),n=Lc(e),r=e.ownerDocument.body,o=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+kv(e),a=-n.scrollTop;return fn(r).direction==="rtl"&&(i+=uo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ND(e,t){let n=Kt(e),r=ar(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;let c=va();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function _D(e,t){let n=ni(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?ba(e):cr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function VC(e,t,n){let r;if(t==="viewport")r=ND(e,n);else if(t==="document")r=MD(ar(e));else if(Me(t))r=_D(t,n);else{let o=WC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ti(r)}function GC(e,t){let n=ir(e);return n===t||!Me(n)||lr(n)?!1:fn(n).position==="fixed"||GC(n,t)}function DD(e,t){let n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(a=>Me(a)&&Lr(a)!=="body"),o=null,s=fn(e).position==="fixed",i=s?ir(e):e;for(;Me(i)&&!lr(i);){let a=fn(i),l=sp(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ya(i)&&!l&&GC(e,i))?r=r.filter(u=>u!==i):o=a,i=ir(i)}return t.set(e,r),r}function FD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?Ic(t)?[]:DD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{let d=VC(t,u,o);return c.top=uo(d.top,c.top),c.right=wa(d.right,c.right),c.bottom=wa(d.bottom,c.bottom),c.left=uo(d.left,c.left),c},VC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function zD(e){let{width:t,height:n}=jC(e);return{width:t,height:n}}function HD(e,t,n){let r=Xe(t),o=ar(t),s=n==="fixed",i=ni(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=cr(0);if(r||!r&&!s)if((Lr(t)!=="body"||ya(o))&&(a=Lc(t)),r){let f=ni(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=kv(o));let c=o&&!r&&!s?KC(o,a):cr(0),u=i.left+a.scrollLeft-l.x-c.x,d=i.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Tv(e){return fn(e).position==="static"}function $C(e,t){if(!Xe(e)||fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ar(e)===n&&(n=n.ownerDocument.body),n}function qC(e,t){let n=Kt(e);if(Ic(e))return n;if(!Xe(e)){let o=ir(e);for(;o&&!lr(o);){if(Me(o)&&!Tv(o))return o;o=ir(o)}return n}let r=$C(e,t);for(;r&&vC(r)&&Tv(r);)r=$C(r,t);return r&&lr(r)&&Tv(r)&&!sp(r)?n:r||xC(e)||n}var BD=function(e){return I(this,null,function*(){let t=this.getOffsetParent||qC,n=this.getDimensions,r=yield n(e.floating);return{reference:HD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function UD(e){return fn(e).direction==="rtl"}var Rv={convertOffsetParentRelativeRectToViewportRelativeRect:LD,getDocumentElement:ar,getClippingRect:FD,getOffsetParent:qC,getElementRects:BD,getClientRects:OD,getDimensions:zD,getScale:ba,isElement:Me,isRTL:UD};function YC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VD(e,t){let n=null,r,o=ar(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Nc(d),m=Nc(o.clientWidth-(u+f)),x=Nc(o.clientHeight-(d+p)),y=Nc(u),h={rootMargin:-v+"px "+-m+"px "+-x+"px "+-y+"px",threshold:uo(0,wa(1,l))||1},w=!0;function E(k){let C=k[0].intersectionRatio;if(C!==l){if(!w)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!YC(c,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(E,h)}n.observe(e)}return i(!0),s}function pp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Cv(e),u=o||s?[...c?kn(c):[],...kn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});let d=c&&a?VD(c,n):null,f=-1,p=null;i&&(p=new ResizeObserver(y=>{let[g]=y;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,m=l?ni(e):null;l&&x();function x(){let y=ni(e);m&&!YC(m,y)&&n(),m=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var XC=BC;var QC=UC,ZC=HC;var mp=(e,t,n)=>{let r=new Map,o=S({platform:Rv},n),s=P(S({},o.platform),{_c:r});return zC(e,t,P(S({},o),{platform:s}))};var nt=b(Y(),1),yp=b(Y(),1),tk=b($l(),1);var gp=typeof document!="undefined"?yp.useLayoutEffect:yp.useEffect;function hp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!hp(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function nk(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JC(e,t){let n=nk(e);return Math.round(t*n)/n}function Pv(e){let t=nt.useRef(e);return gp(()=>{t.current=e}),t}function rk(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);hp(f,r)||p(r);let[v,m]=nt.useState(null),[x,y]=nt.useState(null),g=nt.useCallback(U=>{U!==k.current&&(k.current=U,m(U))},[]),h=nt.useCallback(U=>{U!==C.current&&(C.current=U,y(U))},[]),w=s||v,E=i||x,k=nt.useRef(null),C=nt.useRef(null),A=nt.useRef(u),V=l!=null,N=Pv(l),L=Pv(o),J=Pv(c),X=nt.useCallback(()=>{if(!k.current||!C.current)return;let U={placement:t,strategy:n,middleware:f};L.current&&(U.platform=L.current),mp(k.current,C.current,U).then(B=>{let K=P(S({},B),{isPositioned:J.current!==!1});M.current&&!hp(A.current,K)&&(A.current=K,tk.flushSync(()=>{d(K)}))})},[f,t,n,L,J]);gp(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(U=>P(S({},U),{isPositioned:!1})))},[c]);let M=nt.useRef(!1);gp(()=>(M.current=!0,()=>{M.current=!1}),[]),gp(()=>{if(w&&(k.current=w),E&&(C.current=E),w&&E){if(N.current)return N.current(w,E,X);X()}},[w,E,X,N,V]);let F=nt.useMemo(()=>({reference:k,floating:C,setReference:g,setFloating:h}),[g,h]),se=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),G=nt.useMemo(()=>{let U={position:n,left:0,top:0};if(!se.floating)return U;let B=JC(se.floating,u.x),K=JC(se.floating,u.y);return a?S(P(S({},U),{transform:"translate("+B+"px, "+K+"px)"}),nk(se.floating)>=1.5&&{willChange:"transform"}):{position:n,left:B,top:K}},[n,a,se.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:X,refs:F,elements:se,floatingStyles:G}),[u,X,F,se,G])}var vp=(e,t)=>P(S({},XC(e)),{options:[e,t]}),Av=(e,t)=>P(S({},QC(e)),{options:[e,t]});var Iv=(e,t)=>P(S({},ZC(e)),{options:[e,t]});function zv(e){let t=O.useRef(void 0),n=O.useCallback(r=>{let o=e.map(s=>{if(s!=null){if(typeof s=="function"){let i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return O.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var xk=S({},O),$D=xk.useInsertionEffect,jD=$D||(e=>e());function Rn(e){let t=O.useRef(()=>{});return jD(()=>{t.current=e}),O.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var WD="ArrowUp",KD="ArrowDown",GD="ArrowLeft",qD="ArrowRight";var pn=typeof document!="undefined"?Pa.useLayoutEffect:Pa.useEffect;var YD=[GD,qD],XD=[WD,KD],fB=[...YD,...XD];var ok=!1,QD=0,sk=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+QD++;function ZD(){let[e,t]=O.useState(()=>ok?sk():void 0);return pn(()=>{e==null&&t(sk())},[]),O.useEffect(()=>{ok=!0},[]),e}var JD=xk.useId,Hv=JD||ZD;function e3(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var t3=O.createContext(null),n3=O.createContext(null),Bv=()=>{var e;return((e=O.useContext(t3))==null?void 0:e.id)||null},bp=()=>O.useContext(n3);function Ra(e){return"data-floating-ui-"+e}function ur(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Ca(e){let t=(0,Pa.useRef)(e);return pn(()=>{t.current=e}),t}var ik=Ra("safe-polygon");function Lv(e,t,n){return n&&!xa(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function wk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=bp(),v=Bv(),m=Ca(c),x=Ca(l),y=Ca(n),g=O.useRef(),h=O.useRef(-1),w=O.useRef(),E=O.useRef(-1),k=O.useRef(!0),C=O.useRef(!1),A=O.useRef(()=>{}),V=O.useRef(!1),N=O.useCallback(()=>{var G;let U=(G=o.current.openEvent)==null?void 0:G.type;return(U==null?void 0:U.includes("mouse"))&&U!=="mousedown"},[o]);O.useEffect(()=>{if(!a)return;function G(U){let{open:B}=U;B||(ur(h),ur(E),k.current=!0,V.current=!1)}return s.on("openchange",G),()=>{s.off("openchange",G)}},[a,s]),O.useEffect(()=>{if(!a||!m.current||!n)return;function G(B){N()&&r(!1,B,"hover")}let U=ht(i.floating).documentElement;return U.addEventListener("mouseleave",G),()=>{U.removeEventListener("mouseleave",G)}},[i.floating,n,r,a,m,N]);let L=O.useCallback(function(G,U,B){U===void 0&&(U=!0),B===void 0&&(B="hover");let K=Lv(x.current,"close",g.current);K&&!w.current?(ur(h),h.current=window.setTimeout(()=>r(!1,G,B),K)):U&&(ur(h),r(!1,G,B))},[x,r]),J=Rn(()=>{A.current(),w.current=void 0}),X=Rn(()=>{if(C.current){let G=ht(i.floating).body;G.style.pointerEvents="",G.removeAttribute(ik),C.current=!1}}),M=Rn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);O.useEffect(()=>{if(!a)return;function G($){if(ur(h),k.current=!1,u&&!xa(g.current)||d>0&&!Lv(x.current,"open"))return;let W=Lv(x.current,"open",g.current);W?h.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},W):n||r(!0,$,"hover")}function U($){if(M())return;A.current();let W=ht(i.floating);if(ur(E),V.current=!1,m.current&&o.current.floatingContext){n||ur(h),w.current=m.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){X(),J(),M()||L($,!0,"safe-polygon")}}));let fe=w.current;W.addEventListener("mousemove",fe),A.current=()=>{W.removeEventListener("mousemove",fe)};return}(g.current==="touch"?!gt(i.floating,$.relatedTarget):!0)&&L($)}function B($){M()||o.current.floatingContext&&(m.current==null||m.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){X(),J(),M()||L($)}}))($))}if(Me(i.domReference)){var K;let $=i.domReference;return n&&$.addEventListener("mouseleave",B),(K=i.floating)==null||K.addEventListener("mouseleave",B),f&&$.addEventListener("mousemove",G,{once:!0}),$.addEventListener("mouseenter",G),$.addEventListener("mouseleave",U),()=>{var W;n&&$.removeEventListener("mouseleave",B),(W=i.floating)==null||W.removeEventListener("mouseleave",B),f&&$.removeEventListener("mousemove",G),$.removeEventListener("mouseenter",G),$.removeEventListener("mouseleave",U)}}},[i,a,e,u,d,f,L,J,X,r,n,y,p,x,m,o,M]),pn(()=>{var G;if(a&&n&&(G=m.current)!=null&&G.__options.blockPointerEvents&&N()){C.current=!0;let B=i.floating;if(Me(i.domReference)&&B){var U;let K=ht(i.floating).body;K.setAttribute(ik,"");let $=i.domReference,W=p==null||(U=p.nodesRef.current.find(z=>z.id===v))==null||(U=U.context)==null?void 0:U.elements.floating;return W&&(W.style.pointerEvents=""),K.style.pointerEvents="none",$.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{K.style.pointerEvents="",$.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,v,i,p,m,N]),pn(()=>{n||(g.current=void 0,V.current=!1,J(),X())},[n,J,X]),O.useEffect(()=>()=>{J(),ur(h),ur(E),X()},[a,i.domReference,J,X]);let F=O.useMemo(()=>{function G(U){g.current=U.pointerType}return{onPointerDown:G,onPointerEnter:G,onMouseMove(U){let{nativeEvent:B}=U;function K(){!k.current&&!y.current&&r(!0,B,"hover")}u&&!xa(g.current)||n||d===0||V.current&&Am(U.movementX,2)+Am(U.movementY,2)<2||(ur(E),g.current==="touch"?K():(V.current=!0,E.current=window.setTimeout(K,d)))}}},[u,r,n,y,d]),se=O.useMemo(()=>({onMouseEnter(){ur(h)},onMouseLeave(G){M()||L(G.nativeEvent,!1)}}),[L,M]);return O.useMemo(()=>a?{reference:F,floating:se}:{},[a,F,se])}var ak=0;function Ea(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ak);let s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():ak=requestAnimationFrame(s)}function lk(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){let s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function ka(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var Ta=new WeakMap,xp=new WeakSet,wp={},Ov=0,r3=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,Sk=e=>e&&(e.host||Sk(e.parentNode)),o3=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=Sk(n);return e.contains(r)?r:null}).filter(n=>n!=null);function s3(e,t,n,r){let o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=o3(t,e),a=new Set,l=new Set(i),c=[];wp[o]||(wp[o]=new WeakMap);let u=wp[o];i.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Lr(v)!=="script")if(a.has(v))f(v);else{let m=s?v.getAttribute(s):null,x=m!==null&&m!=="false",y=Ta.get(v)||0,g=s?y+1:y,h=(u.get(v)||0)+1;Ta.set(v,g),u.set(v,h),c.push(v),g===1&&x&&xp.add(v),h===1&&v.setAttribute(o,""),!x&&s&&v.setAttribute(s,s==="inert"?"":"true")}})}return Ov++,()=>{c.forEach(p=>{let v=Ta.get(p)||0,m=s?v-1:v,x=(u.get(p)||0)-1;Ta.set(p,m),u.set(p,x),m||(!xp.has(p)&&s&&p.removeAttribute(s),xp.delete(p)),x||p.removeAttribute(o)}),Ov--,Ov||(Ta=new WeakMap,Ta=new WeakMap,xp=new WeakSet,wp={})}}function ck(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=ht(e[0]).body;return s3(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var Ep=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function bk(e,t){let n=Fc(e,Ep());t==="prev"&&n.reverse();let r=n.indexOf(ns(ht(e)));return n.slice(r+1)[0]}function Ek(e){return bk(ht(e).body,"next")||e}function Tk(e){return bk(ht(e).body,"prev")||e}function zc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function i3(e){Fc(e,Ep()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function uk(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var Tp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Sp=O.forwardRef(function(t,n){let[r,o]=O.useState();pn(()=>{TC()&&o("button")},[]);let s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ra("focus-guard")]:"",style:Tp};return(0,mn.jsx)("span",S(S({},t),s))}),Ck=O.createContext(null),dk=Ra("portal");function a3(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Hv(),o=Rk(),[s,i]=O.useState(null),a=O.useRef(null);return pn(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),pn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(dk,""),l.appendChild(c),a.current=c,i(c)},[t,r]),pn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Me(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(dk,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function kk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=a3({id:n,root:r}),[i,a]=O.useState(null),l=O.useRef(null),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,v=!!i&&!i.modal&&i.open&&o&&!!(r||s);return O.useEffect(()=>{if(!s||!o||f)return;function m(x){s&&zc(x)&&(x.type==="focusin"?uk:i3)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,f]),O.useEffect(()=>{s&&(p||uk(s))},[p,s]),(0,mn.jsxs)(Ck.Provider,{value:O.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s]),children:[v&&s&&(0,mn.jsx)(Sp,{"data-type":"outside",ref:l,onFocus:m=>{if(zc(m,s)){var x;(x=u.current)==null||x.focus()}else{let y=i?i.domReference:null,g=Tk(y);g==null||g.focus()}}}),v&&s&&(0,mn.jsx)("span",{"aria-owns":s.id,style:Tp}),s&&Fv.createPortal(t,s),v&&s&&(0,mn.jsx)(Sp,{"data-type":"outside",ref:c,onFocus:m=>{if(zc(m,s)){var x;(x=d.current)==null||x.focus()}else{let y=i?i.domReference:null,g=Ek(y);g==null||g.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}var Rk=()=>O.useContext(Ck),Dv="data-floating-ui-focusable";function fk(e){return e?e.hasAttribute(Dv)?e:e.querySelector("["+Dv+"]")||e:null}function pk(e){return O.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var l3=20,ri=[];function c3(e){ri=ri.filter(t=>t.isConnected),e&&Lr(e)!=="body"&&(ri.push(e),ri.length>l3&&(ri=ri.slice(-20)))}function mk(){return ri.slice().reverse().find(e=>e.isConnected)}function u3(e){let t=Ep();return DC(e,t)?e:Fc(e,t)[0]||e}var d3=O.forwardRef(function(t,n){return(0,mn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:Tp}))});function Pk(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:m,events:x,dataRef:y,elements:{domReference:g,floating:h}}=t,w=Rn(()=>{var ie;return(ie=y.current.floatingContext)==null?void 0:ie.nodeId}),E=Rn(p),k=typeof i=="number"&&i<0,C=yv(g)&&k,A=r3(),V=A?s:!0,N=!V||A&&f,L=Ca(o),J=Ca(i),X=Ca(a),M=bp(),F=Rk(),se=O.useRef(null),G=O.useRef(null),U=O.useRef(!1),B=O.useRef(!1),K=O.useRef(-1),$=F!=null,W=fk(h),z=Rn(function(ie){return ie===void 0&&(ie=W),ie?Fc(ie,Ep()):[]}),fe=Rn(ie=>{let Q=z(ie);return L.current.map(ae=>g&&ae==="reference"?g:W&&ae==="floating"?W:Q).filter(Boolean).flat()});O.useEffect(()=>{if(r||!c)return;function ie(ae){if(ae.key==="Tab"){gt(W,ns(ht(W)))&&z().length===0&&!C&&lp(ae);let pe=fe(),je=co(ae);L.current[0]==="reference"&&je===g&&(lp(ae),ae.shiftKey?Ea(pe[pe.length-1]):Ea(pe[1])),L.current[1]==="floating"&&je===W&&ae.shiftKey&&(lp(ae),Ea(pe[0]))}}let Q=ht(W);return Q.addEventListener("keydown",ie),()=>{Q.removeEventListener("keydown",ie)}},[r,g,W,c,L,C,z,fe]),O.useEffect(()=>{if(r||!h)return;function ie(Q){let ae=co(Q),je=z().indexOf(ae);je!==-1&&(K.current=je)}return h.addEventListener("focusin",ie),()=>{h.removeEventListener("focusin",ie)}},[r,h,z]),O.useEffect(()=>{if(r||!d)return;function ie(){B.current=!0,setTimeout(()=>{B.current=!1})}function Q(ae){let pe=ae.relatedTarget;queueMicrotask(()=>{let je=w(),vt=!(gt(g,pe)||gt(h,pe)||gt(pe,h)||gt(F==null?void 0:F.portalNode,pe)||pe!=null&&pe.hasAttribute(Ra("focus-guard"))||M&&(ka(M.nodesRef.current,je).find(Qe=>{var He,Ze;return gt((He=Qe.context)==null?void 0:He.elements.floating,pe)||gt((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||lk(M.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,fk((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&vt&&ns(ht(W))===ht(W).body){Xe(W)&&W.focus();let Qe=K.current,He=z(),Ze=He[Qe]||He[He.length-1]||W;Xe(Ze)&&Ze.focus()}(C||!c)&&pe&&vt&&!B.current&&pe!==mk()&&(U.current=!0,m(!1,ae,"focus-out"))})}if(h&&Xe(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",ie),h.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",ie),h.removeEventListener("focusout",Q)}},[r,g,h,W,c,M,F,m,d,l,z,C,w]);let de=O.useRef(null),be=O.useRef(null),me=pk([de,F==null?void 0:F.beforeInsideRef]),re=pk([be,F==null?void 0:F.afterInsideRef]);O.useEffect(()=>{var ie,Q;if(r||!h)return;let ae=Array.from((F==null||(ie=F.portalNode)==null?void 0:ie.querySelectorAll("["+Ra("portal")+"]"))||[]),pe=M?lk(M.nodesRef.current,w()):[],je=M&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],vt=(Q=pe.find(Ze=>{var dt;return yv(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(Q=Q.context)==null?void 0:Q.elements.domReference,Qe=[h,vt,...ae,...je,...E(),se.current,G.current,de.current,be.current,F==null?void 0:F.beforeOutsideRef.current,F==null?void 0:F.afterOutsideRef.current,L.current.includes("reference")||C?g:null].filter(Ze=>Ze!=null),He=c||C?ck(Qe,!N,N):ck(Qe);return()=>{He()}},[r,g,h,c,L,F,C,V,N,M,w,E]),pn(()=>{if(r||!Xe(W))return;let ie=ht(W),Q=ns(ie);queueMicrotask(()=>{let ae=fe(W),pe=J.current,je=(typeof pe=="number"?ae[pe]:pe.current)||W,vt=gt(W,Q);!k&&!vt&&v&&Ea(je,{preventScroll:je===W})})},[r,v,W,k,fe,J]),pn(()=>{if(r||!W)return;let ie=!1,Q=!1,ae=ht(W),pe=ns(ae),vt=y.current.openEvent;c3(pe);function Qe(dt){let{open:gs,reason:hs,event:en,nested:yr}=dt;if(gs&&(vt=en),hs==="escape-key"&&(Q=!0),["hover","safe-polygon"].includes(hs)&&en.type==="mouseleave"&&(U.current=!0),hs==="outside-press")if(yr)U.current=!1,ie=!0;else if(bC(en)||EC(en))U.current=!1;else{let Br=!1;document.createElement("div").focus({get preventScroll(){return Br=!0,!1}}),Br?(U.current=!1,ie=!0):U.current=!0}}x.on("openchange",Qe);let He=ae.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,Tp),$&&g&&g.insertAdjacentElement("afterend",He);function Ze(){return typeof X.current=="boolean"?Q&&g?g:mk()||He:X.current.current||He}return()=>{x.off("openchange",Qe);let dt=ns(ae),gs=gt(h,dt)||M&&ka(M.nodesRef.current,w()).some(en=>{var yr;return gt((yr=en.context)==null?void 0:yr.elements.floating,dt)});(gs||vt&&["click","mousedown"].includes(vt.type))&&(Q=!0);let hs=Ze();queueMicrotask(()=>{let en=u3(hs);X.current&&!U.current&&Xe(en)&&(!(en!==dt&&dt!==ae.body)||gs)&&en.focus({preventScroll:ie}),He.remove()})}},[r,h,W,X,y,x,M,$,g,w]),O.useEffect(()=>{queueMicrotask(()=>{U.current=!1})},[r]),pn(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:m,domReference:g}),()=>{F.setFocusManagerState(null)}},[r,F,c,v,m,d,g]),pn(()=>{if(r||!W||typeof MutationObserver!="function"||k)return;let ie=()=>{let ae=W.getAttribute("tabindex"),pe=z(),je=ns(ht(h)),vt=pe.indexOf(je);vt!==-1&&(K.current=vt),L.current.includes("floating")||je!==g&&pe.length===0?ae!=="0"&&W.setAttribute("tabindex","0"):ae!=="-1"&&W.setAttribute("tabindex","-1")};ie();let Q=new MutationObserver(ie);return Q.observe(W,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}},[r,h,W,g,L,z,k]);function Ce(ie){return r||!u||!c?null:(0,mn.jsx)(d3,{ref:ie==="start"?se:G,onClick:Q=>m(!1,Q.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let rt=!r&&V&&(c?!C:!0)&&($||c);return(0,mn.jsxs)(mn.Fragment,{children:[rt&&(0,mn.jsx)(Sp,{"data-type":"inside",ref:me,onFocus:ie=>{if(c){let ae=fe();Ea(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(U.current=!1,zc(ie,F.portalNode)){let ae=Ek(g);ae==null||ae.focus()}else{var Q;(Q=F.beforeOutsideRef.current)==null||Q.focus()}}}),!C&&Ce("start"),n,Ce("end"),rt&&(0,mn.jsx)(Sp,{"data-type":"inside",ref:re,onFocus:ie=>{if(c)Ea(fe()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(U.current=!0),zc(ie,F.portalNode)){let ae=Tk(g);ae==null||ae.focus()}else{var Q;(Q=F.afterOutsideRef.current)==null||Q.focus()}}})]})}function gk(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function f3(e){return Xe(e.target)&&e.target.tagName==="A"}function hk(e){return hv(e)}function Ak(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=O.useRef(),p=O.useRef(!1),v=O.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let x=f.current;m.button===0&&a!=="click"&&(xa(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}xa(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||gk(m))&&(m.key===" "&&!hk(s)&&(m.preventDefault(),p.current=!0),!f3(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||gk(m)||hk(s)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,d,l]);return O.useMemo(()=>i?{reference:v}:{},[i,v])}var p3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},m3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},yk=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Ik(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,m=bp(),x=Rn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,g=O.useRef(!1),h=O.useRef(!1),{escapeKey:w,outsidePress:E}=yk(p),{escapeKey:k,outsidePress:C}=yk(v),A=O.useRef(!1),V=Rn(F=>{var se;if(!n||!i||!a||F.key!=="Escape"||A.current)return;let G=(se=s.current.floatingContext)==null?void 0:se.nodeId,U=m?ka(m.nodesRef.current,G):[];if(!w&&(F.stopPropagation(),U.length>0)){let B=!0;if(U.forEach(K=>{var $;if(($=K.context)!=null&&$.open&&!K.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,CC(F)?F.nativeEvent:F,"escape-key")}),N=Rn(F=>{var se;let G=()=>{var U;V(F),(U=co(F))==null||U.removeEventListener("keydown",G)};(se=co(F))==null||se.addEventListener("keydown",G)}),L=Rn(F=>{var se;let G=g.current;g.current=!1;let U=h.current;if(h.current=!1,c==="click"&&U||G||typeof y=="function"&&!y(F))return;let B=co(F),K="["+Ra("inert")+"]",$=ht(o.floating).querySelectorAll(K),W=Me(B)?B:null;for(;W&&!lr(W);){let be=ir(W);if(lr(be)||!Me(be))break;W=be}if($.length&&Me(B)&&!kC(B)&&!gt(B,o.floating)&&Array.from($).every(be=>!gt(W,be)))return;if(Xe(B)&&M){let be=lr(B),me=fn(B),re=/auto|scroll/,Ce=be||re.test(me.overflowX),rt=be||re.test(me.overflowY),ie=Ce&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,Q=rt&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,ae=me.direction==="rtl",pe=Q&&(ae?F.offsetX<=B.offsetWidth-B.clientWidth:F.offsetX>B.clientWidth),je=ie&&F.offsetY>B.clientHeight;if(pe||je)return}let z=(se=s.current.floatingContext)==null?void 0:se.nodeId,fe=m&&ka(m.nodesRef.current,z).some(be=>{var me;return ap(F,(me=be.context)==null?void 0:me.elements.floating)});if(ap(F,o.floating)||ap(F,o.domReference)||fe)return;let de=m?ka(m.nodesRef.current,z):[];if(de.length>0){let be=!0;if(de.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){be=!1;return}}),!be)return}r(!1,F,"outside-press")}),J=Rn(F=>{var se;let G=()=>{var U;L(F),(U=co(F))==null||U.removeEventListener(c,G)};(se=co(F))==null||se.addEventListener(c,G)});O.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let F=-1;function se($){r(!1,$,"ancestor-scroll")}function G(){window.clearTimeout(F),A.current=!0}function U(){F=window.setTimeout(()=>{A.current=!1},va()?5:0)}let B=ht(o.floating);a&&(B.addEventListener("keydown",k?N:V,k),B.addEventListener("compositionstart",G),B.addEventListener("compositionend",U)),y&&B.addEventListener(c,C?J:L,C);let K=[];return f&&(Me(o.domReference)&&(K=kn(o.domReference)),Me(o.floating)&&(K=K.concat(kn(o.floating))),!Me(o.reference)&&o.reference&&o.reference.contextElement&&(K=K.concat(kn(o.reference.contextElement)))),K=K.filter($=>{var W;return $!==((W=B.defaultView)==null?void 0:W.visualViewport)}),K.forEach($=>{$.addEventListener("scroll",se,{passive:!0})}),()=>{a&&(B.removeEventListener("keydown",k?N:V,k),B.removeEventListener("compositionstart",G),B.removeEventListener("compositionend",U)),y&&B.removeEventListener(c,C?J:L,C),K.forEach($=>{$.removeEventListener("scroll",se)}),window.clearTimeout(F)}},[s,o,a,y,c,n,r,f,i,w,E,V,k,N,L,C,J]),O.useEffect(()=>{g.current=!1},[y,c]);let X=O.useMemo(()=>S({onKeyDown:V},u&&S({[p3[d]]:F=>{r(!1,F.nativeEvent,"reference-press")}},d!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}})),[V,r,u,d]),M=O.useMemo(()=>({onKeyDown:V,onMouseDown(){h.current=!0},onMouseUp(){h.current=!0},[m3[c]]:()=>{g.current=!0}}),[V,c]);return O.useMemo(()=>i?{reference:X,floating:M}:{},[i,X,M])}function g3(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=Hv(),s=O.useRef({}),[i]=O.useState(()=>e3()),a=Bv()!=null,[l,c]=O.useState(r.reference),u=Rn((p,v,m)=>{s.current.openEvent=p?v:void 0,i.emit("openchange",{open:p,event:v,reason:m,nested:a}),n==null||n(p,v,m)}),d=O.useMemo(()=>({setPositionReference:c}),[]),f=O.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return O.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Lk(e){e===void 0&&(e={});let{nodeId:t}=e,n=g3(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[s,i]=O.useState(null),[a,l]=O.useState(null),u=(o==null?void 0:o.domReference)||s,d=O.useRef(null),f=bp();pn(()=>{u&&(d.current=u)},[u]);let p=rk(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=O.useCallback(h=>{let w=Me(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;l(w),p.refs.setReference(w)},[p.refs]),m=O.useCallback(h=>{(Me(h)||h===null)&&(d.current=h,i(h)),(Me(p.refs.reference.current)||p.refs.reference.current===null||h!==null&&!Me(h))&&p.refs.setReference(h)},[p.refs]),x=O.useMemo(()=>P(S({},p.refs),{setReference:m,setPositionReference:v,domReference:d}),[p.refs,m,v]),y=O.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),g=O.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return pn(()=>{r.dataRef.current.floatingContext=g;let h=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);h&&(h.context=g)}),O.useMemo(()=>P(S({},p),{context:g,refs:x,elements:y}),[p,x,y,g])}var Mv="active",Nv="selected";function _v(e,t,n){let r=new Map,o=n==="item",s=e;if(o&&e){let i=e,{[Mv]:a,[Nv]:l}=i;s=oe(i,[Im(Mv),Im(Nv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[Dv]:""}),s),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(o&&[Mv,Nv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,m=new Array(v),x=0;x<v;x++)m[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...m)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function Ok(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=O.useCallback(a=>_v(a,e,"reference"),t),s=O.useCallback(a=>_v(a,e,"floating"),n),i=O.useCallback(a=>_v(a,e,"item"),r);return O.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}var h3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Mk(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=h3.get(i))!=null?n:i,l=Hv(),u=Bv()!=null,d=O.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0},a==="listbox"&&{role:"combobox"}),a==="menu"&&{id:l}),a==="menu"&&u&&{role:"menuitem"}),i==="select"&&{"aria-autocomplete":"none"}),i==="combobox"&&{"aria-autocomplete":"list"}),[a,o,u,r,l,i]),f=O.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||i==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,i]),p=O.useCallback(v=>{let{active:m,selected:x}=v,y=S({role:"option"},m&&{id:o+"-option"});switch(i){case"select":return P(S({},y),{"aria-selected":m&&x});case"combobox":return S(S({},y),m&&{"aria-selected":!0})}return{}},[o,i]);return O.useMemo(()=>s?{reference:d,floating:f,item:p}:{},[s,d,f,p])}function vk(e,t){let[n,r]=e,o=!1,s=t.length;for(let i=0,a=s-1;i<s;a=i++){let[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function y3(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Nk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,s=!1,i=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(i===null||a===null||v===0)return i=d,a=f,l=p,null;let m=d-i,x=f-a,g=Math.sqrt(m*m+x*x)/v;return i=d,a=f,l=p,g}let u=d=>{let{x:f,y:p,placement:v,elements:m,onClose:x,nodeId:y,tree:g}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!m.domReference||!m.floating||v==null||f==null||p==null)return;let{clientX:k,clientY:C}=w,A=[k,C],V=co(w),N=w.type==="mouseleave",L=gt(m.floating,V),J=gt(m.domReference,V),X=m.domReference.getBoundingClientRect(),M=m.floating.getBoundingClientRect(),F=v.split("-")[0],se=f>M.right-M.width/2,G=p>M.bottom-M.height/2,U=y3(A,X),B=M.width>X.width,K=M.height>X.height,$=(B?X:M).left,W=(B?X:M).right,z=(K?X:M).top,fe=(K?X:M).bottom;if(L&&(s=!0,!N))return;if(J&&(s=!1),J&&!N){s=!0;return}if(N&&Me(w.relatedTarget)&&gt(m.floating,w.relatedTarget)||g&&ka(g.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(F==="top"&&p>=X.bottom-1||F==="bottom"&&p<=X.top+1||F==="left"&&f>=X.right-1||F==="right"&&f<=X.left+1)return E();let de=[];switch(F){case"top":de=[[$,X.top+1],[$,M.bottom-1],[W,M.bottom-1],[W,X.top+1]];break;case"bottom":de=[[$,M.top+1],[$,X.bottom-1],[W,X.bottom-1],[W,M.top+1]];break;case"left":de=[[M.right-1,fe],[M.right-1,z],[X.left+1,z],[X.left+1,fe]];break;case"right":de=[[X.right-1,fe],[X.right-1,z],[M.left+1,z],[M.left+1,fe]];break}function be(me){let[re,Ce]=me;switch(F){case"top":{let rt=[B?re+t/2:se?re+t*4:re-t*4,Ce+t+1],ie=[B?re-t/2:se?re+t*4:re-t*4,Ce+t+1],Q=[[M.left,se||B?M.bottom-t:M.top],[M.right,se?B?M.bottom-t:M.top:M.bottom-t]];return[rt,ie,...Q]}case"bottom":{let rt=[B?re+t/2:se?re+t*4:re-t*4,Ce-t],ie=[B?re-t/2:se?re+t*4:re-t*4,Ce-t],Q=[[M.left,se||B?M.top+t:M.bottom],[M.right,se?B?M.top+t:M.bottom:M.top+t]];return[rt,ie,...Q]}case"left":{let rt=[re+t+1,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ie=[re+t+1,K?Ce-t/2:G?Ce+t*4:Ce-t*4];return[...[[G||K?M.right-t:M.left,M.top],[G?K?M.right-t:M.left:M.right-t,M.bottom]],rt,ie]}case"right":{let rt=[re-t,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ie=[re-t,K?Ce-t/2:G?Ce+t*4:Ce-t*4],Q=[[G||K?M.left+t:M.right,M.top],[G?K?M.left+t:M.right:M.left+t,M.bottom]];return[rt,ie,...Q]}}}if(!vk([k,C],de)){if(s&&!U)return E();if(!N&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}vk([k,C],be([f,p]))?!s&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var Cp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function v3({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:s}={}){let[i,a]=Or.useState(e),l=o!=null?o:i,c=s!=null?s:a,u=Lk({placement:t,open:l,onOpenChange:c,whileElementsMounted:pp,middleware:[vp(5),Iv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),Av({padding:10})]}),d=u.context,f=Ak(d,{enabled:o==null}),p=Ik(d),v=Mk(d),m=wk(d,{enabled:r!=null?r:!1,handleClose:Nk()}),x=Ok([f,p,v,m]);return Or.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var _k=Or.createContext(null),Uv=()=>{let e=Or.useContext(_k);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},oi=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let s=v3(S({modal:t},n));return(0,Hn.jsx)(_k.Provider,{value:s,children:e})};function x3(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let s=Uv(),i=e||"button",a=t.ref,l=zv([s.refs.setReference,a]);return(0,Hn.jsx)(i,P(S({ref:l,type:"button"},s.getReferenceProps(n)),{children:t}))}var w3=Or.forwardRef(function(o,r){var s=o,{style:t}=s,n=oe(s,["style"]);let c=Uv(),{context:i}=c,a=oe(c,["context"]),l=zv([a.refs.setFloating,r]);return i.open?(0,Hn.jsx)(kk,{children:(0,Hn.jsx)(Pk,{context:i,modal:a.modal,disabled:n.disableFocusManager,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function S3(o){var s=o,{as:e,children:t,onClick:n}=s,r=oe(s,["as","children","onClick"]);let{setOpen:i}=Uv();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),i(!1),c.stopPropagation()}},r),{children:t}))}function Dk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(oi,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(oi.Content,{className:Cp.tooltip,children:[t,(0,Hn.jsx)("div",{className:Cp.arrow})]}),(0,Hn.jsx)(oi.Trigger,{className:Cp.tooltipTrigger,children:e})]})}oi.Trigger=x3;oi.Content=w3;oi.Button=S3;var yt=oi;var Gt=b(R()),b3=3,E3=90,Fk=({children:e})=>{let t=_("CommandPalette",Cn);return(0,Gt.jsx)("div",{className:t.listItemActions,children:e})};function Vv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:s,onSourceClick:i,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:d=b3}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var N;let m=ce(io),[x,y]=(0,os.useState)(!1),{selected:g,onChangeOpen:h}=ts(),[w,E]=(0,os.useState)(!1),k=_("CommandPalette",Cn);function C(L){o(L),e&&h(!1)}let A=(0,os.useMemo)(()=>typeof a!="string"?a:Ac(a)?pv(a).trim():a,[a]),V=(0,os.useMemo)(()=>typeof n!="string"?n:Ac(n)?pv(n).trim():n,[n]);return(0,os.useEffect)(()=>{E(g===c)},[g]),(0,Gt.jsxs)("div",{className:(0,Hc.default)(k.listItem,c===g&&k.listItemSelected),children:[(0,Gt.jsxs)(yt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,Gt.jsx)(yt.Trigger,P(S({className:k.listItemAction,"aria-disabled":(N=f.disabled)!=null?N:!1,onClick:C,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,Gt.jsxs)("div",{className:k.listItemContent,children:[typeof r=="string"?(0,Gt.jsx)("p",{className:(0,Hc.default)(k.listItemText,k.truncate,u==null?void 0:u.title),children:r}):r,A&&typeof A=="string"?(0,Gt.jsx)(Js,{tagName:"p",allowList:[],content:A,className:(0,Hc.default)(k.listItemDescription,u==null?void 0:u.description,t?k.lineClamp:k.truncate)}):a]})})),V&&V.length>E3&&(0,Gt.jsx)(yt.Content,{className:k.listItemTooltip,disableFocusManager:!0,children:(0,Gt.jsx)(Js,{className:k.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p","br"],tagName:"div",content:V.replace(/\n/g,"<br />")})})]}),c===g&&s,l&&l.length>0&&(0,Gt.jsxs)("div",{className:k.sources,children:[(0,Gt.jsx)("span",{className:k.sourcesTitle,children:m("sources")}),l.slice(0,x?l.length:d).map(L=>(0,Gt.jsx)("a",{className:k.source,href:L.url,target:"_blank",title:L.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>i==null?void 0:i(L),children:L.name},L.url)),!x&&l.length>d&&(0,Gt.jsx)("button",{className:(0,Hc.default)(k.source,k.sourceShowMore),type:"button",onClick:()=>y(!0),children:m("showMore",{amount:l.length-d})})]})]})}var Bc=b(R()),zk=()=>(0,Bc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Bc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Bc.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 si=b(R());function $v({children:e,title:t,id:n,onDismiss:r}){let o=ce(io),s=_("CommandPalette",Cn),{page:i}=ts();return i!==n?null:(0,si.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,si.jsxs)("div",{className:s.pageNav,children:[(0,si.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,si.jsx)(zk,{}),o("back")]}),t&&(0,si.jsx)("h3",{className:s.pageTitle,children:t})]}),e]})}var Hk=b(Y());var Uc=b(R()),Aa=()=>(0,Uc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Uc.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Uc.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 dr=b(R());function T3({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:s,selectedType:i},a){let l=_("CommandPalette",Cn);return(0,dr.jsxs)("div",{className:l.search,children:[(0,dr.jsx)("div",{className:l.searchIcon,children:(0,dr.jsx)(Aa,{})}),(0,dr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,dr.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:s,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,dr.jsx)("div",{className:l.selectWrapper,children:(0,dr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:i||r,children:[r&&(0,dr.jsx)("option",{children:r}),o.map(c=>(0,dr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var Bk=(0,Hk.forwardRef)(T3);var jv=b(Ne());var kp=b(R()),C3=o=>{var s=o,{onClick:e,shortKeys:t,children:n}=s,r=oe(s,["onClick","shortKeys","children"]);let i=_("CommandPalette",Cn);return(0,kp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,jv.default)(i.actionButton,r.className,{[i.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,kp.jsx)("span",{className:(0,jv.default)(i.actionShortcut,a===8629&&i.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},Uk=C3;var Vc=b(R()),k3="[data-command-palette-item]";function ii({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:s,onChangeType:i,onChangeOpen:a,selectedType:l,types:c,children:u,isOpen:d,search:f,updateDeps:p=[]}){let[v,m]=(0,fo.useState)(),x=(0,fo.useRef)(null),y=()=>{o&&o(n),i(void 0),s(""),a(!1)},g=()=>{var L;if(r!==n&&o){o(n);return}if(l&&i){i(void 0),(L=x.current)==null||L.focus();return}if(f.length>0){s("");return}a(!1)},h=()=>{let L=w();L.length!==0&&m(L[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(k3)||[]),E=L=>document.querySelector(`[data-item-id=${L}]`),k=L=>{let J=E(L);J&&m(J.dataset.itemId)},C=L=>{let J=E(L);J&&J.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let L=w(),J=E(v);if(!J)return;let X=L.indexOf(J),M=L[X+1];M!=null&&M.dataset.itemId?k(M.dataset.itemId):h()},V=()=>{if(!v)return;let L=w(),J=E(v);if(!J)return;let X=L.indexOf(J),M=L[X-1];M!=null&&M.dataset.itemId?k(M.dataset.itemId):k(L[L.length-1].dataset.itemId)},N=(0,fo.useCallback)(L=>{switch(L.key){case"ArrowDown":{L.preventDefault(),A();break}case"ArrowUp":{L.preventDefault(),V();break}case"Enter":{if(v){let J=E(v);J==null||J.click()}break}}},[v]);return(0,fo.useEffect)(()=>{h()},[f,r,l,d,...p]),(0,fo.useEffect)(()=>{v&&C(v)},[v]),(0,Vc.jsx)(zf,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:g,onClose:y,onKeyDown:N,children:(0,Vc.jsxs)(gC,{selected:v,setSelected:m,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Vc.jsx)(Bk,{ref:x,onChange:s,onChangeType:i,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}ii.Page=$v;ii.List=rv;ii.Image=oC;ii.ListItem=Vv;ii.ListItemActions=Fk;ii.Button=Uk;var qe=ii;var Vk=b(Y());function $k(e,t){(0,Vk.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 $c=b(Y());var jk={data:null,fetchState:"idle"},R3=e=>{var t;return(t=e.entities.data)!=null?t:null},Rp=$t([R3,da,Y1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:s,agentNickname:i}=t!=null?t:{};return s&&s!==o&&r.push(s),i&&i!==o&&r.push(i),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),fr=ge("entities/getEntities",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,s=yield o();return s.length===0?Promise.resolve([]):n.getEntities(s)})),P3=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),A3=ke({name:"entities",initialState:jk,reducers:{},extraReducers:e=>{e.addCase(fr.pending,t=>{t.fetchState="loading"}).addCase(fr.rejected,t=>{t.fetchState="error"}).addCase(fr.fulfilled,(t,n)=>{t.fetchState="done",t.data=P3(t.data?[...t.data,...n.payload]:n.payload)}).addCase(at,()=>jk)}}),Wk=A3.reducer;var Wv={};wt(Wv,{enUS:()=>I3,nlNL:()=>L3});var I3={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},L3={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Kk={root:"dd-TYTKs",empty:"dd-AU7uT"};var Ia=b(R()),O3=({onCopy:e})=>{let t=(0,$c.useRef)(null),n=_("EntitiesList",Kk),r=j(Rp),{setSelected:o}=ts(),s=ce(Wv),i=ve();return(0,$c.useEffect)(()=>{i(fr())},[]),(0,$c.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Ia.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Ia.jsx)(qe.List,{children:r.map((a,l)=>(0,Ia.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Ia.jsx)("p",{className:n.empty,children:s("noResults")})]})},Gk=O3;var di=b(Y());var La=b(Y());function ai(e,t){let n=(0,La.useRef)(e);n.current=e;let[r,o]=(0,La.useState)(void 0),[s,i]=(0,La.useState)(void 0),[a,l]=(0,La.useState)("idle"),c=ve();return{error:s,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{i(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),i(void 0)}}}var Pp=b(Ne()),Qk=b(Y());var Kv=b(R()),Gv=e=>(0,Kv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Kv.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 qv=b(R()),qk=e=>(0,qv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,qv.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 Oa(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(s=>{n.classList.add(s)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Yv={};wt(Yv,{enUS:()=>M3,nlNL:()=>N3});var M3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},N3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Yk(e){return ge("analytics/logEvent",(t,n)=>{var s,i,a;let r=(i=(s=n.getState())==null?void 0:s.conversation.current)==null?void 0:i.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,P(S({conversationId:r},o),{data:t.data}))})(e)}function ct(){let e=ve();return(t,n)=>I(this,null,function*(){yield e(Yk({name:t,data:n}))})}var Xk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Ma=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,s=o||window.location.origin;return r&&!n?null:r&&n?`${s}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${s}${e}`};var po=b(R()),_3=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=_("FeedbackThumbs",Xk),s=te("enableFeedbackForm"),i=j(Rr),a=j(Ma(`/admin/feedback?conversationId=${i}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ce(Yv),c=ct(),[u,d]=(0,Qk.useState)(null),f=v=>{v.stopPropagation(),Oa(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Oa(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,po.jsxs)("div",{className:o.thumbs,children:[(0,po.jsx)(ye.Button,{title:l("thumbsUp"),onClick:f,icon:(0,po.jsx)(qk,{}),className:(0,Pp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),s&&a?(0,po.jsx)(ye.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,po.jsx)(Gv,{}),className:(0,Pp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,po.jsx)(ye.Button,{title:l("thumbsDown"),onClick:p,icon:(0,po.jsx)(Gv,{}),className:(0,Pp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},li=_3;var jc=b(R()),Zk=()=>(0,jc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,jc.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,jc.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 Xv={};wt(Xv,{enUS:()=>D3,nlNL:()=>F3});var D3={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"}]},F3={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 Jk={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:cR,setPrototypeOf:eR,isFrozen:z3,getPrototypeOf:H3,getOwnPropertyDescriptor:B3}=Object,{freeze:Yt,seal:Bn,create:uR}=Object,{apply:n0,construct:r0}=typeof Reflect!="undefined"&&Reflect;Yt||(Yt=function(t){return t});Bn||(Bn=function(t){return t});n0||(n0=function(t,n,r){return t.apply(n,r)});r0||(r0=function(t,n){return new t(...n)});var Ap=Xt(Array.prototype.forEach),U3=Xt(Array.prototype.lastIndexOf),tR=Xt(Array.prototype.pop),Wc=Xt(Array.prototype.push),V3=Xt(Array.prototype.splice),Lp=Xt(String.prototype.toLowerCase),Qv=Xt(String.prototype.toString),nR=Xt(String.prototype.match),Kc=Xt(String.prototype.replace),$3=Xt(String.prototype.indexOf),j3=Xt(String.prototype.trim),pr=Xt(Object.prototype.hasOwnProperty),qt=Xt(RegExp.prototype.test),Gc=W3(TypeError);function Xt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return n0(e,t,r)}}function W3(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return r0(e,n)}}function xe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Lp;eR&&eR(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let s=n(o);s!==o&&(z3(t)||(t[r]=s),o=s)}e[o]=!0}return e}function K3(e){for(let t=0;t<e.length;t++)pr(e,t)||(e[t]=null);return e}function ci(e){let t=uR(null);for(let[n,r]of cR(e))pr(e,n)&&(Array.isArray(r)?t[n]=K3(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ci(r):t[n]=r);return t}function qc(e,t){for(;e!==null;){let r=B3(e,t);if(r){if(r.get)return Xt(r.get);if(typeof r.value=="function")return Xt(r.value)}e=H3(e)}function n(){return null}return n}var rR=Yt(["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"]),Zv=Yt(["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"]),Jv=Yt(["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"]),G3=Yt(["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"]),e0=Yt(["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"]),q3=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),oR=Yt(["#text"]),sR=Yt(["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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),t0=Yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),iR=Yt(["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"]),Ip=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),Q3=Bn(/\$\{[\w\W]*/gm),Z3=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),J3=Bn(/^aria-[\-\w]+$/),dR=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),e4=Bn(/^(?:\w+script|data):/i),t4=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fR=Bn(/^html$/i),n4=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),aR=Object.freeze({__proto__:null,ARIA_ATTR:J3,ATTR_WHITESPACE:t4,CUSTOM_ELEMENT:n4,DATA_ATTR:Z3,DOCTYPE_NAME:fR,ERB_EXPR:X3,IS_ALLOWED_URI:dR,IS_SCRIPT_OR_DATA:e4,MUSTACHE_EXPR:Y3,TMPLIT_EXPR:Q3}),Yc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},r4=function(){return typeof window=="undefined"?null:window},o4=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 s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch(i){return console.warn("TrustedTypes policy "+s+" could not be created."),null}},lR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function pR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r4(),t=ne=>pR(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Yc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,m=qc(v,"cloneNode"),x=qc(v,"remove"),y=qc(v,"nextSibling"),g=qc(v,"childNodes"),h=qc(v,"parentNode");if(typeof i=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:k,createNodeIterator:C,createDocumentFragment:A,getElementsByTagName:V}=n,{importNode:N}=r,L=lR();t.isSupported=typeof cR=="function"&&typeof h=="function"&&k&&k.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:J,ERB_EXPR:X,TMPLIT_EXPR:M,DATA_ATTR:F,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:B}=aR,{IS_ALLOWED_URI:K}=aR,$=null,W=xe({},[...rR,...Zv,...Jv,...e0,...oR]),z=null,fe=xe({},[...sR,...t0,...iR,...Ip]),de=Object.seal(uR(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}})),be=null,me=null,re=!0,Ce=!0,rt=!1,ie=!0,Q=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,gs=!1,hs="user-content-",en=!0,yr=!1,Br={},bi=null,G0=xe({},["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"]),q0=null,Y0=xe({},["audio","video","img","source","image","track"]),bm=null,X0=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hu="http://www.w3.org/1998/Math/MathML",yu="http://www.w3.org/2000/svg",Ur="http://www.w3.org/1999/xhtml",Ei=Ur,Em=!1,Tm=null,WA=xe({},[hu,yu,Ur],Qv),vu=xe({},["mi","mo","mn","ms","mtext"]),xu=xe({},["annotation-xml"]),KA=xe({},["title","style","font","a","script"]),Ga=null,GA=["application/xhtml+xml","text/html"],qA="text/html",ft=null,Ti=null,YA=n.createElement("form"),Q0=function(T){return T instanceof RegExp||T instanceof Function},Cm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ti&&Ti===T)){if((!T||typeof T!="object")&&(T={}),T=ci(T),Ga=GA.indexOf(T.PARSER_MEDIA_TYPE)===-1?qA:T.PARSER_MEDIA_TYPE,ft=Ga==="application/xhtml+xml"?Qv:Lp,$=pr(T,"ALLOWED_TAGS")?xe({},T.ALLOWED_TAGS,ft):W,z=pr(T,"ALLOWED_ATTR")?xe({},T.ALLOWED_ATTR,ft):fe,Tm=pr(T,"ALLOWED_NAMESPACES")?xe({},T.ALLOWED_NAMESPACES,Qv):WA,bm=pr(T,"ADD_URI_SAFE_ATTR")?xe(ci(X0),T.ADD_URI_SAFE_ATTR,ft):X0,q0=pr(T,"ADD_DATA_URI_TAGS")?xe(ci(Y0),T.ADD_DATA_URI_TAGS,ft):Y0,bi=pr(T,"FORBID_CONTENTS")?xe({},T.FORBID_CONTENTS,ft):G0,be=pr(T,"FORBID_TAGS")?xe({},T.FORBID_TAGS,ft):{},me=pr(T,"FORBID_ATTR")?xe({},T.FORBID_ATTR,ft):{},Br=pr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Ce=T.ALLOW_DATA_ATTR!==!1,rt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ie=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=T.SAFE_FOR_TEMPLATES||!1,ae=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,vt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,gs=T.SANITIZE_NAMED_PROPS||!1,en=T.KEEP_CONTENT!==!1,yr=T.IN_PLACE||!1,K=T.ALLOWED_URI_REGEXP||dR,Ei=T.NAMESPACE||Ur,vu=T.MATHML_TEXT_INTEGRATION_POINTS||vu,xu=T.HTML_INTEGRATION_POINTS||xu,de=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&Q0(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&Q0(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(Ce=!1),He&&(Qe=!0),Br&&($=xe({},oR),z=[],Br.html===!0&&(xe($,rR),xe(z,sR)),Br.svg===!0&&(xe($,Zv),xe(z,t0),xe(z,Ip)),Br.svgFilters===!0&&(xe($,Jv),xe(z,t0),xe(z,Ip)),Br.mathMl===!0&&(xe($,e0),xe(z,iR),xe(z,Ip))),T.ADD_TAGS&&($===W&&($=ci($)),xe($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(z===fe&&(z=ci(z)),xe(z,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&xe(bm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(bi===G0&&(bi=ci(bi)),xe(bi,T.FORBID_CONTENTS,ft)),en&&($["#text"]=!0),pe&&xe($,["html","head","body"]),$.table&&(xe($,["tbody"]),delete be.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=o4(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Yt&&Yt(T),Ti=T}},Z0=xe({},[...Zv,...Jv,...G3]),J0=xe({},[...e0,...q3]),XA=function(T){let H=h(T);(!H||!H.tagName)&&(H={namespaceURI:Ei,tagName:"template"});let ee=Lp(T.tagName),Be=Lp(H.tagName);return Tm[T.namespaceURI]?T.namespaceURI===yu?H.namespaceURI===Ur?ee==="svg":H.namespaceURI===hu?ee==="svg"&&(Be==="annotation-xml"||vu[Be]):!!Z0[ee]:T.namespaceURI===hu?H.namespaceURI===Ur?ee==="math":H.namespaceURI===yu?ee==="math"&&xu[Be]:!!J0[ee]:T.namespaceURI===Ur?H.namespaceURI===yu&&!xu[Be]||H.namespaceURI===hu&&!vu[Be]?!1:!J0[ee]&&(KA[ee]||!Z0[ee]):!!(Ga==="application/xhtml+xml"&&Tm[T.namespaceURI]):!1},vr=function(T){Wc(t.removed,{element:T});try{h(T).removeChild(T)}catch(H){x(T)}},wu=function(T,H){try{Wc(t.removed,{attribute:H.getAttributeNode(T),from:H})}catch(ee){Wc(t.removed,{attribute:null,from:H})}if(H.removeAttribute(T),T==="is")if(Qe||He)try{vr(H)}catch(ee){}else try{H.setAttribute(T,"")}catch(ee){}},ex=function(T){let H=null,ee=null;if(vt)T="<remove></remove>"+T;else{let xt=nR(T,/^[\r\n\t ]+/);ee=xt&&xt[0]}Ga==="application/xhtml+xml"&&Ei===Ur&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(Ei===Ur)try{H=new f().parseFromString(Be,Ga)}catch(xt){}if(!H||!H.documentElement){H=k.createDocument(Ei,"template",null);try{H.documentElement.innerHTML=Em?E:Be}catch(xt){}}let kt=H.body||H.documentElement;return T&&ee&&kt.insertBefore(n.createTextNode(ee),kt.childNodes[0]||null),Ei===Ur?V.call(H,pe?"html":"body")[0]:pe?H.documentElement:kt},tx=function(T){return C.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},km=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},nx=function(T){return typeof a=="function"&&T instanceof a};function Vr(ne,T,H){Ap(ne,ee=>{ee.call(t,T,H,Ti)})}let rx=function(T){let H=null;if(Vr(L.beforeSanitizeElements,T,null),km(T))return vr(T),!0;let ee=ft(T.nodeName);if(Vr(L.uponSanitizeElement,T,{tagName:ee,allowedTags:$}),T.hasChildNodes()&&!nx(T.firstElementChild)&&qt(/<[/\w!]/g,T.innerHTML)&&qt(/<[/\w!]/g,T.textContent)||T.nodeType===Yc.progressingInstruction||ae&&T.nodeType===Yc.comment&&qt(/<[/\w]/g,T.data))return vr(T),!0;if(!$[ee]||be[ee]){if(!be[ee]&&sx(ee)&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee)))return!1;if(en&&!bi[ee]){let Be=h(T)||T.parentNode,kt=g(T)||T.childNodes;if(kt&&Be){let xt=kt.length;for(let tn=xt-1;tn>=0;--tn){let xr=m(kt[tn],!0);xr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(xr,y(T))}}}return vr(T),!0}return T instanceof l&&!XA(T)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&qt(/<\/no(script|embed|frames)/i,T.innerHTML)?(vr(T),!0):(Q&&T.nodeType===Yc.text&&(H=T.textContent,Ap([J,X,M],Be=>{H=Kc(H,Be," ")}),T.textContent!==H&&(Wc(t.removed,{element:T.cloneNode()}),T.textContent=H)),Vr(L.afterSanitizeElements,T,null),!1)},ox=function(T,H,ee){if(dt&&(H==="id"||H==="name")&&(ee in n||ee in YA))return!1;if(!(Ce&&!me[H]&&qt(F,H))){if(!(re&&qt(se,H))){if(!z[H]||me[H]){if(!(sx(T)&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,T)||de.tagNameCheck instanceof Function&&de.tagNameCheck(T))&&(de.attributeNameCheck instanceof RegExp&&qt(de.attributeNameCheck,H)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(H))||H==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee))))return!1}else if(!bm[H]){if(!qt(K,Kc(ee,U,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&T!=="script"&&$3(ee,"data:")===0&&q0[T])){if(!(rt&&!qt(G,Kc(ee,U,"")))){if(ee)return!1}}}}}}return!0},sx=function(T){return T!=="annotation-xml"&&nR(T,B)},ix=function(T){Vr(L.beforeSanitizeAttributes,T,null);let{attributes:H}=T;if(!H||km(T))return;let ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},Be=H.length;for(;Be--;){let kt=H[Be],{name:xt,namespaceURI:tn,value:xr}=kt,qa=ft(xt),Dt=xt==="value"?xr:j3(xr);if(ee.attrName=qa,ee.attrValue=Dt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Vr(L.uponSanitizeAttribute,T,ee),Dt=ee.attrValue,gs&&(qa==="id"||qa==="name")&&(wu(xt,T),Dt=hs+Dt),ae&&qt(/((--!?|])>)|<\/(style|title)/i,Dt)){wu(xt,T);continue}if(ee.forceKeepAttr||(wu(xt,T),!ee.keepAttr))continue;if(!ie&&qt(/\/>/i,Dt)){wu(xt,T);continue}Q&&Ap([J,X,M],lx=>{Dt=Kc(Dt,lx," ")});let ax=ft(T.nodeName);if(ox(ax,qa,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!tn)switch(p.getAttributeType(ax,qa)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{tn?T.setAttributeNS(tn,xt,Dt):T.setAttribute(xt,Dt),km(T)?vr(T):tR(t.removed)}catch(lx){}}}Vr(L.afterSanitizeAttributes,T,null)},QA=function ne(T){let H=null,ee=tx(T);for(Vr(L.beforeSanitizeShadowDOM,T,null);H=ee.nextNode();)Vr(L.uponSanitizeShadowNode,H,null),rx(H),ix(H),H.content instanceof s&&ne(H.content);Vr(L.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,ee=null,Be=null,kt=null;if(Em=!ne,Em&&(ne="<!-->"),typeof ne!="string"&&!nx(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Gc("dirty is not a string, aborting")}else throw Gc("toString is not a function");if(!t.isSupported)return ne;if(je||Cm(T),t.removed=[],typeof ne=="string"&&(yr=!1),yr){if(ne.nodeName){let xr=ft(ne.nodeName);if(!$[xr]||be[xr])throw Gc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)H=ex("<!---->"),ee=H.ownerDocument.importNode(ne,!0),ee.nodeType===Yc.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?H=ee:H.appendChild(ee);else{if(!Qe&&!Q&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(H=ex(ne),!H)return Qe?null:Ze?E:""}H&&vt&&vr(H.firstChild);let xt=tx(yr?ne:H);for(;Be=xt.nextNode();)rx(Be),ix(Be),Be.content instanceof s&&QA(Be.content);if(yr)return ne;if(Qe){if(He)for(kt=A.call(H.ownerDocument);H.firstChild;)kt.appendChild(H.firstChild);else kt=H;return(z.shadowroot||z.shadowrootmode)&&(kt=N.call(r,kt,!0)),kt}let tn=pe?H.outerHTML:H.innerHTML;return pe&&$["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&qt(fR,H.ownerDocument.doctype.name)&&(tn="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
75
- `+tn),Q&&Ap([J,X,M],xr=>{tn=Kc(tn,xr," ")}),w&&Ze?w.createHTML(tn):tn},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cm(ne),je=!0},t.clearConfig=function(){Ti=null,je=!1},t.isValidAttribute=function(ne,T,H){Ti||Cm({});let ee=ft(ne),Be=ft(T);return ox(ee,Be,H)},t.addHook=function(ne,T){typeof T=="function"&&Wc(L[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let H=U3(L[ne],T);return H===-1?void 0:V3(L[ne],H,1)[0]}return tR(L[ne])},t.removeHooks=function(ne){L[ne]=[]},t.removeAllHooks=function(){L=lR()},t}var mR=pR();var go=b(Y());var s0=b(Ne()),Un=b(Y());var Op=b(Y()),s4=["bottom","height","left","right","top","width"],i4=(e={},t={})=>s4.some(n=>e[n]!==t[n]),mo=new Map,gR,hR=()=>{let e=[],t=[];mo.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();i4(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{mo.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),gR=window.requestAnimationFrame(hR)};function a4(e,t){return{observe(){let n=mo.size===0;if(mo.has(e)){let r=mo.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else mo.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&hR()},unobserve(){let n=mo.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||mo.delete(e),mo.size||cancelAnimationFrame(gR)}}}}function o0(e){let[t,n]=(0,Op.useState)(null);return(0,Op.useLayoutEffect)(()=>{if(!e.current)return;let r=a4(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Na=b(Y()),xR=b($l());var yR=b(Y());function ss(e){(0,yR.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ui(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var vR={root:"dd-r-dgo"};var wR=({children:e,parentNode:t})=>{let[n,r]=(0,Na.useState)(null),o=(0,Na.useContext)(Qa);return(0,Na.useLayoutEffect)(()=>{let s=document.createElement("div");return ui(s),s.classList.add(vR.root),o!=null&&o.portalRootNode&&s.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(s),r(s),()=>{s.isConnected&&s.remove()}},[]),n?(0,xR.createPortal)(e,n):null};var Mr={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var Mp=b(R()),Np=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),s=(0,Un.useCallback)(()=>n(a=>!a),[]),i=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:s,triggerRef:i}};function i0(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 _a=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:s,toStyle:i=i0,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=o0(t),f=o0(n),p=(0,Un.useMemo)(()=>i(d,f,0),[d,f]);return(0,Mp.jsx)(wR,{parentNode:a,children:(0,Mp.jsx)("div",P(S({className:(0,s0.default)(Mr.ref,{[Mr.positionAbove]:r==="above",[Mr.positionBelow]:r==="below",[Mr.positionLeft]:r==="left",[Mr.positionRight]:r==="right",[Mr.alignStart]:o==="start",[Mr.alignCenter]:o==="center",[Mr.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,Mp.jsx)("div",{className:(0,s0.default)(e,Mr.root),children:s})}))})};var SR={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var mr=b(R());function l4(e){return`<button type="button" data-copy-icon 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 a0(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function c4(e){return e.replace(/\r\n/g,`
76
- `)}var u4=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let s=_("Markdown",SR),i=(0,go.useRef)(null),[a,l]=(0,go.useState)(null),c=(0,go.useMemo)(()=>{let m=Re.parse(c4(e));return mR.sanitize(m.toString()).replaceAll("</code>",`${l4(s.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=m=>{var g;let x=m.target,y=!!((g=i.current)!=null&&g.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==i.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let m=a.querySelector("button");m&&(Oa(m,s.fadeup),r==null||r(a0(a)))},f=m=>{let x=m.target;if(x.tagName==="A"){m.stopPropagation();return}"copyIcon"in x.dataset&&(Oa(x,s.fadeup),r==null||r(a0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(a0(a)))},v=m=>{if(m===null)return;let x=m.getBoundingClientRect();x.left<0?m.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(m.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,mr.jsxs)(go.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(_a,{triggerRef:{current:a},className:s.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:s.options,ref:v,children:[r&&(0,mr.jsx)("button",{type:"button",className:s.option,onClick:d,children:n}),o&&(0,mr.jsxs)(go.Fragment,{children:[(0,mr.jsx)("div",{className:s.divider}),(0,mr.jsx)("button",{type:"button",className:s.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:s.arrow})]}),(0,mr.jsx)("div",{ref:i,"data-testid":"widget-markdown-content",className:s.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},ho=u4;var Mt=b(R()),d4=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[s,i]=di.default.useState(""),{setSelected:a}=ts(),l=(0,di.useRef)(null),c=_("KnowledgeSearchStyles",Jk),u=ce(Xv),d=ct(),f=(x=j(Sc(e!=null?e:-1)))!=null?x:[],p=ai(t,{onSuccess(y){d("knowledge assist question answered",{question:s||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!s&&!!o}),a(`knowledge-assist-${f.length}`),i("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),s!==""&&p.call(s)}),m=(y,g)=>{d("knowledge assist source viewed",{question:g,sourceViewed:y.url||y.name})};return(0,di.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,di.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Mt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Mt.jsx)("div",{className:c.alignRight,children:(0,Mt.jsx)(qe.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:g},h)=>(0,Mt.jsx)(qe.List,{children:(0,Mt.jsx)(qe.ListItem,{id:`knowledge-assist-${h}`,"data-testid":"knowledge-search-answer",description:(0,Mt.jsx)(ho,{content:g.answer}),closeOnSelect:!0,onClick:()=>n(g.answer),onSourceClick:w=>m(w,y),sources:g.sources,styles:{title:c.question,description:c.answer},extra:(0,Mt.jsx)("div",{className:c.listItemFeedback,children:(0,Mt.jsx)(li,{feedbackText:g.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},g)})}),children:y})},`${g.answer}_${h}`)),p.state==="loading"&&(0,Mt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Mt.jsx)("p",{className:c.status,children:u("error")}),(0,Mt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Mt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:s,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),i(y.target.value)}}),(0,Mt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Mt.jsx)(Zk,{})})]})]})},bR=d4;var l0=b(R()),_p=e=>(0,l0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,l0.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 Xc={};wt(Xc,{enUS:()=>f4,nlNL:()=>p4});var f4={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"}]},p4={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 Dp={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var fi=b(R()),m4=({suggestion:e,source:t,context:n})=>{let r=ce(Xc),o=j(Rr),s=ve(),i=te("enableSuggestionFeedback"),a=`${e.text}`,l=j(Ma(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{s(ro({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!i||!l?null:(0,fi.jsxs)(yt,{placement:"top-end",children:[(0,fi.jsx)(yt.Trigger,{className:Dp.trigger,children:(0,fi.jsx)(_p,{"data-testid":"feedback-dropdown-trigger"})}),(0,fi.jsx)(yt.Content,{className:Dp.content,children:(0,fi.jsx)(yt.Button,{className:Dp.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Fp=m4;var Qc={};wt(Qc,{enUS:()=>g4,nlNL:()=>h4});var g4={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL 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"}],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?"}]},h4={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:"URL 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"}],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 LR=b(Y());var y4=["{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}"],v4=new RegExp(y4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function ER(e,t){let n=e.split(v4),r=0,o=[];for(let s=0;s<n.length;s++){let i=n[s];if(o.push(i),s===n.length-1)break;if(t.indexOf(i)===-1)return e;let a=n[s+1],l=s===n.length-2;r+=i.length;let c=r;if(l){let d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function TR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var kR={suggestions:[],fetchState:"idle"},CR={default:kR},RR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},zp=e=>e.textSuggestions,PR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Hp=it("textSuggestions/refresh"),gr=ge("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:s,inlineSuggestions:i}=r.settings,a=ca(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,ec(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:un(d.text,o)}),d.title?{title:un(d.title,o)}:{}))),e==="default"){let d=i?l.filter(PR(a)):l;t.dispatch(Qo(d.slice(0,s)))}return l})),Zc=ge("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:s}=r.info,{textSuggestionsCount:i,deanonymize:a,inlineSuggestions:l}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},ec(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(PR(e))),s&&(c=c.map(d=>P(S({},d),{text:un(d.text,s)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?ER(d.text,e):d.text}))),c=TR(c,i),t.dispatch(Qo(c)),c})),AR=ke({name:"textSuggestions",initialState:CR,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}}}}},extraReducers:e=>{e.addCase(gr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||kR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(gr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(gr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Zc.pending,t=>{t.default.fetchState="loading"}).addCase(Zc.rejected,t=>{t.default.fetchState="error"}).addCase(Zc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(at,()=>CR)}}),{setTextSuggestions:Q$}=AR.actions,IR=AR.reducer;var pi=b(R()),x4=({types:e,commands:t,onClick:n})=>{let r=ve(),o=ce(Qc),s=j(zp);return(0,LR.useEffect)(()=>{e.forEach(({type:i})=>{(!s[i]||s[i].suggestions.length===0)&&r(gr(i))})},[]),(0,pi.jsxs)("div",{children:[t.length>0&&(0,pi.jsx)(qe.List,{heading:o("commands"),children:t.map((i,a)=>(0,pi.jsx)(qe.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:i.onClick,children:i.label},i.label))}),e.map(({type:i,title:a})=>{var l;return(0,pi.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=s[i])==null?void 0:l.suggestions.map((c,u)=>(0,pi.jsx)(qe.ListItem,{id:`${i}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},i)})]})},OR=x4;var Ct=b(R()),S4=200,b4=5,E4=4,c0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?E4:b4),T4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),C4=()=>{var K,$,W;let e=ve(),t=dn(),n=ce(Qc),[r,o]=(0,Qt.useState)(!1),[s,i]=(0,Qt.useState)(""),[a,l]=(0,Qt.useState)(null),c=j(rT),u=j(qs),[d,f]=(0,Qt.useState)(),p=j(jt),v=te("showSearch"),m=te("enableSuggestionFeedback"),x=te("showEntitiesCommand"),y=te("showKnowledgeSearch"),g=te("showImageSearch"),h=te("searchTriggerKey"),w=j(Kf),E=j(Gf),k=j(XT),C=j(Ly),A=j(oT),V=j(nT),N=((W=($=(K=u==null?void 0:u.uiConfig)==null?void 0:K.search)==null?void 0:$.initialTypes)==null?void 0:W.filter(({isActive:z})=>z))||[],L=ct(),J=(0,Qt.useMemo)(()=>{let z=me=>c0(C.filter(re=>re.type===me.toUpperCase()),me,d),fe=(k==null?void 0:k.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:z(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(fe.push({value:"PERSONAL",label:n("personalSuggestions"),list:z("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:z("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:z("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),g&&fe.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:z("IMAGE"),listOrientation:"horizontal"}),N.length===0)return fe;let de=N.map(me=>fe.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),be=fe.filter(me=>!de.find(re=>re.value===me.value));return[...de,...be]},[k,N,g,d]),X=[{label:n("entitiesClipboard"),onClick:()=>e(oo("entities")),shouldShow:x&&T4(n("entitiesClipboard"),s)},{label:s?`${n("knowledgeAssist")}: ${s}`:n("knowledgeAssist"),onClick:()=>{e(oo("knowledgeAssist")),L("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(z=>z.shouldShow).filter(()=>!d),M=(0,Qt.useCallback)((0,MR.default)((z,fe)=>{e(Us({query:z,type:fe,tags:["search-overlay"],size:d?50:20}))},S4),[d]),F=(0,Qt.useCallback)((z,fe)=>{switch(fe.type){case"IMAGE":t.send(My,{suggestion:fe});break;default:t.send(Pr,{text:z,suggestion:fe})}e(Fn(!1))},[e]),se=z=>{Ir(z.text),e(ro({name:"entity copied",data:{entity:z,type:"copy"}})),e(Fn(!1))},G=z=>{t.send(Pr,{text:z,suggestion:{source:"knowledge-assist",text:z}}),e(ro({name:"answer used",data:{originalText:z},options:{includeConversationData:!0}})),i(""),a&&e(ga(a)),e(oo("search")),e(Fn(!1))},U=z=>{let fe={input:z,threadId:a,onNewThreadId:de=>l(de)};if(E)return Ks(S({assistantCode:E},fe));if(w)return Gs(S({assistantCode:w},fe))};function B(z){return fe=>{r?window.confirm(n("warning"))&&(z(fe),o(!1)):z(fe)}}return(0,Qt.useEffect)(()=>{s?M(s,d):e(Rf())},[s,d]),(0,Qt.useEffect)(()=>{p&&e(bc())},[p]),$k(h,()=>{e(Fn(!0)),L("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Ct.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:i,onChangeOpen:B(z=>e(Fn(z))),onChangeType:z=>f(z),onChangePage:B(z=>e(oo(z))),selectedType:d,search:s,page:c,isOpen:V,types:J,updateDeps:[C],children:[(0,Ct.jsxs)(qe.Page,{id:"search",children:[s.length===0&&(0,Ct.jsx)(OR,{types:N,commands:X,onClick:F}),s.length>0&&(0,Ct.jsxs)(Qt.Fragment,{children:[X.length>0&&(0,Ct.jsx)(qe.List,{heading:n("commands"),children:X.map((z,fe)=>(0,Ct.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:z.onClick,id:`commands-${fe}`,children:z.label},z.label))}),J.map(({value:z,label:fe,list:de,lineClamp:be,listOrientation:me})=>(0,Ct.jsx)(qe.List,{heading:fe,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(z),hasMore:!d&&A[z.toLowerCase()]>c0(de,z,d).length,children:c0(de,z,d).map(re=>(0,Ct.jsx)(qe.ListItem,{id:`${z}-${re.id}`,closeOnSelect:!1,lineClamp:be,onClick:()=>F(re.text,re),description:z!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:m&&(0,Ct.jsx)(qe.ListItemActions,{children:(0,Ct.jsx)(Fp,{context:s,source:"search",suggestion:re})}),children:z==="IMAGE"?(0,Ct.jsx)(qe.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},z))]})]}),(0,Ct.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:B(()=>{e(oo("search"))}),children:(0,Ct.jsx)(Gk,{onCopy:se})}),(w!=null?w:E)&&(0,Ct.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:B(()=>{a&&e(ga(a)),e(oo("search"))}),children:(0,Ct.jsx)(bR,{threadId:a,onEvaluate:U,question:s,onUse:G,onResetQuestion:()=>{a&&e(ga(a)),i(""),l(null)}})})]})},NR=C4;var Jc=b(R()),k4=()=>{let e=te("showSearch"),t=te("isEmbedded");return(0,Jc.jsxs)(_R.Fragment,{children:[e&&(0,Jc.jsx)(NR,{}),t&&(0,Jc.jsx)(TT,{})]})},DR=k4;var BR=b(Ne());var Bp=b(R()),FR=({className:e})=>(0,Bp.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,Bp.jsx)("g",{children:(0,Bp.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
74
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||eD)();if(!o)return;let s=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",i=s==="body"||s==="fragment"?o.body:o.createElement(s);return t.match(Q2)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,pC.default)(t):t)),i}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==fC||!t.attributes||([...t.attributes].forEach(s=>{let{name:i,value:a}=s,l=i.toLowerCase(),c=tp[l]||tp[i];if(!this.isSafe(t)||!l.match(Z2)&&(!n&&(!c||c===dv)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===es?u=!0:c===Xs?u=Number.parseFloat(String(u)):c!==ep&&(u=String(u)),r[fv[l]||l]=this.applyAttributeFilters(l,u),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,(s,i)=>String(i).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return Pc[t]?P(S(S({},n),Pc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&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:s,transform:i,transformOnlyAllowList:a}=this.props,l=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===fC){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let g;if(i&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;g=this.parseNode(v,p);let y=i(v,g,p);if(y===null)return;if(typeof y!="undefined"){l.push(Zs.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(s||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(Zs.default.createElement(np,P(S({},y),{key:this.keyIndex}),(d=g)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===X2){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,s=null;for(;s=o.match(J2);){let[i,a]=s,l=s.index,c=i.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:d,props:f}=n[a],p;if(c)p=i.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(i.length,v.index),n),f))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function tD(e){var t;let{attributes:n,className:r,containerTagName:o,content:s,emptyContent:i,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new rp(s!=null?s:"",e).parse();p.length>0&&(f=p)}return f||(f=i),d?Zs.default.createElement(Zs.default.Fragment,null,f):Zs.default.createElement(np,{attributes:n,className:r,tagName:u},f)}function Js(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:s=!1,emptyContent:i=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=s?[]:l,g=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(k=>{k.onBeforeParse&&x.push(k.onBeforeParse.bind(k)),k.onAfterParse&&y.push(k.onAfterParse.bind(k))});let h=x.reduce((k,C)=>C(k,e),r!=null?r:""),m=new rp(h,p,v,g),w=y.reduce((k,C)=>C(k,e),m.parse());return Zs.default.createElement(tD,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:i,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var os=b(Y());var nD=/[.*+?^${}()|[\]\\]/g,rD=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function oD(e){return e.replace(nD,"\\$&")}function sD(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function iD(e){return e.search(rD)}function mC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${oD(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function gC(e){return e.replace(_u,'<mark data-type="placeholder">$1</mark>')}function ha(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function aD(e,t){return e.split("").map((i,a)=>({char:i,index:a})).filter(({char:i,index:a})=>/\s/.test(i)&&a<=t).map(({index:i})=>i).reverse()[0]}function mv(e,t,n={}){if(t){let r=sD(t.toLowerCase(),e.toLowerCase()),o=ha(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=iD(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let i=t.split(Qx).length>3||t.length>30?aD(t.trim(),r):0;return`${`${i>0?"\u2026":""}${ha(e.substring(i,r))}`}<strong>${o}</strong>`}return e}var lD=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Ac(e){return lD.test(e)}function gv(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var op=b(Y()),vC=b(R()),hC=op.default.createContext(void 0);function ts(){let e=op.default.useContext(hC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var yC=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s})=>{let i=op.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s}),[n,t,o]);return(0,vC.jsx)(hC.Provider,{value:i,children:e})};var Mr=b(Y());var M=b(Y(),1),Pa=b(Y(),1);function ip(){return typeof window!="undefined"}function Lr(e){return xC(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ar(e){var t;return(t=(xC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xC(e){return ip()?e instanceof Node||e instanceof Kt(e).Node:!1}function Ne(e){return ip()?e instanceof Element||e instanceof Kt(e).Element:!1}function Xe(e){return ip()?e instanceof HTMLElement||e instanceof Kt(e).HTMLElement:!1}function sp(e){return!ip()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot}function ya(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wC(e){return["table","td","th"].includes(Lr(e))}function Ic(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function ap(e){let t=va(),n=Ne(e)?fn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function SC(e){let t=ir(e);for(;Xe(t)&&!lr(t);){if(ap(t))return t;if(Ic(t))return null;t=ir(t)}return null}function va(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function lr(e){return["html","body","#document"].includes(Lr(e))}function fn(e){return Kt(e).getComputedStyle(e)}function Lc(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ir(e){if(Lr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||sp(e)&&e.host||ar(e);return sp(t)?t.host:t}function bC(e){let t=ir(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&ya(t)?t:bC(t)}function kn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=bC(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Kt(o);if(s){let a=lp(i);return t.concat(i,i.visualViewport||[],ya(o)?o:[],a&&n?kn(a):[])}return t.concat(o,kn(o,[],n))}function lp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ns(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ht(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&sp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function EC(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function yv(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function TC(e){return e.mozInputSource===0&&e.isTrusted?!0:hv()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CC(e){return cD()?!1:!hv()&&e.width===0&&e.height===0||hv()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function kC(){return/apple/i.test(navigator.vendor)}function hv(){let e=/android/i;return e.test(EC())||e.test(yv())}function cD(){return yv().includes("jsdom/")}function xa(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function RC(e){return"nativeEvent"in e}function PC(e){return e.matches("html,body")}function yt(e){return(e==null?void 0:e.ownerDocument)||document}function cp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function co(e){return"composedPath"in e?e.composedPath()[0]:e.target}var uD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function vv(e){return Xe(e)&&e.matches(uD)}function up(e){e.preventDefault(),e.stopPropagation()}function xv(e){return e?e.getAttribute("role")==="combobox"&&vv(e):!1}var wa=Math.min,uo=Math.max,Nc=Math.round,Oc=Math.floor,cr=e=>({x:e,y:e}),dD={left:"right",right:"left",bottom:"top",top:"bottom"},fD={start:"end",end:"start"};function wv(e,t,n){return uo(e,wa(t,n))}function _c(e,t){return typeof e=="function"?e(t):e}function rs(e){return e.split("-")[0]}function Dc(e){return e.split("-")[1]}function Sv(e){return e==="x"?"y":"x"}function bv(e){return e==="y"?"height":"width"}function ei(e){return["top","bottom"].includes(rs(e))?"y":"x"}function Ev(e){return Sv(ei(e))}function AC(e,t,n){n===void 0&&(n=!1);let r=Dc(e),o=Ev(e),s=bv(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Mc(i)),[i,Mc(i)]}function IC(e){let t=Mc(e);return[dp(e),t,dp(t)]}function dp(e){return e.replace(/start|end/g,t=>fD[t])}function pD(e,t,n){let r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function LC(e,t,n,r){let o=Dc(e),s=pD(rs(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(dp)))),s}function Mc(e){return e.replace(/left|right|bottom|top/g,t=>dD[t])}function mD(e){return S({top:0,right:0,bottom:0,left:0},e)}function MC(e){return typeof e!="number"?mD(e):{top:e,right:e,bottom:e,left:e}}function ti(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var mn=b(R(),1);var gD=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],fp=gD.join(","),OC=typeof Element=="undefined",Sa=OC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,pp=!OC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},mp=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},hD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},yD=function(t,n,r){if(mp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(fp));return n&&Sa.call(t,fp)&&o.unshift(t),o=o.filter(r),o},vD=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!mp(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=Sa.call(i,fp);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!mp(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var p=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return o},_C=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},DC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||hD(t))&&!_C(t)?0:t.tabIndex},xD=function(t,n){var r=DC(t);return r<0&&n&&!_C(t)?0:r},wD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},FC=function(t){return t.tagName==="INPUT"},SD=function(t){return FC(t)&&t.type==="hidden"},bD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},ED=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TD=function(t){if(!t.name)return!0;var n=t.form||pp(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=ED(o,t.form);return!s||s===t},CD=function(t){return FC(t)&&t.type==="radio"},kD=function(t){return CD(t)&&!TD(t)},RD=function(t){var n,r=t&&pp(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=pp(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},NC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},PD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Sa.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Sa.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=pp(t);if(l&&!l.shadowRoot&&o(l)===!0)return NC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(RD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return NC(t);return!1},AD=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Sa.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ID=function(t,n){return!(n.disabled||mp(n)||SD(n)||PD(n,t)||bD(n)||AD(n))},Tv=function(t,n){return!(kD(n)||DC(n)<0||!ID(t,n))},LD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},MD=function e(t){var n=[],r=[];return t.forEach(function(o,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=xD(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(wD).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Fc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=vD([t],n.includeContainer,{filter:Tv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:LD}):r=yD(t,n.includeContainer,Tv.bind(null,n)),MD(r)};var zC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Sa.call(t,fp)===!1?!1:Tv(n,t)};var Hv=b($l(),1);function HC(e,t,n){let{reference:r,floating:o}=e,s=ei(t),i=Ev(t),a=bv(i),l=rs(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Dc(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1);break}return p}var BC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=yield i.isRTL==null?void 0:i.isRTL(t),c=yield i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=HC(c,r,l),f=r,p={},v=0;for(let g=0;g<a.length;g++){let{name:x,fn:y}=a[g],{x:h,y:m,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=h!=null?h:u,d=m!=null?m:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=HC(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function Cv(e,t){return I(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=_c(t,e),v=MC(p),x=a[f?d==="floating"?"reference":"floating":d],y=ti(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(x))==null||n?x:x.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),h=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=yield s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating),w=(yield s.isElement==null?void 0:s.isElement(m))?(yield s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},E=ti(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:m,strategy:l}):h);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var UC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:s,middlewareData:i,rects:a,initialPlacement:l,platform:c,elements:u}=n,F=_c(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0}=F,y=oe(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let h=rs(s),m=ei(l),w=rs(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),k=p||(w||!x?[Mc(l)]:IC(l)),C=g!=="none";!p&&C&&k.push(...LC(l,x,g,E));let A=[l,...k],V=yield Cv(n,y),O=[],L=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&O.push(V[h]),f){let se=AC(s,a,E);O.push(V[se[0]],V[se[1]])}if(L=[...L,{placement:s,overflows:O}],!O.every(se=>se<=0)){var J,X;let se=(((J=i.flip)==null?void 0:J.index)||0)+1,G=A[se];if(G)return{data:{index:se,overflows:L},reset:{placement:G}};let U=(X=L.filter(B=>B.overflows[0]<=0).sort((B,K)=>B.overflows[1]-K.overflows[1])[0])==null?void 0:X.placement;if(!U)switch(v){case"bestFit":{var N;let B=(N=L.filter(K=>{if(C){let $=ei(K.placement);return $===m||$==="y"}return!0}).map(K=>[K.placement,K.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((K,$)=>K[1]-$[1])[0])==null?void 0:N[0];B&&(U=B);break}case"initialPlacement":U=l;break}if(s!==U)return{reset:{placement:U}}}return{}})}}};function ND(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,s=yield r.isRTL==null?void 0:r.isRTL(o.floating),i=rs(n),a=Dc(n),l=ei(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,d=_c(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var VC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:s,y:i,placement:a,middlewareData:l}=n,c=yield ND(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:P(S({},c),{placement:a})}})}}},$C=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:s}=n,y=_c(e,n),{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:h=>{let{x:m,y:w}=h;return{x:m,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield Cv(n,c),f=ei(rs(s)),p=Sv(f),v=u[p],g=u[f];if(i){let h=p==="y"?"top":"left",m=p==="y"?"bottom":"right",w=v+d[h],E=v-d[m];v=wv(w,v,E)}if(a){let h=f==="y"?"top":"left",m=f==="y"?"bottom":"right",w=g+d[h],E=g-d[m];g=wv(w,g,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:g}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:i,[f]:a}}})})}}};function KC(e){let t=fn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Nc(n)!==s||Nc(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Rv(e){return Ne(e)?e:e.contextElement}function ba(e){let t=Rv(e);if(!Xe(t))return cr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:s}=KC(t),i=(s?Nc(n.width):n.width)/r,a=(s?Nc(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var OD=cr(0);function GC(e){let t=Kt(e);return!va()||!t.visualViewport?OD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kt(e)?!1:t}function ni(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=Rv(e),i=cr(1);t&&(r?Ne(r)&&(i=ba(r)):i=ba(e));let a=_D(s,n,r)?GC(s):cr(0),l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){let f=Kt(s),p=r&&Ne(r)?Kt(r):r,v=f,g=lp(v);for(;g&&r&&p!==v;){let x=ba(g),y=g.getBoundingClientRect(),h=fn(g),m=y.left+(g.clientLeft+parseFloat(h.paddingLeft))*x.x,w=y.top+(g.clientTop+parseFloat(h.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=m,c+=w,v=Kt(g),g=lp(v)}}return ti({width:u,height:d,x:l,y:c})}function Pv(e,t){let n=Lc(e).scrollLeft;return t?t.left+n:ni(ar(e)).left+n}function qC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Pv(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function DD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,s=o==="fixed",i=ar(r),a=t?Ic(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=cr(1),u=cr(0),d=Xe(r);if((d||!d&&!s)&&((Lr(r)!=="body"||ya(i))&&(l=Lc(r)),Xe(r))){let p=ni(r);c=ba(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=i&&!d&&!s?qC(i,l,!0):cr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function FD(e){return Array.from(e.getClientRects())}function zD(e){let t=ar(e),n=Lc(e),r=e.ownerDocument.body,o=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+Pv(e),a=-n.scrollTop;return fn(r).direction==="rtl"&&(i+=uo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function HD(e,t){let n=Kt(e),r=ar(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;let c=va();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function BD(e,t){let n=ni(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?ba(e):cr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function jC(e,t,n){let r;if(t==="viewport")r=HD(e,n);else if(t==="document")r=zD(ar(e));else if(Ne(t))r=BD(t,n);else{let o=GC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ti(r)}function YC(e,t){let n=ir(e);return n===t||!Ne(n)||lr(n)?!1:fn(n).position==="fixed"||YC(n,t)}function UD(e,t){let n=t.get(e);if(n)return n;let r=kn(e,[],!1).filter(a=>Ne(a)&&Lr(a)!=="body"),o=null,s=fn(e).position==="fixed",i=s?ir(e):e;for(;Ne(i)&&!lr(i);){let a=fn(i),l=ap(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ya(i)&&!l&&YC(e,i))?r=r.filter(u=>u!==i):o=a,i=ir(i)}return t.set(e,r),r}function VD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?Ic(t)?[]:UD(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{let d=jC(t,u,o);return c.top=uo(d.top,c.top),c.right=wa(d.right,c.right),c.bottom=wa(d.bottom,c.bottom),c.left=uo(d.left,c.left),c},jC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $D(e){let{width:t,height:n}=KC(e);return{width:t,height:n}}function jD(e,t,n){let r=Xe(t),o=ar(t),s=n==="fixed",i=ni(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=cr(0);if(r||!r&&!s)if((Lr(t)!=="body"||ya(o))&&(a=Lc(t)),r){let f=ni(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Pv(o));let c=o&&!r&&!s?qC(o,a):cr(0),u=i.left+a.scrollLeft-l.x-c.x,d=i.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function kv(e){return fn(e).position==="static"}function WC(e,t){if(!Xe(e)||fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ar(e)===n&&(n=n.ownerDocument.body),n}function XC(e,t){let n=Kt(e);if(Ic(e))return n;if(!Xe(e)){let o=ir(e);for(;o&&!lr(o);){if(Ne(o)&&!kv(o))return o;o=ir(o)}return n}let r=WC(e,t);for(;r&&wC(r)&&kv(r);)r=WC(r,t);return r&&lr(r)&&kv(r)&&!ap(r)?n:r||SC(e)||n}var WD=function(e){return I(this,null,function*(){let t=this.getOffsetParent||XC,n=this.getDimensions,r=yield n(e.floating);return{reference:jD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function KD(e){return fn(e).direction==="rtl"}var Av={convertOffsetParentRelativeRectToViewportRelativeRect:DD,getDocumentElement:ar,getClippingRect:VD,getOffsetParent:XC,getElementRects:WD,getClientRects:FD,getDimensions:$D,getScale:ba,isElement:Ne,isRTL:KD};function QC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function GD(e,t){let n=null,r,o=ar(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Oc(d),g=Oc(o.clientWidth-(u+f)),x=Oc(o.clientHeight-(d+p)),y=Oc(u),m={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:uo(0,wa(1,l))||1},w=!0;function E(k){let C=k[0].intersectionRatio;if(C!==l){if(!w)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!QC(c,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,P(S({},m),{root:o.ownerDocument}))}catch(k){n=new IntersectionObserver(E,m)}n.observe(e)}return i(!0),s}function gp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Rv(e),u=o||s?[...c?kn(c):[],...kn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});let d=c&&a?GD(c,n):null,f=-1,p=null;i&&(p=new ResizeObserver(y=>{let[h]=y;h&&h.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var m;(m=p)==null||m.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?ni(e):null;l&&x();function x(){let y=ni(e);g&&!QC(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(h=>{o&&h.removeEventListener("scroll",n),s&&h.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var ZC=VC;var JC=$C,ek=UC;var hp=(e,t,n)=>{let r=new Map,o=S({platform:Av},n),s=P(S({},o.platform),{_c:r});return BC(e,t,P(S({},o),{platform:s}))};var nt=b(Y(),1),xp=b(Y(),1),rk=b($l(),1);var yp=typeof document!="undefined"?xp.useLayoutEffect:xp.useEffect;function vp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!vp(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ok(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tk(e,t){let n=ok(e);return Math.round(t*n)/n}function Iv(e){let t=nt.useRef(e);return yp(()=>{t.current=e}),t}function sk(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);vp(f,r)||p(r);let[v,g]=nt.useState(null),[x,y]=nt.useState(null),h=nt.useCallback(U=>{U!==k.current&&(k.current=U,g(U))},[]),m=nt.useCallback(U=>{U!==C.current&&(C.current=U,y(U))},[]),w=s||v,E=i||x,k=nt.useRef(null),C=nt.useRef(null),A=nt.useRef(u),V=l!=null,O=Iv(l),L=Iv(o),J=Iv(c),X=nt.useCallback(()=>{if(!k.current||!C.current)return;let U={placement:t,strategy:n,middleware:f};L.current&&(U.platform=L.current),hp(k.current,C.current,U).then(B=>{let K=P(S({},B),{isPositioned:J.current!==!1});N.current&&!vp(A.current,K)&&(A.current=K,rk.flushSync(()=>{d(K)}))})},[f,t,n,L,J]);yp(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(U=>P(S({},U),{isPositioned:!1})))},[c]);let N=nt.useRef(!1);yp(()=>(N.current=!0,()=>{N.current=!1}),[]),yp(()=>{if(w&&(k.current=w),E&&(C.current=E),w&&E){if(O.current)return O.current(w,E,X);X()}},[w,E,X,O,V]);let F=nt.useMemo(()=>({reference:k,floating:C,setReference:h,setFloating:m}),[h,m]),se=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),G=nt.useMemo(()=>{let U={position:n,left:0,top:0};if(!se.floating)return U;let B=tk(se.floating,u.x),K=tk(se.floating,u.y);return a?S(P(S({},U),{transform:"translate("+B+"px, "+K+"px)"}),ok(se.floating)>=1.5&&{willChange:"transform"}):{position:n,left:B,top:K}},[n,a,se.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:X,refs:F,elements:se,floatingStyles:G}),[u,X,F,se,G])}var wp=(e,t)=>P(S({},ZC(e)),{options:[e,t]}),Lv=(e,t)=>P(S({},JC(e)),{options:[e,t]});var Mv=(e,t)=>P(S({},ek(e)),{options:[e,t]});function Bv(e){let t=M.useRef(void 0),n=M.useCallback(r=>{let o=e.map(s=>{if(s!=null){if(typeof s=="function"){let i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},e);return M.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var Sk=S({},M),qD=Sk.useInsertionEffect,YD=qD||(e=>e());function Rn(e){let t=M.useRef(()=>{});return YD(()=>{t.current=e}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var XD="ArrowUp",QD="ArrowDown",ZD="ArrowLeft",JD="ArrowRight";var pn=typeof document!="undefined"?Pa.useLayoutEffect:Pa.useEffect;var e3=[ZD,JD],t3=[XD,QD],xB=[...e3,...t3];var ik=!1,n3=0,ak=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+n3++;function r3(){let[e,t]=M.useState(()=>ik?ak():void 0);return pn(()=>{e==null&&t(ak())},[]),M.useEffect(()=>{ik=!0},[]),e}var o3=Sk.useId,Uv=o3||r3;function s3(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var i3=M.createContext(null),a3=M.createContext(null),Vv=()=>{var e;return((e=M.useContext(i3))==null?void 0:e.id)||null},Tp=()=>M.useContext(a3);function Ra(e){return"data-floating-ui-"+e}function ur(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Ca(e){let t=(0,Pa.useRef)(e);return pn(()=>{t.current=e}),t}var lk=Ra("safe-polygon");function Nv(e,t,n){return n&&!xa(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function bk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Tp(),v=Vv(),g=Ca(c),x=Ca(l),y=Ca(n),h=M.useRef(),m=M.useRef(-1),w=M.useRef(),E=M.useRef(-1),k=M.useRef(!0),C=M.useRef(!1),A=M.useRef(()=>{}),V=M.useRef(!1),O=M.useCallback(()=>{var G;let U=(G=o.current.openEvent)==null?void 0:G.type;return(U==null?void 0:U.includes("mouse"))&&U!=="mousedown"},[o]);M.useEffect(()=>{if(!a)return;function G(U){let{open:B}=U;B||(ur(m),ur(E),k.current=!0,V.current=!1)}return s.on("openchange",G),()=>{s.off("openchange",G)}},[a,s]),M.useEffect(()=>{if(!a||!g.current||!n)return;function G(B){O()&&r(!1,B,"hover")}let U=yt(i.floating).documentElement;return U.addEventListener("mouseleave",G),()=>{U.removeEventListener("mouseleave",G)}},[i.floating,n,r,a,g,O]);let L=M.useCallback(function(G,U,B){U===void 0&&(U=!0),B===void 0&&(B="hover");let K=Nv(x.current,"close",h.current);K&&!w.current?(ur(m),m.current=window.setTimeout(()=>r(!1,G,B),K)):U&&(ur(m),r(!1,G,B))},[x,r]),J=Rn(()=>{A.current(),w.current=void 0}),X=Rn(()=>{if(C.current){let G=yt(i.floating).body;G.style.pointerEvents="",G.removeAttribute(lk),C.current=!1}}),N=Rn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);M.useEffect(()=>{if(!a)return;function G($){if(ur(m),k.current=!1,u&&!xa(h.current)||d>0&&!Nv(x.current,"open"))return;let W=Nv(x.current,"open",h.current);W?m.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},W):n||r(!0,$,"hover")}function U($){if(N())return;A.current();let W=yt(i.floating);if(ur(E),V.current=!1,g.current&&o.current.floatingContext){n||ur(m),w.current=g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){X(),J(),N()||L($,!0,"safe-polygon")}}));let fe=w.current;W.addEventListener("mousemove",fe),A.current=()=>{W.removeEventListener("mousemove",fe)};return}(h.current==="touch"?!ht(i.floating,$.relatedTarget):!0)&&L($)}function B($){N()||o.current.floatingContext&&(g.current==null||g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){X(),J(),N()||L($)}}))($))}if(Ne(i.domReference)){var K;let $=i.domReference;return n&&$.addEventListener("mouseleave",B),(K=i.floating)==null||K.addEventListener("mouseleave",B),f&&$.addEventListener("mousemove",G,{once:!0}),$.addEventListener("mouseenter",G),$.addEventListener("mouseleave",U),()=>{var W;n&&$.removeEventListener("mouseleave",B),(W=i.floating)==null||W.removeEventListener("mouseleave",B),f&&$.removeEventListener("mousemove",G),$.removeEventListener("mouseenter",G),$.removeEventListener("mouseleave",U)}}},[i,a,e,u,d,f,L,J,X,r,n,y,p,x,g,o,N]),pn(()=>{var G;if(a&&n&&(G=g.current)!=null&&G.__options.blockPointerEvents&&O()){C.current=!0;let B=i.floating;if(Ne(i.domReference)&&B){var U;let K=yt(i.floating).body;K.setAttribute(lk,"");let $=i.domReference,W=p==null||(U=p.nodesRef.current.find(z=>z.id===v))==null||(U=U.context)==null?void 0:U.elements.floating;return W&&(W.style.pointerEvents=""),K.style.pointerEvents="none",$.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{K.style.pointerEvents="",$.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,v,i,p,g,O]),pn(()=>{n||(h.current=void 0,V.current=!1,J(),X())},[n,J,X]),M.useEffect(()=>()=>{J(),ur(m),ur(E),X()},[a,i.domReference,J,X]);let F=M.useMemo(()=>{function G(U){h.current=U.pointerType}return{onPointerDown:G,onPointerEnter:G,onMouseMove(U){let{nativeEvent:B}=U;function K(){!k.current&&!y.current&&r(!0,B,"hover")}u&&!xa(h.current)||n||d===0||V.current&&Lm(U.movementX,2)+Lm(U.movementY,2)<2||(ur(E),h.current==="touch"?K():(V.current=!0,E.current=window.setTimeout(K,d)))}}},[u,r,n,y,d]),se=M.useMemo(()=>({onMouseEnter(){ur(m)},onMouseLeave(G){N()||L(G.nativeEvent,!1)}}),[L,N]);return M.useMemo(()=>a?{reference:F,floating:se}:{},[a,F,se])}var ck=0;function Ea(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ck);let s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():ck=requestAnimationFrame(s)}function uk(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){let s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function ka(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var Ta=new WeakMap,Sp=new WeakSet,bp={},Ov=0,l3=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,Ek=e=>e&&(e.host||Ek(e.parentNode)),c3=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=Ek(n);return e.contains(r)?r:null}).filter(n=>n!=null);function u3(e,t,n,r){let o="data-floating-ui-inert",s=r?"inert":n?"aria-hidden":null,i=c3(t,e),a=new Set,l=new Set(i),c=[];bp[o]||(bp[o]=new WeakMap);let u=bp[o];i.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Lr(v)!=="script")if(a.has(v))f(v);else{let g=s?v.getAttribute(s):null,x=g!==null&&g!=="false",y=Ta.get(v)||0,h=s?y+1:y,m=(u.get(v)||0)+1;Ta.set(v,h),u.set(v,m),c.push(v),h===1&&x&&Sp.add(v),m===1&&v.setAttribute(o,""),!x&&s&&v.setAttribute(s,s==="inert"?"":"true")}})}return Ov++,()=>{c.forEach(p=>{let v=Ta.get(p)||0,g=s?v-1:v,x=(u.get(p)||0)-1;Ta.set(p,g),u.set(p,x),g||(!Sp.has(p)&&s&&p.removeAttribute(s),Sp.delete(p)),x||p.removeAttribute(o)}),Ov--,Ov||(Ta=new WeakMap,Ta=new WeakMap,Sp=new WeakSet,bp={})}}function dk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=yt(e[0]).body;return u3(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var Cp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tk(e,t){let n=Fc(e,Cp());t==="prev"&&n.reverse();let r=n.indexOf(ns(yt(e)));return n.slice(r+1)[0]}function Ck(e){return Tk(yt(e).body,"next")||e}function kk(e){return Tk(yt(e).body,"prev")||e}function zc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function d3(e){Fc(e,Cp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function fk(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var kp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ep=M.forwardRef(function(t,n){let[r,o]=M.useState();pn(()=>{kC()&&o("button")},[]);let s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ra("focus-guard")]:"",style:kp};return(0,mn.jsx)("span",S(S({},t),s))}),Rk=M.createContext(null),pk=Ra("portal");function f3(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Uv(),o=Ak(),[s,i]=M.useState(null),a=M.useRef(null);return pn(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),pn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(pk,""),l.appendChild(c),a.current=c,i(c)},[t,r]),pn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ne(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(pk,""),l=c||l,l.appendChild(u),a.current=u,i(u)},[t,n,r,o]),s}function Pk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=f3({id:n,root:r}),[i,a]=M.useState(null),l=M.useRef(null),c=M.useRef(null),u=M.useRef(null),d=M.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,v=!!i&&!i.modal&&i.open&&o&&!!(r||s);return M.useEffect(()=>{if(!s||!o||f)return;function g(x){s&&zc(x)&&(x.type==="focusin"?fk:d3)(s)}return s.addEventListener("focusin",g,!0),s.addEventListener("focusout",g,!0),()=>{s.removeEventListener("focusin",g,!0),s.removeEventListener("focusout",g,!0)}},[s,o,f]),M.useEffect(()=>{s&&(p||fk(s))},[p,s]),(0,mn.jsxs)(Rk.Provider,{value:M.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s]),children:[v&&s&&(0,mn.jsx)(Ep,{"data-type":"outside",ref:l,onFocus:g=>{if(zc(g,s)){var x;(x=u.current)==null||x.focus()}else{let y=i?i.domReference:null,h=kk(y);h==null||h.focus()}}}),v&&s&&(0,mn.jsx)("span",{"aria-owns":s.id,style:kp}),s&&Hv.createPortal(t,s),v&&s&&(0,mn.jsx)(Ep,{"data-type":"outside",ref:c,onFocus:g=>{if(zc(g,s)){var x;(x=d.current)==null||x.focus()}else{let y=i?i.domReference:null,h=Ck(y);h==null||h.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var Ak=()=>M.useContext(Rk),zv="data-floating-ui-focusable";function mk(e){return e?e.hasAttribute(zv)?e:e.querySelector("["+zv+"]")||e:null}function gk(e){return M.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var p3=20,ri=[];function m3(e){ri=ri.filter(t=>t.isConnected),e&&Lr(e)!=="body"&&(ri.push(e),ri.length>p3&&(ri=ri.slice(-20)))}function hk(){return ri.slice().reverse().find(e=>e.isConnected)}function g3(e){let t=Cp();return zC(e,t)?e:Fc(e,t)[0]||e}var h3=M.forwardRef(function(t,n){return(0,mn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:kp}))});function Ik(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:x,dataRef:y,elements:{domReference:h,floating:m}}=t,w=Rn(()=>{var ae;return(ae=y.current.floatingContext)==null?void 0:ae.nodeId}),E=Rn(p),k=typeof i=="number"&&i<0,C=xv(h)&&k,A=l3(),V=A?s:!0,O=!V||A&&f,L=Ca(o),J=Ca(i),X=Ca(a),N=Tp(),F=Ak(),se=M.useRef(null),G=M.useRef(null),U=M.useRef(!1),B=M.useRef(!1),K=M.useRef(-1),$=F!=null,W=mk(m),z=Rn(function(ae){return ae===void 0&&(ae=W),ae?Fc(ae,Cp()):[]}),fe=Rn(ae=>{let Q=z(ae);return L.current.map(le=>h&&le==="reference"?h:W&&le==="floating"?W:Q).filter(Boolean).flat()});M.useEffect(()=>{if(r||!c)return;function ae(le){if(le.key==="Tab"){ht(W,ns(yt(W)))&&z().length===0&&!C&&up(le);let pe=fe(),je=co(le);L.current[0]==="reference"&&je===h&&(up(le),le.shiftKey?Ea(pe[pe.length-1]):Ea(pe[1])),L.current[1]==="floating"&&je===W&&le.shiftKey&&(up(le),Ea(pe[0]))}}let Q=yt(W);return Q.addEventListener("keydown",ae),()=>{Q.removeEventListener("keydown",ae)}},[r,h,W,c,L,C,z,fe]),M.useEffect(()=>{if(r||!m)return;function ae(Q){let le=co(Q),je=z().indexOf(le);je!==-1&&(K.current=je)}return m.addEventListener("focusin",ae),()=>{m.removeEventListener("focusin",ae)}},[r,m,z]),M.useEffect(()=>{if(r||!d)return;function ae(){B.current=!0,setTimeout(()=>{B.current=!1})}function Q(le){let pe=le.relatedTarget;queueMicrotask(()=>{let je=w(),xt=!(ht(h,pe)||ht(m,pe)||ht(pe,m)||ht(F==null?void 0:F.portalNode,pe)||pe!=null&&pe.hasAttribute(Ra("focus-guard"))||N&&(ka(N.nodesRef.current,je).find(Qe=>{var He,Ze;return ht((He=Qe.context)==null?void 0:He.elements.floating,pe)||ht((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||uk(N.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,mk((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&xt&&ns(yt(W))===yt(W).body){Xe(W)&&W.focus();let Qe=K.current,He=z(),Ze=He[Qe]||He[He.length-1]||W;Xe(Ze)&&Ze.focus()}(C||!c)&&pe&&xt&&!B.current&&pe!==hk()&&(U.current=!0,g(!1,le,"focus-out"))})}if(m&&Xe(h))return h.addEventListener("focusout",Q),h.addEventListener("pointerdown",ae),m.addEventListener("focusout",Q),()=>{h.removeEventListener("focusout",Q),h.removeEventListener("pointerdown",ae),m.removeEventListener("focusout",Q)}},[r,h,m,W,c,N,F,g,d,l,z,C,w]);let de=M.useRef(null),Ee=M.useRef(null),me=gk([de,F==null?void 0:F.beforeInsideRef]),re=gk([Ee,F==null?void 0:F.afterInsideRef]);M.useEffect(()=>{var ae,Q;if(r||!m)return;let le=Array.from((F==null||(ae=F.portalNode)==null?void 0:ae.querySelectorAll("["+Ra("portal")+"]"))||[]),pe=N?uk(N.nodesRef.current,w()):[],je=N&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],xt=(Q=pe.find(Ze=>{var dt;return xv(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(Q=Q.context)==null?void 0:Q.elements.domReference,Qe=[m,xt,...le,...je,...E(),se.current,G.current,de.current,Ee.current,F==null?void 0:F.beforeOutsideRef.current,F==null?void 0:F.afterOutsideRef.current,L.current.includes("reference")||C?h:null].filter(Ze=>Ze!=null),He=c||C?dk(Qe,!O,O):dk(Qe);return()=>{He()}},[r,h,m,c,L,F,C,V,O,N,w,E]),pn(()=>{if(r||!Xe(W))return;let ae=yt(W),Q=ns(ae);queueMicrotask(()=>{let le=fe(W),pe=J.current,je=(typeof pe=="number"?le[pe]:pe.current)||W,xt=ht(W,Q);!k&&!xt&&v&&Ea(je,{preventScroll:je===W})})},[r,v,W,k,fe,J]),pn(()=>{if(r||!W)return;let ae=!1,Q=!1,le=yt(W),pe=ns(le),xt=y.current.openEvent;m3(pe);function Qe(dt){let{open:gs,reason:hs,event:en,nested:yr}=dt;if(gs&&(xt=en),hs==="escape-key"&&(Q=!0),["hover","safe-polygon"].includes(hs)&&en.type==="mouseleave"&&(U.current=!0),hs==="outside-press")if(yr)U.current=!1,ae=!0;else if(TC(en)||CC(en))U.current=!1;else{let Br=!1;document.createElement("div").focus({get preventScroll(){return Br=!0,!1}}),Br?(U.current=!1,ae=!0):U.current=!0}}x.on("openchange",Qe);let He=le.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,kp),$&&h&&h.insertAdjacentElement("afterend",He);function Ze(){return typeof X.current=="boolean"?Q&&h?h:hk()||He:X.current.current||He}return()=>{x.off("openchange",Qe);let dt=ns(le),gs=ht(m,dt)||N&&ka(N.nodesRef.current,w()).some(en=>{var yr;return ht((yr=en.context)==null?void 0:yr.elements.floating,dt)});(gs||xt&&["click","mousedown"].includes(xt.type))&&(Q=!0);let hs=Ze();queueMicrotask(()=>{let en=g3(hs);X.current&&!U.current&&Xe(en)&&(!(en!==dt&&dt!==le.body)||gs)&&en.focus({preventScroll:ae}),He.remove()})}},[r,m,W,X,y,x,N,$,h,w]),M.useEffect(()=>{queueMicrotask(()=>{U.current=!1})},[r]),pn(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:h}),()=>{F.setFocusManagerState(null)}},[r,F,c,v,g,d,h]),pn(()=>{if(r||!W||typeof MutationObserver!="function"||k)return;let ae=()=>{let le=W.getAttribute("tabindex"),pe=z(),je=ns(yt(m)),xt=pe.indexOf(je);xt!==-1&&(K.current=xt),L.current.includes("floating")||je!==h&&pe.length===0?le!=="0"&&W.setAttribute("tabindex","0"):le!=="-1"&&W.setAttribute("tabindex","-1")};ae();let Q=new MutationObserver(ae);return Q.observe(W,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}},[r,m,W,h,L,z,k]);function Ce(ae){return r||!u||!c?null:(0,mn.jsx)(h3,{ref:ae==="start"?se:G,onClick:Q=>g(!1,Q.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let ot=!r&&V&&(c?!C:!0)&&($||c);return(0,mn.jsxs)(mn.Fragment,{children:[ot&&(0,mn.jsx)(Ep,{"data-type":"inside",ref:me,onFocus:ae=>{if(c){let le=fe();Ea(o[0]==="reference"?le[0]:le[le.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(U.current=!1,zc(ae,F.portalNode)){let le=Ck(h);le==null||le.focus()}else{var Q;(Q=F.beforeOutsideRef.current)==null||Q.focus()}}}),!C&&Ce("start"),n,Ce("end"),ot&&(0,mn.jsx)(Ep,{"data-type":"inside",ref:re,onFocus:ae=>{if(c)Ea(fe()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(U.current=!0),zc(ae,F.portalNode)){let le=kk(h);le==null||le.focus()}else{var Q;(Q=F.afterOutsideRef.current)==null||Q.focus()}}})]})}function yk(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function y3(e){return Xe(e.target)&&e.target.tagName==="A"}function vk(e){return vv(e)}function Lk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=M.useRef(),p=M.useRef(!1),v=M.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let x=f.current;g.button===0&&a!=="click"&&(xa(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}xa(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||yk(g))&&(g.key===" "&&!vk(s)&&(g.preventDefault(),p.current=!0),!y3(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||yk(g)||vk(s)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,d,l]);return M.useMemo(()=>i?{reference:v}:{},[i,v])}var v3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},x3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xk=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Mk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,g=Tp(),x=Rn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,h=M.useRef(!1),m=M.useRef(!1),{escapeKey:w,outsidePress:E}=xk(p),{escapeKey:k,outsidePress:C}=xk(v),A=M.useRef(!1),V=Rn(F=>{var se;if(!n||!i||!a||F.key!=="Escape"||A.current)return;let G=(se=s.current.floatingContext)==null?void 0:se.nodeId,U=g?ka(g.nodesRef.current,G):[];if(!w&&(F.stopPropagation(),U.length>0)){let B=!0;if(U.forEach(K=>{var $;if(($=K.context)!=null&&$.open&&!K.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,RC(F)?F.nativeEvent:F,"escape-key")}),O=Rn(F=>{var se;let G=()=>{var U;V(F),(U=co(F))==null||U.removeEventListener("keydown",G)};(se=co(F))==null||se.addEventListener("keydown",G)}),L=Rn(F=>{var se;let G=h.current;h.current=!1;let U=m.current;if(m.current=!1,c==="click"&&U||G||typeof y=="function"&&!y(F))return;let B=co(F),K="["+Ra("inert")+"]",$=yt(o.floating).querySelectorAll(K),W=Ne(B)?B:null;for(;W&&!lr(W);){let Ee=ir(W);if(lr(Ee)||!Ne(Ee))break;W=Ee}if($.length&&Ne(B)&&!PC(B)&&!ht(B,o.floating)&&Array.from($).every(Ee=>!ht(W,Ee)))return;if(Xe(B)&&N){let Ee=lr(B),me=fn(B),re=/auto|scroll/,Ce=Ee||re.test(me.overflowX),ot=Ee||re.test(me.overflowY),ae=Ce&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,Q=ot&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,le=me.direction==="rtl",pe=Q&&(le?F.offsetX<=B.offsetWidth-B.clientWidth:F.offsetX>B.clientWidth),je=ae&&F.offsetY>B.clientHeight;if(pe||je)return}let z=(se=s.current.floatingContext)==null?void 0:se.nodeId,fe=g&&ka(g.nodesRef.current,z).some(Ee=>{var me;return cp(F,(me=Ee.context)==null?void 0:me.elements.floating)});if(cp(F,o.floating)||cp(F,o.domReference)||fe)return;let de=g?ka(g.nodesRef.current,z):[];if(de.length>0){let Ee=!0;if(de.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){Ee=!1;return}}),!Ee)return}r(!1,F,"outside-press")}),J=Rn(F=>{var se;let G=()=>{var U;L(F),(U=co(F))==null||U.removeEventListener(c,G)};(se=co(F))==null||se.addEventListener(c,G)});M.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let F=-1;function se($){r(!1,$,"ancestor-scroll")}function G(){window.clearTimeout(F),A.current=!0}function U(){F=window.setTimeout(()=>{A.current=!1},va()?5:0)}let B=yt(o.floating);a&&(B.addEventListener("keydown",k?O:V,k),B.addEventListener("compositionstart",G),B.addEventListener("compositionend",U)),y&&B.addEventListener(c,C?J:L,C);let K=[];return f&&(Ne(o.domReference)&&(K=kn(o.domReference)),Ne(o.floating)&&(K=K.concat(kn(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(K=K.concat(kn(o.reference.contextElement)))),K=K.filter($=>{var W;return $!==((W=B.defaultView)==null?void 0:W.visualViewport)}),K.forEach($=>{$.addEventListener("scroll",se,{passive:!0})}),()=>{a&&(B.removeEventListener("keydown",k?O:V,k),B.removeEventListener("compositionstart",G),B.removeEventListener("compositionend",U)),y&&B.removeEventListener(c,C?J:L,C),K.forEach($=>{$.removeEventListener("scroll",se)}),window.clearTimeout(F)}},[s,o,a,y,c,n,r,f,i,w,E,V,k,O,L,C,J]),M.useEffect(()=>{h.current=!1},[y,c]);let X=M.useMemo(()=>S({onKeyDown:V},u&&S({[v3[d]]:F=>{r(!1,F.nativeEvent,"reference-press")}},d!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}})),[V,r,u,d]),N=M.useMemo(()=>({onKeyDown:V,onMouseDown(){m.current=!0},onMouseUp(){m.current=!0},[x3[c]]:()=>{h.current=!0}}),[V,c]);return M.useMemo(()=>i?{reference:X,floating:N}:{},[i,X,N])}function w3(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=Uv(),s=M.useRef({}),[i]=M.useState(()=>s3()),a=Vv()!=null,[l,c]=M.useState(r.reference),u=Rn((p,v,g)=>{s.current.openEvent=p?v:void 0,i.emit("openchange",{open:p,event:v,reason:g,nested:a}),n==null||n(p,v,g)}),d=M.useMemo(()=>({setPositionReference:c}),[]),f=M.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return M.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}function Nk(e){e===void 0&&(e={});let{nodeId:t}=e,n=w3(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[s,i]=M.useState(null),[a,l]=M.useState(null),u=(o==null?void 0:o.domReference)||s,d=M.useRef(null),f=Tp();pn(()=>{u&&(d.current=u)},[u]);let p=sk(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=M.useCallback(m=>{let w=Ne(m)?{getBoundingClientRect:()=>m.getBoundingClientRect(),getClientRects:()=>m.getClientRects(),contextElement:m}:m;l(w),p.refs.setReference(w)},[p.refs]),g=M.useCallback(m=>{(Ne(m)||m===null)&&(d.current=m,i(m)),(Ne(p.refs.reference.current)||p.refs.reference.current===null||m!==null&&!Ne(m))&&p.refs.setReference(m)},[p.refs]),x=M.useMemo(()=>P(S({},p.refs),{setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=M.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),h=M.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return pn(()=>{r.dataRef.current.floatingContext=h;let m=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);m&&(m.context=h)}),M.useMemo(()=>P(S({},p),{context:h,refs:x,elements:y}),[p,x,y,h])}var _v="active",Dv="selected";function Fv(e,t,n){let r=new Map,o=n==="item",s=e;if(o&&e){let i=e,{[_v]:a,[Dv]:l}=i;s=oe(i,[Mm(_v),Mm(Dv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[zv]:""}),s),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(o&&[_v,Dv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,g=new Array(v),x=0;x<v;x++)g[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...g)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function Ok(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=M.useCallback(a=>Fv(a,e,"reference"),t),s=M.useCallback(a=>Fv(a,e,"floating"),n),i=M.useCallback(a=>Fv(a,e,"item"),r);return M.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}var S3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _k(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:s=!0,role:i="dialog"}=t,a=(n=S3.get(i))!=null?n:i,l=Uv(),u=Vv()!=null,d=M.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o:void 0},a==="listbox"&&{role:"combobox"}),a==="menu"&&{id:l}),a==="menu"&&u&&{role:"menuitem"}),i==="select"&&{"aria-autocomplete":"none"}),i==="combobox"&&{"aria-autocomplete":"list"}),[a,o,u,r,l,i]),f=M.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||i==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,i]),p=M.useCallback(v=>{let{active:g,selected:x}=v,y=S({role:"option"},g&&{id:o+"-option"});switch(i){case"select":return P(S({},y),{"aria-selected":g&&x});case"combobox":return S(S({},y),g&&{"aria-selected":!0})}return{}},[o,i]);return M.useMemo(()=>s?{reference:d,floating:f,item:p}:{},[s,d,f,p])}function wk(e,t){let[n,r]=e,o=!1,s=t.length;for(let i=0,a=s-1;i<s;a=i++){let[l,c]=t[i]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function b3(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Dk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,s=!1,i=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(i===null||a===null||v===0)return i=d,a=f,l=p,null;let g=d-i,x=f-a,h=Math.sqrt(g*g+x*x)/v;return i=d,a=f,l=p,h}let u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:x,nodeId:y,tree:h}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;let{clientX:k,clientY:C}=w,A=[k,C],V=co(w),O=w.type==="mouseleave",L=ht(g.floating,V),J=ht(g.domReference,V),X=g.domReference.getBoundingClientRect(),N=g.floating.getBoundingClientRect(),F=v.split("-")[0],se=f>N.right-N.width/2,G=p>N.bottom-N.height/2,U=b3(A,X),B=N.width>X.width,K=N.height>X.height,$=(B?X:N).left,W=(B?X:N).right,z=(K?X:N).top,fe=(K?X:N).bottom;if(L&&(s=!0,!O))return;if(J&&(s=!1),J&&!O){s=!0;return}if(O&&Ne(w.relatedTarget)&&ht(g.floating,w.relatedTarget)||h&&ka(h.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(F==="top"&&p>=X.bottom-1||F==="bottom"&&p<=X.top+1||F==="left"&&f>=X.right-1||F==="right"&&f<=X.left+1)return E();let de=[];switch(F){case"top":de=[[$,X.top+1],[$,N.bottom-1],[W,N.bottom-1],[W,X.top+1]];break;case"bottom":de=[[$,N.top+1],[$,X.bottom-1],[W,X.bottom-1],[W,N.top+1]];break;case"left":de=[[N.right-1,fe],[N.right-1,z],[X.left+1,z],[X.left+1,fe]];break;case"right":de=[[X.right-1,fe],[X.right-1,z],[N.left+1,z],[N.left+1,fe]];break}function Ee(me){let[re,Ce]=me;switch(F){case"top":{let ot=[B?re+t/2:se?re+t*4:re-t*4,Ce+t+1],ae=[B?re-t/2:se?re+t*4:re-t*4,Ce+t+1],Q=[[N.left,se||B?N.bottom-t:N.top],[N.right,se?B?N.bottom-t:N.top:N.bottom-t]];return[ot,ae,...Q]}case"bottom":{let ot=[B?re+t/2:se?re+t*4:re-t*4,Ce-t],ae=[B?re-t/2:se?re+t*4:re-t*4,Ce-t],Q=[[N.left,se||B?N.top+t:N.bottom],[N.right,se?B?N.top+t:N.bottom:N.top+t]];return[ot,ae,...Q]}case"left":{let ot=[re+t+1,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ae=[re+t+1,K?Ce-t/2:G?Ce+t*4:Ce-t*4];return[...[[G||K?N.right-t:N.left,N.top],[G?K?N.right-t:N.left:N.right-t,N.bottom]],ot,ae]}case"right":{let ot=[re-t,K?Ce+t/2:G?Ce+t*4:Ce-t*4],ae=[re-t,K?Ce-t/2:G?Ce+t*4:Ce-t*4],Q=[[G||K?N.left+t:N.right,N.top],[G?K?N.left+t:N.right:N.left+t,N.bottom]];return[ot,ae,...Q]}}}if(!wk([k,C],de)){if(s&&!U)return E();if(!O&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}wk([k,C],Ee([f,p]))?!s&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var Rp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function E3({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:s}={}){let[i,a]=Mr.useState(e),l=o!=null?o:i,c=s!=null?s:a,u=Nk({placement:t,open:l,onOpenChange:c,whileElementsMounted:gp,middleware:[wp(5),Mv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),Lv({padding:10})]}),d=u.context,f=Lk(d,{enabled:o==null}),p=Mk(d),v=_k(d),g=bk(d,{enabled:r!=null?r:!1,handleClose:Dk()}),x=Ok([f,p,v,g]);return Mr.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var Fk=Mr.createContext(null),$v=()=>{let e=Mr.useContext(Fk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},oi=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let s=E3(S({modal:t},n));return(0,Hn.jsx)(Fk.Provider,{value:s,children:e})};function T3(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let s=$v(),i=e||"button",a=t.ref,l=Bv([s.refs.setReference,a]);return(0,Hn.jsx)(i,P(S({ref:l,type:"button"},s.getReferenceProps(n)),{children:t}))}var C3=Mr.forwardRef(function(o,r){var s=o,{style:t}=s,n=oe(s,["style"]);let c=$v(),{context:i}=c,a=oe(c,["context"]),l=Bv([a.refs.setFloating,r]);return i.open?(0,Hn.jsx)(Pk,{children:(0,Hn.jsx)(Ik,{context:i,modal:a.modal,disabled:n.disableFocusManager,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function k3(o){var s=o,{as:e,children:t,onClick:n}=s,r=oe(s,["as","children","onClick"]);let{setOpen:i}=$v();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),i(!1),c.stopPropagation()}},r),{children:t}))}function zk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(oi,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(oi.Content,{className:Rp.tooltip,children:[t,(0,Hn.jsx)("div",{className:Rp.arrow})]}),(0,Hn.jsx)(oi.Trigger,{className:Rp.tooltipTrigger,children:e})]})}oi.Trigger=T3;oi.Content=C3;oi.Button=k3;var vt=oi;var Gt=b(R()),R3=3,P3=90,Hk=({children:e})=>{let t=_("CommandPalette",Cn);return(0,Gt.jsx)("div",{className:t.listItemActions,children:e})};function jv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:s,onSourceClick:i,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:d=R3}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var O;let g=ie(io),[x,y]=(0,os.useState)(!1),{selected:h,onChangeOpen:m}=ts(),[w,E]=(0,os.useState)(!1),k=_("CommandPalette",Cn);function C(L){o(L),e&&m(!1)}let A=(0,os.useMemo)(()=>typeof a!="string"?a:Ac(a)?gv(a).trim():a,[a]),V=(0,os.useMemo)(()=>typeof n!="string"?n:Ac(n)?gv(n).trim():n,[n]);return(0,os.useEffect)(()=>{E(h===c)},[h]),(0,Gt.jsxs)("div",{className:(0,Hc.default)(k.listItem,c===h&&k.listItemSelected),children:[(0,Gt.jsxs)(vt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,Gt.jsx)(vt.Trigger,P(S({className:k.listItemAction,"aria-disabled":(O=f.disabled)!=null?O:!1,onClick:C,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,Gt.jsxs)("div",{className:k.listItemContent,children:[typeof r=="string"?(0,Gt.jsx)("p",{className:(0,Hc.default)(k.listItemText,k.truncate,u==null?void 0:u.title),children:r}):r,A&&typeof A=="string"?(0,Gt.jsx)(Js,{tagName:"p",allowList:[],content:A,className:(0,Hc.default)(k.listItemDescription,u==null?void 0:u.description,t?k.lineClamp:k.truncate)}):a]})})),V&&V.length>P3&&(0,Gt.jsx)(vt.Content,{className:k.listItemTooltip,disableFocusManager:!0,children:(0,Gt.jsx)(Js,{className:k.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p","br"],tagName:"div",content:V.replace(/\n/g,"<br />")})})]}),c===h&&s,l&&l.length>0&&(0,Gt.jsxs)("div",{className:k.sources,children:[(0,Gt.jsx)("span",{className:k.sourcesTitle,children:g("sources")}),l.slice(0,x?l.length:d).map(L=>(0,Gt.jsx)("a",{className:k.source,href:L.url,target:"_blank",title:L.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>i==null?void 0:i(L),children:L.name},L.url)),!x&&l.length>d&&(0,Gt.jsx)("button",{className:(0,Hc.default)(k.source,k.sourceShowMore),type:"button",onClick:()=>y(!0),children:g("showMore",{amount:l.length-d})})]})]})}var Bc=b(R()),Bk=()=>(0,Bc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Bc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Bc.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 si=b(R());function Wv({children:e,title:t,id:n,onDismiss:r}){let o=ie(io),s=_("CommandPalette",Cn),{page:i}=ts();return i!==n?null:(0,si.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,si.jsxs)("div",{className:s.pageNav,children:[(0,si.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,si.jsx)(Bk,{}),o("back")]}),t&&(0,si.jsx)("h3",{className:s.pageTitle,children:t})]}),e]})}var Uk=b(Y());var Uc=b(R()),Aa=()=>(0,Uc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Uc.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Uc.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 dr=b(R());function A3({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:s,selectedType:i},a){let l=_("CommandPalette",Cn);return(0,dr.jsxs)("div",{className:l.search,children:[(0,dr.jsx)("div",{className:l.searchIcon,children:(0,dr.jsx)(Aa,{})}),(0,dr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,dr.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:s,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,dr.jsx)("div",{className:l.selectWrapper,children:(0,dr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:i||r,children:[r&&(0,dr.jsx)("option",{children:r}),o.map(c=>(0,dr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var Vk=(0,Uk.forwardRef)(A3);var Kv=b(Oe());var Pp=b(R()),I3=o=>{var s=o,{onClick:e,shortKeys:t,children:n}=s,r=oe(s,["onClick","shortKeys","children"]);let i=_("CommandPalette",Cn);return(0,Pp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,Kv.default)(i.actionButton,r.className,{[i.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,Pp.jsx)("span",{className:(0,Kv.default)(i.actionShortcut,a===8629&&i.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},$k=I3;var Vc=b(R()),L3="[data-command-palette-item]";function ii({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:s,onChangeType:i,onChangeOpen:a,selectedType:l,types:c,children:u,isOpen:d,search:f,updateDeps:p=[]}){let[v,g]=(0,fo.useState)(),x=(0,fo.useRef)(null),y=()=>{o&&o(n),i(void 0),s(""),a(!1)},h=()=>{var L;if(r!==n&&o){o(n);return}if(l&&i){i(void 0),(L=x.current)==null||L.focus();return}if(f.length>0){s("");return}a(!1)},m=()=>{let L=w();L.length!==0&&g(L[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(L3)||[]),E=L=>document.querySelector(`[data-item-id=${L}]`),k=L=>{let J=E(L);J&&g(J.dataset.itemId)},C=L=>{let J=E(L);J&&J.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let L=w(),J=E(v);if(!J)return;let X=L.indexOf(J),N=L[X+1];N!=null&&N.dataset.itemId?k(N.dataset.itemId):m()},V=()=>{if(!v)return;let L=w(),J=E(v);if(!J)return;let X=L.indexOf(J),N=L[X-1];N!=null&&N.dataset.itemId?k(N.dataset.itemId):k(L[L.length-1].dataset.itemId)},O=(0,fo.useCallback)(L=>{switch(L.key){case"ArrowDown":{L.preventDefault(),A();break}case"ArrowUp":{L.preventDefault(),V();break}case"Enter":{if(v){let J=E(v);J==null||J.click()}break}}},[v]);return(0,fo.useEffect)(()=>{m()},[f,r,l,d,...p]),(0,fo.useEffect)(()=>{v&&C(v)},[v]),(0,Vc.jsx)(Bf,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:h,onClose:y,onKeyDown:O,children:(0,Vc.jsxs)(yC,{selected:v,setSelected:g,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Vc.jsx)(Vk,{ref:x,onChange:s,onChangeType:i,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}ii.Page=Wv;ii.List=sv;ii.Image=iC;ii.ListItem=jv;ii.ListItemActions=Hk;ii.Button=$k;var qe=ii;var jk=b(Y());function Wk(e,t){(0,jk.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 $c=b(Y());var Kk={data:null,fetchState:"idle"},M3=e=>{var t;return(t=e.entities.data)!=null?t:null},Ap=$t([M3,da,Q1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:s,agentNickname:i}=t!=null?t:{};return s&&s!==o&&r.push(s),i&&i!==o&&r.push(i),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),fr=he("entities/getEntities",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,s=yield o();return s.length===0?Promise.resolve([]):n.getEntities(s)})),N3=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),O3=ke({name:"entities",initialState:Kk,reducers:{},extraReducers:e=>{e.addCase(fr.pending,t=>{t.fetchState="loading"}).addCase(fr.rejected,t=>{t.fetchState="error"}).addCase(fr.fulfilled,(t,n)=>{t.fetchState="done",t.data=N3(t.data?[...t.data,...n.payload]:n.payload)}).addCase(lt,()=>Kk)}}),Gk=O3.reducer;var Gv={};pt(Gv,{enUS:()=>_3,nlNL:()=>D3});var _3={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},D3={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var qk={root:"dd-TYTKs",empty:"dd-AU7uT"};var Ia=b(R()),F3=({onCopy:e})=>{let t=(0,$c.useRef)(null),n=_("EntitiesList",qk),r=j(Ap),{setSelected:o}=ts(),s=ie(Gv),i=ve();return(0,$c.useEffect)(()=>{i(fr())},[]),(0,$c.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Ia.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Ia.jsx)(qe.List,{children:r.map((a,l)=>(0,Ia.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Ia.jsx)("p",{className:n.empty,children:s("noResults")})]})},Yk=F3;var di=b(Y());var La=b(Y());function ai(e,t){let n=(0,La.useRef)(e);n.current=e;let[r,o]=(0,La.useState)(void 0),[s,i]=(0,La.useState)(void 0),[a,l]=(0,La.useState)("idle"),c=ve();return{error:s,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{i(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),i(void 0)}}}var Ip=b(Oe()),Jk=b(Y());var qv=b(R()),Yv=e=>(0,qv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,qv.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 Xv=b(R()),Xk=e=>(0,Xv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Xv.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 Ma(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(s=>{n.classList.add(s)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Qv={};pt(Qv,{enUS:()=>z3,nlNL:()=>H3});var z3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},H3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Qk(e){return he("analytics/logEvent",(t,n)=>{var s,i,a;let r=(i=(s=n.getState())==null?void 0:s.conversation.current)==null?void 0:i.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,P(S({conversationId:r},o),{data:t.data}))})(e)}function ut(){let e=ve();return(t,n)=>I(this,null,function*(){yield e(Qk({name:t,data:n}))})}var Zk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Na=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,s=o||window.location.origin;return r&&!n?null:r&&n?`${s}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${s}${e}`};var po=b(R()),B3=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=_("FeedbackThumbs",Zk),s=te("enableFeedbackForm"),i=j(Rr),a=j(Na(`/admin/feedback?conversationId=${i}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ie(Qv),c=ut(),[u,d]=(0,Jk.useState)(null),f=v=>{v.stopPropagation(),Ma(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Ma(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,po.jsxs)("div",{className:o.thumbs,children:[(0,po.jsx)(ge.Button,{title:l("thumbsUp"),onClick:f,icon:(0,po.jsx)(Xk,{}),className:(0,Ip.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),s&&a?(0,po.jsx)(ge.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,po.jsx)(Yv,{}),className:(0,Ip.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,po.jsx)(ge.Button,{title:l("thumbsDown"),onClick:p,icon:(0,po.jsx)(Yv,{}),className:(0,Ip.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},li=B3;var jc=b(R()),eR=()=>(0,jc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,jc.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,jc.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 Zv={};pt(Zv,{enUS:()=>U3,nlNL:()=>V3});var U3={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"}]},V3={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 tR={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:dR,setPrototypeOf:nR,isFrozen:$3,getPrototypeOf:j3,getOwnPropertyDescriptor:W3}=Object,{freeze:Yt,seal:Bn,create:fR}=Object,{apply:o0,construct:s0}=typeof Reflect!="undefined"&&Reflect;Yt||(Yt=function(t){return t});Bn||(Bn=function(t){return t});o0||(o0=function(t,n,r){return t.apply(n,r)});s0||(s0=function(t,n){return new t(...n)});var Lp=Xt(Array.prototype.forEach),K3=Xt(Array.prototype.lastIndexOf),rR=Xt(Array.prototype.pop),Wc=Xt(Array.prototype.push),G3=Xt(Array.prototype.splice),Np=Xt(String.prototype.toLowerCase),Jv=Xt(String.prototype.toString),oR=Xt(String.prototype.match),Kc=Xt(String.prototype.replace),q3=Xt(String.prototype.indexOf),Y3=Xt(String.prototype.trim),pr=Xt(Object.prototype.hasOwnProperty),qt=Xt(RegExp.prototype.test),Gc=X3(TypeError);function Xt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return o0(e,t,r)}}function X3(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return s0(e,n)}}function xe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Np;nR&&nR(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let s=n(o);s!==o&&($3(t)||(t[r]=s),o=s)}e[o]=!0}return e}function Q3(e){for(let t=0;t<e.length;t++)pr(e,t)||(e[t]=null);return e}function ci(e){let t=fR(null);for(let[n,r]of dR(e))pr(e,n)&&(Array.isArray(r)?t[n]=Q3(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ci(r):t[n]=r);return t}function qc(e,t){for(;e!==null;){let r=W3(e,t);if(r){if(r.get)return Xt(r.get);if(typeof r.value=="function")return Xt(r.value)}e=j3(e)}function n(){return null}return n}var sR=Yt(["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"]),e0=Yt(["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"]),t0=Yt(["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"]),Z3=Yt(["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"]),n0=Yt(["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"]),J3=Yt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),iR=Yt(["#text"]),aR=Yt(["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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),r0=Yt(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),lR=Yt(["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"]),Mp=Yt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),e4=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),t4=Bn(/<%[\w\W]*|[\w\W]*%>/gm),n4=Bn(/\$\{[\w\W]*/gm),r4=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),o4=Bn(/^aria-[\-\w]+$/),pR=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s4=Bn(/^(?:\w+script|data):/i),i4=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mR=Bn(/^html$/i),a4=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),cR=Object.freeze({__proto__:null,ARIA_ATTR:o4,ATTR_WHITESPACE:i4,CUSTOM_ELEMENT:a4,DATA_ATTR:r4,DOCTYPE_NAME:mR,ERB_EXPR:t4,IS_ALLOWED_URI:pR,IS_SCRIPT_OR_DATA:s4,MUSTACHE_EXPR:e4,TMPLIT_EXPR:n4}),Yc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},l4=function(){return typeof window=="undefined"?null:window},c4=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 s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch(i){return console.warn("TrustedTypes policy "+s+" could not be created."),null}},uR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gR(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:l4(),t=ne=>gR(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Yc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,g=qc(v,"cloneNode"),x=qc(v,"remove"),y=qc(v,"nextSibling"),h=qc(v,"childNodes"),m=qc(v,"parentNode");if(typeof i=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:k,createNodeIterator:C,createDocumentFragment:A,getElementsByTagName:V}=n,{importNode:O}=r,L=uR();t.isSupported=typeof dR=="function"&&typeof m=="function"&&k&&k.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:J,ERB_EXPR:X,TMPLIT_EXPR:N,DATA_ATTR:F,ARIA_ATTR:se,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:U,CUSTOM_ELEMENT:B}=cR,{IS_ALLOWED_URI:K}=cR,$=null,W=xe({},[...sR,...e0,...t0,...n0,...iR]),z=null,fe=xe({},[...aR,...r0,...lR,...Mp]),de=Object.seal(fR(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}})),Ee=null,me=null,re=!0,Ce=!0,ot=!1,ae=!0,Q=!1,le=!0,pe=!1,je=!1,xt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,gs=!1,hs="user-content-",en=!0,yr=!1,Br={},bi=null,X0=xe({},["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"]),Q0=null,Z0=xe({},["audio","video","img","source","image","track"]),Tm=null,J0=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),yu="http://www.w3.org/1998/Math/MathML",vu="http://www.w3.org/2000/svg",Ur="http://www.w3.org/1999/xhtml",Ei=Ur,Cm=!1,km=null,XA=xe({},[yu,vu,Ur],Jv),xu=xe({},["mi","mo","mn","ms","mtext"]),wu=xe({},["annotation-xml"]),QA=xe({},["title","style","font","a","script"]),Ga=null,ZA=["application/xhtml+xml","text/html"],JA="text/html",ft=null,Ti=null,eI=n.createElement("form"),ex=function(T){return T instanceof RegExp||T instanceof Function},Rm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ti&&Ti===T)){if((!T||typeof T!="object")&&(T={}),T=ci(T),Ga=ZA.indexOf(T.PARSER_MEDIA_TYPE)===-1?JA:T.PARSER_MEDIA_TYPE,ft=Ga==="application/xhtml+xml"?Jv:Np,$=pr(T,"ALLOWED_TAGS")?xe({},T.ALLOWED_TAGS,ft):W,z=pr(T,"ALLOWED_ATTR")?xe({},T.ALLOWED_ATTR,ft):fe,km=pr(T,"ALLOWED_NAMESPACES")?xe({},T.ALLOWED_NAMESPACES,Jv):XA,Tm=pr(T,"ADD_URI_SAFE_ATTR")?xe(ci(J0),T.ADD_URI_SAFE_ATTR,ft):J0,Q0=pr(T,"ADD_DATA_URI_TAGS")?xe(ci(Z0),T.ADD_DATA_URI_TAGS,ft):Z0,bi=pr(T,"FORBID_CONTENTS")?xe({},T.FORBID_CONTENTS,ft):X0,Ee=pr(T,"FORBID_TAGS")?xe({},T.FORBID_TAGS,ft):{},me=pr(T,"FORBID_ATTR")?xe({},T.FORBID_ATTR,ft):{},Br=pr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Ce=T.ALLOW_DATA_ATTR!==!1,ot=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=T.SAFE_FOR_TEMPLATES||!1,le=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,xt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,gs=T.SANITIZE_NAMED_PROPS||!1,en=T.KEEP_CONTENT!==!1,yr=T.IN_PLACE||!1,K=T.ALLOWED_URI_REGEXP||pR,Ei=T.NAMESPACE||Ur,xu=T.MATHML_TEXT_INTEGRATION_POINTS||xu,wu=T.HTML_INTEGRATION_POINTS||wu,de=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&ex(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&ex(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(Ce=!1),He&&(Qe=!0),Br&&($=xe({},iR),z=[],Br.html===!0&&(xe($,sR),xe(z,aR)),Br.svg===!0&&(xe($,e0),xe(z,r0),xe(z,Mp)),Br.svgFilters===!0&&(xe($,t0),xe(z,r0),xe(z,Mp)),Br.mathMl===!0&&(xe($,n0),xe(z,lR),xe(z,Mp))),T.ADD_TAGS&&($===W&&($=ci($)),xe($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(z===fe&&(z=ci(z)),xe(z,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&xe(Tm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(bi===X0&&(bi=ci(bi)),xe(bi,T.FORBID_CONTENTS,ft)),en&&($["#text"]=!0),pe&&xe($,["html","head","body"]),$.table&&(xe($,["tbody"]),delete Ee.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=c4(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Yt&&Yt(T),Ti=T}},tx=xe({},[...e0,...t0,...Z3]),nx=xe({},[...n0,...J3]),tI=function(T){let H=m(T);(!H||!H.tagName)&&(H={namespaceURI:Ei,tagName:"template"});let ee=Np(T.tagName),Be=Np(H.tagName);return km[T.namespaceURI]?T.namespaceURI===vu?H.namespaceURI===Ur?ee==="svg":H.namespaceURI===yu?ee==="svg"&&(Be==="annotation-xml"||xu[Be]):!!tx[ee]:T.namespaceURI===yu?H.namespaceURI===Ur?ee==="math":H.namespaceURI===vu?ee==="math"&&wu[Be]:!!nx[ee]:T.namespaceURI===Ur?H.namespaceURI===vu&&!wu[Be]||H.namespaceURI===yu&&!xu[Be]?!1:!nx[ee]&&(QA[ee]||!tx[ee]):!!(Ga==="application/xhtml+xml"&&km[T.namespaceURI]):!1},vr=function(T){Wc(t.removed,{element:T});try{m(T).removeChild(T)}catch(H){x(T)}},Su=function(T,H){try{Wc(t.removed,{attribute:H.getAttributeNode(T),from:H})}catch(ee){Wc(t.removed,{attribute:null,from:H})}if(H.removeAttribute(T),T==="is")if(Qe||He)try{vr(H)}catch(ee){}else try{H.setAttribute(T,"")}catch(ee){}},rx=function(T){let H=null,ee=null;if(xt)T="<remove></remove>"+T;else{let wt=oR(T,/^[\r\n\t ]+/);ee=wt&&wt[0]}Ga==="application/xhtml+xml"&&Ei===Ur&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(Ei===Ur)try{H=new f().parseFromString(Be,Ga)}catch(wt){}if(!H||!H.documentElement){H=k.createDocument(Ei,"template",null);try{H.documentElement.innerHTML=Cm?E:Be}catch(wt){}}let kt=H.body||H.documentElement;return T&&ee&&kt.insertBefore(n.createTextNode(ee),kt.childNodes[0]||null),Ei===Ur?V.call(H,pe?"html":"body")[0]:pe?H.documentElement:kt},ox=function(T){return C.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Pm=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},sx=function(T){return typeof a=="function"&&T instanceof a};function Vr(ne,T,H){Lp(ne,ee=>{ee.call(t,T,H,Ti)})}let ix=function(T){let H=null;if(Vr(L.beforeSanitizeElements,T,null),Pm(T))return vr(T),!0;let ee=ft(T.nodeName);if(Vr(L.uponSanitizeElement,T,{tagName:ee,allowedTags:$}),T.hasChildNodes()&&!sx(T.firstElementChild)&&qt(/<[/\w!]/g,T.innerHTML)&&qt(/<[/\w!]/g,T.textContent)||T.nodeType===Yc.progressingInstruction||le&&T.nodeType===Yc.comment&&qt(/<[/\w]/g,T.data))return vr(T),!0;if(!$[ee]||Ee[ee]){if(!Ee[ee]&&lx(ee)&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee)))return!1;if(en&&!bi[ee]){let Be=m(T)||T.parentNode,kt=h(T)||T.childNodes;if(kt&&Be){let wt=kt.length;for(let tn=wt-1;tn>=0;--tn){let xr=g(kt[tn],!0);xr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(xr,y(T))}}}return vr(T),!0}return T instanceof l&&!tI(T)||(ee==="noscript"||ee==="noembed"||ee==="noframes")&&qt(/<\/no(script|embed|frames)/i,T.innerHTML)?(vr(T),!0):(Q&&T.nodeType===Yc.text&&(H=T.textContent,Lp([J,X,N],Be=>{H=Kc(H,Be," ")}),T.textContent!==H&&(Wc(t.removed,{element:T.cloneNode()}),T.textContent=H)),Vr(L.afterSanitizeElements,T,null),!1)},ax=function(T,H,ee){if(dt&&(H==="id"||H==="name")&&(ee in n||ee in eI))return!1;if(!(Ce&&!me[H]&&qt(F,H))){if(!(re&&qt(se,H))){if(!z[H]||me[H]){if(!(lx(T)&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,T)||de.tagNameCheck instanceof Function&&de.tagNameCheck(T))&&(de.attributeNameCheck instanceof RegExp&&qt(de.attributeNameCheck,H)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(H))||H==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&qt(de.tagNameCheck,ee)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ee))))return!1}else if(!Tm[H]){if(!qt(K,Kc(ee,U,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&T!=="script"&&q3(ee,"data:")===0&&Q0[T])){if(!(ot&&!qt(G,Kc(ee,U,"")))){if(ee)return!1}}}}}}return!0},lx=function(T){return T!=="annotation-xml"&&oR(T,B)},cx=function(T){Vr(L.beforeSanitizeAttributes,T,null);let{attributes:H}=T;if(!H||Pm(T))return;let ee={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},Be=H.length;for(;Be--;){let kt=H[Be],{name:wt,namespaceURI:tn,value:xr}=kt,qa=ft(wt),Dt=wt==="value"?xr:Y3(xr);if(ee.attrName=qa,ee.attrValue=Dt,ee.keepAttr=!0,ee.forceKeepAttr=void 0,Vr(L.uponSanitizeAttribute,T,ee),Dt=ee.attrValue,gs&&(qa==="id"||qa==="name")&&(Su(wt,T),Dt=hs+Dt),le&&qt(/((--!?|])>)|<\/(style|title)/i,Dt)){Su(wt,T);continue}if(ee.forceKeepAttr||(Su(wt,T),!ee.keepAttr))continue;if(!ae&&qt(/\/>/i,Dt)){Su(wt,T);continue}Q&&Lp([J,X,N],dx=>{Dt=Kc(Dt,dx," ")});let ux=ft(T.nodeName);if(ax(ux,qa,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!tn)switch(p.getAttributeType(ux,qa)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{tn?T.setAttributeNS(tn,wt,Dt):T.setAttribute(wt,Dt),Pm(T)?vr(T):rR(t.removed)}catch(dx){}}}Vr(L.afterSanitizeAttributes,T,null)},nI=function ne(T){let H=null,ee=ox(T);for(Vr(L.beforeSanitizeShadowDOM,T,null);H=ee.nextNode();)Vr(L.uponSanitizeShadowNode,H,null),ix(H),cx(H),H.content instanceof s&&ne(H.content);Vr(L.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,ee=null,Be=null,kt=null;if(Cm=!ne,Cm&&(ne="<!-->"),typeof ne!="string"&&!sx(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Gc("dirty is not a string, aborting")}else throw Gc("toString is not a function");if(!t.isSupported)return ne;if(je||Rm(T),t.removed=[],typeof ne=="string"&&(yr=!1),yr){if(ne.nodeName){let xr=ft(ne.nodeName);if(!$[xr]||Ee[xr])throw Gc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)H=rx("<!---->"),ee=H.ownerDocument.importNode(ne,!0),ee.nodeType===Yc.element&&ee.nodeName==="BODY"||ee.nodeName==="HTML"?H=ee:H.appendChild(ee);else{if(!Qe&&!Q&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(H=rx(ne),!H)return Qe?null:Ze?E:""}H&&xt&&vr(H.firstChild);let wt=ox(yr?ne:H);for(;Be=wt.nextNode();)ix(Be),cx(Be),Be.content instanceof s&&nI(Be.content);if(yr)return ne;if(Qe){if(He)for(kt=A.call(H.ownerDocument);H.firstChild;)kt.appendChild(H.firstChild);else kt=H;return(z.shadowroot||z.shadowrootmode)&&(kt=O.call(r,kt,!0)),kt}let tn=pe?H.outerHTML:H.innerHTML;return pe&&$["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&qt(mR,H.ownerDocument.doctype.name)&&(tn="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
75
+ `+tn),Q&&Lp([J,X,N],xr=>{tn=Kc(tn,xr," ")}),w&&Ze?w.createHTML(tn):tn},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Rm(ne),je=!0},t.clearConfig=function(){Ti=null,je=!1},t.isValidAttribute=function(ne,T,H){Ti||Rm({});let ee=ft(ne),Be=ft(T);return ax(ee,Be,H)},t.addHook=function(ne,T){typeof T=="function"&&Wc(L[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let H=K3(L[ne],T);return H===-1?void 0:G3(L[ne],H,1)[0]}return rR(L[ne])},t.removeHooks=function(ne){L[ne]=[]},t.removeAllHooks=function(){L=uR()},t}var hR=gR();var go=b(Y());var a0=b(Oe()),Un=b(Y());var Op=b(Y()),u4=["bottom","height","left","right","top","width"],d4=(e={},t={})=>u4.some(n=>e[n]!==t[n]),mo=new Map,yR,vR=()=>{let e=[],t=[];mo.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();d4(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{mo.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),yR=window.requestAnimationFrame(vR)};function f4(e,t){return{observe(){let n=mo.size===0;if(mo.has(e)){let r=mo.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else mo.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&vR()},unobserve(){let n=mo.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||mo.delete(e),mo.size||cancelAnimationFrame(yR)}}}}function i0(e){let[t,n]=(0,Op.useState)(null);return(0,Op.useLayoutEffect)(()=>{if(!e.current)return;let r=f4(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Oa=b(Y()),SR=b($l());var xR=b(Y());function ss(e){(0,xR.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ui(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var wR={root:"dd-r-dgo"};var bR=({children:e,parentNode:t})=>{let[n,r]=(0,Oa.useState)(null),o=(0,Oa.useContext)(Qa);return(0,Oa.useLayoutEffect)(()=>{let s=document.createElement("div");return ui(s),s.classList.add(wR.root),o!=null&&o.portalRootNode&&s.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(s),r(s),()=>{s.isConnected&&s.remove()}},[]),n?(0,SR.createPortal)(e,n):null};var Nr={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var _p=b(R()),Dp=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),s=(0,Un.useCallback)(()=>n(a=>!a),[]),i=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:s,triggerRef:i}};function l0(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 _a=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:s,toStyle:i=l0,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=i0(t),f=i0(n),p=(0,Un.useMemo)(()=>i(d,f,0),[d,f]);return(0,_p.jsx)(bR,{parentNode:a,children:(0,_p.jsx)("div",P(S({className:(0,a0.default)(Nr.ref,{[Nr.positionAbove]:r==="above",[Nr.positionBelow]:r==="below",[Nr.positionLeft]:r==="left",[Nr.positionRight]:r==="right",[Nr.alignStart]:o==="start",[Nr.alignCenter]:o==="center",[Nr.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,_p.jsx)("div",{className:(0,a0.default)(e,Nr.root),children:s})}))})};var ER={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};var mr=b(R());function p4(e){return`<button type="button" data-copy-icon 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 c0(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function m4(e){return e.replace(/\r\n/g,`
76
+ `)}var g4=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let s=_("Markdown",ER),i=(0,go.useRef)(null),[a,l]=(0,go.useState)(null),c=(0,go.useMemo)(()=>{let g=Re.parse(m4(e));return hR.sanitize(g.toString()).replaceAll("</code>",`${p4(s.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var h;let x=g.target,y=!!((h=i.current)!=null&&h.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==i.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Ma(g,s.fadeup),r==null||r(c0(a)))},f=g=>{let x=g.target;if(x.tagName==="A"){g.stopPropagation();return}"copyIcon"in x.dataset&&(Ma(x,s.fadeup),r==null||r(c0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(c0(a)))},v=g=>{if(g===null)return;let x=g.getBoundingClientRect();x.left<0?g.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,mr.jsxs)(go.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(_a,{triggerRef:{current:a},className:s.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:s.options,ref:v,children:[r&&(0,mr.jsx)("button",{type:"button",className:s.option,onClick:d,children:n}),o&&(0,mr.jsxs)(go.Fragment,{children:[(0,mr.jsx)("div",{className:s.divider}),(0,mr.jsx)("button",{type:"button",className:s.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:s.arrow})]}),(0,mr.jsx)("div",{ref:i,"data-testid":"widget-markdown-content",className:s.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},ho=g4;var Nt=b(R()),h4=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[s,i]=di.default.useState(""),{setSelected:a}=ts(),l=(0,di.useRef)(null),c=_("KnowledgeSearchStyles",tR),u=ie(Zv),d=ut(),f=(x=j(Sc(e!=null?e:-1)))!=null?x:[],p=ai(t,{onSuccess(y){d("knowledge assist question answered",{question:s||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!s&&!!o}),a(`knowledge-assist-${f.length}`),i("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),s!==""&&p.call(s)}),g=(y,h)=>{d("knowledge assist source viewed",{question:h,sourceViewed:y.url||y.name})};return(0,di.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,di.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Nt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Nt.jsx)("div",{className:c.alignRight,children:(0,Nt.jsx)(qe.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:h},m)=>(0,Nt.jsx)(qe.List,{children:(0,Nt.jsx)(qe.ListItem,{id:`knowledge-assist-${m}`,"data-testid":"knowledge-search-answer",description:(0,Nt.jsx)(ho,{content:h.answer}),closeOnSelect:!0,onClick:()=>n(h.answer),onSourceClick:w=>g(w,y),sources:h.sources,styles:{title:c.question,description:c.answer},extra:(0,Nt.jsx)("div",{className:c.listItemFeedback,children:(0,Nt.jsx)(li,{feedbackText:h.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},h)})}),children:y})},`${h.answer}_${m}`)),p.state==="loading"&&(0,Nt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Nt.jsx)("p",{className:c.status,children:u("error")}),(0,Nt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Nt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:s,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),i(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(eR,{})})]})]})},TR=h4;var u0=b(R()),Fp=e=>(0,u0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,u0.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 Xc={};pt(Xc,{enUS:()=>y4,nlNL:()=>v4});var y4={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"}]},v4={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 zp={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var fi=b(R()),x4=({suggestion:e,source:t,context:n})=>{let r=ie(Xc),o=j(Rr),s=ve(),i=te("enableSuggestionFeedback"),a=`${e.text}`,l=j(Na(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{s(ro({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!i||!l?null:(0,fi.jsxs)(vt,{placement:"top-end",children:[(0,fi.jsx)(vt.Trigger,{className:zp.trigger,children:(0,fi.jsx)(Fp,{"data-testid":"feedback-dropdown-trigger"})}),(0,fi.jsx)(vt.Content,{className:zp.content,children:(0,fi.jsx)(vt.Button,{className:zp.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Hp=x4;var Qc={};pt(Qc,{enUS:()=>w4,nlNL:()=>S4});var w4={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL 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"}],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?"}]},S4={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:"URL 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"}],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 NR=b(Y());var b4=["{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}"],E4=new RegExp(b4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function CR(e,t){let n=e.split(E4),r=0,o=[];for(let s=0;s<n.length;s++){let i=n[s];if(o.push(i),s===n.length-1)break;if(t.indexOf(i)===-1)return e;let a=n[s+1],l=s===n.length-2;r+=i.length;let c=r;if(l){let d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function kR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var PR={suggestions:[],fetchState:"idle"},RR={default:PR},AR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},Bp=e=>e.textSuggestions,IR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Up=at("textSuggestions/refresh"),gr=he("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:s,inlineSuggestions:i}=r.settings,a=ca(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,ec(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:un(d.text,o)}),d.title?{title:un(d.title,o)}:{}))),e==="default"){let d=i?l.filter(IR(a)):l;t.dispatch(Qo(d.slice(0,s)))}return l})),Zc=he("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:s}=r.info,{textSuggestionsCount:i,deanonymize:a,inlineSuggestions:l}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},ec(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(IR(e))),s&&(c=c.map(d=>P(S({},d),{text:un(d.text,s)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?CR(d.text,e):d.text}))),c=kR(c,i),t.dispatch(Qo(c)),c})),LR=ke({name:"textSuggestions",initialState:RR,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}}}}},extraReducers:e=>{e.addCase(gr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||PR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(gr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(gr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Zc.pending,t=>{t.default.fetchState="loading"}).addCase(Zc.rejected,t=>{t.default.fetchState="error"}).addCase(Zc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(lt,()=>RR)}}),{setTextSuggestions:oj}=LR.actions,MR=LR.reducer;var pi=b(R()),T4=({types:e,commands:t,onClick:n})=>{let r=ve(),o=ie(Qc),s=j(Bp);return(0,NR.useEffect)(()=>{e.forEach(({type:i})=>{(!s[i]||s[i].suggestions.length===0)&&r(gr(i))})},[]),(0,pi.jsxs)("div",{children:[t.length>0&&(0,pi.jsx)(qe.List,{heading:o("commands"),children:t.map((i,a)=>(0,pi.jsx)(qe.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:i.onClick,children:i.label},i.label))}),e.map(({type:i,title:a})=>{var l;return(0,pi.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=s[i])==null?void 0:l.suggestions.map((c,u)=>(0,pi.jsx)(qe.ListItem,{id:`${i}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},i)})]})},OR=T4;var Ct=b(R()),k4=200,R4=5,P4=4,d0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?P4:R4),A4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),I4=()=>{var K,$,W;let e=ve(),t=dn(),n=ie(Qc),[r,o]=(0,Qt.useState)(!1),[s,i]=(0,Qt.useState)(""),[a,l]=(0,Qt.useState)(null),c=j(sT),u=j(qs),[d,f]=(0,Qt.useState)(),p=j(jt),v=te("showSearch"),g=te("enableSuggestionFeedback"),x=te("showEntitiesCommand"),y=te("showKnowledgeSearch"),h=te("showImageSearch"),m=te("searchTriggerKey"),w=j(qf),E=j(Yf),k=j(ZT),C=j(Ny),A=j(iT),V=j(oT),O=((W=($=(K=u==null?void 0:u.uiConfig)==null?void 0:K.search)==null?void 0:$.initialTypes)==null?void 0:W.filter(({isActive:z})=>z))||[],L=ut(),J=(0,Qt.useMemo)(()=>{let z=me=>d0(C.filter(re=>re.type===me.toUpperCase()),me,d),fe=(k==null?void 0:k.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:z(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(fe.push({value:"PERSONAL",label:n("personalSuggestions"),list:z("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:z("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:z("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),h&&fe.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:z("IMAGE"),listOrientation:"horizontal"}),O.length===0)return fe;let de=O.map(me=>fe.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),Ee=fe.filter(me=>!de.find(re=>re.value===me.value));return[...de,...Ee]},[k,O,h,d]),X=[{label:n("entitiesClipboard"),onClick:()=>e(oo("entities")),shouldShow:x&&A4(n("entitiesClipboard"),s)},{label:s?`${n("knowledgeAssist")}: ${s}`:n("knowledgeAssist"),onClick:()=>{e(oo("knowledgeAssist")),L("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(z=>z.shouldShow).filter(()=>!d),N=(0,Qt.useCallback)((0,_R.default)((z,fe)=>{e(Us({query:z,type:fe,tags:["search-overlay"],size:d?50:20}))},k4),[d]),F=(0,Qt.useCallback)((z,fe)=>{switch(fe.type){case"IMAGE":t.send(_y,{suggestion:fe});break;default:t.send(Pr,{text:z,suggestion:fe})}e(Fn(!1))},[e]),se=z=>{Ir(z.text),e(ro({name:"entity copied",data:{entity:z,type:"copy"}})),e(Fn(!1))},G=z=>{t.send(Pr,{text:z,suggestion:{source:"knowledge-assist",text:z}}),e(ro({name:"answer used",data:{originalText:z},options:{includeConversationData:!0}})),i(""),a&&e(ga(a)),e(oo("search")),e(Fn(!1))},U=z=>{let fe={input:z,threadId:a,onNewThreadId:de=>l(de)};if(E)return Ks(S({assistantCode:E},fe));if(w)return Gs(S({assistantCode:w},fe))};function B(z){return fe=>{r?window.confirm(n("warning"))&&(z(fe),o(!1)):z(fe)}}return(0,Qt.useEffect)(()=>{s?N(s,d):e(Af())},[s,d]),(0,Qt.useEffect)(()=>{p&&e(bc())},[p]),Wk(m,()=>{e(Fn(!0)),L("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Ct.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:i,onChangeOpen:B(z=>e(Fn(z))),onChangeType:z=>f(z),onChangePage:B(z=>e(oo(z))),selectedType:d,search:s,page:c,isOpen:V,types:J,updateDeps:[C],children:[(0,Ct.jsxs)(qe.Page,{id:"search",children:[s.length===0&&(0,Ct.jsx)(OR,{types:O,commands:X,onClick:F}),s.length>0&&(0,Ct.jsxs)(Qt.Fragment,{children:[X.length>0&&(0,Ct.jsx)(qe.List,{heading:n("commands"),children:X.map((z,fe)=>(0,Ct.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:z.onClick,id:`commands-${fe}`,children:z.label},z.label))}),J.map(({value:z,label:fe,list:de,lineClamp:Ee,listOrientation:me})=>(0,Ct.jsx)(qe.List,{heading:fe,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(z),hasMore:!d&&A[z.toLowerCase()]>d0(de,z,d).length,children:d0(de,z,d).map(re=>(0,Ct.jsx)(qe.ListItem,{id:`${z}-${re.id}`,closeOnSelect:!1,lineClamp:Ee,onClick:()=>F(re.text,re),description:z!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:g&&(0,Ct.jsx)(qe.ListItemActions,{children:(0,Ct.jsx)(Hp,{context:s,source:"search",suggestion:re})}),children:z==="IMAGE"?(0,Ct.jsx)(qe.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},z))]})]}),(0,Ct.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:B(()=>{e(oo("search"))}),children:(0,Ct.jsx)(Yk,{onCopy:se})}),(w!=null?w:E)&&(0,Ct.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:B(()=>{a&&e(ga(a)),e(oo("search"))}),children:(0,Ct.jsx)(TR,{threadId:a,onEvaluate:U,question:s,onUse:G,onResetQuestion:()=>{a&&e(ga(a)),i(""),l(null)}})})]})},DR=I4;var Jc=b(R()),L4=()=>{let e=te("showSearch"),t=te("isEmbedded");return(0,Jc.jsxs)(FR.Fragment,{children:[e&&(0,Jc.jsx)(DR,{}),t&&(0,Jc.jsx)(kT,{})]})},zR=L4;var VR=b(Oe());var Vp=b(R()),HR=({className:e})=>(0,Vp.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,Vp.jsx)("g",{children:(0,Vp.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
77
77
  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
78
78
  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
79
79
  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
80
- 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 u0=b(R()),R4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},zR=({className:e,color:t})=>(0,u0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,u0.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:R4[t||"pink"]})});var HR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var d0={};wt(d0,{enUS:()=>P4,nlNL:()=>A4});var P4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},A4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var mi=b(R()),UR=({onLogIn:e})=>{let t=ce(d0),n=te("floatingMenu"),r=te("productName"),o=ve(),s=j(jt),i=_("FloatingMenu",HR);if(s===null||n===!1)return null;let a=()=>{s===!0?o(Fn(!0)):e()};return(0,mi.jsxs)("button",{type:"button",className:(0,BR.default)(i.root,{[i.isLoggedIn]:s,[i.isLoggedOut]:!s}),onClick:a,children:[(0,mi.jsx)("div",{className:i.text,children:t(s?"search":"signin",{productName:r})}),(0,mi.jsxs)("div",{className:i.icon,children:[(0,mi.jsx)(zR,{className:i.logo,color:"pink"}),s===!1&&(0,mi.jsx)(FR,{className:i.lock})]})]})};var jp=b(Y());function Nr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:s}=e.input;return s.start!==s.end?!1:s.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(s.end))||r&&new RegExp(r).test(o.substring(0,s.end))?!0:n===!1&&r===!1:!1}var I4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},Up=({ui:e})=>e.overlayCollapsed,VR=ke({name:"ui",initialState:I4,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(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:eu,setInputFocus:Vp,setOverlayCollapsed:is,setOpenOverlayWhenTyping:$R,setOverlayCollapsedUserOverwrite:jR}=VR.actions,WR=VR.reducer;var QR=b(Y());var as=b(Y());var KR=b(Y());function GR(e,t,n){(0,KR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var qR={root:"dd-1MBCO",actions:"dd--x4cy",closeIconContainer:"dd-1z5NR",closeIcon:"dd-8qMF-",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var tu=b(R()),YR=({title:e})=>(0,tu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18px",height:"18px",viewBox:"0 0 24 24","aria-labelledby":"closeTitle",children:[(0,tu.jsx)("title",{id:"closeTitle",children:e}),(0,tu.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]});var f0={};wt(f0,{enUS:()=>L4,nlNL:()=>O4});var L4={assistant:[{type:0,value:"Assistant"}],close:[{type:0,value:"Close"}]},O4={assistant:[{type:0,value:"Assistent"}],close:[{type:0,value:"Sluiten"}]};var _r=b(R()),N4=["search","personal-collection-search","search-autocomplete"];function _4(e,t,n,r={}){var s;let o="";return N4.includes(t)?o=fC(fv(e,n,{stripAgentPart:!0}),(s=r.searchKeywords)!=null?s:[n]):o=fv(e,n,r),r.placeholders===!0&&(o=pC(o)),o}var D4=()=>{},F4=({selected:e,suggestion:t})=>{let n=ce(f0),r=te("inlineSuggestions"),o=j(ca),[s,i]=(0,as.useState)(!1),a=te("enableSuggestionFeedback"),l=j(x=>x.input.text),c=ve(),u=_("TextSuggestion",qR),d=(0,as.useRef)(null),f=t.source==="assistant",p=a&&!f;(0,as.useEffect)(()=>{let x=setTimeout(()=>{c(z1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(x)}},[t]),GR(d,"click",()=>{c(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let v=()=>{c(Hs({source:t.source,text:t.text,assistantCode:t.assistantCode}))},m=(0,as.useMemo)(()=>_4(t.text,t.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:t.searchKeywords}),[r,t.text,t.source,o,t.searchKeywords]);return t.source==="gpt"&&!r?null:(0,_r.jsxs)("div",{className:u.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,_r.jsx)(ye,{ref:d,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:D4,children:(0,_r.jsx)(Js,{attributes:t.source==="assistant"?{"data-label":n("assistant")}:void 0,containerTagName:"div",noWrap:!1,tagName:"span",className:u.formattedText,content:m})}),p&&s&&(0,_r.jsx)("div",{className:u.actions,children:(0,_r.jsx)(Fp,{source:"overlay",context:l,suggestion:t})}),f&&s&&(0,_r.jsx)("div",{className:u.closeIconContainer,children:(0,_r.jsx)("button",{type:"button",className:u.closeIcon,onClick:v,title:n("close"),children:(0,_r.jsx)(YR,{title:n("close")})})})]})},XR=F4;var ZR=b(R()),z4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,QR.useMemo)(()=>{let o=e.map((s,i)=>(0,ZR.jsx)(XR,{index:i,selected:i===t,suggestion:s},`${s.text}-${s.source}`));return n?o.reverse():o},[e,t,n]),$p=z4;var JR={root:"dd-PfvRI",paper:"dd-HYlyY"};var nu=b(R()),H4=()=>{let e=(0,jp.useRef)(null),t=_("InlineSuggestionsOverlay",JR),n=j(Nr),r=ve(),o=j(jt),s=j(la),i=j(Up),a=te("showTextSuggestions"),l=j(zs),c=j(Zl);return ss(()=>{setTimeout(()=>{r(is({collapse:!0,skipWhenInputFocus:!0}))})}),(0,jp.useEffect)(()=>{let u=e.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),i||!n||!a||l.length===0||o!==!0||s===!1?null:(0,nu.jsx)("div",{className:t.root,"data-variant":"inline",children:(0,nu.jsx)("div",{ref:e,className:t.paper,children:(0,nu.jsx)(Ht,{children:(0,nu.jsx)($p,{suggestions:l,selectedIndex:c})})})})},eP=H4;var ru=b(R()),B4=({children:e})=>{let n=te("locale").replace("-","");return(0,ru.jsx)(Vy.Provider,{value:n,children:e})},U4=({store:e,customStyles:t={},children:n})=>(0,ru.jsx)(f1,{store:e,children:(0,ru.jsx)(B4,{children:(0,ru.jsx)(Qa.Provider,{value:t,children:n})})}),ls=U4;var Kp=b(Ne()),Da=b(Y());var tP=b(Y());function nP(e,t){let[n,r]=(0,tP.useState)(()=>{if(typeof window=="undefined")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return Z.error(s),t}});return[n,s=>{try{let i=s instanceof Function?s(n):s;r(i),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(i))}catch(i){Z.error(i)}}]}var rP=()=>/Mac/i.test(navigator.platform);var sP=b(Ne()),yo=b(Y());var p0={};wt(p0,{enUS:()=>V4,nlNL:()=>$4});var V4={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"}]}]},$4={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 oP={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var cs=b(R()),m0=(e,t,n)=>r=>(0,cs.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),j4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let s=ce(p0),i=dn(),a=_("Login",oP),l=te("productName"),c=(0,yo.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,yo.useCallback)(x=>{x.preventDefault(),i.send(fa,!0)},[t]),d=(0,yo.useMemo)(()=>x=>(0,cs.jsx)("a",{onClick:g=>{g.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,yo.useCallback)(x=>(0,cs.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:m}=(0,yo.useMemo)(()=>({min:m0(a,60*10,c),hour:m0(a,60*60,c),day:m0(a,60*60*12,c)}),[]);return(0,cs.jsxs)("div",{className:(0,sP.default)(e,a.root),children:[s("loginPlease",{login:n?f:d,productName:l}),r&&(0,cs.jsxs)(yo.Fragment,{children:[(0,cs.jsx)("br",{}),s("snooze",{min:p,hour:v,day:m})]})]})},Wp=j4;var iP={root:"dd-DoQhb",text:"dd-Jwnev"};var ou=b(R()),W4=({title:e})=>{let t=_("SearchTrigger",iP),n=ve(),r=ct();return(0,ou.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,ou.jsx)(Aa,{}),(0,ou.jsx)("span",{className:t.text,children:e})]})},aP=W4;var g0={};wt(g0,{enUS:()=>K4,nlNL:()=>G4});var K4={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"}]},G4={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 lP={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Ve=b(R()),q4=({onLogIn:e})=>{let t=_("SuggestionsOverlay",lP),n=ce(g0),r=j(Nr),o=j(F1),s=ve(),i=(0,Da.useRef)(null),a=te("searchTriggerKey"),l=te("productName"),c=j(Up),u=j(jt),d=j(la),[f,p]=(0,Da.useState)(null),v=te("showSearch"),m=te("showTextSuggestions"),x=te("adminUrl"),y=te("isEmbedded"),[g,h]=nP("dd-snooze-until-ms",0),w=c||g>Date.now(),E=j(zs),k=j(Zl),C=E.filter(N=>N.source!=="gpt").length,A=()=>{w&&h(0),s(jR(!w))},V=N=>{let L=Date.now()+N*1e3;h(L),Z.info(`Snooze until: ${new Date(L)}`),s(is({collapse:!0}))};return(0,Da.useEffect)(()=>{C===0&&p(null)},[E,C]),ss(()=>{s(is({collapse:!0,skipWhenInputFocus:!0}))}),u===null||d===!1?null:u===!1?(0,Ve.jsxs)("div",{ref:i,className:(0,Kp.default)(t.root,{[t.isCollapsed]:w}),children:[!w&&(0,Ve.jsxs)("div",{className:t.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:t.triggersRight,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("open",{productName:l}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:t.collapsible,children:(0,Ve.jsx)(Wp,{loginUrl:x,isEmbedded:y,onLogIn:e,onSnooze:V})})]}):!o||!r?null:(0,Ve.jsxs)("div",{ref:i,className:(0,Kp.default)(t.root,{[t.isCollapsed]:w}),children:[!w&&(0,Ve.jsxs)("div",{className:t.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:v&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>p(n(rP()?"searchHintMac":"searchHintWindows",{searchTriggerKey:a.toUpperCase()})),onMouseLeave:()=>p(null),children:(0,Ve.jsx)(aP,{title:n("search")})})}),(0,Ve.jsxs)("div",{className:t.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,Kp.default)(!f&&t.hintsHidden,t.hints),children:f}),(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("open",{productName:l}),onClick:A,isCollapsed:!0})}),C>0&&m&&(0,Ve.jsx)("div",{className:t.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(Ht,{children:(0,Ve.jsx)($p,{suggestions:E,selectedIndex:k,reverse:!0})})})]})},cP=q4;var om=b(Ne());var wo=b(Y());var Fa=b(Y());function Gp(e){return e.contentEditable==="true"}function Y4(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),s=o.cloneRange();s.selectNodeContents(e),s.setEnd(o.endContainer,o.endOffset),n=s.toString().length,s.selectNodeContents(e),s.setEnd(o.startContainer,o.startOffset),t=s.toString().length}return{selectionStart:t,selectionEnd:n}}function uP(e){let{selectionStart:t,selectionEnd:n}=Gp(e)?Y4(e):e;return[t,n]}function dP(e){let[,t]=(0,Fa.useState)(),n=(0,Fa.useRef)(null);return n.current=uP(e),(0,Fa.useEffect)(()=>{let r=()=>{var a;let[o,s]=(a=n.current)!=null?a:[],i=uP(e);(!i||o!==i[0]||s!==i[1])&&(n.current=i,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 fP(e,t){if(!t)return;let n=e,{value:r}=n,[o,s]=t,i=r.match(Mu);if(!i||i.length===0)return;let a=0;i.find(l=>{let c=r.indexOf(l,a);return o>c&&s<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var pP=b(Y()),X4=["div","span","mark","strong","b","i","u","em"];function h0(e,t,n=0){var s;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(s=r.props)==null?void 0:s.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(X4.includes(o)){let i=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,pP.cloneElement)(r,{children:h0(i,t,n+1)})]}return[...e,...t]}function gi(e){return e.tagName.toLowerCase()==="textarea"}var mP={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var xP=b(Ne());var Jp=b(Y());var za=b(Y());function gP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function qp(e){let t=(0,za.useRef)(null),[n,r]=(0,za.useState)(!1);return(0,za.useEffect)(()=>{var u;let o=!1,s=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[i,a]=gP((d,f)=>{let p=t.current;if(!p)return;let v=d/s,m=f/s,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&m>x.y&&m<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=gP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",i),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",i),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function hP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Yp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function yP(e){return e!=null}var vP=b(Ne()),Xp=b(Y());var vo={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var y0=b(R()),Qp=(0,Xp.forwardRef)((o,r)=>{var s=o,{className:e,children:t}=s,n=oe(s,["className","children"]);let i=(0,Xp.useRef)(null),a=_("TabCompletion",vo);return(0,y0.jsx)("div",P(S({ref:Yp([i,r]),className:(0,vP.default)(e,a.popoverContentContainer)},n),{children:(0,y0.jsx)("div",{className:a.popoverContent,children:t})}))});var us=b(R()),Q4=e=>t=>{let n=i0(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},Z4=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let s=_("TabCompletion",vo),i=Np(),a=(0,Jp.useMemo)(()=>Q4(e.getBoundingClientRect()),[e]),[l,c]=qp(e);return(0,Jp.useEffect)(()=>{c?i.open():i.close()},[c]),(0,us.jsxs)("span",{children:[(0,us.jsx)("mark",{ref:Yp([l,i.triggerRef]),className:(0,xP.default)(s.matchKeyword,{[s.hover]:c}),"aria-haspopup":"dialog","aria-expanded":i.opened?"true":"false",children:r}),i.opened&&(0,us.jsx)(_a,{className:s.popover,triggerRef:i.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,us.jsx)(Qp,{style:n,children:(0,us.jsx)("div",{className:s.hintText,children:o})})})]})},Zp=class extends ao{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>P(S({},o),{keywordRegex:new RegExp(`\\b${hP(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(s=>{if(this.usedKeywordMatches.has(s))return null;let i=n.match(s.keywordRegex);if(!i)return null;let a=n.charAt(i.index-1),l=n.charAt(i.index+s.keyword.length);return a==="{"&&l==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:s.suggestion,preparedKeywordMatch:s,valid:!0}}).filter(yP);if(r.length===0)return null;let o=r.reduce((s,i)=>i.index<s.index?i:s);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,us.jsx)(Z4,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var wP=b(Ne());var v0=b(R()),J4=({inputElement:e,children:t})=>{let n=_("TabCompletion",vo),[r,o]=qp(e);return(0,v0.jsx)("mark",{ref:r,className:(0,wP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},em=class extends ao{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,v0.jsx)(J4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var nm=b(Ne());var Jt=b(Y());var x0=b(R()),SP=()=>(0,x0.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,x0.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 Dr=b(Y());var EP=b(Gy());var bP={root:"dd-ky-Bv",content:"dd-kV5e1"};function tm(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(s){return null}}function w0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),eF=3,tF=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),nF=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=eF})=>{let s=_("LinkSearch",bP),[i,a]=(0,Dr.useState)(""),l=ve(),c=j(RR("url")),u=j(sT("URL")),d=(0,Dr.useMemo)(()=>u.map(tF),[u]),[f,p]=(0,Dr.useState)(d.length-1),v=te("fallbackImage"),m=h=>{let w=h.target;a(w.value)},x=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},y=h=>{var k;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&p(w),h.code==="ArrowDown"&&p(E),h.code==="Enter"&&e(((k=d[f])==null?void 0:k.text)||i)},g=(0,Dr.useCallback)((0,EP.default)(h=>{l(Us({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Dr.useEffect)(()=>{i&&g(i)},[i]),(0,Dr.useEffect)(()=>()=>{l(Rf())},[]),(0,Vn.jsxs)("div",{className:s.root,children:[(0,Vn.jsx)(Ht,{withDivider:!0,children:(i?d:c).slice(0,o).map((h,w)=>(0,Vn.jsx)(ye,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Te,{children:[(0,Vn.jsx)(Te.Image,{src:tm(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Te.Content,{className:s.content,cropText:!0,children:[(0,Vn.jsx)(Te.Title,{children:h.title||w0(h.text)}),h.title&&w0(h.text)]}),(0,Vn.jsx)(ye.Actions,{children:(0,Vn.jsx)(ye.ActionButton,{label:r,onClick:E=>x(E,h.text)})})]})},h.text))}),(0,Vn.jsx)(pc,{value:i,onChange:m,autoFocus:!0,placeholder:n,onKeyUp:y})]})},TP=nF;var S0={};wt(S0,{enUS:()=>rF,nlNL:()=>oF});var rF={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},oF={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Zt=b(R()),sF=(0,Jt.forwardRef)((e,t)=>{let n=_("TabCompletion",vo);return(0,Zt.jsx)("mark",{ref:t,className:(0,nm.default)(n.matchSelection)},"selection-start")}),iF=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let s=ce(S0),i=_("TabCompletion",vo),a=(0,Jt.useRef)(null),l=(0,Jt.useRef)(null),[c,u]=(0,Jt.useState)(null),d=ve(),f=Np(document.activeElement===r),[p]=(0,Jt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Jt.useEffect)(()=>()=>p.detach(),[]),(0,Jt.useEffect)(()=>{let m=e.current,x=a.current;!m||!x||(p.setStart(m,0),p.setEnd(x,0))},[e.current,a.current]),ss(()=>{f.close()});let v=(0,Jt.useCallback)(m=>{let x=p.toString(),y=/^http(s?):\/\//.test(m)?m:`https://${m}`;d(wf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Zt.jsxs)("span",{children:[(0,Zt.jsx)("mark",{ref:a,className:(0,nm.default)(i.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Zt.jsx)(_a,{className:i.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Zt.jsxs)(Qp,{style:n,ref:l,children:[(0,Zt.jsx)("div",{className:(0,nm.default)(i.selectionOptions,{[i.selectionOptionsIsHidden]:c!==null}),children:(0,Zt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:i.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Zt.jsx)(SP,{}),(0,Zt.jsx)("span",{children:"\xA0"}),(0,Zt.jsx)("span",{children:s("insertLink")})]})}),c==="insertLink"&&(0,Zt.jsx)(TP,{placeholder:s("linkInputPlaceholder"),visitUrlText:s("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},rm=class extends ao{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,Jt.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let s=this.foundIndex===0?r:o,i=s>=this.charCount&&s<=this.charCount+n.length?{index:s-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let a=this.foundIndex===1;return i&&a?this.charCount+=s-this.charCount:this.charCount+=n.length,i?S({isStart:a},i):null}replaceWith(n,r){return r.isStart?(0,Zt.jsx)(sF,{ref:this.startRef}):(0,Zt.jsx)(iF,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var xo=b(R()),aF=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:s,keywordMatches:i,inputElement:a,source:l})=>{let c=_("TabCompletion",mP),u=te("insertLink"),d=te("showMidSentenceSuggestions"),f=te("inlineSuggestions"),p=dP(a),v=(0,wo.useRef)(null),m=j(jt);(0,wo.useEffect)(()=>{gi(a)&&p&&fP(a,p)},[p]);let x=(0,wo.useCallback)(h=>{if(!o||!n)return h;let w=[(0,xo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,xo.jsx)("span",{"data-testid":"tab-completion",className:(0,om.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,xo.jsx)("span",{className:(0,om.default)(c.hint,c.resetIndent),children:(0,xo.jsx)(Lu,{keyCode:"tab"},"tabHint")})),h0(h,w)},[o,n,r]),y=(0,wo.useMemo)(()=>{let h=[];return u&&h.push(new rm("selection")),h.push(new em("placeholders")),s&&h.push(new Zp("keywords")),h},[f,u,s]),g=(0,wo.useMemo)(()=>{let h=window.getComputedStyle(a);return{"--dd-color":h.color,"--dd-font-size":h.fontSize,"--dd-font-family":h.fontFamily,"--dd-font-variant":h.fontVariant}},[]);return!e||!m?null:(0,xo.jsxs)("div",{ref:h=>{h!=null&&h.parentElement&&(v.current=h==null?void 0:h.parentElement)},className:c.root,style:g,children:[(0,xo.jsx)(Js,{tagName:"span",containerTagName:"div",className:(0,om.default)(c.container,c.agentText),disableLineBreaks:gi(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:i,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,xo.jsx)("br",{})]})},lF=e=>{var x,y,g;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:s}=e,i=ua({input:t}),a=(i==null?void 0:i.text)||"",l=(i==null?void 0:i.source)||"",c=(x=t.html)!=null?x:ha(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=s,{showTabCompletion:p,visible:v,showStyleSuggestions:m}=r;return{showTabHint:d,showStyleSuggestions:m,showTabCompletion:p&&Nr(e),content:c,tabText:u,source:l,keywordMatches:(g=(y=o.list)==null?void 0:y.keywordMatches)!=null?g:[],enabled:v&&f!==!1}},CP=d1(lF)(aF);var ds=b(Y());var cF={token:null,interval:null},b0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),E0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(b0()),setInterval(()=>r(b0()),n)}),kP=ke({name:"passwordlessToken",initialState:cF,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(b0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(E0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:RP}=kP.actions,PP=kP.reducer;function uF(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var AP=$t([GT],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:uF(n.code),label:n.code,name:n.name,description:n.name}})));var sm=b(Y());var C0=b(Ne());var T0=b(R()),su=()=>(0,T0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,T0.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 IP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Fr=b(R()),dF=({entities:e})=>{let t=_("EntitiesWidgetList",IP),[n,r]=(0,sm.useState)(void 0),o=ve(),s=()=>{r(void 0)},i=a=>{e&&(r(e.indexOf(a)),Ir(a.text),o(ro({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,sm.useEffect)(()=>{let a=setTimeout(s,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Fr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Fr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>i(a),children:[(0,Fr.jsx)("span",{className:t.entityText,children:a.text}),(0,Fr.jsxs)("span",{className:t.iconWrapper,children:[(0,Fr.jsx)("span",{className:(0,C0.default)(t.icon),children:(0,Fr.jsx)(su,{})}),(0,Fr.jsx)("span",{className:(0,C0.default)(t.icon,n===l&&t.iconClicked),children:(0,Fr.jsx)(su,{})})]})]},a.text))})},LP=dF;var k0=b(R()),OP=()=>(0,k0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,k0.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 HP=b(Y());var MP={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var NP={root:"dd-nazq3",rotation:"dd-3EHTv"};var DP=b(R()),fF=({size:e=12})=>{let t=_("LoadingSpinner",NP);return(0,DP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},_P=fF;var R0=b(R()),FP=()=>(0,R0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,R0.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var iu=b(R()),zP=e=>(0,iu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,iu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,iu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var P0={};wt(P0,{enUS:()=>pF,nlNL:()=>mF});var pF={error:[{type:0,value:"Something went wrong"}]},mF={error:[{type:0,value:"Er ging iets fout"}]};var Pn=b(R()),gF=3e3,hF=({assistantOptions:e})=>{let t=_("OnDemandAssistants",MP),n=ce(P0),r=(0,HP.useRef)(),o=ai(or),s=ai(so),i=j(ZT),a=j(JT),l=ct(),c=a.filter(f=>f.isPinned),u=a.filter(f=>!f.isPinned),d=f=>I(void 0,null,function*(){clearTimeout(r.current),l("trigger on demand assistant",{assistantCode:f}),f===i?yield s.call({transcript:e.transcript}):yield o.call(P(S({},e),{assistantCode:f})),r.current=setTimeout(()=>o.reset(),gF)});return a.length===0?null:(0,Pn.jsxs)("div",{className:t.root,children:[c.map(({assistant:f,assistantName:p})=>(0,Pn.jsx)("button",{type:"button",className:t.button,disabled:o.state==="loading",onClick:()=>d(f),children:p},f)),u.length>0&&(0,Pn.jsxs)(yt,{placement:"top-end",children:[(0,Pn.jsx)(yt.Trigger,{className:t.trigger,disabled:o.state==="loading",children:(0,Pn.jsx)(_p,{"data-testid":"trigger"})}),(0,Pn.jsx)(yt.Content,{className:t.nav,"data-testid":"popover",children:u.map(({assistant:f,assistantName:p})=>(0,Pn.jsx)(yt.Button,{className:t.item,disabled:o.state==="loading",onClick:()=>d(f),children:p},f))})]}),o.state==="loading"&&(0,Pn.jsx)(_P,{}),o.state==="done"&&(0,Pn.jsx)(zP,{"data-testid":"trigger-done"}),o.state==="error"&&(0,Pn.jsx)(Dk,{trigger:(0,Pn.jsx)(FP,{}),children:n("error")})]})},BP=hF;var $P=b(Y());var UP={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var VP=b(R()),yF=({width:e})=>{let t=_("LoadingProgressBar",UP);return(0,VP.jsx)("div",{className:t.loadingBar,style:{width:e}})},im=yF;var So=b(R()),am=({title:e})=>{let t=(0,$P.useRef)(null);return Hx(t),(0,So.jsx)(ye,{ref:t,children:(0,So.jsx)(Te,{children:(0,So.jsxs)(Te.Content,{children:[(0,So.jsx)(Te.Title,{children:e}),(0,So.jsx)(im,{width:"60%"}),(0,So.jsx)(im,{width:"90%"}),(0,So.jsx)(im,{width:"50%"})]})})})};var au={};wt(au,{enUS:()=>vF,nlNL:()=>xF});var vF={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},xF={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var hi=b(Y());var A0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Nt=b(R()),wF=500,SF=100,bF=({content:e,onChange:t,onCopy:n})=>{let r=(0,hi.useRef)(null),o=_("WidgetCue",A0);return(0,hi.useEffect)(()=>{let s=r.current;if(!s)return;s.style.setProperty("height","0px");let i=Math.min(Math.max(s.scrollHeight,SF),wF);s.style.setProperty("height",`${i}px`)},[e]),(0,Nt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},EF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var m;let s=_("WidgetCue",A0),i=ce(au),a=ct(),l=te("hasKeyboardInput"),[c,u]=(0,hi.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,hi.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Nt.jsxs)(ye,{"data-testid":"cue",children:[(0,Nt.jsx)(Te,{children:(0,Nt.jsxs)(Te.Content,{children:[e.title&&(0,Nt.jsx)(Te.Title,{className:s.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?i(e.rule.label):e.title}),e.specialType==="summary"?(0,Nt.jsx)(bF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Nt.jsx)(ho,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Nt.jsxs)(ye.ButtonsContainer,{children:[(0,Nt.jsxs)("div",{className:s.actions,children:[e.specialType==="summary"&&(0,Nt.jsx)(ye.Button,{onClick:()=>f(c),children:i("copyCue")}),e.callToAction&&(0,Nt.jsx)(ye.Button,{onClick:d,children:e.callToAction.label}),(0,Nt.jsx)(ye.Button,{onClick:v,children:i("removeCue")})]}),e.specialType==="summary"?(0,Nt.jsx)(li,{eventName:"summary feedback",feedbackText:(m=e.text)!=null?m:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Nt.jsx)(li,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},jP=EF;var Ha=b(R()),TF=({cues:e})=>{let t=ve(),n=dn(),r=ce(au),o=ct(),s=c=>{t(Wf({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},i=(c,u)=>{switch(Ir(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(jf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{var d;n.send(Pr,{text:c,suggestion:{source:"assistant",assistantCode:(d=u.rule)==null?void 0:d.label,sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Ha.jsx)(Ha.Fragment,{children:e.map(c=>c.isLoading?(0,Ha.jsx)(am,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Ha.jsx)(jP,{cue:c,onCallToAction:a,onRemove:s,onCopy:i,onUse:l},c.rule.id))})},WP=TF;var lm=b(Y());var KP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var hr=b(R());function CF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var GP=({data:e,schema:t})=>{let n=_("WidgetCustomData",KP),r=o=>{Ir(o)};return(0,lm.useEffect)(()=>{Z.info("Custom data",e,t)},[e]),(0,hr.jsx)("dl",{className:n.root,children:t.map(o=>{let s=CF(e,o.path);return(0,hr.jsxs)(lm.Fragment,{children:[(0,hr.jsx)("dt",{className:n.label,children:o.label}),(0,hr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&s?(0,hr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!s?(0,hr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof s=="string"||typeof s=="number"?(0,hr.jsxs)("button",{type:"button",onClick:()=>r(`${s}`),className:n.copyButton,children:[(0,hr.jsx)("span",{className:n.copyButtonText,children:s}),(0,hr.jsx)(su,{})]}):"-"})]},o.label)})})};var ut=b(Y());var Ba={};wt(Ba,{enUS:()=>kF,nlNL:()=>RF});var kF={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},RF={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var cm={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var we=b(R()),PF=3,AF=({sources:e,onClick:t})=>{let n=ce(Ba),r=_("WidgetKnowledgeAssistant",cm),[o,s]=(0,ut.useState)(!1),i=o?e:e.slice(0,PF);return i.length===0?null:(0,we.jsxs)("ul",{className:r.sources,children:[i.map(a=>(0,we.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,we.jsxs)(yt,{tooltip:!0,placement:"top-start",children:[(0,we.jsx)(yt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,we.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,we.jsx)(yt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),i<e&&(0,we.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>s(!0),children:n("showMore",{amount:e.length-i.length})})]})},IF=({title:e,description:t})=>(0,we.jsx)(ye,{"data-testid":"knowledge-assist-empty-state",children:(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:e}),(0,we.jsx)(ho,{content:t})]})})}),LF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:s,onSourceClick:i})=>{var l;let a=ce(Ba);return(0,we.jsxs)(ye,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:t.question}),(0,we.jsx)(ho,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?s:void 0}),(0,we.jsx)(AF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>i(c,t.question)})]})}),(0,we.jsxs)(ye.ButtonsContainer,{children:[(0,we.jsx)("div",{}),(0,we.jsx)(li,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},I0=(0,ut.createContext)(null),um=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,s]=(0,ut.useState)(null),[i,a]=(0,ut.useState)(!1),[l,c]=(0,ut.useState)(!!n),[u,d]=(0,ut.useState)(null),f=ve(),p=ct(),v=ai(y=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:y,threadId:o,onNewThreadId(g){s(g)}})},{onSuccess(y){var g;p("knowledge assist question answered",{question:y.question,answer:y.answer.answer,sources:(g=y.answer.sources)!=null?g:[],isFollowUpQuestion:y.threadId===o,isAutoInitiated:l}),c(!1)}}),m=y=>I(void 0,null,function*(){a(!0),d(y),yield v.call(y),a(!1),d(null)}),x={isEnabled:!!e,isSubmitting:i,threadId:o,pendingInput:u,onSubmit:m,onReset(){o&&f(ga(o)),s(null)}};return(0,ut.useEffect)(()=>{n&&m(n)},[n]),(0,we.jsx)(I0.Provider,{value:x,children:r})},dm=()=>{let e=ce(Ba),t=_("WidgetKnowledgeAssistant",cm),n=(0,ut.useContext)(I0),r=(0,ut.useRef)(null),[o,s]=(0,ut.useState)(""),i=l=>{s(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),s(""))})};return n.isEnabled?(0,we.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,we.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:i}),(0,we.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},fm=({title:e,emptyState:t})=>{var v,m;let n=ce(Ba),r=ct(),o=_("WidgetKnowledgeAssistant",cm),s=(0,ut.useRef)(null),i=(0,ut.useContext)(I0),a=(m=j(Sc((v=i.threadId)!=null?v:-1)))!=null?m:[],l=te("hasKeyboardInput"),c=dn(),u=x=>{Ir(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),i.onReset(),r("knowledge assist reset",{threadId:(y=i.threadId)!=null?y:void 0})},p=x=>{c.send(Pr,{text:x,suggestion:{source:"assistant",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!i.isEnabled||(a==null?void 0:a.length)===0&&!i.isSubmitting&&!t?null:(0,we.jsxs)(ut.Fragment,{children:[(0,we.jsx)(wr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,we.jsxs)(Ht,{withDivider:!0,children:[t&&a.length===0&&!i.pendingInput&&(0,we.jsx)(IF,S({},t)),a.map((x,y)=>(0,we.jsx)(LF,{innerRef:y===a.length-1?s:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),i.pendingInput&&(0,we.jsx)(am,{title:i.pendingInput})]})}),a.length>0&&(0,we.jsx)("div",{className:o.resetContainer,children:(0,we.jsx)(ye.Button,{disabled:i.threadId===null||i.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var XP=b(Y());var OF=/(https?:\/\/[^\s]+)/,YP=e=>e.split(" ").find(t=>OF.test(t));var $n=b(R()),MF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=YP(r),s=ce(Xc),i=te("showImages"),a=te("fallbackImage"),l=te("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,XP.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(ye,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Te,{children:[i&&e.image&&(0,$n.jsx)(Te.Image,{src:tm(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Te.Content,{children:[e.title&&(0,$n.jsx)(Te.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(ye.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Te.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(ye.Actions,{children:[o&&(0,$n.jsx)(ye.ActionButton,{onClick:u,label:s("visitUrl")}),l&&(0,$n.jsx)(ye.ActionButton,{primary:!0,onClick:c,label:s("useSuggestion")})]})]})},QP=MF;var lu=b(R()),NF=({lines:e,suggestions:t})=>{let n=dn(),r=(o,s)=>{n.send(Pr,{text:o,suggestion:P(S({},s),{source:s.source,sourceText:s.text})})};return(0,lu.jsx)(lu.Fragment,{children:t.map(o=>(0,lu.jsx)(QP,{suggestion:o,lines:e,onUse:s=>r(s,o)},o.text||o.url||o.message))})},ZP=NF;var cu={};wt(cu,{enUS:()=>_F,nlNL:()=>DF});var _F={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],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"}],close:[{type:0,value:"Close"}]},DF={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],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"}],close:[{type:0,value:"Sluiten"}]};var Ua={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var ue=b(R()),eA=(e,t)=>{let n=j(jt);(0,ds.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},FF=({onLogIn:e})=>{let t=_("Widget",Ua),n=te("isEmbedded"),r=te("adminUrl");return(0,ue.jsx)("div",{className:t.loginText,children:(0,ue.jsx)("div",{children:(0,ue.jsx)(Wp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},JP=({text:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.stateText,children:(0,ue.jsx)("div",{children:(0,ue.jsx)("p",{children:e})})},"notification")},zF=()=>{let e=ce(cu),t=ve(),n=_("Widget",Ua),r=te("showSearch"),o=te("isEmbedded"),s=j(Ma("/admin/")),i=dn(),a=te("productName"),l=ct();return eA(()=>{if(o)return t(E0()),()=>{t(RP())}},[t,o]),!r&&!s?null:(0,ue.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ue.jsx)(ye.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ue.jsx)(Aa,{}),onClick:()=>{i.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),s&&(0,ue.jsx)(ye.Button,{as:"a",target:"_blank",icon:(0,ue.jsx)(OP,{}),href:s,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:a}),className:n.shortcut,rel:"noreferrer",onClick:()=>{l("open my deepdesk",{via:"widget-shortcut"})},children:e("linkStudioLogin",{productName:a})})]})},HF=({title:e,content:t})=>{let n=ce(cu),[r,o]=(0,ds.useState)(!0);return r?(0,ue.jsx)(wr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsxs)(ye,{children:[(0,ue.jsx)(Te,{children:(0,ue.jsx)(Te.Content,{children:(0,ue.jsx)(ho,{content:t})})}),(0,ue.jsx)(ye.ButtonsContainer,{children:(0,ue.jsx)(ye.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},BF=()=>{let e=ve(),t=j(Tc),n=j(tC),r=j(AP),o=j(X1),s=j(Rp),i=j(zp),a=j(qs),l=j(Rr);return(0,ds.useEffect)(()=>{!!o&&!n&&Z.warn("Custom data provided, but no schema.")},[o,n]),eA(()=>{t.forEach(({type:c})=>{c==="entities"?e(fr()):Nu.includes(c)||e(gr(c))})},[e,l,a]),(0,ds.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&Z.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ue.jsx)(ds.Fragment,{children:t.map(({type:c,title:u,amount:d,lines:f,schema:p,property:v})=>{var m,x;switch(c){case"entities":return s&&s.length>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(LP,{entities:s})},c);case"cues":return r&&r.length>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(WP,{cues:r})})},c);case"custom-data-banner":return o&&v&&o[v]&&(0,ue.jsx)(HF,{title:u,content:String(o[v])});case"custom-data":return o&&p&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(GP,{data:o,schema:p})})},c);default:return((x=(m=i[c])==null?void 0:m.suggestions)==null?void 0:x.length)>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(ZP,{lines:f,contentType:c,suggestions:i[c].suggestions.slice(0,d)||[]})})},c)}})})},L0=({children:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.footer,children:e})},O0=({children:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},UF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ce(cu),o=j(la),s=j(jt),i=j(N1),a=j(qs),l=j(eC("knowledge-assist")),c=j(Kf),u=j(Gf);return o===!1?(0,ue.jsx)(JP,{text:r("notSupported")}):s===!1?(0,ue.jsx)(FF,{onLogIn:e}):!a||!i||s===null?(0,ue.jsx)(JP,{text:r("waiting")}):(0,ue.jsx)(O0,{children:(0,ue.jsxs)(um,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?Ks:Gs,children:[(0,ue.jsxs)(Ri,{children:[(0,ue.jsx)(zF,{}),(0,ue.jsx)(BF,{}),l&&(0,ue.jsx)(fm,{title:l.title,emptyState:t.emptyState})]}),(0,ue.jsxs)(L0,{children:[l&&(0,ue.jsx)(dm,{}),(0,ue.jsx)(BP,{assistantOptions:n})]})]})})},tA=UF;function Va(e){let t=new Range;return t.selectNodeContents(e),t}function nA(e,t,n){try{return fs(e,t,n),!0}catch(r){return!1}}function pm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function mm(e){return"tagName"in e&&e.tagName==="BR"}var uu=/[\u200B-\u200D\uFEFF]/g;function fs(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,s=!1;function i(l,c){let u=-1,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(uu,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=i(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,i(c,n-o)),s=!0),o=d;break}case Node.ELEMENT_NODE:{if(mm(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),s=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!s);u++);let c=l.lastChild;pm(l)&&c&&!pm(c)&&!mm(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function du(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:s,collapsed:i}=t,a,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let m=d.textContent;p&&(a=c+m.substring(0,r).replace(uu,"").length),v&&(l=c+m.substring(0,s).replace(uu,"").length),c+=m.replace(uu,"").length;break}case Node.ELEMENT_NODE:{if(mm(d)&&d.nextSibling){c++;break}!f&&pm(d)&&d.previousSibling&&c++;for(let m=0;m<d.childNodes.length;m++){let x=p&&m===r,y=v&&m===s;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!i)&&u(d.childNodes[m]),v&&m===s-1&&(l=c),l!==void 0))break}v&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function fu(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:s,collapsed:i}=t,a=0,l="";function c(u){let d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,m=p?s:void 0;l+=u.textContent.replace(uu,"").substring(v,m);break}case Node.ELEMENT_NODE:{if(!i&&a===1&&mm(u)&&u.nextSibling){l+=`
81
- `;break}!d&&!i&&a===1&&pm(u)&&u.previousSibling&&(l+=`
82
- `);let v=f?r:0,m=p?Math.min(s,u.childNodes.length):u.childNodes.length;for(let x=v;x<m&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var rA=(i=>(i.CUT="Cut",i.BACKSPACE="Backspace",i.DELETE="Delete",i.ERASEEOF="EraseEof",i.UNDO="Undo",i.CLEAR="Clear",i))(rA||{}),bo=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}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)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let s=this.getCaretPosition();Xo(s,this.cachedCaretPosition)||(this.cachedCaretPosition=s,this.emit("caretposition",s))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(rA).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function oA(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var yi=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),fu(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o="getComposedRanges"in r&&n instanceof ShadowRoot?(i=r.getComposedRanges(n))==null?void 0:i[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let s=this.element.ownerDocument.createRange();return s.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),s.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!s||!this.element.contains(s.startContainer)||!this.element.contains(s.endContainer)?null:s}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!oA(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!oA(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return du(this.element,n);let r=this.lastKnownSelection;if(r&&nA(this.element,r.start,r.end))return r;let o=Va(this.element);return o.collapse(!1),du(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return fu(this.element,fs(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(s=>{var i,a;s.length===2&&s[0].addedNodes.length===1&&((i=s[0].addedNodes[0])==null?void 0:i.textContent)==="\u2060"&&((a=s[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var VF=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function sA(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,s=window.getComputedStyle(e),i=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",VF.forEach(u=>{o[u]=s[u]}),n?e.scrollHeight>Number.parseInt(s.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),i.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(s.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(s.borderLeftWidth)};return i.removeChild(r),c}var vi=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return sA(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var s;return(s=n==null?void 0:n.get)==null?void 0:s.call(this.element)},set:s=>{var i;(i=n==null?void 0:n.set)==null||i.call(this.element,s),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function iA(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let s=document.createElement("iframe"),i=new URL(t);return Object.entries(n).forEach(([a,l])=>{i.searchParams.append(a,l)}),s.style.position="absolute",s.style.left="-999em",s.style.width="0px",s.style.height="0px",s.tabIndex=-1,s.id=r,s.title=`iframe-${e}`,s.src=i.toString(),window.document.body.appendChild(s),s}function $F(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var M0=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}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()}},N0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=iA(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}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()}},_0=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),Z.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new N0(t,this.deepdeskUrl,{debug:!0}):new M0(t),r=o=>{var i,a;if(o.origin!==this.deepdeskUrl)return;let s=$F(o.data);typeof s!="object"||s.type!=="event"||s.channel!==t||(Z.info("Received broadcast event",this.externalId,o),(a=(i=this.eventMap)[s.name])==null||a.call(i,s.payload))};return n.onMessage(r),n}send(t,n,r){var i,a;Z.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(i=this.eventMap)[t])==null||a.call(i,n));let s=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;s==null||s.postMessage(P(S({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},aA=_0;function jF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[jF(n)]:$e(e[n])}),{}):e}function WF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _t(e){return Array.isArray(e)?e.map(_t):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[WF(n)]:_t(e[n])}),{}):e}var $a=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var D0=e=>new Promise(t=>{setTimeout(t,e)});var ja=class extends $a{constructor(){super(...arguments);this.name="ClientError"}},z0=class extends $a{constructor(){super(...arguments);this.name="ServerError"}},F0=new Map;function KF(e){return I(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(Z.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var ps=class ps{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let s={isAborted:!1,reject:o},i=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",k=n,{useCache:c=!1,abortLatest:u=!1,attempts:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=C=>C instanceof TypeError,retryOnResponse:m=C=>C.status>=500,version:x=null}=k,y=oe(k,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(F0.has(i)){r(F0.get(i));return}}let g=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(g.headers=P(S({},g.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(g.headers=P(S({},g.headers),{"X-Deepdesk-API-Version":x}));let h=d,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[i]&&u&&(this.latestRequestByUrl[i].isAborted=!0,this.latestRequestByUrl[i].reject(new Error("Aborted"))),this.latestRequestByUrl[i]=s;let E=()=>I(this,null,function*(){return h--,a(i,g).then(C=>I(this,null,function*(){return m(C)&&!s.isAborted&&h>0?(yield D0(f),E()):C.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):C})).catch(C=>I(this,null,function*(){if(v(C)&&!s.isAborted&&h>0)return yield D0(f),E();throw C}))});E().then(C=>I(this,null,function*(){let A=yield KF(C);if(delete this.latestRequestByUrl[i],C.status>=500){o(new z0("Server Error",A));return}if(C.status===401){o(new ja("Unauthorized",A));return}if(C.status===403){o(new ja("Forbidden",A));return}if(C.status===404){o(new ja("Not Found",A));return}if(C.status>=400){o(new ja("Bad Request",A));return}c&&F0.set(i,A),r(A)})).catch(C=>{o(C)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return ps.refreshingToken||(ps.refreshingToken=this.get("/apis/admin/session/refresh/",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{ps.refreshingToken=null},1e3*60)})),ps.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};ps.refreshingToken=null;var xi=ps;function H0(e){return P(S({},$e(e)),{metadata:e.metadata})}var wi=class wi{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new xi(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,s)=>I(this,null,function*(){let i=yield r(o,s);return this.handleDeepdeskVersionHeaders(i),i}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(wi.exchangeTokenPromise||(wi.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),wi.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),Z.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},_t(t)),{metadata:(r=t.metadata)!=null?r:{}}));return H0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",_t(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",_t(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),Z.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:s=1e3}=n,i=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return Z.info(`Successfully retrieved conversation ${i.id} for session ${t}`),H0(i)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){Z.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:s=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var s;yield this.preflight();let r=_t(n);n.metadata&&(r.metadata=(s=n.metadata)!=null?s:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return H0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},_t(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let i=n,{data:r}=i,o=oe(i,["data"]),s=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/v2/events",_t(P(S(S({},s),o),{data:r,name:t})),{version:"v2"})})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw Z.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",_t(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,_t(n),{abortLatest:!0})).map(i=>P(S({},$e(i)),{text:i.text||i.url||i.message,source:r,type:r})).filter((i,a,l)=>a===l.findIndex(c=>c.text===i.text))})}isLoggedIn(){return I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,_t(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,s,i)=>s===i.findIndex(a=>a.text===o.text))})}getPinnedMessages(t){return I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",_t(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,_t(t),{version:"v2"});return $e(n)})}knowledgeAssist(s,i,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_t({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(s=>s.text&&s.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let s=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,i=yield this.client.post(s,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(i.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,s=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(s)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",_t(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),s=o.match(Xx);if(!n||!s)return;let i=s[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[i];a&&n&&a!==n&&Z.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[i]=n})}};wi.exchangeTokenPromise=null;var Eo=wi;var lA={startTime:null,stopTime:null},cA=e=>e.handlingTime,uA=ke({name:"handlingTime",initialState:lA,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(at,()=>lA)}}),{handlingTimeStart:dA,handlingTimeStop:gm,handlingTimeReset:fA}=uA.actions,pA=uA.reducer;var mA=(e={})=>{let t=S({onAuthError:aa(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var hm={list:{keywordMatches:[]},fetchState:"idle"};var Si=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,s=t.getState(),{showStyleSuggestions:i}=s.settings,a=(l=s.conversation.current)==null?void 0:l.profileCode;if(!i)return hm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),GF=ke({name:"styleSuggestions",initialState:hm,reducers:{},extraReducers:e=>{e.addCase(Si.pending,t=>{t.fetchState="loading"}).addCase(Si.rejected,t=>{t.fetchState="error"}).addCase(Si.fulfilled,(t,n)=>{t.fetchState="done",Xo(t.list,n.payload)||(t.list=n.payload)}).addCase(Bs,t=>{t.list=hm.list}).addCase(at,()=>hm)}}),gA=GF.reducer;var hA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:Si,debounce:500},e);return o=>s=>i=>{var p;let a=o.getState().input.text,l=s(i),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function qF(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var yA=(e={})=>{let t=S({getTextSuggestions:gr,getAutocompleteSuggestions:Zc,debounce:200,check:Nr},e),n;return r=>o=>s=>{var m;let{input:i}=r.getState(),a=o(s),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,d=(m=l.conversation.current)==null?void 0:m.id,f=s.type===Hp.toString();if(!d||!c&&!u)return a;let{input:p}=l;return qF(p,i)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=ca(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var vA=Si.fulfilled.toString();function YF(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let s=e.keywordMatches.filter(l=>l.keyword===o),i=t.keywordMatches.filter(l=>l.keyword===o),a=i.length-s.length;a<=0||r.push(...i.slice(0,a))}),r}var xA=e=>t=>n=>r=>{var c;if(r.type!==vA){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let s=t.getState(),i=s.styleSuggestions.list,a=(c=s.conversation)==null?void 0:c.current;if(o===i)return;let l=YF(o,i);r.type===vA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var XF=nf({assistants:YT,auth:T1,conversation:_1,contentTypes:QT,passwordlessToken:PP,entities:Wk,handlingTime:pA,info:tT,input:G1,settings:y1,profile:nC,search:aT,styleSuggestions:gA,ui:WR,textSuggestions:IR});function wA(e){return jE({reducer:XF,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(mA()).concat(yA({debounce:200})).concat(hA({debounce:500})).concat(xA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,s)=>o.concat(s),n)},preloadedState:e.preloadedState})}var QF=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},ZF=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),s=Yl("inlineSuggestions")(o);switch(r.type){case aa.toString():{!r.payload&&e.emit("logout",void 0);break}case fr.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case ro.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Bs.toString():e.logSendMessage(r.payload);break;case jf.toString():e.emit("call-to-action",{cue:r.payload});break;case or.fulfilled.toString():r.isBroadcasted||e.broadcast(Oy,r,!1);break;default:break}let i=n(r);switch(r.type){case Bs.toString():e.handleAfterSendMessage(r.payload);break;case eu.toString():e.onUpdateShowTabHint(r.payload);break;case gm.toString():e.logHandlingTime();break;case Tf.toString():e.broadcast(Pf,r);break;case Hs.toString():e.broadcast(Pf,r);break;case Wf.toString():t.dispatch(Hs({source:"assistant",assistantCode:r.payload.code}));break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case wf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:QF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),s&&t.dispatch(Qo([]));break}case Sf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Qo.toString():{s&&r.payload.length>0&&t.dispatch(bf(0));break}case so.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return i},SA=ZF;function B0(e){return e.toISOString().replace("T"," ").replace("Z","")}var JF=(e,t)=>t.version,bA=$t([da,Rr,cA,JF],(e,t,n,r)=>{if(!t)return Z.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:s}=n;return!o||!s?(Z.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:B0(o),timeStop:B0(s)}});function EA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:s}}=e.input,i=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:i,numPastes:r,suggestions:s}}function U0(e,t){var s;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return U0(r,t);let o=(s=e.ownerDocument.defaultView)==null?void 0:s.frameElement;return o?U0(o,t):null}function V0(e,t){return U0(e,t)}function TA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function e5(e){return typeof e=="object"&&e!==null&&"tagName"in e}function ym(e){return e5(e)&&(gi(e)||Gp(e))}var kA,zr=new Map,t5=["bottom","height","left","right","top","width"],CA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:t5.some(n=>e[n]!==t[n]);function RA(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...RA(t)]:[]}function PA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var vm=!1,AA=()=>{vm=!0;let e=[];if(zr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),zr.delete(n);return}let r=n.getBoundingClientRect();CA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(PA,t.rect):t.rect;CA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),zr.size===0){vm=!1;return}kA=window.requestAnimationFrame(AA)};function $0(e,t){let n=RA(e),r=[],o=n.map((s,i)=>$0(s,a=>{r[i]=a;let l=zr.get(e);if(!l)return;let c=r.reduce(PA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(s=!0){if(o.forEach(i=>i.observe(!1)),zr.has(e)){let i=zr.get(e);i.callbacks.push(t),i.rect&&t(i.rect)}else zr.set(e,{rect:void 0,callbacks:[t],parentRects:r});s&&!vm&&AA()},unobserve(){o.forEach(i=>i.unobserve());let s=zr.get(e);if(s){let i=s.callbacks.indexOf(t);i>=0&&s.callbacks.splice(i,1),s.callbacks.length||zr.delete(e),zr.size||(cancelAnimationFrame(kA),vm=!1)}}}}var IA,Hr=new Map,LA=()=>{Hr.forEach((e,t)=>{if(!t.isConnected){Hr.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(s=>s(e.visible)))}),Hr.size!==0&&(IA=window.requestAnimationFrame(LA))};function OA(e,t){return{observe(){let n=Hr.size===0;Hr.has(e)?Hr.get(e).callbacks.push(t):Hr.set(e,{visible:void 0,callbacks:[t]}),n&&LA()},unobserve(){let n=Hr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Hr.delete(e),Hr.size||cancelAnimationFrame(IA)}}}}var j0=["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 W0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function Wa(e){return Number.parseFloat(e)}function xm(e){return Math.round(e*1e6)}function MA(e){return e/1e6}function K0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=Wa(e.width),s=Wa(e.borderLeftWidth),i=Wa(e.borderRightWidth),a=Wa(e.paddingRight),l=MA(xm(o)-xm(s)-xm(i)),c=MA(xm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function pu(e,t={}){var u,d;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ui(n);let r=window.getComputedStyle(e),o=!0,s=()=>{n.scrollTop=e.scrollTop};W0(r,n,j0),K0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",s));let i=OA(e,()=>{W0(r,n,j0),K0(r,e,n),s(),setTimeout(s,0)}),a,l=!0,c=$0(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(W0(r,n,j0),K0(r,e,n),s(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),m=Wa(v.borderTopWidth),x=Wa(v.borderBottomWidth),y=p.top+m-f.top,g=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${g}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),i.observe(),[n,()=>{e.removeEventListener("scroll",s),c.unobserve(),i.unobserve(),n.remove()}]}var NA=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){Z.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function n5(e){return e.offsetParent!==null}function _A(e){if(!n5(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 wm(e,t,n=100){let r=_A(e);t({isVisible:r});let o=setInterval(()=>{let s=_A(e);s!==r&&(r=s,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var mu=class extends Error{};function r5(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}var Sm=class{constructor(){this.queues={}}push(t,n){let r=()=>{let s=this.queues[t][1];s?(this.queues[t]=[s.promise,null],s.resolve()):delete this.queues[t]};if(!this.queues[t]){let s=n().finally(r);return this.queues[t]=[s,null],s}this.queues[t][1]&&this.queues[t][1].reject(new mu("Queued async function is outdated"));let o=r5();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};var o5={accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"},s5={accepted:"onConversationAcceptedAssistants","new-message":"onConversationNewMessageAssistants",ended:"onConversationEndedAssistants"},DA=(e,t)=>{let n=e[s5[t]];if(n&&n.length>0)return n.map(o=>o.code);let r=e[o5[t]];return r?[r]:(Z.warn(`No assistant set in profile for conversation event "${t}"`),[])};var Le=b(R());var FA=NA("showTabHint",!0),Ka=class Ka{constructor({deepdeskUrl:t,version:n=Ka.version||"unknown",locale:r="en-US",token:o,fetch:s,productName:i,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.queues=new Sm;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new Eo(l,{token:o,fetch:s}),this.version=n,this.instanceId=Ka.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[SA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>FA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=wA(c),this.broadcastEvents=new aA({debug:!0,deepdeskUrl:l,eventMap:lT(this.store),createCustomChannel:a}),this.store.dispatch(eu(FA.value())),this.store.dispatch(gf({locale:r,adminUrl:l,productName:i}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=zs(this.state)[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(Z.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(Z.warn("Profile has not been loaded (yet)"),!0):(Z.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(aa(null)),this.store.dispatch(to());let t=n=>jt(n)&&v1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(to())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(Cy({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(yf(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(vf({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(ky(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(Ry(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(xf(t))).payload})}resetConversation(){this.store.dispatch(at()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(gf(t))}setVisitorInfo(t){this.store.dispatch(Z1(t))}setCustomData(t){this.store.dispatch(J1(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Jl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(Ay(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(Iy())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(Ef({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Hp()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:s=!0,includeMetadata:i,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(or({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:i,input:r,skipState:!s}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){Z.warn("Can't evaluate assistant when profile is not loaded yet.");return}let o=DA(r,t);yield Promise.all(o.map(s=>this.queues.push(s,()=>I(this,null,function*(){yield this.evaluateAssistant(s,S({includeMetadata:!0},n))})).catch(i=>{if(i instanceof mu){Z.warn(`Queued assistant "${s}" was outdated and dropped`);return}throw i})))})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return Z.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||Z.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(so(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:s,selection:i}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(B1(Py(t))),!Nr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||i&&(t.shiftKey||(this.store.dispatch($1()),t.preventDefault()))},f=()=>{n||!u||a&&s<=0||i&&(t.shiftKey||(this.store.dispatch(j1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(bf(-1)),this.store.dispatch(is({collapse:!0})),this.store.dispatch($R(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=ua(this.state);if(!p)return;this.store.dispatch(eu(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=ua(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=ua(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(is({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Qo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(Z.info("Start handling time"),this.store.dispatch(dA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(Z.info("Stop handling time"),this.store.dispatch(gm()))}logSendMessage(t){let n=EA(this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEvent("Send Message",{conversationId:this.conversationId(),data:n}),this.emit("send-message-event",n))}logHandlingTime(){let t=bA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(fA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Bs((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(K1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(s){Z.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),Z.error(s)}})}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}setPlatformVariables(t){this.store.dispatch(eT(t))}whenConversationLoaded(t){let n=o=>{var s;return(s=o.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[s,i]=pu(n,r);return s.setAttribute("translate","no"),s.dataset.testid=t,o&&s.classList.add(o),[s,i]}createInlineContainer(t,n){var a;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 s=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,i=s?s.ownerDocument.defaultView:null;if(s&&(i===window||(i==null?void 0:i.parent)===window)){let[l,c]=pu(s,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ui(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),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),Z.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}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()?(Z.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(W1(r.metrics))):Z.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!ym(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ui(t),this.inputMediator=a||(gi(t)?new vi(t):new yi(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(Ef({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(U1(Py(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(V1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(H1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(Cf(p))},500):this.store.dispatch(Cf(p))}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(Vp(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(Vp(!0))}),this.renderSuggestions(t,c),this.subscribe(Yl("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(Ef({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(Cf(this.inputMediator.getSelection())),this.store.dispatch(Vp(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(s=>s()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(s=this.aboveSuggestions)==null||s.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),s=(0,ms.createRoot)(o);s.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(eP,{})})}));let i=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",i),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",i),s.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s}=n,i=o&&V0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",i||t,{appendTo:s,closestScrollElement:i,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",i||t,{appendTo:s},r==null?void 0:r.suggestionsRootNode),d=(0,ms.createRoot)(a);d.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(CP,{inputElement:t})})}));let f=(0,ms.createRoot)(c);return f.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(cP,{onLogIn:()=>this.loginViaPopup().catch(p=>Z.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s,floatingMenuParent:i}=n,a=o&&V0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:i!=null?i:s},r==null?void 0:r.floatingMenuParent),u=(0,ms.createRoot)(l);return u.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(UR,{onLogIn:()=>this.loginViaPopup().catch(d=>Z.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,ms.createRoot)(r);return o.render((0,Le.jsx)(ls,{store:this.store,customStyles:n,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(DR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&Z.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:s}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:s}),this.widgetRoot=(0,ms.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(tA,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(i=>Z.warn(i.message))})})})),this.whenConversationLoaded(()=>{var i;this.broadcastEvents.setExternalId((i=this.state.conversation.current)==null?void 0:i.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:s}=r,i=(0,ms.createRoot)(n);return i.render((0,Le.jsx)(ls,{store:this.store,customStyles:o,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(O0,{children:(0,Le.jsxs)(um,{assistantCode:t,initialQuestion:s,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Ks:Gs,children:[(0,Le.jsx)(Ri,{children:(0,Le.jsx)(fm,{title:r.title,emptyState:r.emptyState})}),(0,Le.jsx)(L0,{children:(0,Le.jsx)(dm,{})})]})})})})),{unmount(){i.unmount()}}}setupHandlingTime(t){let n=wm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){TA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(Ec());let t=qs(this.state);t&&this.store.dispatch(gf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{let o=new MessageChannel,s=o.port1,i=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${i}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",d),clearInterval(f)};s.onmessage=p=>I(this,null,function*(){var v,m;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((m=p.data)==null?void 0:m.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(tc),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let m=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(m,a.origin,[o.port2])}catch(m){Z.error("Error posting message to popup",m),r(m)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&Z.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(Z.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;Z.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Tc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(fr()):Nu.includes(r)||this.store.dispatch(gr(r))})}catch(r){this.handleError(r)}})}};Ka.version="17.1.1",Ka.count=0;var gu=Ka;function i5(e){return I(this,null,function*(){var o,s,i;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(i=(s=e.mimeType)!=null?s:n.headers.get("Content-Type"))!=null?i:"image/jpeg"})})}function zA(e,t){return I(this,null,function*(){let n=yield i5(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}})}function HA(e,t,n){return I(this,null,function*(){yield new Eo(e).authenticateWithKey(t,n)})}function BA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function UA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:s}=e,{start:i,end:a}=(d=n.replace)!=null?d:{start:0,end:s.length},l=`${s.slice(0,i)}${t}${s.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:i+t.length,end:i+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function VA(r,o){return I(this,arguments,function*(e,t,n={}){let s=n.replace?fs(e,n.replace.start,n.replace.end):Va(e),i,a=()=>{if(n.setRange)return n.setRange(s.cloneRange());s.deleteContents(),i=document.createElement("span"),s.insertNode(i),n.insertBRs!==!1?t.split(`
83
- `).reverse().forEach((l,c)=>{c>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(l))}):s.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?fs(e,n.selectionAfter.start,n.selectionAfter.end):(s.collapse(!1),s),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!i)return;i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}function a5(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 l5(e){let t=document.createDocumentFragment();return e.split(`
84
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},s=0;for(;o=n.slice(s).match(/(\[([^\]]+)])\(([^)]+)\)/);){let i=document.createElement("a");i.href=o[3],i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"),i.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(s,s+o.index))),t.appendChild(i),s=s+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(s)))}),t}function $A(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):$A(n,t)}function jA(o,s){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let i;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var f;let l=(f=e.ownerDocument.defaultView)!=null?f:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;i=document.createElement("span"),u.insertNode(i);let d=r?a5(t):l5(t);n?$A(u.startContainer,d):(u.insertNode(d),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!i)try{i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}return oI(c5);})();
80
+ 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 f0=b(R()),M4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},BR=({className:e,color:t})=>(0,f0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,f0.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:M4[t||"pink"]})});var UR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var p0={};pt(p0,{enUS:()=>N4,nlNL:()=>O4});var N4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},O4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var mi=b(R()),$R=({onLogIn:e})=>{let t=ie(p0),n=te("floatingMenu"),r=te("productName"),o=ve(),s=j(jt),i=_("FloatingMenu",UR);if(s===null||n===!1)return null;let a=()=>{s===!0?o(Fn(!0)):e()};return(0,mi.jsxs)("button",{type:"button",className:(0,VR.default)(i.root,{[i.isLoggedIn]:s,[i.isLoggedOut]:!s}),onClick:a,children:[(0,mi.jsx)("div",{className:i.text,children:t(s?"search":"signin",{productName:r})}),(0,mi.jsxs)("div",{className:i.icon,children:[(0,mi.jsx)(BR,{className:i.logo,color:"pink"}),s===!1&&(0,mi.jsx)(HR,{className:i.lock})]})]})};var Kp=b(Y());function Or(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:s}=e.input;return s.start!==s.end?!1:s.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(s.end))||r&&new RegExp(r).test(o.substring(0,s.end))?!0:n===!1&&r===!1:!1}var _4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},$p=({ui:e})=>e.overlayCollapsed,jR=ke({name:"ui",initialState:_4,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(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:eu,setInputFocus:jp,setOverlayCollapsed:is,setOpenOverlayWhenTyping:WR,setOverlayCollapsedUserOverwrite:KR}=jR.actions,GR=jR.reducer;var JR=b(Y());var as=b(Y());var qR=b(Y());function YR(e,t,n){(0,qR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var XR={root:"dd-1MBCO",actions:"dd--x4cy",closeIconContainer:"dd-1z5NR",closeIcon:"dd-8qMF-",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var tu=b(R()),QR=({title:e})=>(0,tu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18px",height:"18px",viewBox:"0 0 24 24","aria-labelledby":"closeTitle",children:[(0,tu.jsx)("title",{id:"closeTitle",children:e}),(0,tu.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]});var m0={};pt(m0,{enUS:()=>D4,nlNL:()=>F4});var D4={assistant:[{type:0,value:"Assistant"}],close:[{type:0,value:"Close"}]},F4={assistant:[{type:0,value:"Assistent"}],close:[{type:0,value:"Sluiten"}]};var _r=b(R()),H4=["search","personal-collection-search","search-autocomplete"];function B4(e,t,n,r={}){var s;let o="";return H4.includes(t)?o=mC(mv(e,n,{stripAgentPart:!0}),(s=r.searchKeywords)!=null?s:[n]):o=mv(e,n,r),r.placeholders===!0&&(o=gC(o)),o}var U4=()=>{},V4=({selected:e,suggestion:t})=>{let n=ie(m0),r=te("inlineSuggestions"),o=j(ca),[s,i]=(0,as.useState)(!1),a=te("enableSuggestionFeedback"),l=j(x=>x.input.text),c=ve(),u=_("TextSuggestion",XR),d=(0,as.useRef)(null),f=t.source==="assistant",p=a&&!f;(0,as.useEffect)(()=>{let x=setTimeout(()=>{c(B1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(x)}},[t]),YR(d,"click",()=>{c(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let v=()=>{c(Hs({source:t.source,text:t.text,assistantCode:t.assistantCode}))},g=(0,as.useMemo)(()=>B4(t.text,t.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:t.searchKeywords}),[r,t.text,t.source,o,t.searchKeywords]);return t.source==="gpt"&&!r?null:(0,_r.jsxs)("div",{className:u.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,_r.jsx)(ge,{ref:d,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:U4,children:(0,_r.jsx)(Js,{attributes:t.source==="assistant"?{"data-label":n("assistant")}:void 0,containerTagName:"div",noWrap:!1,tagName:"span",className:u.formattedText,content:g})}),p&&s&&(0,_r.jsx)("div",{className:u.actions,children:(0,_r.jsx)(Hp,{source:"overlay",context:l,suggestion:t})}),f&&s&&(0,_r.jsx)("div",{className:u.closeIconContainer,children:(0,_r.jsx)("button",{type:"button",className:u.closeIcon,onClick:v,title:n("close"),children:(0,_r.jsx)(QR,{title:n("close")})})})]})},ZR=V4;var eP=b(R()),$4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,JR.useMemo)(()=>{let o=e.map((s,i)=>(0,eP.jsx)(ZR,{index:i,selected:i===t,suggestion:s},`${s.text}-${s.source}`));return n?o.reverse():o},[e,t,n]),Wp=$4;var tP={root:"dd-PfvRI",paper:"dd-HYlyY"};var nu=b(R()),j4=()=>{let e=(0,Kp.useRef)(null),t=_("InlineSuggestionsOverlay",tP),n=j(Or),r=ve(),o=j(jt),s=j(la),i=j($p),a=te("showTextSuggestions"),l=j(zs),c=j(Zl);return ss(()=>{setTimeout(()=>{r(is({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Kp.useEffect)(()=>{let u=e.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),i||!n||!a||l.length===0||o!==!0||s===!1?null:(0,nu.jsx)("div",{className:t.root,"data-variant":"inline",children:(0,nu.jsx)("div",{ref:e,className:t.paper,children:(0,nu.jsx)(Ht,{children:(0,nu.jsx)(Wp,{suggestions:l,selectedIndex:c})})})})},nP=j4;var ru=b(R()),W4=({children:e})=>{let n=te("locale").replace("-","");return(0,ru.jsx)(jy.Provider,{value:n,children:e})},K4=({store:e,customStyles:t={},children:n})=>(0,ru.jsx)(m1,{store:e,children:(0,ru.jsx)(W4,{children:(0,ru.jsx)(Qa.Provider,{value:t,children:n})})}),ls=K4;var qp=b(Oe()),Da=b(Y());var rP=b(Y());function oP(e,t){let[n,r]=(0,rP.useState)(()=>{if(typeof window=="undefined")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return Z.error(s),t}});return[n,s=>{try{let i=s instanceof Function?s(n):s;r(i),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(i))}catch(i){Z.error(i)}}]}var sP=()=>/Mac/i.test(navigator.platform);var aP=b(Oe()),yo=b(Y());var g0={};pt(g0,{enUS:()=>G4,nlNL:()=>q4});var G4={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"}]}]},q4={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 iP={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var cs=b(R()),h0=(e,t,n)=>r=>(0,cs.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),Y4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let s=ie(g0),i=dn(),a=_("Login",iP),l=te("productName"),c=(0,yo.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,yo.useCallback)(x=>{x.preventDefault(),i.send(fa,!0)},[t]),d=(0,yo.useMemo)(()=>x=>(0,cs.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,yo.useCallback)(x=>(0,cs.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:g}=(0,yo.useMemo)(()=>({min:h0(a,60*10,c),hour:h0(a,60*60,c),day:h0(a,60*60*12,c)}),[]);return(0,cs.jsxs)("div",{className:(0,aP.default)(e,a.root),children:[s("loginPlease",{login:n?f:d,productName:l}),r&&(0,cs.jsxs)(yo.Fragment,{children:[(0,cs.jsx)("br",{}),s("snooze",{min:p,hour:v,day:g})]})]})},Gp=Y4;var lP={root:"dd-DoQhb",text:"dd-Jwnev"};var ou=b(R()),X4=({title:e})=>{let t=_("SearchTrigger",lP),n=ve(),r=ut();return(0,ou.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,ou.jsx)(Aa,{}),(0,ou.jsx)("span",{className:t.text,children:e})]})},cP=X4;var y0={};pt(y0,{enUS:()=>Q4,nlNL:()=>Z4});var Q4={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"}]},Z4={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 uP={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Ve=b(R()),J4=({onLogIn:e})=>{let t=_("SuggestionsOverlay",uP),n=ie(y0),r=j(Or),o=j(H1),s=ve(),i=(0,Da.useRef)(null),a=te("searchTriggerKey"),l=te("productName"),c=j($p),u=j(jt),d=j(la),[f,p]=(0,Da.useState)(null),v=te("showSearch"),g=te("showTextSuggestions"),x=te("adminUrl"),y=te("isEmbedded"),[h,m]=oP("dd-snooze-until-ms",0),w=c||h>Date.now(),E=j(zs),k=j(Zl),C=E.filter(O=>O.source!=="gpt").length,A=()=>{w&&m(0),s(KR(!w))},V=O=>{let L=Date.now()+O*1e3;m(L),Z.info(`Snooze until: ${new Date(L)}`),s(is({collapse:!0}))};return(0,Da.useEffect)(()=>{C===0&&p(null)},[E,C]),ss(()=>{s(is({collapse:!0,skipWhenInputFocus:!0}))}),u===null||d===!1?null:u===!1?(0,Ve.jsxs)("div",{ref:i,className:(0,qp.default)(t.root,{[t.isCollapsed]:w}),children:[!w&&(0,Ve.jsxs)("div",{className:t.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:t.triggersRight,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("open",{productName:l}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:t.collapsible,children:(0,Ve.jsx)(Gp,{loginUrl:x,isEmbedded:y,onLogIn:e,onSnooze:V})})]}):!o||!r?null:(0,Ve.jsxs)("div",{ref:i,className:(0,qp.default)(t.root,{[t.isCollapsed]:w}),children:[!w&&(0,Ve.jsxs)("div",{className:t.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:v&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>p(n(sP()?"searchHintMac":"searchHintWindows",{searchTriggerKey:a.toUpperCase()})),onMouseLeave:()=>p(null),children:(0,Ve.jsx)(cP,{title:n("search")})})}),(0,Ve.jsxs)("div",{className:t.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,qp.default)(!f&&t.hintsHidden,t.hints),children:f}),(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:t.toggleButtonWrapper,children:(0,Ve.jsx)(xs,{className:t.toggleButton,title:n("open",{productName:l}),onClick:A,isCollapsed:!0})}),C>0&&g&&(0,Ve.jsx)("div",{className:t.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(Ht,{children:(0,Ve.jsx)(Wp,{suggestions:E,selectedIndex:k,reverse:!0})})})]})},dP=J4;var im=b(Oe());var wo=b(Y());var Fa=b(Y());function Yp(e){return e.contentEditable==="true"}function eF(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),s=o.cloneRange();s.selectNodeContents(e),s.setEnd(o.endContainer,o.endOffset),n=s.toString().length,s.selectNodeContents(e),s.setEnd(o.startContainer,o.startOffset),t=s.toString().length}return{selectionStart:t,selectionEnd:n}}function fP(e){let{selectionStart:t,selectionEnd:n}=Yp(e)?eF(e):e;return[t,n]}function pP(e){let[,t]=(0,Fa.useState)(),n=(0,Fa.useRef)(null);return n.current=fP(e),(0,Fa.useEffect)(()=>{let r=()=>{var a;let[o,s]=(a=n.current)!=null?a:[],i=fP(e);(!i||o!==i[0]||s!==i[1])&&(n.current=i,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 mP(e,t){if(!t)return;let n=e,{value:r}=n,[o,s]=t,i=r.match(_u);if(!i||i.length===0)return;let a=0;i.find(l=>{let c=r.indexOf(l,a);return o>c&&s<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var gP=b(Y()),tF=["div","span","mark","strong","b","i","u","em"];function v0(e,t,n=0){var s;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(s=r.props)==null?void 0:s.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(tF.includes(o)){let i=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,gP.cloneElement)(r,{children:v0(i,t,n+1)})]}return[...e,...t]}function gi(e){return e.tagName.toLowerCase()==="textarea"}var hP={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var SP=b(Oe());var tm=b(Y());var za=b(Y());function yP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Xp(e){let t=(0,za.useRef)(null),[n,r]=(0,za.useState)(!1);return(0,za.useEffect)(()=>{var u;let o=!1,s=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[i,a]=yP((d,f)=>{let p=t.current;if(!p)return;let v=d/s,g=f/s,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&g>x.y&&g<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=yP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",i),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",i),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function vP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Qp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function xP(e){return e!=null}var wP=b(Oe()),Zp=b(Y());var vo={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var x0=b(R()),Jp=(0,Zp.forwardRef)((o,r)=>{var s=o,{className:e,children:t}=s,n=oe(s,["className","children"]);let i=(0,Zp.useRef)(null),a=_("TabCompletion",vo);return(0,x0.jsx)("div",P(S({ref:Qp([i,r]),className:(0,wP.default)(e,a.popoverContentContainer)},n),{children:(0,x0.jsx)("div",{className:a.popoverContent,children:t})}))});var us=b(R()),nF=e=>t=>{let n=l0(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},rF=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let s=_("TabCompletion",vo),i=Dp(),a=(0,tm.useMemo)(()=>nF(e.getBoundingClientRect()),[e]),[l,c]=Xp(e);return(0,tm.useEffect)(()=>{c?i.open():i.close()},[c]),(0,us.jsxs)("span",{children:[(0,us.jsx)("mark",{ref:Qp([l,i.triggerRef]),className:(0,SP.default)(s.matchKeyword,{[s.hover]:c}),"aria-haspopup":"dialog","aria-expanded":i.opened?"true":"false",children:r}),i.opened&&(0,us.jsx)(_a,{className:s.popover,triggerRef:i.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,us.jsx)(Jp,{style:n,children:(0,us.jsx)("div",{className:s.hintText,children:o})})})]})},em=class extends ao{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>P(S({},o),{keywordRegex:new RegExp(`\\b${vP(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(s=>{if(this.usedKeywordMatches.has(s))return null;let i=n.match(s.keywordRegex);if(!i)return null;let a=n.charAt(i.index-1),l=n.charAt(i.index+s.keyword.length);return a==="{"&&l==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:s.suggestion,preparedKeywordMatch:s,valid:!0}}).filter(xP);if(r.length===0)return null;let o=r.reduce((s,i)=>i.index<s.index?i:s);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,us.jsx)(rF,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var bP=b(Oe());var w0=b(R()),oF=({inputElement:e,children:t})=>{let n=_("TabCompletion",vo),[r,o]=Xp(e);return(0,w0.jsx)("mark",{ref:r,className:(0,bP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},nm=class extends ao{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,w0.jsx)(oF,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var om=b(Oe());var Jt=b(Y());var S0=b(R()),EP=()=>(0,S0.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,S0.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 Dr=b(Y());var CP=b(Yy());var TP={root:"dd-ky-Bv",content:"dd-kV5e1"};function rm(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(s){return null}}function b0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),sF=3,iF=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),aF=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=sF})=>{let s=_("LinkSearch",TP),[i,a]=(0,Dr.useState)(""),l=ve(),c=j(AR("url")),u=j(aT("URL")),d=(0,Dr.useMemo)(()=>u.map(iF),[u]),[f,p]=(0,Dr.useState)(d.length-1),v=te("fallbackImage"),g=m=>{let w=m.target;a(w.value)},x=(m,w)=>{m.stopPropagation(),m.preventDefault(),window.open(w,"_blank")},y=m=>{var k;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;m.code==="Escape"&&(a(""),t()),m.code==="ArrowUp"&&p(w),m.code==="ArrowDown"&&p(E),m.code==="Enter"&&e(((k=d[f])==null?void 0:k.text)||i)},h=(0,Dr.useCallback)((0,CP.default)(m=>{l(Us({query:m,type:"URL",tags:["link-search"]}))},300),[]);return(0,Dr.useEffect)(()=>{i&&h(i)},[i]),(0,Dr.useEffect)(()=>()=>{l(Af())},[]),(0,Vn.jsxs)("div",{className:s.root,children:[(0,Vn.jsx)(Ht,{withDivider:!0,children:(i?d:c).slice(0,o).map((m,w)=>(0,Vn.jsx)(ge,{selected:f===w,onClick:()=>e(m.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Se,{children:[(0,Vn.jsx)(Se.Image,{src:rm(m,"small",v||void 0),title:m.title||m.text}),(0,Vn.jsxs)(Se.Content,{className:s.content,cropText:!0,children:[(0,Vn.jsx)(Se.Title,{children:m.title||b0(m.text)}),m.title&&b0(m.text)]}),(0,Vn.jsx)(ge.Actions,{children:(0,Vn.jsx)(ge.ActionButton,{label:r,onClick:E=>x(E,m.text)})})]})},m.text))}),(0,Vn.jsx)(pc,{value:i,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:y})]})},kP=aF;var E0={};pt(E0,{enUS:()=>lF,nlNL:()=>cF});var lF={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},cF={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Zt=b(R()),uF=(0,Jt.forwardRef)((e,t)=>{let n=_("TabCompletion",vo);return(0,Zt.jsx)("mark",{ref:t,className:(0,om.default)(n.matchSelection)},"selection-start")}),dF=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let s=ie(E0),i=_("TabCompletion",vo),a=(0,Jt.useRef)(null),l=(0,Jt.useRef)(null),[c,u]=(0,Jt.useState)(null),d=ve(),f=Dp(document.activeElement===r),[p]=(0,Jt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Jt.useEffect)(()=>()=>p.detach(),[]),(0,Jt.useEffect)(()=>{let g=e.current,x=a.current;!g||!x||(p.setStart(g,0),p.setEnd(x,0))},[e.current,a.current]),ss(()=>{f.close()});let v=(0,Jt.useCallback)(g=>{let x=p.toString(),y=/^http(s?):\/\//.test(g)?g:`https://${g}`;d(bf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Zt.jsxs)("span",{children:[(0,Zt.jsx)("mark",{ref:a,className:(0,om.default)(i.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Zt.jsx)(_a,{className:i.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Zt.jsxs)(Jp,{style:n,ref:l,children:[(0,Zt.jsx)("div",{className:(0,om.default)(i.selectionOptions,{[i.selectionOptionsIsHidden]:c!==null}),children:(0,Zt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:i.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Zt.jsx)(EP,{}),(0,Zt.jsx)("span",{children:"\xA0"}),(0,Zt.jsx)("span",{children:s("insertLink")})]})}),c==="insertLink"&&(0,Zt.jsx)(kP,{placeholder:s("linkInputPlaceholder"),visitUrlText:s("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},sm=class extends ao{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,Jt.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let s=this.foundIndex===0?r:o,i=s>=this.charCount&&s<=this.charCount+n.length?{index:s-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let a=this.foundIndex===1;return i&&a?this.charCount+=s-this.charCount:this.charCount+=n.length,i?S({isStart:a},i):null}replaceWith(n,r){return r.isStart?(0,Zt.jsx)(uF,{ref:this.startRef}):(0,Zt.jsx)(dF,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var xo=b(R()),fF=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:s,keywordMatches:i,inputElement:a,source:l})=>{let c=_("TabCompletion",hP),u=te("insertLink"),d=te("showMidSentenceSuggestions"),f=te("inlineSuggestions"),p=pP(a),v=(0,wo.useRef)(null),g=j(jt);(0,wo.useEffect)(()=>{gi(a)&&p&&mP(a,p)},[p]);let x=(0,wo.useCallback)(m=>{if(!o||!n)return m;let w=[(0,xo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,xo.jsx)("span",{"data-testid":"tab-completion",className:(0,im.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,xo.jsx)("span",{className:(0,im.default)(c.hint,c.resetIndent),children:(0,xo.jsx)(Mu,{keyCode:"tab"},"tabHint")})),v0(m,w)},[o,n,r]),y=(0,wo.useMemo)(()=>{let m=[];return u&&m.push(new sm("selection")),m.push(new nm("placeholders")),s&&m.push(new em("keywords")),m},[f,u,s]),h=(0,wo.useMemo)(()=>{let m=window.getComputedStyle(a);return{"--dd-color":m.color,"--dd-font-size":m.fontSize,"--dd-font-family":m.fontFamily,"--dd-font-variant":m.fontVariant}},[]);return!e||!g?null:(0,xo.jsxs)("div",{ref:m=>{m!=null&&m.parentElement&&(v.current=m==null?void 0:m.parentElement)},className:c.root,style:h,children:[(0,xo.jsx)(Js,{tagName:"span",containerTagName:"div",className:(0,im.default)(c.container,c.agentText),disableLineBreaks:gi(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:i,inputElement:a,inputStyle:h,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,xo.jsx)("br",{})]})},pF=e=>{var x,y,h;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:s}=e,i=ua({input:t}),a=(i==null?void 0:i.text)||"",l=(i==null?void 0:i.source)||"",c=(x=t.html)!=null?x:ha(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=s,{showTabCompletion:p,visible:v,showStyleSuggestions:g}=r;return{showTabHint:d,showStyleSuggestions:g,showTabCompletion:p&&Or(e),content:c,tabText:u,source:l,keywordMatches:(h=(y=o.list)==null?void 0:y.keywordMatches)!=null?h:[],enabled:v&&f!==!1}},RP=p1(pF)(fF);var ds=b(Y());var mF={token:null,interval:null},T0=he("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),C0=he("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(T0()),setInterval(()=>r(T0()),n)}),PP=ke({name:"passwordlessToken",initialState:mF,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(T0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(C0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:AP}=PP.actions,IP=PP.reducer;function gF(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var LP=$t([YT],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:gF(n.code),label:n.code,name:n.name,description:n.name}})));var am=b(Y());var R0=b(Oe());var k0=b(R()),su=()=>(0,k0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,k0.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 MP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Fr=b(R()),hF=({entities:e})=>{let t=_("EntitiesWidgetList",MP),[n,r]=(0,am.useState)(void 0),o=ve(),s=()=>{r(void 0)},i=a=>{e&&(r(e.indexOf(a)),Ir(a.text),o(ro({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,am.useEffect)(()=>{let a=setTimeout(s,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Fr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Fr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>i(a),children:[(0,Fr.jsx)("span",{className:t.entityText,children:a.text}),(0,Fr.jsxs)("span",{className:t.iconWrapper,children:[(0,Fr.jsx)("span",{className:(0,R0.default)(t.icon),children:(0,Fr.jsx)(su,{})}),(0,Fr.jsx)("span",{className:(0,R0.default)(t.icon,n===l&&t.iconClicked),children:(0,Fr.jsx)(su,{})})]})]},a.text))})},NP=hF;var P0=b(R()),OP=()=>(0,P0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,P0.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 UP=b(Y());var _P={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var DP={root:"dd-nazq3",rotation:"dd-3EHTv"};var zP=b(R()),yF=({size:e=12})=>{let t=_("LoadingSpinner",DP);return(0,zP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},FP=yF;var A0=b(R()),HP=()=>(0,A0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,A0.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var iu=b(R()),BP=e=>(0,iu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,iu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,iu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var I0={};pt(I0,{enUS:()=>vF,nlNL:()=>xF});var vF={error:[{type:0,value:"Something went wrong"}]},xF={error:[{type:0,value:"Er ging iets fout"}]};var Pn=b(R()),wF=3e3,SF=({assistantOptions:e})=>{let t=_("OnDemandAssistants",_P),n=ie(I0),r=(0,UP.useRef)(),o=ai(or),s=ai(so),i=j(eC),a=j(tC),l=ut(),c=a.filter(f=>f.isPinned),u=a.filter(f=>!f.isPinned),d=f=>I(void 0,null,function*(){clearTimeout(r.current),l("trigger on demand assistant",{assistantCode:f}),f===i?yield s.call({transcript:e.transcript}):yield o.call(P(S({},e),{assistantCode:f})),r.current=setTimeout(()=>o.reset(),wF)});return a.length===0?null:(0,Pn.jsxs)("div",{className:t.root,children:[c.map(({assistant:f,assistantName:p})=>(0,Pn.jsx)("button",{type:"button",className:t.button,disabled:o.state==="loading",onClick:()=>d(f),children:p},f)),u.length>0&&(0,Pn.jsxs)(vt,{placement:"top-end",children:[(0,Pn.jsx)(vt.Trigger,{className:t.trigger,disabled:o.state==="loading",children:(0,Pn.jsx)(Fp,{"data-testid":"trigger"})}),(0,Pn.jsx)(vt.Content,{className:t.nav,"data-testid":"popover",children:u.map(({assistant:f,assistantName:p})=>(0,Pn.jsx)(vt.Button,{className:t.item,disabled:o.state==="loading",onClick:()=>d(f),children:p},f))})]}),o.state==="loading"&&(0,Pn.jsx)(FP,{}),o.state==="done"&&(0,Pn.jsx)(BP,{"data-testid":"trigger-done"}),o.state==="error"&&(0,Pn.jsx)(zk,{trigger:(0,Pn.jsx)(HP,{}),children:n("error")})]})},VP=SF;var WP=b(Y());var $P={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var jP=b(R()),bF=({width:e})=>{let t=_("LoadingProgressBar",$P);return(0,jP.jsx)("div",{className:t.loadingBar,style:{width:e}})},lm=bF;var So=b(R()),cm=({title:e})=>{let t=(0,WP.useRef)(null);return Nu(t),(0,So.jsx)(ge,{ref:t,children:(0,So.jsx)(Se,{children:(0,So.jsxs)(Se.Content,{children:[(0,So.jsx)(Se.Title,{children:e}),(0,So.jsx)(lm,{width:"60%"}),(0,So.jsx)(lm,{width:"90%"}),(0,So.jsx)(lm,{width:"50%"})]})})})};var au={};pt(au,{enUS:()=>EF,nlNL:()=>TF});var EF={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},TF={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var hi=b(Y());var L0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Ot=b(R()),CF=500,kF=100,RF=({content:e,onChange:t,onCopy:n})=>{let r=(0,hi.useRef)(null),o=_("WidgetCue",L0);return(0,hi.useEffect)(()=>{let s=r.current;if(!s)return;s.style.setProperty("height","0px");let i=Math.min(Math.max(s.scrollHeight,kF),CF);s.style.setProperty("height",`${i}px`)},[e]),(0,Ot.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},PF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let s=_("WidgetCue",L0),i=ie(au),a=ut(),l=te("hasKeyboardInput"),[c,u]=(0,hi.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,hi.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Ot.jsxs)(ge,{"data-testid":"cue",children:[(0,Ot.jsx)(Se,{children:(0,Ot.jsxs)(Se.Content,{children:[e.title&&(0,Ot.jsx)(Se.Title,{className:s.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?i(e.rule.label):e.title}),e.specialType==="summary"?(0,Ot.jsx)(RF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Ot.jsx)(ho,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Ot.jsxs)(ge.ButtonsContainer,{children:[(0,Ot.jsxs)("div",{className:s.actions,children:[e.specialType==="summary"&&(0,Ot.jsx)(ge.Button,{onClick:()=>f(c),children:i("copyCue")}),e.callToAction&&(0,Ot.jsx)(ge.Button,{onClick:d,children:e.callToAction.label}),(0,Ot.jsx)(ge.Button,{onClick:v,children:i("removeCue")})]}),e.specialType==="summary"?(0,Ot.jsx)(li,{eventName:"summary feedback",feedbackText:(g=e.text)!=null?g:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Ot.jsx)(li,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},KP=PF;var Ha=b(R()),AF=({cues:e})=>{let t=ve(),n=dn(),r=ie(au),o=ut(),s=c=>{t(Gf({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},i=(c,u)=>{switch(Ir(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(Kf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{var d;n.send(Pr,{text:c,suggestion:{source:"assistant",assistantCode:(d=u.rule)==null?void 0:d.label,sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Ha.jsx)(Ha.Fragment,{children:e.map(c=>c.isLoading?(0,Ha.jsx)(cm,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Ha.jsx)(KP,{cue:c,onCallToAction:a,onRemove:s,onCopy:i,onUse:l},c.rule.id))})},GP=AF;var um=b(Y());var qP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var hr=b(R());function IF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var YP=({data:e,schema:t})=>{let n=_("WidgetCustomData",qP),r=o=>{Ir(o)};return(0,um.useEffect)(()=>{Z.info("Custom data",e,t)},[e]),(0,hr.jsx)("dl",{className:n.root,children:t.map(o=>{let s=IF(e,o.path);return(0,hr.jsxs)(um.Fragment,{children:[(0,hr.jsx)("dt",{className:n.label,children:o.label}),(0,hr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&s?(0,hr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!s?(0,hr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof s=="string"||typeof s=="number"?(0,hr.jsxs)("button",{type:"button",onClick:()=>r(`${s}`),className:n.copyButton,children:[(0,hr.jsx)("span",{className:n.copyButtonText,children:s}),(0,hr.jsx)(su,{})]}):"-"})]},o.label)})})};var rt=b(Y());var Ba={};pt(Ba,{enUS:()=>LF,nlNL:()=>MF});var LF={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},MF={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var dm={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var QP=b(Y());var XP={error:"dd-CoAuB"};var M0={};pt(M0,{enUS:()=>NF,nlNL:()=>OF});var NF={errorPrefix:[{type:0,value:"Error:"}]},OF={errorPrefix:[{type:0,value:"Foutmelding:"}]};var lu=b(R()),ZP=({message:e})=>{let t=(0,QP.useRef)(null),n=_("WidgetCardError",XP),r=ie(M0);return Nu(t),(0,lu.jsx)(ge,{ref:t,children:(0,lu.jsx)(Se,{children:(0,lu.jsxs)(Se.Content,{className:n.error,children:[r("errorPrefix")," ",e]})})})};var we=b(R()),_F=3,DF=({sources:e,onClick:t})=>{let n=ie(Ba),r=_("WidgetKnowledgeAssistant",dm),[o,s]=(0,rt.useState)(!1),i=o?e:e.slice(0,_F);return i.length===0?null:(0,we.jsxs)("ul",{className:r.sources,children:[i.map(a=>(0,we.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,we.jsxs)(vt,{tooltip:!0,placement:"top-start",children:[(0,we.jsx)(vt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,we.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,we.jsx)(vt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),i<e&&(0,we.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>s(!0),children:n("showMore",{amount:e.length-i.length})})]})},FF=({title:e,description:t})=>(0,we.jsx)(ge,{"data-testid":"knowledge-assist-empty-state",children:(0,we.jsx)(Se,{children:(0,we.jsxs)(Se.Content,{children:[(0,we.jsx)(Se.Title,{children:e}),(0,we.jsx)(ho,{content:t})]})})}),zF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:s,onSourceClick:i})=>{var l;let a=ie(Ba);return(0,we.jsxs)(ge,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,we.jsx)(Se,{children:(0,we.jsxs)(Se.Content,{children:[(0,we.jsx)(Se.Title,{children:t.question}),(0,we.jsx)(ho,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?s:void 0}),(0,we.jsx)(DF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>i(c,t.question)})]})}),(0,we.jsxs)(ge.ButtonsContainer,{children:[(0,we.jsx)("div",{}),(0,we.jsx)(li,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},N0=(0,rt.createContext)(null),fm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,s]=(0,rt.useState)(null),[i,a]=(0,rt.useState)(!1),[l,c]=(0,rt.useState)(null),[u,d]=(0,rt.useState)(!!n),[f,p]=(0,rt.useState)(null),v=ve(),g=ut(),x=ai(m=>{if(!e)throw new Error("No knowledge assistant was defined");return c(null),t({assistantCode:e,input:m,threadId:o,onNewThreadId(w){s(w)}})},{onSuccess(m){var w;g("knowledge assist question answered",{question:m.question,answer:m.answer.answer,sources:(w=m.answer.sources)!=null?w:[],isFollowUpQuestion:m.threadId===o,isAutoInitiated:u}),d(!1)},onError(m){var w;c((w=m.message)!=null?w:"Unknown error")}}),y=m=>I(void 0,null,function*(){a(!0),p(m),yield x.call(m),a(!1),p(null)}),h={isEnabled:!!e,isSubmitting:i,threadId:o,pendingInput:f,errorMessage:l,onSubmit:y,onReset(){o&&v(ga(o)),c(null),s(null)}};return(0,rt.useEffect)(()=>{n&&y(n)},[n]),(0,we.jsx)(N0.Provider,{value:h,children:r})},pm=()=>{let e=ie(Ba),t=_("WidgetKnowledgeAssistant",dm),n=(0,rt.useContext)(N0),r=(0,rt.useRef)(null),[o,s]=(0,rt.useState)(""),i=l=>{s(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),s(""))})};return n.isEnabled?(0,we.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,we.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:i}),(0,we.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},mm=({title:e,emptyState:t})=>{var v,g;let n=ie(Ba),r=ut(),o=_("WidgetKnowledgeAssistant",dm),s=(0,rt.useRef)(null),i=(0,rt.useContext)(N0),a=(g=j(Sc((v=i.threadId)!=null?v:-1)))!=null?g:[],l=te("hasKeyboardInput"),c=dn(),u=x=>{Ir(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),i.onReset(),r("knowledge assist reset",{threadId:(y=i.threadId)!=null?y:void 0})},p=x=>{c.send(Pr,{text:x,suggestion:{source:"assistant",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!i.isEnabled||(a==null?void 0:a.length)===0&&!i.isSubmitting&&!t&&!i.errorMessage?null:(0,we.jsxs)(rt.Fragment,{children:[(0,we.jsx)(wr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,we.jsxs)(Ht,{withDivider:!0,children:[t&&a.length===0&&!i.pendingInput&&(0,we.jsx)(FF,S({},t)),a.map((x,y)=>(0,we.jsx)(zF,{innerRef:y===a.length-1?s:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),i.pendingInput&&(0,we.jsx)(cm,{title:i.pendingInput}),i.errorMessage&&(0,we.jsx)(ZP,{message:i.errorMessage})]})}),a.length>0&&(0,we.jsx)("div",{className:o.resetContainer,children:(0,we.jsx)(ge.Button,{disabled:i.threadId===null||i.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var tA=b(Y());var HF=/(https?:\/\/[^\s]+)/,eA=e=>e.split(" ").find(t=>HF.test(t));var $n=b(R()),BF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=eA(r),s=ie(Xc),i=te("showImages"),a=te("fallbackImage"),l=te("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,tA.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(ge,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Se,{children:[i&&e.image&&(0,$n.jsx)(Se.Image,{src:rm(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Se.Content,{children:[e.title&&(0,$n.jsx)(Se.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(ge.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Se.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(ge.Actions,{children:[o&&(0,$n.jsx)(ge.ActionButton,{onClick:u,label:s("visitUrl")}),l&&(0,$n.jsx)(ge.ActionButton,{primary:!0,onClick:c,label:s("useSuggestion")})]})]})},nA=BF;var cu=b(R()),UF=({lines:e,suggestions:t})=>{let n=dn(),r=(o,s)=>{n.send(Pr,{text:o,suggestion:P(S({},s),{source:s.source,sourceText:s.text})})};return(0,cu.jsx)(cu.Fragment,{children:t.map(o=>(0,cu.jsx)(nA,{suggestion:o,lines:e,onUse:s=>r(s,o)},o.text||o.url||o.message))})},rA=UF;var uu={};pt(uu,{enUS:()=>VF,nlNL:()=>$F});var VF={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],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"}],close:[{type:0,value:"Close"}]},$F={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],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"}],close:[{type:0,value:"Sluiten"}]};var Ua={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var ue=b(R()),sA=(e,t)=>{let n=j(jt);(0,ds.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},jF=({onLogIn:e})=>{let t=_("Widget",Ua),n=te("isEmbedded"),r=te("adminUrl");return(0,ue.jsx)("div",{className:t.loginText,children:(0,ue.jsx)("div",{children:(0,ue.jsx)(Gp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},oA=({text:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.stateText,children:(0,ue.jsx)("div",{children:(0,ue.jsx)("p",{children:e})})},"notification")},WF=()=>{let e=ie(uu),t=ve(),n=_("Widget",Ua),r=te("showSearch"),o=te("isEmbedded"),s=j(Na("/admin/")),i=dn(),a=te("productName"),l=ut();return sA(()=>{if(o)return t(C0()),()=>{t(AP())}},[t,o]),!r&&!s?null:(0,ue.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ue.jsx)(ge.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ue.jsx)(Aa,{}),onClick:()=>{i.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),s&&(0,ue.jsx)(ge.Button,{as:"a",target:"_blank",icon:(0,ue.jsx)(OP,{}),href:s,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:a}),className:n.shortcut,rel:"noreferrer",onClick:()=>{l("open my deepdesk",{via:"widget-shortcut"})},children:e("linkStudioLogin",{productName:a})})]})},KF=({title:e,content:t})=>{let n=ie(uu),[r,o]=(0,ds.useState)(!0);return r?(0,ue.jsx)(wr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsxs)(ge,{children:[(0,ue.jsx)(Se,{children:(0,ue.jsx)(Se.Content,{children:(0,ue.jsx)(ho,{content:t})})}),(0,ue.jsx)(ge.ButtonsContainer,{children:(0,ue.jsx)(ge.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},GF=()=>{let e=ve(),t=j(Tc),n=j(rC),r=j(LP),o=j(Z1),s=j(Ap),i=j(Bp),a=j(qs),l=j(Rr);return(0,ds.useEffect)(()=>{!!o&&!n&&Z.warn("Custom data provided, but no schema.")},[o,n]),sA(()=>{t.forEach(({type:c})=>{c==="entities"?e(fr()):Du.includes(c)||e(gr(c))})},[e,l,a]),(0,ds.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&Z.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ue.jsx)(ds.Fragment,{children:t.map(({type:c,title:u,amount:d,lines:f,schema:p,property:v})=>{var g,x;switch(c){case"entities":return s&&s.length>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(NP,{entities:s})},c);case"cues":return r&&r.length>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(GP,{cues:r})})},c);case"custom-data-banner":return o&&v&&o[v]&&(0,ue.jsx)(KF,{title:u,content:String(o[v])});case"custom-data":return o&&p&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(YP,{data:o,schema:p})})},c);default:return((x=(g=i[c])==null?void 0:g.suggestions)==null?void 0:x.length)>0&&(0,ue.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ue.jsx)(Ht,{withDivider:!0,children:(0,ue.jsx)(rA,{lines:f,contentType:c,suggestions:i[c].suggestions.slice(0,d)||[]})})},c)}})})},O0=({children:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.footer,children:e})},_0=({children:e})=>{let t=_("Widget",Ua);return(0,ue.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},qF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ie(uu),o=j(la),s=j(jt),i=j(D1),a=j(qs),l=j(nC("knowledge-assist")),c=j(qf),u=j(Yf);return o===!1?(0,ue.jsx)(oA,{text:r("notSupported")}):s===!1?(0,ue.jsx)(jF,{onLogIn:e}):!a||!i||s===null?(0,ue.jsx)(oA,{text:r("waiting")}):(0,ue.jsx)(_0,{children:(0,ue.jsxs)(fm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?Ks:Gs,children:[(0,ue.jsxs)(Ri,{children:[(0,ue.jsx)(WF,{}),(0,ue.jsx)(GF,{}),l&&(0,ue.jsx)(mm,{title:l.title,emptyState:t.emptyState})]}),(0,ue.jsxs)(O0,{children:[l&&(0,ue.jsx)(pm,{}),(0,ue.jsx)(VP,{assistantOptions:n})]})]})})},iA=qF;function Va(e){let t=new Range;return t.selectNodeContents(e),t}function aA(e,t,n){try{return fs(e,t,n),!0}catch(r){return!1}}function gm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function hm(e){return"tagName"in e&&e.tagName==="BR"}var du=/[\u200B-\u200D\uFEFF]/g;function fs(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,s=!1;function i(l,c){let u=-1,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(du,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=i(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,i(c,n-o)),s=!0),o=d;break}case Node.ELEMENT_NODE:{if(hm(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),s=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!s);u++);let c=l.lastChild;gm(l)&&c&&!gm(c)&&!hm(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function fu(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:s,collapsed:i}=t,a,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let g=d.textContent;p&&(a=c+g.substring(0,r).replace(du,"").length),v&&(l=c+g.substring(0,s).replace(du,"").length),c+=g.replace(du,"").length;break}case Node.ELEMENT_NODE:{if(hm(d)&&d.nextSibling){c++;break}!f&&gm(d)&&d.previousSibling&&c++;for(let g=0;g<d.childNodes.length;g++){let x=p&&g===r,y=v&&g===s;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!i)&&u(d.childNodes[g]),v&&g===s-1&&(l=c),l!==void 0))break}v&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function pu(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:s,collapsed:i}=t,a=0,l="";function c(u){let d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,g=p?s:void 0;l+=u.textContent.replace(du,"").substring(v,g);break}case Node.ELEMENT_NODE:{if(!i&&a===1&&hm(u)&&u.nextSibling){l+=`
81
+ `;break}!d&&!i&&a===1&&gm(u)&&u.previousSibling&&(l+=`
82
+ `);let v=f?r:0,g=p?Math.min(s,u.childNodes.length):u.childNodes.length;for(let x=v;x<g&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var lA=(i=>(i.CUT="Cut",i.BACKSPACE="Backspace",i.DELETE="Delete",i.ERASEEOF="EraseEof",i.UNDO="Undo",i.CLEAR="Clear",i))(lA||{}),bo=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}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)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let s=this.getCaretPosition();Xo(s,this.cachedCaretPosition)||(this.cachedCaretPosition=s,this.emit("caretposition",s))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(lA).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function cA(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var yi=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),pu(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o="getComposedRanges"in r&&n instanceof ShadowRoot?(i=r.getComposedRanges(n))==null?void 0:i[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let s=this.element.ownerDocument.createRange();return s.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),s.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!s||!this.element.contains(s.startContainer)||!this.element.contains(s.endContainer)?null:s}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!cA(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!cA(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return fu(this.element,n);let r=this.lastKnownSelection;if(r&&aA(this.element,r.start,r.end))return r;let o=Va(this.element);return o.collapse(!1),fu(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return pu(this.element,fs(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(s=>{var i,a;s.length===2&&s[0].addedNodes.length===1&&((i=s[0].addedNodes[0])==null?void 0:i.textContent)==="\u2060"&&((a=s[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var YF=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function uA(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,s=window.getComputedStyle(e),i=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",YF.forEach(u=>{o[u]=s[u]}),n?e.scrollHeight>Number.parseInt(s.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),i.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(s.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(s.borderLeftWidth)};return i.removeChild(r),c}var vi=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return uA(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var s;return(s=n==null?void 0:n.get)==null?void 0:s.call(this.element)},set:s=>{var i;(i=n==null?void 0:n.set)==null||i.call(this.element,s),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function dA(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let s=document.createElement("iframe"),i=new URL(t);return Object.entries(n).forEach(([a,l])=>{i.searchParams.append(a,l)}),s.style.position="absolute",s.style.left="-999em",s.style.width="0px",s.style.height="0px",s.tabIndex=-1,s.id=r,s.title=`iframe-${e}`,s.src=i.toString(),window.document.body.appendChild(s),s}function XF(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var D0=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}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()}},F0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=dA(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}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()}},z0=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),Z.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new F0(t,this.deepdeskUrl,{debug:!0}):new D0(t),r=o=>{var i,a;if(o.origin!==this.deepdeskUrl)return;let s=XF(o.data);typeof s!="object"||s.type!=="event"||s.channel!==t||(Z.info("Received broadcast event",this.externalId,o),(a=(i=this.eventMap)[s.name])==null||a.call(i,s.payload))};return n.onMessage(r),n}send(t,n,r){var i,a;Z.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(i=this.eventMap)[t])==null||a.call(i,n));let s=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;s==null||s.postMessage(P(S({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},fA=z0;function QF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[QF(n)]:$e(e[n])}),{}):e}function ZF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _t(e){return Array.isArray(e)?e.map(_t):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[ZF(n)]:_t(e[n])}),{}):e}var $a=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var H0=e=>new Promise(t=>{setTimeout(t,e)});var ja=class extends $a{constructor(){super(...arguments);this.name="ClientError"}},U0=class extends $a{constructor(){super(...arguments);this.name="ServerError"}},B0=new Map;function JF(e){return I(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(Z.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var ps=class ps{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let s={isAborted:!1,reject:o},i=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",k=n,{useCache:c=!1,abortLatest:u=!1,attempts:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=C=>C instanceof TypeError,retryOnResponse:g=C=>C.status>=500,version:x=null}=k,y=oe(k,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(B0.has(i)){r(B0.get(i));return}}let h=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(h.headers=P(S({},h.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(h.headers=P(S({},h.headers),{"X-Deepdesk-API-Version":x}));let m=d,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[i]&&u&&(this.latestRequestByUrl[i].isAborted=!0,this.latestRequestByUrl[i].reject(new Error("Aborted"))),this.latestRequestByUrl[i]=s;let E=()=>I(this,null,function*(){return m--,a(i,h).then(C=>I(this,null,function*(){return g(C)&&!s.isAborted&&m>0?(yield H0(f),E()):C.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):C})).catch(C=>I(this,null,function*(){if(v(C)&&!s.isAborted&&m>0)return yield H0(f),E();throw C}))});E().then(C=>I(this,null,function*(){let A=yield JF(C);if(delete this.latestRequestByUrl[i],C.status>=500){o(new U0("Server Error",A));return}if(C.status===401){o(new ja("Unauthorized",A));return}if(C.status===403){o(new ja("Forbidden",A));return}if(C.status===404){o(new ja("Not Found",A));return}if(C.status>=400){o(new ja("Bad Request",A));return}c&&B0.set(i,A),r(A)})).catch(C=>{o(C)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return ps.refreshingToken||(ps.refreshingToken=this.get("/apis/admin/session/refresh/",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{ps.refreshingToken=null},1e3*60)})),ps.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};ps.refreshingToken=null;var xi=ps;function V0(e){return P(S({},$e(e)),{metadata:e.metadata})}var wi=class wi{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new xi(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,s)=>I(this,null,function*(){let i=yield r(o,s);return this.handleDeepdeskVersionHeaders(i),i}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(wi.exchangeTokenPromise||(wi.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),wi.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),Z.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},_t(t)),{metadata:(r=t.metadata)!=null?r:{}}));return V0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",_t(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",_t(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),Z.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:s=1e3}=n,i=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return Z.info(`Successfully retrieved conversation ${i.id} for session ${t}`),V0(i)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){Z.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:s=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var s;yield this.preflight();let r=_t(n);n.metadata&&(r.metadata=(s=n.metadata)!=null?s:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return V0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},_t(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let i=n,{data:r}=i,o=oe(i,["data"]),s=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/v2/events",_t(P(S(S({},s),o),{data:r,name:t})),{version:"v2"})})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw Z.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",_t(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,_t(n),{abortLatest:!0})).map(i=>P(S({},$e(i)),{text:i.text||i.url||i.message,source:r,type:r})).filter((i,a,l)=>a===l.findIndex(c=>c.text===i.text))})}isLoggedIn(){return I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,_t(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,s,i)=>s===i.findIndex(a=>a.text===o.text))})}getPinnedMessages(t){return I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",_t(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,_t(t),{version:"v2"});return $e(n)})}knowledgeAssist(s,i,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_t({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(s=>s.text&&s.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let s=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,i=yield this.client.post(s,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(i.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,s=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(s)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",_t(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),s=o.match(Zx);if(!n||!s)return;let i=s[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[i];a&&n&&a!==n&&Z.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[i]=n})}};wi.exchangeTokenPromise=null;var Eo=wi;var pA={startTime:null,stopTime:null},mA=e=>e.handlingTime,gA=ke({name:"handlingTime",initialState:pA,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(lt,()=>pA)}}),{handlingTimeStart:hA,handlingTimeStop:ym,handlingTimeReset:yA}=gA.actions,vA=gA.reducer;var xA=(e={})=>{let t=S({onAuthError:aa(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var vm={list:{keywordMatches:[]},fetchState:"idle"};var Si=he("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,s=t.getState(),{showStyleSuggestions:i}=s.settings,a=(l=s.conversation.current)==null?void 0:l.profileCode;if(!i)return vm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),e5=ke({name:"styleSuggestions",initialState:vm,reducers:{},extraReducers:e=>{e.addCase(Si.pending,t=>{t.fetchState="loading"}).addCase(Si.rejected,t=>{t.fetchState="error"}).addCase(Si.fulfilled,(t,n)=>{t.fetchState="done",Xo(t.list,n.payload)||(t.list=n.payload)}).addCase(Bs,t=>{t.list=vm.list}).addCase(lt,()=>vm)}}),wA=e5.reducer;var SA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:Si,debounce:500},e);return o=>s=>i=>{var p;let a=o.getState().input.text,l=s(i),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function t5(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var bA=(e={})=>{let t=S({getTextSuggestions:gr,getAutocompleteSuggestions:Zc,debounce:200,check:Or},e),n;return r=>o=>s=>{var g;let{input:i}=r.getState(),a=o(s),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,d=(g=l.conversation.current)==null?void 0:g.id,f=s.type===Up.toString();if(!d||!c&&!u)return a;let{input:p}=l;return t5(p,i)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=ca(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var EA=Si.fulfilled.toString();function n5(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let s=e.keywordMatches.filter(l=>l.keyword===o),i=t.keywordMatches.filter(l=>l.keyword===o),a=i.length-s.length;a<=0||r.push(...i.slice(0,a))}),r}var TA=e=>t=>n=>r=>{var c;if(r.type!==EA){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let s=t.getState(),i=s.styleSuggestions.list,a=(c=s.conversation)==null?void 0:c.current;if(o===i)return;let l=n5(o,i);r.type===EA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var r5=of({assistants:QT,auth:k1,conversation:F1,contentTypes:JT,passwordlessToken:IP,entities:Gk,handlingTime:vA,info:rT,input:Y1,settings:x1,profile:oC,search:cT,styleSuggestions:wA,ui:GR,textSuggestions:MR});function CA(e){return KE({reducer:r5,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(xA()).concat(bA({debounce:200})).concat(SA({debounce:500})).concat(TA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,s)=>o.concat(s),n)},preloadedState:e.preloadedState})}var o5=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},s5=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),s=Yl("inlineSuggestions")(o);switch(r.type){case aa.toString():{!r.payload&&e.emit("logout",void 0);break}case fr.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case ro.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Bs.toString():e.logSendMessage(r.payload);break;case Kf.toString():e.emit("call-to-action",{cue:r.payload});break;case or.fulfilled.toString():r.isBroadcasted||e.broadcast(Oy,r,!1);break;default:break}let i=n(r);switch(r.type){case Bs.toString():e.handleAfterSendMessage(r.payload);break;case eu.toString():e.onUpdateShowTabHint(r.payload);break;case ym.toString():e.logHandlingTime();break;case kf.toString():e.broadcast(If,r);break;case Hs.toString():e.broadcast(If,r);break;case Gf.toString():t.dispatch(Hs({source:"assistant",assistantCode:r.payload.code}));break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case bf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:o5(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),s&&t.dispatch(Qo([]));break}case Ef.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Qo.toString():{s&&r.payload.length>0&&t.dispatch(Tf(0));break}case so.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return i},kA=s5;function $0(e){return e.toISOString().replace("T"," ").replace("Z","")}var i5=(e,t)=>t.version,RA=$t([da,Rr,mA,i5],(e,t,n,r)=>{if(!t)return Z.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:s}=n;return!o||!s?(Z.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:$0(o),timeStop:$0(s)}});function PA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:s}}=e.input,i=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:i,numPastes:r,suggestions:s}}function j0(e,t){var s;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return j0(r,t);let o=(s=e.ownerDocument.defaultView)==null?void 0:s.frameElement;return o?j0(o,t):null}function W0(e,t){return j0(e,t)}function AA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function a5(e){return typeof e=="object"&&e!==null&&"tagName"in e}function xm(e){return a5(e)&&(gi(e)||Yp(e))}var LA,zr=new Map,l5=["bottom","height","left","right","top","width"],IA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:l5.some(n=>e[n]!==t[n]);function MA(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...MA(t)]:[]}function NA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var wm=!1,OA=()=>{wm=!0;let e=[];if(zr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),zr.delete(n);return}let r=n.getBoundingClientRect();IA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(NA,t.rect):t.rect;IA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),zr.size===0){wm=!1;return}LA=window.requestAnimationFrame(OA)};function K0(e,t){let n=MA(e),r=[],o=n.map((s,i)=>K0(s,a=>{r[i]=a;let l=zr.get(e);if(!l)return;let c=r.reduce(NA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(s=!0){if(o.forEach(i=>i.observe(!1)),zr.has(e)){let i=zr.get(e);i.callbacks.push(t),i.rect&&t(i.rect)}else zr.set(e,{rect:void 0,callbacks:[t],parentRects:r});s&&!wm&&OA()},unobserve(){o.forEach(i=>i.unobserve());let s=zr.get(e);if(s){let i=s.callbacks.indexOf(t);i>=0&&s.callbacks.splice(i,1),s.callbacks.length||zr.delete(e),zr.size||(cancelAnimationFrame(LA),wm=!1)}}}}var _A,Hr=new Map,DA=()=>{Hr.forEach((e,t)=>{if(!t.isConnected){Hr.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(s=>s(e.visible)))}),Hr.size!==0&&(_A=window.requestAnimationFrame(DA))};function FA(e,t){return{observe(){let n=Hr.size===0;Hr.has(e)?Hr.get(e).callbacks.push(t):Hr.set(e,{visible:void 0,callbacks:[t]}),n&&DA()},unobserve(){let n=Hr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Hr.delete(e),Hr.size||cancelAnimationFrame(_A)}}}}var G0=["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 q0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function Wa(e){return Number.parseFloat(e)}function Sm(e){return Math.round(e*1e6)}function zA(e){return e/1e6}function Y0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=Wa(e.width),s=Wa(e.borderLeftWidth),i=Wa(e.borderRightWidth),a=Wa(e.paddingRight),l=zA(Sm(o)-Sm(s)-Sm(i)),c=zA(Sm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function mu(e,t={}){var u,d;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ui(n);let r=window.getComputedStyle(e),o=!0,s=()=>{n.scrollTop=e.scrollTop};q0(r,n,G0),Y0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",s));let i=FA(e,()=>{q0(r,n,G0),Y0(r,e,n),s(),setTimeout(s,0)}),a,l=!0,c=K0(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(q0(r,n,G0),Y0(r,e,n),s(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),g=Wa(v.borderTopWidth),x=Wa(v.borderBottomWidth),y=p.top+g-f.top,h=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),i.observe(),[n,()=>{e.removeEventListener("scroll",s),c.unobserve(),i.unobserve(),n.remove()}]}var HA=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){Z.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function c5(e){return e.offsetParent!==null}function BA(e){if(!c5(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 bm(e,t,n=100){let r=BA(e);t({isVisible:r});let o=setInterval(()=>{let s=BA(e);s!==r&&(r=s,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var gu=class extends Error{};function u5(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}var Em=class{constructor(){this.queues={}}push(t,n){let r=()=>{let s=this.queues[t][1];s?(this.queues[t]=[s.promise,null],s.resolve()):delete this.queues[t]};if(!this.queues[t]){let s=n().finally(r);return this.queues[t]=[s,null],s}this.queues[t][1]&&this.queues[t][1].reject(new gu("Queued async function is outdated"));let o=u5();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};var d5={accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"},f5={accepted:"onConversationAcceptedAssistants","new-message":"onConversationNewMessageAssistants",ended:"onConversationEndedAssistants"},UA=(e,t)=>{let n=e[f5[t]];if(n&&n.length>0)return n.map(o=>o.code);let r=e[d5[t]];return r?[r]:(Z.warn(`No assistant set in profile for conversation event "${t}"`),[])};var Le=b(R());var VA=HA("showTabHint",!0),Ka=class Ka{constructor({deepdeskUrl:t,version:n=Ka.version||"unknown",locale:r="en-US",token:o,fetch:s,productName:i,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.queues=new Em;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new Eo(l,{token:o,fetch:s}),this.version=n,this.instanceId=Ka.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[kA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>VA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=CA(c),this.broadcastEvents=new fA({debug:!0,deepdeskUrl:l,eventMap:uT(this.store),createCustomChannel:a}),this.store.dispatch(eu(VA.value())),this.store.dispatch(yf({locale:r,adminUrl:l,productName:i}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=zs(this.state)[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(Z.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(Z.warn("Profile has not been loaded (yet)"),!0):(Z.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(aa(null)),this.store.dispatch(to());let t=n=>jt(n)&&w1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(to())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(Ry({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(xf(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(wf({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(Py(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(Ay(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(Sf(t))).payload})}resetConversation(){this.store.dispatch(lt()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(yf(t))}setVisitorInfo(t){this.store.dispatch(eT(t))}setCustomData(t){this.store.dispatch(tT(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Jl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(Ly(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(My())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(Cf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Up()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:s=!0,includeMetadata:i,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(or({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:i,input:r,skipState:!s}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){Z.warn("Can't evaluate assistant when profile is not loaded yet.");return}let o=UA(r,t);yield Promise.all(o.map(s=>this.queues.push(s,()=>I(this,null,function*(){yield this.evaluateAssistant(s,S({includeMetadata:!0},n))})).catch(i=>{if(i instanceof gu){Z.warn(`Queued assistant "${s}" was outdated and dropped`);return}throw i})))})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return Z.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||Z.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(so(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:s,selection:i}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(V1(Iy(t))),!Or(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||i&&(t.shiftKey||(this.store.dispatch(W1()),t.preventDefault()))},f=()=>{n||!u||a&&s<=0||i&&(t.shiftKey||(this.store.dispatch(K1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(Tf(-1)),this.store.dispatch(is({collapse:!0})),this.store.dispatch(WR(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=ua(this.state);if(!p)return;this.store.dispatch(eu(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=ua(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=ua(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(is({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Qo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(Z.info("Start handling time"),this.store.dispatch(hA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(Z.info("Stop handling time"),this.store.dispatch(ym()))}logSendMessage(t){let n=PA(this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEvent("Send Message",{conversationId:this.conversationId(),data:n}),this.emit("send-message-event",n))}logHandlingTime(){let t=RA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(yA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Bs((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(q1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(s){Z.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),Z.error(s)}})}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}setPlatformVariables(t){this.store.dispatch(nT(t))}whenConversationLoaded(t){let n=o=>{var s;return(s=o.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[s,i]=mu(n,r);return s.setAttribute("translate","no"),s.dataset.testid=t,o&&s.classList.add(o),[s,i]}createInlineContainer(t,n){var a;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 s=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,i=s?s.ownerDocument.defaultView:null;if(s&&(i===window||(i==null?void 0:i.parent)===window)){let[l,c]=mu(s,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ui(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),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),Z.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}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()?(Z.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(G1(r.metrics))):Z.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!xm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ui(t),this.inputMediator=a||(gi(t)?new vi(t):new yi(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(Cf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch($1(Iy(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(j1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(U1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(Rf(p))},500):this.store.dispatch(Rf(p))}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(jp(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(jp(!0))}),this.renderSuggestions(t,c),this.subscribe(Yl("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(Cf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(Rf(this.inputMediator.getSelection())),this.store.dispatch(jp(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(s=>s()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(s=this.aboveSuggestions)==null||s.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),s=(0,ms.createRoot)(o);s.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(nP,{})})}));let i=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",i),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",i),s.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s}=n,i=o&&W0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",i||t,{appendTo:s,closestScrollElement:i,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",i||t,{appendTo:s},r==null?void 0:r.suggestionsRootNode),d=(0,ms.createRoot)(a);d.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(RP,{inputElement:t})})}));let f=(0,ms.createRoot)(c);return f.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(dP,{onLogIn:()=>this.loginViaPopup().catch(p=>Z.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s,floatingMenuParent:i}=n,a=o&&W0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:i!=null?i:s},r==null?void 0:r.floatingMenuParent),u=(0,ms.createRoot)(l);return u.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)($R,{onLogIn:()=>this.loginViaPopup().catch(d=>Z.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,ms.createRoot)(r);return o.render((0,Le.jsx)(ls,{store:this.store,customStyles:n,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(zR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&Z.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:s}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:s}),this.widgetRoot=(0,ms.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(ls,{store:this.store,customStyles:r,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(iA,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(i=>Z.warn(i.message))})})})),this.whenConversationLoaded(()=>{var i;this.broadcastEvents.setExternalId((i=this.state.conversation.current)==null?void 0:i.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:s}=r,i=(0,ms.createRoot)(n);return i.render((0,Le.jsx)(ls,{store:this.store,customStyles:o,children:(0,Le.jsx)(Zo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(_0,{children:(0,Le.jsxs)(fm,{assistantCode:t,initialQuestion:s,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Ks:Gs,children:[(0,Le.jsx)(Ri,{children:(0,Le.jsx)(mm,{title:r.title,emptyState:r.emptyState})}),(0,Le.jsx)(O0,{children:(0,Le.jsx)(pm,{})})]})})})})),{unmount(){i.unmount()}}}setupHandlingTime(t){let n=bm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){AA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(Ec());let t=qs(this.state);t&&this.store.dispatch(yf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{let o=new MessageChannel,s=o.port1,i=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${i}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",d),clearInterval(f)};s.onmessage=p=>I(this,null,function*(){var v,g;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(tc),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let g=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(g,a.origin,[o.port2])}catch(g){Z.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&Z.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(Z.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;Z.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Tc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(fr()):Du.includes(r)||this.store.dispatch(gr(r))})}catch(r){this.handleError(r)}})}};Ka.version="17.1.2",Ka.count=0;var hu=Ka;function p5(e){return I(this,null,function*(){var o,s,i;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(i=(s=e.mimeType)!=null?s:n.headers.get("Content-Type"))!=null?i:"image/jpeg"})})}function $A(e,t){return I(this,null,function*(){let n=yield p5(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}})}function jA(e,t,n){return I(this,null,function*(){yield new Eo(e).authenticateWithKey(t,n)})}function WA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function KA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:s}=e,{start:i,end:a}=(d=n.replace)!=null?d:{start:0,end:s.length},l=`${s.slice(0,i)}${t}${s.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:i+t.length,end:i+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function GA(r,o){return I(this,arguments,function*(e,t,n={}){let s=n.replace?fs(e,n.replace.start,n.replace.end):Va(e),i,a=()=>{if(n.setRange)return n.setRange(s.cloneRange());s.deleteContents(),i=document.createElement("span"),s.insertNode(i),n.insertBRs!==!1?t.split(`
83
+ `).reverse().forEach((l,c)=>{c>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(l))}):s.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?fs(e,n.selectionAfter.start,n.selectionAfter.end):(s.collapse(!1),s),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!i)return;i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}function m5(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 g5(e){let t=document.createDocumentFragment();return e.split(`
84
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},s=0;for(;o=n.slice(s).match(/(\[([^\]]+)])\(([^)]+)\)/);){let i=document.createElement("a");i.href=o[3],i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"),i.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(s,s+o.index))),t.appendChild(i),s=s+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(s)))}),t}function qA(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):qA(n,t)}function YA(o,s){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let i;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var f;let l=(f=e.ownerDocument.defaultView)!=null?f:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;i=document.createElement("span"),u.insertNode(i);let d=r?m5(t):g5(t);n?qA(u.startContainer,d):(u.insertNode(d),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!i)try{i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}return cI(h5);})();
85
85
  /*! Bundled license information:
86
86
 
87
87
  classnames/index.js: