@talkjs/web-components 0.0.36 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +1 -1
- package/default.cjs +295 -292
- package/default.css +1 -1
- package/default.d.ts +90 -49
- package/default.js +10817 -10869
- package/package.json +3 -2
package/default.cjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
"use client";"use strict";var Lc=n=>{throw TypeError(n)};var wc=(n,e,t)=>e.has(n)||Lc("Cannot "+t);var He=(n,e,t)=>(wc(n,e,"read from private field"),t?t.call(n):e.get(n)),oi=(n,e,t)=>e.has(n)?Lc("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),ha=(n,e,t,r)=>(wc(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p_=require("@talkjs/core"),pu=Object.freeze(Object.defineProperty({__proto__:null,get AudioBlock(){return aT},get Avatar(){return fT},get ChatHeader(){return KS},get CompactMessageContent(){return oT},get ConversationImage(){return mT},get ConversationListItem(){return DT},get FileBlock(){return lT},get GroupChatImage(){return ET},get Icon(){return tT},get ImageBlock(){return uT},get LocationBlock(){return cT},get Message(){return qS},get MessageActionMenu(){return QS},get MessageDivider(){return rT},get MessageField(){return eT},get MessageListFooter(){return iT},get ReferencedMessage(){return AT},get ReplyBar(){return _T},get TextBlock(){return dT},get TimeAgo(){return gT},get VideoBlock(){return hT},get VoiceBlock(){return pT}},Symbol.toStringTag,{value:"Module"}));var ao,X,Gp,Bn,Mc,Wp,Xp,Kp,fu,ul,cl,Jp,$i={},qp=[],f_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lo=Array.isArray;function Ht(n,e){for(var t in e)n[t]=e[t];return n}function mu(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function de(n,e,t){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?ao.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(o in n.defaultProps)s[o]==null&&(s[o]=n.defaultProps[o]);return yi(n,s,r,i,null)}function yi(n,e,t,r,i){var o={type:n,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Gp:i,__i:-1,__u:0};return i==null&&X.vnode!=null&&X.vnode(o),o}function Zp(){return{current:null}}function xe(n){return n.children}function gt(n,e){this.props=n,this.context=e}function Fr(n,e){if(e==null)return n.__?Fr(n.__,n.__i+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?Fr(n):null}function Qp(n){var e,t;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,e=0;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null){n.__e=n.__c.base=t.__e;break}return Qp(n)}}function dl(n){(!n.__d&&(n.__d=!0)&&Bn.push(n)&&!is.__r++||Mc!=X.debounceRendering)&&((Mc=X.debounceRendering)||Wp)(is)}function is(){for(var n,e,t,r,i,o,s,a=1;Bn.length;)Bn.length>a&&Bn.sort(Xp),n=Bn.shift(),a=Bn.length,n.__d&&(t=void 0,i=(r=(e=n).__v).__e,o=[],s=[],e.__P&&((t=Ht({},r)).__v=r.__v+1,X.vnode&&X.vnode(t),Eu(e.__P,t,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Fr(r):i,!!(32&r.__u),s),t.__v=r.__v,t.__.__k[t.__i]=t,nf(o,t,s),t.__e!=i&&Qp(t)));is.__r=0}function ef(n,e,t,r,i,o,s,a,l,u,c){var d,h,p,f,m,E,A=r&&r.__k||qp,g=e.length;for(l=function(O,S,T,I,C){var y,_,D,k,L,H=T.length,N=H,w=0;for(O.__k=new Array(C),y=0;y<C;y++)(_=S[y])!=null&&typeof _!="boolean"&&typeof _!="function"?(k=y+w,(_=O.__k[y]=typeof _=="string"||typeof _=="number"||typeof _=="bigint"||_.constructor==String?yi(null,_,null,null,null):lo(_)?yi(xe,{children:_},null,null,null):_.constructor==null&&_.__b>0?yi(_.type,_.props,_.key,_.ref?_.ref:null,_.__v):_).__=O,_.__b=O.__b+1,D=null,(L=_.__i=m_(_,T,k,N))!=-1&&(N--,(D=T[L])&&(D.__u|=2)),D==null||D.__v==null?(L==-1&&(C>H?w--:C<H&&w++),typeof _.type!="function"&&(_.__u|=4)):L!=k&&(L==k-1?w--:L==k+1?w++:(L>k?w--:w++,_.__u|=4))):O.__k[y]=null;if(N)for(y=0;y<H;y++)(D=T[y])!=null&&!(2&D.__u)&&(D.__e==I&&(I=Fr(D)),of(D,D));return I}(t,e,A,l,g),d=0;d<g;d++)(p=t.__k[d])!=null&&(h=p.__i==-1?$i:A[p.__i]||$i,p.__i=d,E=Eu(n,p,h,i,o,s,a,l,u,c),f=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Au(h.ref,null,p),c.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),4&p.__u||h.__k===p.__k?l=tf(p,l,n):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return t.__e=m,l}function tf(n,e,t){var r,i;if(typeof n.type=="function"){for(r=n.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=n,e=tf(r[i],e,t));return e}n.__e!=e&&(e&&n.type&&!t.contains(e)&&(e=Fr(n)),t.insertBefore(n.__e,e||null),e=n.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function on(n,e){return e=e||[],n==null||typeof n=="boolean"||(lo(n)?n.some(function(t){on(t,e)}):e.push(n)),e}function m_(n,e,t,r){var i,o,s=n.key,a=n.type,l=e[t];if(l===null&&n.key==null||l&&s==l.key&&a==l.type&&!(2&l.__u))return t;if(r>(l==null||2&l.__u?0:1))for(i=t-1,o=t+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&s==l.key&&a==l.type)return i;i--}if(o<e.length){if((l=e[o])&&!(2&l.__u)&&s==l.key&&a==l.type)return o;o++}}return-1}function Fc(n,e,t){e[0]=="-"?n.setProperty(e,t==null?"":t):n[e]=t==null?"":typeof t!="number"||f_.test(e)?t:t+"px"}function Io(n,e,t,r,i){var o,s;e:if(e=="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(e in r)t&&e in t||Fc(n.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||Fc(n.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Kp,"$1")),s=e.toLowerCase(),e=s in n||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),n.l||(n.l={}),n.l[e+o]=t,t?r?t.u=r.u:(t.u=fu,n.addEventListener(e,o?cl:ul,o)):n.removeEventListener(e,o?cl:ul,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in n)try{n[e]=t==null?"":t;break e}catch(a){}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?n.removeAttribute(e):n.setAttribute(e,e=="popover"&&t==1?"":t))}}function Pc(n){return function(e){if(this.l){var t=this.l[e.type+n];if(e.t==null)e.t=fu++;else if(e.t<t.u)return;return t(X.event?X.event(e):e)}}}function Eu(n,e,t,r,i,o,s,a,l,u){var c,d,h,p,f,m,E,A,g,O,S,T,I,C,y,_,D,k=e.type;if(e.constructor!=null)return null;128&t.__u&&(l=!!(32&t.__u),o=[a=e.__e=t.__e]),(c=X.__b)&&c(e);e:if(typeof k=="function")try{if(A=e.props,g="prototype"in k&&k.prototype.render,O=(c=k.contextType)&&r[c.__c],S=c?O?O.props.value:c.__:r,t.__c?E=(d=e.__c=t.__c).__=d.__E:(g?e.__c=d=new k(A,S):(e.__c=d=new gt(A,S),d.constructor=k,d.render=A_),O&&O.sub(d),d.props=A,d.state||(d.state={}),d.context=S,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),g&&d.__s==null&&(d.__s=d.state),g&&k.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ht({},d.__s)),Ht(d.__s,k.getDerivedStateFromProps(A,d.__s))),p=d.props,f=d.state,d.__v=e,h)g&&k.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),g&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(g&&k.getDerivedStateFromProps==null&&A!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,S),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,S)===!1||e.__v==t.__v){for(e.__v!=t.__v&&(d.props=A,d.state=d.__s,d.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(L){L&&(L.__=e)}),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,S),g&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,f,m)})}if(d.context=S,d.props=A,d.__P=n,d.__e=!1,I=X.__r,C=0,g){for(d.state=d.__s,d.__d=!1,I&&I(e),c=d.render(d.props,d.state,d.context),y=0;y<d._sb.length;y++)d.__h.push(d._sb[y]);d._sb=[]}else do d.__d=!1,I&&I(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++C<25);d.state=d.__s,d.getChildContext!=null&&(r=Ht(Ht({},r),d.getChildContext())),g&&!h&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(p,f)),_=c,c!=null&&c.type===xe&&c.key==null&&(_=rf(c.props.children)),a=ef(n,lo(_)?_:[_],e,t,r,i,o,s,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(L){if(e.__v=null,l||o!=null)if(L.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(D=o.length;D--;)mu(o[D]);else e.__e=t.__e,e.__k=t.__k;X.__e(L,e,t)}else o==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):a=e.__e=E_(t.__e,e,t,r,i,o,s,l,u);return(c=X.diffed)&&c(e),128&e.__u?void 0:a}function nf(n,e,t){for(var r=0;r<t.length;r++)Au(t[r],t[++r],t[++r]);X.__c&&X.__c(e,n),n.some(function(i){try{n=i.__h,i.__h=[],n.some(function(o){o.call(i)})}catch(o){X.__e(o,i.__v)}})}function rf(n){return typeof n!="object"||n==null||n.__b&&n.__b>0?n:lo(n)?n.map(rf):Ht({},n)}function E_(n,e,t,r,i,o,s,a,l){var u,c,d,h,p,f,m,E=t.props,A=e.props,g=e.type;if(g=="svg"?i="http://www.w3.org/2000/svg":g=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((p=o[u])&&"setAttribute"in p==!!g&&(g?p.localName==g:p.nodeType==3)){n=p,o[u]=null;break}}if(n==null){if(g==null)return document.createTextNode(A);n=document.createElementNS(i,g,A.is&&A),a&&(X.__m&&X.__m(e,o),a=!1),o=null}if(g==null)E===A||a&&n.data==A||(n.data=A);else{if(o=o&&ao.call(n.childNodes),E=t.props||$i,!a&&o!=null)for(E={},u=0;u<n.attributes.length;u++)E[(p=n.attributes[u]).name]=p.value;for(u in E)if(p=E[u],u!="children"){if(u=="dangerouslySetInnerHTML")d=p;else if(!(u in A)){if(u=="value"&&"defaultValue"in A||u=="checked"&&"defaultChecked"in A)continue;Io(n,u,null,p,i)}}for(u in A)p=A[u],u=="children"?h=p:u=="dangerouslySetInnerHTML"?c=p:u=="value"?f=p:u=="checked"?m=p:a&&typeof p!="function"||E[u]===p||Io(n,u,p,E[u],i);if(c)a||d&&(c.__html==d.__html||c.__html==n.innerHTML)||(n.innerHTML=c.__html),e.__k=[];else if(d&&(n.innerHTML=""),ef(e.type=="template"?n.content:n,lo(h)?h:[h],e,t,r,g=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:t.__k&&Fr(t,0),a,l),o!=null)for(u=o.length;u--;)mu(o[u]);a||(u="value",g=="progress"&&f==null?n.removeAttribute("value"):f!=null&&(f!==n[u]||g=="progress"&&!f||g=="option"&&f!=E[u])&&Io(n,u,f,E[u],i),u="checked",m!=null&&m!=n[u]&&Io(n,u,m,E[u],i))}return n}function Au(n,e,t){try{if(typeof n=="function"){var r=typeof n.__u=="function";r&&n.__u(),r&&e==null||(n.__u=n(e))}else n.current=e}catch(i){X.__e(i,t)}}function of(n,e,t){var r,i;if(X.unmount&&X.unmount(n),(r=n.ref)&&(r.current&&r.current!=n.__e||Au(r,null,e)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){X.__e(o,e)}r.base=r.__P=null}if(r=n.__k)for(i=0;i<r.length;i++)r[i]&&of(r[i],e,t||typeof n.type!="function");t||mu(n.__e),n.__c=n.__=n.__e=void 0}function A_(n,e,t){return this.constructor(n,t)}function ji(n,e,t){var r,i,o,s;e==document&&(e=document.documentElement),X.__&&X.__(n,e),i=(r=typeof t=="function")?null:t&&t.__k||e.__k,o=[],s=[],Eu(e,n=(!r&&t||e).__k=de(xe,null,[n]),i||$i,$i,e.namespaceURI,!r&&t?[t]:i?null:e.firstChild?ao.call(e.childNodes):null,o,!r&&t?t:i?i.__e:e.firstChild,r,s),nf(o,n,s)}function sf(n,e){ji(n,e,sf)}function __(n,e,t){var r,i,o,s,a=Ht({},n.props);for(o in n.type&&n.type.defaultProps&&(s=n.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]==null&&s!=null?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?ao.call(arguments,2):t),yi(n.type,a,r||n.key,i||n.ref,null)}function uo(n){function e(t){var r,i;return this.getChildContext||(r=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,dl(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),t.children}return e.__c="__cC"+Jp++,e.__=n,e.Provider=e.__l=(e.Consumer=function(t,r){return t.children(r)}).contextType=e,e}ao=qp.slice,X={__e:function(n,e,t,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(n)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,r||{}),s=i.__d),s)return i.__E=i}catch(a){n=a}throw n}},Gp=0,gt.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ht({},this.state),typeof n=="function"&&(n=n(Ht({},t),this.props)),n&&Ht(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),dl(this))},gt.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),dl(this))},gt.prototype.render=xe,Bn=[],Wp=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xp=function(n,e){return n.__v.__b-e.__v.__b},is.__r=0,Kp=/(PointerCapture)$|Capture$/i,fu=0,ul=Pc(!1),cl=Pc(!0),Jp=0;var un,ue,pa,xc,Pr=0,af=[],me=X,Bc=me.__b,Hc=me.__r,Uc=me.diffed,$c=me.__c,jc=me.unmount,zc=me.__;function sr(n,e){me.__h&&me.__h(ue,n,Pr||e),Pr=0;var t=ue.__H||(ue.__H={__:[],__h:[]});return n>=t.__.length&&t.__.push({}),t.__[n]}function ie(n){return Pr=1,xs(lf,n)}function xs(n,e,t){var r=sr(un++,2);if(r.t=n,!r.__c&&(r.__=[t?t(e):lf(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],u=r.t(l,a);l!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=ue,!ue.__f)){var i=function(a,l,u){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!o||o.call(this,a,l,u);var d=r.__c.props!==a;return c.forEach(function(h){if(h.__N){var p=h.__[0];h.__=h.__N,h.__N=void 0,p!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,u)||d};ue.__f=!0;var o=ue.shouldComponentUpdate,s=ue.componentWillUpdate;ue.componentWillUpdate=function(a,l,u){if(this.__e){var c=o;o=void 0,i(a,l,u),o=c}s&&s.call(this,a,l,u)},ue.shouldComponentUpdate=i}return r.__N||r.__}function Y(n,e){var t=sr(un++,3);!me.__s&&Du(t.__H,e)&&(t.__=n,t.u=e,ue.__H.__h.push(t))}function Et(n,e){var t=sr(un++,4);!me.__s&&Du(t.__H,e)&&(t.__=n,t.u=e,ue.__h.push(t))}function Q(n){return Pr=5,Z(function(){return{current:n}},[])}function Nn(n,e,t){Pr=6,Et(function(){if(typeof n=="function"){var r=n(e());return function(){n(null),r&&typeof r=="function"&&r()}}if(n)return n.current=e(),function(){return n.current=null}},t==null?t:t.concat(n))}function Z(n,e){var t=sr(un++,7);return Du(t.__H,e)&&(t.__=n(),t.__H=e,t.__h=n),t.__}function ee(n,e){return Pr=8,Z(function(){return n},e)}function ar(n){var e=ue.context[n.__c],t=sr(un++,9);return t.c=n,e?(t.__==null&&(t.__=!0,e.sub(ue)),e.props.value):n.__}function _u(n,e){me.useDebugValue&&me.useDebugValue(e?e(n):n)}function gu(){var n=sr(un++,11);if(!n.__){for(var e=ue.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);n.__="P"+t[0]+"-"+t[1]++}return n.__}function g_(){for(var n;n=af.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach($o),n.__H.__h.forEach(hl),n.__H.__h=[]}catch(e){n.__H.__h=[],me.__e(e,n.__v)}}me.__b=function(n){ue=null,Bc&&Bc(n)},me.__=function(n,e){n&&e.__k&&e.__k.__m&&(n.__m=e.__k.__m),zc&&zc(n,e)},me.__r=function(n){Hc&&Hc(n),un=0;var e=(ue=n.__c).__H;e&&(pa===ue?(e.__h=[],ue.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach($o),e.__h.forEach(hl),e.__h=[],un=0)),pa=ue},me.diffed=function(n){Uc&&Uc(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(af.push(e)!==1&&xc===me.requestAnimationFrame||((xc=me.requestAnimationFrame)||D_)(g_)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),pa=ue=null},me.__c=function(n,e){e.some(function(t){try{t.__h.forEach($o),t.__h=t.__h.filter(function(r){return!r.__||hl(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],me.__e(r,t.__v)}}),$c&&$c(n,e)},me.unmount=function(n){jc&&jc(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{$o(r)}catch(i){e=i}}),t.__H=void 0,e&&me.__e(e,t.__v))};var Vc=typeof requestAnimationFrame=="function";function D_(n){var e,t=function(){clearTimeout(r),Vc&&cancelAnimationFrame(e),setTimeout(n)},r=setTimeout(t,35);Vc&&(e=requestAnimationFrame(t))}function $o(n){var e=ue,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),ue=e}function hl(n){var e=ue;n.__c=n.__(),ue=e}function Du(n,e){return!n||n.length!==e.length||e.some(function(t,r){return t!==n[r]})}function lf(n,e){return typeof e=="function"?e(n):e}function uf(n,e){for(var t in e)n[t]=e[t];return n}function pl(n,e){for(var t in n)if(t!=="__source"&&!(t in e))return!0;for(var r in e)if(r!=="__source"&&n[r]!==e[r])return!0;return!1}function Ou(n,e){var t=e(),r=ie({t:{__:t,u:e}}),i=r[0].t,o=r[1];return Et(function(){i.__=t,i.u=e,fa(i)&&o({t:i})},[n,t,e]),Y(function(){return fa(i)&&o({t:i}),n(function(){fa(i)&&o({t:i})})},[n]),t}function fa(n){var e,t,r=n.u,i=n.__;try{var o=r();return!((e=i)===(t=o)&&(e!==0||1/e==1/t)||e!=e&&t!=t)}catch(s){return!0}}function Su(n){n()}function Tu(n){return n}function Ru(){return[!1,Su]}var Cu=Et;function ss(n,e){this.props=n,this.context=e}function cn(n,e){function t(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:pl(this.props,i)}function r(i){return this.shouldComponentUpdate=t,de(n,i)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ss.prototype=new gt).isPureReactComponent=!0,ss.prototype.shouldComponentUpdate=function(n,e){return pl(this.props,n)||pl(this.state,e)};var Yc=X.__b;X.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),Yc&&Yc(n)};var O_=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Nt(n){function e(t){var r=uf({},t);return delete r.ref,n(r,t.ref||null)}return e.$$typeof=O_,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(n.displayName||n.name)+")",e}var Gc=function(n,e){return n==null?null:on(on(n).map(e))},cf={map:Gc,forEach:Gc,count:function(n){return n?on(n).length:0},only:function(n){var e=on(n);if(e.length!==1)throw"Children.only";return e[0]},toArray:on},S_=X.__e;X.__e=function(n,e,t,r){if(n.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(n,e)}S_(n,e,t,r)};var Wc=X.unmount;function df(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=uf({},n)).__c!=null&&(n.__c.__P===t&&(n.__c.__P=e),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return df(r,e,t)})),n}function hf(n,e,t){return n&&t&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return hf(r,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=t)),n}function bi(){this.__u=0,this.o=null,this.__b=null}function pf(n){var e=n.__.__c;return e&&e.__a&&e.__a(n)}function ff(n){var e,t,r;function i(o){if(e||(e=n()).then(function(s){t=s.default||s},function(s){r=s}),r)throw r;if(!t)throw e;return de(t,o)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.i=null,this.l=null}X.unmount=function(n){var e=n.__c;e&&e.__R&&e.__R(),e&&32&n.__u&&(n.type=null),Wc&&Wc(n)},(bi.prototype=new gt).__c=function(n,e){var t=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(t);var i=pf(r.__v),o=!1,s=function(){o||(o=!0,t.__R=null,i?i(a):a())};t.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=hf(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.o.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(s,s)},bi.prototype.componentWillUnmount=function(){this.o=[]},bi.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=df(this.__b,t,r.__O=r.__P)}this.__b=null}var i=e.__a&&de(xe,null,n.fallback);return i&&(i.__u&=-33),[de(xe,null,e.__a?null:n.children),i]};var Xc=function(n,e,t){if(++t[1]===t[0]&&n.l.delete(e),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.l.size))for(t=n.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;n.i=t=t[2]}};function T_(n){return this.getChildContext=function(){return n.context},n.children}function R_(n){var e=this,t=n.h;if(e.componentWillUnmount=function(){ji(null,e.v),e.v=null,e.h=null},e.h&&e.h!==t&&e.componentWillUnmount(),!e.v){for(var r=e.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;e.h=t,e.v={nodeType:1,parentNode:t,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),e.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}ji(de(T_,{context:e.context},n.__v),e.v)}function mf(n,e){var t=de(R_,{__v:n,h:e});return t.containerInfo=e,t}(_r.prototype=new gt).__a=function(n){var e=this,t=pf(e.__v),r=e.l.get(n);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Xc(e,n,r)):i()};t?t(o):o()}},_r.prototype.render=function(n){this.i=null,this.l=new Map;var e=on(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.l.set(e[t],this.i=[1,0,this.i]);return n.children},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(e,t){Xc(n,t,e)})};var Ef=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,C_=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,I_=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,v_=/[A-Z0-9]/g,N_=typeof document!="undefined",y_=function(n){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n)};function Iu(n,e,t){return e.__k==null&&(e.textContent=""),ji(n,e),typeof t=="function"&&t(),n?n.__c:null}function Af(n,e,t){return sf(n,e),typeof t=="function"&&t(),n?n.__c:null}gt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(gt.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})});var Kc=X.event;function b_(){}function k_(){return this.cancelBubble}function L_(){return this.defaultPrevented}X.event=function(n){return Kc&&(n=Kc(n)),n.persist=b_,n.isPropagationStopped=k_,n.isDefaultPrevented=L_,n.nativeEvent=n};var vu,w_={enumerable:!1,configurable:!0,get:function(){return this.class}},Jc=X.vnode;X.vnode=function(n){typeof n.type=="string"&&function(e){var t=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in t){var a=t[s];if(!(s==="value"&&"defaultValue"in t&&a==null||N_&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||y_(t.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":I_.test(s)&&(s=l):l=s="oninput":o&&C_.test(s)?s=s.replace(v_,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=on(t.children).forEach(function(u){u.props.selected=i.value.indexOf(u.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=on(t.children).forEach(function(u){u.props.selected=i.multiple?i.defaultValue.indexOf(u.props.value)!=-1:i.defaultValue==u.props.value})),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",w_)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(n),n.$$typeof=Ef,Jc&&Jc(n)};var qc=X.__r;X.__r=function(n){qc&&qc(n),vu=n.__c};var Zc=X.diffed;X.diffed=function(n){Zc&&Zc(n);var e=n.props,t=n.__e;t!=null&&n.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value),vu=null};var _f={ReactCurrentDispatcher:{current:{readContext:function(n){return vu.__n[n.__c].props.value},useCallback:ee,useContext:ar,useDebugValue:_u,useDeferredValue:Tu,useEffect:Y,useId:gu,useImperativeHandle:Nn,useInsertionEffect:Cu,useLayoutEffect:Et,useMemo:Z,useReducer:xs,useRef:Q,useState:ie,useSyncExternalStore:Ou,useTransition:Ru}}};function gf(n){return de.bind(null,n)}function co(n){return!!n&&n.$$typeof===Ef}function Df(n){return co(n)&&n.type===xe}function Of(n){return!!n&&!!n.displayName&&(typeof n.displayName=="string"||n.displayName instanceof String)&&n.displayName.startsWith("Memo(")}function Sf(n){return co(n)?__.apply(null,arguments):n}function Nu(n){return!!n.__k&&(ji(null,n),!0)}function Tf(n){return n&&(n.base||n.nodeType===1&&n)||null}var Rf=function(n,e){return n(e)},yu=function(n,e){return n(e)},Cf=xe,If=co,dt={useState:ie,useId:gu,useReducer:xs,useEffect:Y,useLayoutEffect:Et,useInsertionEffect:Cu,useTransition:Ru,useDeferredValue:Tu,useSyncExternalStore:Ou,startTransition:Su,useRef:Q,useImperativeHandle:Nn,useMemo:Z,useCallback:ee,useContext:ar,useDebugValue:_u,version:"18.3.1",Children:cf,render:Iu,hydrate:Af,unmountComponentAtNode:Nu,createPortal:mf,createElement:de,createContext:uo,createFactory:gf,cloneElement:Sf,createRef:Zp,Fragment:xe,isValidElement:co,isElement:If,isFragment:Df,isMemo:Of,findDOMNode:Tf,Component:gt,PureComponent:ss,memo:cn,forwardRef:Nt,flushSync:yu,unstable_batchedUpdates:Rf,StrictMode:Cf,Suspense:bi,SuspenseList:_r,lazy:ff,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:_f};const M_=Object.freeze(Object.defineProperty({__proto__:null,Children:cf,Component:gt,Fragment:xe,PureComponent:ss,StrictMode:Cf,Suspense:bi,SuspenseList:_r,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:_f,cloneElement:Sf,createContext:uo,createElement:de,createFactory:gf,createPortal:mf,createRef:Zp,default:dt,findDOMNode:Tf,flushSync:yu,forwardRef:Nt,hydrate:Af,isElement:If,isFragment:Df,isMemo:Of,isValidElement:co,lazy:ff,memo:cn,render:Iu,startTransition:Su,unmountComponentAtNode:Nu,unstable_batchedUpdates:Rf,useCallback:ee,useContext:ar,useDebugValue:_u,useDeferredValue:Tu,useEffect:Y,useErrorBoundary:function(n){var e=sr(un++,10),t=ie();return e.__=n,ue.componentDidCatch||(ue.componentDidCatch=function(r,i){e.__&&e.__(r,i),t[1](r)}),[t[0],function(){t[1](void 0)}]},useId:gu,useImperativeHandle:Nn,useInsertionEffect:Cu,useLayoutEffect:Et,useMemo:Z,useReducer:xs,useRef:Q,useState:ie,useSyncExternalStore:Ou,useTransition:Ru,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var F_=0;function v(n,e,t,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var u={type:n,props:l,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--F_,__i:-1,__u:0,__source:i,__self:o};if(typeof n=="function"&&(s=n.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return X.vnode&&X.vnode(u),u}var bu=Object.prototype.hasOwnProperty;function Ie(n){return Array.isArray(n)}function jt(n){return!(!n||typeof n!="object"||n instanceof Date||Ie(n))}function q(n){return typeof n=="function"}function qe(n){const e=typeof n;return n!==void 0&&(fl(n)||e!=="object"&&e!=="function")}function fl(n){return n instanceof Date}function vf(n){return typeof n=="boolean"}function Ut(n){return n instanceof Promise}function ke(n){return n instanceof Map||n instanceof WeakMap}function dn(n){return n instanceof Set||n instanceof WeakSet}function as(n){if(!n)return!1;if(Ie(n))return n.length===0;if(ke(n)||dn(n))return n.size===0;for(const e in n)if(bu.call(n,e))return!1;return!0}var P_=new Set(["boolean","string","number"]);function Bs(n){return!!n.parent}var x_=Symbol.toPrimitive,B_=Symbol.iterator,xr=Symbol("getNode"),Hs=Symbol("delete"),Nf=Symbol("opaque"),H_=Symbol("plain"),ku=Symbol("optimized"),zi=Symbol("linked"),Re={pendingNodes:new Map,dirtyNodes:new Set};function Vi(n){return n&&(n[Nf]||n.$$typeof)}function yf(n){return n&&n[H_]}function bf(n){return Ie(n)?"array":ke(n)?"map":n instanceof Set?"set":"object"}function U_(n,e){return ke(e)?{__LSType:"Map",value:Array.from(e.entries())}:e instanceof Set?{__LSType:"Set",value:Array.from(e)}:(Re.replacer&&(e=Re.replacer(n,e)),e)}var $_=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function j_(n,e){if(e){if(typeof e=="string"&&$_.test(e))return new Date(e);if(typeof e=="object"){if(e.__LSType==="Map")return new Map(e.value);if(e.__LSType==="Set")return new Set(e.value)}Re.reviver&&(e=Re.reviver(n,e))}return e}function kf(n){return n&&JSON.stringify(n,U_)}function Lf(n){return n&&JSON.parse(n,j_)}function wf(n){return Lf(kf(n))}function De(n){return!!n&&!!n[xr]}function ho(n){return n&&n[xr]}function Mf(n,e,t,r,i){return r?n.add(t):i?n.set(e,t):n[e]=t,t}function sn(n,e){var t;const r=(t=n.parent)!=null?t:n,i=n.parent?n.key:"_",o=e===Hs;o&&(e=void 0);const s=n.parent?Lu(r):r.root,a=dn(s),l=ke(s),u=a?i:l?s.get(i):s[i],c=q(e);if((e=r.isAssigning||!c||q(u)?e:e(u))!==u)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Mf(s,i,e,a,l)}finally{r.isSetting--}return{prevValue:u,newValue:e,parentValue:s}}var Qc=[];function he(n){let e=0,t=n;for(;Bs(t);)Qc[e++]=t.key,t=t.parent;let r=n.root._;for(let i=e-1;r&&i>=0;i--){const o=Qc[i];r=o!=="size"&&ke(r)?r.get(o):r[o]}return r}function yt(n,e,t){var r,i;let o=(r=n.children)==null?void 0:r.get(e);return o||(o={root:n.root,parent:n,key:e,lazy:!0,numListenersRecursive:0},((i=n.lazyFn)==null?void 0:i.length)===1&&(t=n.lazyFn.bind(n,e)),q(t)&&(o=Object.assign(()=>{},o),o.lazyFn=t),n.children||(n.children=new Map),n.children.set(e,o)),o}function Lu(n){let e=he(n);if(!e||q(e))if(Bs(n)){const t=Lu(n.parent),r=dn(t),i=ke(t);e=Mf(t,n.key,{},r,i)}else e=n.root._={};return e}function Ff(n,e){var t,r;let i=De(n)?void 0:jt(n)?"id"in n?"id":"key"in n?"key":"_id"in n?"_id":"__id"in n?"__id":void 0:void 0;if(!i&&e.parent){const o=e.key+"_keyExtractor",s=(r=(t=e.functions)==null?void 0:t.get(o))!=null?r:he(e.parent)[e.key+"_keyExtractor"];s&&q(s)&&(i=s)}return i}function ed(n,e,t){n.functions||(n.functions=new Map),n.functions.set(e,t)}function Pf(n,e){return n===e||fl(n)&&fl(e)&&+n==+e}function ml(n,e,t,r){return e?void 0:n?r?Array.from(n):t?Array.from(n.keys()):Object.keys(n):[]}function z_(n,e){return n&&Object.defineProperty(n,e,{value:!0,enumerable:!1,writable:!0,configurable:!0}),n}var td=function(n){return z_(n,Nf)};function xf(n,e){var t;n.isPlain||!((t=n.parent)!=null&&t.isPlain)&&!yf(e)||(n.isPlain=!0)}function an(n,e,t,r){let i=n;return!De(i)&&q(i)&&(i=t?i(t):i()),De(i)&&!r?i.get(e):i}var ki,V_=(n,e)=>n&&n[e];function Bf(n,e,t,r,i,o,s){let a,l=n;if(e.length>0){let u=o;for(let c=0;c<e.length;c++){a=e[c];const d=ke(l);let h=l?d?l.get(a):l[a]:void 0;const p=u?d?u.get(a):u[a]:void 0;if(h===Hs)return u&&(d?l.set(a,p):l[a]=p,s==null||s(e.slice(0,c+1),p)),n;if(h===void 0&&r===void 0&&c===e.length-1)return n;c<e.length-1&&h==null&&(h=wu(t[c]),ke(l)?l.set(a,h):l[a]=h),c<e.length-1&&(l=h,u&&(u=p))}}return a===void 0?n=i==="merge"?ls(n,r):r:i==="merge"?l[a]=ls(l[a],r):ke(l)?l.set(a,r):l[a]=r,n}function nd(n,e,t){let r=t;for(let i=0;i<n.length;i++){const o=n[i];r=r?r[o]:wu(e[i])}return r}function rd(n){return!(!n||(jt(n)||Ie(n))&&as(n))}function wu(n){switch(n){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Y_(n,e,t){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=e;return Bf(n,r,s,o)}function ls(n,...e){if(qe(n))return e[e.length-1];let t=Ie(n)?[...n]:{...n};for(let i=0;i<e.length;i++){const o=e[i];if(jt(r=o)&&r.constructor===Object||Ie(o)){const s=o;for(const a in s)bu.call(s,a)&&(s[a]instanceof Object&&!De(s[a])&&Object.keys(s[a]).length>0?t[a]=ls(t[a]||(Ie(s[a])?[]:{}),s[a]):t[a]=s[a])}else t=o}var r;return t}var us=0,ma=!1,Ea=!1,Ir=new Map;function G_(){Ir.size>0&&Jr(!0)}function Hf(n,e){for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function W_(n,e){try{return function(t,r){for(let i=0;i<r.length;i++)t=Y_(t,r[i]);return t}(n?wf(n):{},e)}catch(t){return}}function Mu(n,e){return function(){return W_(n,e)}}function Yi(n,e,t,r,i){const o=new Map;cs(o,n,!!Re.isLoadingLocal,!!Re.isLoadingRemote,e,[],[],e,t,!0,r,i);const s=Ir.get(n);s?s.prev===e?Ir.delete(n):s.value=e:Ir.set(n,{value:e,prev:t,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Re.isLoadingRemote,isFromPersist:!!Re.isLoadingLocal}),o.size&&Uf(o,!0),us<=0&&$f()}function cs(n,e,t,r,i,o,s,a,l,u,c,d){if(e.numListenersRecursive>0&&(function(h,p,f,m,E,A,g,O,S,T,I,C){if(T?p.listenersImmediate:p.listeners){const y={path:A,pathTypes:g,valueAtPath:O,prevAtPath:S},_=h.get(p);if(_&&A.length>0){const{changes:D}=_;Hf(D[0].path,y.path)||(D.push(y),_.level=Math.min(_.level,I),_.whenOptimizedOnlyIf||(_.whenOptimizedOnlyIf=C))}else h.set(p,{level:I,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:C,changes:[y]})}}(n,e,t,r,i,o,s,a,l,u,c,d),e.linkedFromNodes))for(const h of e.linkedFromNodes)cs(n,X_(h,o),t,r,a,[],[],a,l,u,0,d);if(e.parent){const h=e.parent;h&&cs(n,h,t,r,he(h),[e.key].concat(o),[bf(i)].concat(s),a,l,u,c+1,d)}}function Uf(n,e){const t=new Set;n.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{const c=e?u.listenersImmediate:u.listeners;if(c){let d;const h=Array.from(c);for(let p=0;p<h.length;p++){const f=h[p],{track:m,noArgs:E,listener:A}=f;t.has(A)||(m===!0?i<=0:m!==ku||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:Mu(o,r),changes:r}),m||t.add(A),A(d))}}})}function $f(){const n=Array.from(Re.dirtyNodes);Re.dirtyNodes.clear(),n.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const e=Ir;Ir=new Map;const t=new Map;e.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},u)=>{cs(t,u,s,a,r,[],[],r,i,!1,o,l)}),t.size&&Uf(t,!1)}function Br(n){Us();try{n()}finally{Jr()}}function Us(){us++,ki||(ki=setTimeout(G_,0))}function Jr(n){(--us<=0||n)&&(ma?Ea=!0:(ki&&(clearTimeout(ki),ki=void 0),us=0,ma=!0,$f(),ma=!1,Ea&&(Ea=!1,Jr(!0))))}function X_(n,e){let t=n;for(let r=0;r<e.length;r++)t=yt(t,e[r]);return t}function Fu(n,e,t,r,i){if(De(n))return n;const o=Ut(n);let s={root:{_:n},lazy:!0,numListenersRecursive:0};q(n)&&(s=Object.assign(()=>{},s),s.lazyFn=n);var a;const l=(a=n,P_.has(typeof a)?new i(s):r(s));return o&&(sn(s,void 0),t(s,n)),l}var gr=new WeakMap,jf=[],zf=[],Vf=[],Dr=0,El=!1;function Aa(n,e,t){const r=gr.get(n);if(!r||!r.has(t))return;const i=r.get(t);i&&i.size!==0&&(jf[Dr]=n,zf[Dr]=e,Vf[Dr]=t,Dr++,El||(El=!0,queueMicrotask(K_)))}var si={type:"listener-added",node:null,listener:void 0,timestamp:0};function K_(){El=!1;const n=typeof performance!="undefined"?performance.now():Date.now();si.timestamp=n;for(let e=0;e<Dr;e++){const t=jf[e],r=zf[e],i=Vf[e],o=gr.get(t);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=t.listeners,l=t.listenersImmediate;if(!a&&!l)continue;let u=!1;if(u=i==="listener-added"?!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):i==="listener-removed"?!(a!=null&&a.has(r))&&!(l!=null&&l.has(r)):!(a!=null&&a.size)&&!(l!=null&&l.size),u){si.type=i,si.node=t,si.listener=r;const c=Array.from(s);for(let d=0;d<c.length;d++)try{c[d](si)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Dr=0}function In(n,e,t={},r){var i;const{initial:o,immediate:s,noArgs:a}=t,{trackingType:l}=t;let u=s?n.listenersImmediate:n.listeners;u||(u=new Set,s?n.listenersImmediate=u:n.listeners=u);const c={listener:e,track:l,noArgs:a};if(u.add(c),o){const m=he(n);e({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let d;function h(m,E=e,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||n),E||(E=e);const g={trackingType:!0,...t};d=[...d||[],In(m,E,g,r)]}}n.linkedToNode&&h(n.linkedToNode),(i=n.linkedFromNodes)==null||i.forEach(m=>h(m)),n.numListenersRecursive++;let p=n.parent,f=[n.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||h(m,J_(m,f,e),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return Aa(n,c,"listener-added"),()=>{u.delete(c),d==null||d.forEach(E=>E());let m=n;for(;m;)m.numListenersRecursive--,m=m.parent;Aa(n,c,"listener-removed"),u.size===0&&Aa(n,void 0,"listeners-cleared")}}function J_(n,e,t){let r=nd(e,[],he(n));return function({value:i,isFromPersist:o,isFromSync:s}){const a=nd(e,[],i);a!==r&&t({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function id(n,e,t,r){let i=[];return n==null||n.forEach(o=>{const{node:s,track:a}=o;i.push(In(s,e,{trackingType:a,immediate:r,noArgs:t}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var jo=0,od=[],Or={current:void 0};function zo(n,e){if(jo){const t=Or.current;if(t){t.nodes||(t.nodes=new Map);const r=t.nodes.get(n);r?(r.track=r.track||e,r.num++):t.nodes.set(n,{node:n,track:e,num:1})}}}function Yf(n,e,t,r,i,o){let s,a,l=e;od.push(Or.current),jo++,Or.current={};const u=n&&an(n,t,r,i==null?void 0:i.fromComputed),c=Or.current.nodes;return--jo<0&&(jo=0),Or.current=od.pop(),r!=null&&r.cancel||(s=id(c,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=id(c,l),s):void 0),{nodes:c,value:u,dispose:s,resubscribe:a}}function Gi(n,e,t){let r,i;q(e)?r=e:t=e;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Us(),delete s.value,i==null||i();const{dispose:l,value:u,nodes:c}=Yf(n,a,void 0,s,t);var d,h;i=l,s.value=u,s.nodes=c,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),Jr(),o=!1,!r||!(t!=null&&t.fromComputed)&&(!(s.num>0)&&(d=n)&&((h=d[xr])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,u;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(u=s.onCleanupReaction)==null||u.call(s),s.onCleanupReaction=void 0,i==null||i()}}function Gf(n,e,t){if(Ut(n))return e?n.then(e):n;const r=Ie(n);let i,o;return Gi(function(s){const a=r?n.map(l=>an(l)):an(n);if(!Ut(a)){{let l=!0;if(Ie(a))for(let u=0;u<a.length;u++){let c=a[u];De(c)?c=an(c):q(c)&&(c=c()),l=l&&!!(t?rd(c):c)}else l=t?rd(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=e==null?void 0:e(i)}),Ut(i)?e?i.then(e):i:i!==void 0?e?o:Promise.resolve(i):new Promise(s=>{if(e){const a=e;e=l=>{const u=a(l);s(Ut(u)?u.then(c=>c):u)}}else e=s})}function Wf(n,e){return Gf(n,e,!1)}var _a=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),sd=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),q_=new Set(["filter","find"]),Al=new Map,_l=new Map([["get",$s],["set",Dt],["peek",qr],["onChange",In],["assign",function(n,e){const t=ot(n);if(Us(),qe(n.root._)&&(n.root._={}),ke(e)){const r=he(n);ke(r)?e.forEach((i,o)=>r.set(o,i)):Dt(n,e)}else{n.isAssigning=(n.isAssigning||0)+1;try{Object.assign(t,e)}finally{n.isAssigning--}}return Jr(),t}],["delete",Jf],["toggle",function(n){const e=he(n);(e==null||vf(e))&&Dt(n,!e)}]]);function Xf(n,e,t,...r){var i;if(t!=="push"||r.length!==1){const o=e.slice(),s=e[t].apply(e,r);if(n){const a=Bs(n),l=a?n.key:"_";(a?he(n.parent):n.root)[l]=o,Hr((i=n.parent)!=null?i:n,l,e)}return s}Hr(n,e.length+"",r[0])}function Pu(n,e,t){var r,i,o;if(jt(e)&&Vi(e)||jt(t)&&Vi(t)){const T=e!==t;return T&&(n.listeners||n.listenersImmediate)&&Yi(n,e,t,0),T}const s=Ie(e);let a,l;const u=ke(e),c=dn(e),d=ke(t),h=dn(t),p=ml(e,s,u,c),f=ml(t,s,d,h),m=((r=p||e)==null?void 0:r.length)||0,E=((i=f||t)==null?void 0:i.length)||0;let A,g,O,S=!1;if(s&&Ie(t)){if(t.length>0){const T=t[0];if(T!==void 0&&(A=Ff(T,n),A&&(g=q(A),a=new Map,l=[]),n.children))for(let I=0;I<t.length;I++){const C=t[I];if(C){const y=n.children.get(I+"");if(y&&(e[I]||ad(y,C),A)){const _=g?A(C):C[A];a.set(_,y)}}}}}else if(t&&(!e||jt(e))){const T=f.length;for(let I=0;I<T;I++){const C=f[I];if(!p.includes(C)){S=!0;const y=yt(n,C),_=d?t.get(C):t[C];_!==void 0&&ad(y,_)}}}if(e&&!qe(e)){S=S||m!==E;const T=S;let I=!1;for(let C=0;C<m;C++){const y=s?C+"":p[C];let _=u?e.get(y):e[y];const D=d?t==null?void 0:t.get(y):t==null?void 0:t[y];let k=!Pf(_,D);if(k){const L=A&&_?g?A(_):_[A]:void 0,H=(o=n.children)==null?void 0:o.get(y);if(De(_)){const w=ho(_);if((H==null?void 0:H.linkedToNode)===w){const U=he(w);u?e.set(y,U):e[y]=U;continue}const $=_;_=()=>$}let N=yt(n,y,_);if(N.lazy||!q(_)&&!De(_)||(Qf(N,_),Zn(N)),s&&L!==void 0){const w=L!==void 0?a==null?void 0:a.get(L):void 0;if(w){if(w!==void 0&&w.key!==y){const $=t[w.key];T&&(N=w,n.children.delete(N.key),N.key=y,l.push([y,N])),I=!0,k=$!==_}}else S=!0}if(k)if(q(_)||De(_))$r(n,y,_);else if(qe(_))S=!0;else{const w=Pu(N,_,D);S=S||w,k=w}(k||s&&!T)&&(N.listeners||N.listenersImmediate)&&Yi(N,_,D,0,!T)}}if(l)for(let C=0;C<l.length;C++){const[y,_]=l[C];n.children.set(y,_)}O=S||I}else t!==void 0&&(O=!0);return O!=null&&O}function ad(n,e){var t,r;(t=n.linkedToNodeDispose)==null||t.call(n),(r=n.activatedObserveDispose)==null||r.call(n),qe(e)||Pu(n,void 0,e),(n.listeners||n.listenersImmediate)&&Yi(n,void 0,e,0)}function ot(n,e,t){return e!==void 0&&(n=yt(n,e,t)),n.proxy||(n.proxy=new Proxy(n,Kf))}function gl(){if(Re.pendingNodes.size>0){const n=Array.from(Re.pendingNodes.values());Re.pendingNodes.clear(),n.forEach(e=>e())}}var Kf={get(n,e,t){var r,i;if(e===x_)throw new Error("[legend-state] observable is not a primitive.");if(e===xr)return n;if(e==="apply"||e==="call"){const d=he(n);if(q(d))return d[e]}let o=Zn(n,e==="get"||e==="peek");if(e===B_)return!o||qe(o)?void 0:o[e];const s=n.linkedToNode||(o==null?void 0:o[xr]);if(s&&e!=="onChange")return Kf.get(s,e,t);if(ke(o)||dn(o)){const d=function(h,p,f){const m=f==null?void 0:f[p];if(p==="size")return zo(h,!0),f[p];if(q(m))return function(E,A,g){const O=arguments.length,S=f;if(p==="get"){if(O>0&&typeof E!="boolean"&&E!==ku)return ot(h,E)}else{if(p==="set")return O===2?Dt(yt(h,E),A):O===1&&ke(f)&&Dt(h,E),ot(h);if(p==="delete"){if(O>0){const I=f.get?S.get(E):E;return Jf(h,E),I!==void 0}}else{if(p==="clear"){const I=dn(S)?new Set(S):new Map(S),C=S.size;return S.clear(),void(C&&qf(h,f,I))}if(p==="add"){const I=new Set(f),C=f.add(E);return f.has(p)||Yi(h,C,I,0),ot(h)}}}const T=_l.get(p);if(!T)return f[p](E,A);switch(O){case 0:return T(h);case 1:return T(h,E);case 2:return T(h,E,A);default:return T(h,E,A,g)}}}(n,e,o);if(d!==void 0)return d}const a=_l.get(e);if(a)return e!=="get"&&e!=="peek"||gl(),function(d,h,p){switch(arguments.length){case 0:return a(n);case 1:return a(n,d);case 2:return a(n,d,h);default:return a(n,d,h,p)}};const l=Al.get(e);if(l)return l.get(n);let u=o==null?void 0:o[e];if(jt(o)&&Vi(o))return u;const c=(r=n.functions)==null?void 0:r.get(e);if(c)return De(c)?c:ot(n,e,c);if(u=function(d,h){if(d){const p=Object.getOwnPropertyDescriptor(d,h);return p!=null&&p.get&&(delete d[h],d[h]=p.set?function(f){q(f)&&(f={get:f});const m=function(){return{[zi]:f}};return m.prototype[zi]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),d[h]}}(o,e),function(d){return d==null}(o)&&u===void 0&&(_a.has(e)||sd.has(e))&&(o=[],_a.has(e)&&sn(n,o),u=o[e]),q(u)){if(Ie(o)){if(_a.has(e))return(...h)=>Xf(n,o,e,...h);if(sd.has(e))return zo(n,!0),function(h,p){const f=e==="reduce",m=f?(g,O,S,T)=>h(g,ot(n,S+"",O),S,T):(g,O,S)=>h(ot(n,O+"",g),O,S);if(f||!q_.has(e))return o[e](m,p);const E=e==="find",A=[];for(let g=0;g<o.length;g++)if(m(o[g],g,o)){const O=ot(n,g+"");if(E)return O;A.push(O)}return E?void 0:A}}$r(n,e,u);const d=(i=n.functions)==null?void 0:i.get(e);return d?ot(n,e,d):u.bind(o)}return qe(u)&&e==="length"&&Ie(o)?(zo(n,!0),u):ot(n,e)},getPrototypeOf(n){const e=he(n);return e!==null&&typeof e=="object"?Reflect.getPrototypeOf(e):null},ownKeys(n){Zn(n);const e=$s(n,!0);if(qe(e))return[];const t=e?Reflect.ownKeys(e):[];if(Ie(e)&&t[t.length-1]==="length"&&t.splice(t.length-1,1),q(n)){const r=Reflect.ownKeys(n);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&t.push(i))}return t},getOwnPropertyDescriptor(n,e){if(e==="caller"||e==="arguments"||e==="prototype")return{configurable:!1,enumerable:!1};const t=he(n);if(qe(t))return;const r=Reflect.getOwnPropertyDescriptor(t,e);return r?{...r,configurable:!0}:void 0},set(n,e,t){if(n.isSetting)return Reflect.set(n,e,t);if(n.isAssigning)return Hr(n,e,t),!0;const r=Al.get(e);return!!r&&(r.set(n,t),!0)},deleteProperty:(n,e)=>!!n.isSetting&&Reflect.deleteProperty(n,e),has(n,e){const t=he(n);return Reflect.has(t,e)},apply(n,e,t){De(e)&&(e=e.peek());const r=he(n),i=q(r)?r:n.lazyFn||n;return Reflect.apply(i,e,t)}};function Dt(n,e){n.parent?Hr(n.parent,n.key,e):Hr(n,"_",e)}function Hr(n,e,t,r){const i=!n.parent&&e==="_";xf(n,t),!n.parent||he(n)||q(t)||Dt(n,{[e]:t});const o=i?n:yt(n,e,t);if(De(t))ds(o,t);else{const{newValue:s,prevValue:a,parentValue:l}=sn(o,t),u=qe(a)||a instanceof Date||qe(s)||s instanceof Date;if(!u){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const c=!Pf(s,a),d=!c&&o.isComputing&&!u&&!o.isPlain;!c&&!d||o.isComputing&&o.isPlain&&n.numListenersRecursive===0||qf(n,s,a,o,l,u,i,r,d),$r(n,e,s)}}function Jf(n,e){e===void 0&&Bs(n)&&(e=n.key,n=n.parent);const t=he(n);Ie(t)?Xf(n,t,"splice",e,1):Hr(n,e!=null?e:"_",Hs,-1)}function qf(n,e,t,r,i,o,s,a,l){r||(r=n),Us(),o===void 0&&(o=qe(e));let u,c,d=l||o,h=!1;(!o||t&&!qe(t))&&(d=d||Pu(r,e,t),Ie(e)?u=e:(ke(e)||dn(e))&&(c=e)),Ie(i)?u=i:(ke(i)||dn(i))&&(c=i),u?h=(u==null?void 0:u.length)!==(t==null?void 0:t.length):c&&(h=(c==null?void 0:c.size)!==(t==null?void 0:t.size)),(o||!e||as(e)&&!as(t)?e!==t:d)&&Yi(o&&s?n:r,e,t,(a!=null?a:t===void 0)?-1:d?0:1,h),Jr()}function Ur(n,e,t){const r=n.numGets=(n.numGets||0)+1;n.state||(n.state=Fu({isLoaded:!1},0,Ur,ot)),e.then(i=>{r>=(n.getNumResolved||0)&&(n.getNumResolved=n.numGets,t?t({value:i}):Dt(n,i),n.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{n.state.error.set(i)})}function $r(n,e,t){if(Ut(t)){const r=yt(n,e);return Ur(r,t),void sn(r,void 0)}if(De(t)){const r=()=>t;ed(n,e,r);const i=yt(n,e,r),o=qr(ho(t));return ds(i,t),sn(i,o),he(i)}if(typeof t=="function")return ed(n,e,t),e}function $s(n,e){return zo(n,e?jt(e)?e.shallow:e:void 0),qr(n)}function qr(n){return Zn(n,!0)}var vo=!1;function Zn(n,e){var t;if(vo=!0,e&&((t=n.dirtyChildren)==null?void 0:t.size)){const i=Array.from(n.dirtyChildren);n.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Zn(o))}if(n.dirtyFn){const i=n.dirtyFn;n.dirtyFn=void 0,Re.dirtyNodes.delete(n),i()}vo=!1;let r=he(n);return n.root.isLoadingLocal||n.isPlain||(r=function(i,o,s){const a=o,l=i.lazy;if(l){const u=i.lazyFn;if(delete i.lazy,q(u))if(u.length===1)o={};else{if(i.parent){const c=he(i.parent);q(o)&&(c?delete c[i.key]:i.root._=void 0)}o=function(c,d){let h,p,f,m=!0;const E=d;let A,g,O=[];function S(){c.dirtyFn=g,Re.dirtyNodes.add(c)}const T=Gi(()=>{var I,C,y,_;if(m)m=!1,q(he(c))&&sn(c,void 0);else if(!vo&&g&&function(N,w){if(!vo&&!function(U){var G,z;let V=U,K=U.numListenersRecursive>0;for(;V&&!K;)((G=V.listeners)!=null&&G.size||(z=V.listenersImmediate)!=null&&z.size)&&(K=!0),V=V.parent;return K}(N)){w&&(N.dirtyFn=w);let U=N;for(;U;)U.dirtyChildren||(U.dirtyChildren=new Set),U.dirtyChildren.add(N),U=U.parent;return!0}}(c,g))return void(f=!0);let D=E(),k=!1;const L=De(D);(L||c.linkedToNode)&&(k=L,D=ds(c,D)),q(D)&&D.length===0&&(D=D());const H=L||D==null?void 0:D[zi];if(H&&(c.activationState=H,D=void 0),f=!1,p=Ut(D),c.activated){if(c.activationState){const N=c.activationState;(C=(I=c.state)==null?void 0:I.peek())!=null&&C.sync?(c.state.sync(),f=!0):D=(_=(y=N.get)==null?void 0:y.call(N))!=null?_:N.initial}}else{c.activated=!0;let N=Z_;H!=null&&H.synced&&(N=Re.activateSyncedNode,f=!0);const w=N(c,D);h=w.update;let $=w.value;!k&&De($)&&($=ds(c,$)),D=$!=null?$:H==null?void 0:H.initial}return f&&(A=D),p=p||Ut(D),D},I=>{const{value:C,nodes:y,refresh:_}=I;if(g=_,!f){if(!p||!Re.isLoadingRemote)if(p)if(c.activationState){const{initial:D}=c.activationState;C&&Ut(C)&&Ur(c,C,h),q(he(c))&&sn(c,D!=null?D:void 0)}else c.activated&&(Ur(c,C,h),q(he(c))&&sn(c,void 0));else{A=C;const D=c.state.isLoaded.peek();!D&&q(C)||(c.isComputing=!0,Dt(c,C),c.isComputing=!1),D||c.state.assign({isLoaded:!0,error:void 0})}O.forEach(D=>D()),O=[],y==null||y.forEach(({node:D,track:k})=>{O.push(In(D,S,{immediate:!0,trackingType:k}))})}I.cancel=!0},{fromComputed:!0});return c.activatedObserveDispose=()=>{T==null||T(),O.forEach(I=>I())},A}(i,u)}else De(o)&&(o=$r(i.parent,i.key,o))}return xf(i,o),!l&&!i.needsExtract||i.isPlain||De(o)||qe(o)||(s&&function(u,c){if(!c.recursivelyAutoActivated&&(jt(u)||Ie(u))&&!Vi(u)){c.recursivelyAutoActivated=!0;const d=[];em(u,d,()=>{var p;let f=c;for(let m=0;m<d.length;m++){const E=d[m],A=(p=he(f))==null?void 0:p[E];f=yt(f,E,q(A)?A:void 0),Zn(f)}return f})}}(o,i),i.parent&&$r(i.parent,i.key,a)),o}(n,r,!!e)),r}function Zf(n){var e,t;(e=n.activatedObserveDispose)==null||e.call(n),(t=n.linkedToNodeDispose)==null||t.call(n),n.activatedObserveDispose=n.linkedToNodeDispose=n.linkedToNode=void 0}function Qf(n,e){Zf(n),n.lazyFn=e,n.lazy=!0}function Z_(n,e){if(n.state||(n.state=Fu({isLoaded:!1},0,Ur,ot)),n.activationState){const{set:t,get:r,initial:i}=n.activationState;if((e=r==null?void 0:r())!=null&&e!==null||(e=i),t){let o,s=[],a=0;const l=u=>{if(s.length>0){let c,d,h,p=!1,f=!1;u?(c=u.changes,d=u.value,p=u.isFromPersist,f=u.isFromSync,h=u.getPrevious):(c=s,d=o,h=Mu(d,c)),s=[],o=void 0,Re.pendingNodes.delete(n),a++;const m=a,E=()=>{m===a&&(n.isComputing=!0,t({value:d,changes:c,isFromPersist:p,isFromSync:f,getPrevious:h}),n.isComputing=!1)};Gf(n.state.isLoaded,E,!0)}};In(n,({value:u,changes:c})=>{n.isComputing||(c.length>1||!q(c[0].prevAtPath))&&(o=u,s.length>0&&(c=c.filter(d=>!Hf(s[0].path,d.path))),s.push(...c),Re.pendingNodes.set(n,l))},{immediate:!0}),In(n,l)}}return{update:({value:t})=>{n.isComputing||(n.isComputing=!0,Dt(n,t),n.isComputing=!1)},value:e}}function ds(n,e){var t;const r=e?ho(e):void 0;return r!==n&&(r==null?void 0:r.linkedToNode)!==n&&(n.linkedToNode=r,(t=n.linkedToNodeDispose)==null||t.call(n),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(n),n.linkedToNodeDispose=In(r,()=>{q(e=Zn(r))||Dt(n,e)},{initial:!0},new Set([n])))),e}function em(n,e,t){var r;if((jt(n)||Ie(n))&&!Vi(n)&&!yf(n)){for(const i in n)if(bu.call(n,i)){const o=n[i];if(De(o)){const s=t();$r(s,i,o),delete s.lazy}else{const s=q(o)&&((r=o.prototype)==null?void 0:r[zi]);if(s){const a=s.activate;(!a||a==="auto")&&qr(yt(t(),i,o))}}typeof o=="object"&&(e.push(i),em(o,e,t),e.pop())}}}var ld=["get","set","peek","onChange","toggle"];function vr(n){this._node=n;for(let e=0;e<ld.length;e++){const t=ld[e];this[t]=this[t].bind(this)}}function No(n,e){vr.prototype[n]=function(...t){return e.call(this,this._node,...t)}}function Se(n){return Fu(n,0,Ur,ot,vr)}No("peek",n=>(gl(),qr(n))),No("get",(n,e)=>(gl(),$s(n,e))),No("set",Dt),No("onChange",In),Object.defineProperty(vr.prototype,xr,{configurable:!0,get(){return this._node}}),vr.prototype.toggle=function(){const n=this.peek();(n==null||vf(n))&&this.set(!n)},vr.prototype.delete=function(){return this.set(void 0),this};var js={createPreviousHandler:Mu,clone:wf,deactivateNode:Zf,deepMerge:ls,ensureNodeValue:Lu,findIDKey:Ff,get:$s,getChildNode:yt,getKeys:ml,getNode:ho,getNodeValue:he,getPathType:bf,getProxy:ot,getValueAtPath:function(n,e){return e.reduce(V_,n)},globalState:Re,initializePathType:wu,ObservablePrimitiveClass:vr,observableProperties:Al,observableFns:_l,optimized:ku,peek:qr,reactivateNode:Qf,registerMiddleware:function(n,e,t){let r=gr.get(n);r||(r=new Map,gr.set(n,r));let i=r.get(e);return i||(i=new Set,r.set(e,i)),i.add(t),()=>{const o=gr.get(n);if(!o)return;const s=o.get(e);s&&(s.delete(t),s.size===0&&(o.delete(e),o.size===0&&gr.delete(n)))}},safeParse:Lf,safeStringify:kf,set:Dt,setAtPath:Bf,setNodeValue:sn,symbolLinked:zi,symbolDelete:Hs,tracking:Or},{globalState:ud,observableProperties:Q_,observableFns:eg,ObservablePrimitiveClass:cd}=js;class tm extends Error{}function dd(n,e){if(!n)throw new tm(e!=null?e:"Assertion failed")}const pe=Object.assign(dd,{is:function(n,e,t){return dd(e,t)},unreachable:function(){throw new Error("Unreachable code")},never:function(n){throw new Error("Unreachable")},defined:function(n){if(n==null)throw new tm("Value is not defined")}});class zs{constructor(e={}){this._handlers=new Set,this._meta=e}meta(e){return new zs(e)}_emit(e,t){for(const r of this._handlers)r({level:e,data:t,timestamp:Date.now(),meta:this._meta})}error(...e){return this._emit("error",e)}warn(...e){return this._emit("warn",e)}info(...e){return this._emit("info",e)}log(...e){return this._emit("log",e)}trace(...e){return this._emit("trace",e)}registerHandler(e){return this._handlers.add(e),()=>this._handlers.delete(e)}}const hs=new zs,$t=new zs,tg="https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm",xu=function(n){let e;return()=>(e===void 0&&(e={value:n()}),e.value)}(async function(){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=await async function(t){return import(t).catch(()=>new Function("url","return import(url)")(t)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}(tg);return await new n.Database().ready(),n}catch(n){return hs.error("Failed to load emoji picker:",n),new Promise(()=>{})}});function hd(n,e,t){return n.clearRect(0,0,100,100),n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data.join(",")}function pd(n){const e=function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o}(),t=hd(e,n,"#fff"),r=hd(e,n,"#000");return r===t&&!r.startsWith("0,0,0,")}const ng=uo(null),ga={didCatch:!1,error:null};class nm extends gt{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ga}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var t,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(t=(r=this.props).onReset)===null||t===void 0||t.call(r,{args:o,reason:"imperative-api"}),this.setState(ga)}}componentDidCatch(e,t){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,e,t)}componentDidUpdate(e,t){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&t.error!==null&&function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((u,c)=>!Object.is(u,l[c]))}(e.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:e.resetKeys,reason:"keys"}),this.setState(ga))}render(){const{children:e,fallbackRender:t,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=e;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof t=="function")a=t(l);else if(r)a=de(r,l);else{if(i===void 0)throw s;a=i}}return de(ng.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var yo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function rg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Bu(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var rm={exports:{}},fd={};const im=Bu(M_);var jr=im,ig=typeof Object.is=="function"?Object.is:function(n,e){return n===e&&(n!==0||1/n==1/e)||n!=n&&e!=e},og=jr.useState,sg=jr.useEffect,ag=jr.useLayoutEffect,lg=jr.useDebugValue;function Da(n){var e=n.getSnapshot;n=n.value;try{var t=e();return!ig(n,t)}catch(r){return!0}}var ug=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(n,e){return e()}:function(n,e){var t=e(),r=og({inst:{value:t,getSnapshot:e}}),i=r[0].inst,o=r[1];return ag(function(){i.value=t,i.getSnapshot=e,Da(i)&&o({inst:i})},[n,t,e]),sg(function(){return Da(i)&&o({inst:i}),n(function(){Da(i)&&o({inst:i})})},[n]),lg(t),t};fd.useSyncExternalStore=jr.useSyncExternalStore!==void 0?jr.useSyncExternalStore:ug,rm.exports=fd;var cg=rm.exports,md=!1,Dl={inObserver:!1},Ed=void 0,dg=()=>Ed||(Ed=uo(null));function Ad(n){const e=Wf(n);if(!dt.use)throw e;dt.use(e)}function ne(n,e){let t;if(Dl.inObserver&&De(n)&&!(e!=null&&e.suspense))return t=an(n,e),e!=null&&e.suspense&&t===void 0&&Ad(n),t;try{const r=ar(dg()),i=Z(()=>function(l,u){let c,d,h,p,f,m,E=0;const A=()=>{d==null||d();const{value:O,dispose:S,resubscribe:T}=Yf(p,g,l,void 0,void 0,!0);return d=S,h=T,O},g=({value:O})=>{if(u!=null&&u.peek()){const S=m;m=O,S===void 0&&Wf(()=>!u.get(),()=>{const T=m;m=void 0,g({value:T})})}else{let S=l==null?void 0:l.skipCheck;if(!S){const T=A();(T!==f||!qe(T)&&T===O)&&(S=!0)}S&&(E++,c==null||c())}};return{subscribe:O=>(c=O,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:O=>(p=O,f=A())}}(e,r),[]),{subscribe:o,getVersion:s,run:a}=i;t=a(n),cg.useSyncExternalStore(o,s,s)}catch(r){throw r}return e!=null&&e.suspense&&t===void 0&&Ad(n),t}var _d=typeof Symbol=="function"&&Symbol.for;function om(n,e,t,r,i){const o=_d?Symbol.for("react.forward_ref"):Nt(f=>null).$$typeof,s=_d?Symbol.for("react.memo"):cn(f=>null).$$typeof;if(n.__legend_proxied)return n;let a=!1,l=!1,u=n;s&&u.$$typeof===s&&u.type&&(l=!0,u=u.type),o&&u.$$typeof===o&&(a=!0,u=u.render);const c=r?new Set(r):void 0,d={apply(f,m,E){if(t){const A=E[0],g={},O=Object.keys(A);for(let S=0;S<O.length;S++){const T=O[S],I=A[T],C=c&&c.has(T);if(T==="children"&&(q(I)||De(I)))g[T]=ne(I,{skipCheck:!0});else if(C||T.startsWith("$")||T.endsWith("$")){const y=C?T:T.endsWith("$")?T.slice(0,-1):T.slice(1),_=i==null?void 0:i[y],D=_&&De(I);if(g[y]=D&&(_!=null&&_.selector)?_.selector(g,I):ne(I),D&&(_.defaultValue!==void 0&&g[y]===void 0&&(g[y]=_.defaultValue),_.handler&&_.getValue)){const k=L=>{var H;I.set(_.getValue(L)),(H=A[_.handler])==null||H.call(A,L)};g[_.handler]=ee(k,[A[_.handler],i])}C||delete g[T]}else g[T]===void 0&&(g[T]=I)}E[0]=g}return e?ne(()=>{Dl.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{Dl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},h=new Proxy(u,d);let p;return a?(p=Nt(h),p.__legend_proxied=!0):p=h,e||l?cn(p):p}var{findIDKey:hg,getNode:pg,optimized:fg}=js,gd=new Map;function Ol({each:n,optimized:e,item:t,itemProps:r,sortValues:i,children:o}){var s;if(!n)return null;const a=ne(()=>n.get(!e||fg));if(!t&&o){const u=Q();u.current=o,t=Z(()=>{return c=({item$:d,id:h})=>u.current(d,h),om(c,!0);var c},[])}else if(t.$$typeof!==Symbol.for("react.memo")){let u=gd.get(t);u||(u=cn(t),gd.set(t,u)),t=u}if(!a)return null;const l=[];if(Ie(a)){const u=a[0],c=pg(n),d=a.length,h=d>0?c&&hg(u,c)||(u.id!==void 0?"id":u.key!==void 0?"key":void 0):void 0,p=q(h);for(let f=0;f<d;f++)if(a[f]){const m=a[f],E=(s=p?h(m):m[h])!=null?s:f,A=n[f],g={key:E,id:E,item$:A,item:A};l.push(de(t,r?Object.assign(g,r):g))}}else{const u=ke(a),c=u?Array.from(a.keys()):Object.keys(a);i&&c.sort((d,h)=>i(u?a.get(d):a[d],u?a.get(h):a[h],d,h));for(let d=0;d<c.length;d++){const h=c[d];if(u?a.get(h):a[h]){const p=u?n.get(h):n[h],f={key:h,id:h,item$:p,item:p};l.push(de(t,r?Object.assign(f,r):f))}}}return l}cn(function({children:n}){return ne(()=>an(an(n)),{skipCheck:!0})},(n,e)=>!e.scoped||n.children===e.children);var Dd=new Map,Od=new Map;new Proxy({},{get(n,e){if(!n[e]){const t=Dd.get(e)||e,r=Nt((i,o)=>{const s={...i};return!o||!q(o)&&as(o)||(s.ref=o),de(t,s)});n[e]=function(i,o,s){return om(i,!1,!0,o,s)}(r,[],Od.get(e))}return n[e]}}),function(n){(function(e){if(md)return;md=!0;const t={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},t);e({binders:{input:r,textarea:t,select:t}})})(n)}(function({components:n,binders:e}){if(n)for(const t in n)Dd.set(t,n[t]);if(e)for(const t in e)Od.set(t,e[t])});var mg=(n,e)=>{{const t=Q({num:0});Y(()=>{var r;const{current:i}=t;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=n())!=null?r:null;if(s&&q(s))return i.dispose=s,()=>queueMicrotask(o)}},e)}};function sm(n){return mg(()=>{const e=n();if(!Ut(e))return e},[])}var Eg=sm,{deactivateNode:Ag}=js;function Ct(n,e){var t;const r=Q({});r.current.value=n;const i=e?Ct(e):void 0;if(!((t=r.current)!=null&&t.obs$)){const o=i?q(n)&&n.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),an(r.current.value)):n;r.current.obs$=Se(o)}return i&&i.set(e),function(o){sm(()=>o)}(()=>{const o=r.current.obs$;if(o){const s=ho(o);Ag(s)}}),r.current.obs$}function zr(n,e,t,r){let i;q(e)?i=e:Array.isArray(e)?(r=e,t=void 0):t=e,i&&Array.isArray(t)&&(r=t,t=void 0),r=r||(t==null?void 0:t.deps);const o=Q({}),s=r?Ct(r):void 0;o.current.selector=n,o.current.reaction=i,s&&s.set(r),Eg(()=>Gi(a=>{var l;return s==null||s.get(),an((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,u;return(u=(l=o.current).reaction)==null?void 0:u.call(l,a)},t))}const[am,kt]=Wt(),[lm,po]=Wt(),[um,IT]=Wt(),[Hu,fo]=Wt(),[_g,gg]=Wt(),[cm,ce]=Wt(),[dm,mo]=Wt(),[hm,pm]=Wt(),[fm,Dg]=Wt(),[Og,Uu]=Wt();function Wt(){const n=uo(void 0);return[n,()=>{const e=ar(n);return pe(e!==void 0),e}]}const mm={code:"en-US",name:"English (US)",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"If you keep your browser tab open, you'll see this pop up when someone talks to you.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Only 10,000 characters are allowed.",ENTRYBOX_PLACEHOLDER:"Say something...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"This conversation is no longer active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"You can read, but not send messages.",MESSAGELIST_LOADING_OLDER:"Loading older messages...",MESSAGELIST_SHOW_OLDER:"Show older messages",MESSAGELIST_NEW_MARKER:"New",MESSAGE_SENT_VIA_EMAIL:"This message was sent via email",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"Uploading...",UPLOAD_SEND_FILE:"Send file",UPLOAD_SHARE_LOCATION:"Share location",UPLOAD_ERROR:"Unfortunately, something went wrong uploading. The file might be unsupported or too large.",SHARE_LOCATION_ERROR:"Cannot share location: ",LOADING:"Loading...",HUB_EMPTY:"Your chat history will show up here",HUB_SHOW_EARLIER:"Show earlier chats",INBOX_NO_CHATS_TITLE:"No chats yet!",INBOX_NO_CHATS_BODY:"Once you've had one or more conversations, they will show up here.",ENABLE_TRANSLATION:"Translate this conversation to English",DISABLE_TRANSLATION:"Show original",SEARCH_PLACEHOLDER_TEXT:"Search...",SEARCH_SEARCHING:"Searching...",SEARCH_NO_RESULTS:"No results found",SEARCH_NO_MORE_RESULTS:"No more results",CHAT_NOT_FOUND:"Chat not found",DELETE_MESSAGE:"Delete message",DELETION_EXPLANATION:"If you delete this message, it will disappear for everybody.",EDIT_MESSAGE:"Edit message",SAVE:"Save",EDITED_INDICATOR:"edited",REPLY_TO_MESSAGE:"Reply",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reactions with ${e}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(n,e)=>`Replying to ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode"}},Sd={ar:{code:"ar",name:"Arabic",translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`إعلام ${n} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(n,e)=>`${n} تفاعل مع ${e}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(n,e)=>`الرد على ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد"}},bg:{code:"bg-BG",name:"Bulgarian",translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(n,e)=>`${n} реакции с ${e}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(n,e)=>`Отговор на ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор"}},bs:{code:"bs-BA",name:"Bosnian",translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(n,e)=>`Odgovaranje korisniku ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},ca:{code:"ca-ES",name:"Catalan (ES)",translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`Notificació de demostració de ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(n,e)=>`${n} reaccions amb ${e}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(n,e)=>`Responent a ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta"}},cs:{code:"cs-CZ",name:"Czech",translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reakcí s ${e}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(n,e)=>`Odpověď na ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi"}},da:{code:"da-DK",name:"Danish",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(n,e)=>`${n} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(n,e)=>`Svarer til ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand"}},de:{code:"de-DE",name:"German",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(n,e)=>`${n} Reaktionen mit ${e}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(n,e)=>`Antworten an ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen"}},el:{code:"el-GR",name:"Greek (Greece)",translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(n,e)=>`${n} αντιδράσεις με ${e}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(n,e)=>`Απάντηση στον ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης"}},en:mm,es:{code:"es-ES",name:"Spanish",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reacciones con ${e}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(n,e)=>`Respondiendo a ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta"}},et:{code:"et-EE",name:"Estonian",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(n,e)=>`${n} reaktsiooni (${e})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(n,e)=>`Vastamine kasutajale ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist"}},fa:{code:"fa",name:"Persian (Farsi)",translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`نوتیفیکیشن دمو ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(n,e)=>`${n} واکنش با ${e}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(n,e)=>`در حال پاسخ به ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ"}},fi:{code:"fi-FI",name:"Finnish",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(n,e)=>`${n} reaktiota (${e})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(n,e)=>`Vastataan käyttäjälle ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta"}},fr:{code:"fr-FR",name:"French",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`Notification de démonstration ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Ecrivez quelque chose...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(n,e)=>`${n} réactions avec ${e}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(n,e)=>`Répondre à ${n} : ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse"}},he:{code:"he-IL",name:"Hebrew",translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(n,e)=>`${n} תגובות עם ${e}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(n,e)=>`משיב ל-${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה"}},hi:{code:"hi-IN",name:"Hindi (IN)",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(n,e)=>`${n} प्रतिक्रियाएं (${e})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(n,e)=>`${n} को उत्तर दे रहे हैं: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें"}},hr:{code:"hr-HR",name:"Croatian",translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reakcija s ${e}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(n,e)=>`Odgovaranje korisniku ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},hu:{code:"hu-HU",name:"Hungarian",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(n,e)=>`${n} reakció (${e})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(n,e)=>`Válaszolás ${n} részére: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból"}},id:{code:"id-ID",name:"Bahasa Indonesia",translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`pemberitahuan demo ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reaksi dengan ${e}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(n,e)=>`Membalas ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan"}},is:{code:"is-IS",name:"Íslenska",translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(n,e)=>`${n} viðbrögð með ${e}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(n,e)=>`Svara ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód"}},it:{code:"it-IT",name:"Italian",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reazioni con ${e}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(n,e)=>`Rispondendo a ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta"}},ja:{code:"ja-JP",name:"Japanese",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(n,e)=>`${n}件のリアクション(${e})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(n,e)=>`${n}に返信: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了"}},ka:{code:"ka-GE",name:"Georgian",translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(n,e)=>`${n} რეაქცია (${e})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(n,e)=>`პასუხი ${n}-ს: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა"}},ko:{code:"ko-KR",name:"Korean (South Korea)",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(n,e)=>`${n}개 반응 (${e})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(n,e)=>`${n}에게 답장: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(n,e)=>`${n} reaksjoner med ${e}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(n,e)=>`Svarer til ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus"}},nl:{code:"nl-NL",name:"Dutch",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(n,e)=>`${n} Reacties met ${e}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(n,e)=>`Beantwoorden aan ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus"}},pl:{code:"pl-PL",name:"Polish",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reakcji z ${e}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(n,e)=>`Odpowiadanie na ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(n,e)=>`${n} reações com ${e}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(n,e)=>`Respondendo a ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta"}},ro:{code:"ro-RO",name:"Romanian (Romania)",translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`Notificare de debit ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reacții cu ${e}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(n,e)=>`Răspuns la ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns"}},ru:{code:"ru-RU",name:"Russian",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(n,e)=>`${n} реакций с ${e}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(n,e)=>`Ответ на ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа"}},sq:{code:"sq-AL",name:"Albanian",translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(n,e)=>`${n} reagime me ${e}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(n,e)=>`Duke u përgjigjur ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes"}},sr:{code:"sr-SP",name:"Serbian",translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(n,e)=>`${n} реакција са ${e}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(n,e)=>`Одговарање кориснику ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(n,e)=>`${n} Reaktioner med ${e}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(n,e)=>`Svarar på ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge"}},tr:{code:"tr-TR",name:"Turkish",translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(n,e)=>`${n} tepki (${e})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(n,e)=>`${n}'a yanıtlama: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`Демо-повідомлення про ${n}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(n,e)=>`${n} реакцій з ${e}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(n,e)=>`Відповідь на ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді"}},vi:{code:"vi-VN",name:"Vietnamese",translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(n,e)=>`${n} phản ứng với ${e}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(n,e)=>`Đang trả lời ${n}: ${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(n,e)=>`${n}个反应(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(n,e)=>`正在回复 ${n}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:n=>`${n} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(n,e)=>`${n}個反應(${e})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(n,e)=>`正在回覆 ${n}:${e}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式"}}};function Em(n){const e=n.replace(/_/g,"-").toLowerCase(),t=Sd[e];if(t)return{...t.translation,locale:e};const r=e.slice(0,2),i=Sd[r];return i?{...i.translation,locale:r}:($t.warn(`User locale '${n}' not supported; falling back to English.`),{...mm.translation,locale:"en-US"})}const Am=()=>{const n=document.createElement("canvas");n.width=n.height=1;const e=n.getContext("2d");return e.textBaseline="top",e.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',e.scale(.01,.01),e},Td=(n,e)=>{const t=Am();return t.fillStyle=e,t.fillText(n,0,0),t.getImageData(0,0,1,1).data},Sg=n=>!n.includes("")||Am().measureText(n).width<160,Tg=(n,e)=>{const t=[...n].join(",");return t===[...e].join(",")&&!t.startsWith("0,0,0,")};function _m(n){try{return function(e){const t=Td(e,"#000"),r=Td(e,"#fff"),i=Sg(e);return t&&r&&i&&Tg(t,r)}(n)}catch(e){return!0}}var Yp;const gm=(Yp=globalThis.window)!=null&&Yp.document?function(){if(typeof window=="undefined"||window.E2E)return 16;const n={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[e,t]of Object.entries(n))if(_m(e))return t}():0;class Dm{constructor(e,t){this.currentUser$=Se(null),this.app$=Se(null),this.appId$=Se(null),this.extUserId$=Se(null),this.authTokenState$=Se("idle"),this.themeCustom$=Se(td({value:void 0})),this.device$=Se({supportsEmojiPicker:!!gm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Se({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.t$=Se(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return Em((a=(s=r&&o)!=null?s:i)!=null?a:"en-US")}),Br(()=>{this.appId$.set(e),this.extUserId$.set(t)})}updateThemeCustom(e){this.themeCustom$.set(td({value:e}))}listenForErrors(e,t){this.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const r=e.onError(s=>{$t.error(s.message),this.errors$.serverError.set(!0)}),i=e.currentUser.subscribe(s=>{this.errors$.unknownUser.set(s===null)}),o=t&&e.conversation(t).subscribe(s=>{this.errors$.unknownConversation.set(s===null)});return()=>{r.unsubscribe(),i.unsubscribe(),o==null||o.unsubscribe()}}listenForAuthChanges(e,t){let r=!0;this.authTokenState$.peek()!=="loading"&&this.authTokenState$.set("loading"),e._authProvider.getToken().then(()=>{r&&this.authTokenState$.set("valid")});const i=e._authProvider.onTokenRefreshFailed(()=>{r&&this.authTokenState$.set(t?"invalid":"expired")});return()=>{r=!1,i()}}listenForUserAndAppChanges(e,t){let r=!0,i=null;const o=e.currentUser.subscribe(async s=>{if(r&&s&&(this.currentUser$.set(s),s.role!==i)){i=s.role;const a=await t.getApp(s.role);if(!r)return;this.app$.set(a)}});return()=>{r=!1,o.unsubscribe()}}}var $u={};function Rg(n){return String.fromCharCode(parseInt(n.slice(1),16))}Object.defineProperty($u,"__esModule",{value:!0});var Cg=$u.encode=function(n){return btoa(encodeURIComponent(n).replace(/%[0-9A-F]{2}/g,Rg))};function Ig(n){return`%${`00${n.charCodeAt(0).toString(16)}`.slice(-2)}`}$u.decode=function(n){return decodeURIComponent(Array.from(atob(n),Ig).join(""))};const vg=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,Ng=n=>n.split(vg).filter(e=>e).map(e=>e[0]).join("")||n[Symbol.iterator]().next().value||"";function Om(n){const e=function(t){let r=0;for(let i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i),r|=0;return Math.abs(r)}(n)%Cd.length;return Cd[e]}function Vs(n,e){const t=e.lastIndex;let r;const i=[];for(;(r=e.exec(n))!==null;)i.push(r),r[0]===""&&(e.lastIndex+=1);return e.lastIndex=t,i}function Sl(n,e,t){let r=0;const i=[];for(const o of e)o.offset<r||(o.offset>r&&i.push(n.substring(r,o.offset)),i.push(...t(o)),r=o.offset+o.matchedText.length);return r<n.length&&i.push(n.substring(r)),i}function Sm(n){try{return new URL(n).hostname}catch(e){return}}function bo(n){const e=n.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(e)}function Rd(n,e){return n.localeCompare(e,void 0,{usage:"search",sensitivity:"base"})===0}function yg(n){return[...n.matchAll(/^|\s+/g)].map(t=>t.index+t[0].length).map(t=>n.substring(t))}const Cd=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],bg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Tm extends Dm{constructor(e,t){super(e,t),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=Se({extCurrentConversationId:null,editor:{isEmpty:!0,isTyping:!1,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},referencedMessageId:null,editingMessageId:null,currentConversation:null,visibility:{isInView:!1,tabFocused:!0},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},userPermissions:()=>{const r=this.app$.role.general.get(),i=this.app$.role.permissions.get();return pe.defined(r),pe.defined(i),{showTypingIndicator:r.showTypingIndicators,canShareFile:r.enableFileTransfers,canShareLocation:r.enableLocation,canMention:r.enableMentions,showOnlineStatus:r.enablePresence!==!1,canSendVoiceMessage:r.enableVoiceRecording,canLeaveConversation:i.conversations.leave==="all",canMarkConversationAsUnread:i.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();pe.defined(r);const i=this.state$.userPermissions.get(),o={...bg,...i},s={canReplyToMessage:pn(r.messages.reply,!0),canEditMessage:pn(r.messages.edit,!0),canDeleteMessage:pn(r.messages.delete,!0),canAddReaction:pn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:pn(r.messages.reply,!1),canEditMessage:pn(r.messages.edit,!1),canDeleteMessage:pn(r.messages.delete,!1),canAddReaction:pn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.locale$=Se(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.t$=Se(()=>Em(this.locale$.get())),this.referencedMessage$=Se(()=>{const r=this.state$.extCurrentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=Se(()=>{var p,f;const r=this.state$.extCurrentConversationId.get();if(!r)return[];const i=this.state$.currentConversation.readUntil.get(),o=(p=this.state$.messages.child(r).state.get())!=null?p:[],s=Object.values((f=this.state$.ephemeralMessages.child(r).get())!=null?f:{}),a=s.length===0?o:s.concat(o).sort((m,E)=>E.createdAt-m.createdAt),l=a.map(m=>{const E=m.content[0],A=E==null?void 0:E.type;if(!E||A!=="file")return m;const g=E.size+","+E.filename,O=this.state$.localFileBlobUrls.child(r).child(g).url.get();return O?{...m,content:[{...E,url:O}]}:m});let u=null,c=0,d=!1;const h=[];for(const m of l){const E=new Date(m.createdAt),A=new Date(E).setHours(0,0,0,0),g=c&&A!==c,O=E.getTime()>i,S=!(!d||O||u!=null&&u.id.startsWith("ephemeral"));(S||g)&&h.push(new Tl({id:"border-before-"+m.id,isDayMarker:!!g,isReadMarker:!!S,timestamp:g?c:void 0})),h.push(m),d=O,c=A,u=m}return function(m,E){const A=[];let g=[];const O=Symbol("NO_KEY");let S=O;for(const T of m){const I=E(T);S===O||S===I?g.push(T):(A.push(g),g=[T]),S=I}return g.length!==0&&A.push(g),A}(h,m=>{var E;return m instanceof Tl?m.id:(E=m.sender)==null?void 0:E.id}).map(m=>(m.id=m.map(E=>E.id).join(","),m))})}storeTyping(e,t){this.state$.typing.child(e).set(t)}messagePermissions$(e){const t=this.currentUser$.get();if(!t)throw new Error("Unreachable");const r=e.content[0];return e.sender?t.id===e.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}storeMessages(e,t,r){Br(()=>{var l;const i=t.reduce((u,c)=>(u[c.id]=c,u),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();pe(s&&o),this.state$.messages.child(e).set({state:t,lookup:i,loadedAll:r});const a=this.state$.ephemeralMessages.child(e);for(const u of t){const c=this.state$.ephemeralMessageIdMapping.child(e).child(u.id).peek();c&&a.child(c).delete();const d=u.content[0];if(((l=u.sender)==null?void 0:l.id)!==s||d.type!=="file")continue;const h=d.size+","+d.filename,p=this.state$.localFileBlobUrls.child(o).child(h);if(p.fetching.peek()!==!1)continue;const f=()=>p.delete();if(d.subtype==="image"){p.fetching.set(!0);const m=document.createElement("img");m.addEventListener("load",f,{once:!0}),m.src=d.url}else if(d.subtype==="video"){p.fetching.set(!0);const m=document.createElement("video");m.addEventListener("loaddata",f,{once:!0}),m.src=d.url}else if(d.subtype==="audio"){p.fetching.set(!0);const m=document.createElement("audio");m.addEventListener("loaddata",f,{once:!0}),m.src=d.url}}})}}function pn(n,e){return n==="all"||n==="own"&&e||n==="other"&&!e}class Tl{constructor({id:e,isDayMarker:t,isReadMarker:r,timestamp:i}){this.id=e,this.isDayMarker=t,this.isReadMarker=r,this.timestamp=t?i:void 0}}function Pt(n,e=!1){return function(t,r=!1){return t.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Pt(i.children)+"*";case"italic":return"_"+Pt(i.children)+"_";case"strikethrough":return"~"+Pt(i.children)+"~";case"blockquote":return Pt(i.children).split(`
|
|
1
|
+
"use client";"use strict";var fu=e=>{throw TypeError(e)};var mu=(e,t,n)=>t.has(e)||fu("Cannot "+n);var Xt=(e,t,n)=>(mu(e,t,"read from private field"),n?n.call(e):t.get(e)),ai=(e,t,n)=>t.has(e)?fu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),na=(e,t,n,r)=>(mu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const WA=require("@talkjs/core"),Kl=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return nv},get AudioBlock(){return ov},get Avatar(){return hv},get BeforeMessages(){return ev},get ChatHeader(){return YT},get CompactMessageContent(){return rv},get ConversationImage(){return pv},get ConversationListItem(){return _v},get FileBlock(){return sv},get GroupChatImage(){return fv},get Icon(){return JT},get ImageBlock(){return av},get LocationBlock(){return lv},get Message(){return WT},get MessageActionMenu(){return KT},get MessageDivider(){return QT},get MessageField(){return qT},get MessageListFooter(){return tv},get MessageListHeader(){return GT},get ReferencedMessage(){return mv},get ReplyBar(){return Ev},get TextBlock(){return cv},get TimeAgo(){return Av},get VideoBlock(){return uv},get VoiceBlock(){return dv}},Symbol.toStringTag,{value:"Module"}));var Zi,K,Cp,$n,Eu,yp,bp,kp,ql,qa,Ja,Lp,bi={},wp=[],XA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ki=Array.isArray;function Ue(e,t){for(var n in t)e[n]=t[n];return e}function Za(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function dt(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?Zi.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Oi(e,s,r,i,null)}function Oi(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Cp:i,__i:-1,__u:0};return i==null&&K.vnode!=null&&K.vnode(o),o}function Mp(){return{current:null}}function Ht(e){return e.children}function ve(e,t){this.props=e,this.context=t}function Br(e,t){if(t==null)return e.__?Br(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Br(e):null}function Pp(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Pp(e)}}function Qa(e){(!e.__d&&(e.__d=!0)&&$n.push(e)&&!zo.__r++||Eu!=K.debounceRendering)&&((Eu=K.debounceRendering)||yp)(zo)}function zo(){for(var e,t,n,r,i,o,s,a=1;$n.length;)$n.length>a&&$n.sort(bp),e=$n.shift(),a=$n.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=Ue({},r)).__v=r.__v+1,K.vnode&&K.vnode(n),Jl(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?Br(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,Fp(o,n,s),r.__e=r.__=null,n.__e!=i&&Pp(n)));zo.__r=0}function Au(e,t,n,r,i,o,s,a,l,c,u){var d,h,f,p,m,E,A,_=r&&r.__k||wp,O=t.length;for(l=function(S,T,b,v,N){var g,D,k,C,M,I=b.length,w=I,H=0;for(S.__k=new Array(N),g=0;g<N;g++)(D=T[g])!=null&&typeof D!="boolean"&&typeof D!="function"?(typeof D=="string"||typeof D=="number"||typeof D=="bigint"||D.constructor==String?D=S.__k[g]=Oi(null,D,null,null,null):ki(D)?D=S.__k[g]=Oi(Ht,{children:D},null,null,null):D.constructor==null&&D.__b>0?D=S.__k[g]=Oi(D.type,D.props,D.key,D.ref?D.ref:null,D.__v):S.__k[g]=D,C=g+H,D.__=S,D.__b=S.__b+1,k=null,(M=D.__i=KA(D,b,C,w))!=-1&&(w--,(k=b[M])&&(k.__u|=2)),k==null||k.__v==null?(M==-1&&(N>I?H--:N<I&&H++),typeof D.type!="function"&&(D.__u|=4)):M!=C&&(M==C-1?H--:M==C+1?H++:(M>C?H--:H++,D.__u|=4))):S.__k[g]=null;if(w)for(g=0;g<I;g++)(k=b[g])!=null&&!(2&k.__u)&&(k.__e==v&&(v=Br(k)),Up(k,k));return v}(n,t,_,l,O),d=0;d<O;d++)(f=n.__k[d])!=null&&(h=f.__i==-1?bi:_[f.__i]||bi,f.__i=d,E=Jl(e,f,h,i,o,s,a,l,c,u),p=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Zl(h.ref,null,f),u.push(f.ref,f.__c||p,f)),m==null&&p!=null&&(m=p),(A=!!(4&f.__u))||h.__k===f.__k?l=xp(f,l,e,A):typeof f.type=="function"&&E!==void 0?l=E:p&&(l=p.nextSibling),f.__u&=-7);return n.__e=m,l}function xp(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=xp(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Br(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function cn(e,t){return t=t||[],e==null||typeof e=="boolean"||(ki(e)?e.some(function(n){cn(n,t)}):t.push(e)),t}function KA(e,t,n,r){var i,o,s,a=e.key,l=e.type,c=t[n],u=c!=null&&!(2&c.__u);if(c===null&&a==null||u&&a==c.key&&l==c.type)return n;if(r>(u?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((c=t[s=i>=0?i--:o++])!=null&&!(2&c.__u)&&a==c.key&&l==c.type)return s}return-1}function _u(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||XA.test(t)?n:n+"px"}function _o(e,t,n,r,i){var o,s;t:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_u(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||_u(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(kp,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=ql,e.addEventListener(t,o?Ja:qa,o)):e.removeEventListener(t,o?Ja:qa,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n==null?"":n;break t}catch(a){}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function gu(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=ql++;else if(t.t<n.u)return;return n(K.event?K.event(t):t)}}}function Jl(e,t,n,r,i,o,s,a,l,c){var u,d,h,f,p,m,E,A,_,O,S,T,b,v,N,g,D,k=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(u=K.__b)&&u(t);t:if(typeof k=="function")try{if(A=t.props,_="prototype"in k&&k.prototype.render,O=(u=k.contextType)&&r[u.__c],S=u?O?O.props.value:u.__:r,n.__c?E=(d=t.__c=n.__c).__=d.__E:(_?t.__c=d=new k(A,S):(t.__c=d=new ve(A,S),d.constructor=k,d.render=qA),O&&O.sub(d),d.state||(d.state={}),d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),_&&d.__s==null&&(d.__s=d.state),_&&k.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ue({},d.__s)),Ue(d.__s,k.getDerivedStateFromProps(A,d.__s))),f=d.props,p=d.state,d.__v=t,h)_&&k.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),_&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(_&&k.getDerivedStateFromProps==null&&A!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(A,S),t.__v==n.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(A,d.__s,S)===!1){for(t.__v!=n.__v&&(d.props=A,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(C){C&&(C.__=t)}),T=0;T<d._sb.length;T++)d.__h.push(d._sb[T]);d._sb=[],d.__h.length&&s.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(A,d.__s,S),_&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,p,m)})}if(d.context=S,d.props=A,d.__P=e,d.__e=!1,b=K.__r,v=0,_){for(d.state=d.__s,d.__d=!1,b&&b(t),u=d.render(d.props,d.state,d.context),N=0;N<d._sb.length;N++)d.__h.push(d._sb[N]);d._sb=[]}else do d.__d=!1,b&&b(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++v<25);d.state=d.__s,d.getChildContext!=null&&(r=Ue(Ue({},r),d.getChildContext())),_&&!h&&d.getSnapshotBeforeUpdate!=null&&(m=d.getSnapshotBeforeUpdate(f,p)),g=u,u!=null&&u.type===Ht&&u.key==null&&(g=Hp(u.props.children)),a=Au(e,ki(g)?g:[g],t,n,r,i,o,s,a,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),E&&(d.__E=d.__=null)}catch(C){if(t.__v=null,l||o!=null)if(C.then){for(t.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else{for(D=o.length;D--;)Za(o[D]);tl(t)}else t.__e=n.__e,t.__k=n.__k,C.then||tl(t);K.__e(C,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=function(C,M,I,w,H,P,z,V,Y){var B,et,q,nt,W,vt,Rt,ht=I.props||bi,mt=M.props,wt=M.type;if(wt=="svg"?H="http://www.w3.org/2000/svg":wt=="math"?H="http://www.w3.org/1998/Math/MathML":H||(H="http://www.w3.org/1999/xhtml"),P!=null){for(B=0;B<P.length;B++)if((W=P[B])&&"setAttribute"in W==!!wt&&(wt?W.localName==wt:W.nodeType==3)){C=W,P[B]=null;break}}if(C==null){if(wt==null)return document.createTextNode(mt);C=document.createElementNS(H,wt,mt.is&&mt),V&&(K.__m&&K.__m(M,P),V=!1),P=null}if(wt==null)ht===mt||V&&C.data==mt||(C.data=mt);else{if(P=P&&Zi.call(C.childNodes),!V&&P!=null)for(ht={},B=0;B<C.attributes.length;B++)ht[(W=C.attributes[B]).name]=W.value;for(B in ht)if(W=ht[B],B!="children"){if(B=="dangerouslySetInnerHTML")q=W;else if(!(B in mt)){if(B=="value"&&"defaultValue"in mt||B=="checked"&&"defaultChecked"in mt)continue;_o(C,B,null,W,H)}}for(B in mt)W=mt[B],B=="children"?nt=W:B=="dangerouslySetInnerHTML"?et=W:B=="value"?vt=W:B=="checked"?Rt=W:V&&typeof W!="function"||ht[B]===W||_o(C,B,W,ht[B],H);if(et)V||q&&(et.__html==q.__html||et.__html==C.innerHTML)||(C.innerHTML=et.__html),M.__k=[];else if(q&&(C.innerHTML=""),Au(M.type=="template"?C.content:C,ki(nt)?nt:[nt],M,I,w,wt=="foreignObject"?"http://www.w3.org/1999/xhtml":H,P,z,P?P[0]:I.__k&&Br(I,0),V,Y),P!=null)for(B=P.length;B--;)Za(P[B]);V||(B="value",wt=="progress"&&vt==null?C.removeAttribute("value"):vt!=null&&(vt!==C[B]||wt=="progress"&&!vt||wt=="option"&&vt!=ht[B])&&_o(C,B,vt,ht[B],H),B="checked",Rt!=null&&Rt!=C[B]&&_o(C,B,Rt,ht[B],H))}return C}(n.__e,t,n,r,i,o,s,l,c);return(u=K.diffed)&&u(t),128&t.__u?void 0:a}function tl(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(tl)}function Fp(e,t,n){for(var r=0;r<n.length;r++)Zl(n[r],n[++r],n[++r]);K.__c&&K.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){K.__e(o,i.__v)}})}function Hp(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:ki(e)?e.map(Hp):Ue({},e)}function Zl(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){K.__e(i,n)}}function Up(e,t,n){var r,i;if(K.unmount&&K.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Zl(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){K.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Up(r[i],t,n||typeof e.type!="function");n||Za(e.__e),e.__c=e.__=e.__e=void 0}function qA(e,t,n){return this.constructor(e,n)}function Li(e,t,n){var r,i,o,s;t==document&&(t=document.documentElement),K.__&&K.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Jl(t,e=(!r&&n||t).__k=dt(Ht,null,[e]),i||bi,bi,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Zi.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Fp(o,e,s)}function Bp(e,t){Li(e,t,Bp)}function JA(e,t,n){var r,i,o,s,a=Ue({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?Zi.call(arguments,2):n),Oi(e.type,a,r||e.key,i||e.ref,null)}function Qi(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,Qa(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return t.__c="__cC"+Lp++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Zi=wp.slice,K={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Cp=0,ve.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Ue({},this.state),typeof e=="function"&&(e=e(Ue({},n),this.props)),e&&Ue(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qa(this))},ve.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qa(this))},ve.prototype.render=Ht,$n=[],yp=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,bp=function(e,t){return e.__v.__b-t.__v.__b},zo.__r=0,kp=/(PointerCapture)$|Capture$/i,ql=0,qa=gu(!1),Ja=gu(!0),Lp=0;var ZA=0;function y(e,t,n,r,i,o){t||(t={});var s,a,l=t;if("ref"in l)for(a in l={},t)a=="ref"?s=t[a]:l[a]=t[a];var c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ZA,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return K.vnode&&K.vnode(c),c}var hn,ut,ra,Du,jr=0,jp=[],At=K,Ou=At.__b,Su=At.__r,Tu=At.diffed,vu=At.__c,Ru=At.unmount,Iu=At.__;function lr(e,t){At.__h&&At.__h(ut,e,jr||t),jr=0;var n=ut.__H||(ut.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ot(e){return jr=1,vs($p,e)}function vs(e,t,n){var r=lr(hn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):$p(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=ut,!ut.__f)){var i=function(a,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!o||o.call(this,a,l,c);var d=r.__c.props!==a;return u.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),o&&o.call(this,a,l,c)||d};ut.__f=!0;var o=ut.shouldComponentUpdate,s=ut.componentWillUpdate;ut.componentWillUpdate=function(a,l,c){if(this.__e){var u=o;o=void 0,i(a,l,c),o=u}s&&s.call(this,a,l,c)},ut.shouldComponentUpdate=i}return r.__N||r.__}function G(e,t){var n=lr(hn++,3);!At.__s&&ec(n.__H,t)&&(n.__=e,n.u=t,ut.__H.__h.push(n))}function ge(e,t){var n=lr(hn++,4);!At.__s&&ec(n.__H,t)&&(n.__=e,n.u=t,ut.__h.push(n))}function Z(e){return jr=5,Q(function(){return{current:e}},[])}function Mn(e,t,n){jr=6,ge(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Q(e,t){var n=lr(hn++,7);return ec(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tt(e,t){return jr=8,Q(function(){return e},t)}function cr(e){var t=ut.context[e.__c],n=lr(hn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ut)),t.props.value):e.__}function Ql(e,t){At.useDebugValue&&At.useDebugValue(t?t(e):e)}function tc(){var e=lr(hn++,11);if(!e.__){for(var t=ut.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function QA(){for(var e;e=jp.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Lo),e.__H.__h.forEach(el),e.__H.__h=[]}catch(t){e.__H.__h=[],At.__e(t,e.__v)}}At.__b=function(e){ut=null,Ou&&Ou(e)},At.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Iu&&Iu(e,t)},At.__r=function(e){Su&&Su(e),hn=0;var t=(ut=e.__c).__H;t&&(ra===ut?(t.__h=[],ut.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Lo),t.__h.forEach(el),t.__h=[],hn=0)),ra=ut},At.diffed=function(e){Tu&&Tu(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(jp.push(t)!==1&&Du===At.requestAnimationFrame||((Du=At.requestAnimationFrame)||t_)(QA)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),ra=ut=null},At.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Lo),n.__h=n.__h.filter(function(r){return!r.__||el(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],At.__e(r,n.__v)}}),vu&&vu(e,t)},At.unmount=function(e){Ru&&Ru(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Lo(r)}catch(i){t=i}}),n.__H=void 0,t&&At.__e(t,n.__v))};var Nu=typeof requestAnimationFrame=="function";function t_(e){var t,n=function(){clearTimeout(r),Nu&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Nu&&(t=requestAnimationFrame(n))}function Lo(e){var t=ut,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ut=t}function el(e){var t=ut;e.__c=e.__(),ut=t}function ec(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function $p(e,t){return typeof t=="function"?t(e):t}function Vp(e,t){for(var n in t)e[n]=t[n];return e}function nl(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function nc(e,t){var n=t(),r=ot({t:{__:n,u:t}}),i=r[0].t,o=r[1];return ge(function(){i.__=n,i.u=t,ia(i)&&o({t:i})},[e,n,t]),G(function(){return ia(i)&&o({t:i}),e(function(){ia(i)&&o({t:i})})},[e]),n}function ia(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}function rc(e){e()}function ic(e){return e}function oc(){return[!1,rc]}var sc=ge;function Go(e,t){this.props=e,this.context=t}function pn(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:nl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,dt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Go.prototype=new ve).isPureReactComponent=!0,Go.prototype.shouldComponentUpdate=function(e,t){return nl(this.props,e)||nl(this.state,t)};var Cu=K.__b;K.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Cu&&Cu(e)};var e_=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Le(e){function t(n){var r=Vp({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=e_,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var yu=function(e,t){return e==null?null:cn(cn(e).map(t))},Yp={map:yu,forEach:yu,count:function(e){return e?cn(e).length:0},only:function(e){var t=cn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:cn},n_=K.__e;K.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}n_(e,t,n,r)};var bu=K.unmount;function zp(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Vp({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return zp(r,t,n)})),e}function Gp(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Gp(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Si(){this.__u=0,this.o=null,this.__b=null}function Wp(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Xp(e){var t,n,r,i=null;function o(s){if(t||(t=e()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw t;return i?dt(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Or(){this.i=null,this.l=null}K.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),bu&&bu(e)},(Si.prototype=new ve).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Wp(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Gp(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Si.prototype.componentWillUnmount=function(){this.o=[]},Si.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=zp(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&dt(Ht,null,e.fallback);return i&&(i.__u&=-33),[dt(Ht,null,t.__a?null:e.children),i]};var ku=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function r_(e){return this.getChildContext=function(){return e.context},e.children}function i_(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Li(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(i,o){this.childNodes.push(i),t.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}Li(dt(r_,{context:t.context},e.__v),t.v)}function Kp(e,t){var n=dt(i_,{__v:e,h:t});return n.containerInfo=t,n}(Or.prototype=new ve).__a=function(e){var t=this,n=Wp(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ku(t,e,r)):i()};n?n(o):o()}},Or.prototype.render=function(e){this.i=null,this.l=new Map;var t=cn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Or.prototype.componentDidUpdate=Or.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){ku(e,n,t)})};var qp=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,o_=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,s_=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,a_=/[A-Z0-9]/g,l_=typeof document!="undefined",c_=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function ac(e,t,n){return t.__k==null&&(t.textContent=""),Li(e,t),typeof n=="function"&&n(),e?e.__c:null}function Jp(e,t,n){return Bp(e,t),typeof n=="function"&&n(),e?e.__c:null}ve.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ve.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Lu=K.event;function u_(){}function d_(){return this.cancelBubble}function h_(){return this.defaultPrevented}K.event=function(e){return Lu&&(e=Lu(e)),e.persist=u_,e.isPropagationStopped=d_,e.isDefaultPrevented=h_,e.nativeEvent=e};var lc,p_={enumerable:!1,configurable:!0,get:function(){return this.class}},wu=K.vnode;K.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||l_&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||c_(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":s_.test(s)&&(s=l):l=s="oninput":o&&o_.test(s)?s=s.replace(a_,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=cn(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=cn(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",p_)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=qp,wu&&wu(e)};var Mu=K.__r;K.__r=function(e){Mu&&Mu(e),lc=e.__c};var Pu=K.diffed;K.diffed=function(e){Pu&&Pu(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),lc=null};var Zp={ReactCurrentDispatcher:{current:{readContext:function(e){return lc.__n[e.__c].props.value},useCallback:tt,useContext:cr,useDebugValue:Ql,useDeferredValue:ic,useEffect:G,useId:tc,useImperativeHandle:Mn,useInsertionEffect:sc,useLayoutEffect:ge,useMemo:Q,useReducer:vs,useRef:Z,useState:ot,useSyncExternalStore:nc,useTransition:oc}}};function Qp(e){return dt.bind(null,e)}function to(e){return!!e&&e.$$typeof===qp}function tf(e){return to(e)&&e.type===Ht}function ef(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function nf(e){return to(e)?JA.apply(null,arguments):e}function cc(e){return!!e.__k&&(Li(null,e),!0)}function rf(e){return e&&(e.base||e.nodeType===1&&e)||null}var of=function(e,t){return e(t)},uc=function(e,t){return e(t)},sf=Ht,af=to,pe={useState:ot,useId:tc,useReducer:vs,useEffect:G,useLayoutEffect:ge,useInsertionEffect:sc,useTransition:oc,useDeferredValue:ic,useSyncExternalStore:nc,startTransition:rc,useRef:Z,useImperativeHandle:Mn,useMemo:Q,useCallback:tt,useContext:cr,useDebugValue:Ql,version:"18.3.1",Children:Yp,render:ac,hydrate:Jp,unmountComponentAtNode:cc,createPortal:Kp,createElement:dt,createContext:Qi,createFactory:Qp,cloneElement:nf,createRef:Mp,Fragment:Ht,isValidElement:to,isElement:af,isFragment:tf,isMemo:ef,findDOMNode:rf,Component:ve,PureComponent:Go,memo:pn,forwardRef:Le,flushSync:uc,unstable_batchedUpdates:of,StrictMode:sf,Suspense:Si,SuspenseList:Or,lazy:Xp,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Zp};const lf=Object.freeze(Object.defineProperty({__proto__:null,Children:Yp,Component:ve,Fragment:Ht,PureComponent:Go,StrictMode:sf,Suspense:Si,SuspenseList:Or,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Zp,cloneElement:nf,createContext:Qi,createElement:dt,createFactory:Qp,createPortal:Kp,createRef:Mp,default:pe,findDOMNode:rf,flushSync:uc,forwardRef:Le,hydrate:Jp,isElement:af,isFragment:tf,isMemo:ef,isValidElement:to,lazy:Xp,memo:pn,render:ac,startTransition:rc,unmountComponentAtNode:cc,unstable_batchedUpdates:of,useCallback:tt,useContext:cr,useDebugValue:Ql,useDeferredValue:ic,useEffect:G,useErrorBoundary:function(e){var t=lr(hn++,10),n=ot();return t.__=e,ut.componentDidCatch||(ut.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:tc,useImperativeHandle:Mn,useInsertionEffect:sc,useLayoutEffect:ge,useMemo:Q,useReducer:vs,useRef:Z,useState:ot,useSyncExternalStore:nc,useTransition:oc,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var dc=Object.prototype.hasOwnProperty;function bt(e){return Array.isArray(e)}function Ve(e){return!(!e||typeof e!="object"||e instanceof Date||bt(e))}function f_(e){return Ve(e)&&e.constructor===Object}function J(e){return typeof e=="function"}function ne(e){const t=typeof e;return e!==void 0&&(rl(e)||t!=="object"&&t!=="function")}function rl(e){return e instanceof Date}function cf(e){return typeof e=="boolean"}function Be(e){return e instanceof Promise}function Ft(e){return e instanceof Map||e instanceof WeakMap}function fn(e){return e instanceof Set||e instanceof WeakSet}function Wo(e){if(!e)return!1;if(bt(e))return e.length===0;if(Ft(e)||fn(e))return e.size===0;for(const t in e)if(dc.call(e,t))return!1;return!0}var m_=new Set(["boolean","string","number"]);function Rs(e){return!!e.parent}var E_=Symbol.toPrimitive,A_=Symbol.iterator,$r=Symbol("getNode"),Is=Symbol("delete"),uf=Symbol("opaque"),__=Symbol("plain"),hc=Symbol("optimized"),wi=Symbol("linked"),Ct={pendingNodes:new Map,dirtyNodes:new Set};function Mi(e){return e&&(e[uf]||e.$$typeof)}function df(e){return e&&e[__]}function hf(e){return bt(e)?"array":Ft(e)?"map":e instanceof Set?"set":"object"}function g_(e,t){return Ft(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(Ct.replacer&&(t=Ct.replacer(e,t)),t)}var D_=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function O_(e,t){if(t){if(typeof t=="string"&&D_.test(t))return new Date(t);if(typeof t=="object"){if(t.__LSType==="Map")return new Map(t.value);if(t.__LSType==="Set")return new Set(t.value)}Ct.reviver&&(t=Ct.reviver(e,t))}return t}function pf(e){return e&&JSON.stringify(e,g_)}function ff(e){return e&&JSON.parse(e,O_)}function mf(e){return ff(pf(e))}function Tt(e){return!!e&&!!e[$r]}function eo(e){return e&&e[$r]}function Ef(e,t,n,r,i){return r?e.add(n):i?e.set(t,n):e[t]=n,n}function un(e,t){var n;const r=(n=e.parent)!=null?n:e,i=e.parent?e.key:"_",o=t===Is;o&&(t=void 0);const s=e.parent?pc(r):r.root,a=fn(s),l=Ft(s),c=a?i:l?s.get(i):s[i],u=J(t);if((t=r.isAssigning||!u||J(c)?t:t(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Ef(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:t,parentValue:s}}var xu=[];function pt(e){let t=0,n=e;for(;Rs(n);)xu[t++]=n.key,n=n.parent;let r=e.root._;for(let i=t-1;r&&i>=0;i--){const o=xu[i];r=o!=="size"&&Ft(r)?r.get(o):r[o]}return r}function we(e,t,n){var r,i;let o=(r=e.children)==null?void 0:r.get(t);return o||(o={root:e.root,parent:e,key:t,lazy:!0,numListenersRecursive:0},((i=e.lazyFn)==null?void 0:i.length)===1&&(n=e.lazyFn.bind(e,t)),J(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),e.children||(e.children=new Map),e.children.set(t,o)),o}function pc(e){let t=pt(e);if(!t||J(t))if(Rs(e)){const n=pc(e.parent),r=fn(n),i=Ft(n);t=Ef(n,e.key,{},r,i)}else t=e.root._={};return t}function Af(e,t){var n,r;let i=Tt(e)?void 0:Ve(e)?"id"in e?"id":"key"in e?"key":"_id"in e?"_id":"__id"in e?"__id":void 0:void 0;if(!i&&t.parent){const o=t.key+"_keyExtractor",s=(r=(n=t.functions)==null?void 0:n.get(o))!=null?r:pt(t.parent)[t.key+"_keyExtractor"];s&&J(s)&&(i=s)}return i}function Fu(e,t,n){e.functions||(e.functions=new Map),e.functions.set(t,n)}function _f(e,t){return e===t||rl(e)&&rl(t)&&+e==+t}function il(e,t,n,r){return t?void 0:e?r?Array.from(e):n?Array.from(e.keys()):Object.keys(e):[]}function S_(e,t){return e&&Object.defineProperty(e,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),e}var Hu=function(e){return S_(e,uf)};function gf(e,t){var n;e.isPlain||!((n=e.parent)!=null&&n.isPlain)&&!df(t)||(e.isPlain=!0)}function Ye(e,t,n,r){let i=e;return!Tt(i)&&J(i)&&(i=n?i(n):i()),Tt(i)&&!r?i.get(t):i}var Ti,T_=(e,t)=>e&&e[t];function Df(e,t,n,r,i,o,s){let a,l=e;if(t.length>0){let c=o;for(let u=0;u<t.length;u++){a=t[u];const d=Ft(l);let h=l?d?l.get(a):l[a]:void 0;const f=c?d?c.get(a):c[a]:void 0;if(h===Is)return c&&(d?l.set(a,f):l[a]=f,s==null||s(t.slice(0,u+1),f)),e;if(h===void 0&&r===void 0&&u===t.length-1)return e;u<t.length-1&&h==null&&(h=fc(n[u]),Ft(l)?l.set(a,h):l[a]=h),u<t.length-1&&(l=h,c&&(c=f))}}return a===void 0?e=i==="merge"?Xo(e,r):r:i==="merge"?l[a]=Xo(l[a],r):Ft(l)?l.set(a,r):l[a]=r,e}function Uu(e,t,n){let r=n;for(let i=0;i<e.length;i++){const o=e[i];r=r?r[o]:fc(t[i])}return r}function Bu(e){return!(!e||(Ve(e)||bt(e))&&Wo(e))}function fc(e){switch(e){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function v_(e,t,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return Df(e,r,s,o)}function Xo(e,...t){if(ne(e))return t[t.length-1];let n=bt(e)?[...e]:{...e};for(let r=0;r<t.length;r++){const i=t[r];if(f_(i)||bt(i)){const o=i;for(const s in o)dc.call(o,s)&&(o[s]instanceof Object&&!Tt(o[s])&&Object.keys(o[s]).length>0?n[s]=Xo(n[s]||(bt(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Ko=0,oa=!1,sa=!1,yr=new Map;function R_(){yr.size>0&&ti(!0)}function Of(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function I_(e,t){try{return function(n,r){for(let i=0;i<r.length;i++)n=v_(n,r[i]);return n}(e?mf(e):{},t)}catch(n){return}}function mc(e,t){return function(){return I_(e,t)}}function Pi(e,t,n,r,i){const o=new Map;qo(o,e,!!Ct.isLoadingLocal,!!Ct.isLoadingRemote,t,[],[],t,n,!0,r,i);const s=yr.get(e);s?s.prev===t?yr.delete(e):s.value=t:yr.set(e,{value:t,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Ct.isLoadingRemote,isFromPersist:!!Ct.isLoadingLocal}),o.size&&Sf(o,!0),Ko<=0&&Tf()}function qo(e,t,n,r,i,o,s,a,l,c,u,d){if(t.numListenersRecursive>0&&(function(h,f,p,m,E,A,_,O,S,T,b,v){if(T?f.listenersImmediate:f.listeners){const N={path:A,pathTypes:_,valueAtPath:O,prevAtPath:S},g=h.get(f);if(g&&A.length>0){const{changes:D}=g;Of(D[0].path,N.path)||(D.push(N),g.level=Math.min(g.level,b),g.whenOptimizedOnlyIf||(g.whenOptimizedOnlyIf=v))}else h.set(f,{level:b,value:E,isFromSync:m,isFromPersist:p,whenOptimizedOnlyIf:v,changes:[N]})}}(e,t,n,r,i,o,s,a,l,c,u,d),t.linkedFromNodes))for(const h of t.linkedFromNodes)qo(e,N_(h,o),n,r,a,[],[],a,l,c,0,d);if(t.parent){const h=t.parent;h&&qo(e,h,n,r,pt(h),[t.key].concat(o),[hf(i)].concat(s),a,l,c,u+1,d)}}function Sf(e,t){const n=new Set;e.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{const u=t?c.listenersImmediate:c.listeners;if(u){let d;const h=Array.from(u);for(let f=0;f<h.length;f++){const p=h[f],{track:m,noArgs:E,listener:A}=p;n.has(A)||(m===!0?i<=0:m!==hc||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:mc(o,r),changes:r}),m||n.add(A),A(d))}}})}function Tf(){const e=Array.from(Ct.dirtyNodes);Ct.dirtyNodes.clear(),e.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=yr;yr=new Map;const n=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{qo(n,c,s,a,r,[],[],r,i,!1,o,l)}),n.size&&Sf(n,!1)}function Vr(e){Ns();try{e()}finally{ti()}}function Ns(){Ko++,Ti||(Ti=setTimeout(R_,0))}function ti(e){(--Ko<=0||e)&&(oa?sa=!0:(Ti&&(clearTimeout(Ti),Ti=void 0),Ko=0,oa=!0,Tf(),oa=!1,sa&&(sa=!1,ti(!0))))}function N_(e,t){let n=e;for(let r=0;r<t.length;r++)n=we(n,t[r]);return n}function Ec(e,t,n,r,i){if(Tt(e))return e;const o=Be(e);let s={root:{_:e},lazy:!0,numListenersRecursive:0};J(e)&&(s=Object.assign(()=>{},s),s.lazyFn=e);var a;const l=t||(a=e,m_.has(typeof a))?new i(s):r(s);return o&&(un(s,void 0),n(s,e)),l}var Sr=new WeakMap,vf=[],Rf=[],If=[],Tr=0,ol=!1;function aa(e,t,n){const r=Sr.get(e);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(vf[Tr]=e,Rf[Tr]=t,If[Tr]=n,Tr++,ol||(ol=!0,queueMicrotask(C_)))}var li={type:"listener-added",node:null,listener:void 0,timestamp:0};function C_(){ol=!1;const e=typeof performance!="undefined"?performance.now():Date.now();li.timestamp=e;for(let t=0;t<Tr;t++){const n=vf[t],r=Rf[t],i=If[t],o=Sr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l)continue;let c=!1;if(c=i==="listener-added"?!!(a!=null&&a.has(r))||!!(l!=null&&l.has(r)):i==="listener-removed"?!(a!=null&&a.has(r))&&!(l!=null&&l.has(r)):!(a!=null&&a.size)&&!(l!=null&&l.size),c){li.type=i,li.node=n,li.listener=r;const u=Array.from(s);for(let d=0;d<u.length;d++)try{u[d](li)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}Tr=0}function Ln(e,t,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let c=s?e.listenersImmediate:e.listeners;c||(c=new Set,s?e.listenersImmediate=c:e.listeners=c);const u={listener:t,track:l,noArgs:a};if(c.add(u),o){const m=pt(e);t({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let d;function h(m,E=t,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||e),E||(E=t);const _={trackingType:!0,...n};d=[...d||[],Ln(m,E,_,r)]}}e.linkedToNode&&h(e.linkedToNode),(i=e.linkedFromNodes)==null||i.forEach(m=>h(m)),e.numListenersRecursive++;let f=e.parent,p=[e.key];for(;f;){if(f.linkedFromNodes)for(const m of f.linkedFromNodes)r!=null&&r.has(m)||h(m,y_(m,p,t),f);f.numListenersRecursive++,p=[f.key,...p],f=f.parent}return aa(e,u,"listener-added"),()=>{c.delete(u),d==null||d.forEach(E=>E());let m=e;for(;m;)m.numListenersRecursive--,m=m.parent;aa(e,u,"listener-removed"),c.size===0&&aa(e,void 0,"listeners-cleared")}}function y_(e,t,n){let r=Uu(t,[],pt(e));return function({value:i,isFromPersist:o,isFromSync:s}){const a=Uu(t,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function ju(e,t,n,r){let i=[];return e==null||e.forEach(o=>{const{node:s,track:a}=o;i.push(Ln(s,t,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var wo=0,$u=[],vr={current:void 0};function Mo(e,t){if(wo){const n=vr.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(e);r?(r.track=r.track||t,r.num++):n.nodes.set(e,{node:e,track:t,num:1})}}}function Nf(e,t,n,r,i,o){let s,a,l=t;$u.push(vr.current),wo++,vr.current={};const c=e&&Ye(e,n,r,i==null?void 0:i.fromComputed),u=vr.current.nodes;return--wo<0&&(wo=0),vr.current=$u.pop(),r!=null&&r.cancel||(s=ju(u,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=ju(u,l),s):void 0),{nodes:u,value:c,dispose:s,resubscribe:a}}function Yr(e,t,n){let r,i;J(t)?r=t:n=t;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,Ns(),delete s.value,i==null||i();const{dispose:l,value:c,nodes:u}=Nf(e,a,void 0,s,n);var d,h;i=l,s.value=c,s.nodes=u,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),ti(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=e)&&((h=d[$r])!=null&&h.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,c;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(c=s.onCleanupReaction)==null||c.call(s),s.onCleanupReaction=void 0,i==null||i()}}function Cf(e,t,n){if(Be(e))return t?e.then(t):e;const r=bt(e);let i,o;return Yr(function(s){const a=r?e.map(l=>Ye(l)):Ye(e);if(!Be(a)){{let l=!0;if(bt(a))for(let c=0;c<a.length;c++){let u=a[c];Tt(u)?u=Ye(u):J(u)&&(u=u()),l=l&&!!(n?Bu(u):u)}else l=n?Bu(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),Be(i)?t?i.then(t):i:i!==void 0?t?o:Promise.resolve(i):new Promise(s=>{if(t){const a=t;t=l=>{const c=a(l);s(Be(c)?c.then(u=>u):c)}}else t=s})}function yf(e,t){return Cf(e,t,!1)}var la=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Vu=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),b_=new Set(["filter","find"]),sl=new Map,al=new Map([["get",Cs],["set",Re],["peek",ei],["onChange",Ln],["assign",function(e,t){const n=ae(e);if(Ns(),ne(e.root._)&&(e.root._={}),Ft(t)){const r=pt(e);Ft(r)?t.forEach((i,o)=>r.set(o,i)):Re(e,t)}else{e.isAssigning=(e.isAssigning||0)+1;try{Object.assign(n,t)}finally{e.isAssigning--}}return ti(),n}],["delete",Lf],["toggle",function(e){const t=pt(e);(t==null||cf(t))&&Re(e,!t)}]]);function bf(e,t,n,...r){var i;if(n!=="push"||r.length!==1){const o=t.slice(),s=t[n].apply(t,r);if(e){const a=Rs(e),l=a?e.key:"_";(a?pt(e.parent):e.root)[l]=o,zr((i=e.parent)!=null?i:e,l,t)}return s}zr(e,t.length+"",r[0])}function Ac(e,t,n){var r,i,o;if(Ve(t)&&Mi(t)||Ve(n)&&Mi(n)){const T=t!==n;return T&&(e.listeners||e.listenersImmediate)&&Pi(e,t,n,0),T}const s=bt(t);let a,l;const c=Ft(t),u=fn(t),d=Ft(n),h=fn(n),f=il(t,s,c,u),p=il(n,s,d,h),m=((r=f||t)==null?void 0:r.length)||0,E=((i=p||n)==null?void 0:i.length)||0;let A,_,O,S=!1;if(s&&bt(n)){if(n.length>0){const T=n[0];if(T!==void 0&&(A=Af(T,e),A&&(_=J(A),a=new Map,l=[]),e.children))for(let b=0;b<n.length;b++){const v=n[b];if(v){const N=e.children.get(b+"");if(N&&(t[b]||Yu(N,v),A)){const g=_?A(v):v[A];a.set(g,N)}}}}}else if(n&&(!t||Ve(t))){const T=p.length;for(let b=0;b<T;b++){const v=p[b];if(!f.includes(v)){S=!0;const N=we(e,v),g=d?n.get(v):n[v];g!==void 0&&Yu(N,g)}}}if(t&&!ne(t)){S=S||m!==E;const T=S;let b=!1;for(let v=0;v<m;v++){const N=s?v+"":f[v];let g=c?t.get(N):t[N];const D=d?n==null?void 0:n.get(N):n==null?void 0:n[N];let k=!_f(g,D);if(k){const C=A&&g?_?A(g):g[A]:void 0,M=(o=e.children)==null?void 0:o.get(N);if(Tt(g)){const w=eo(g);if((M==null?void 0:M.linkedToNode)===w){const P=pt(w);c?t.set(N,P):t[N]=P;continue}const H=g;g=()=>H}let I=we(e,N,g);if(I.lazy||!J(g)&&!Tt(g)||(Pf(I,g),Qn(I)),s&&C!==void 0){const w=C!==void 0?a==null?void 0:a.get(C):void 0;if(w){if(w!==void 0&&w.key!==N){const H=n[w.key];T&&(I=w,e.children.delete(I.key),I.key=N,l.push([N,I])),b=!0,k=H!==g}}else S=!0}if(k)if(J(g)||Tt(g))Wr(e,N,g);else if(ne(g))S=!0;else{const w=Ac(I,g,D);S=S||w,k=w}(k||s&&!T)&&(I.listeners||I.listenersImmediate)&&Pi(I,g,D,0,!T)}}if(l)for(let v=0;v<l.length;v++){const[N,g]=l[v];e.children.set(N,g)}O=S||b}else n!==void 0&&(O=!0);return O!=null&&O}function Yu(e,t){var n,r;(n=e.linkedToNodeDispose)==null||n.call(e),(r=e.activatedObserveDispose)==null||r.call(e),ne(t)||Ac(e,void 0,t),(e.listeners||e.listenersImmediate)&&Pi(e,void 0,t,0)}function ae(e,t,n){return t!==void 0&&(e=we(e,t,n)),e.proxy||(e.proxy=new Proxy(e,kf))}function ll(){if(Ct.pendingNodes.size>0){const e=Array.from(Ct.pendingNodes.values());Ct.pendingNodes.clear(),e.forEach(t=>t())}}var kf={get(e,t,n){var r,i;if(t===E_)throw new Error("[legend-state] observable is not a primitive.");if(t===$r)return e;if(t==="apply"||t==="call"){const d=pt(e);if(J(d))return d[t]}let o=Qn(e,t==="get"||t==="peek");if(t===A_)return!o||ne(o)?void 0:o[t];const s=e.linkedToNode||(o==null?void 0:o[$r]);if(s&&t!=="onChange")return kf.get(s,t,n);if(Ft(o)||fn(o)){const d=function(h,f,p){const m=p==null?void 0:p[f];if(f==="size")return Mo(h,!0),p[f];if(J(m))return function(E,A,_){const O=arguments.length,S=p;if(f==="get"){if(O>0&&typeof E!="boolean"&&E!==hc)return ae(h,E)}else{if(f==="set")return O===2?Re(we(h,E),A):O===1&&Ft(p)&&Re(h,E),ae(h);if(f==="delete"){if(O>0){const b=p.get?S.get(E):E;return Lf(h,E),b!==void 0}}else{if(f==="clear"){const b=fn(S)?new Set(S):new Map(S),v=S.size;return S.clear(),void(v&&wf(h,p,b))}if(f==="add"){const b=new Set(p),v=p.add(E);return p.has(f)||Pi(h,v,b,0),ae(h)}}}const T=al.get(f);if(!T)return p[f](E,A);switch(O){case 0:return T(h);case 1:return T(h,E);case 2:return T(h,E,A);default:return T(h,E,A,_)}}}(e,t,o);if(d!==void 0)return d}const a=al.get(t);if(a)return t!=="get"&&t!=="peek"||ll(),function(d,h,f){switch(arguments.length){case 0:return a(e);case 1:return a(e,d);case 2:return a(e,d,h);default:return a(e,d,h,f)}};const l=sl.get(t);if(l)return l.get(e);let c=o==null?void 0:o[t];if(Ve(o)&&Mi(o))return c;const u=(r=e.functions)==null?void 0:r.get(t);if(u)return Tt(u)?u:ae(e,t,u);if(c=function(d,h){if(d){const f=Object.getOwnPropertyDescriptor(d,h);return f!=null&&f.get&&(delete d[h],d[h]=f.set?function(p){J(p)&&(p={get:p});const m=function(){return{[wi]:p}};return m.prototype[wi]=p,m}({get:f.get,set:({value:p})=>f.set(p)}):f.get),d[h]}}(o,t),function(d){return d==null}(o)&&c===void 0&&(la.has(t)||Vu.has(t))&&(o=[],la.has(t)&&un(e,o),c=o[t]),J(c)){if(bt(o)){if(la.has(t))return(...h)=>bf(e,o,t,...h);if(Vu.has(t))return Mo(e,!0),function(h,f){const p=t==="reduce",m=p?(_,O,S,T)=>h(_,ae(e,S+"",O),S,T):(_,O,S)=>h(ae(e,O+"",_),O,S);if(p||!b_.has(t))return o[t](m,f);const E=t==="find",A=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const O=ae(e,_+"");if(E)return O;A.push(O)}return E?void 0:A}}Wr(e,t,c);const d=(i=e.functions)==null?void 0:i.get(t);return d?ae(e,t,d):c.bind(o)}return ne(c)&&t==="length"&&bt(o)?(Mo(e,!0),c):ae(e,t)},getPrototypeOf(e){const t=pt(e);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(e){Qn(e);const t=Cs(e,!0);if(ne(t))return[];const n=t?Reflect.ownKeys(t):[];if(bt(t)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),J(e)){const r=Reflect.ownKeys(e);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(e,t){if(t==="caller"||t==="arguments"||t==="prototype")return{configurable:!1,enumerable:!1};const n=pt(e);if(ne(n))return;const r=Reflect.getOwnPropertyDescriptor(n,t);return r?{...r,configurable:!0}:void 0},set(e,t,n){if(e.isSetting)return Reflect.set(e,t,n);if(e.isAssigning)return zr(e,t,n),!0;const r=sl.get(t);return!!r&&(r.set(e,n),!0)},deleteProperty:(e,t)=>!!e.isSetting&&Reflect.deleteProperty(e,t),has(e,t){const n=pt(e);return Reflect.has(n,t)},apply(e,t,n){Tt(t)&&(t=t.peek());const r=pt(e),i=J(r)?r:e.lazyFn||e;return Reflect.apply(i,t,n)}};function Re(e,t){e.parent?zr(e.parent,e.key,t):zr(e,"_",t)}function zr(e,t,n,r){const i=!e.parent&&t==="_";gf(e,n),!e.parent||pt(e)||J(n)||Re(e,{[t]:n});const o=i?e:we(e,t,n);if(Tt(n))Jo(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=un(o,n),c=ne(a)||a instanceof Date||ne(s)||s instanceof Date;if(!c){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const u=!_f(s,a),d=!u&&o.isComputing&&!c&&!o.isPlain;!u&&!d||o.isComputing&&o.isPlain&&e.numListenersRecursive===0||wf(e,s,a,o,l,c,i,r,d),Wr(e,t,s)}}function Lf(e,t){t===void 0&&Rs(e)&&(t=e.key,e=e.parent);const n=pt(e);bt(n)?bf(e,n,"splice",t,1):zr(e,t!=null?t:"_",Is,-1)}function wf(e,t,n,r,i,o,s,a,l){r||(r=e),Ns(),o===void 0&&(o=ne(t));let c,u,d=l||o,h=!1;(!o||n&&!ne(n))&&(d=d||Ac(r,t,n),bt(t)?c=t:(Ft(t)||fn(t))&&(u=t)),bt(i)?c=i:(Ft(i)||fn(i))&&(u=i),c?h=(c==null?void 0:c.length)!==(n==null?void 0:n.length):u&&(h=(u==null?void 0:u.size)!==(n==null?void 0:n.size)),(o||!t||Wo(t)&&!Wo(n)?t!==n:d)&&Pi(o&&s?e:r,t,n,(a!=null?a:n===void 0)?-1:d?0:1,h),ti()}function Gr(e,t,n){const r=e.numGets=(e.numGets||0)+1;e.state||(e.state=Ec({isLoaded:!1},!1,Gr,ae)),t.then(i=>{r>=(e.getNumResolved||0)&&(e.getNumResolved=e.numGets,n?n({value:i}):Re(e,i),e.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{e.state.error.set(i)})}function Wr(e,t,n){if(Be(n)){const r=we(e,t);return Gr(r,n),void un(r,void 0)}if(Tt(n)){const r=()=>n;Fu(e,t,r);const i=we(e,t,r),o=ei(eo(n));return Jo(i,n),un(i,o),pt(i)}if(typeof n=="function")return Fu(e,t,n),t}function Cs(e,t){return Mo(e,t?Ve(t)?t.shallow:t:void 0),ei(e)}function ei(e){return Qn(e,!0)}var go=!1;function Qn(e,t){var n;if(go=!0,t&&((n=e.dirtyChildren)==null?void 0:n.size)){const i=Array.from(e.dirtyChildren);e.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Qn(o))}if(e.dirtyFn){const i=e.dirtyFn;e.dirtyFn=void 0,Ct.dirtyNodes.delete(e),i()}go=!1;let r=pt(e);return e.root.isLoadingLocal||e.isPlain||(r=function(i,o,s){const a=o,l=i.lazy;if(l){const c=i.lazyFn;if(delete i.lazy,J(c))if(c.length===1)o={};else{if(i.parent){const u=pt(i.parent);J(o)&&(u?delete u[i.key]:i.root._=void 0)}o=function(u,d){let h,f,p,m=!0;const E=d;let A,_,O=[];function S(){u.dirtyFn=_,Ct.dirtyNodes.add(u)}const T=Yr(()=>{var b,v,N,g;if(m)m=!1,J(pt(u))&&un(u,void 0);else if(!go&&_&&function(I,w){if(!go&&!function(P){var z,V;let Y=P,B=P.numListenersRecursive>0;for(;Y&&!B;)((z=Y.listeners)!=null&&z.size||(V=Y.listenersImmediate)!=null&&V.size)&&(B=!0),Y=Y.parent;return B}(I)){w&&(I.dirtyFn=w);let P=I;for(;P;)P.dirtyChildren||(P.dirtyChildren=new Set),P.dirtyChildren.add(I),P=P.parent;return!0}}(u,_))return void(p=!0);let D=E(),k=!1;const C=Tt(D);(C||u.linkedToNode)&&(k=C,D=Jo(u,D)),J(D)&&D.length===0&&(D=D());const M=C||D==null?void 0:D[wi];if(M&&(u.activationState=M,D=void 0),p=!1,f=Be(D),u.activated){if(u.activationState){const I=u.activationState;(v=(b=u.state)==null?void 0:b.peek())!=null&&v.sync?(u.state.sync(),p=!0):D=(g=(N=I.get)==null?void 0:N.call(I))!=null?g:I.initial}}else{u.activated=!0;let I=k_;M!=null&&M.synced&&(I=Ct.activateSyncedNode,p=!0);const w=I(u,D);h=w.update;let H=w.value;!k&&Tt(H)&&(H=Jo(u,H)),D=H!=null?H:M==null?void 0:M.initial}return p&&(A=D),f=f||Be(D),D},b=>{const{value:v,nodes:N,refresh:g}=b;if(_=g,!p){if(!f||!Ct.isLoadingRemote)if(f)if(u.activationState){const{initial:D}=u.activationState;v&&Be(v)&&Gr(u,v,h),J(pt(u))&&un(u,D!=null?D:void 0)}else u.activated&&(Gr(u,v,h),J(pt(u))&&un(u,void 0));else{A=v;const D=u.state.isLoaded.peek();!D&&J(v)||(u.isComputing=!0,Re(u,v),u.isComputing=!1),D||u.state.assign({isLoaded:!0,error:void 0})}O.forEach(D=>D()),O=[],N==null||N.forEach(({node:D,track:k})=>{O.push(Ln(D,S,{immediate:!0,trackingType:k}))})}b.cancel=!0},{fromComputed:!0});return u.activatedObserveDispose=()=>{T==null||T(),O.forEach(b=>b())},A}(i,c)}else Tt(o)&&(o=Wr(i.parent,i.key,o))}return gf(i,o),!l&&!i.needsExtract||i.isPlain||Tt(o)||ne(o)||(s&&function(c,u){if(!u.recursivelyAutoActivated&&(Ve(c)||bt(c))&&!Mi(c)){u.recursivelyAutoActivated=!0;const d=[];xf(c,d,()=>{var f;let p=u;for(let m=0;m<d.length;m++){const E=d[m],A=(f=pt(p))==null?void 0:f[E];p=we(p,E,J(A)?A:void 0),Qn(p)}return p})}}(o,i),i.parent&&Wr(i.parent,i.key,a)),o}(e,r,!!t)),r}function Mf(e){var t,n;(t=e.activatedObserveDispose)==null||t.call(e),(n=e.linkedToNodeDispose)==null||n.call(e),e.activatedObserveDispose=e.linkedToNodeDispose=e.linkedToNode=void 0}function Pf(e,t){Mf(e),e.lazyFn=t,e.lazy=!0}function k_(e,t){if(e.state||(e.state=Ec({isLoaded:!1},!1,Gr,ae)),e.activationState){const{set:n,get:r,initial:i}=e.activationState;if((t=r==null?void 0:r())!=null&&t!==null||(t=i),n){let o,s=[],a=0;const l=c=>{if(s.length>0){let u,d,h,f=!1,p=!1;c?(u=c.changes,d=c.value,f=c.isFromPersist,p=c.isFromSync,h=c.getPrevious):(u=s,d=o,h=mc(d,u)),s=[],o=void 0,Ct.pendingNodes.delete(e),a++;const m=a,E=()=>{m===a&&(e.isComputing=!0,n({value:d,changes:u,isFromPersist:f,isFromSync:p,getPrevious:h}),e.isComputing=!1)};Cf(e.state.isLoaded,E,!0)}};Ln(e,({value:c,changes:u})=>{e.isComputing||(u.length>1||!J(u[0].prevAtPath))&&(o=c,s.length>0&&(u=u.filter(d=>!Of(s[0].path,d.path))),s.push(...u),Ct.pendingNodes.set(e,l))},{immediate:!0}),Ln(e,l)}}return{update:({value:n})=>{e.isComputing||(e.isComputing=!0,Re(e,n),e.isComputing=!1)},value:t}}function Jo(e,t){var n;const r=t?eo(t):void 0;return r!==e&&(r==null?void 0:r.linkedToNode)!==e&&(e.linkedToNode=r,(n=e.linkedToNodeDispose)==null||n.call(e),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(e),e.linkedToNodeDispose=Ln(r,()=>{J(t=Qn(r))||Re(e,t)},{initial:!0},new Set([e])))),t}function xf(e,t,n){var r;if((Ve(e)||bt(e))&&!Mi(e)&&!df(e)){for(const i in e)if(dc.call(e,i)){const o=e[i];if(Tt(o)){const s=n();Wr(s,i,o),delete s.lazy}else{const s=J(o)&&((r=o.prototype)==null?void 0:r[wi]);if(s){const a=s.activate;(!a||a==="auto")&&ei(we(n(),i,o))}}typeof o=="object"&&(t.push(i),xf(o,t,n),t.pop())}}}var zu=["get","set","peek","onChange","toggle"];function br(e){this._node=e;for(let t=0;t<zu.length;t++){const n=zu[t];this[n]=this[n].bind(this)}}function Do(e,t){br.prototype[e]=function(...n){return t.call(this,this._node,...n)}}function It(e){return Ec(e,!1,Gr,ae,br)}Do("peek",e=>(ll(),ei(e))),Do("get",(e,t)=>(ll(),Cs(e,t))),Do("set",Re),Do("onChange",Ln),Object.defineProperty(br.prototype,$r,{configurable:!0,get(){return this._node}}),br.prototype.toggle=function(){const e=this.peek();(e==null||cf(e))&&this.set(!e)},br.prototype.delete=function(){return this.set(void 0),this};var ys={createPreviousHandler:mc,clone:mf,deactivateNode:Mf,deepMerge:Xo,ensureNodeValue:pc,findIDKey:Af,get:Cs,getChildNode:we,getKeys:il,getNode:eo,getNodeValue:pt,getPathType:hf,getProxy:ae,getValueAtPath:function(e,t){return t.reduce(T_,e)},globalState:Ct,initializePathType:fc,ObservablePrimitiveClass:br,observableProperties:sl,observableFns:al,optimized:hc,peek:ei,reactivateNode:Pf,registerMiddleware:function(e,t,n){let r=Sr.get(e);r||(r=new Map,Sr.set(e,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(n),()=>{const o=Sr.get(e);if(!o)return;const s=o.get(t);s&&(s.delete(n),s.size===0&&(o.delete(t),o.size===0&&Sr.delete(e)))}},safeParse:ff,safeStringify:pf,set:Re,setAtPath:Df,setNodeValue:un,symbolLinked:wi,symbolDelete:Is,tracking:vr},{globalState:Gu,observableProperties:L_,observableFns:w_,ObservablePrimitiveClass:Wu}=ys;class Ff extends Error{}function Xu(e,t){if(!e)throw new Ff(t!=null?t:"Assertion failed")}const ft=Object.assign(Xu,{is:function(e,t,n){return Xu(t,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(e){throw new Error("Unreachable")},defined:function(e){if(e==null)throw new Ff("Value is not defined")}});class bs{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new bs(t)}_emit(t,n){for(const r of this._handlers)r({level:t,data:n,timestamp:Date.now(),meta:this._meta})}error(...t){return this._emit("error",t)}warn(...t){return this._emit("warn",t)}info(...t){return this._emit("info",t)}log(...t){return this._emit("log",t)}trace(...t){return this._emit("trace",t)}registerHandler(t){return this._handlers.add(t),()=>this._handlers.delete(t)}}const Zo=new bs,je=new bs;function Ku(e,t,n){return e.clearRect(0,0,100,100),e.fillStyle=n,e.fillText(t,0,0),e.getImageData(0,0,1,1).data.join(",")}function qu(e){const t=function(){const i=document.createElement("canvas");i.width=i.height=1;const o=i.getContext("2d",{willReadFrequently:!0});return o.textBaseline="top",o.font='100px "Twemoji Mozilla","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',o.scale(.01,.01),o}(),n=Ku(t,e,"#fff"),r=Ku(t,e,"#000");return r===n&&!r.startsWith("0,0,0,")}const M_=Qi(null),ca={didCatch:!1,error:null};class Hf extends ve{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=ca}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(ca)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((c,u)=>!Object.is(c,l[u]))}(t.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(ca))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")a=n(l);else if(r)a=dt(r,l);else{if(i===void 0)throw s;a=i}}return dt(M_.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Oo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function P_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _c(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Uf={exports:{}},Ju={};const Bf=_c(lf);var Xr=Bf,x_=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},F_=Xr.useState,H_=Xr.useEffect,U_=Xr.useLayoutEffect,B_=Xr.useDebugValue;function ua(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!x_(e,n)}catch(r){return!0}}var j_=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=F_({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return U_(function(){i.value=n,i.getSnapshot=t,ua(i)&&o({inst:i})},[e,n,t]),H_(function(){return ua(i)&&o({inst:i}),e(function(){ua(i)&&o({inst:i})})},[e]),B_(n),n};Ju.useSyncExternalStore=Xr.useSyncExternalStore!==void 0?Xr.useSyncExternalStore:j_,Uf.exports=Ju;var $_=Uf.exports,Zu=!1,cl={inObserver:!1},Qu=void 0,V_=()=>Qu||(Qu=Qi(null));function td(e){const t=yf(e);if(!pe.use)throw t;pe.use(t)}function it(e,t){let n;if(cl.inObserver&&Tt(e)&&!(t!=null&&t.suspense))return n=Ye(e,t),t!=null&&t.suspense&&n===void 0&&td(e),n;try{const r=cr(V_()),i=Q(()=>function(l,c){let u,d,h,f,p,m,E=0;const A=()=>{d==null||d();const{value:O,dispose:S,resubscribe:T}=Nf(f,_,l,void 0,void 0,!0);return d=S,h=T,O},_=({value:O})=>{if(c!=null&&c.peek()){const S=m;m=O,S===void 0&&yf(()=>!c.get(),()=>{const T=m;m=void 0,_({value:T})})}else{let S=l==null?void 0:l.skipCheck;if(!S){const T=A();(T!==p||!ne(T)&&T===O)&&(S=!0)}S&&(E++,u==null||u())}};return{subscribe:O=>(u=O,!d&&h&&(d=h()),()=>{d==null||d(),d=void 0}),getVersion:()=>E,run:O=>(f=O,p=A())}}(t,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(e),$_.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&n===void 0&&td(e),n}var ed=typeof Symbol=="function"&&Symbol.for;function jf(e,t,n,r,i){const o=ed?Symbol.for("react.forward_ref"):Le(p=>null).$$typeof,s=ed?Symbol.for("react.memo"):pn(p=>null).$$typeof;if(e.__legend_proxied)return e;let a=!1,l=!1,c=e;s&&c.$$typeof===s&&c.type&&(l=!0,c=c.type),o&&c.$$typeof===o&&(a=!0,c=c.render);const u=r?new Set(r):void 0,d={apply(p,m,E){if(n){const A=E[0],_={},O=Object.keys(A);for(let S=0;S<O.length;S++){const T=O[S],b=A[T],v=u&&u.has(T);if(T==="children"&&(J(b)||Tt(b)))_[T]=it(b,{skipCheck:!0});else if(v||T.startsWith("$")||T.endsWith("$")){const N=v?T:T.endsWith("$")?T.slice(0,-1):T.slice(1),g=i==null?void 0:i[N],D=g&&Tt(b);if(_[N]=D&&(g!=null&&g.selector)?g.selector(_,b):it(b),D&&(g.defaultValue!==void 0&&_[N]===void 0&&(_[N]=g.defaultValue),g.handler&&g.getValue)){const k=C=>{var M;b.set(g.getValue(C)),(M=A[g.handler])==null||M.call(A,C)};_[g.handler]=tt(k,[A[g.handler],i])}v||delete _[T]}else _[T]===void 0&&(_[T]=b)}E[0]=_}return t?it(()=>{cl.inObserver=!0;try{return Reflect.apply(p,m,E)}finally{cl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(p,m,E)}},h=new Proxy(c,d);let f;return a?(f=Le(h),f.__legend_proxied=!0):f=h,t||l?pn(f):f}var{findIDKey:Y_,getNode:z_,optimized:G_}=ys,nd=new Map;function ul({each:e,optimized:t,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!e)return null;const a=it(()=>e.get(!t||G_));if(!n&&o){const c=Z();c.current=o,n=Q(()=>{return u=({item$:d,id:h})=>c.current(d,h),jf(u,!0);var u},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let c=nd.get(n);c||(c=pn(n),nd.set(n,c)),n=c}if(!a)return null;const l=[];if(bt(a)){const c=a[0],u=z_(e),d=a.length,h=d>0?u&&Y_(c,u)||(c.id!==void 0?"id":c.key!==void 0?"key":void 0):void 0,f=J(h);for(let p=0;p<d;p++)if(a[p]){const m=a[p],E=(s=f?h(m):m[h])!=null?s:p,A=e[p],_={key:E,id:E,item$:A,item:A};l.push(dt(n,r?Object.assign(_,r):_))}}else{const c=Ft(a),u=c?Array.from(a.keys()):Object.keys(a);i&&u.sort((d,h)=>i(c?a.get(d):a[d],c?a.get(h):a[h],d,h));for(let d=0;d<u.length;d++){const h=u[d];if(c?a.get(h):a[h]){const f=c?e.get(h):e[h],p={key:h,id:h,item$:f,item:f};l.push(dt(n,r?Object.assign(p,r):p))}}}return l}pn(function({children:e}){return it(()=>Ye(Ye(e)),{skipCheck:!0})},(e,t)=>!t.scoped||e.children===t.children);var rd=new Map,id=new Map;new Proxy({},{get(e,t){if(!e[t]){const n=rd.get(t)||t,r=Le((i,o)=>{const s={...i};return!o||!J(o)&&Wo(o)||(s.ref=o),dt(n,s)});e[t]=function(i,o,s){return jf(i,!1,!0,o,s)}(r,[],id.get(t))}return e[t]}}),function(e){(function(t){if(Zu)return;Zu=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);t({binders:{input:r,textarea:n,select:n}})})(e)}(function({components:e,binders:t}){if(e)for(const n in e)rd.set(n,e[n]);if(t)for(const n in t)id.set(n,t[n])});var W_=(e,t)=>{{const n=Z({num:0});G(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=e())!=null?r:null;if(s&&J(s))return i.dispose=s,()=>queueMicrotask(o)}},t)}};function $f(e){return W_(()=>{const t=e();if(!Be(t))return t},[])}var X_=$f;function Vf(e){return $f(()=>e)}var K_=Vf,{deactivateNode:q_}=ys;function Ie(e,t){var n;const r=Z({});r.current.value=e;const i=t?Ie(t):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?J(e)&&e.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),Ye(r.current.value)):e;r.current.obs$=It(o)}return i&&i.set(t),Vf(()=>{const o=r.current.obs$;if(o){const s=eo(o);q_(s)}}),r.current.obs$}function Kr(e,t,n,r){let i;J(t)?i=t:Array.isArray(t)?(r=t,n=void 0):n=t,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=Z({}),s=r?Ie(r):void 0;o.current.selector=e,o.current.reaction=i,s&&s.set(r),X_(()=>Yr(a=>{var l;return s==null||s.get(),Ye((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,c;return(c=(l=o.current).reaction)==null?void 0:c.call(l,a)},n))}const[Yf,ce]=qe(),[zf,no]=qe(),[Gf]=qe(),[gc,ro]=qe(),[J_,Z_]=qe(),[Wf,ct]=qe(),[Xf,io]=qe(),[Kf,qf]=qe(),[Jf,Q_]=qe(),[tg,Dc]=qe();function qe(){const e=Qi(void 0);return[e,()=>{const t=cr(e);return ft(t!==void 0),t}]}const kr={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"If you keep your browser tab open, you'll see this pop up when someone talks to you.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Only 10,000 characters are allowed.",ENTRYBOX_PLACEHOLDER:"Say something...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"This conversation is no longer active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"You can read, but not send messages.",MESSAGELIST_LOADING_OLDER:"Loading older messages...",MESSAGELIST_SHOW_OLDER:"Show older messages",MESSAGELIST_NEW_MARKER:"New",MESSAGE_SENT_VIA_EMAIL:"This message was sent via email",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"Uploading...",UPLOAD_SEND_FILE:"Send file",UPLOAD_SHARE_LOCATION:"Share location",UPLOAD_ERROR:"Unfortunately, something went wrong uploading. The file might be unsupported or too large.",SHARE_LOCATION_ERROR:"Cannot share location: ",LOADING:"Loading...",HUB_EMPTY:"Your chat history will show up here",HUB_SHOW_EARLIER:"Show earlier chats",INBOX_NO_CHATS_TITLE:"No chats yet!",INBOX_NO_CHATS_BODY:"Once you've had one or more conversations, they will show up here.",ENABLE_TRANSLATION:"Translate this conversation to English",DISABLE_TRANSLATION:"Show original",SEARCH_PLACEHOLDER_TEXT:"Search...",SEARCH_SEARCHING:"Searching...",SEARCH_NO_RESULTS:"No results found",SEARCH_NO_MORE_RESULTS:"No more results",CHAT_NOT_FOUND:"Chat not found",DELETE_MESSAGE:"Delete message",DELETION_EXPLANATION:"If you delete this message, it will disappear for everybody.",EDIT_MESSAGE:"Edit message",SAVE:"Save",EDITED_INDICATOR:"edited",REPLY_TO_MESSAGE:"Reply",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reactions with ${t}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(e,t)=>`Replying to ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode"}},od={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`إعلام ${e} التجريبي`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"إذا أبقيت علامة تبويب المتصفح مفتوحة ، فسترى هذا ينبثق عندما يتحدث شخص معك.",SEND_BUTTON_TEXT:"إرسال",ENTRYBOX_TEXT_LIMIT:"يُسمح فقط بـ 10.000 حرف.",ENTRYBOX_PLACEHOLDER:"قل شيئًا ...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"هذه المحادثة لم تعد نشطة.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"يمكنك القراءة ، لكن لا يمكنك إرسال الرسائل.",MESSAGELIST_LOADING_OLDER:"جارٍ تحميل الرسائل القديمة ...",MESSAGELIST_SHOW_OLDER:"عرض الرسائل الأقدم",MESSAGELIST_NEW_MARKER:"جديد",MESSAGE_SENT_VIA_EMAIL:"تم إرسال هذه الرسالة عبر البريد الإلكتروني",YOU_MARKER:"أنت",UPLOAD_IN_PROGRESS:"جارٍ التحميل ...",UPLOAD_SEND_FILE:"إرسال ملف",UPLOAD_SHARE_LOCATION:"مشاركة الموقع",UPLOAD_ERROR:"حدث خطأ ما في تحميل شيء. ربما يكون الملف غير متوافق أو كبير جدًا.",SHARE_LOCATION_ERROR:"لا يمكن مشاركة الموقع:",LOADING:"جارٍ التحميل ...",HUB_EMPTY:"سوف يظهر سجل الدردشات هنا",HUB_SHOW_EARLIER:"إظهار الدردشات السابقة",INBOX_NO_CHATS_TITLE:"لا توجد دردشات بعد!",INBOX_NO_CHATS_BODY:"بمجرد أن يكون لديك واحد أو أكثر من المحادثات ، سوف تظهر هنا.",ENABLE_TRANSLATION:"ترجم هذه المحادثة إلى العربية",DISABLE_TRANSLATION:"إظهار الأصلي",SEARCH_PLACEHOLDER_TEXT:"...بحث",SEARCH_SEARCHING:"...يتم الآن البحث",SEARCH_NO_RESULTS:"لم يتم العثور على نتائج",SEARCH_NO_MORE_RESULTS:"لا يوجد المزيد من النتائج",CHAT_NOT_FOUND:"لم يتم العثور على الدردشة",DELETE_MESSAGE:"احذف الرسالة",DELETION_EXPLANATION:"إذا قمت بحذف هذه الرسالة، فهي ستختفي للجميع.",EDIT_MESSAGE:"تعديل الرسالة",SAVE:"حفظ",EDITED_INDICATOR:"معدّلة",REPLY_TO_MESSAGE:"رد",ADD_REACTION:"أضف تفاعلاً",AUTH_EXPIRED_OVERLAY_TITLE:"انتهت جلسة الدردشة المخصصة لك",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"يُرجى إعادة تحميل الصفحة للمتابعة",VOICE_MESSAGE:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(e,t)=>`${e} تفاعل مع ${t}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(e,t)=>`الرد على ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо известие`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ако държите раздела на браузъра си отворен, ще видите този изскачащ прозорец, когато някой говори с вас.",SEND_BUTTON_TEXT:"Изпрати",ENTRYBOX_TEXT_LIMIT:"Разрешени са само до 10.000 знака.",ENTRYBOX_PLACEHOLDER:"Кажете нещо...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Този разговор вече не е активен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Можете да четете, но не и да изпращате съобщения.",MESSAGELIST_LOADING_OLDER:"Зареждане на по-стари съобщения...",MESSAGELIST_SHOW_OLDER:"Показване на по-стари съобщения",MESSAGELIST_NEW_MARKER:"Нови",MESSAGE_SENT_VIA_EMAIL:"Това съобщение беше изпратено по имейл",YOU_MARKER:"Вие",UPLOAD_IN_PROGRESS:"Качване...",UPLOAD_SEND_FILE:"Изпращане на файл",UPLOAD_SHARE_LOCATION:"Споделяне на местоположението",UPLOAD_ERROR:"За съжаление нещо се обърка при качването. Файлът може да не се поддържа или е твърде голям.",SHARE_LOCATION_ERROR:"Не може да се сподели местоположението: ",LOADING:"Зареждане...",HUB_EMPTY:"Историята на вашите разговори ще се покаже тук",HUB_SHOW_EARLIER:"Показване на по-ранни чатове",INBOX_NO_CHATS_TITLE:"Все още нямате разговори!",INBOX_NO_CHATS_BODY:"След като проведете един или повече разговори, те ще се покажат тук.",ENABLE_TRANSLATION:"Преведете този разговор на български",DISABLE_TRANSLATION:"Показване на оригинал",SEARCH_PLACEHOLDER_TEXT:"Търсене...",SEARCH_SEARCHING:"Търсене...",SEARCH_NO_RESULTS:"Няма намерени резултати",SEARCH_NO_MORE_RESULTS:"Няма повече резултати",CHAT_NOT_FOUND:"Чатът не е намерен",DELETE_MESSAGE:"Изтриване на съобщение",DELETION_EXPLANATION:"Ако изтриете това съобщение, то ще изчезне за всички.",EDIT_MESSAGE:"Редактиране на съобщението",SAVE:"Запиши",EDITED_INDICATOR:"редактирано",REPLY_TO_MESSAGE:"Отговори",ADD_REACTION:"Добави реакция",AUTH_EXPIRED_OVERLAY_TITLE:"Вашата чат сесия е изтекла",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновете страницата, за да продължите",VOICE_MESSAGE:"Гласово съобщение",CONTACT_INFORMATION_HIDDEN:"Скрита информация",LEAVE_CONVERSATION:"Напускане на разговора",MARK_CONVERSATION_AS_UNREAD:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакции с ${t}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(e,t)=>`Отговор на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na bosanski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, ona će nestati za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Sačuvati",EDITED_INDICATOR:"uređeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša chat sesija je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu da nastavite",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificació de demostració de ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si mantens la pestanya del navegador oberta, veuràs aquesta notificació quan algú et parli.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Només es permeten 10.000 caràcters.",ENTRYBOX_PLACEHOLDER:"Digues alguna cosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Aquesta conversa ja no està activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Pots llegir, però no enviar missatges.",MESSAGELIST_LOADING_OLDER:"Carregant missatges antics...",MESSAGELIST_SHOW_OLDER:"Mostrar missatges més antics",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Aquest missatge s'ha enviat per correu electrònic",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"S'està pujant...",UPLOAD_SEND_FILE:"Enviar arxiu",UPLOAD_SHARE_LOCATION:"Compartir ubicació",UPLOAD_ERROR:"Desafortunadament, alguna cosa ha anat malament en pujar. L'arxiu pot ser no compatible o massa gran.",SHARE_LOCATION_ERROR:"No es pot compartir la ubicació: ",LOADING:"Carregant...",HUB_EMPTY:"El teu historial de xat apareixerà aquí",HUB_SHOW_EARLIER:"Mostra xats anteriors",INBOX_NO_CHATS_TITLE:"Encara no hi ha xats!",INBOX_NO_CHATS_BODY:"Un cop hagis tingut una o més converses, apareixeran aquí.",ENABLE_TRANSLATION:"Traduir aquesta conversa al català",DISABLE_TRANSLATION:"Mostrar original",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Buscant...",SEARCH_NO_RESULTS:"No s'han trobat resultats",SEARCH_NO_MORE_RESULTS:"No hi ha més resultats",CHAT_NOT_FOUND:"Xat no trobat",DELETE_MESSAGE:"Esborrar missatge",DELETION_EXPLANATION:"Si esborres aquest missatge, desapareixerà per a tothom.",EDIT_MESSAGE:"Editar missatge",SAVE:"Desar",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Respondre",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaccions amb ${t}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(e,t)=>`Responent a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notifikace`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Pokud necháte kartu prohlížeče otevřenou, uvidíte tento popup jakmile s vámi bude někdo mluvit.",SEND_BUTTON_TEXT:"Odeslat",ENTRYBOX_TEXT_LIMIT:"Je povoleno Maximálně 10.000 znaků.",ENTRYBOX_PLACEHOLDER:"Napište něco...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tato konverzace již není aktivní.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Můžete číst, ale nemůžete posílat zprávy.",MESSAGELIST_LOADING_OLDER:"Nahrávám starší zprávy...",MESSAGELIST_SHOW_OLDER:"Zobrazit starší zprávy",MESSAGELIST_NEW_MARKER:"Nové",MESSAGE_SENT_VIA_EMAIL:"Tato zpráva byla odeslána přes mail.",YOU_MARKER:"vy",UPLOAD_IN_PROGRESS:"Nahrávám...",UPLOAD_SEND_FILE:"Poslat soubor",UPLOAD_SHARE_LOCATION:"Sdílet pozici",UPLOAD_ERROR:"Nepodařilo se nahrát soubor. Ten je buď nepodporován a/nebo příliš velký.",SHARE_LOCATION_ERROR:"Není možné sdílet pozici: ",LOADING:"Nahrávám...",HUB_EMPTY:"Vaše historie se zde zobrazí",HUB_SHOW_EARLIER:"Zobrazit dřívější konverzace",INBOX_NO_CHATS_TITLE:"Zatím zde nejsou žádné konverzace!",INBOX_NO_CHATS_BODY:"Jakmile budete mít jednu nebo více konverzací, objeví se zde.",ENABLE_TRANSLATION:"Přeložit tuto konverzaci do češtiny",DISABLE_TRANSLATION:"Zobrazit původní",SEARCH_PLACEHOLDER_TEXT:"Hledat...",SEARCH_SEARCHING:"Hledání...",SEARCH_NO_RESULTS:"Nenašly se žádné výsledky",SEARCH_NO_MORE_RESULTS:"Žádné další výsledky",CHAT_NOT_FOUND:"Chat nenalezen",DELETE_MESSAGE:"Smazat zprávu",DELETION_EXPLANATION:"Pokud tuto zprávu smažete, zmizí pro všechny.",EDIT_MESSAGE:"Upravit zprávu",SAVE:"Uložit",EDITED_INDICATOR:"upraveno",REPLY_TO_MESSAGE:"Odpovědět",ADD_REACTION:"Reagovat",AUTH_EXPIRED_OVERLAY_TITLE:"Váš chat byl kvůli nečinnosti odpojen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Pro pokračování obnovte stránku",VOICE_MESSAGE:"Hlasová zpráva",CONTACT_INFORMATION_HIDDEN:"Skrytá informace",LEAVE_CONVERSATION:"Opustit konverzaci",MARK_CONVERSATION_AS_UNREAD:"Označit jako nepřečtené",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcí s ${t}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(e,t)=>`Odpověď na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demomeddelelse`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder dit browser-faneblad åben, vil du se det her komme op, når nogen taler til dig.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tilladt.",ENTRYBOX_PLACEHOLDER:"Sig noget...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke længere aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan læse, men ikke sende beskeder.",MESSAGELIST_LOADING_OLDER:"Indlæser ældre beskeder...",MESSAGELIST_SHOW_OLDER:"Vis ældre beskeder",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne besked blev sendt via e-mail",YOU_MARKER:"dig",UPLOAD_IN_PROGRESS:"Overfører...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del placering",UPLOAD_ERROR:"Der er sket noget forkert ved upload. Filen kan ikke understøttes eller filen er for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele placering: ",LOADING:"Indlæser...",HUB_EMPTY:"Dine samtaler vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats endnu!",INBOX_NO_CHATS_BODY:"Når du har haft en eller flere samtaler, vises de her.",ENABLE_TRANSLATION:"Oversæt denne konversation til dansk",DISABLE_TRANSLATION:"Vis den oprindelige",SEARCH_PLACEHOLDER_TEXT:"Søg...",SEARCH_SEARCHING:"Søger...",SEARCH_NO_RESULTS:"Ingen resultater fundet",SEARCH_NO_MORE_RESULTS:"Ikke flere resultater",CHAT_NOT_FOUND:"Chat ikke fundet",DELETE_MESSAGE:"Slet besked",DELETION_EXPLANATION:"Hvis du sletter denne besked, vil ingen kunne se den.",EDIT_MESSAGE:"Rediger besked",SAVE:"Gem",EDITED_INDICATOR:"redigeret",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Tilføj reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession er udløbet",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Opdater siden for at fortsætte",VOICE_MESSAGE:"Talebesked",CONTACT_INFORMATION_HIDDEN:"Skjulte oplysninger",LEAVE_CONVERSATION:"Forlad samtale",MARK_CONVERSATION_AS_UNREAD:"Marker som ulæst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} Demo-Benachrichtigung`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Wenn Sie Ihre Browser-Registerkarte geöffnet lassen, wird dies angezeigt, wenn jemand mit Ihnen spricht.",SEND_BUTTON_TEXT:"Senden",ENTRYBOX_TEXT_LIMIT:"Nur 10.000 Zeichen sind erlaubt.",ENTRYBOX_PLACEHOLDER:"Sag etwas...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Diese Konversation ist nicht mehr aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sie können Nachrichten lesen, aber nicht senden.",MESSAGELIST_LOADING_OLDER:"Ältere Nachrichten werden geladen...",MESSAGELIST_SHOW_OLDER:"Zeige ältere Nachrichten",MESSAGELIST_NEW_MARKER:"Neu",MESSAGE_SENT_VIA_EMAIL:"Diese Nachricht wurde per E-Mail gesendet",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Hochladen...",UPLOAD_SEND_FILE:"Datei senden",UPLOAD_SHARE_LOCATION:"Standort teilen",UPLOAD_ERROR:"Beim Hochladen ist ein Fehler aufgetreten. Die Datei ist möglicherweise nicht unterstützt oder zu groß.",SHARE_LOCATION_ERROR:"Standort kann nicht freigegeben werden: ",LOADING:"Laden...",HUB_EMPTY:"Ihr Chat-Verlauf wird hier angezeigt",HUB_SHOW_EARLIER:"Zeige frühere Chats",INBOX_NO_CHATS_TITLE:"Noch keine Chats!",INBOX_NO_CHATS_BODY:"Sobald Sie eine oder mehrere Unterhaltungen geführt haben, werden sie hier angezeigt.",ENABLE_TRANSLATION:"Dieses Gespräch auf Deutsch übersetzen",DISABLE_TRANSLATION:"Originaltext anzeigen",SEARCH_PLACEHOLDER_TEXT:"Suche...",SEARCH_SEARCHING:"Suchen...",SEARCH_NO_RESULTS:"Keine Suchergebnisse gefunden",SEARCH_NO_MORE_RESULTS:"Keine weiteren Suchergebnisse",CHAT_NOT_FOUND:"Chat nicht gefunden",DELETE_MESSAGE:"Nachricht löschen",DELETION_EXPLANATION:"Wenn Sie diese Nachricht löschen, wird sie für alle verschwinden.",EDIT_MESSAGE:"Nachricht bearbeiten",SAVE:"Speichern",EDITED_INDICATOR:"bearbeitet",REPLY_TO_MESSAGE:"Antworten",ADD_REACTION:"Reaktion hinzufügen",AUTH_EXPIRED_OVERLAY_TITLE:"Ihre Chatsitzung ist abgelaufen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Laden Sie zum Fortfahren die Seite neu",VOICE_MESSAGE:"Sprachnachricht",CONTACT_INFORMATION_HIDDEN:"Geschützte Angaben",LEAVE_CONVERSATION:"Unterhaltung verlassen",MARK_CONVERSATION_AS_UNREAD:"als ungelesen markieren",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktionen mit ${t}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(e,t)=>`Antworten an ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} Δοκιμαστική επίδειξη`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Αν διατηρήσετε ανοιχτή τη σελίδα του προγράμματος περιήγησης, θα δείτε αυτό το pop up (παράθυρο) όταν κάποιος σας μιλάει.",SEND_BUTTON_TEXT:"Αποστολή",ENTRYBOX_TEXT_LIMIT:"Επιτρέπονται μόνο 10.000 χαρακτήρες.",ENTRYBOX_PLACEHOLDER:"Πείτε κάτι...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Αυτή η συζήτηση δεν είναι πλέον ενεργή.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Μπορείτε να διαβάσετε αλλά δεν μπορείτε να στείλετε μηνύματα.",MESSAGELIST_LOADING_OLDER:"Φόρτωση παλαιοτέρων μηνυμάτων...",MESSAGELIST_SHOW_OLDER:"Εμφάνιση παλαιότερων μηνυμάτων",MESSAGELIST_NEW_MARKER:"Νέο",MESSAGE_SENT_VIA_EMAIL:"Αυτό το μήνυμα εστάλη μέσω ηλεκτρονικού ταχυδρομείου",YOU_MARKER:"Εσείς",UPLOAD_IN_PROGRESS:"Ανέβασμα...",UPLOAD_SEND_FILE:"Αποστολή αρχείου",UPLOAD_SHARE_LOCATION:"Κοινή χρήση τοποθεσίας",UPLOAD_ERROR:"Κάτι πήγε στραβά κατά τη φόρτωση. Το αρχείο ενδέχεται να μην υποστηρίζεται ή να είναι υπερβολικά μεγάλο.",SHARE_LOCATION_ERROR:"Δεν είναι δυνατή η χρήση κοινής τοποθεσίας: ",LOADING:"Φόρτωση...",HUB_EMPTY:"Το ιστορικό των συνομιλιών σας θα εμφανιστεί εδώ",HUB_SHOW_EARLIER:"Εμφάνιση προηγούμενων συνομιλιών",INBOX_NO_CHATS_TITLE:"Δεν υπάρχουν ακόμα συζητήσεις!",INBOX_NO_CHATS_BODY:"Μόλις έχετε μία ή περισσότερες συνομιλίες, θα εμφανιστούν εδώ.",ENABLE_TRANSLATION:"Μετάφραση αυτής της συνομιλίας στα ελληνικά",DISABLE_TRANSLATION:"Προβολή πρωτοτύπου",SEARCH_PLACEHOLDER_TEXT:"Αναζήτηση...",SEARCH_SEARCHING:"Αναζήτηση...",SEARCH_NO_RESULTS:"Δεν βρέθηκαν αποτελέσματα",SEARCH_NO_MORE_RESULTS:"Δεν υπάρχουν περισσότερα αποτελέσματα",CHAT_NOT_FOUND:"Η συνομιλία δεν βρέθηκε",DELETE_MESSAGE:"Διαγραφή μηνύματος",DELETION_EXPLANATION:"Εάν διαγράψετε αυτό το μήνυμα, θα εξαφανιστεί για όλους.",EDIT_MESSAGE:"Επεξεργασία μηνύματος",SAVE:"Αποθήκευση",EDITED_INDICATOR:"επεξεργασμένο",REPLY_TO_MESSAGE:"Απάντηση",ADD_REACTION:"Προσθήκη αντίδρασης",AUTH_EXPIRED_OVERLAY_TITLE:"Η συνεδρία της συνομιλίας σας έχει λήξει",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ανανεώστε τη σελίδα για να συνεχίσετε",VOICE_MESSAGE:"Ηχητικό μήνυμα",CONTACT_INFORMATION_HIDDEN:"Κρυμμένες πληροφορίες",LEAVE_CONVERSATION:"Αποσυρθείτε από τη συζήτηση",MARK_CONVERSATION_AS_UNREAD:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(e,t)=>`${e} αντιδράσεις με ${t}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(e,t)=>`Απάντηση στον ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης"}},en:kr,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} notificación de prueba`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si dejas esta pestaña abierta, verás este pop up cuando alguien te hable.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Sólo 10.000 caracteres permitidos.",ENTRYBOX_PLACEHOLDER:"Escribe algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversación ya no está activa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puedes leer pero no enviar mensajes.",MESSAGELIST_LOADING_OLDER:"Cargando mensajes pasados...",MESSAGELIST_SHOW_OLDER:"Ver mensajes pasados",MESSAGELIST_NEW_MARKER:"Nuevo",MESSAGE_SENT_VIA_EMAIL:"Este mensaje ha sido enviado vía email",YOU_MARKER:"tú",UPLOAD_IN_PROGRESS:"Subir...",UPLOAD_SEND_FILE:"Enviar archivo",UPLOAD_SHARE_LOCATION:"Compartir ubicación",UPLOAD_ERROR:"Ocurrió un problema subiendo el archivo. Puede que el archivo esté en un formato no soportado o que sea demasiado grande.",SHARE_LOCATION_ERROR:"No se logró compartir la ubicación: ",LOADING:"Cargando...",HUB_EMPTY:"Tu historial de conversaciones se mostrará aquí",HUB_SHOW_EARLIER:"Ver conversaciones pasadas",INBOX_NO_CHATS_TITLE:"¡Aún sin conversaciones!",INBOX_NO_CHATS_BODY:"Una vez que tengas una o más conversaciones, se mostrarán aquí.",ENABLE_TRANSLATION:"Traducir esta conversación al español",DISABLE_TRANSLATION:"Mostrar la conversación original",SEARCH_PLACEHOLDER_TEXT:"Buscar...",SEARCH_SEARCHING:"Buscando...",SEARCH_NO_RESULTS:"No se encontraron resultados",SEARCH_NO_MORE_RESULTS:"No hay más resultados",CHAT_NOT_FOUND:"Chat no encontrado",DELETE_MESSAGE:"Eliminar mensaje",DELETION_EXPLANATION:"Este mensaje desaparecerá para todos si lo borras.",EDIT_MESSAGE:"Editar mensaje",SAVE:"Guardar",EDITED_INDICATOR:"editado",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Añadir reacción",AUTH_EXPIRED_OVERLAY_TITLE:"Su sesión de chat ha expirado",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualice la página para continuar",VOICE_MESSAGE:"Mensaje de voz",CONTACT_INFORMATION_HIDDEN:"Información oculta",LEAVE_CONVERSATION:"Abandonar conversación",MARK_CONVERSATION_AS_UNREAD:"Marcar como no leída",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacciones con ${t}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(e,t)=>`Respondiendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo teavitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Kui hoiate oma brauseri vahekaardi lahti ja näete seda hüpikakent, siis keegi soovib Teiega rääkida.",SEND_BUTTON_TEXT:"Saada",ENTRYBOX_TEXT_LIMIT:"Ainult kuni 10.000 tähemärki on lubatud.",ENTRYBOX_PLACEHOLDER:"Kirjuta midagi...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"See vestlus ei ole enam aktiivne.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Sa saad lugeda teateid, aga mitte kirjutada.",MESSAGELIST_LOADING_OLDER:"Laen vanemaid teateid...",MESSAGELIST_SHOW_OLDER:"Näita vanemaid teateid",MESSAGELIST_NEW_MARKER:"Uus",MESSAGE_SENT_VIA_EMAIL:"See teade on saadetud e-postiga",YOU_MARKER:"Sina",UPLOAD_IN_PROGRESS:"Laen...",UPLOAD_SEND_FILE:"Saada fail",UPLOAD_SHARE_LOCATION:"Jaga faili asukohta",UPLOAD_ERROR:"Nüüd läks midagi nihu, seoses faili ülesse laadimisega. Tundmatu fail või liiga suur.",SHARE_LOCATION_ERROR:"Ei suuda jagada faili asukohta: ",LOADING:"Laen...",HUB_EMPTY:"Siin on Sinu vestluste ajalugu",HUB_SHOW_EARLIER:"Näita vanemaid vestlusi",INBOX_NO_CHATS_TITLE:"Pole ühtegi vestlust!",INBOX_NO_CHATS_BODY:"Kui Sul tekib üks või rohkem vestlust, siis on need kuvatakse siin.",ENABLE_TRANSLATION:"Tõlgi see vestlus eesti keelde",DISABLE_TRANSLATION:"Näita algteksti",SEARCH_PLACEHOLDER_TEXT:"Otsi...",SEARCH_SEARCHING:"Otsin...",SEARCH_NO_RESULTS:"Otsingu tulemused puuduvad",SEARCH_NO_MORE_RESULTS:"Rohkem tulemusi ei ole ",CHAT_NOT_FOUND:"Vestlust ei leitud",DELETE_MESSAGE:"Kustuta sõnum",DELETION_EXPLANATION:"Kui kustutate selle sõnumi, kaob see kõigi jaoks.",EDIT_MESSAGE:"Redigeeri sõnumit",SAVE:"Salvesta",EDITED_INDICATOR:"muudetud",REPLY_TO_MESSAGE:"Vasta",ADD_REACTION:"Lisa reaktsioon",AUTH_EXPIRED_OVERLAY_TITLE:"Teie vestlussessioon on lõppenud",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Jätkamiseks värskendage lehte",VOICE_MESSAGE:"Häälsõnum",CONTACT_INFORMATION_HIDDEN:"Varjatud informatsioon",LEAVE_CONVERSATION:"Lahku vestlusest",MARK_CONVERSATION_AS_UNREAD:"Märgi mitteloetuks",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktsiooni (${t})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(e,t)=>`Vastamine kasutajale ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`نوتیفیکیشن دمو ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"اگر صفحه ی مرورگر را باز نگهدارید این را موقعه ای که کسی با شما صحبت کند خواهید دید",SEND_BUTTON_TEXT:"بفرست",ENTRYBOX_TEXT_LIMIT:"فقط ۱۰،۰۰۰ حروف مجاز می باشد.",ENTRYBOX_PLACEHOLDER:"...چیزی بنویسید",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:".این مکالمه دیگر فعال نمی باشد",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"شما می توانید بخوانید اما نمی توانید پیام بفرستید",MESSAGELIST_LOADING_OLDER:"...در حال بارگذاری پیام های قدیمی تر",MESSAGELIST_SHOW_OLDER:"نشان دادن پیام های قدیمی",MESSAGELIST_NEW_MARKER:"جدید",MESSAGE_SENT_VIA_EMAIL:"پیام توسط ایمل ارسال شد",YOU_MARKER:"شما",UPLOAD_IN_PROGRESS:"...در حال بارگذاری",UPLOAD_SEND_FILE:"فرستادن پوشه",UPLOAD_SHARE_LOCATION:"اشتراک گذاری مکان",UPLOAD_ERROR:"متاسفانه بارگذاری با مشکل روبه رو شد. ممکن است فایل حجیم باشد یا ساپورت نشده باشد.",SHARE_LOCATION_ERROR:"خطا در اشتراک گذاری مکان: ",LOADING:"...بارگذاری",HUB_EMPTY:"تاریخچه گفتگو اینجا نمایان می شود",HUB_SHOW_EARLIER:"دیدن گفتگو های قبلی",INBOX_NO_CHATS_TITLE:"هنوز گفتگویی وجود ندارد",INBOX_NO_CHATS_BODY:"بعد از داشتن یک مکالمه یا بیشتر، آنها اینجا نمایان می شوند.",ENABLE_TRANSLATION:"این مکالمه را به فارسی ترجمه کن",DISABLE_TRANSLATION:"زبان اصلی را نشان بده",SEARCH_PLACEHOLDER_TEXT:"...جستجو",SEARCH_SEARCHING:"...در حال جستجو",SEARCH_NO_RESULTS:"نتیجه ای یافت نشد",SEARCH_NO_MORE_RESULTS:"نتیجه بیشتری وجود ندارد",CHAT_NOT_FOUND:"مکالمه پیدا نشد",DELETE_MESSAGE:"حذف پیام ",DELETION_EXPLANATION:"اگر این پیام را حذف کنید، برای همه ناپدید می شود.",EDIT_MESSAGE:"ویرایش پیام",SAVE:"ذخیره",EDITED_INDICATOR:"ویرایششده",REPLY_TO_MESSAGE:"پاسخ دادن",ADD_REACTION:"واکنش را اضافه کنید",AUTH_EXPIRED_OVERLAY_TITLE:"جلسه چت شما منقضی شده است",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"برای ادامه صفحه را بازخوانی کنید",VOICE_MESSAGE:"پیام صوتی",CONTACT_INFORMATION_HIDDEN:"اطلاعات پنهان",LEAVE_CONVERSATION:"خروج از گفتگو",MARK_CONVERSATION_AS_UNREAD:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(e,t)=>`${e} واکنش با ${t}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(e,t)=>`در حال پاسخ به ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo ilmoitus`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jos pidät tämän sivun auki, näet vastaavan ilmoituksen kun joku puhuu sinulle.",SEND_BUTTON_TEXT:"Lähetä",ENTRYBOX_TEXT_LIMIT:"Maksimissaan 10000 merkkiä.",ENTRYBOX_PLACEHOLDER:"Sano jotain...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Tämä keskustelu ei ole enää aktiivinen.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Voit lukea, mutta et lähettää viestejä.",MESSAGELIST_LOADING_OLDER:"Ladataan vanhoja viestejä..",MESSAGELIST_SHOW_OLDER:"Näytä vanhat viestit",MESSAGELIST_NEW_MARKER:"Uusi",MESSAGE_SENT_VIA_EMAIL:"Tämä viesti on lähetetty sähköpostin välityksellä",YOU_MARKER:"sinä",UPLOAD_IN_PROGRESS:"Ladataan...",UPLOAD_SEND_FILE:"Lähetä tiedosto",UPLOAD_SHARE_LOCATION:"Jaa sijainti",UPLOAD_ERROR:"Valitettavasti jokin meni vikaan. Tiedostotyyppiä ei ehkä tueta tai se saattaa olla liian suuri.",SHARE_LOCATION_ERROR:"Sijaintia ei pystytty jakamaan: ",LOADING:"Ladataan...",HUB_EMPTY:"Keskusteluhistoriasi näkyy tässä",HUB_SHOW_EARLIER:"Näytä aiemmat keskustelut",INBOX_NO_CHATS_TITLE:"Ei keskusteluja, vielä!",INBOX_NO_CHATS_BODY:"Kun olet käynyt yhden tai useamman keskustelun, ne näkyvät täällä.",ENABLE_TRANSLATION:"Käännä keskustelu kielelle suomi",DISABLE_TRANSLATION:"Näytä alkuperäinen",SEARCH_PLACEHOLDER_TEXT:"Etsi...",SEARCH_SEARCHING:"Etsiminen...",SEARCH_NO_RESULTS:"Tuloksia ei löytynyt",SEARCH_NO_MORE_RESULTS:"Ei enempää tuloksia",CHAT_NOT_FOUND:"Keskustelua ei löytynyt",DELETE_MESSAGE:"Poista viesti",DELETION_EXPLANATION:"Jos poistat tämän viestin, se häviää kaikilta.",EDIT_MESSAGE:"Muokkaa viestiä",SAVE:"Tallenna",EDITED_INDICATOR:"muokattu",REPLY_TO_MESSAGE:"Vastaa",ADD_REACTION:"Lisää reaktio",AUTH_EXPIRED_OVERLAY_TITLE:"Istuntosi on vanhentunut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Päivitä sivu jatkaaksesi",VOICE_MESSAGE:"Ääniviesti",CONTACT_INFORMATION_HIDDEN:"Piilotetut tiedot",LEAVE_CONVERSATION:"Poistu keskustelusta",MARK_CONVERSATION_AS_UNREAD:"Merkitse lukemattomaksi",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktiota (${t})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(e,t)=>`Vastataan käyttäjälle ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notification de démonstration ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Ecrivez quelque chose...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(e,t)=>`${e} réactions avec ${t}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(e,t)=>`Répondre à ${e} : ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} הודעה על הדגמה`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"אם אתה שומר על כרטיסיית הדפדפן שלך פתוחה, תראה את זה צץ כשמישהו ידבר איתך.",SEND_BUTTON_TEXT:"שלח",ENTRYBOX_TEXT_LIMIT:"רק 10.000 תווים",ENTRYBOX_PLACEHOLDER:"תגיד משהו...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"שיחה זו אינה פעילה עוד.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"אתה יכול לקרוא, אך לא לשלוח הודעות.",MESSAGELIST_LOADING_OLDER:"טוען הודעות ישנות...",MESSAGELIST_SHOW_OLDER:"הצג הודעות ישנות",MESSAGELIST_NEW_MARKER:"חדש",MESSAGE_SENT_VIA_EMAIL:"הודעה זאת נשלחה דרך אימייל",YOU_MARKER:"אתה",UPLOAD_IN_PROGRESS:"מעלה ...",UPLOAD_SEND_FILE:"שלח קובץ",UPLOAD_SHARE_LOCATION:"שתף מיקום",UPLOAD_ERROR:"לרוע המזל משהו השתבש בהעלאה. ייתכן שהקובץ אינו נתמך או גדול מדי.",SHARE_LOCATION_ERROR:"לא ניתן לשתף מיקום: ",LOADING:"טוען...",HUB_EMPTY:"היסטוריית הצ'אט שלך תופיע כאן",HUB_SHOW_EARLIER:"הצג צ'אטים קודמים",INBOX_NO_CHATS_TITLE:"אין עדיין צ'אטים!",INBOX_NO_CHATS_BODY:"לאחר שניהלת שיחה אחת או יותר, הם יופיעו כאן.",ENABLE_TRANSLATION:"תרגם שיחה זו לעברית",DISABLE_TRANSLATION:"הצג מקור",SEARCH_PLACEHOLDER_TEXT:"...חפש",SEARCH_SEARCHING:"...מחפש",SEARCH_NO_RESULTS:"לא נמצאו תוצאות",SEARCH_NO_MORE_RESULTS:"אין תוצאות נוספות",CHAT_NOT_FOUND:"הצ'אט לא נמצא",DELETE_MESSAGE:"מחיקת הודעה",DELETION_EXPLANATION:"אם תמחק הודעה זו, היא תיעלם עבור כולם.",EDIT_MESSAGE:"עריכת הודעה",SAVE:"שמור",EDITED_INDICATOR:"ערוך",REPLY_TO_MESSAGE:"השב",ADD_REACTION:"הוספת תגובה",AUTH_EXPIRED_OVERLAY_TITLE:"הפעלת הצ׳אט שלכם פגה",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"רעננו את העמוד כדי להמשיך",VOICE_MESSAGE:"הודעה קולית",CONTACT_INFORMATION_HIDDEN:"מידע מוסתר",LEAVE_CONVERSATION:"צא מהשיחה",MARK_CONVERSATION_AS_UNREAD:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(e,t)=>`${e} תגובות עם ${t}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(e,t)=>`משיב ל-${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} डेमो अधिसूचना`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"यदि आप अपना ब्राउज़र टैब खुला रखते हैं, तो यह पॉप अप आपको तब दिखाई देगा जब कोई आपसे बात करेगा।",SEND_BUTTON_TEXT:"भेजें",ENTRYBOX_TEXT_LIMIT:"केवल 10,000 वर्णों की अनुमति है।",ENTRYBOX_PLACEHOLDER:"कुछ कहिए...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"यह चैट अब सक्रिय नहीं है।",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"आप पढ़ सकते हैं, लेकिन संदेश नहीं भेज सकते।",MESSAGELIST_LOADING_OLDER:"पुराने संदेश लोड हो रहे हैं ...",MESSAGELIST_SHOW_OLDER:"पुराने संदेश दिखाएं",MESSAGELIST_NEW_MARKER:"नया",MESSAGE_SENT_VIA_EMAIL:"यह संदेश ईमेल के माध्यम से भेजा गया था",YOU_MARKER:"आप",UPLOAD_IN_PROGRESS:"अपलोड हो रहा है...",UPLOAD_SEND_FILE:"फाइल भेजें",UPLOAD_SHARE_LOCATION:"जगह शेयर करें",UPLOAD_ERROR:"दुर्भाग्य से, अपलोड करते समय कुछ गलत हो गया। फ़ाइल असमर्थित या बहुत बड़ी हो सकती है।",SHARE_LOCATION_ERROR:"जगह शेयर नहीं हो पाया: ",LOADING:"लोड हो रहा है...",HUB_EMPTY:"आपका चैट इतिहास यहां दिखाई देगा",HUB_SHOW_EARLIER:"पहले की चैट दिखाओ",INBOX_NO_CHATS_TITLE:"अभी तक कोई चैट नहीं!",INBOX_NO_CHATS_BODY:"एक बार जब आप एक या अधिक चैट कर लेते हैं, तो वे यहां दिखाई देंगे।",ENABLE_TRANSLATION:"इस बातचीत का हिंदी में अनुवाद कीजिए",DISABLE_TRANSLATION:"मूल दिखाएँ",SEARCH_PLACEHOLDER_TEXT:"खोजें...",SEARCH_SEARCHING:"खोज जारी है...",SEARCH_NO_RESULTS:"कोई परिणाम नहीं मिला",SEARCH_NO_MORE_RESULTS:"और कोई परिणाम नहीं",CHAT_NOT_FOUND:"चैट नहीं मिली",DELETE_MESSAGE:"संदेश डिलीट करें",DELETION_EXPLANATION:"यदि आप इस संदेश को हटाते हैं, तो यह सभी के लिए गायब हो जाएगा.",EDIT_MESSAGE:"संदेश में बदलाव करें",SAVE:"सहेजें",EDITED_INDICATOR:"संपादित किया गया",REPLY_TO_MESSAGE:"जवाब दीजिए ।",ADD_REACTION:"प्रतिक्रिया जोड़ें",AUTH_EXPIRED_OVERLAY_TITLE:"आपका चैट सेशन समाप्त हो चुका है",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"आगे बढ़ने के लिए रिफ्रेश करें",VOICE_MESSAGE:"वॉयस मैसेज",CONTACT_INFORMATION_HIDDEN:"छुपी हुई जानकारी",LEAVE_CONVERSATION:"बातचीत को ख़त्म करें",MARK_CONVERSATION_AS_UNREAD:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(e,t)=>`${e} प्रतिक्रियाएं (${t})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(e,t)=>`${e} को उत्तर दे रहे हैं: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu preglednika ostavite otvorenu, pojavit će se ovaj pop-up kada netko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Reci nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možeš čitati, ali ne i slati poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana e-poštom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podijeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podijeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovdje će se prikazati vaša povijest razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovdje.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na hrvatski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Razgovor nije pronađen",DELETE_MESSAGE:"Obriši poruku",DELETION_EXPLANATION:"Ako izbrišete ovu poruku, nestat će za sve.",EDIT_MESSAGE:"Uredi poruku",SAVE:"Spremi",EDITED_INDICATOR:"uređivao",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodajte reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija razgovora je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvježite stranicu za nastavak",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Skrivene informacije",LEAVE_CONVERSATION:"Napustiti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitano",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo értesítés`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ha nyitva hagyja böngészőjét, felugró ablak fog megjelenni, ha valaki beszélni szeretne Önnel.",SEND_BUTTON_TEXT:"Küldés",ENTRYBOX_TEXT_LIMIT:"Mindőssze 10.000 karakter megengedett.",ENTRYBOX_PLACEHOLDER:"Mondjon valamit...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ez a beszélgetés már nem aktív.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Elolvashatja az üzeneteket, de nem küldhet újat.",MESSAGELIST_LOADING_OLDER:"Korábbi üzenetek betöltése...",MESSAGELIST_SHOW_OLDER:"Korábbi üzenetek megjelenítése",MESSAGELIST_NEW_MARKER:"Új",MESSAGE_SENT_VIA_EMAIL:"Ez az üzenet e-mailben került elküldésre",YOU_MARKER:"Ön",UPLOAD_IN_PROGRESS:"Feltöltés...",UPLOAD_SEND_FILE:"Fájl küldése",UPLOAD_SHARE_LOCATION:"Helyszín megosztása",UPLOAD_ERROR:"Sajnos hiba történt a feltöltés során. A fájl nem támogatott vagy túl nagy.",SHARE_LOCATION_ERROR:"Helyszín megosztása nem lehetséges: ",LOADING:"Betöltés...",HUB_EMPTY:"A beszélgetések előzményei itt láthatók",HUB_SHOW_EARLIER:"Korábbi beszélgetések megjelenítése",INBOX_NO_CHATS_TITLE:"Még nincs megjeleníthető beszélgetés!",INBOX_NO_CHATS_BODY:"Amint egy vagy több beszélgetéssel rendelkezik, azok itt fognak megjelenni.",ENABLE_TRANSLATION:"A beszélgetés lefordítása erre a nyelvre: magyar",DISABLE_TRANSLATION:"Eredeti megjelenítése",SEARCH_PLACEHOLDER_TEXT:"Keresés...",SEARCH_SEARCHING:"Keresés...",SEARCH_NO_RESULTS:"Nincs találat",SEARCH_NO_MORE_RESULTS:"Nincs több találat",CHAT_NOT_FOUND:"A csevegés nem található",DELETE_MESSAGE:"Üzenet törlése",DELETION_EXPLANATION:"Ha törlöd ezt az üzenetet, az mindenki számára eltűnik.",EDIT_MESSAGE:"Üzenet szerkesztése",SAVE:"Mentés",EDITED_INDICATOR:"szerkesztve",REPLY_TO_MESSAGE:"Válaszadás",ADD_REACTION:"Reagálás erre",AUTH_EXPIRED_OVERLAY_TITLE:"Chat munkamenete lejárt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Folytatáshoz frissítse az oldalt",VOICE_MESSAGE:"Hangüzenet",CONTACT_INFORMATION_HIDDEN:"Rejtett információ",LEAVE_CONVERSATION:"Kilépés a beszélgetésből",MARK_CONVERSATION_AS_UNREAD:"Megjelölés olvasatlanként",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(e,t)=>`${e} reakció (${t})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(e,t)=>`Válaszolás ${e} részére: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`pemberitahuan demo ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jika Anda membiarkan tab browser tetap terbuka, Anda akan melihat ini muncul ketika seseorang berbicara kepada Anda.",SEND_BUTTON_TEXT:"Kirim",ENTRYBOX_TEXT_LIMIT:"Hanya 10.000 karakter yang diizinkan.",ENTRYBOX_PLACEHOLDER:"Katakan sesuatu...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Percakapan ini tidak lagi aktif.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Anda dapat membaca, tetapi tidak mengirim pesan.",MESSAGELIST_LOADING_OLDER:"Memuat pesan lama...",MESSAGELIST_SHOW_OLDER:"Tampilkan pesan yang lebih lama",MESSAGELIST_NEW_MARKER:"Baru",MESSAGE_SENT_VIA_EMAIL:"Pesan ini dikirim melalui email",YOU_MARKER:"Anda",UPLOAD_IN_PROGRESS:"Mengunggah...",UPLOAD_SEND_FILE:"Kirim mengajukan",UPLOAD_SHARE_LOCATION:"Bagikan lokasi",UPLOAD_ERROR:"Ada yang salah diunggah. File mungkin tidak didukung atau terlalu besar.",SHARE_LOCATION_ERROR:"Tidak dapat membagikan lokasi: ",LOADING:"Memuat...",HUB_EMPTY:"Riwayat obrolan Anda akan muncul di sini",HUB_SHOW_EARLIER:"Tampilkan obrolan sebelumnya",INBOX_NO_CHATS_TITLE:"Belum ada obrolan!",INBOX_NO_CHATS_BODY:"Setelah Anda melakukan satu atau lebih percakapan, mereka akan muncul di sini.",ENABLE_TRANSLATION:"Terjemahkan percakapan ini ke Indonesia",DISABLE_TRANSLATION:"Perlihatkan asli",SEARCH_PLACEHOLDER_TEXT:"Cari...",SEARCH_SEARCHING:"Mencari...",SEARCH_NO_RESULTS:"Tidak ditemukan hasil",SEARCH_NO_MORE_RESULTS:"Tidak ada hasil lainnya",CHAT_NOT_FOUND:"Obrolan tidak ditemukan",DELETE_MESSAGE:"Hapus pesan",DELETION_EXPLANATION:"Jika pesan ini Anda hapus, pesan ini akan tidak terlihat bagi siapa pun.",EDIT_MESSAGE:"Sunting pesan",SAVE:"Mentés",EDITED_INDICATOR:"diedit",REPLY_TO_MESSAGE:"Balas",ADD_REACTION:"Tambah reaksi",AUTH_EXPIRED_OVERLAY_TITLE:"Sesi obrolan Anda sudah lewat batas waktu",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Muat ulang halaman untuk melanjutkan",VOICE_MESSAGE:"Pesan suara",CONTACT_INFORMATION_HIDDEN:"Informasi tersembunyi",LEAVE_CONVERSATION:"Tinggalkan percakapan",MARK_CONVERSATION_AS_UNREAD:"Tandai sebagai Belum dibaca",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksi dengan ${t}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(e,t)=>`Membalas ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} prufutilkynning`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ef flipinn í vafranum er opinn muntu sjá þessa tilkynningu birtast þegar einhver sendir þér skilaboð.",SEND_BUTTON_TEXT:"Senda",ENTRYBOX_TEXT_LIMIT:"Aðeins 10.000 stafir komast fyrir.",ENTRYBOX_PLACEHOLDER:"Segðu eitthvað...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Þessar samræður eru ekki lengar virkar.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Þú getur lesið, en ekki sent skilaboð.",MESSAGELIST_LOADING_OLDER:"Sæki eldri skilaboð...",MESSAGELIST_SHOW_OLDER:"Sýna eldri skilaboð",MESSAGELIST_NEW_MARKER:"Ný",MESSAGE_SENT_VIA_EMAIL:"Þessi skilaboð voru send með tölvupósti",YOU_MARKER:"þú",UPLOAD_IN_PROGRESS:"Hleð upp...",UPLOAD_SEND_FILE:"Senda skrá",UPLOAD_SHARE_LOCATION:"Deila staðsetningu",UPLOAD_ERROR:"Því miður fór eitthvað úrskeiðis við að hlaða upp. Skráin gæti verið af rangri tegund eð of stór.",SHARE_LOCATION_ERROR:"Ekki er hægt að deila staðsetningu: ",LOADING:"Hleð...",HUB_EMPTY:"Fyrri samtöl munu birtast hér",HUB_SHOW_EARLIER:"Sýna fyrri samtöl",INBOX_NO_CHATS_TITLE:"Engin samtöl enn!",INBOX_NO_CHATS_BODY:"Þegar þú hefur átt eitt eða fleiri samtöl, munu þau birtast hér.",ENABLE_TRANSLATION:"Þýða þetta samtal á ensku",DISABLE_TRANSLATION:"Sýna upprunalegt",SEARCH_PLACEHOLDER_TEXT:"Leita...",SEARCH_SEARCHING:"Leita...",SEARCH_NO_RESULTS:"Ekkert fannst",SEARCH_NO_MORE_RESULTS:"Engar fleiri niðurstöður",CHAT_NOT_FOUND:"Samtal fannst ekki",DELETE_MESSAGE:"Eyða skilaboðum",DELETION_EXPLANATION:"Ef þú eyðir þessum skilaboðum munu þau hverfa hjá öllum.",EDIT_MESSAGE:"Breyta skilaboðum",SAVE:"Vista",EDITED_INDICATOR:"breytt",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(e,t)=>`${e} viðbrögð með ${t}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(e,t)=>`Svara ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notification`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se si mantiene aperta la scheda del browser, questo verrà visualizzato quando qualcuno ti parla.",SEND_BUTTON_TEXT:"Invia",ENTRYBOX_TEXT_LIMIT:"Sono consentiti solo 10.000 caratteri.",ENTRYBOX_PLACEHOLDER:"Dì qualcosa...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Questa conversazione non è più attiva.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puoi leggere, ma non inviare messaggi.",MESSAGELIST_LOADING_OLDER:"Caricamento dei messaggi precedenti...",MESSAGELIST_SHOW_OLDER:"Mostra messaggi precedenti",MESSAGELIST_NEW_MARKER:"Nuovo",MESSAGE_SENT_VIA_EMAIL:"Questo messaggio è stato inviato via email",YOU_MARKER:"tu",UPLOAD_IN_PROGRESS:"Caricamento in corso...",UPLOAD_SEND_FILE:"Invia file",UPLOAD_SHARE_LOCATION:"Condividi posizione",UPLOAD_ERROR:"Qualcosa è andato storto durante il caricamento. Il file potrebbe non essere supportato o troppo grande.",SHARE_LOCATION_ERROR:"Impossibile condividere la posizione: ",LOADING:"Caricamento in corso...",HUB_EMPTY:"La cronologia della tua chat verrà mostrata qui",HUB_SHOW_EARLIER:"Mostra chat precedenti",INBOX_NO_CHATS_TITLE:"Non ci sono ancora chat!",INBOX_NO_CHATS_BODY:"Una volta che hai avuto una o più conversazioni, verranno visualizzate qui.",ENABLE_TRANSLATION:"Traduci questa conversazione in italiano",DISABLE_TRANSLATION:"Mostra l'originale",SEARCH_PLACEHOLDER_TEXT:"Cerca...",SEARCH_SEARCHING:"Cercando...",SEARCH_NO_RESULTS:"Nessun risultato trovato",SEARCH_NO_MORE_RESULTS:"Non ci sono più risultati",CHAT_NOT_FOUND:"Chat non trovata",DELETE_MESSAGE:"Elimina messaggio",DELETION_EXPLANATION:"Se elimini il messaggio, questo scomparirà per tutti.",EDIT_MESSAGE:"Modifica messaggio",SAVE:"Salva",EDITED_INDICATOR:"modificato",REPLY_TO_MESSAGE:"Rispondi",ADD_REACTION:"Aggiungi reazione",AUTH_EXPIRED_OVERLAY_TITLE:"La sessione di chat è scaduta",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Aggiorna la pagina per continuare",VOICE_MESSAGE:"Messaggio vocale",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reazioni con ${t}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(e,t)=>`Rispondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} デモ通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"ブラウザのタブを開いたままにしておくと、誰かがあなたに話しかけたときにこのポップアップが表示されます。",SEND_BUTTON_TEXT:"送信",ENTRYBOX_TEXT_LIMIT:"許可されているのは10.000文字までです。",ENTRYBOX_PLACEHOLDER:"メッセージを入力してください",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"この会話はもうアクティブではありません。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"あなたは読むことはできますが、メッセージを送ることはできません。",MESSAGELIST_LOADING_OLDER:"古いメッセージを読み込んでいます...",MESSAGELIST_SHOW_OLDER:"古いメッセージを表示",MESSAGELIST_NEW_MARKER:"新着",MESSAGE_SENT_VIA_EMAIL:"このメッセージはメールで送信されました",YOU_MARKER:"あなたは",UPLOAD_IN_PROGRESS:"アップロード中...",UPLOAD_SEND_FILE:"ファイル送信",UPLOAD_SHARE_LOCATION:"共有場所",UPLOAD_ERROR:"アップロード中に問題が発生しました。ファイルがサポートされていないか、大きすぎる可能性があります。",SHARE_LOCATION_ERROR:"場所を共有できません: ",LOADING:"読み込み中...",HUB_EMPTY:"あなたのチャット履歴がここに表示されます",HUB_SHOW_EARLIER:"以前のチャットを表示",INBOX_NO_CHATS_TITLE:"まだチャットがありません!",INBOX_NO_CHATS_BODY:"会話が1つ以上あると、ここに表示されます",ENABLE_TRANSLATION:"この会話を日本語に翻訳する",DISABLE_TRANSLATION:"オリジナルを表示",SEARCH_PLACEHOLDER_TEXT:"検索...",SEARCH_SEARCHING:"検索中...",SEARCH_NO_RESULTS:"結果が見つかりません",SEARCH_NO_MORE_RESULTS:"これ以上結果はありません",CHAT_NOT_FOUND:"チャットが見つかりませんでした",DELETE_MESSAGE:"メッセージを削除する",DELETION_EXPLANATION:"このメッセージを削除すると、全ての人に表示されなくなります。",EDIT_MESSAGE:"メッセージを編集する",SAVE:"上書き保存",EDITED_INDICATOR:"編集",REPLY_TO_MESSAGE:"返信する",ADD_REACTION:"リアクションを追加",AUTH_EXPIRED_OVERLAY_TITLE:"チャットセッションの有効期限が切れました",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"続けるにはページを更新してください",VOICE_MESSAGE:"ボイスメッセージ",CONTACT_INFORMATION_HIDDEN:"機密情報",LEAVE_CONVERSATION:"会話をやめる",MARK_CONVERSATION_AS_UNREAD:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(e,t)=>`${e}件のリアクション(${t})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(e,t)=>`${e}に返信: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} შეტყობინებების დემო ვერსია`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"თუ დატოვებ ბრაუზერის ფანჯარას გახსნილს, როცა ვიღაც მოგწერს საუბარი ამოვარდება დესკტოპზე.",SEND_BUTTON_TEXT:"გაგზავნა",ENTRYBOX_TEXT_LIMIT:"დაშვებულია მხოლოდ 10.000 სიმბოლო.",ENTRYBOX_PLACEHOLDER:"დაწერე რაღაც...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"ეს დიალოგი აღარ არის ხელმისაწვდომი.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"შეგიძლია წაიკითხო, მაგრამ ვერ გააგზავნი შეტყობინებას.",MESSAGELIST_LOADING_OLDER:"იტვირთება ძველი შეტყობინებები...",MESSAGELIST_SHOW_OLDER:"ძველი შეტყობინებების ჩვენება",MESSAGELIST_NEW_MARKER:"ახალი",MESSAGE_SENT_VIA_EMAIL:"ეს შეტყობინება გამოგზავნილია იმეილით",YOU_MARKER:"you",UPLOAD_IN_PROGRESS:"იტვირთება...",UPLOAD_SEND_FILE:"ფაილის გაგზავნა",UPLOAD_SHARE_LOCATION:"ადგილმდებარეობის გაზიარება",UPLOAD_ERROR:"პრობლემაა ატვირთვისას. ფაილის შესაძლოა არის არათავსებადი ან ძალიან დიდი.",SHARE_LOCATION_ERROR:"შეუძლებელია ადგილმდებარეობის გაზიარება: ",LOADING:"იტვირთება...",HUB_EMPTY:"საუბრების ისტორია გამოჩნდება აქ",HUB_SHOW_EARLIER:"წინა საუბრების ნახვა",INBOX_NO_CHATS_TITLE:"ჯერ-ჯერობით არ არის საუბრები!",INBOX_NO_CHATS_BODY:"უკვე დასრულებული საუბარები გამოჩნდება აქ",ENABLE_TRANSLATION:"თარგმნეთ ეს საუბარი ინგლისურად",DISABLE_TRANSLATION:"ორიგინალის ჩვენება",SEARCH_PLACEHOLDER_TEXT:"ძიება...",SEARCH_SEARCHING:"მიმდინარეობს ძიება...",SEARCH_NO_RESULTS:"შედეგები ვერ ქართველი",SEARCH_NO_MORE_RESULTS:"სხვა შედეგი ვერ მოიძებნა",CHAT_NOT_FOUND:"ჩატი ვერ მოიძებნა",DELETE_MESSAGE:"შეტყობინების წაშლა ",DELETION_EXPLANATION:"თუ ამ შეტყობინებას წაშლით, ის ყველასთვის გაქრება.",EDIT_MESSAGE:"შეტყობინების რედაქტირება",SAVE:"შენახვა",EDITED_INDICATOR:"რედაქტირებულია",REPLY_TO_MESSAGE:"პასუხის გაცემა",ADD_REACTION:"დაამატეთ რეაქცია",AUTH_EXPIRED_OVERLAY_TITLE:"თქვენი ჩეთის სესიის ვადა ამოიწურა",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"განაახლეთ გვერდი გასაგრძელებლად",VOICE_MESSAGE:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(e,t)=>`${e} რეაქცია (${t})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(e,t)=>`პასუხი ${e}-ს: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 데모 알림`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"브라우저 탭을 열어 둔 상태에서 누군가 대화 할 때 이 팝업이 표시됩니다.",SEND_BUTTON_TEXT:"전송",ENTRYBOX_TEXT_LIMIT:"최대 10,000자까지 입력할 수 있습니다.",ENTRYBOX_PLACEHOLDER:"메세지를 입력하세요...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"채팅이 종료되었습니다.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"읽기만 가능하며 메시지를 보낼 수 없습니다.",MESSAGELIST_LOADING_OLDER:"이전 메시지 로드 중...",MESSAGELIST_SHOW_OLDER:"이전 메시지 표시",MESSAGELIST_NEW_MARKER:"새 메시지",MESSAGE_SENT_VIA_EMAIL:"이 메시지는 이메일을 통해 전송되었습니다.",YOU_MARKER:"나",UPLOAD_IN_PROGRESS:"업로드 중...",UPLOAD_SEND_FILE:"파일 전송",UPLOAD_SHARE_LOCATION:"위치 공유",UPLOAD_ERROR:"업로드가 실패했습니다. 파일이 지원되지 않거나 너무 클 수 있습니다.",SHARE_LOCATION_ERROR:"위치를 공유 할 수 없습니다: ",LOADING:"로드 중...",HUB_EMPTY:"채팅 기록이 여기에 표시됩니다",HUB_SHOW_EARLIER:"이전 채팅보기",INBOX_NO_CHATS_TITLE:"아직 채팅이 없습니다!",INBOX_NO_CHATS_BODY:"대화가 하나 이상 있으면 여기에 표시됩니다.",ENABLE_TRANSLATION:"이 대화를 한국어로 번역",DISABLE_TRANSLATION:"원본 표시",SEARCH_PLACEHOLDER_TEXT:"검색...",SEARCH_SEARCHING:"검색 중...",SEARCH_NO_RESULTS:"검색 결과 없음",SEARCH_NO_MORE_RESULTS:"추가 검색 결과 없음",CHAT_NOT_FOUND:"대화를 찾지 못했습니다",DELETE_MESSAGE:"메시지 삭제",DELETION_EXPLANATION:"이 메시지를 삭제하면 모든 사람이 볼 수 없게 됩니다.",EDIT_MESSAGE:"메시지 편집하기",SAVE:"저장",EDITED_INDICATOR:"편집",REPLY_TO_MESSAGE:"회신",ADD_REACTION:"반응 추가",AUTH_EXPIRED_OVERLAY_TITLE:"채팅 세션이 만료되었습니다",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"계속하려면 페이지를 새로고침하세요",VOICE_MESSAGE:"음성 메시지",CONTACT_INFORMATION_HIDDEN:"숨겨진 정보",LEAVE_CONVERSATION:"대화 떠나기",MARK_CONVERSATION_AS_UNREAD:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(e,t)=>`${e}개 반응 (${t})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(e,t)=>`${e}에게 답장: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo varslinger`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Hvis du holder nettleservinduet åpent, vil du se dette varsel når noen snakker til deg.",SEND_BUTTON_TEXT:"Send",ENTRYBOX_TEXT_LIMIT:"Kun 10.000 tegn er tillatt.",ENTRYBOX_PLACEHOLDER:"Si noe...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Denne samtale er ikke lengre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan lese, men ikke sende meldinger.",MESSAGELIST_LOADING_OLDER:"Laster eldre meldinger...",MESSAGELIST_SHOW_OLDER:"Vis eldre meldinger",MESSAGELIST_NEW_MARKER:"Ny",MESSAGE_SENT_VIA_EMAIL:"Denne meldingen er sendt via e-post",YOU_MARKER:"deg",UPLOAD_IN_PROGRESS:"Laster opp...",UPLOAD_SEND_FILE:"Send fil",UPLOAD_SHARE_LOCATION:"Del din plassering",UPLOAD_ERROR:"Noe gikk galt i uplastingen. Det kan være filen ikke støttes eller for stor.",SHARE_LOCATION_ERROR:"Kan ikke dele plasseringen: ",LOADING:"Laster...",HUB_EMPTY:"Din chats historikk vil vises her",HUB_SHOW_EARLIER:"Vis tidligere chats",INBOX_NO_CHATS_TITLE:"Ingen chats enda!",INBOX_NO_CHATS_BODY:"Så snart du får en eller flere samtaler, vil de vises her.",ENABLE_TRANSLATION:"Oversett denne samtalen til norsk",DISABLE_TRANSLATION:"Vis original",SEARCH_PLACEHOLDER_TEXT:"Søk...",SEARCH_SEARCHING:"Søker...",SEARCH_NO_RESULTS:"Finner ingen resultater",SEARCH_NO_MORE_RESULTS:"Ingen flere resultater",CHAT_NOT_FOUND:"Chat ikke funnet",DELETE_MESSAGE:"Slett melding",DELETION_EXPLANATION:"Hvis du sletter denne meldingen, forsvinner den for alle.",EDIT_MESSAGE:"Rediger melding",SAVE:"Lagre",EDITED_INDICATOR:"redigert",REPLY_TO_MESSAGE:"Svar",ADD_REACTION:"Legg til reaksjon",AUTH_EXPIRED_OVERLAY_TITLE:"Chatøkten er utløpt",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Oppdater siden for å fortsette",VOICE_MESSAGE:"Lydmelding",CONTACT_INFORMATION_HIDDEN:"Skjult informasjon",LEAVE_CONVERSATION:"Forlat samtalen",MARK_CONVERSATION_AS_UNREAD:"Merk som ulest",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksjoner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notificatie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Als je je browser open houdt, zie je deze popup als iemand tegen je praat.",SEND_BUTTON_TEXT:"Verzenden",ENTRYBOX_TEXT_LIMIT:"Maximaal 10.000 tekens toegestaan.",ENTRYBOX_PLACEHOLDER:"Typ een bericht...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Dit gesprek is niet actief meer.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Je kunt geen berichten sturen.",MESSAGELIST_LOADING_OLDER:"Eerdere berichten laden...",MESSAGELIST_SHOW_OLDER:"Laad eerdere berichten",MESSAGELIST_NEW_MARKER:"Nieuw",MESSAGE_SENT_VIA_EMAIL:"Dit bericht is verstuurd via e-mail",YOU_MARKER:"jij",UPLOAD_IN_PROGRESS:"Uploaden...",UPLOAD_SEND_FILE:"Verzend bestand",UPLOAD_SHARE_LOCATION:"Deel locatie",UPLOAD_ERROR:"Er ging iets mis. Het bestand wordt niet ondersteund of is te groot.",SHARE_LOCATION_ERROR:"Locatie delen mislukt: ",LOADING:"Bezig met laden...",HUB_EMPTY:"Berichtengeschiedenis wordt hier weergegeven",HUB_SHOW_EARLIER:"Laat eerdere berichten zien",INBOX_NO_CHATS_TITLE:"Nog geen chats!",INBOX_NO_CHATS_BODY:"Zodra je een of meerdere conversaties hebt gehad, worden deze hier weergegeven.",ENABLE_TRANSLATION:"Vertaal dit gesprek naar het Nederlands",DISABLE_TRANSLATION:"Toon oorspronkelijk gesprek",SEARCH_PLACEHOLDER_TEXT:"Zoek...",SEARCH_SEARCHING:"Zoeken...",SEARCH_NO_RESULTS:"Geen resultaten gevonden",SEARCH_NO_MORE_RESULTS:"Niet meer resultaten",CHAT_NOT_FOUND:"Chat niet gevonden",DELETE_MESSAGE:"Bericht verwijderen",DELETION_EXPLANATION:"Als je dit bericht verwijdert, zal het voor iedereen verdwijnen.",EDIT_MESSAGE:"Bericht bewerken",SAVE:"Opslaan",EDITED_INDICATOR:"bewerkt",REPLY_TO_MESSAGE:"Beantwoorden",ADD_REACTION:"Reactie toevoegen",AUTH_EXPIRED_OVERLAY_TITLE:"Je chatsessie is verlopen",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Ververs de pagina om door te gaan",VOICE_MESSAGE:"Spraakbericht",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reacties met ${t}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(e,t)=>`Beantwoorden aan ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} przykładowe powiadomienie`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Jeśli zostawisz tę kartę otwartą, zobaczysz takie powiadomienie, gdy ktoś napisze do Ciebie.",SEND_BUTTON_TEXT:"Wyślij",ENTRYBOX_TEXT_LIMIT:"Nie można wysyłać więcej niż 10000 znaków.",ENTRYBOX_PLACEHOLDER:"Napisz coś...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ten czat nie jest aktywny.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Możesz czytać wiadomości, ale nie możesz ich wysyłać.",MESSAGELIST_LOADING_OLDER:"Wczytuję starsze wiadomości...",MESSAGELIST_SHOW_OLDER:"Zobacz starsze wiadomości",MESSAGELIST_NEW_MARKER:"Nowe",MESSAGE_SENT_VIA_EMAIL:"Ta wiadomość została wysłana przez email.",YOU_MARKER:"ty",UPLOAD_IN_PROGRESS:"Przesyłanie...",UPLOAD_SEND_FILE:"Prześlij plik",UPLOAD_SHARE_LOCATION:"Udostępnij lokalizację",UPLOAD_ERROR:"Coś poszło nie tak. Plik może być zbyt duży lub jest nieobsługiwany.",SHARE_LOCATION_ERROR:"Nie da się udostępnić lokalizacji: ",LOADING:"Ładowanie...",HUB_EMPTY:"Twoje czaty pojawią się tutaj",HUB_SHOW_EARLIER:"Zobacz starsze czaty",INBOX_NO_CHATS_TITLE:"Brak czatów!",INBOX_NO_CHATS_BODY:"Rozpoczęte konwersacje pojawią się tutaj.",ENABLE_TRANSLATION:"Przetłumacz tę konwersację na język polski",DISABLE_TRANSLATION:"Pokaż oryginał",SEARCH_PLACEHOLDER_TEXT:"Wyszukaj...",SEARCH_SEARCHING:"Wyszukiwanie...",SEARCH_NO_RESULTS:"Nie znaleziono wyników",SEARCH_NO_MORE_RESULTS:"Nie ma innych wyników",CHAT_NOT_FOUND:"Nie znaleziono konwersacji",DELETE_MESSAGE:"Usuń wiadomość",DELETION_EXPLANATION:"Jeśli usuniesz tę wiadomość, przestanie być widoczna dla wszystkich.",EDIT_MESSAGE:"Edytuj wiadomość",SAVE:"Zapisz",EDITED_INDICATOR:"edytowano",REPLY_TO_MESSAGE:"Odpowiedz",ADD_REACTION:"Dodaj reakcję",AUTH_EXPIRED_OVERLAY_TITLE:"Twoja sesja wygasła",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Odśwież stronę, aby kontynuować",VOICE_MESSAGE:"Wiadomość głosowa",CONTACT_INFORMATION_HIDDEN:"Ukryte informacje",LEAVE_CONVERSATION:"Opuść konwersację",MARK_CONVERSATION_AS_UNREAD:"Oznacz jako nieprzeczytane",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcji z ${t}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(e,t)=>`Odpowiadanie na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} notificação de demonstração`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Se você mantiver a guia do navegador aberta, verá essa mensagem quando alguém falar com você.",SEND_BUTTON_TEXT:"Enviar",ENTRYBOX_TEXT_LIMIT:"Apenas 10.000 caracteres são permitidos.",ENTRYBOX_PLACEHOLDER:"Diga algo...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Esta conversa não está mais ativa.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Você pode ler, mas não enviar mensagens.",MESSAGELIST_LOADING_OLDER:"Carregando mensagens antigas...",MESSAGELIST_SHOW_OLDER:"Mostrar mensagens mais antigas",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Esta mensagem foi enviada via email.",YOU_MARKER:"Você",UPLOAD_IN_PROGRESS:"Carregando...",UPLOAD_SEND_FILE:"Enviar arquivo",UPLOAD_SHARE_LOCATION:"Compartilhar localização",UPLOAD_ERROR:"Algo deu errado ao fazer o upload. O arquivo pode não ter suporte ou ser muito grande.",SHARE_LOCATION_ERROR:"Não é possível compartilhar o local: ",LOADING:"Carregando...",HUB_EMPTY:"Seu histórico de conversas será exibido aqui",HUB_SHOW_EARLIER:"Mostrar conversas anteriores",INBOX_NO_CHATS_TITLE:"Ainda não há chats!",INBOX_NO_CHATS_BODY:"Depois de ter uma ou mais conversas, elas serão exibidas aqui.",ENABLE_TRANSLATION:"Traduzir esta conversa para português",DISABLE_TRANSLATION:"Ver a conversa não traduzida",SEARCH_PLACEHOLDER_TEXT:"Busca...",SEARCH_SEARCHING:"Consultando...",SEARCH_NO_RESULTS:"Resultados nao encontrados",SEARCH_NO_MORE_RESULTS:"Não há mais resultados",CHAT_NOT_FOUND:"Conversa não encontrada",DELETE_MESSAGE:"Excluir mensagem",DELETION_EXPLANATION:"Se você excluir esta mensagem, ela desaparecerá para todos.",EDIT_MESSAGE:"Editar mensagem",SAVE:"Salvar",EDITED_INDICATOR:"editada",REPLY_TO_MESSAGE:"Responder",ADD_REACTION:"Adicionar reação",AUTH_EXPIRED_OVERLAY_TITLE:"Sua sessão de chat expirou",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Atualize a página para continuar",VOICE_MESSAGE:"Mensagem de voz",LEAVE_CONVERSATION:"Sair da conversa",MARK_CONVERSATION_AS_UNREAD:"Marcar como não lida",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reações com ${t}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(e,t)=>`Respondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificare de debit ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Dacă țineți fișa browserului deschis, veți vedea acest pop-up atunci când cineva vorbește cu dvs.",SEND_BUTTON_TEXT:"Trimiteți",ENTRYBOX_TEXT_LIMIT:"Sunt permise numai 10.000 de caractere.",ENTRYBOX_PLACEHOLDER:"Spune ceva...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Această conversație nu mai este activă.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Puteți citi, dar nu puteți trimite mesaje.",MESSAGELIST_LOADING_OLDER:"Încărcarea mesajelor mai vechi...",MESSAGELIST_SHOW_OLDER:"Afișați mesaje mai vechi",MESSAGELIST_NEW_MARKER:"Nou",MESSAGE_SENT_VIA_EMAIL:"Acest mesaj a fost trimis prin e-mail",YOU_MARKER:"voi",UPLOAD_IN_PROGRESS:"Încărcarea...",UPLOAD_SEND_FILE:"Trimiteți fișierul",UPLOAD_SHARE_LOCATION:"Distribuiți locația",UPLOAD_ERROR:"Sa încărcat ceva în mod greșit. Fișierul ar putea fi neacceptat sau prea mare.",SHARE_LOCATION_ERROR:"Nu se poate partaja locația: ",LOADING:"Încărcare...",HUB_EMPTY:"Istoricul chat-ului dvs. va apărea aici",HUB_SHOW_EARLIER:"Afișați discuțiile anterioare",INBOX_NO_CHATS_TITLE:"Încă nu vorbești!",INBOX_NO_CHATS_BODY:"După ce ați avut una sau mai multe conversații, acestea vor apărea aici.",ENABLE_TRANSLATION:"Traduceți această conversație în română",DISABLE_TRANSLATION:"Arată originalul",SEARCH_PLACEHOLDER_TEXT:"Căutare...",SEARCH_SEARCHING:"Se caută...",SEARCH_NO_RESULTS:"Nu s-au găsit rezultate",SEARCH_NO_MORE_RESULTS:"Nu mai există rezultate",CHAT_NOT_FOUND:"Conversația nu a fost găsită",DELETE_MESSAGE:"Șterge mesajul",DELETION_EXPLANATION:"Dacă ștergi acest mesaj, acesta va dispărea pentru toată lumea.",EDIT_MESSAGE:"Redactează mesajul",SAVE:"Salvare",EDITED_INDICATOR:"editat",REPLY_TO_MESSAGE:"Răspundeți",ADD_REACTION:"Adaugă o reacție",AUTH_EXPIRED_OVERLAY_TITLE:"Sesiunea dumneavoastră de chat a expirat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Reîmprospătați pagina pentru a continua",VOICE_MESSAGE:"Mesaj vocal",CONTACT_INFORMATION_HIDDEN:"Informații ascunse",LEAVE_CONVERSATION:"Părăsește conversația",MARK_CONVERSATION_AS_UNREAD:"Marcheaza ca necitit",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacții cu ${t}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(e,t)=>`Răspuns la ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо-оповещение`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Если вкладка вашего браузера открыта, вы увидите всплывающее окошко оповещения когда кто-то отправит вам сообщение.",SEND_BUTTON_TEXT:"Отправить",ENTRYBOX_TEXT_LIMIT:"Разрешено использовать только 10 тысяч символов.",ENTRYBOX_PLACEHOLDER:"Напишите что-нибудь...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Этот разговор больше неактивен.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Вы можете читать, но не отправлять сообщения.",MESSAGELIST_LOADING_OLDER:"Загрузка старых сообщения...",MESSAGELIST_SHOW_OLDER:"Показать старые сообщения",MESSAGELIST_NEW_MARKER:"Новые",MESSAGE_SENT_VIA_EMAIL:"Это сообщение было отправлено по электронной почте",YOU_MARKER:"вы",UPLOAD_IN_PROGRESS:"Загрузка...",UPLOAD_SEND_FILE:"Отправить файл",UPLOAD_SHARE_LOCATION:"Поделиться местоположением",UPLOAD_ERROR:"Что-то пошло не так: такой файл не поддерживается или он слишком большой.",SHARE_LOCATION_ERROR:"Не удается поделиться местоположением: ",LOADING:"Загрузка...",HUB_EMPTY:"Здесь появится ваша история чата",HUB_SHOW_EARLIER:"Показать предыдущие чаты",INBOX_NO_CHATS_TITLE:"Пока нет чатов!",INBOX_NO_CHATS_BODY:"Как только у вас будет один или несколько разговоров, они появятся здесь.",ENABLE_TRANSLATION:"Переведите этот разговор на русский",DISABLE_TRANSLATION:"Show source",SEARCH_PLACEHOLDER_TEXT:"поиск...",SEARCH_SEARCHING:"Поиск...",SEARCH_NO_RESULTS:"Результаты не найдены",SEARCH_NO_MORE_RESULTS:"Больше результатов нет",CHAT_NOT_FOUND:"Чат не найден",DELETE_MESSAGE:"Удалить сообщение",DELETION_EXPLANATION:"Если вы удалите это сообщение, оно исчезнет для всех.",EDIT_MESSAGE:"Изменить сообщение",SAVE:"сохранить",EDITED_INDICATOR:"изменено",REPLY_TO_MESSAGE:"Ответить",ADD_REACTION:"Добавить реакцию",AUTH_EXPIRED_OVERLAY_TITLE:"Срок действия вашего сеанса чата истек",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Обновите страницу, чтобы продолжить",VOICE_MESSAGE:"Голосовое сообщение",CONTACT_INFORMATION_HIDDEN:"Информация скрыта",LEAVE_CONVERSATION:"Выйти из беседы",MARK_CONVERSATION_AS_UNREAD:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакций с ${t}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(e,t)=>`Ответ на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} njoftime në desktop`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Lënia e skedës së shfletuesit tuaj të hapur do të pop-up kur dikush flet me ju.",SEND_BUTTON_TEXT:"Dërgo",ENTRYBOX_TEXT_LIMIT:"Lejohen vetëm 10,000 karaktere",ENTRYBOX_PLACEHOLDER:"Thuaj diçka...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Kjo bisedë nuk është më aktive.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mund të lexoni por jo të dërgoni mesazhe.",MESSAGELIST_LOADING_OLDER:"Duke ngarkuar mesazhe më të vjetra...",MESSAGELIST_SHOW_OLDER:"Trego mesazhe më të vjetra",MESSAGELIST_NEW_MARKER:"E ri",MESSAGE_SENT_VIA_EMAIL:"Ky mesazh u dërgua si email",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Ngarkim...",UPLOAD_SEND_FILE:"Dërgo datotekën",UPLOAD_SHARE_LOCATION:"Ndani lokacionin",UPLOAD_ERROR:"Na vjen keq, diçka nuk shkoi si duhet. Dosja mund të mos ket mbështetje ose mund të jetë shumë e madhe.",SHARE_LOCATION_ERROR:"Nuk mund të ndahet lokacioni: ",LOADING:"Ngarkim...",HUB_EMPTY:"Këtu do të paraqitet/ shfaqet historia e bisedës tuaj",HUB_SHOW_EARLIER:"Shfaqi bisedat e mëparshme",INBOX_NO_CHATS_TITLE:"Nuk ka biseda!",INBOX_NO_CHATS_BODY:"Pasi të keni një ose më shumë biseda, ato do të paraqiten/shfaqen këtu.",ENABLE_TRANSLATION:"Përkthejeni këtë bisedë në shqiptare",DISABLE_TRANSLATION:"Shikoni origjinalin",SEARCH_PLACEHOLDER_TEXT:"Kërko...",SEARCH_SEARCHING:"Kërko...",SEARCH_NO_RESULTS:"Nuk ka rezultate",SEARCH_NO_MORE_RESULTS:"Nuk ka më rezultate",CHAT_NOT_FOUND:"Biseda nuk u gjet",DELETE_MESSAGE:"Fshi mesazhin",DELETION_EXPLANATION:"Nëse e fshini këtë mesazh, ai do të zhduket për të gjithë.",EDIT_MESSAGE:"Redakto mesazhin",SAVE:"Ruaj",EDITED_INDICATOR:"redaktuar",REPLY_TO_MESSAGE:"Përgjigj",ADD_REACTION:"Shtoni reagimin",AUTH_EXPIRED_OVERLAY_TITLE:"Sesioni juaj i bisedës ka skaduar",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Rifresko faqen për të vazhduar",VOICE_MESSAGE:"Mesazh zanor",CONTACT_INFORMATION_HIDDEN:"informacione të fshehura",LEAVE_CONVERSATION:"Largohu nga bashkëbisedimi",MARK_CONVERSATION_AS_UNREAD:"Shëno si të palexuar",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reagime me ${t}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(e,t)=>`Duke u përgjigjur ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demo notifikacija`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Ako karticu pregledača ostavite otvorenu, pojaviće se ovaj pop-up kada neko razgovara s vama.",SEND_BUTTON_TEXT:"Pošalji",ENTRYBOX_TEXT_LIMIT:"Dozvoljeno je samo 10.000 znakova.",ENTRYBOX_PLACEHOLDER:"Kaži nešto...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ovaj razgovor više nije aktivan.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Možete da čitate, ali ne i da šaljete poruke.",MESSAGELIST_LOADING_OLDER:"Učitavam starije poruke...",MESSAGELIST_SHOW_OLDER:"Prikaži starije poruke",MESSAGELIST_NEW_MARKER:"Novo",MESSAGE_SENT_VIA_EMAIL:"Ova poruka je poslana imejlom",YOU_MARKER:"ti",UPLOAD_IN_PROGRESS:"Učitavam...",UPLOAD_SEND_FILE:"Pošalji datoteku",UPLOAD_SHARE_LOCATION:"Podeli lokaciju",UPLOAD_ERROR:"Nažalost, nešto je pošlo krivo. Datoteka možda nije podržana ili je prevelika.",SHARE_LOCATION_ERROR:"Nije moguće podeliti lokaciju: ",LOADING:"Učitavam...",HUB_EMPTY:"Ovde će biti prikazana istorija razgovora",HUB_SHOW_EARLIER:"Prikaži ranije razgovore",INBOX_NO_CHATS_TITLE:"Nema razgovora!",INBOX_NO_CHATS_BODY:"Nakon što vodite jedan ili više razgovora, oni će se pojaviti ovde.",ENABLE_TRANSLATION:"Prevedi ovaj razgovor na srpski jezik",DISABLE_TRANSLATION:"Prikaži original",SEARCH_PLACEHOLDER_TEXT:"Pretraži...",SEARCH_SEARCHING:"Pretraživanje...",SEARCH_NO_RESULTS:"Nema rezultata",SEARCH_NO_MORE_RESULTS:"Nema više rezultata",CHAT_NOT_FOUND:"Ćaskanje nije pronađeno",DELETE_MESSAGE:"Izbriši poruku",DELETION_EXPLANATION:"Ako obrišete ovu poruku, ona neće biti vidljiva ni za koga.",EDIT_MESSAGE:"Ispravi poruku",SAVE:"Sačuvaj",EDITED_INDICATOR:"ispravljeno",REPLY_TO_MESSAGE:"Odgovorite",ADD_REACTION:"Dodaj reakciju",AUTH_EXPIRED_OVERLAY_TITLE:"Vaša sesija ćaskanja je istekla",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Osvežite stranicu da biste nastavili",VOICE_MESSAGE:"Glasovna poruka",CONTACT_INFORMATION_HIDDEN:"Sakrivene informacije",LEAVE_CONVERSATION:"Napusti razgovor",MARK_CONVERSATION_AS_UNREAD:"Označi kao nepročitanu",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакција са ${t}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(e,t)=>`Одговарање кориснику ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} demonotis`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Om du har fliken i webbläsaren öppen så kommer den här notisen visas när någon pratar med dig.",SEND_BUTTON_TEXT:"Skicka",ENTRYBOX_TEXT_LIMIT:"Max 10 000 tecken är tillåtet.",ENTRYBOX_PLACEHOLDER:"Skriv ett meddelande...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Den här konversationen är inte längre aktiv.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Du kan läsa men inte skicka meddelanden.",MESSAGELIST_LOADING_OLDER:"Läser in tidigare meddelanden...",MESSAGELIST_SHOW_OLDER:"Visa tidigare meddelanden",MESSAGELIST_NEW_MARKER:"Nytt",MESSAGE_SENT_VIA_EMAIL:"Detta meddelande skickades via e-post",YOU_MARKER:"du",UPLOAD_IN_PROGRESS:"Laddar upp...",UPLOAD_SEND_FILE:"Skicka fil",UPLOAD_SHARE_LOCATION:"Dela plats",UPLOAD_ERROR:"Något gick fel vid uppladdningen. Filen kan vara av en typ som inte stöds eller är för stor.",SHARE_LOCATION_ERROR:"Kan inte dela plats: ",LOADING:"Laddar...",HUB_EMPTY:"Din chatthistorik kommer att visas här",HUB_SHOW_EARLIER:"Visa tidigare chattar",INBOX_NO_CHATS_TITLE:"Inga chattar ännu!",INBOX_NO_CHATS_BODY:"När du har haft en eller flera konversationer kommer de att visas här.",ENABLE_TRANSLATION:"Översätt den här konversationen till svenska",DISABLE_TRANSLATION:"Visa original",SEARCH_PLACEHOLDER_TEXT:"Sök...",SEARCH_SEARCHING:"Söker...",SEARCH_NO_RESULTS:"Inga resultat hittades",SEARCH_NO_MORE_RESULTS:"Inga fler resultat",CHAT_NOT_FOUND:"Chatten hittades inte",DELETE_MESSAGE:"Radera meddelandet",DELETION_EXPLANATION:"Om du raderar det här meddelandet försvinner det för alla.",EDIT_MESSAGE:"Redigera meddelandet",SAVE:"Spara",EDITED_INDICATOR:"redigerad",REPLY_TO_MESSAGE:"Svara",ADD_REACTION:"Lägg till reaktion",AUTH_EXPIRED_OVERLAY_TITLE:"Din chatsession har gått ut",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Uppdatera sidan för att fortsätta",VOICE_MESSAGE:"Röstmeddelande",CONTACT_INFORMATION_HIDDEN:"Dold information",LEAVE_CONVERSATION:"Lämna konversationen",MARK_CONVERSATION_AS_UNREAD:"Markera som oläst",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(e,t)=>`Svarar på ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} test bildirimi`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Eğer tarayıcınızın penceresini açık tutarsanız biri mesaj yazdığında bu bildirimi göreceksiniz.",MESSAGE_SENT_VIA_EMAIL:"Bu mesaj e-posta ile gönderilmiştir.",YOU_MARKER:"siz",UPLOAD_IN_PROGRESS:"Yükleniyor...",UPLOAD_SEND_FILE:"Dosya gönder",UPLOAD_SHARE_LOCATION:"Konum paylaş",UPLOAD_ERROR:"Yükleme sırasında bir şeyler yanlış gitti. Dosya desteklenmiyor veya izin verilenden büyük olabilir.",SHARE_LOCATION_ERROR:"Konum paylaşılamadı: ",LOADING:"Yükleniyor...",HUB_EMPTY:"Konuşma geçmişiniz burada görünecek",HUB_SHOW_EARLIER:"Önceki konuşmaları göster",INBOX_NO_CHATS_TITLE:"Henüz konuşma yok!",INBOX_NO_CHATS_BODY:"Bir veya daha fazla konuşma başlattığınız konuşmalar burada belirecek.",ENABLE_TRANSLATION:"Bu konuşmayı Türkçe'ye çevir",DISABLE_TRANSLATION:"Orijinali göster",SEARCH_PLACEHOLDER_TEXT:"Ara...",SEARCH_SEARCHING:"Arıyor...",SEARCH_NO_RESULTS:"Sonuç bulunamadı",SEARCH_NO_MORE_RESULTS:"Başka sonuç bulunamadı.",CHAT_NOT_FOUND:"Sohbet bulunamadı",DELETE_MESSAGE:"Mesajı sil",DELETION_EXPLANATION:"Bu mesajı silerseniz herkes için görünmez olacaktır.",EDIT_MESSAGE:"Mesajı düzenle",SAVE:"Kaydet",EDITED_INDICATOR:"düzenlenmiş",REPLY_TO_MESSAGE:"Yanıtla",ADD_REACTION:"Tepki ekle",AUTH_EXPIRED_OVERLAY_TITLE:"Sohbet oturumunuz sona erdi",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Devam etmek için sayfayı yenileyin",VOICE_MESSAGE:"Sesli mesaj",CONTACT_INFORMATION_HIDDEN:"Gizli bilgi",LEAVE_CONVERSATION:"Konuşmadan ayrıl",MARK_CONVERSATION_AS_UNREAD:"Okunmamış olarak işaretle",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(e,t)=>`${e} tepki (${t})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(e,t)=>`${e}'a yanıtlama: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Демо-повідомлення про ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Якщо ви відкриєте вкладку веб-переглядача відкритою, ви побачите це спливаюче вікно, коли хтось спілкується з вами.",SEND_BUTTON_TEXT:"Надіслати",ENTRYBOX_TEXT_LIMIT:"Дозволено лише 10 000 символів.",ENTRYBOX_PLACEHOLDER:"Скажи щось...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Ця розмова більше не активна.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Ви можете читати, але не надсилати повідомлення.",MESSAGELIST_LOADING_OLDER:"Завантаження старих повідомлень...",MESSAGELIST_SHOW_OLDER:"Показати старіші повідомлення",MESSAGELIST_NEW_MARKER:"Нові",MESSAGE_SENT_VIA_EMAIL:"Це повідомлення надіслано електронною поштою",YOU_MARKER:"ти",UPLOAD_IN_PROGRESS:"Завантаження...",UPLOAD_SEND_FILE:"Надіслати файл",UPLOAD_SHARE_LOCATION:"Поділитися місцезнаходженням",UPLOAD_ERROR:"На жаль, під час завантаження щось не вдалось. Файл може бути непідтримуваним або занадто великим.",SHARE_LOCATION_ERROR:"Неможливо поділити місцезнаходження: ",LOADING:"Завантаження...",HUB_EMPTY:"Тут відобразиться ваша історія чатів",HUB_SHOW_EARLIER:"Показати попередні чати",INBOX_NO_CHATS_TITLE:"Чатів ще немає!",INBOX_NO_CHATS_BODY:"Після того, як ви проведете одну чи кілька бесід, вони з’являться тут.",ENABLE_TRANSLATION:"Перекласти цю розмову англійською",DISABLE_TRANSLATION:"Показати оригінал",SEARCH_PLACEHOLDER_TEXT:"Пошук...",SEARCH_SEARCHING:"Пошук...",SEARCH_NO_RESULTS:"Не знайдено результатів",SEARCH_NO_MORE_RESULTS:"Більше немає результатів",CHAT_NOT_FOUND:"Чат не знайдено",DELETE_MESSAGE:"Видалити повідомлення",DELETION_EXPLANATION:"Якщо ви видалите це повідомлення, воно зникне для всіх.",EDIT_MESSAGE:"Редагувати повідомлення",SAVE:"Зберегти",EDITED_INDICATOR:"відредаговано",REPLY_TO_MESSAGE:"Відповісти",ADD_REACTION:"Додати реакцію",AUTH_EXPIRED_OVERLAY_TITLE:"Ваша сесія в чаті закінчилась",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Оновіть сторінку, щоб продовжити",VOICE_MESSAGE:"Голосове повідомлення",CONTACT_INFORMATION_HIDDEN:"Прихована інформація",LEAVE_CONVERSATION:"Залишити розмову",MARK_CONVERSATION_AS_UNREAD:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(e,t)=>`${e} реакцій з ${t}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(e,t)=>`Відповідь на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} thông báo thử nghiệm`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Nếu bạn giữ tab trình duyệt của bạn mở, bạn sẽ thấy cửa sổ bật lên khi ai đó nói chuyện với bạn.",SEND_BUTTON_TEXT:"Gửi",ENTRYBOX_TEXT_LIMIT:"Tối đa 10.000 ký tự.",ENTRYBOX_PLACEHOLDER:"Nói gì đó...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cuộc hội thoại này không còn hoạt động.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Bạn có thể đọc, nhưng không thể gửi tin nhắn.",MESSAGELIST_LOADING_OLDER:"Đang tải tin nhắn cũ...",MESSAGELIST_SHOW_OLDER:"Hiển thị tin nhắn trước đó",MESSAGELIST_NEW_MARKER:"Mới",MESSAGE_SENT_VIA_EMAIL:"Tin nhắn này đã được gửi qua email",YOU_MARKER:"bạn",UPLOAD_IN_PROGRESS:"Đang tải lên...",UPLOAD_SEND_FILE:"Gửi tệp",UPLOAD_SHARE_LOCATION:"Chia sẻ vị trí",UPLOAD_ERROR:"Thật không may, quá trình tải lên không thành công. Tệp không được hỗ trợ hoặc quá lớn.",SHARE_LOCATION_ERROR:"Không thể chia sẻ vị trí: ",LOADING:"Đang tải...",HUB_EMPTY:"Lịch sử trò chuyện của bạn sẽ hiển thị ở đây",HUB_SHOW_EARLIER:"Hiển thị các cuộc trò chuyện trước đó",INBOX_NO_CHATS_TITLE:"Chưa có cuộc trò chuyện nào!",INBOX_NO_CHATS_BODY:"Khi bạn đã có một hoặc nhiều cuộc trò chuyện, chúng sẽ hiển thị ở đây.",ENABLE_TRANSLATION:"Dịch cuộc hội thoại sang Tiếng Việt",DISABLE_TRANSLATION:"Hiển thị nội dung gốc",SEARCH_PLACEHOLDER_TEXT:"TÌm kiếm...",SEARCH_SEARCHING:"Đang tìm kiếm...",SEARCH_NO_RESULTS:"Không tìm thấy kết quả nào",SEARCH_NO_MORE_RESULTS:"Không có kết quả nào khác",CHAT_NOT_FOUND:"Không tìm thấy cuộc trò chuyện",DELETE_MESSAGE:"Xóa tin nhắn",DELETION_EXPLANATION:"Nếu bạn xóa tin nhắn này, tất cả mọi người sẽ không còn thấy nó.",EDIT_MESSAGE:"Chỉnh sửa tin nhắn",SAVE:"lưu",EDITED_INDICATOR:"đã chỉnh sửa",REPLY_TO_MESSAGE:"đáp lại",ADD_REACTION:"Thêm biểu tượng cảm xúc",AUTH_EXPIRED_OVERLAY_TITLE:"Phiên trò chuyện của bạn đã hết hạn",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Hãy làm mới trang để tiếp tục",VOICE_MESSAGE:"Tin nhắn thoại",CONTACT_INFORMATION_HIDDEN:"Thông tin ẩn",LEAVE_CONVERSATION:"Thoát khỏi cuộc trò chuyện",MARK_CONVERSATION_AS_UNREAD:"Đánh dấu là chưa đọc",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(e,t)=>`${e} phản ứng với ${t}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(e,t)=>`Đang trả lời ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示提醒`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"只要保持浏览器开着,如果有人和你对话,将会自动弹出对话窗口。",SEND_BUTTON_TEXT:"发送",ENTRYBOX_TEXT_LIMIT:"不超过10,000个字符。",ENTRYBOX_PLACEHOLDER:"写点什么吧……",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"该对话已结束。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"你只能阅读信息,不能发送信息。",MESSAGELIST_LOADING_OLDER:"载入之前的信息……",MESSAGELIST_SHOW_OLDER:"显示之前的信息",MESSAGELIST_NEW_MARKER:"新消息",MESSAGE_SENT_VIA_EMAIL:"该信息已通过邮件发送。",YOU_MARKER:"你",UPLOAD_IN_PROGRESS:"上传中……",UPLOAD_SEND_FILE:"发送文件",UPLOAD_SHARE_LOCATION:"分享地址",UPLOAD_ERROR:"上传出错。文件格式不支持或者太大。",SHARE_LOCATION_ERROR:"无法分享地址: ",LOADING:"正在载入……",HUB_EMPTY:"你的聊天记录将在此显示。",HUB_SHOW_EARLIER:"显示之前的聊天记录。",INBOX_NO_CHATS_TITLE:"暂无任何聊天记录!",INBOX_NO_CHATS_BODY:"如果你有一个或多个对话窗口进行中,将显示在这里。",ENABLE_TRANSLATION:"翻译至简体中文",DISABLE_TRANSLATION:"查看原文",SEARCH_PLACEHOLDER_TEXT:"搜索...",SEARCH_SEARCHING:"正在搜索...",SEARCH_NO_RESULTS:"未找到结果",SEARCH_NO_MORE_RESULTS:"无更多结果",CHAT_NOT_FOUND:"未找到“聊天”",DELETE_MESSAGE:"删除消息",DELETION_EXPLANATION:"如果您删除此消息,那么所有人都将无法再看到它。",EDIT_MESSAGE:"编辑消息",SAVE:"保存",EDITED_INDICATOR:"本消息有改动",REPLY_TO_MESSAGE:"回复",ADD_REACTION:"添加反应",AUTH_EXPIRED_OVERLAY_TITLE:"您的聊天会话已过期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"刷新页面以继续",VOICE_MESSAGE:"语音消息",CONTACT_INFORMATION_HIDDEN:"隐藏信息",LEAVE_CONVERSATION:"离开对话",MARK_CONVERSATION_AS_UNREAD:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(e,t)=>`${e}个反应(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回复 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示通知`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"如果您持續打開瀏覽器標籤頁,當有人與您通話時,您會看到此彈出窗口。",SEND_BUTTON_TEXT:"發送",ENTRYBOX_TEXT_LIMIT:"只允許10.000個字符。",ENTRYBOX_PLACEHOLDER:"說些什麼...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"此對話不再有效。",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"您可以閱讀,但不能發送消息。",MESSAGELIST_LOADING_OLDER:"加載舊訊息...",MESSAGELIST_SHOW_OLDER:"顯示較舊的訊息",MESSAGELIST_NEW_MARKER:"新的",MESSAGE_SENT_VIA_EMAIL:"此訊息是通過電郵發送的",YOU_MARKER:"您",UPLOAD_IN_PROGRESS:"上傳中...",UPLOAD_SEND_FILE:"發送文件",UPLOAD_SHARE_LOCATION:"共享位置",UPLOAD_ERROR:"不幸的是,上傳出了問題。 該文件可能不受支持或太大。",SHARE_LOCATION_ERROR:"無法分享位置:",LOADING:"載入中...",HUB_EMPTY:"您的聊天記錄將顯示在此處",HUB_SHOW_EARLIER:"顯示早先的聊天記錄",INBOX_NO_CHATS_TITLE:"還沒聊天!",INBOX_NO_CHATS_BODY:"一旦您進行了一次或多次對話,他們就會顯示在此處。",ENABLE_TRANSLATION:"翻譯此對話至繁體中文",DISABLE_TRANSLATION:"顯示原文",SEARCH_PLACEHOLDER_TEXT:"搜尋...",SEARCH_SEARCHING:"正在搜尋...",SEARCH_NO_RESULTS:"找不到任何結果",SEARCH_NO_MORE_RESULTS:"沒有其他結果",CHAT_NOT_FOUND:"查無對話",DELETE_MESSAGE:"刪除訊息",DELETION_EXPLANATION:"您如果刪除這條訊息,所有人都將看不到它。",EDIT_MESSAGE:"編輯訊息",SAVE:"儲存",EDITED_INDICATOR:"已編輯",REPLY_TO_MESSAGE:"回覆",ADD_REACTION:"加入表情回應",AUTH_EXPIRED_OVERLAY_TITLE:"您的會話過程已過期",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"請刷新頁面以繼續",VOICE_MESSAGE:"語音訊息",CONTACT_INFORMATION_HIDDEN:"隱藏訊息",LEAVE_CONVERSATION:"離開對話",MARK_CONVERSATION_AS_UNREAD:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(e,t)=>`${e}個反應(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回覆 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式"}}},Zf=()=>{const e=document.createElement("canvas");e.width=e.height=1;const t=e.getContext("2d");return t.textBaseline="top",t.font='100px "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Twemoji Mozilla","Noto Color Emoji","EmojiOne Color","Android Emoji",sans-serif',t.scale(.01,.01),t},sd=(e,t)=>{const n=Zf();return n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data},eg=e=>!e.includes("")||Zf().measureText(e).width<160,ng=(e,t)=>{const n=[...e].join(",");return n===[...t].join(",")&&!n.startsWith("0,0,0,")};function Qf(e){try{return function(t){const n=sd(t,"#000"),r=sd(t,"#fff"),i=eg(t);return n&&r&&i&&ng(n,r)}(e)}catch(t){return!0}}var Np;const tm=(Np=globalThis.window)!=null&&Np.document?function(){if(typeof window=="undefined"||window.E2E)return 16;const e={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[t,n]of Object.entries(e))if(Qf(t))return n}():0;class em{constructor(t,n){this.currentUser$=It(null),this.app$=It(null),this.appId$=It(null),this.extUserId$=It(null),this.authTokenState$=It("idle"),this.themeCustom$=It(Hu({value:void 0})),this.device$=It({supportsEmojiPicker:!!tm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=It({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.locale$=It(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=It(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=od[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=od[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(je.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...kr.translation,locale:"en-US"},emojiPickerTranslationUrl:kr.emojiPickerTranslationUrl,emojiDataUrl:kr.emojiDataUrl})}(this.locale$.get())),this.t$=It(()=>this.translationData$.strings.get()),Vr(()=>{this.appId$.set(t),this.extUserId$.set(n)})}updateThemeCustom(t){this.themeCustom$.set(Hu({value:t}))}listenForErrors(t,n){this.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const r=t.onError(s=>{je.error(s.message),this.errors$.serverError.set(!0)}),i=t.currentUser.subscribe(s=>{this.errors$.unknownUser.set(s===null)}),o=n&&t.conversation(n).subscribe(s=>{this.errors$.unknownConversation.set(s===null)});return()=>{r.unsubscribe(),i.unsubscribe(),o==null||o.unsubscribe()}}listenForAuthChanges(t,n){let r=!0;this.authTokenState$.peek()!=="loading"&&this.authTokenState$.set("loading"),t._authProvider.getToken().then(()=>{r&&this.authTokenState$.set("valid")});const i=t._authProvider.onTokenRefreshFailed(()=>{r&&this.authTokenState$.set(n?"invalid":"expired")});return()=>{r=!1,i()}}listenForUserAndAppChanges(t,n){let r=!0,i=null;const o=t.currentUser.subscribe(async s=>{if(r&&s&&(this.currentUser$.set(s),s.role!==i)){i=s.role;const a=await n.getApp(s.role);if(!r)return;this.app$.set(a)}});return()=>{r=!1,o.unsubscribe()}}}const rg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class nm extends em{constructor(t,n){super(t,n),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=It({extCurrentConversationId:null,editor:{isEmpty:!0,isTyping:!1,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},referencedMessageId:null,editingMessageId:null,currentConversation:null,visibility:{isInView:!1,tabFocused:!0},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},userPermissions:()=>{const r=this.app$.role.general.get(),i=this.app$.role.permissions.get();return ft.defined(r),ft.defined(i),{showTypingIndicator:r.showTypingIndicators,canShareFile:r.enableFileTransfers,canShareLocation:r.enableLocation,canMention:r.enableMentions,showOnlineStatus:r.enablePresence!==!1,canSendVoiceMessage:r.enableVoiceRecording,canLeaveConversation:i.conversations.leave==="all",canMarkConversationAsUnread:i.conversations.markAsUnread==="all"}},messagePermissions:()=>{const r=this.app$.role.permissions.get();ft.defined(r);const i=this.state$.userPermissions.get(),o={...rg,...i},s={canReplyToMessage:An(r.messages.reply,!0),canEditMessage:An(r.messages.edit,!0),canDeleteMessage:An(r.messages.delete,!0),canAddReaction:An(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:An(r.messages.reply,!1),canEditMessage:An(r.messages.edit,!1),canDeleteMessage:An(r.messages.delete,!1),canAddReaction:An(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=It(()=>{const r=this.state$.extCurrentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=It(()=>{var f,p;const r=this.state$.extCurrentConversationId.get();if(!r)return[];const i=this.state$.currentConversation.readUntil.get(),o=(f=this.state$.messages.child(r).state.get())!=null?f:[],s=Object.values((p=this.state$.ephemeralMessages.child(r).get())!=null?p:{}),a=s.length===0?o:s.concat(o).sort((m,E)=>E.createdAt-m.createdAt),l=a.map(m=>{const E=m.content[0],A=E==null?void 0:E.type;if(!E||A!=="file")return m;const _=E.size+","+E.filename,O=this.state$.localFileBlobUrls.child(r).child(_).url.get();return O?{...m,content:[{...E,url:O}]}:m});let c=null,u=0,d=!1;const h=[];for(const m of l){const E=new Date(m.createdAt),A=new Date(E).setHours(0,0,0,0),_=u&&A!==u,O=E.getTime()>i,S=!(!d||O||c!=null&&c.id.startsWith("ephemeral"));(S||_)&&h.push(new dl({id:"border-before-"+m.id,isDayMarker:!!_,isReadMarker:!!S,timestamp:_?u:void 0})),h.push(m),d=O,u=A,c=m}return function(m,E){const A=[];let _=[];const O=Symbol("NO_KEY");let S=O;for(const T of m){const b=E(T);S===O||S===b?_.push(T):(A.push(_),_=[T]),S=b}return _.length!==0&&A.push(_),A}(h,m=>{var E;return m instanceof dl?m.id:(E=m.sender)==null?void 0:E.id}).map(m=>(m.id=m.map(E=>E.id).join(","),m))})}storeTyping(t,n){this.state$.typing.child(t).set(n)}messagePermissions$(t){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=t.content[0];return t.sender?n.id===t.sender.id?r.type==="text"?this.state$.messagePermissions.own:this.state$.messagePermissions.ownWithoutEditing:r.type==="text"?this.state$.messagePermissions.other:this.state$.messagePermissions.otherWithoutEditing:this.state$.messagePermissions.system}storeMessages(t,n,r){Vr(()=>{var l;const i=n.reduce((c,u)=>(c[u.id]=u,c),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();ft(s&&o),this.state$.messages.child(t).set({state:n,lookup:i,loadedAll:r});const a=this.state$.ephemeralMessages.child(t);for(const c of n){const u=this.state$.ephemeralMessageIdMapping.child(t).child(c.id).peek();u&&a.child(u).delete();const d=c.content[0];if(((l=c.sender)==null?void 0:l.id)!==s||d.type!=="file")continue;const h=d.size+","+d.filename,f=this.state$.localFileBlobUrls.child(o).child(h);if(f.fetching.peek()!==!1)continue;const p=()=>f.delete();if(d.subtype==="image"){f.fetching.set(!0);const m=document.createElement("img");m.addEventListener("load",p,{once:!0}),m.src=d.url}else if(d.subtype==="video"){f.fetching.set(!0);const m=document.createElement("video");m.addEventListener("loaddata",p,{once:!0}),m.src=d.url}else if(d.subtype==="audio"){f.fetching.set(!0);const m=document.createElement("audio");m.addEventListener("loaddata",p,{once:!0}),m.src=d.url}}})}}function An(e,t){return e==="all"||e==="own"&&t||e==="other"&&!t}class dl{constructor({id:t,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=t,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function Fe(e,t=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Fe(i.children)+"*";case"italic":return"_"+Fe(i.children)+"_";case"strikethrough":return"~"+Fe(i.children)+"~";case"blockquote":return Fe(i.children).split(`
|
|
2
2
|
`).map(o=>"> "+o).join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`;case"autolink":case"autoLink":case"suppressed":case"emoji":return i.text;case"codeblock":case"codeBlock":return"```"+i.language+`
|
|
5
|
-
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${
|
|
6
|
-
`+
|
|
7
|
-
`}}).join("")}(n,e).trim()}class Id{constructor(e,t,r,i,o){this.send=t,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.isEmpty=e.isEmpty,this.isTyping=e.isTyping,this.atTextLimit=e.atTextLimit,this.characterCount=e.characterCount,this.showEmojiPicker=e.showEmojiPicker}}function Me(n){this.content=n}function Rm(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),o=e.child(r);if(i!=o){if(!i.sameMarkup(o))return t;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)t++;return t}if(i.content.size||o.content.size){let s=Rm(i.content,o.content,t+1);if(s!=null)return s}t+=i.nodeSize}else t+=i.nodeSize}}function Cm(n,e,t,r){for(let i=n.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:t,b:r};let s=n.child(--i),a=e.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:t,b:r};if(s.isText&&s.text!=a.text){let u=0,c=Math.min(s.text.length,a.text.length);for(;u<c&&s.text[s.text.length-u-1]==a.text[a.text.length-u-1];)u++,t--,r--;return{a:t,b:r}}if(s.content.size||a.content.size){let u=Cm(s.content,a.content,t-1,r-1);if(u)return u}t-=l,r-=l}else t-=l,r-=l}}Me.prototype={constructor:Me,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),o=r.content.slice();return i==-1?o.push(t||n,e):(o[i+1]=e,t&&(o[i]=t)),new Me(o)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Me(t)},addToStart:function(n,e){return new Me([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Me(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),o=r.find(n);return i.splice(o==-1?i.length:o,0,e,t),new Me(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return(n=Me.from(n)).size?new Me(n.content.concat(this.subtract(n).content)):this},append:function(n){return(n=Me.from(n)).size?new Me(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Me.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}},Me.from=function(n){if(n instanceof Me)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Me(e)};class B{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,o){for(let s=0,a=0;a<t;s++){let l=this.content[s],u=a+l.nodeSize;if(u>e&&r(l,i+a,o||null,s)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,t-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=u},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new B(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let o=0,s=0;s<t;o++){let a=this.content[o],l=s+a.nodeSize;l>e&&((s<e||l>t)&&(a=a.isText?a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),r.push(a),i+=a.nodeSize),s=l}return new B(r,i)}cutByIndex(e,t){return e==t?B.empty:e==0&&t==this.content.length?this:new B(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),o=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new B(i,o)}addToStart(e){return new B([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new B(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Rm(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Cm(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ko(0,e);if(e==this.size)return ko(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=i+this.child(r).nodeSize;if(o>=e)return o==e||t>0?ko(r+1,o):ko(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return B.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new B(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return B.empty;let t,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(t||(t=e.slice(0,i)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new B(t||e,r)}static from(e){if(!e)return B.empty;if(e instanceof B)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new B([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}B.empty=new B([],0);const Oa={index:0,offset:0};function ko(n,e){return Oa.index=n,Oa.offset=e,Oa}function ps(n,e){if(n===e)return!0;if(!n||typeof n!="object"||!e||typeof e!="object")return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!ps(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!ps(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}class se{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(o)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&ps(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return se.none;if(e instanceof se)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}}se.none=[];class Vr extends Error{}class x{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vm(this.content,e+this.openStart,t);return r&&new x(r,this.openStart,this.openEnd)}removeBetween(e,t){return new x(Im(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return x.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new x(B.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)i++;return new x(e,r,i)}}function Im(n,e,t){let{index:r,offset:i}=n.findIndex(e),o=n.maybeChild(r),{index:s,offset:a}=n.findIndex(t);if(i==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(r,o.copy(Im(o.content,e-i-1,t-i-1)))}function vm(n,e,t,r){let{index:i,offset:o}=n.findIndex(e),s=n.maybeChild(i);if(o==e||s.isText)return n.cut(0,e).append(t).append(n.cut(e));let a=vm(s.content,e-o-1,t);return a&&n.replaceChild(i,s.copy(a))}function kg(n,e,t){if(t.openStart>n.depth)throw new Vr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Vr("Inconsistent open depths");return Nm(n,e,t,0)}function Nm(n,e,t,r){let i=n.index(r),o=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let s=Nm(n,e,t,r+1);return o.copy(o.content.replaceChild(i,s))}if(t.content.size){if(t.openStart||t.openEnd||n.depth!=r||e.depth!=r){let{start:s,end:a}=function(l,u){let c=u.depth-l.openStart,d=u.node(c).copy(l.content);for(let h=c-1;h>=0;h--)d=u.node(h).copy(B.from(d));return{start:d.resolveNoCache(l.openStart+c),end:d.resolveNoCache(d.content.size-l.openEnd-c)}}(t,n);return Xn(o,bm(n,s,a,e,r))}{let s=n.parent,a=s.content;return Xn(s,a.cut(0,n.parentOffset).append(t.content).append(a.cut(e.parentOffset)))}}return Xn(o,fs(n,e,r))}function ym(n,e){if(!e.type.compatibleContent(n.type))throw new Vr("Cannot join "+e.type.name+" onto "+n.type.name)}function Rl(n,e,t){let r=n.node(t);return ym(r,e.node(t)),r}function Wn(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Li(n,e,t,r){let i=(e||n).node(t),o=0,s=e?e.index(t):i.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(Wn(n.nodeAfter,r),o++));for(let a=o;a<s;a++)Wn(i.child(a),r);e&&e.depth==t&&e.textOffset&&Wn(e.nodeBefore,r)}function Xn(n,e){return n.type.checkContent(e),n.copy(e)}function bm(n,e,t,r,i){let o=n.depth>i&&Rl(n,e,i+1),s=r.depth>i&&Rl(t,r,i+1),a=[];return Li(null,n,i,a),o&&s&&e.index(i)==t.index(i)?(ym(o,s),Wn(Xn(o,bm(n,e,t,r,i+1)),a)):(o&&Wn(Xn(o,fs(n,e,i+1)),a),Li(e,t,i,a),s&&Wn(Xn(s,fs(t,r,i+1)),a)),Li(r,null,i,a),new B(a)}function fs(n,e,t){let r=[];return Li(null,n,t,r),n.depth>t&&Wn(Xn(Rl(n,e,t+1),fs(n,e,t+1)),r),Li(e,null,t,r),new B(r)}x.empty=new x(B.empty,0,0);class Wi{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return(e=this.resolveDepth(e))==0?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[3*t],i=t==0?0:this.path[3*t-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return se.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new wg(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),u=o-l;if(r.push(s,a,i+l),!u||(s=s.child(a),s.isText))break;o=u-1,i+=l+1}return new Wi(t,r,o)}static resolveCached(e,t){for(let i=0;i<Sa.length;i++){let o=Sa[i];if(o.pos==t&&o.doc==e)return o}let r=Sa[Ta]=Wi.resolve(e,t);return Ta=(Ta+1)%Lg,r}}let Sa=[],Ta=0,Lg=12;class wg{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Mg=Object.create(null);let Kn=class Cl{constructor(e,t,r,i=se.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||B.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&ps(this.attrs,t||e.defaultAttrs||Mg)&&se.sameSet(this.marks,r||se.none)}copy(e=null){return e==this.content?this:new Cl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Cl(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return x.empty;let i=this.resolve(e),o=this.resolve(t),s=r?0:i.sharedDepth(t),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new x(l,i.depth-s,o.depth-s)}replace(e,t,r){return kg(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Wi.resolveCached(this,e)}resolveNoCache(e){return Wi.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),km(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=B.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=se.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!se.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=B.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};Kn.prototype.text=void 0;class ms extends Kn{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):km(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ms(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ms(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function km(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Qn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Fg(e,t);if(r.next==null)return Qn.empty;let i=Lm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Nd(s,0));function l(u){let c=[];u.forEach(h=>{s[h].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<c.length;E++)c[E][0]==p&&(m=c[E][1]);Nd(s,f).forEach(E=>{m||c.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[u.join(",")]=new Qn(u.indexOf(s.length-1)>-1);for(let h=0;h<c.length;h++){let p=c[h][1].sort(wm);d.next.push({type:c[h][0],next:a[p.join(",")]||l(p)})}return d}}(function(s){let a=[[]];return c(d(s,0),l()),a;function l(){return a.push([])-1}function u(h,p,f){let m={term:f,to:p};return a[h].push(m),m}function c(h,p){h.forEach(f=>f.to=p)}function d(h,p){if(h.type=="choice")return h.exprs.reduce((f,m)=>f.concat(d(m,p)),[]);if(h.type!="seq"){if(h.type=="star"){let f=l();return u(p,f),c(d(h.expr,f),f),[u(f)]}if(h.type=="plus"){let f=l();return c(d(h.expr,p),f),c(d(h.expr,f),f),[u(f)]}if(h.type=="opt")return[u(p)].concat(d(h.expr,p));if(h.type=="range"){let f=p;for(let m=0;m<h.min;m++){let E=l();c(d(h.expr,f),E),f=E}if(h.max==-1)c(d(h.expr,f),f);else for(let m=h.min;m<h.max;m++){let E=l();u(f,E),c(d(h.expr,f),E),f=E}return[u(f)]}if(h.type=="name")return[u(p,void 0,h.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=d(h.exprs[f],p);if(f==h.exprs.length-1)return m;c(m,p=l())}}}(i));return function(s,a){for(let l=0,u=[s];l<u.length;l++){let c=u[l],d=!c.validEnd,h=[];for(let p=0;p<c.next.length;p++){let{type:f,next:m}=c.next[p];h.push(f.name),!d||f.isText||f.hasRequiredAttrs()||(d=!1),u.indexOf(m)==-1&&u.push(m)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let o=t;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];return function o(s,a){let l=s.matchFragment(e,r);if(l&&(!t||l.validEnd))return B.from(a.map(u=>u.createAndFill()));for(let u=0;u<s.next.length;u++){let{type:c,next:d}=s.next[u];if(!c.isText&&!c.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(c));if(h)return h}}return null}(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in t||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}(this),e.map((t,r)=>{let i=r+(t.validEnd?"*":" ")+" ";for(let o=0;o<t.next.length;o++)i+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return i}).join(`
|
|
8
|
-
`)}}Qn.empty=new Qn(!0);class Fg{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Lm(n){let e=[];do e.push(Pg(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Pg(n){let e=[];do e.push(xg(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function xg(n){let e=function(t){if(t.eat("(")){let r=Lm(t);return t.eat(")")||t.err("Missing closing paren"),r}if(!/\W/.test(t.next)){let r=function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let u in s){let c=s[u];c.groups.indexOf(o)>-1&&l.push(c)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l}(t,t.next).map(i=>(t.inline==null?t.inline=i.isInline:t.inline!=i.isInline&&t.err("Mixing inline and block content"),{type:"name",value:i}));return t.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}t.err("Unexpected token '"+t.next+"'")}(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else{if(!n.eat("{"))break;e=Bg(n,e)}return e}function vd(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Bg(n,e){let t=vd(n),r=t;return n.eat(",")&&(r=n.next!="}"?vd(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function wm(n,e){return e-n}function Nd(n,e){let t=[];return function r(i){let o=n[i];if(o.length==1&&!o[0].term)return r(o[0].to);t.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||t.indexOf(l)!=-1||r(l)}}(e),t.sort(wm)}function Mm(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Fm(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let o=n[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}t[r]=i}return t}function Pm(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new Hg(n[t]);return e}let yd=class xm{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Pm(r.attrs),this.defaultAttrs=Mm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Qn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Fm(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Kn(this,this.computeAttrs(e),B.from(t),se.setFrom(r))}createChecked(e=null,t,r){return t=B.from(t),this.checkContent(t),new Kn(this,this.computeAttrs(e),t,se.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),(t=B.from(t)).size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let i=this.contentMatch.matchFragment(t),o=i&&i.fillBefore(B.empty,!0);return o?new Kn(this,e,t.append(o),se.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:se.none:e}static compile(e,t){let r=Object.create(null);e.forEach((o,s)=>r[o]=new xm(o,t,s));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Hg{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ys{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=Pm(i.attrs),this.excluded=null;let o=Mm(this.attrs);this.instance=o?new se(this,o):null}create(e=null){return!e&&this.instance?this.instance:new se(this,Fm(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new Ys(o,i++,t,s)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}function bd(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],o=n.marks[i],s=o;if(o)t.push(o);else for(let a in n.marks){let l=n.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Xi{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new wd(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new wd(this,t,!0);return r.addAll(e,t.from,t.to),x.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if($g(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||t.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,t,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<t.length;s++){let a=t[s];if((a.priority==null?50:a.priority)<o)break}t.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Md(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Md(s)),s.node||s.ignore||s.mark||(s.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Xi(e,Xi.schemaRules(e)))}}const Bm={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Ug={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},kd={ol:!0,ul:!0};function Ld(n,e,t){return e!=null?(e?1:0)|(e==="full"?2:0):n&&n.whitespace=="pre"?3:-5&t}class Ra{constructor(e,t,r,i,o,s,a){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=i,this.solid=o,this.options=a,this.content=[],this.activeMarks=se.none,this.stashMarks=[],this.match=s||(4&a?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(B.from(e));if(!t){let r,i=this.type.contentMatch;return(r=i.findWrapping(e.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let t=B.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(B.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let i=r[t];(this.type?this.type.allowsMarkType(i.type):jg(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Bm.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class wd{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i,o=t.topNode,s=Ld(null,t.preserveWhitespace,0)|(r?4:0);i=o?new Ra(o.type,o.attrs,se.none,se.none,!0,t.topMatch||o.type.contentMatch,s):new Ra(r?null:e.schema.topNodeType,null,se.none,se.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let i=this.readStyles(function(l){let u,c=/\s*([\w-]+)\s*:\s*([^;]+)/g,d=[];for(;u=c.exec(l);)d.push(u[1],u[2].trim());return d}(r));if(!i)return;let[o,s]=i,a=this.top;for(let l=0;l<s.length;l++)this.removePendingMark(s[l],a);for(let l=0;l<o.length;l++)this.addPendingMark(o[l]);t();for(let l=0;l<o.length;l++)this.removePendingMark(o[l],a);for(let l=0;l<s.length;l++)this.addPendingMark(s[l])}addTextNode(e){let t=e.nodeValue,r=this.top;if(2&r.options||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&r.options)t=2&r.options?t.replace(/\r\n?/g,`
|
|
9
|
-
`)
|
|
10
|
-
`))}ignoreFallback(e){e.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=se.none,r=se.none;for(let i=0;i<e.length;i+=2)for(let o;;){let s=this.parser.matchStyle(e[i],e[i+1],this,o);if(!s)break;if(s.ignore)return null;if(s.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(a=>{s.clearMark(a)&&(r=a.addToSet(r))}):t=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(t),s.consuming!==!1)break;o=s}return[t,r]}addElementByRule(e,t,r){let i,o,s;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):i=this.enter(o,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(e,t,r){let i=t||0;for(let o=t?e.childNodes[t]:e.firstChild,s=r==null?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o);this.findAtPoint(e,i)}findPlace(e){let t,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,r=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(r);for(let i=0;i<t.length;i++)this.enterInner(t[i],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let i=0;i<e.marks.length;i++)t.type&&!t.type.allowsMarkType(e.marks[i].type)||(r=e.marks[i].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let i=this.findPlace(e.create(t));return i&&this.enterInner(e,t,!0,r),i}enterInner(e,t=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let s=Ld(e,i,o.options);4&o.options&&o.content.length==0&&(s|=4),this.nodes.push(new Ra(e,t,o.activeMarks,o.pendingMarks,r,null,s)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let u=t[a];if(u==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!c||c.name!=u&&c.groups.indexOf(u)==-1)return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=function(r,i){for(let o=0;o<i.length;o++)if(r.eq(i[o]))return i[o]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);let o=i.popFromStashMark(e);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==t)break}}}function $g(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Md(n){let e={};for(let t in n)e[t]=n[t];return e}function jg(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||o.indexOf(c)<0&&s(c))return!0}};if(s(i.contentMatch))return!0}}class rn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ca(t).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let u=s.marks[l];if(this.marks[u.type.name]){if(!u.eq(o[a][0])||u.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let u=s.marks[l++],c=this.serializeMark(u,s.isInline,t);c&&(o.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(s,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=rn.renderSpec(Ca(t),this.nodes[e.type.name](e));if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&rn.renderSpec(Ca(r),i(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i,o=t[0],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let a=r?e.createElementNS(r,o):e.createElement(o),l=t[1],u=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let c in l)if(l[c]!=null){let d=c.indexOf(" ");d>0?a.setAttributeNS(c.slice(0,d),c.slice(d+1),l[c]):a.setAttribute(c,l[c])}}for(let c=u;c<t.length;c++){let d=t[c];if(d===0){if(c<t.length-1||c>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:p}=rn.renderSpec(e,d,r);if(a.appendChild(h),p){if(i)throw new RangeError("Multiple content holes");i=p}}}return{dom:a,contentDOM:i}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Fd(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Fd(e.marks)}}function Fd(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ca(n){return n.document||window.document}const Hm=Math.pow(2,16);function zg(n,e){return n+e*Hm}function Pd(n){return 65535&n}let Il=class{constructor(n,e,t){this.pos=n,this.delInfo=e,this.recover=t}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},er=class pr{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&pr.empty)return pr.empty}recover(e){let t=0,r=Pd(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+t+function(i){return(i-(65535&i))/Hm}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:t:t)<0?0:c);if(r)return h;let p=e==(t<0?l:d)?null:zg(a/3,e-l),f=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(f|=8),new Il(h,f,p)}i+=c-u}return r?e+i:new Il(e+i,0,null)}touches(e,t){let r=0,i=Pd(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+t],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new pr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?pr.empty:new pr(e<0?[0,-e,0]:[0,0,e])}};er.empty=new er([]);let Vg=class Vo{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new Vo(this.maps,this.mirror,e,t)}copy(){return new Vo(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new Vo;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o].mapResult(e,t);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this.maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new Il(e,i,null)}};const Ia=Object.create(null);let Ve=class{getMap(){return er.empty}merge(n){return null}static fromJSON(n,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let t=Ia[e.stepType];if(!t)throw new RangeError(`No step type ${e.stepType} defined`);return t.fromJSON(n,e)}static jsonID(n,e){if(n in Ia)throw new RangeError("Duplicate use of step JSON ID "+n);return Ia[n]=e,e.prototype.jsonID=n,e}},Ze=class di{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new di(e,null)}static fail(e){return new di(null,e)}static fromReplace(e,t,r,i){try{return di.ok(e.replace(t,r,i))}catch(o){if(o instanceof Vr)return di.fail(o.message);throw o}}};function ju(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(ju(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return B.fromArray(r)}let zu=class hi extends Ve{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new x(ju(t.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),t.openStart,t.openEnd);return Ze.fromReplace(e,this.from,this.to,o)}invert(){return new wi(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new hi(t.pos,r.pos,this.mark)}merge(e){return e instanceof hi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new hi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new hi(t.from,t.to,e.markFromJSON(t.mark))}};Ve.jsonID("addMark",zu);let wi=class pi extends Ve{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new x(ju(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return Ze.fromReplace(e,this.from,this.to,r)}invert(){return new zu(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new pi(t.pos,r.pos,this.mark)}merge(e){return e instanceof pi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new pi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new pi(t.from,t.to,e.markFromJSON(t.mark))}};Ve.jsonID("removeMark",wi);let Vu=class fi extends Ve{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ze.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ze.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new fi(this.pos,t.marks[i]);return new fi(this.pos,this.mark)}}return new Yu(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new fi(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new fi(t.pos,e.markFromJSON(t.mark))}};Ve.jsonID("addNodeMark",Vu);let Yu=class vl extends Ve{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ze.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ze.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new Vu(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new vl(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new vl(t.pos,e.markFromJSON(t.mark))}};Ve.jsonID("removeNodeMark",Yu);let tn=class wn extends Ve{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Nl(e,this.from,this.to)?Ze.fail("Structure replace would overwrite content"):Ze.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new er([this.from,this.to-this.from,this.slice.size])}invert(e){return new wn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new wn(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof wn)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?x.empty:new x(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new wn(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?x.empty:new x(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new wn(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new wn(t.from,t.to,x.fromJSON(e,t.slice),!!t.structure)}};Ve.jsonID("replace",tn);let Un=class Yo extends Ve{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Nl(e,this.from,this.gapFrom)||Nl(e,this.gapTo,this.to)))return Ze.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ze.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Ze.fromReplace(e,this.from,this.to,r):Ze.fail("Content does not fit in gap")}getMap(){return new er([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Yo(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new Yo(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Yo(t.from,t.to,t.gapFrom,t.gapTo,x.fromJSON(e,t.slice),t.insert,!!t.structure)}};function Nl(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function xd(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}Ve.jsonID("replaceAround",Un);let Yg=class{constructor(n,e,t){this.$from=n,this.$to=e,this.unplaced=t,this.frontier=[],this.placed=B.empty;for(let r=0;r<=n.depth;r++){let i=n.node(r);this.frontier.push({type:i.type,match:i.contentMatchAt(n.indexAfter(r))})}for(let r=n.depth;r>0;r--)this.placed=B.from(n.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let l=this.findFittable();l?this.placeNodes(l):this.openMore()||this.dropNode()}let n=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,t=this.$from,r=this.close(n<0?this.$to:t.doc.resolve(n));if(!r)return null;let i=this.placed,o=t.depth,s=r.depth;for(;o&&s&&i.childCount==1;)i=i.firstChild.content,o--,s--;let a=new x(i,o,s);return n>-1?new Un(t.pos,n,this.$to.pos,this.$to.end(),a,e):a.size||t.pos!=this.$to.pos?new tn(t.pos,r.pos,a):null}findFittable(){let n=this.unplaced.openStart;for(let e=this.unplaced.content,t=0,r=this.unplaced.openEnd;t<n;t++){let i=e.firstChild;if(e.childCount>1&&(r=0),i.type.spec.isolating&&r<=t){n=t;break}e=i.content}for(let e=1;e<=2;e++)for(let t=e==1?n:this.unplaced.openStart;t>=0;t--){let r,i=null;t?(i=va(this.unplaced.content,t-1).firstChild,r=i.content):r=this.unplaced.content;let o=r.firstChild;for(let s=this.depth;s>=0;s--){let a,{type:l,match:u}=this.frontier[s],c=null;if(e==1&&(o?u.matchType(o.type)||(c=u.fillBefore(B.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:t,frontierDepth:s,parent:i,inject:c};if(e==2&&o&&(a=u.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:s,parent:i,wrap:a};if(i&&u.matchType(i.type))break}}}openMore(){let{content:n,openStart:e,openEnd:t}=this.unplaced,r=va(n,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new x(n,e+1,Math.max(t,r.size+e>=n.size-t?e+1:0)),!0)}dropNode(){let{content:n,openStart:e,openEnd:t}=this.unplaced,r=va(n,e);if(r.childCount<=1&&e>0){let i=n.size-e<=e+r.size;this.unplaced=new x(mi(n,e-1,1),e-1,i?e-1:t)}else this.unplaced=new x(mi(n,e,1),e,t)}placeNodes({sliceDepth:n,frontierDepth:e,parent:t,inject:r,wrap:i}){for(;this.depth>e;)this.closeFrontierNode();if(i)for(let f=0;f<i.length;f++)this.openFrontierNode(i[f]);let o=this.unplaced,s=t?t.content:o.content,a=o.openStart-n,l=0,u=[],{match:c,type:d}=this.frontier[e];if(r){for(let f=0;f<r.childCount;f++)u.push(r.child(f));c=c.matchFragment(r)}let h=s.size+n-(o.content.size-o.openEnd);for(;l<s.childCount;){let f=s.child(l),m=c.matchType(f.type);if(!m)break;l++,(l>1||a==0||f.content.size)&&(c=m,u.push(Um(f.mark(d.allowedMarks(f.marks)),l==1?a:0,l==s.childCount?h:-1)))}let p=l==s.childCount;p||(h=-1),this.placed=Ei(this.placed,e,B.from(u)),this.frontier[e].match=c,p&&h<0&&t&&t.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,m=s;f<h;f++){let E=m.lastChild;this.frontier.push({type:E.type,match:E.contentMatchAt(E.childCount)}),m=E.content}this.unplaced=p?n==0?x.empty:new x(mi(o.content,n-1,1),n-1,h<0?o.openEnd:n-1):new x(mi(o.content,n,l),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let n,e=this.frontier[this.depth];if(!e.type.isTextblock||!Na(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:t}=this.$to,r=this.$to.after(t);for(;t>1&&r==this.$to.end(--t);)++r;return r}findCloseLevel(n){e:for(let e=Math.min(this.depth,n.depth);e>=0;e--){let{match:t,type:r}=this.frontier[e],i=e<n.depth&&n.end(e+1)==n.pos+(n.depth-(e+1)),o=Na(n,e,r,t,i);if(o){for(let s=e-1;s>=0;s--){let{match:a,type:l}=this.frontier[s],u=Na(n,s,l,a,!0);if(!u||u.childCount)continue e}return{depth:e,fit:o,move:i?n.doc.resolve(n.after(e+1)):n}}}}close(n){let e=this.findCloseLevel(n);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Ei(this.placed,e.depth,e.fit)),n=e.move;for(let t=e.depth+1;t<=n.depth;t++){let r=n.node(t),i=r.type.contentMatch.fillBefore(r.content,!0,n.index(t));this.openFrontierNode(r.type,r.attrs,i)}return n}openFrontierNode(n,e=null,t){let r=this.frontier[this.depth];r.match=r.match.matchType(n),this.placed=Ei(this.placed,this.depth,B.from(n.create(e,t))),this.frontier.push({type:n,match:n.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(B.empty,!0);n.childCount&&(this.placed=Ei(this.placed,this.frontier.length,n))}};function mi(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(mi(n.firstChild.content,e-1,t)))}function Ei(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Ei(n.lastChild.content,e-1,t)))}function va(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Um(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Um(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(B.empty,!0)))),n.copy(r)}function Na(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1}(t,o.content,s)?a:null}function $m(n,e,t,r,i){if(e<t){let o=n.firstChild;n=n.replaceChild(0,o.copy($m(o.content,e+1,t,r,o)))}if(e>r){let o=i.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(B.empty,!0))}return n}function Bd(n,e){let t=[];for(let r=Math.min(n.depth,e.depth);r>=0;r--){let i=n.start(r);if(i<n.pos-(n.depth-r)||e.end(r)>e.pos+(e.depth-r)||n.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(i==e.start(r)||r==n.depth&&r==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==i-1)&&t.push(r)}return t}let jm=class Go extends Ve{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ze.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return Ze.fromReplace(e,this.pos,this.pos+1,new x(B.from(i),0,t.isLeaf?0:1))}getMap(){return er.empty}invert(e){return new Go(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Go(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Go(t.pos,t.attr,t.value)}};Ve.jsonID("attr",jm);let zm=class yl extends Ve{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Ze.ok(r)}getMap(){return er.empty}invert(e){return new yl(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new yl(t.attr,t.value)}};Ve.jsonID("docAttr",zm);let Ai=class extends Error{};Ai=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},(Ai.prototype=Object.create(Error.prototype)).constructor=Ai,Ai.prototype.name="TransformError";class Gg{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Vg}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ai(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=x.empty){let i=function(o,s,a=s,l=x.empty){if(s==a&&!l.size)return null;let u=o.resolve(s),c=o.resolve(a);return xd(u,c,l)?new tn(s,a,l):new Yg(u,c,l).fit()}(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new x(B.from(r),0,0))}delete(e,t){return this.replace(e,t,x.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),u=i.doc.resolve(s);if(xd(l,u,a))return i.step(new tn(o,s,a));let c=Bd(l,i.doc.resolve(s));c[c.length-1]==0&&c.pop();let d=-(l.depth+1);c.unshift(d);for(let A=l.depth,g=l.pos-1;A>0;A--,g--){let O=l.node(A).type.spec;if(O.defining||O.definingAsContext||O.isolating)break;c.indexOf(A)>-1?d=A:l.before(A)==g&&c.splice(1,0,-A)}let h=c.indexOf(d),p=[],f=a.openStart;for(let A=a.content,g=0;;g++){let O=A.firstChild;if(p.push(O),g==a.openStart)break;A=O.content}for(let A=f-1;A>=0;A--){let g=p[A],O=(m=g.type).spec.defining||m.spec.definingForContent;if(O&&!g.sameMarkup(l.node(Math.abs(d)-1)))f=A;else if(O||!g.type.isTextblock)break}var m;for(let A=a.openStart;A>=0;A--){let g=(A+f+1)%(a.openStart+1),O=p[g];if(O)for(let S=0;S<c.length;S++){let T=c[(S+h)%c.length],I=!0;T<0&&(I=!1,T=-T);let C=l.node(T-1),y=l.index(T-1);if(C.canReplaceWith(y,y,O.type,O.marks))return i.replace(l.before(T),I?u.after(T):s,new x($m(a.content,0,a.openStart,g),g,a.openEnd))}}let E=i.steps.length;for(let A=c.length-1;A>=0&&(i.replace(o,s,a),!(i.steps.length>E));A--){let g=c[A];g<0||(o=l.before(g),s=u.after(g))}}(this,e,t,r),this}replaceRangeWith(e,t,r){return function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=function(u,c,d){let h=u.resolve(c);if(h.parent.canReplaceWith(h.index(),h.index(),d))return c;if(h.parentOffset==0)for(let p=h.depth-1;p>=0;p--){let f=h.index(p);if(h.node(p).canReplaceWith(f,f,d))return h.before(p+1);if(f>0)return null}if(h.parentOffset==h.parent.content.size)for(let p=h.depth-1;p>=0;p--){let f=h.indexAfter(p);if(h.node(p).canReplaceWith(f,f,d))return h.after(p+1);if(f<h.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new x(B.from(a),0,0))}(this,e,t,r),this}deleteRange(e,t){return function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Bd(s,a);for(let u=0;u<l.length;u++){let c=l[u],d=u==l.length-1;if(d&&c==0||s.node(c).type.contentMatch.validEnd)return r.delete(s.start(c),a.end(c));if(c>0&&(d||s.node(c-1).canReplace(s.index(c-1),a.indexAfter(c-1))))return r.delete(s.before(c),a.after(c))}for(let u=1;u<=s.depth&&u<=a.depth;u++)if(i-s.start(u)==s.depth-u&&o>s.end(u)&&a.end(u)-o!=a.depth-u)return r.delete(s.before(u),o);r.delete(i,o)}(this,e,t),this}lift(e,t){return function(r,i,o){let{$from:s,$to:a,depth:l}=i,u=s.before(l+1),c=a.after(l+1),d=u,h=c,p=B.empty,f=0;for(let A=l,g=!1;A>o;A--)g||s.index(A)>0?(g=!0,p=B.from(s.node(A).copy(p)),f++):d--;let m=B.empty,E=0;for(let A=l,g=!1;A>o;A--)g||a.after(A+1)<a.end(A)?(g=!0,m=B.from(a.node(A).copy(m)),E++):h++;r.step(new Un(d,h,u,c,new x(p.append(m),f,E),p.size-f,!0))}(this,e,t),this}join(e,t=1){return function(r,i,o){let s=new tn(i-o,i+o,x.empty,!0);r.step(s)}(this,e,t),this}wrap(e,t){return function(r,i,o){let s=B.empty;for(let u=o.length-1;u>=0;u--){if(s.size){let c=o[u].type.contentMatch.matchFragment(s);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=B.from(o[u].type.create(o[u].attrs,s))}let a=i.start,l=i.end;r.step(new Un(a,l,a,l,new x(s,0,0),o.length,!0))}(this,e,t),this}setBlockType(e,t=e,r,i=null){return function(o,s,a,l,u){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let c=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{if(d.isTextblock&&!d.hasMarkup(l,u)&&function(p,f,m){let E=p.resolve(f),A=E.index();return E.parent.canReplaceWith(A,A+1,m)}(o.doc,o.mapping.slice(c).map(h),l)){o.clearIncompatible(o.mapping.slice(c).map(h,1),l);let p=o.mapping.slice(c),f=p.map(h,1),m=p.map(h+d.nodeSize,1);return o.step(new Un(f,m,f+1,m-1,new x(B.from(l.create(u,null,d.marks)),0,0),1,!0)),!1}})}(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return function(o,s,a,l,u){let c=o.doc.nodeAt(s);if(!c)throw new RangeError("No node at given position");a||(a=c.type);let d=a.create(l,null,u||c.marks);if(c.isLeaf)return o.replaceWith(s,s+c.nodeSize,d);if(!a.validContent(c.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new Un(s,s+c.nodeSize,s+1,s+c.nodeSize-1,new x(B.from(d),0,0),1,!0))}(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new jm(e,t,r)),this}setDocAttribute(e,t){return this.step(new zm(e,t)),this}addNodeMark(e,t){return this.step(new Vu(e,t)),this}removeNodeMark(e,t){if(!(t instanceof se)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(r.marks)))return this}return this.step(new Yu(e,t)),this}split(e,t=1,r){return function(i,o,s=1,a){let l=i.doc.resolve(o),u=B.empty,c=B.empty;for(let d=l.depth,h=l.depth-s,p=s-1;d>h;d--,p--){u=B.from(l.node(d).copy(u));let f=a&&a[p];c=B.from(f?f.type.create(f.attrs,c):l.node(d).copy(c))}i.step(new tn(o,o,new x(u.append(c),s,s),!0))}(this,e,t,r),this}addMark(e,t,r){return function(i,o,s,a){let l,u,c=[],d=[];i.doc.nodesBetween(o,s,(h,p,f)=>{if(!h.isInline)return;let m=h.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+h.nodeSize,s),g=a.addToSet(m);for(let O=0;O<m.length;O++)m[O].isInSet(g)||(l&&l.to==E&&l.mark.eq(m[O])?l.to=A:c.push(l=new wi(E,A,m[O])));u&&u.to==E?u.to=A:d.push(u=new zu(E,A,a))}}),c.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))}(this,e,t,r),this}removeMark(e,t,r){return function(i,o,s,a){let l=[],u=0;i.doc.nodesBetween(o,s,(c,d)=>{if(!c.isInline)return;u++;let h=null;if(a instanceof Ys){let p,f=c.marks;for(;p=a.isInSet(f);)(h||(h=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(c.marks)&&(h=[a]):h=c.marks;if(h&&h.length){let p=Math.min(d+c.nodeSize,s);for(let f=0;f<h.length;f++){let m,E=h[f];for(let A=0;A<l.length;A++){let g=l[A];g.step==u-1&&E.eq(l[A].style)&&(m=g)}m?(m.to=p,m.step=u):l.push({style:E,from:Math.max(d,o),to:p,step:u})}}}),l.forEach(c=>i.step(new wi(c.from,c.to,c.style)))}(this,e,t,r),this}clearIncompatible(e,t,r){return function(i,o,s,a=s.contentMatch){let l=i.doc.nodeAt(o),u=[],c=o+1;for(let d=0;d<l.childCount;d++){let h=l.child(d),p=c+h.nodeSize,f=a.matchType(h.type);if(f){a=f;for(let m=0;m<h.marks.length;m++)s.allowsMarkType(h.marks[m].type)||i.step(new wi(c,p,h.marks[m]));if(h.isText&&!s.spec.code){let m,E,A=/\r?\n|\r/g;for(;m=A.exec(h.text);)E||(E=new x(B.from(s.schema.text(" ",s.allowedMarks(h.marks))),0,0)),u.push(new tn(c+m.index,c+m.index+m[0].length,E))}}else u.push(new tn(c,p,x.empty));c=p}if(!a.validEnd){let d=a.fillBefore(B.empty,!0);i.replace(c,c,new x(d,0,0))}for(let d=u.length-1;d>=0;d--)i.step(u[d])}(this,e,t,r),this}}const ya=Object.create(null);class re{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Wg(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=x.empty){let r=t.content.lastChild,i=null;for(let a=0;a<t.openEnd;a++)i=r,r=r.lastChild;let o=e.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:u}=s[a],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(u.pos),a?x.empty:t),a==0&&$d(e,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=e.mapping.slice(r),u=l.map(s.pos),c=l.map(a.pos);o?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),$d(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new ae(e):fr(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let o=e.depth-1;o>=0;o--){let s=t<0?fr(e.node(0),e.node(o),e.before(o+1),e.index(o),t,r):fr(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,r);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new mt(e.node(0))}static atStart(e){return fr(e,e,0,0,1)||new mt(e)}static atEnd(e){return fr(e,e,e.content.size,e.childCount,-1)||new mt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ya[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ya)throw new RangeError("Duplicate use of selection JSON ID "+e);return ya[e]=t,t.prototype.jsonID=e,t}getBookmark(){return ae.between(this.$anchor,this.$head).getBookmark()}}re.prototype.visible=!0;class Wg{constructor(e,t){this.$from=e,this.$to=t}}let Hd=!1;function Ud(n){Hd||n.parent.inlineContent||(Hd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class ae extends re{constructor(e,t=e){Ud(e),Ud(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return re.near(r);let i=e.resolve(t.map(this.anchor));return new ae(i.parent.inlineContent?i:r,r)}replace(e,t=x.empty){if(super.replace(e,t),t==x.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof ae&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Gs(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ae(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if(r&&!i||(r=i>=0?1:-1),!t.parent.inlineContent){let o=re.findFrom(t,r,!0)||re.findFrom(t,-r,!0);if(!o)return re.near(t,r);t=o.$head}return e.parent.inlineContent||(i==0||(e=(re.findFrom(e,-r,!0)||re.findFrom(e,r,!0)).$anchor).pos<t.pos!=i<0)&&(e=t),new ae(e,t)}}re.jsonID("text",ae);class Gs{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Gs(e.map(this.anchor),e.map(this.head))}resolve(e){return ae.between(e.resolve(this.anchor),e.resolve(this.head))}}class W extends re{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:i}=t.mapResult(this.anchor),o=e.resolve(i);return r?re.near(o):new W(o)}content(){return new x(B.from(this.node),0,0)}eq(e){return e instanceof W&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Gu(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new W(e.resolve(t.anchor))}static create(e,t){return new W(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}W.prototype.visible=!1,re.jsonID("node",W);class Gu{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Gs(r,r):new Gu(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&W.isSelectable(r)?new W(t):re.near(t)}}class mt extends re{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=x.empty){if(t==x.empty){e.delete(0,e.doc.content.size);let r=re.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new mt(e)}map(e){return new mt(e)}eq(e){return e instanceof mt}getBookmark(){return Xg}}re.jsonID("all",mt);const Xg={map(){return this},resolve:n=>new mt(n)};function fr(n,e,t,r,i,o=!1){if(e.inlineContent)return ae.create(n,t);for(let s=r-(i>0?0:1);i>0?s<e.childCount:s>=0;s+=i){let a=e.child(s);if(a.isAtom){if(!o&&W.isSelectable(a))return W.create(n,t-(i<0?a.nodeSize:0))}else{let l=fr(n,a,t+i,i<0?a.childCount:0,i,o);if(l)return l}t+=a.nodeSize*i}return null}function $d(n,e,t){let r=n.steps.length-1;if(r<e)return;let i,o=n.steps[r];(o instanceof tn||o instanceof Un)&&(n.mapping.maps[r].forEach((s,a,l,u)=>{i==null&&(i=u)}),n.setSelection(re.near(n.doc.resolve(i),t)))}class Kg extends Gg{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return se.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||se.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r==null?t:r,!e)return this.deleteRange(t,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=r==t?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,o)),this.selection.empty||this.setSelection(re.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function jd(n,e){return e&&n?n.bind(e):n}class _i{constructor(e,t,r){this.name=e,this.init=jd(t.init,r),this.apply=jd(t.apply,r)}}const Jg=[new _i("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new _i("selection",{init:(n,e)=>n.selection||re.atStart(e.doc),apply:n=>n.selection}),new _i("storedMarks",{init:n=>n.storedMarks||null,apply:(n,e,t,r)=>r.selection.$cursor?n.storedMarks:null}),new _i("scrollToSelection",{init:()=>0,apply:(n,e)=>n.scrolledIntoView?e+1:e})];class ba{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Jg.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new _i(r.key,r.spec.state,r))})}}class Sr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,u=i?i[s].state:this,c=l<t.length&&a.spec.appendTransaction.call(a,l?t.slice(l):t,u,r);if(c&&r.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:t.length}:{state:this,n:0})}t.push(c),r=r.applyInner(c),o=!0}i&&(i[s]={state:r,n:t.length})}}if(!o)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Sr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new Kg(this)}static create(e){let t=new ba(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Sr(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new ba(this.schema,e.plugins),r=t.fields,i=new Sr(t);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],o=i.spec.state;o&&o.toJSON&&(t[r]=o.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new ba(e.schema,e.plugins),o=new Sr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Kn.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=re.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==s.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(o[s.name]=u.fromJSON.call(l,e,t[a],o))}o[s.name]=s.init(e,o)}}),o}}function Vm(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=Vm(i,e,{})),t[r]=i}return t}class Ws{constructor(e){this.spec=e,this.props={},e.props&&Vm(e.props,this,this.props),this.key=e.key?e.key.key:Ym("plugin")}getState(e){return e[this.key]}}const ka=Object.create(null);function Ym(n){return n in ka?n+"$"+ ++ka[n]:(ka[n]=0,n+"$")}class Xs{constructor(e="key"){this.key=Ym(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ke=function(n){for(var e=0;;e++)if(!(n=n.previousSibling))return e},Ki=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let zd=null;const en=function(n,e,t){let r=zd||(zd=document.createRange());return r.setEnd(n,t==null?n.nodeValue.length:t),r.setStart(n,e||0),r},tr=function(n,e,t,r){return t&&(Vd(n,e,t,r,-1)||Vd(n,e,t,r,1))},qg=/^(img|br|input|textarea|hr)$/i;function Vd(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Bt(n))){let o=n.parentNode;if(!o||o.nodeType!=1||bl(n)||qg.test(n.nodeName)||n.contentEditable=="false")return!1;e=Ke(n)+(i<0?0:1),n=o}else{if(n.nodeType!=1||(n=n.childNodes[e+(i<0?-1:0)]).contentEditable=="false")return!1;e=i<0?Bt(n):0}}}function Bt(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function bl(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Ks=function(n){return n.focusNode&&tr(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Hn(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}const Yt=typeof navigator!="undefined"?navigator:null,Yd=typeof document!="undefined"?document:null,yn=Yt&&Yt.userAgent||"",kl=/Edge\/(\d+)/.exec(yn),Gm=/MSIE \d/.exec(yn),Ll=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(yn),st=!!(Gm||Ll||kl),Sn=Gm?document.documentMode:Ll?+Ll[1]:kl?+kl[1]:0,bt=!st&&/gecko\/(\d+)/i.test(yn);bt&&(/Firefox\/(\d+)/.exec(yn)||[0,0])[1];const wl=!st&&/Chrome\/(\d+)/.exec(yn),$e=!!wl,Zg=wl?+wl[1]:0,tt=!st&&!!Yt&&/Apple Computer/.test(Yt.vendor),Yr=tt&&(/Mobile\/\w+/.test(yn)||!!Yt&&Yt.maxTouchPoints>2),_t=Yr||!!Yt&&/Mac/.test(Yt.platform),Qg=!!Yt&&/Win/.test(Yt.platform),St=/Android \d/.test(yn),Eo=!!Yd&&"webkitFontSmoothing"in Yd.documentElement.style,eD=Eo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function tD(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function qt(n,e){return typeof n=="number"?n:n[e]}function nD(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Gd(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=Ki(s)){if(s.nodeType!=1)continue;let a=s,l=a==o.body,u=l?tD(o):nD(a),c=0,d=0;if(e.top<u.top+qt(r,"top")?d=-(u.top-e.top+qt(i,"top")):e.bottom>u.bottom-qt(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+qt(i,"top")-u.top:e.bottom-u.bottom+qt(i,"bottom")),e.left<u.left+qt(r,"left")?c=-(u.left-e.left+qt(i,"left")):e.right>u.right-qt(r,"right")&&(c=e.right-u.right+qt(i,"right")),c||d)if(l)o.defaultView.scrollBy(c,d);else{let h=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let f=a.scrollLeft-h,m=a.scrollTop-p;e={left:e.left-f,top:e.top-m,right:e.right-f,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function Wd(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Ki(r));return e}function Xd(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:o}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=o&&(r.scrollLeft=o)}}let cr=null;function Wm(n,e){let t,r,i,o,s=2e8,a=0,l=e.top,u=e.top;for(let c=n.firstChild,d=0;c;c=c.nextSibling,d++){let h;if(c.nodeType==1)h=c.getClientRects();else{if(c.nodeType!=3)continue;h=en(c).getClientRects()}for(let p=0;p<h.length;p++){let f=h[p];if(f.top<=l&&f.bottom>=u){l=Math.max(f.bottom,l),u=Math.min(f.top,u);let m=f.left>e.left?f.left-e.left:f.right<e.left?e.left-f.right:0;if(m<s){t=c,s=m,r=m&&t.nodeType==3?{left:f.right<e.left?f.right:f.left,top:e.top}:e,c.nodeType==1&&m&&(a=d+(e.left>=(f.left+f.right)/2?1:0));continue}}else f.top>e.top&&!i&&f.left<=e.left&&f.right>=e.left&&(i=c,o={left:Math.max(f.left,Math.min(f.right,e.left)),top:f.top});!t&&(e.left>=f.right&&e.top>=f.top||e.left>=f.left&&e.top>=f.bottom)&&(a=d+1)}}return!t&&i&&(t=i,r=o,s=0),t&&t.nodeType==3?function(c,d){let h=c.nodeValue.length,p=document.createRange();for(let f=0;f<h;f++){p.setEnd(c,f+1),p.setStart(c,f);let m=fn(p,1);if(m.top!=m.bottom&&Wu(d,m))return{node:c,offset:f+(d.left>=(m.left+m.right)/2?1:0)}}return{node:c,offset:0}}(t,r):!t||s&&t.nodeType==1?{node:n,offset:a}:Wm(t,r)}function Wu(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function Xm(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),o=i;;){let s=n.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Wu(e,u))return Xm(s,e,u)}}if((o=(o+1)%r)==i)break}return n}function rD(n,e){let t,r=n.dom.ownerDocument,i=0,o=function(u,c,d){if(u.caretPositionFromPoint)try{let h=u.caretPositionFromPoint(c,d);if(h)return{node:h.offsetNode,offset:h.offset}}catch(h){}if(u.caretRangeFromPoint){let h=u.caretRangeFromPoint(c,d);if(h)return{node:h.startContainer,offset:h.startOffset}}}(r,e.left,e.top);o&&({node:t,offset:i}=o);let s,a=(n.root.elementFromPoint?n.root:r).elementFromPoint(e.left,e.top);if(!a||!n.dom.contains(a.nodeType!=1?a.parentNode:a)){let u=n.dom.getBoundingClientRect();if(!Wu(e,u)||(a=Xm(n.dom,e,u),!a))return null}if(tt)for(let u=a;t&&u;u=Ki(u))u.draggable&&(t=void 0);if(a=function(u,c){let d=u.parentNode;return d&&/^li$/i.test(d.nodeName)&&c.left<u.getBoundingClientRect().left?d:u}(a,e),t){if(bt&&t.nodeType==1&&(i=Math.min(i,t.childNodes.length),i<t.childNodes.length)){let c,d=t.childNodes[i];d.nodeName=="IMG"&&(c=d.getBoundingClientRect()).right<=e.left&&c.bottom>e.top&&i++}let u;Eo&&i&&t.nodeType==1&&(u=t.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,t==n.dom&&i==t.childNodes.length-1&&t.lastChild.nodeType==1&&e.top>t.lastChild.getBoundingClientRect().bottom?s=n.state.doc.content.size:i!=0&&t.nodeType==1&&t.childNodes[i-1].nodeName=="BR"||(s=function(c,d,h,p){let f=-1;for(let m=d,E=!1;m!=c.dom;){let A=c.docView.nearestDesc(m,!0);if(!A)return null;if(A.dom.nodeType==1&&(A.node.isBlock&&A.parent&&!E||!A.contentDOM)){let g=A.dom.getBoundingClientRect();if(A.node.isBlock&&A.parent&&!E&&(E=!0,g.left>p.left||g.top>p.top?f=A.posBefore:(g.right<p.left||g.bottom<p.top)&&(f=A.posAfter)),!A.contentDOM&&f<0&&!A.node.isText)return(A.node.isBlock?p.top<(g.top+g.bottom)/2:p.left<(g.left+g.right)/2)?A.posBefore:A.posAfter}m=A.dom.parentNode}return f>-1?f:c.docView.posFromDOM(d,h,-1)}(n,t,i,e))}s==null&&(s=function(u,c,d){let{node:h,offset:p}=Wm(c,d),f=-1;if(h.nodeType==1&&!h.firstChild){let m=h.getBoundingClientRect();f=m.left!=m.right&&d.left>(m.left+m.right)/2?1:-1}return u.docView.posFromDOM(h,p,f)}(n,a,e));let l=n.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Kd(n){return n.top<n.bottom||n.left<n.right}function fn(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Kd(r))return r}return Array.prototype.find.call(t,Kd)||n.getBoundingClientRect()}const iD=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Km(n,e,t){let{node:r,offset:i,atom:o}=n.docView.domFromPos(e,t<0?-1:1),s=Eo||bt;if(r.nodeType==3){if(!s||!iD.test(r.nodeValue)&&(t<0?i:i!=r.nodeValue.length)){let a=i,l=i,u=t<0?1:-1;return t<0&&!i?(l++,u=-1):t>=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:l++,ai(fn(en(r,a,l),u),u<0)}{let a=fn(en(r,i,i),t);if(bt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=fn(en(r,i-1,i-1),-1);if(l.top==a.top){let u=fn(en(r,i,i+1),-1);if(u.top!=a.top)return ai(u,u.left<l.left)}}return a}}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(t<0||i==Bt(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return La(a.getBoundingClientRect(),!1)}if(o==null&&i<Bt(r)){let a=r.childNodes[i];if(a.nodeType==1)return La(a.getBoundingClientRect(),!0)}return La(r.getBoundingClientRect(),t>=0)}if(o==null&&i&&(t<0||i==Bt(r))){let a=r.childNodes[i-1],l=a.nodeType==3?en(a,Bt(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return ai(fn(l,1),!1)}if(o==null&&i<Bt(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?en(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return ai(fn(l,-1),!0)}return ai(fn(r.nodeType==3?en(r):r,-t),t>=0)}function ai(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function La(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Jd(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}const oD=/[\u0590-\u08ac]/;let qd=null,Zd=null,Qd=!1;function sD(n,e,t){return qd==e&&Zd==t?Qd:(qd=e,Zd=t,Qd=t=="up"||t=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return Jd(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let c=r.docView.nearestDesc(l,!0);if(!c)break;if(c.node.isBlock){l=c.contentDOM||c.dom;break}l=c.dom.parentNode}let u=Km(r,a.pos,1);for(let c=l.firstChild;c;c=c.nextSibling){let d;if(c.nodeType==1)d=c.getClientRects();else{if(c.nodeType!=3)continue;d=en(c,0,c.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let p=d[h];if(p.bottom>p.top+1&&(o=="up"?u.top-p.top>2*(p.bottom-u.top):p.bottom-u.bottom>2*(u.bottom-p.top)))return!1}}return!0})}(n,e,t):function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,u=a==s.parent.content.size,c=r.domSelection();return oD.test(s.parent.textContent)&&c.modify?Jd(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=c.caretBidiLevel;c.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:g}=r.domSelectionRange(),O=A&&!E.contains(A.nodeType==1?A:A.parentNode)||d==A&&h==g;try{c.collapse(p,f),d&&(d!=p||h!=f)&&c.extend&&c.extend(d,h)}catch(S){}return m!=null&&(c.caretBidiLevel=m),O}):o=="left"||o=="backward"?l:u}(n,e,t))}class Ao{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let i=this.children[t];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode)){if(r<0){let o,s;if(e==this.contentDOM)o=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(e==this.contentDOM)o=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(e==this.dom&&this.contentDOM)i=t>Ke(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!t||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))return s;r=!1}}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],o=r+i.size;if(r==e&&o!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-r-i.border);r=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>e||s instanceof qm){i=e-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof Jm&&o.side>=0;r--);if(t<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?Ke(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,t):{node:this.contentDOM,offset:o?Ke(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],u=s+l.size;if(i==-1&&e<=u){let c=s+l.border;if(e>=c&&t<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,c);e=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Ke(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-1&&(u>t||a==this.children.length-1)){t=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Ke(d.dom);break}t+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=u}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,i=!1){let o=Math.min(e,t),s=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let f=this.children[h],m=p+f.size;if(o>p&&s<m)return f.setSelection(e-p-f.border,t-p-f.border,r,i);p=m}let a=this.domFromPos(e,e?-1:1),l=t==e?a:this.domFromPos(t,t?-1:1),u=r.getSelection(),c=!1;if((bt||tt)&&e==t){let{node:h,offset:p}=a;if(h.nodeType==3){if(c=!(!p||h.nodeValue[p-1]!=`
|
|
11
|
-
`),c&&p==h.nodeValue.length)for(let f,m=h;m;m=m.parentNode){if(f=m.nextSibling){f.nodeName=="BR"&&(a=l={node:f.parentNode,offset:Ke(f)+1});break}let E=m.pmViewDesc;if(E&&E.node&&E.node.isBlock)break}}else{let f=h.childNodes[p-1];c=f&&(f.nodeName=="BR"||f.contentEditable=="false")}}if(bt&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||c&&tt)&&tr(a.node,a.offset,u.anchorNode,u.anchorOffset)&&tr(l.node,l.offset,u.focusNode,u.focusOffset))return;let d=!1;if((u.extend||e==t)&&!c){u.collapse(a.node,a.offset);try{e!=t&&u.extend(l.node,l.offset),d=!0}catch(h){}}if(!d){if(e>t){let p=a;a=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&t>=r:e<s&&t>r){let a=r+o.border,l=s-o.border;if(e>=a&&t<=l)return this.dirty=e==r||t==s?2:1,void(e!=a||t!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?2:1;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Jm extends Ao{constructor(e,t,r,i){let o,s=t.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!t.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==0&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class aD extends Ao{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Jn extends Ao{constructor(e,t,r,i){super(e,[],r,i),this.mark=t}static create(e,t,r,i){let o=i.nodeViews[t.type.name],s=o&&o(t,i,r);return s&&s.dom||(s=rn.renderSpec(document,t.type.spec.toDOM(t,r))),new Jn(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=3&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(e,t,r){let i=Jn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;t<s&&(o=Pl(o,t,s,r)),e>0&&(o=Pl(o,0,e,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class Tn extends Ao{constructor(e,t,r,i,o,s,a,l,u){super(e,[],o,s),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,t,r,i,o,s){let a,l=o.nodeViews[t.type.name],u=l&&l(t,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),c=u&&u.dom,d=u&&u.contentDOM;if(t.isText)if(c){if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else c||({dom:c,contentDOM:d}=rn.renderSpec(document,t.type.spec.toDOM(t)));d||t.isText||c.nodeName=="BR"||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let h=c;return c=eE(c,r,t),u?a=new lD(e,t,r,i,c,d||null,h,u,o,s+1):t.isText?new Js(e,t,r,i,c,h,o):new Tn(e,t,r,i,c,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>B.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,r){return this.dirty==0&&e.eq(this.node)&&Fl(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,i=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new cD(this,s&&s.node,e);(function(u,c,d,h){let p=c.locals(u),f=0;if(p.length==0){for(let g=0;g<u.childCount;g++){let O=u.child(g);h(O,p,c.forChild(f,O),g),f+=O.nodeSize}return}let m=0,E=[],A=null;for(let g=0;;){let O,S,T,I;for(;m<p.length&&p[m].to==f;){let _=p[m++];_.widget&&(O?(S||(S=[O])).push(_):O=_)}if(O)if(S){S.sort(dD);for(let _=0;_<S.length;_++)d(S[_],g,!!A)}else d(O,g,!!A);if(A)I=-1,T=A,A=null;else{if(!(g<u.childCount))break;I=g,T=u.child(g++)}for(let _=0;_<E.length;_++)E[_].to<=f&&E.splice(_--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let C=f+T.nodeSize;if(T.isText){let _=C;m<p.length&&p[m].from<_&&(_=p[m].from);for(let D=0;D<E.length;D++)E[D].to<_&&(_=E[D].to);_<C&&(A=T.cut(_-f),T=T.cut(0,_-f),C=_,I=-1)}else for(;m<p.length&&p[m].to<=C;)m++;let y=T.isInline&&!T.isLeaf?E.filter(_=>!_.inline):E.slice();h(T,y,c.forChild(f,T),I),f=C}})(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?se.none:this.node.child(c).marks,r,e),l.placeWidget(u,e,i)},(u,c,d,h)=>{let p;l.syncToMarks(u.marks,r,e),l.findNodeMatch(u,c,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(u,c,d,p,e)||l.updateNextNode(u,c,d,e,h,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(e,s),Zm(this.contentDOM,this.children,e),Yr&&function(u){if(u.nodeName=="UL"||u.nodeName=="OL"){let c=u.style.cssText;u.style.cssText=c+"; list-style: square !important",window.getComputedStyle(u).listStyle,u.style.cssText=c}}(this.dom))}localCompositionInfo(e,t){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ae)||r<t||i>t+this.node.content.size)return null;let o=e.domSelectionRange(),s=function(a,l){for(;;){if(a.nodeType==3)return a;if(a.nodeType==1&&l>0){if(a.childNodes.length>l&&a.childNodes[l].nodeType==3)return a.childNodes[l];l=Bt(a=a.childNodes[l-1])}else{if(!(a.nodeType==1&&l<a.childNodes.length))return null;a=a.childNodes[l],l=0}}}(o.focusNode,o.focusOffset);if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,l=function(u,c,d,h){for(let p=0,f=0;p<u.childCount&&f<=h;){let m=u.child(p++),E=f;if(f+=m.nodeSize,!m.isText)continue;let A=m.text;for(;p<u.childCount;){let g=u.child(p++);if(f+=g.nodeSize,!g.isText)break;A+=g.text}if(f>=d){if(f>=h&&A.slice(h-c.length-E,h-E)==c)return h-c.length;let g=E<h?A.lastIndexOf(c,h-E-1):-1;if(g>=0&&g+c.length+E>=d)return E+g;if(d==h&&A.length>=h+c.length-E&&A.slice(h-E,h-E+c.length)==c)return h}}return-1}(this.node.content,a,r-t,i-t);return l<0?null:{node:s,pos:l,text:a}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:i}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new aD(this,o,t,i);e.input.compositionNodes.push(s),this.children=Pl(this.children,r,r+i.length,e,s)}update(e,t,r,i){return!(this.dirty==3||!e.sameMarkup(this.node))&&(this.updateInner(e,t,r,i),!0)}updateInner(e,t,r,i){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(Fl(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Qm(this.dom,this.nodeDOM,Ml(this.outerDeco,this.node,t),Ml(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function eh(n,e,t,r,i){eE(r,e,n);let o=new Tn(void 0,n,e,t,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Js extends Tn{constructor(e,t,r,i,o,s,a){super(e,t,r,i,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),this.dirty==0&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let i=this.node.cut(e,t),o=document.createTextNode(i.text);return new Js(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||e!=0&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class qm extends Ao{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==0&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class lD extends Tn{constructor(e,t,r,i,o,s,a,l,u,c){super(e,t,r,i,o,s,a,u,c),this.spec=l}update(e,t,r,i){if(this.dirty==3)return!1;if(this.spec.update){let o=this.spec.update(e,t,r);return o&&this.updateInner(e,t,r,i),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,i){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Zm(n,e,t){let r=n.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=s.dom;if(a.parentNode==n){for(;a!=r;)r=th(r),i=!0;r=r.nextSibling}else i=!0,n.insertBefore(a,r);if(s instanceof Jn){let l=r?r.previousSibling:n.lastChild;Zm(s.contentDOM,s.children,t),r=l?l.nextSibling:n.firstChild}}for(;r;)r=th(r),i=!0;i&&t.trackWrites==n&&(t.trackWrites=null)}const Mi=function(n){n&&(this.nodeName=n)};Mi.prototype=Object.create(null);const $n=[new Mi];function Ml(n,e,t){if(n.length==0)return $n;let r=t?$n[0]:new Mi,i=[r];for(let o=0;o<n.length;o++){let s=n[o].type.attrs;if(s){s.nodeName&&i.push(r=new Mi(s.nodeName));for(let a in s){let l=s[a];l!=null&&(t&&i.length==1&&i.push(r=new Mi(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function Qm(n,e,t,r){if(t==$n&&r==$n)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=n&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=$n[0]),i=l}uD(i,a||$n[0],s)}return i}function uD(n,e,t){for(let r in e)r=="class"||r=="style"||r=="nodeName"||r in t||n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=t.class?t.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&n.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&n.classList.add(i[o]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(e.style);)n.style.removeProperty(r[1])}t.style&&(n.style.cssText+=t.style)}}function eE(n,e,t){return Qm(n,n,$n,Ml(e,t,n.nodeType!=1))}function Fl(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function th(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class cD{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(i,o){let s=o,a=s.children.length,l=i.childCount,u=new Map,c=[];e:for(;l>0;){let d;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof Jn)){d=p,a--;break}s=p,a=p.children.length}else{if(s==o)break e;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,u.set(d,l),c.push(d)}}return{index:l,matched:u,matches:c.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[o])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Jn.create(this.top,e[o],t,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,t,r)&&!this.preMatch.matched.has(u)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,t,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=t}}updateNextNode(e,t,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Tn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=3&&Fl(t,l.outerDeco));if(!h&&l.update(e,t,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,e,t,r,i,s)))return this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(i,s+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,i,o,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let a=Tn.create(this.top,t,r,i,o,s);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,t,r,i,o){let s=Tn.create(this.top,e,t,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(e)||e!=i.widget&&i.widget.type.toDOM.parentNode){let o=new Jm(this.top,e,t,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Jn;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Js)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((tt||$e)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new qm(this.top,[],r,null);t!=this.top?t.children.push(i):t.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function dD(n,e){return n.type.side-e.type.side}function Pl(n,e,t,r,i){let o=[];for(let s=0,a=0;s<n.length;s++){let l=n[s],u=a,c=a+=l.size;u>=t||c<=e?o.push(l):(u<e&&o.push(l.slice(0,e-u,r)),i&&(o.push(i),i=void 0),c>t&&o.push(l.slice(t-u,l.size,r)))}return o}function Xu(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let i=n.docView.nearestDesc(t.focusNode),o=i&&i.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let a,l,u=r.resolve(s);if(Ks(t)){for(a=u;i&&!i.node;)i=i.parent;let c=i.node;if(i&&c.isAtom&&W.isSelectable(c)&&i.parent&&(!c.isInline||!function(d,h,p){for(let f=h==0,m=h==Bt(d);f||m;){if(d==p)return!0;let E=Ke(d);if(!(d=d.parentNode))return!1;f=f&&E==0,m=m&&E==Bt(d)}}(t.focusNode,t.focusOffset,i.dom))){let d=i.posBefore;l=new W(s==d?u:r.resolve(d))}}else{let c=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(c<0)return null;a=r.resolve(c)}return l||(l=Ku(n,a,u,e=="pointer"||n.state.selection.head<u.pos&&!o?1:-1)),l}function nh(n){return n.editable?n.hasFocus():nE(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function ln(n,e=!1){let t=n.state.selection;if(tE(n,t),nh(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&$e){let r=n.domSelectionRange(),i=n.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&tr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return n.input.mouseDown.delayedSelectionSync=!0,void n.domObserver.setCurSelection()}if(n.domObserver.disconnectSelection(),n.cursorWrapper)(function(r){let i=r.domSelection(),o=document.createRange(),s=r.cursorWrapper.dom,a=s.nodeName=="IMG";a?o.setEnd(s.parentNode,Ke(s)+1):o.setEnd(s,0),o.collapse(!1),i.removeAllRanges(),i.addRange(o),!a&&!r.state.selection.visible&&st&&Sn<=11&&(s.disabled=!0,s.disabled=!1)})(n);else{let r,i,{anchor:o,head:s}=t;!rh||t instanceof ae||(t.$from.parent.inlineContent||(r=ih(n,t.from)),t.empty||t.$from.parent.inlineContent||(i=ih(n,t.to))),n.docView.setSelection(o,s,n.root,e),rh&&(r&&oh(r),i&&oh(i)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let u=a.domSelectionRange(),c=u.anchorNode,d=u.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{u.anchorNode==c&&u.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{nh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const rh=tt||$e&&Zg<63;function ih(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),i=r<t.childNodes.length?t.childNodes[r]:null,o=r?t.childNodes[r-1]:null;if(tt&&i&&i.contentEditable=="false")return wa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return wa(i);if(o)return wa(o)}}function wa(n){return n.contentEditable="true",tt&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function oh(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function tE(n,e){if(e instanceof W){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(sh(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else sh(n)}function sh(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Ku(n,e,t,r){return n.someProp("createSelectionBetween",i=>i(n,e,t))||ae.between(e,t,r)}function ah(n){return!(n.editable&&!n.hasFocus())&&nE(n)}function nE(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function xl(n,e){let{$anchor:t,$head:r}=n.selection,i=e>0?t.max(r):t.min(r),o=i.parent.inlineContent?i.depth?n.doc.resolve(e>0?i.after():i.before()):null:i;return o&&re.findFrom(o,e)}function En(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function lh(n,e,t){let r=n.state.selection;if(!(r instanceof ae)){if(r instanceof W&&r.node.isInline)return En(n,new ae(e>0?r.$to:r.$from));{let i=xl(n.state,e);return!!i&&En(n,i)}}if(t.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return En(n,new ae(r.$anchor,s))}if(!r.empty)return!1;if(n.endOfTextblock(e>0?"forward":"backward")){let i=xl(n.state,e);return!!(i&&i instanceof W)&&En(n,i)}if(!(_t&&t.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=e<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=n.docView.descAt(a))&&!i.contentDOM)&&(W.isSelectable(s)?En(n,new W(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):!!Eo&&En(n,new ae(n.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function Lo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function li(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function dr(n,e){return e<0?function(t){let r=t.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(bt&&i.nodeType==1&&o<Lo(i)&&li(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let u=i.childNodes[o-1];if(li(u,-1))s=i,a=--o;else{if(u.nodeType!=3)break;i=u,o=i.nodeValue.length}}}else{if(uh(i))break;{let u=i.previousSibling;for(;u&&li(u,-1);)s=i.parentNode,a=Ke(u),u=u.previousSibling;if(u)i=u,o=Lo(i);else{if(i=i.parentNode,i==t.dom)break;o=0}}}l?Ma(t,i,o):s&&Ma(t,s,a)}(n):function(t){let r=t.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Lo(i);for(;;)if(o<l){if(i.nodeType!=1||!li(i.childNodes[o],1))break;s=i,a=++o}else{if(uh(i))break;{let u=i.nextSibling;for(;u&&li(u,1);)s=u.parentNode,a=Ke(u)+1,u=u.nextSibling;if(u)i=u,o=0,l=Lo(i);else{if(i=i.parentNode,i==t.dom)break;o=l=0}}}s&&Ma(t,s,a)}(n)}function uh(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function Ma(n,e,t){if(e.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!bl(a);)l=Ke(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let u=a.childNodes[l];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;a=u,l=0}}(e,t))?(e=s,t=0):(o=function(a,l){for(;a&&!l&&!bl(a);)l=Ke(a),a=a.parentNode;for(;a&&l;){let u=a.childNodes[l-1];if(u.nodeType==3)return u;if(u.nodeType==1&&u.contentEditable=="false")break;l=(a=u).childNodes.length}}(e,t))&&(e=o,t=o.nodeValue.length)}let r=n.domSelection();if(Ks(r)){let o=document.createRange();o.setEnd(e,t),o.setStart(e,t),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:i}=n;setTimeout(()=>{n.state==i&&ln(n)},50)}function ch(n,e){let t=n.state.doc.resolve(e);if(!$e&&!Qg&&t.parent.inlineContent){let r=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function dh(n,e,t){let r=n.state.selection;if(r instanceof ae&&!r.empty||t.indexOf("s")>-1||_t&&t.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=xl(n.state,e);if(s&&s instanceof W)return En(n,s)}if(!i.parent.inlineContent){let s=e<0?i:o,a=r instanceof mt?re.near(s,e):re.findFrom(s,e);return!!a&&En(n,a)}return!1}function hh(n,e){if(!(n.state.selection instanceof ae))return!0;let{$head:t,$anchor:r,empty:i}=n.state.selection;if(!t.sameParent(r))return!0;if(!i)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function ph(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function hD(n,e){let t=e.keyCode,r=function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o}(e);if(t==8||_t&&t==72&&r=="c")return hh(n,-1)||dr(n,-1);if(t==46&&!e.shiftKey||_t&&t==68&&r=="c")return hh(n,1)||dr(n,1);if(t==13||t==27)return!0;if(t==37||_t&&t==66&&r=="c"){let i=t==37?ch(n,n.state.selection.from)=="ltr"?-1:1:-1;return lh(n,i,r)||dr(n,i)}if(t==39||_t&&t==70&&r=="c"){let i=t==39?ch(n,n.state.selection.from)=="ltr"?1:-1:1;return lh(n,i,r)||dr(n,i)}return t==38||_t&&t==80&&r=="c"?dh(n,-1,r)||dr(n,-1):t==40||_t&&t==78&&r=="c"?function(i){if(!tt||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;ph(i,a,"true"),setTimeout(()=>ph(i,a,"false"),20)}return!1}(n)||dh(n,1,r)||dr(n,1):r==(_t?"m":"c")&&(t==66||t==73||t==89||t==90)}function rE(n,e){n.someProp("transformCopied",p=>{e=p(e,n)});let t=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;t.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=n.someProp("clipboardSerializer")||rn.fromSchema(n.state.schema),a=uE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let u,c=l.firstChild,d=0;for(;c&&c.nodeType==1&&(u=lE[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",p=>p(e,n))||e.content.textBetween(0,e.content.size,`
|
|
5
|
+
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${Fe(i.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return function(o){const s=new URLSearchParams(o.params).toString(),a=s?o.action+"?"+s:o.action;return`<${o.type}:${a}|${Fe(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
|
|
6
|
+
`+Fe(i.children);case"bulletpoint":case"bulletPoint":return"- "+Fe(i.children)+`
|
|
7
|
+
`}}).join("")}(e,t).trim()}class ad{constructor(t,n,r,i,o){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.isEmpty=t.isEmpty,this.isTyping=t.isTyping,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}}function jt(e){this.content=e}function rm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=rm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function im(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=im(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}else n-=l,r-=l}}jt.prototype={constructor:jt,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new jt(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new jt(n)},addToStart:function(e,t){return new jt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new jt(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new jt(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=jt.from(e)).size?new jt(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=jt.from(e)).size?new jt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=jt.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},jt.from=function(e){if(e instanceof jt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new jt(t)};class U{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new U(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new U(r,i)}cutByIndex(t,n){return t==n?U.empty:t==0&&n==this.content.length?this:new U(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new U(i,o)}addToStart(t){return new U([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new U(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return rm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return im(this,t,n,r)}findIndex(t){if(t==0)return So(0,t);if(t==this.size)return So(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t?So(n+1,i):So(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return U.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new U(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return U.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new U(n||t,r)}static from(t){if(!t)return U.empty;if(t instanceof U)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new U([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}U.empty=new U([],0);const da={index:0,offset:0};function So(e,t){return da.index=e,da.offset=t,da}function Qo(e,t){if(e===t)return!0;if(!e||typeof e!="object"||!t||typeof t!="object")return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Qo(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Qo(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class lt{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Qo(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return lt.none;if(t instanceof lt)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}lt.none=[];class ts extends Error{}class ${constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=sm(this.content,t+this.openStart,n);return r&&new $(r,this.openStart,this.openEnd)}removeBetween(t,n){return new $(om(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return $.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new $(U.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new $(t,r,i)}}function om(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(om(o.content,t-i-1,n-i-1)))}function sm(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=sm(s.content,t-o-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function ig(e,t,n){if(n.openStart>e.depth)throw new ts("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new ts("Inconsistent open depths");return am(e,t,n,0)}function am(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=am(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:s,end:a}=function(l,c){let u=c.depth-l.openStart,d=c.node(u).copy(l.content);for(let h=u-1;h>=0;h--)d=c.node(h).copy(U.from(d));return{start:d.resolveNoCache(l.openStart+u),end:d.resolveNoCache(d.content.size-l.openEnd-u)}}(n,e);return Kn(o,cm(e,s,a,t,r))}{let s=e.parent,a=s.content;return Kn(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}}return Kn(o,es(e,t,r))}function lm(e,t){if(!t.type.compatibleContent(e.type))throw new ts("Cannot join "+t.type.name+" onto "+e.type.name)}function hl(e,t,n){let r=e.node(n);return lm(r,t.node(n)),r}function Xn(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function vi(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Xn(e.nodeAfter,r),o++));for(let a=o;a<s;a++)Xn(i.child(a),r);t&&t.depth==n&&t.textOffset&&Xn(t.nodeBefore,r)}function Kn(e,t){return e.type.checkContent(t),e.copy(t)}function cm(e,t,n,r,i){let o=e.depth>i&&hl(e,t,i+1),s=r.depth>i&&hl(n,r,i+1),a=[];return vi(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(lm(o,s),Xn(Kn(o,cm(e,t,n,r,i+1)),a)):(o&&Xn(Kn(o,es(e,t,i+1)),a),vi(t,n,i,a),s&&Xn(Kn(s,es(n,r,i+1)),a)),vi(r,null,i,a),new U(a)}function es(e,t,n){let r=[];return vi(null,e,n,r),e.depth>n&&Xn(Kn(hl(e,t,n+1),es(e,t,n+1)),r),vi(t,null,n,r),new U(r)}$.empty=new $(U.empty,0,0);class xi{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return(t=this.resolveDepth(t))==0?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return lt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive!==!1||i&&r[o].isInSet(i.marks)||(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new ag(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new xi(n,r,o)}static resolveCached(t,n){let r=ld.get(t);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else ld.set(t,r=new og);let i=r.elts[r.i]=xi.resolve(t,n);return r.i=(r.i+1)%sg,i}}class og{constructor(){this.elts=[],this.i=0}}const sg=12,ld=new WeakMap;class ag{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const lg=Object.create(null);let qn=class pl{constructor(t,n,r,i=lt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||U.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&Qo(this.attrs,n||t.defaultAttrs||lg)&<.sameSet(this.marks,r||lt.none)}copy(t=null){return t==this.content?this:new pl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new pl(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return $.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new $(l,i.depth-s,o.depth-s)}replace(t,n,r){return ig(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return xi.resolveCached(this,t)}resolveNoCache(t){return xi.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),um(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=U.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=lt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!lt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=U.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};qn.prototype.text=void 0;class ns extends qn{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):um(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ns(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ns(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function um(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class tr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new cg(t,n);if(r.next==null)return tr.empty;let i=dm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(ud(s,0));function l(c){let u=[];c.forEach(h=>{s[h].forEach(({term:f,to:p})=>{if(!f)return;let m;for(let E=0;E<u.length;E++)u[E][0]==f&&(m=u[E][1]);ud(s,p).forEach(E=>{m||u.push([f,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[c.join(",")]=new tr(c.indexOf(s.length-1)>-1);for(let h=0;h<u.length;h++){let f=u[h][1].sort(hm);d.next.push({type:u[h][0],next:a[f.join(",")]||l(f)})}return d}}(function(s){let a=[[]];return u(d(s,0),l()),a;function l(){return a.push([])-1}function c(h,f,p){let m={term:p,to:f};return a[h].push(m),m}function u(h,f){h.forEach(p=>p.to=f)}function d(h,f){if(h.type=="choice")return h.exprs.reduce((p,m)=>p.concat(d(m,f)),[]);if(h.type!="seq"){if(h.type=="star"){let p=l();return c(f,p),u(d(h.expr,p),p),[c(p)]}if(h.type=="plus"){let p=l();return u(d(h.expr,f),p),u(d(h.expr,p),p),[c(p)]}if(h.type=="opt")return[c(f)].concat(d(h.expr,f));if(h.type=="range"){let p=f;for(let m=0;m<h.min;m++){let E=l();u(d(h.expr,p),E),p=E}if(h.max==-1)u(d(h.expr,p),p);else for(let m=h.min;m<h.max;m++){let E=l();c(p,E),u(d(h.expr,p),E),p=E}return[c(p)]}if(h.type=="name")return[c(f,void 0,h.value)];throw new Error("Unknown expr type")}for(let p=0;;p++){let m=d(h.exprs[p],f);if(p==h.exprs.length-1)return m;u(m,f=l())}}}(i));return function(s,a){for(let l=0,c=[s];l<c.length;l++){let u=c[l],d=!u.validEnd,h=[];for(let f=0;f<u.next.length;f++){let{type:p,next:m}=u.next[f];h.push(p.name),!d||p.isText||p.hasRequiredAttrs()||(d=!1),c.indexOf(m)==-1&&c.push(m)}d&&a.err("Only non-generatable nodes ("+h.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];return function o(s,a){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return U.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!u.isText&&!u.hasRequiredAttrs()&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];a.isLeaf||a.hasRequiredAttrs()||a.name in n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}(this),t.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+t.indexOf(n.next[o].next);return i}).join(`
|
|
8
|
+
`)}}tr.empty=new tr(!0);class cg{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function dm(e){let t=[];do t.push(ug(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function ug(e){let t=[];do t.push(dg(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function dg(e){let t=function(n){if(n.eat("(")){let r=dm(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let c in s){let u=s[c];u.isInGroup(o)&&l.push(u)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l}(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=hg(e,t)}return t}function cd(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function hg(e,t){let n=cd(e),r=n;return e.eat(",")&&(r=e.next!="}"?cd(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function hm(e,t){return t-e}function ud(e,t){let n=[];return function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}}(t),n.sort(hm)}function pm(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function fm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function mm(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function Em(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new pg(e,r,t[r]);return n}let dd=class Am{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Em(t,r.attrs),this.defaultAttrs=pm(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==tr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:fm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new qn(this,this.computeAttrs(t),U.from(n),lt.setFrom(r))}createChecked(t=null,n,r){return n=U.from(n),this.checkContent(n),new qn(this,this.computeAttrs(t),n,lt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),(n=U.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(U.empty,!0);return o?new qn(this,t,n.append(o),lt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){mm(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:lt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new Am(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class pg{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?function(i,o,s){let a=s.split("|");return l=>{let c=l===null?"null":typeof l;if(a.indexOf(c)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${c}`)}}(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ks{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Em(t,i.attrs),this.excluded=null;let o=pm(this.attrs);this.instance=o?new lt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new lt(this,fm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new ks(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){mm(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}function hd(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Fi{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(function(o){return o.tag!=null}(i))this.tags.push(i);else if(function(o){return o.style!=null}(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new md(this,n,!1);return r.addAll(t,lt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new md(this,n,!0);return r.addAll(t,lt.none,n.from,n.to),$.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(mg(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ed(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ed(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Fi(t,Fi.schemaRules(t)))}}const _m={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},fg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pd={ol:!0,ul:!0};function fd(e,t,n){return t!=null?(t?1:0)|(t==="full"?2:0):e&&e.whitespace=="pre"?3:-5&n}class ha{constructor(t,n,r,i,o,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=lt.none,this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(U.from(t));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let n=U.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(U.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!_m.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class md{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=fd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new ha(o.type,o.attrs,lt.none,!0,n.topMatch||o.type.contentMatch,s):new ha(r?null:t.schema.topNodeType,null,lt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
9
|
+
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=t.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=t.nodeName.toLowerCase();pd.hasOwnProperty(a)&&this.parser.normalizeLists&&function(c){for(let u=c.firstChild,d=null;u;u=u.nextSibling){let h=u.nodeType==1?u.nodeName.toLowerCase():null;h&&pd.hasOwnProperty(h)&&d?(d.appendChild(u),u=d):h=="li"?d=u:h&&(d=null)}}(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));t:if(l?l.ignore:fg.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(_m.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break t}let d=l&&l.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
10
|
+
`),n)}ignoreFallback(t,n){t.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(c=>!l.clearMark(c)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(t);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=lt.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):Ad(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r,!1);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=fd(t,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=lt.none;return r=r.filter(c=>!(s.type?s.type.allowsMarkType(c.type):Ad(c.type,t))||(l=c.addToSet(l),!1)),this.nodes.push(new ha(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function mg(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ed(e){let t={};for(let n in e)t[n]=e[n];return t}function Ad(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==t||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class ni{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=pa(n).createDocumentFragment());let i=r,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(this.marks[c.type.name]){if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=Po(pa(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&Po(pa(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return Po(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new ni(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=_d(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return _d(t.marks)}}function _d(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function pa(e){return e.document||window.document}const gd=new WeakMap;function Eg(e){let t=gd.get(e);return t===void 0&&gd.set(e,t=function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r}(e)),t}function Po(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i,o=t[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Eg(r))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<t.length;d++){let h=t[d];if(h===0){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:f,contentDOM:p}=Po(e,h,n,r);if(l.appendChild(f),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:l,contentDOM:s}}const gm=Math.pow(2,16);function Ag(e,t){return e+t*gm}function Dd(e){return 65535&e}class fl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class fe{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&fe.empty)return fe.empty}recover(t){let n=0,r=Dd(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+function(i){return(i-(65535&i))/gm}(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let h=l+i+((c?t==l?-1:t==d?1:n:n)<0?0:u);if(r)return h;let f=t==(n<0?l:d)?null:Ag(a/3,t-l),p=t==l?2:t==d?1:4;return(n<0?t!=l:t!=d)&&(p|=8),new fl(h,p,f)}i+=u-c}return r?t+i:new fl(t+i,0,null)}touches(t,n){let r=0,i=Dd(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+r];t(a,a+c,l,l+u),o+=u-c}}invert(){return new fe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?fe.empty:new fe(t<0?[0,-t,0]:[0,0,t])}}fe.empty=new fe([]);class Hi{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Hi(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Hi;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(t,n);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,t=this._maps[a].recover(s.recover);continue}}i|=s.delInfo,t=s.pos}return r?t:new fl(t,i,null)}}const fa=Object.create(null);class qt{getMap(){return fe.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=fa[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in fa)throw new RangeError("Duplicate use of step JSON ID "+t);return fa[t]=n,n.prototype.jsonID=t,n}}class yt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new yt(t,null)}static fail(t){return new yt(null,t)}static fromReplace(t,n,r,i){try{return yt.ok(t.replace(n,r,i))}catch(o){if(o instanceof ts)return yt.fail(o.message);throw o}}}function Oc(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(Oc(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return U.fromArray(r)}class Rn extends qt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new $(Oc(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return yt.fromReplace(t,this.from,this.to,o)}invert(){return new $e(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Rn(n.pos,r.pos,this.mark)}merge(t){return t instanceof Rn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Rn(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Rn(n.from,n.to,t.markFromJSON(n.mark))}}qt.jsonID("addMark",Rn);class $e extends qt{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new $(Oc(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return yt.fromReplace(t,this.from,this.to,r)}invert(){return new Rn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new $e(n.pos,r.pos,this.mark)}merge(t){return t instanceof $e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new $e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $e(n.from,n.to,t.markFromJSON(n.mark))}}qt.jsonID("removeMark",$e);class In extends qt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return yt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return yt.fromReplace(t,this.pos,this.pos+1,new $(U.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new In(this.pos,n.marks[i]);return new In(this.pos,this.mark)}}return new er(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new In(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new In(n.pos,t.markFromJSON(n.mark))}}qt.jsonID("addNodeMark",In);class er extends qt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return yt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return yt.fromReplace(t,this.pos,this.pos+1,new $(U.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new In(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new er(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new er(n.pos,t.markFromJSON(n.mark))}}qt.jsonID("removeNodeMark",er);class Vt extends qt{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&ml(t,this.from,this.to)?yt.fail("Structure replace would overwrite content"):yt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new fe([this.from,this.to-this.from,this.slice.size])}invert(t){return new Vt(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Vt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Vt)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let n=this.slice.size+t.slice.size==0?$.empty:new $(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Vt(t.from,this.to,n,this.structure)}}{let n=this.slice.size+t.slice.size==0?$.empty:new $(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Vt(this.from,this.to+(t.to-t.from),n,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Vt(n.from,n.to,$.fromJSON(t,n.slice),!!n.structure)}}qt.jsonID("replace",Vt);class me extends qt{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(ml(t,this.from,this.gapFrom)||ml(t,this.gapTo,this.to)))return yt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return yt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?yt.fromReplace(t,this.from,this.to,r):yt.fail("Content does not fit in gap")}getMap(){return new fe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new me(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new me(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new me(n.from,n.to,n.gapFrom,n.gapTo,$.fromJSON(t,n.slice),n.insert,!!n.structure)}}function ml(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function ma(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(d){r=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||e.step(new $e(a,u,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,f,p=/\r?\n|\r/g;for(;h=p.exec(c.text);)f||(f=new $(U.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new Vt(a+h.index,a+h.index+h[0].length,f))}}else s.push(new Vt(a,u,$.empty));a=u}if(!r.validEnd){let l=r.fillBefore(U.empty,!0);e.replace(a,a,new $(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function _g(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Sc(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,a,t))return n;if(n==0||o.type.spec.isolating||!_g(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function Od(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function Sd(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
|
|
11
|
+
`))}})}function xo(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let d=i.node(c),h=i.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=r&&r[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Td(e,t){let n=e.resolve(t),r=n.index();return function(i,o){return!(!i||!o||i.isLeaf||!function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:c}=s.type.schema;for(let u=0;u<a.childCount;u++){let d=a.child(u),h=d.type==c?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd}(i,o))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Tc(e,t,n=t,r=$.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return Dm(i,o,r)?new Vt(t,n,r):new gg(i,o,r).fit()}function Dm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}qt.jsonID("replaceAround",me);class gg{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=U.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=U.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new $(o,s,a);return t>-1?new me(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Vt(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Ea(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:c,match:u}=this.frontier[a],d=null;if(n==1&&(s?u.matchType(s.type)||(d=u.fillBefore(U.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(n==2&&s&&(l=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Ea(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new $(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Ea(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new $(pi(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new $(pi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,c=0,u=[],{match:d,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));d=d.matchFragment(i)}let f=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let m=a.child(c),E=d.matchType(m.type);if(!E)break;c++,(c>1||l==0||m.content.size)&&(d=E,u.push(Om(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=fi(this.placed,n,U.from(u)),this.frontier[n].match=d,p&&f<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<f;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=p?t==0?$.empty:new $(pi(s.content,t-1,1),t-1,f<0?s.openEnd:t-1):new $(pi(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,n=this.frontier[this.depth];if(!n.type.isTextblock||!Aa(this.$to,this.$to.depth,n.type,n.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){t:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=Aa(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Aa(t,a,c,l,!0);if(!u||u.childCount)continue t}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=fi(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=fi(this.placed,this.depth,U.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(U.empty,!0);t.childCount&&(this.placed=fi(this.placed,this.frontier.length,t))}}function pi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(pi(e.firstChild.content,t-1,n)))}function fi(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(fi(e.lastChild.content,t-1,n)))}function Ea(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Om(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Om(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(U.empty,!0)))),e.copy(r)}function Aa(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,c,u){for(let d=u;d<c.childCount;d++)if(!l.allowsMarks(c.child(d).marks))return!0;return!1}(n,o.content,s)?a:null}function Dg(e){return e.spec.defining||e.spec.definingForContent}function Sm(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Sm(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(U.empty,!0))}return e}function vd(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class Lr extends qt{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return yt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return yt.fromReplace(t,this.pos,this.pos+1,new $(U.from(i),0,n.isLeaf?0:1))}getMap(){return fe.empty}invert(t){return new Lr(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Lr(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Lr(n.pos,n.attr,n.value)}}qt.jsonID("attr",Lr);class Ui extends qt{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return yt.ok(r)}getMap(){return fe.empty}invert(t){return new Ui(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ui(n.attr,n.value)}}qt.jsonID("docAttr",Ui);let mi=class extends Error{};mi=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(mi.prototype=Object.create(Error.prototype)).constructor=mi,mi.prototype.name="TransformError";class Og{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Hi}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new mi(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=$.empty){let i=Tc(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new $(U.from(r),0,0))}delete(t,n){return this.replace(t,n,$.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),c=i.doc.resolve(s);if(Dm(l,c,a))return i.step(new Vt(o,s,a));let u=vd(l,c);u[u.length-1]==0&&u.pop();let d=-(l.depth+1);u.unshift(d);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let _=l.node(E).type.spec;if(_.defining||_.definingAsContext||_.isolating)break;u.indexOf(E)>-1?d=E:l.before(E)==A&&u.splice(1,0,-E)}let h=u.indexOf(d),f=[],p=a.openStart;for(let E=a.content,A=0;;A++){let _=E.firstChild;if(f.push(_),A==a.openStart)break;E=_.content}for(let E=p-1;E>=0;E--){let A=f[E],_=Dg(A.type);if(_&&!A.sameMarkup(l.node(Math.abs(d)-1)))p=E;else if(_||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+p+1)%(a.openStart+1),_=f[A];if(_)for(let O=0;O<u.length;O++){let S=u[(O+h)%u.length],T=!0;S<0&&(T=!1,S=-S);let b=l.node(S-1),v=l.index(S-1);if(b.canReplaceWith(v,v,_.type,_.marks))return i.replace(l.before(S),T?c.after(S):s,new $(Sm(a.content,0,a.openStart,A),A,a.openEnd))}}let m=i.steps.length;for(let E=u.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));E--){let A=u[E];A<0||(o=l.before(A),s=c.after(A))}}(this,t,n,r),this}replaceRangeWith(t,n,r){return function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=function(c,u,d){let h=c.resolve(u);if(h.parent.canReplaceWith(h.index(),h.index(),d))return u;if(h.parentOffset==0)for(let f=h.depth-1;f>=0;f--){let p=h.index(f);if(h.node(f).canReplaceWith(p,p,d))return h.before(f+1);if(p>0)return null}if(h.parentOffset==h.parent.content.size)for(let f=h.depth-1;f>=0;f--){let p=h.indexAfter(f);if(h.node(f).canReplaceWith(p,p,d))return h.after(f+1);if(p<h.node(f).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new $(U.from(a),0,0))}(this,t,n,r),this}deleteRange(t,n){return function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=vd(s,a);for(let c=0;c<l.length;c++){let u=l[c],d=c==l.length-1;if(d&&u==0||s.node(u).type.contentMatch.validEnd)return r.delete(s.start(u),a.end(u));if(u>0&&(d||s.node(u-1).canReplace(s.index(u-1),a.indexAfter(u-1))))return r.delete(s.before(u),a.after(u))}for(let c=1;c<=s.depth&&c<=a.depth;c++)if(i-s.start(c)==s.depth-c&&o>s.end(c)&&a.end(c)-o!=a.depth-c&&s.start(c-1)==a.start(c-1)&&s.node(c-1).canReplace(s.index(c-1),a.index(c-1)))return r.delete(s.before(c),o);r.delete(i,o)}(this,t,n),this}lift(t,n){return function(r,i,o){let{$from:s,$to:a,depth:l}=i,c=s.before(l+1),u=a.after(l+1),d=c,h=u,f=U.empty,p=0;for(let A=l,_=!1;A>o;A--)_||s.index(A)>0?(_=!0,f=U.from(s.node(A).copy(f)),p++):d--;let m=U.empty,E=0;for(let A=l,_=!1;A>o;A--)_||a.after(A+1)<a.end(A)?(_=!0,m=U.from(a.node(A).copy(m)),E++):h++;r.step(new me(d,h,c,u,new $(f.append(m),p,E),f.size-p,!0))}(this,t,n),this}join(t,n=1){return function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),c=l.node().type;if(a&&c.inlineContent){let f=c.whitespace=="pre",p=!!c.contentMatch.matchType(a);f&&!p?s=!1:!f&&p&&(s=!0)}let u=r.steps.length;if(s===!1){let f=r.doc.resolve(i+o);Sd(r,f.node(),f.before(),u)}c.inlineContent&&ma(r,i+o-1,c,l.node().contentMatchAt(l.index()),s==null);let d=r.mapping.slice(u),h=d.map(i-o);if(r.step(new Vt(h,d.map(i+o,-1),$.empty,!0)),s===!0){let f=r.doc.resolve(h);Od(r,f.node(),f.before(),r.steps.length)}}(this,t,n),this}wrap(t,n){return function(r,i,o){let s=U.empty;for(let c=o.length-1;c>=0;c--){if(s.size){let u=o[c].type.contentMatch.matchFragment(s);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=U.from(o[c].type.create(o[c].attrs,s))}let a=i.start,l=i.end;r.step(new me(a,l,a,l,new $(s,0,0),o.length,!0))}(this,t,n),this}setBlockType(t,n=t,r,i=null){return function(o,s,a,l,c){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=o.steps.length;o.doc.nodesBetween(s,a,(d,h)=>{let f=typeof c=="function"?c(d):c;if(d.isTextblock&&!d.hasMarkup(l,f)&&function(p,m,E){let A=p.resolve(m),_=A.index();return A.parent.canReplaceWith(_,_+1,E)}(o.doc,o.mapping.slice(u).map(h),l)){let p=null;if(l.schema.linebreakReplacement){let _=l.whitespace=="pre",O=!!l.contentMatch.matchType(l.schema.linebreakReplacement);_&&!O?p=!1:!_&&O&&(p=!0)}p===!1&&Sd(o,d,h,u),ma(o,o.mapping.slice(u).map(h,1),l,void 0,p===null);let m=o.mapping.slice(u),E=m.map(h,1),A=m.map(h+d.nodeSize,1);return o.step(new me(E,A,E+1,A-1,new $(U.from(l.create(f,null,d.marks)),0,0),1,!0)),p===!0&&Od(o,d,h,u),!1}})}(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return function(o,s,a,l,c){let u=o.doc.nodeAt(s);if(!u)throw new RangeError("No node at given position");a||(a=u.type);let d=a.create(l,null,c||u.marks);if(u.isLeaf)return o.replaceWith(s,s+u.nodeSize,d);if(!a.validContent(u.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new me(s,s+u.nodeSize,s+1,s+u.nodeSize-1,new $(U.from(d),0,0),1,!0))}(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new Lr(t,n,r)),this}setDocAttribute(t,n){return this.step(new Ui(t,n)),this}addNodeMark(t,n){return this.step(new In(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof lt)n.isInSet(r.marks)&&this.step(new er(t,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new er(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return function(i,o,s=1,a){let l=i.doc.resolve(o),c=U.empty,u=U.empty;for(let d=l.depth,h=l.depth-s,f=s-1;d>h;d--,f--){c=U.from(l.node(d).copy(c));let p=a&&a[f];u=U.from(p?p.type.create(p.attrs,u):l.node(d).copy(u))}i.step(new Vt(o,o,new $(c.append(u),s,s),!0))}(this,t,n,r),this}addMark(t,n,r){return function(i,o,s,a){let l,c,u=[],d=[];i.doc.nodesBetween(o,s,(h,f,p)=>{if(!h.isInline)return;let m=h.marks;if(!a.isInSet(m)&&p.type.allowsMarkType(a.type)){let E=Math.max(f,o),A=Math.min(f+h.nodeSize,s),_=a.addToSet(m);for(let O=0;O<m.length;O++)m[O].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[O])?l.to=A:u.push(l=new $e(E,A,m[O])));c&&c.to==E?c.to=A:d.push(c=new Rn(E,A,a))}}),u.forEach(h=>i.step(h)),d.forEach(h=>i.step(h))}(this,t,n,r),this}removeMark(t,n,r){return function(i,o,s,a){let l=[],c=0;i.doc.nodesBetween(o,s,(u,d)=>{if(!u.isInline)return;c++;let h=null;if(a instanceof ks){let f,p=u.marks;for(;f=a.isInSet(p);)(h||(h=[])).push(f),p=f.removeFromSet(p)}else a?a.isInSet(u.marks)&&(h=[a]):h=u.marks;if(h&&h.length){let f=Math.min(d+u.nodeSize,s);for(let p=0;p<h.length;p++){let m,E=h[p];for(let A=0;A<l.length;A++){let _=l[A];_.step==c-1&&E.eq(l[A].style)&&(m=_)}m?(m.to=f,m.step=c):l.push({style:E,from:Math.max(d,o),to:f,step:c})}}}),l.forEach(u=>i.step(new $e(u.from,u.to,u.style)))}(this,t,n,r),this}clearIncompatible(t,n,r){return ma(this,t,n,r),this}}const _a=Object.create(null);class at{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Sg(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=$.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=t.mapping.slice(o);t.replaceRange(u.map(l.pos),u.map(c.pos),a?$.empty:n),a==0&&Nd(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=t.mapping.slice(r),c=l.map(s.pos),u=l.map(a.pos);o?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),Nd(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new st(t):_r(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?_r(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):_r(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new _e(t.node(0))}static atStart(t){return _r(t,t,0,0,1)||new _e(t)}static atEnd(t){return _r(t,t,t.content.size,t.childCount,-1)||new _e(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=_a[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in _a)throw new RangeError("Duplicate use of selection JSON ID "+t);return _a[t]=n,n.prototype.jsonID=t,n}getBookmark(){return st.between(this.$anchor,this.$head).getBookmark()}}at.prototype.visible=!0;class Sg{constructor(t,n){this.$from=t,this.$to=n}}let Rd=!1;function Id(e){Rd||e.parent.inlineContent||(Rd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class st extends at{constructor(t,n=t){Id(t),Id(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return at.near(r);let i=t.resolve(n.map(this.anchor));return new st(i.parent.inlineContent?i:r,r)}replace(t,n=$.empty){if(super.replace(t,n),n==$.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof st&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Ls(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new st(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=at.findFrom(n,r,!0)||at.findFrom(n,-r,!0);if(!o)return at.near(n,r);n=o.$head}return t.parent.inlineContent||(i==0||(t=(at.findFrom(t,-r,!0)||at.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0)&&(t=n),new st(t,n)}}at.jsonID("text",st);class Ls{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Ls(t.map(this.anchor),t.map(this.head))}resolve(t){return st.between(t.resolve(this.anchor),t.resolve(this.head))}}class X extends at{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?at.near(o):new X(o)}content(){return new $(U.from(this.node),0,0)}eq(t){return t instanceof X&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new vc(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new X(t.resolve(n.anchor))}static create(t,n){return new X(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}X.prototype.visible=!1,at.jsonID("node",X);class vc{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Ls(r,r):new vc(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&X.isSelectable(r)?new X(n):at.near(n)}}class _e extends at{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=$.empty){if(n==$.empty){t.delete(0,t.doc.content.size);let r=at.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new _e(t)}map(t){return new _e(t)}eq(t){return t instanceof _e}getBookmark(){return Tg}}at.jsonID("all",_e);const Tg={map(){return this},resolve:e=>new _e(e)};function _r(e,t,n,r,i,o=!1){if(t.inlineContent)return st.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&X.isSelectable(a))return X.create(e,n-(i<0?a.nodeSize:0))}else{let l=_r(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function Nd(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof Vt||o instanceof me)&&(e.mapping.maps[r].forEach((s,a,l,c)=>{i==null&&(i=c)}),e.setSelection(at.near(e.doc.resolve(i),n)))}class vg extends Og{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return lt.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,n){super.addStep(t,n),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||lt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!t)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,o)),this.selection.empty||this.setSelection(at.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Cd(e,t){return t&&e?e.bind(t):e}class Ei{constructor(t,n,r){this.name=t,this.init=Cd(n.init,r),this.apply=Cd(n.apply,r)}}const Rg=[new Ei("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Ei("selection",{init:(e,t)=>e.selection||at.atStart(t.doc),apply:e=>e.selection}),new Ei("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Ei("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class ga{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Rg.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ei(r.key,r.spec.state,r))})}}class Rr{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,c=i?i[s].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",t),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Rr(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new vg(this)}static create(t){let n=new ga(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Rr(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new ga(this.schema,t.plugins),r=n.fields,i=new Rr(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new ga(t.schema,t.plugins),o=new Rr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=qn.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=at.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=c.fromJSON.call(l,t,n[a],o))}o[s.name]=s.init(t,o)}}),o}}function Tm(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Tm(i,t,{})),n[r]=i}return n}class ws{constructor(t){this.spec=t,this.props={},t.props&&Tm(t.props,this,this.props),this.key=t.key?t.key.key:vm("plugin")}getState(t){return t[this.key]}}const Da=Object.create(null);function vm(e){return e in Da?e+"$"+ ++Da[e]:(Da[e]=0,e+"$")}class Ms{constructor(t="key"){this.key=vm(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Yt=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},qr=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let El=null;const on=function(e,t,n){let r=El||(El=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},nr=function(e,t,n,r){return n&&(yd(e,t,n,r,-1)||yd(e,t,n,r,1))},Ig=/^(img|br|input|textarea|hr)$/i;function yd(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Te(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Bi(e)||Ig.test(e.nodeName)||e.contentEditable=="false")return!1;t=Yt(e)+(i<0?0:1),e=s}else{if(e.nodeType!=1)return!1;{let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;t+=i}else e=s,t=i<0?Te(e):0}}}}function Te(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Bi(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const Ps=function(e){return e.focusNode&&nr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Vn(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const Xe=typeof navigator!="undefined"?navigator:null,bd=typeof document!="undefined"?document:null,Pn=Xe&&Xe.userAgent||"",Al=/Edge\/(\d+)/.exec(Pn),Rm=/MSIE \d/.exec(Pn),_l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Pn),le=!!(Rm||_l||Al),yn=Rm?document.documentMode:_l?+_l[1]:Al?+Al[1]:0,Ne=!le&&/gecko\/(\d+)/i.test(Pn);Ne&&(/Firefox\/(\d+)/.exec(Pn)||[0,0])[1];const gl=!le&&/Chrome\/(\d+)/.exec(Pn),xt=!!gl,Im=gl?+gl[1]:0,zt=!le&&!!Xe&&/Apple Computer/.test(Xe.vendor),Jr=zt&&(/Mobile\/\w+/.test(Pn)||!!Xe&&Xe.maxTouchPoints>2),Se=Jr||!!Xe&&/Mac/.test(Xe.platform),Nm=!!Xe&&/Win/.test(Xe.platform),ln=/Android \d/.test(Pn),oo=!!bd&&"webkitFontSmoothing"in bd.documentElement.style,Ng=oo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Cg(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function en(e,t){return typeof e=="number"?e:e[t]}function yg(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function kd(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=qr(s);continue}let a=s,l=a==o.body,c=l?Cg(o):yg(a),u=0,d=0;if(t.top<c.top+en(r,"top")?d=-(c.top-t.top+en(i,"top")):t.bottom>c.bottom-en(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+en(i,"top")-c.top:t.bottom-c.bottom+en(i,"bottom")),t.left<c.left+en(r,"left")?u=-(c.left-t.left+en(i,"left")):t.right>c.right-en(r,"right")&&(u=t.right-c.right+en(i,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let f=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let m=a.scrollLeft-f,E=a.scrollTop-p;t={left:t.left-m,top:t.top-E,right:t.right-m,bottom:t.bottom-E}}let h=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:qr(s)}}function Ld(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=qr(r));return t}function wd(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let mr=null;function Cm(e,t){let n,r,i,o,s=2e8,a=0,l=t.top,c=t.top;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let h;if(u.nodeType==1)h=u.getClientRects();else{if(u.nodeType!=3)continue;h=on(u).getClientRects()}for(let f=0;f<h.length;f++){let p=h[f];if(p.top<=l&&p.bottom>=c){l=Math.max(p.bottom,l),c=Math.min(p.top,c);let m=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(m<s){n=u,s=m,r=m&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&m&&(a=d+(t.left>=(p.left+p.right)/2?1:0));continue}}else p.top>t.top&&!i&&p.left<=t.left&&p.right>=t.left&&(i=u,o={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?function(u,d){let h,f=u.nodeValue.length,p=document.createRange();for(let m=0;m<f;m++){p.setEnd(u,m+1),p.setStart(u,m);let E=_n(p,1);if(E.top!=E.bottom&&Rc(d,E)){h={node:u,offset:m+(d.left>=(E.left+E.right)/2?1:0)};break}}return p.detach(),h||{node:u,offset:0}}(n,r):!n||s&&n.nodeType==1?{node:e,offset:a}:Cm(n,r)}function Rc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function ym(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(Rc(t,c))return ym(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function bg(e,t){let n,r=e.dom.ownerDocument,i=0,o=function(c,u,d){if(c.caretPositionFromPoint)try{let h=c.caretPositionFromPoint(u,d);if(h)return{node:h.offsetNode,offset:Math.min(Te(h.offsetNode),h.offset)}}catch(h){}if(c.caretRangeFromPoint){let h=c.caretRangeFromPoint(u,d);if(h)return{node:h.startContainer,offset:Math.min(Te(h.startContainer),h.startOffset)}}}(r,t.left,t.top);o&&({node:n,offset:i}=o);let s,a=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!Rc(t,c)||(a=ym(e.dom,t,c),!a))return null}if(zt)for(let c=a;n&&c;c=qr(c))c.draggable&&(n=void 0);if(a=function(c,u){let d=c.parentNode;return d&&/^li$/i.test(d.nodeName)&&u.left<c.getBoundingClientRect().left?d:c}(a,t),n){if(Ne&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let u,d=n.childNodes[i];d.nodeName=="IMG"&&(u=d.getBoundingClientRect()).right<=t.left&&u.bottom>t.top&&i++}let c;oo&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=function(u,d,h,f){let p=-1;for(let m=d,E=!1;m!=u.dom;){let A,_=u.docView.nearestDesc(m,!0);if(!_)return null;if(_.dom.nodeType==1&&(_.node.isBlock&&_.parent||!_.contentDOM)&&((A=_.dom.getBoundingClientRect()).width||A.height)&&(_.node.isBlock&&_.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(_.dom.nodeName)&&(!E&&A.left>f.left||A.top>f.top?p=_.posBefore:(!E&&A.right<f.left||A.bottom<f.top)&&(p=_.posAfter),E=!0),!_.contentDOM&&p<0&&!_.node.isText))return(_.node.isBlock?f.top<(A.top+A.bottom)/2:f.left<(A.left+A.right)/2)?_.posBefore:_.posAfter;m=_.dom.parentNode}return p>-1?p:u.docView.posFromDOM(d,h,-1)}(e,n,i,t))}s==null&&(s=function(c,u,d){let{node:h,offset:f}=Cm(u,d),p=-1;if(h.nodeType==1&&!h.firstChild){let m=h.getBoundingClientRect();p=m.left!=m.right&&d.left>(m.left+m.right)/2?1:-1}return c.docView.posFromDOM(h,f,p)}(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function Md(e){return e.top<e.bottom||e.left<e.right}function _n(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(Md(r))return r}return Array.prototype.find.call(n,Md)||e.getBoundingClientRect()}const kg=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function bm(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=oo||Ne;if(r.nodeType==3){if(!s||!kg.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:l++,ci(_n(on(r,a,l),c),c<0)}{let a=_n(on(r,i,i),n);if(Ne&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=_n(on(r,i-1,i-1),-1);if(l.top==a.top){let c=_n(on(r,i,i+1),-1);if(c.top!=a.top)return ci(c,c.left<l.left)}}return a}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Te(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Oa(a.getBoundingClientRect(),!1)}if(o==null&&i<Te(r)){let a=r.childNodes[i];if(a.nodeType==1)return Oa(a.getBoundingClientRect(),!0)}return Oa(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Te(r))){let a=r.childNodes[i-1],l=a.nodeType==3?on(a,Te(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return ci(_n(l,1),!1)}if(o==null&&i<Te(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?on(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return ci(_n(l,-1),!0)}return ci(_n(r.nodeType==3?on(r):r,-n),n>=0)}function ci(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Oa(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function Pd(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const Lg=/[\u0590-\u08ac]/;let xd=null,Fd=null,Hd=!1;function wg(e,t,n){return xd==t&&Fd==n?Hd:(xd=t,Fd=n,Hd=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return Pd(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let u=r.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=bm(r,a.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let d;if(u.nodeType==1)d=u.getClientRects();else{if(u.nodeType!=3)continue;d=on(u,0,u.nodeValue.length).getClientRects()}for(let h=0;h<d.length;h++){let f=d[h];if(f.bottom>f.top+1&&(o=="up"?c.top-f.top>2*(f.bottom-c.top):f.bottom-c.bottom>2*(c.bottom-f.top)))return!1}}return!0})}(e,t,n):function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,c=a==s.parent.content.size,u=r.domSelection();return u?Lg.test(s.parent.textContent)&&u.modify?Pd(r,i,()=>{let{focusNode:d,focusOffset:h,anchorNode:f,anchorOffset:p}=r.domSelectionRange(),m=u.caretBidiLevel;u.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:_}=r.domSelectionRange(),O=A&&!E.contains(A.nodeType==1?A:A.parentNode)||d==A&&h==_;try{u.collapse(f,p),d&&(d!=f||h!=p)&&u.extend&&u.extend(d,h)}catch(S){}return m!=null&&(u.caretBidiLevel=m),O}):o=="left"||o=="backward"?l:c:s.pos==s.start()||s.pos==s.end()}(e,t,n))}class so{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode)){if(r<0){let o,s;if(t==this.contentDOM)o=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.previousSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}{let o,s;if(t==this.contentDOM)o=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&(!(s=o.pmViewDesc)||s.parent!=this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}}let i;if(t==this.dom&&this.contentDOM)i=n>Yt(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return(i==null?r>0:i)?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))return s;r=!1}}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>t||s instanceof Lm){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof km&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Yt(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Yt(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&t<=c){let u=s+l.border;if(t>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=s;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){i=Yt(h.dom)+1;break}t-=h.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=Yt(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let f=0,p=0;f<this.children.length;f++){let m=this.children[f],E=p+m.size;if(o>p&&s<E)return m.setSelection(t-p-m.border,n-p-m.border,r,i);p=E}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),d=!1;if((Ne||zt)&&t==n){let{node:f,offset:p}=a;if(f.nodeType==3){if(d=!(!p||f.nodeValue[p-1]!=`
|
|
12
|
+
`),d&&p==f.nodeValue.length)for(let m,E=f;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:Yt(m)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let m=f.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Ne&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let f=u.focusNode.childNodes[u.focusOffset];f&&f.contentEditable=="false"&&(i=!0)}if(!(i||d&&zt)&&nr(a.node,a.offset,u.anchorNode,u.anchorOffset)&&nr(l.node,l.offset,u.focusNode,u.focusOffset))return;let h=!1;if((c.extend||t==n)&&(!d||!Ne)){c.collapse(a.node,a.offset);try{t!=n&&c.extend(l.node,l.offset),h=!0}catch(f){}}if(!h){if(t>n){let p=a;a=l,l=p}let f=document.createRange();f.setEnd(l.node,l.offset),f.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l)return this.dirty=t==r||n==s?2:1,void(t!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class km extends so{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==0&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return!!n&&n(t)}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Mg extends so{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Jn extends so{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=ni.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Jn(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=3&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(t,n,r){let i=Jn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=Ol(o,n,s,r)),t>0&&(o=Ol(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class bn extends so{constructor(t,n,r,i,o,s,a,l,c){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],c=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText)if(u){if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(n.text);else u||({dom:u,contentDOM:d}=ni.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));d||n.isText||u.nodeName=="BR"||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Pm(u,r,n),c?a=new Pg(t,n,r,i,u,d||null,h,c,o,s+1):n.isText?new xs(t,n,r,i,u,h,o):new bn(t,n,r,i,u,d||null,h,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>U.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,n,r){return this.dirty==0&&t.eq(this.node)&&rs(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new Fg(this,s&&s.node,t);(function(c,u,d,h){let f=u.locals(c),p=0;if(f.length==0){for(let _=0;_<c.childCount;_++){let O=c.child(_);h(O,f,u.forChild(p,O),_),p+=O.nodeSize}return}let m=0,E=[],A=null;for(let _=0;;){let O,S,T,b;for(;m<f.length&&f[m].to==p;){let g=f[m++];g.widget&&(O?(S||(S=[O])).push(g):O=g)}if(O)if(S){S.sort(Hg);for(let g=0;g<S.length;g++)d(S[g],_,!!A)}else d(O,_,!!A);if(A)b=-1,T=A,A=null;else{if(!(_<c.childCount))break;b=_,T=c.child(_++)}for(let g=0;g<E.length;g++)E[g].to<=p&&E.splice(g--,1);for(;m<f.length&&f[m].from<=p&&f[m].to>p;)E.push(f[m++]);let v=p+T.nodeSize;if(T.isText){let g=v;m<f.length&&f[m].from<g&&(g=f[m].from);for(let D=0;D<E.length;D++)E[D].to<g&&(g=E[D].to);g<v&&(A=T.cut(g-p),T=T.cut(0,g-p),v=g,b=-1)}else for(;m<f.length&&f[m].to<v;)m++;let N=T.isInline&&!T.isLeaf?E.filter(g=>!g.inline):E.slice();h(T,N,u.forChild(p,T),b),p=v}})(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t,u):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?lt.none:this.node.child(u).marks,r,t,u),l.placeWidget(c,t,i)},(c,u,d,h)=>{let f;l.syncToMarks(c.marks,r,t,h),l.findNodeMatch(c,u,d,h)||a&&t.state.selection.from>i&&t.state.selection.to<i+c.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,d,f,t)||l.updateNextNode(c,u,d,t,h,i)||l.addNode(c,u,d,t,i),i+=c.nodeSize}),l.syncToMarks([],r,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(t,s),wm(this.contentDOM,this.children,t),Jr&&function(c){if(c.nodeName=="UL"||c.nodeName=="OL"){let u=c.style.cssText;c.style.cssText=u+"; list-style: square !important",window.getComputedStyle(c).listStyle,c.style.cssText=u}}(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof st)||r<n||i>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=function(l,c,u,d){for(let h=0,f=0;h<l.childCount&&f<=d;){let p=l.child(h++),m=f;if(f+=p.nodeSize,!p.isText)continue;let E=p.text;for(;h<l.childCount;){let A=l.child(h++);if(f+=A.nodeSize,!A.isText)break;E+=A.text}if(f>=u){if(f>=d&&E.slice(d-c.length-m,d-m)==c)return d-c.length;let A=m<d?E.lastIndexOf(c,d-m-1):-1;if(A>=0&&A+c.length+m>=u)return m+A;if(u==d&&E.length>=d+c.length-m&&E.slice(d-m,d-m+c.length)==c)return d}}return-1}(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new Mg(this,o,n,i);t.input.compositionNodes.push(s),this.children=Ol(this.children,r,r+i.length,t,s)}update(t,n,r,i){return!(this.dirty==3||!t.sameMarkup(this.node))&&(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(rs(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Mm(this.dom,this.nodeDOM,Dl(this.outerDeco,this.node,n),Dl(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ud(e,t,n,r,i){Pm(r,t,e);let o=new bn(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class xs extends bn{constructor(t,n,r,i,o,s,a){super(t,n,r,i,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(n),this.dirty==0&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),o=document.createTextNode(i.text);return new xs(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,n){super.markDirty(t,n),this.dom==this.nodeDOM||t!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class Lm extends so{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==0&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Pg extends bn{constructor(t,n,r,i,o,s,a,l,c,u){super(t,n,r,i,o,s,a,c,u),this.spec=l}update(t,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,r);return o&&this.updateInner(t,n,r,i),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function wm(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=Bd(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Jn){let l=r?r.previousSibling:e.lastChild;wm(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=Bd(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const Ri=function(e){e&&(this.nodeName=e)};Ri.prototype=Object.create(null);const zn=[new Ri];function Dl(e,t,n){if(e.length==0)return zn;let r=n?zn[0]:new Ri,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new Ri(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new Ri(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function Mm(e,t,n,r){if(n==zn&&r==zn)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=zn[0]),i=l}xg(i,a||zn[0],s)}return i}function xg(e,t,n){for(let r in t)r=="class"||r=="style"||r=="nodeName"||r in n||e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.add(i[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function Pm(e,t,n){return Mm(e,e,zn,Dl(t,n,e.nodeType!=1))}function rs(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Bd(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Fg{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(i,o){let s=o,a=s.children.length,l=i.childCount,c=new Map,u=[];t:for(;l>0;){let d;for(;;)if(a){let f=s.children[a-1];if(!(f instanceof Jn)){d=f,a--;break}s=f,a=f.children.length}else{if(s==o)break t;a=s.parent.children.indexOf(s),s=s.parent}let h=d.node;if(h){if(h!=i.child(l-1))break;--l,c.set(d,l),u.push(d)}}return{index:l,matched:c,matches:u.reverse()}}(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;i<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let d=this.top.children[u];if(d.matchesMark(t[s])&&!this.isLocked(d.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=Jn.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(t,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(t,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof bn){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u,d=l.dom,h=this.isLocked(d)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=3&&rs(n,l.outerDeco));if(!h&&l.update(t,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(u=this.recreateWrapper(l,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(i,s+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!rs(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=bn.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,n,r,i,o){let s=bn.create(this.top,t,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(!i||!i.matchesWidget(t)||t!=i.widget&&i.widget.type.toDOM.parentNode){let o=new km(this.top,t,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Jn;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof xs)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((zt||xt)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new Lm(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function Hg(e,t){return e.type.side-t.type.side}function Ol(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function Ic(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(Ps(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&X.isSelectable(d)&&i.parent&&(!d.isInline||!function(h,f,p){for(let m=f==0,E=f==Te(h);m||E;){if(h==p)return!0;let A=Yt(h);if(!(h=h.parentNode))return!1;m=m&&A==0,E=E&&A==Te(h)}}(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new X(s==h?c:r.resolve(h))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=s,h=s;for(let f=0;f<n.rangeCount;f++){let p=n.getRangeAt(f);d=Math.min(d,e.docView.posFromDOM(p.startContainer,p.startOffset,1)),h=Math.max(h,e.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(d<0)return null;[a,s]=h==e.state.selection.anchor?[h,d]:[d,h],c=r.resolve(s)}else a=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let u=r.resolve(a);return l||(l=Nc(e,u,c,t=="pointer"||e.state.selection.head<c.pos&&!o?1:-1)),l}function jd(e){return e.editable?e.hasFocus():Fm(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function dn(e,t=!1){let n=e.state.selection;if(xm(e,n),jd(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&xt){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&nr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,Yt(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&le&&yn<=11&&(o.disabled=!0,o.disabled=!1)})(e);else{let r,i,{anchor:o,head:s}=n;!$d||n instanceof st||(n.$from.parent.inlineContent||(r=Vd(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Vd(e,n.to))),e.docView.setSelection(o,s,e,t),$d&&(r&&Yd(r),i&&Yd(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let c=a.domSelectionRange(),u=c.anchorNode,d=c.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{c.anchorNode==u&&c.anchorOffset==d||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{jd(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const $d=zt||xt&&Im<63;function Vd(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(zt&&i&&i.contentEditable=="false")return Sa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Sa(i);if(o)return Sa(o)}}function Sa(e){return e.contentEditable="true",zt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Yd(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function xm(e,t){if(t instanceof X){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(zd(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else zd(e)}function zd(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Nc(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||st.between(t,n,r)}function Gd(e){return!(e.editable&&!e.hasFocus())&&Fm(e)}function Fm(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Sl(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&at.findFrom(o,t)}function Dn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Wd(e,t,n){let r=e.state.selection;if(!(r instanceof st)){if(r instanceof X&&r.node.isInline)return Dn(e,new st(t>0?r.$to:r.$from));{let i=Sl(e.state,t);return!!i&&Dn(e,i)}}if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Dn(e,new st(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let i=Sl(e.state,t);return!!(i&&i instanceof X)&&Dn(e,i)}if(!(Se&&n.indexOf("m")>-1)){let i,o=r.$head,s=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText)return!1;let a=t<0?o.pos-s.nodeSize:o.pos;return!!(s.isAtom||(i=e.docView.descAt(a))&&!i.contentDOM)&&(X.isSelectable(s)?Dn(e,new X(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!oo&&Dn(e,new st(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function To(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ui(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Er(e,t){return t<0?function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(Ne&&i.nodeType==1&&o<To(i)&&ui(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let c=i.childNodes[o-1];if(ui(c,-1))s=i,a=--o;else{if(c.nodeType!=3)break;i=c,o=i.nodeValue.length}}}else{if(Xd(i))break;{let c=i.previousSibling;for(;c&&ui(c,-1);)s=i.parentNode,a=Yt(c),c=c.previousSibling;if(c)i=c,o=To(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Ta(n,i,o):s&&Ta(n,s,a)}(e):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=To(i);for(;;)if(o<l){if(i.nodeType!=1||!ui(i.childNodes[o],1))break;s=i,a=++o}else{if(Xd(i))break;{let c=i.nextSibling;for(;c&&ui(c,1);)s=c.parentNode,a=Yt(c)+1,c=c.nextSibling;if(c)i=c,o=0,l=To(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Ta(n,s,a)}(e)}function Xd(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ta(e,t,n){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!Bi(a);)l=Yt(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let c=a.childNodes[l];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;a=c,l=0}}(t,n))?(t=s,n=0):(o=function(a,l){for(;a&&!l&&!Bi(a);)l=Yt(a),a=a.parentNode;for(;a&&l;){let c=a.childNodes[l-1];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;l=(a=c).childNodes.length}}(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(Ps(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&dn(e)},50)}function Kd(e,t){let n=e.state.doc.resolve(t);if(!xt&&!Nm&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.coordsAtPos(t-1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left<r.left?"ltr":"rtl"}if(t<n.end()){let i=e.coordsAtPos(t+1),o=(i.top+i.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(i.left-r.left)>1)return i.left>r.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function qd(e,t,n){let r=e.state.selection;if(r instanceof st&&!r.empty||n.indexOf("s")>-1||Se&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Sl(e.state,t);if(s&&s instanceof X)return Dn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof _e?at.near(s,t):at.findFrom(s,t);return!!a&&Dn(e,a)}return!1}function Jd(e,t){if(!(e.state.selection instanceof st))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function Zd(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Ug(e,t){let n=t.keyCode,r=function(i){let o="";return i.ctrlKey&&(o+="c"),i.metaKey&&(o+="m"),i.altKey&&(o+="a"),i.shiftKey&&(o+="s"),o}(t);if(n==8||Se&&n==72&&r=="c")return Jd(e,-1)||Er(e,-1);if(n==46&&!t.shiftKey||Se&&n==68&&r=="c")return Jd(e,1)||Er(e,1);if(n==13||n==27)return!0;if(n==37||Se&&n==66&&r=="c"){let i=n==37?Kd(e,e.state.selection.from)=="ltr"?-1:1:-1;return Wd(e,i,r)||Er(e,i)}if(n==39||Se&&n==70&&r=="c"){let i=n==39?Kd(e,e.state.selection.from)=="ltr"?1:-1:1;return Wd(e,i,r)||Er(e,i)}return n==38||Se&&n==80&&r=="c"?qd(e,-1,r)||Er(e,-1):n==40||Se&&n==78&&r=="c"?function(i){if(!zt||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:o,focusOffset:s}=i.domSelectionRange();if(o&&o.nodeType==1&&s==0&&o.firstChild&&o.firstChild.contentEditable=="false"){let a=o.firstChild;Zd(i,a,"true"),setTimeout(()=>Zd(i,a,"false"),20)}return!1}(e)||qd(e,1,r)||Er(e,1):r==(Se?"m":"c")&&(n==66||n==73||n==89||n==90)}function Cc(e,t){e.someProp("transformCopied",f=>{t=f(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let f=r.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),r=f.content}let s=e.someProp("clipboardSerializer")||ni.fromSchema(e.state.schema),a=Vm(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&u.nodeType==1&&(c=$m[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=a.createElement(c[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=e.someProp("clipboardTextSerializer",f=>f(t,e))||t.content.textBetween(0,t.content.size,`
|
|
12
13
|
|
|
13
|
-
`);return{dom:l,text:h}}function
|
|
14
|
-
`))),0,0):x.empty;let d=n.someProp("clipboardTextParser",h=>h(e,i,r,n));if(d)s=d;else{let h=i.marks(),{schema:p}=n.state,f=rn.fromSchema(p);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(f.serializeNode(p.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),o=function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let p,f=uE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((p=m&&lE[m[1].toLowerCase()])&&(d=p.map(E=>"<"+E+">").join("")+d+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=d,p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(t),Eo&&function(d){let h=d.querySelectorAll($e?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<h.length;p++){let f=h[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),f)}}(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(n.someProp("clipboardParser")||n.someProp("domParser")||Xi.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!c),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||pD.test(h.parentNode.nodeName)?null:{ignore:!0}})),c)s=function(d,h){if(!d.size)return d;let p,f=d.content.firstChild.type.schema;try{p=JSON.parse(h)}catch(g){return d}let{content:m,openStart:E,openEnd:A}=d;for(let g=p.length-2;g>=0;g-=2){let O=f.nodes[p[g]];if(!O||O.hasRequiredAttrs())break;m=B.from(O.create(p[g+1],m)),E++,A++}return new x(m,E,A)}(fh(s,+c[1],+c[2]),c[4]);else if(s=x.maxOpen(function(d,h){if(d.childCount<2)return d;for(let p=h.depth;p>=0;p--){let f,m=h.node(p).contentMatchAt(h.index(p)),E=[];if(d.forEach(A=>{if(!E)return;let g,O=m.findWrapping(A.type);if(!O)return E=null;if(g=E.length&&f.length&&sE(O,f,A,E[E.length-1],0))E[E.length-1]=g;else{E.length&&(E[E.length-1]=aE(E[E.length-1],f.length));let S=oE(A,O);E.push(S),m=m.matchType(S.type),f=O}}),E)return B.from(E)}return d}(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let p=s.content.firstChild;d<s.openStart&&!p.type.spec.isolating;d++,p=p.firstChild);for(let p=s.content.lastChild;h<s.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);s=fh(s,d,h)}return n.someProp("transformPasted",d=>{s=d(s,n)}),s}const pD=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function oE(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,B.from(n));return n}function sE(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let o=sE(n,e,t,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(B.from(oE(t,n,i+1))))}}function aE(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,aE(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(B.empty,!0);return n.copy(t.append(r))}function Bl(n,e,t,r,i,o){let s=e<0?n.firstChild:n.lastChild,a=s.content;return n.childCount>1&&(o=0),i<r-1&&(a=Bl(a,e,t,r,i+1,o)),i>=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(B.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function fh(n,e,t){return e<n.openStart&&(n=new x(Bl(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new x(Bl(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const lE={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let mh=null;function uE(){return mh||(mh=document.implementation.createHTMLDocument("title"))}const Je={},et={},fD={touchstart:!0,touchmove:!0};class mD{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Dn(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Fa(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Hl(n,r))})}function Hl(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return!!r&&(r(n,e)||e.defaultPrevented)})}function ED(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Es(n){return{left:n.clientX,top:n.clientY}}function Ju(n,e,t,r,i){if(r==-1)return!1;let o=n.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),i,!0):a(n,t,o.node(s),o.before(s),i,!1)))return!0;return!1}function Nr(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function AD(n,e,t,r,i){return Ju(n,"handleClickOn",e,t,r)||n.someProp("handleClick",o=>o(n,e,r))||(i?function(o,s){if(s==-1)return!1;let a,l,u=o.state.selection;u instanceof W&&(a=u.node);let c=o.state.doc.resolve(s);for(let d=c.depth+1;d>0;d--){let h=d>c.depth?c.nodeAfter:c.node(d);if(W.isSelectable(h)){l=a&&u.$from.depth>0&&d>=u.$from.depth&&c.before(u.$from.depth+1)==u.$from.pos?c.before(u.$from.depth):c.before(d);break}}return l!=null&&(Nr(o,W.create(o.state.doc,l)),!0)}(n,t):function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&W.isSelectable(l))&&(Nr(o,new W(a)),!0)}(n,t))}function _D(n,e,t,r){return Ju(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",i=>i(n,e,r))}function gD(n,e,t,r){return Ju(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",i=>i(n,e,r))||function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(Nr(i,ae.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let u=l.depth+1;u>0;u--){let c=u>l.depth?l.nodeAfter:l.node(u),d=l.before(u);if(c.inlineContent)Nr(i,ae.create(a,d+1,d+1+c.content.size));else{if(!W.isSelectable(c))continue;Nr(i,W.create(a,d))}return!0}}(n,t,r)}function Ul(n){return As(n)}et.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Eh(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!St||!$e||t.keyCode!=13))if(t.keyCode!=229&&n.domObserver.forceFlush(),!Yr||t.keyCode!=13||t.ctrlKey||t.altKey||t.metaKey)n.someProp("handleKeyDown",r=>r(n,t))||hD(n,t)?t.preventDefault():Dn(n,"key");else{let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",i=>i(n,Hn(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},et.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)},et.keypress=(n,e)=>{let t=e;if(Eh(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||_t&&t.metaKey)return;if(n.someProp("handleKeyPress",i=>i(n,t)))return void t.preventDefault();let r=n.state.selection;if(!(r instanceof ae&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(t.charCode);/[\r\n]/.test(i)||n.someProp("handleTextInput",o=>o(n,r.$from.pos,r.$to.pos,i))||n.dispatch(n.state.tr.insertText(i).scrollIntoView()),t.preventDefault()}};const cE=_t?"metaKey":"ctrlKey";Je.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Ul(n),i=Date.now(),o="singleClick";i-n.input.lastClick.time<500&&function(a,l){let u=l.x-a.clientX,c=l.y-a.clientY;return u*u+c*c<100}(t,n.input.lastClick)&&!t[cE]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:i,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(Es(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new DD(n,s,t,!!r)):(o=="doubleClick"?_D:gD)(n,s.pos,s.inside,t)?t.preventDefault():Dn(n,"pointer"))};class DD{constructor(e,t,r,i){let o,s;if(this.view=e,this.pos=t,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[cE],this.allowDefault=r.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let c=e.state.doc.resolve(t.pos);o=c.parent,s=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:u}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof W&&u.from<=s&&u.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!bt||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Dn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ln(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Es(e))),this.updateAllowDefault(e),this.allowDefault||!t?Dn(this.view,"pointer"):AD(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||tt&&this.mightDrag&&!this.mightDrag.node.isAtom||$e&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Nr(this.view,re.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):Dn(this.view,"pointer")}move(e){this.updateAllowDefault(e),Dn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function Eh(n,e){return!!n.composing||!!(tt&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}Je.touchstart=n=>{n.input.lastTouch=Date.now(),Ul(n),Dn(n,"pointer")},Je.touchmove=n=>{n.input.lastTouch=Date.now(),Dn(n,"pointer")},Je.contextmenu=n=>Ul(n);const OD=St?5e3:-1;function Ah(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>As(n),e))}function dE(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function As(n,e=!1){if(!(St&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),dE(n),e||n.docView&&n.docView.dirty){let t=Xu(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}et.compositionstart=et.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),As(n,!0),n.markCursor=null;else if(As(n),bt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){n.domSelection().collapse(s,s.nodeValue.length);break}i=s,o=-1}}n.input.composing=!0}Ah(n,OD)},et.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Ah(n,20))};const Fi=st&&Sn<15||Yr&&eD<604;function Pi(n,e,t,r,i){let o=iE(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,i,o||x.empty)))return!0;if(!o)return!1;let s=function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,r):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function hE(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Je.copy=et.cut=(n,e)=>{let t=e,r=n.state.selection,i=t.type=="cut";if(r.empty)return;let o=Fi?null:t.clipboardData,s=r.content(),{dom:a,text:l}=rE(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(u,c){if(!u.dom.parentNode)return;let d=u.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(c),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),p=document.createRange();p.selectNodeContents(c),u.dom.blur(),h.removeAllRanges(),h.addRange(p),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),u.focus()},50)}(n,a),i&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},et.paste=(n,e)=>{let t=e;if(n.composing&&!St)return;let r=Fi?null:t.clipboardData,i=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Pi(n,hE(r),r.getData("text/html"),i,t)?t.preventDefault():function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let u=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?Pi(o,l.value,null,u,s):Pi(o,l.textContent,l.innerHTML,u,s)},50)}(n,t)};class pE{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const _h=_t?"altKey":"ctrlKey";Je.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let i,o=n.state.selection,s=o.empty?null:n.posAtCoords(Es(t));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof W?o.to-1:o.to))){if(r&&r.mightDrag)i=W.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let c=n.docView.nearestDesc(t.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&(i=W.create(n.state.doc,c.posBefore))}}let a=(i||n.state.selection).content(),{dom:l,text:u}=rE(n,a);t.dataTransfer.clearData(),t.dataTransfer.setData(Fi?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Fi||t.dataTransfer.setData("text/plain",u),n.dragging=new pE(a,!t[_h],i)},Je.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},et.dragover=et.dragenter=(n,e)=>e.preventDefault(),et.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let i=n.posAtCoords(Es(t));if(!i)return;let o=n.state.doc.resolve(i.pos),s=r&&r.slice;s?n.someProp("transformPasted",f=>{s=f(s,n)}):s=iE(n,hE(t.dataTransfer),Fi?null:t.dataTransfer.getData("text/html"),!1,o);let a=!(!r||t[_h]);if(n.someProp("handleDrop",f=>f(n,t,s||x.empty,a)))return void t.preventDefault();if(!s)return;t.preventDefault();let l=s?function(f,m,E){let A=f.resolve(m);if(!E.content.size)return m;let g=E.content;for(let O=0;O<E.openStart;O++)g=g.firstChild.content;for(let O=1;O<=(E.openStart==0&&E.size?2:1);O++)for(let S=A.depth;S>=0;S--){let T=S==A.depth?0:A.pos<=(A.start(S+1)+A.end(S+1))/2?-1:1,I=A.index(S)+(T>0?1:0),C=A.node(S),y=!1;if(O==1)y=C.canReplace(I,I,g);else{let _=C.contentMatchAt(I).findWrapping(g.firstChild.type);y=_&&C.canReplaceWith(I,I,_[0])}if(y)return T==0?A.pos:T<0?A.before(S+1):A.after(S+1)}return null}(n.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let u=n.state.tr;if(a){let{node:f}=r;f?f.replace(u):u.deleteSelection()}let c=u.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=u.doc;if(d?u.replaceRangeWith(c,c,s.content.firstChild):u.replaceRange(c,c,s),u.doc.eq(h))return;let p=u.doc.resolve(c);if(d&&W.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))u.setSelection(new W(p));else{let f=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((m,E,A,g)=>f=g),u.setSelection(Ku(n,p,u.doc.resolve(f)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))},Je.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&ln(n)},20))},Je.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},Je.beforeinput=(n,e)=>{if($e&&St&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:t}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=t||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,Hn(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in et)Je[n]=et[n];function Ji(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class _s{constructor(e,t){this.toDOM=e,this.spec=t||qn,this.side=this.spec.side||0}map(e,t,r,i){let{pos:o,deleted:s}=e.mapResult(t.from+i,this.side<0?-1:1);return s?null:new pt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof _s&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ji(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Rn{constructor(e,t){this.attrs=e,this.spec=t||qn}map(e,t,r,i){let o=e.map(t.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(t.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new pt(o,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Rn&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}static is(e){return e.type instanceof Rn}destroy(){}}class qu{constructor(e,t){this.attrs=e,this.spec=t||qn}map(e,t,r,i){let o=e.mapResult(t.from+i,1);if(o.deleted)return null;let s=e.mapResult(t.to+i,-1);return s.deleted||s.pos<=o.pos?null:new pt(o.pos-r,s.pos-r,this)}valid(e,t){let r,{index:i,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(r=e.child(i)).isText&&o+r.nodeSize==t.to}eq(e){return this==e||e instanceof qu&&Ji(this.attrs,e.attrs)&&Ji(this.spec,e.spec)}destroy(){}}class pt{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new pt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new pt(e,e,new _s(t,r))}static inline(e,t,r,i){return new pt(e,t,new Rn(r,i))}static node(e,t,r,i){return new pt(e,t,new qu(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Rn}get widget(){return this.type instanceof _s}}const mr=[],qn={};class Te{constructor(e,t){this.local=e.length?e:mr,this.children=t.length?t:mr}static create(e,t){return t.length?Wo(t,e,0,qn):Ue}find(e,t,r){let i=[];return this.findInner(e==null?0:e,t==null?1e9:t,i,0,r),i}findInner(e,t,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=t&&a.to>=e&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,r,i+a,o)}}map(e,t,r){return this==Ue||e.maps.length==0?this:this.mapInner(e,t,0,0,r||qn)}mapInner(e,t,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(t,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(a,l,u,c,d,h,p){let f=a.slice();for(let E=0,A=h;E<u.maps.length;E++){let g=0;u.maps[E].forEach((O,S,T,I)=>{let C=I-T-(S-O);for(let y=0;y<f.length;y+=3){let _=f[y+1];if(_<0||O>_+A-g)continue;let D=f[y]+A-g;S>=D?f[y+1]=O<=D?-2:-1:O>=A&&C&&(f[y]+=C,f[y+1]+=C)}g+=C}),A=u.maps[E].map(A,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let A=u.map(a[E]+h),g=A-d;if(g<0||g>=c.content.size){m=!0;continue}let O=u.map(a[E+1]+h,-1)-d,{index:S,offset:T}=c.content.findIndex(g),I=c.maybeChild(S);if(I&&T==g&&T+I.nodeSize==O){let C=f[E+2].mapInner(u,I,A+1,a[E]+h+1,p);C!=Ue?(f[E]=g,f[E+1]=O,f[E+2]=C):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(g,O,S,T,I,C,y){function _(D,k){for(let L=0;L<D.local.length;L++){let H=D.local[L].map(T,I,k);H?S.push(H):y.onRemove&&y.onRemove(D.local[L].spec)}for(let L=0;L<D.children.length;L+=3)_(D.children[L+2],D.children[L]+k+1)}for(let D=0;D<g.length;D+=3)g[D+1]==-1&&_(g[D+2],O[D]+C+1);return S}(f,a,l,u,d,h,p),A=Wo(E,c,0,p);l=A.local;for(let g=0;g<f.length;g+=3)f[g+1]<0&&(f.splice(g,3),g-=3);for(let g=0,O=0;g<A.children.length;g+=3){let S=A.children[g];for(;O<f.length&&f[O]<S;)O+=3;f.splice(O,0,A.children[g],A.children[g+1],A.children[g+2])}}return new Te(l.sort(jn),f)}(this.children,s||[],e,t,r,i,o):s?new Te(s.sort(jn),mr):Ue}add(e,t){return t.length?this==Ue?Te.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let i,o=0;e.forEach((a,l)=>{let u,c=l+r;if(u=mE(t,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,Wo(u,a,c+1,qn)),o+=3}});let s=fE(o?EE(t):t,-r);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||s.splice(a--,1);return new Te(s.length?this.local.concat(s).sort(jn):this.local,i||this.children)}remove(e){return e.length==0||this==Ue?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+t,l=r[o+1]+t;for(let c,d=0;d<e.length;d++)(c=e[d])&&c.from>a&&c.to<l&&(e[d]=null,(s||(s=[])).push(c));if(!s)continue;r==this.children&&(r=this.children.slice());let u=r[o+2].removeInner(s,a+1);u!=Ue?r[o+2]=u:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,t)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Te(i,r):Ue}forChild(e,t){if(this==Ue)return this;if(t.isLeaf)return Te.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Rn){let u=Math.max(o,l.from)-o,c=Math.min(s,l.to)-o;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new Te(i.sort(jn),mr);return r?new _n([a,r]):a}return r||Ue}eq(e){if(this==e)return!0;if(!(e instanceof Te)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Zu(this.localsInner(e))}localsInner(e){if(this==Ue)return mr;if(e.inlineContent||!this.local.some(Rn.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Rn||t.push(this.local[r]);return t}}Te.empty=new Te([],[]),Te.removeOverlap=Zu;const Ue=Te.empty;class _n{constructor(e){this.members=e}map(e,t){const r=this.members.map(i=>i.map(e,t,qn));return _n.from(r)}forChild(e,t){if(t.isLeaf)return Te.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,t);o!=Ue&&(o instanceof _n?r=r.concat(o.members):r.push(o))}return _n.from(r)}eq(e){if(!(e instanceof _n)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(t){r&&(t=t.slice(),r=!1);for(let s=0;s<o.length;s++)t.push(o[s])}else t=o}return t?Zu(r?t:t.sort(jn)):mr}static from(e){switch(e.length){case 0:return Ue;case 1:return e[0];default:return new _n(e.every(t=>t instanceof Te)?e:e.reduce((t,r)=>t.concat(r instanceof Te?r:r.members),[]))}}}function fE(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let i=n[r];t.push(new pt(i.from+e,i.to+e,i.type))}return t}function mE(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,i=null;for(let o,s=0;s<n.length;s++)(o=n[s])&&o.from>t&&o.to<r&&((i||(i=[])).push(o),n[s]=null);return i}function EE(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Wo(n,e,t,r){let i=[],o=!1;e.forEach((a,l)=>{let u=mE(n,a,l+t);if(u){o=!0;let c=Wo(u,a,t+l+1,r);c!=Ue&&i.push(l,l+a.nodeSize,c)}});let s=fE(o?EE(n):n,-t).sort(jn);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Te(s,i):Ue}function jn(n,e){return n.from-e.from||n.to-e.to}function Zu(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let i=t+1;i<e.length;i++){let o=e[i];if(o.from!=r.from){o.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,o.from),gh(e,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(e==n&&(e=n.slice()),e[i]=o.copy(o.from,r.to),gh(e,i+1,o.copy(r.to,o.to)))}}return e}function gh(n,e,t){for(;e<n.length&&jn(t,n[e])>0;)e++;n.splice(e,0,t)}function Pa(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=Ue&&e.push(r)}),n.cursorWrapper&&e.push(Te.create(n.state.doc,[n.cursorWrapper.deco])),_n.from(e)}const SD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},TD=st&&Sn<=11;class RD{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class CD{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new RD,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);st&&Sn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),TD&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,SD)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(ah(this.view)){if(this.suppressingSelectionUpdates)return ln(this.view);if(st&&Sn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&tr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,r=new Set;for(let o=e.focusNode;o;o=Ki(o))r.add(o);for(let o=e.anchorNode;o;o=Ki(o))if(r.has(o)){t=o;break}let i=t&&this.view.docView.nearestDesc(t);return i&&i.ignoreMutation({type:"selection",target:t.nodeType==3?t.parentNode:t})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&ah(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let c=0;c<t.length;c++){let d=this.registerMutation(t[c],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(bt&&l.length>1){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let d=c[0],h=c[1];d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}}let u=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ks(r)&&(u=Xu(e))&&u.eq(re.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ln(e),this.currentSelection.set(r),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),function(c){if(!Dh.has(c)&&(Dh.set(c,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace)!==-1)){if(c.requiresGeckoHackNode=bt,Oh)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Oh=!0}}(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ln(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++)t.push(e.addedNodes[u]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(st&&Sn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:c,nextSibling:d}=e.addedNodes[u];(!c||Array.prototype.indexOf.call(e.addedNodes,c)<0)&&(i=c),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==e.target?Ke(i)+1:0,a=r.localPosFromDOM(e.target,s,-1),l=o&&o.parentNode==e.target?Ke(o):e.target.childNodes.length;return{from:a,to:r.localPosFromDOM(e.target,l,1)}}return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let Dh=new WeakMap,Oh=!1;function ID(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(tt&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(n.parentNode.lastChild==n||tt&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const vD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ND(n,e,t,r,i){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let _=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,D=Xu(n,_);if(D&&!n.state.selection.eq(D)){if($e&&St&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",L=>L(n,Hn(13,"Enter"))))return;let k=n.state.tr.setSelection(D);_=="pointer"?k.setMeta("pointer",!0):_=="key"&&k.scrollIntoView(),o&&k.setMeta("composition",o),n.dispatch(k)}return}let s=n.state.doc.resolve(e),a=s.sharedDepth(t);e=s.before(a+1),t=n.state.doc.resolve(t).after(a+1);let l,u,c=n.state.selection,d=function(_,D,k){let L,{node:H,fromOffset:N,toOffset:w,from:$,to:U}=_.docView.parseRange(D,k),G=_.domSelectionRange(),z=G.anchorNode;if(z&&_.dom.contains(z.nodeType==1?z:z.parentNode)&&(L=[{node:z,offset:G.anchorOffset}],Ks(G)||L.push({node:G.focusNode,offset:G.focusOffset})),$e&&_.input.lastKeyCode===8)for(let le=w;le>N;le--){let ve=H.childNodes[le-1],Ne=ve.pmViewDesc;if(ve.nodeName=="BR"&&!Ne){w=le;break}if(!Ne||Ne.size)break}let V=_.state.doc,K=_.someProp("domParser")||Xi.fromSchema(_.state.schema),J=V.resolve($),oe=null,M=K.parse(H,{topNode:J.parent,topMatch:J.parent.contentMatchAt(J.index()),topOpen:!0,from:N,to:w,preserveWhitespace:J.parent.type.whitespace!="pre"||"full",findPositions:L,ruleFromNode:ID,context:J});if(L&&L[0].pos!=null){let le=L[0].pos,ve=L[1]&&L[1].pos;ve==null&&(ve=le),oe={anchor:le+$,head:ve+$}}return{doc:M,sel:oe,from:$,to:U}}(n,e,t),h=n.state.doc,p=h.slice(d.from,d.to);n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(l=n.state.selection.to,u="end"):(l=n.state.selection.from,u="start"),n.input.lastKeyCode=null;let f=function(_,D,k,L,H){let N=_.findDiffStart(D,k);if(N==null)return null;let{a:w,b:$}=_.findDiffEnd(D,k+_.size,k+D.size);if(H=="end"&&(L-=w+Math.max(0,N-Math.min(w,$))-N),w<N&&_.size<D.size){let U=L<=N&&L>=w?N-L:0;N-=U,N&&N<D.size&&Th(D.textBetween(N-1,N+1))&&(N+=U?1:-1),$=N+($-w),w=N}else if($<N){let U=L<=N&&L>=$?N-L:0;N-=U,N&&N<_.size&&Th(_.textBetween(N-1,N+1))&&(N+=U?1:-1),w=N+(w-$),$=N}return{start:N,endA:w,endB:$}}(p.content,d.doc.content,d.from,l,u);if((Yr&&n.input.lastIOSEnter>Date.now()-225||St)&&i.some(_=>_.nodeType==1&&!vD.test(_.nodeName))&&(!f||f.endA>=f.endB)&&n.someProp("handleKeyDown",_=>_(n,Hn(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(!f){if(!(r&&c instanceof ae&&!c.empty&&c.$head.sameParent(c.$anchor))||n.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let _=Sh(n,n.state.doc,d.sel);if(_&&!_.eq(n.state.selection)){let D=n.state.tr.setSelection(_);o&&D.setMeta("composition",o),n.dispatch(D)}}return}f={start:c.from,endA:c.to,endB:c.to}}if($e&&n.cursorWrapper&&d.sel&&d.sel.anchor==n.cursorWrapper.deco.from&&d.sel.head==d.sel.anchor){let _=f.endB-f.start;d.sel={anchor:d.sel.anchor+_,head:d.sel.anchor+_}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&f.start==f.endB&&n.state.selection instanceof ae&&(f.start>n.state.selection.from&&f.start<=n.state.selection.from+2&&n.state.selection.from>=d.from?f.start=n.state.selection.from:f.endA<n.state.selection.to&&f.endA>=n.state.selection.to-2&&n.state.selection.to<=d.to&&(f.endB+=n.state.selection.to-f.endA,f.endA=n.state.selection.to)),st&&Sn<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>d.from&&d.doc.textBetween(f.start-d.from-1,f.start-d.from+1)==" "&&(f.start--,f.endA--,f.endB--);let m,E=d.doc.resolveNoCache(f.start-d.from),A=d.doc.resolveNoCache(f.endB-d.from),g=h.resolve(f.start),O=E.sameParent(A)&&E.parent.inlineContent&&g.end()>=f.endA;if((Yr&&n.input.lastIOSEnter>Date.now()-225&&(!O||i.some(_=>_.nodeName=="DIV"||_.nodeName=="P"))||!O&&E.pos<d.doc.content.size&&!E.sameParent(A)&&(m=re.findFrom(d.doc.resolve(E.pos+1),1,!0))&&m.head==A.pos)&&n.someProp("handleKeyDown",_=>_(n,Hn(13,"Enter"))))return void(n.input.lastIOSEnter=0);if(n.state.selection.anchor>f.start&&function(_,D,k,L,H){if(!L.parent.isTextblock||k-D<=H.pos-L.pos||xa(L,!0,!1)<H.pos)return!1;let N=_.resolve(D);if(N.parentOffset<N.parent.content.size||!N.parent.isTextblock)return!1;let w=_.resolve(xa(N,!0,!0));return!(!w.parent.isTextblock||w.pos>k||xa(w,!0,!1)<k)&&L.parent.content.cut(L.parentOffset).eq(w.parent.content)}(h,f.start,f.endA,E,A)&&n.someProp("handleKeyDown",_=>_(n,Hn(8,"Backspace"))))return void(St&&$e&&n.domObserver.suppressSelectionUpdates());$e&&St&&f.endB==f.start&&(n.input.lastAndroidDelete=Date.now()),St&&!O&&E.start()!=A.start()&&A.parentOffset==0&&E.depth==A.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==f.endA&&(f.endB-=2,A=d.doc.resolveNoCache(f.endB-d.from),setTimeout(()=>{n.someProp("handleKeyDown",function(_){return _(n,Hn(13,"Enter"))})},20));let S,T,I,C=f.start,y=f.endA;if(O){if(E.pos==A.pos)st&&Sn<=11&&E.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>ln(n),20)),S=n.state.tr.delete(C,y),T=h.resolve(f.start).marksAcross(h.resolve(f.endA));else if(f.endA==f.endB&&(I=function(_,D){let k,L,H,N=_.firstChild.marks,w=D.firstChild.marks,$=N,U=w;for(let z=0;z<w.length;z++)$=w[z].removeFromSet($);for(let z=0;z<N.length;z++)U=N[z].removeFromSet(U);if($.length==1&&U.length==0)L=$[0],k="add",H=z=>z.mark(L.addToSet(z.marks));else{if($.length!=0||U.length!=1)return null;L=U[0],k="remove",H=z=>z.mark(L.removeFromSet(z.marks))}let G=[];for(let z=0;z<D.childCount;z++)G.push(H(D.child(z)));if(B.from(G).eq(_))return{mark:L,type:k}}(E.parent.content.cut(E.parentOffset,A.parentOffset),g.parent.content.cut(g.parentOffset,f.endA-g.start()))))S=n.state.tr,I.type=="add"?S.addMark(C,y,I.mark):S.removeMark(C,y,I.mark);else if(E.parent.child(E.index()).isText&&E.index()==A.index()-(A.textOffset?0:1)){let _=E.parent.textBetween(E.parentOffset,A.parentOffset);if(n.someProp("handleTextInput",D=>D(n,C,y,_)))return;S=n.state.tr.insertText(_,C,y)}}if(S||(S=n.state.tr.replace(C,y,d.doc.slice(f.start-d.from,f.endB-d.from))),d.sel){let _=Sh(n,S.doc,d.sel);_&&!($e&&St&&n.composing&&_.empty&&(f.start!=f.endB||n.input.lastAndroidDelete<Date.now()-100)&&(_.head==C||_.head==S.mapping.map(y)-1)||st&&_.empty&&_.head==C)&&S.setSelection(_)}T&&S.ensureMarks(T),o&&S.setMeta("composition",o),n.dispatch(S.scrollIntoView())}function Sh(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ku(n,e.resolve(t.anchor),e.resolve(t.head))}function xa(n,e,t){let r=n.depth,i=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,i++,e=!1;if(t){let o=n.node(r).maybeChild(n.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Th(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class yD{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new mD,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Nh),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Ih(this),Ch(this),this.nodeViews=vh(this),this.docView=eh(this.state.doc,Rh(this),Pa(this),this.dom,this),this.domObserver=new CD(this,(r,i,o,s)=>ND(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in Je){let o=Je[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!ED(r,s)||Hl(r,s)||!r.editable&&s.type in et||o(r,s)},fD[i]?{passive:!0}:void 0)}tt&&r.dom.addEventListener("input",()=>null),Fa(r)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Fa(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Nh),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(dE(this),s=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let p=vh(this);(function(f,m){let E=0,A=0;for(let g in f){if(f[g]!=m[g])return!0;E++}for(let g in m)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&Fa(this),this.editable=Ih(this),Ch(this);let l=Pa(this),u=Rh(this),c=i.plugins==e.plugins||i.doc.eq(e.doc)?e.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(e.doc,u,l);!d&&e.selection.eq(i.selection)||(s=!0);let h=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let g=(E.left+E.right)/2,O=A+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=p.root.elementFromPoint(g,O);if(!S||S==p.dom||!p.dom.contains(S))continue;let T=S.getBoundingClientRect();if(T.top>=A-20){f=S,m=T.top;break}}return{refDOM:f,refTop:m,stack:Wd(p.dom)}}(this);if(s){this.domObserver.stop();let p=d&&(st||$e)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&function(f,m){let E=Math.min(f.$anchor.sharedDepth(f.head),m.$anchor.sharedDepth(m.head));return f.$anchor.start(E)!=m.$anchor.start(E)}(i.selection,e.selection);if(d){let f=$e?this.trackWrites=this.domSelectionRange().focusNode:null;!o&&this.docView.update(e.doc,u,l,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=eh(e.doc,u,l,this.dom,this)),f&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return tr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?ln(this,p):(tE(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():h&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;Xd(m,E==0?0:E-f)}(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof W){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Gd(this,t.getBoundingClientRect(),e)}else Gd(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(e,t){let r=e.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-t.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new pE(e.slice,e.move,i<0?void 0:W.create(this.state.doc,i))}someProp(e,t){let r,i=this._props&&this._props[e];if(i!=null&&(r=t?t(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[e];if(a!=null&&(r=t?t(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(st){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(cr)return e.focus(cr);let t=Wd(e);e.focus(cr==null?{get preventScroll(){return cr={preventScroll:!0},!0}}:void 0),cr||(cr=!1,Xd(t,0))}(this.dom),ln(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return rD(this,e)}coordsAtPos(e,t=1){return Km(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let i=this.docView.posFromDOM(e,t,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,t){return sD(this,t||this.state,e)}pasteHTML(e,t){return Pi(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Pi(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Pa(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return function(t,r){Hl(t,r)||!Je[r.type]||!t.editable&&r.type in et||Je[r.type](t,r)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return tt&&this.root.nodeType===11&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom?function(e){let t;function r(u){u.preventDefault(),u.stopImmediatePropagation(),t=u.getTargetRanges()[0]}e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0);let i=t.startContainer,o=t.startOffset,s=t.endContainer,a=t.endOffset,l=e.domAtPos(e.state.selection.anchor);return tr(l.node,l.offset,s,a)&&([i,o,s,a]=[s,a,i,o]),{anchorNode:i,anchorOffset:o,focusNode:s,focusOffset:a}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function Rh(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:e[r]||r=="contenteditable"||r=="nodeName"||(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[pt.node(0,n.state.doc.content.size,e)]}function Ch(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:pt.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Ih(n){return!n.someProp("editable",e=>e(n.state)===!1)}function vh(n){let e=Object.create(null);function t(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Nh(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const ye=new class{constructor(n){this.cached=Object.create(null);let e=this.spec={};for(let r in n)e[r]=n[r];e.nodes=Me.from(n.nodes),e.marks=Me.from(n.marks||{}),this.nodes=yd.compile(this.spec.nodes,this),this.marks=Ys.compile(this.spec.marks,this);let t=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;i.contentMatch=t[o]||(t[o]=Qn.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet=s=="_"?null:s?bd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:bd(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(n,e=null,t,r){if(typeof n=="string")n=this.nodeType(n);else{if(!(n instanceof yd))throw new RangeError("Invalid node type: "+n);if(n.schema!=this)throw new RangeError("Node type from different schema used ("+n.name+")")}return n.createChecked(e,t,r)}text(n,e){let t=this.nodes.text;return new ms(t,t.defaultAttrs,n,se.setFrom(e))}mark(n,e){return typeof n=="string"&&(n=this.marks[n]),n.create(e)}nodeFromJSON(n){return Kn.fromJSON(this,n)}markFromJSON(n){return se.fromJSON(this,n)}nodeType(n){let e=this.nodes[n];if(!e)throw new RangeError("Unknown node type: "+n);return e}}({nodes:{doc:{content:"paragraph+"},paragraph:{code:!0,content:"inline*",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},text:{group:"inline"},mention:{group:"inline",inline:!0,attrs:{id:{},name:{}},content:"text*",toDOM:n=>["span",{"data-mention-id":n.attrs.id,class:"t-mention"},`@${n.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:n=>({id:n.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:n=>["img",{src:n.attrs.url,alt:n.attrs.name,"data-custom-emoji":n.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:n=>{const e=n;return{name:e.dataset.customEmoji,url:e.src}}}]}},marks:{literal:{toDOM:()=>["span",{"data-literal":""}],parseDOM:[{tag:"span[data-literal]"}]},bold:{toDOM:()=>["b"],parseDOM:[{tag:"b"}]},italic:{toDOM:()=>["i"],parseDOM:[{tag:"i"}]},strikethrough:{toDOM:()=>["del"],parseDOM:[{tag:"del"}]},emoji:{attrs:{emoji:{}},toDOM:n=>["span",{"data-emoji":n.attrs.emoji},n.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:n=>({emoji:n.dataset.emoji})}]}}}),Ba=new Xs("placeholder"),yh=new Ws({key:Ba,props:{decorations(n){if(AE(n.doc))return;const e=n.doc.firstChild,t=pt.node(0,e.nodeSize,{class:"empty-node","data-placeholder":Ba.getState(n)});return Te.create(n.doc,[t])}},state:{init:()=>"",apply:(n,e)=>{var t;return(t=n.getMeta(Ba))!=null?t:e}}});function AE(n){return n.childCount!==1||n.firstChild.childCount!==0}for(var vn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},gs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},bh=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent),bD=typeof navigator!="undefined"&&/Apple Computer/.test(navigator.vendor),kD=typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent),kh=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),LD=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),wD=bh&&(kh||+bh[1]<57)||kD&&kh,Pe=0;Pe<10;Pe++)vn[48+Pe]=vn[96+Pe]=String(Pe);for(Pe=1;Pe<=24;Pe++)vn[Pe+111]="F"+Pe;for(Pe=65;Pe<=90;Pe++)vn[Pe]=String.fromCharCode(Pe+32),gs[Pe]=String.fromCharCode(Pe);for(var Ha in vn)gs.hasOwnProperty(Ha)||(gs[Ha]=vn[Ha]);const MD=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function FD(n){let e,t,r,i,o=n.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))e=!0;else if(/^(c|ctrl|control)$/i.test(l))t=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);MD?i=!0:t=!0}}return e&&(s="Alt-"+s),t&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Ua(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function Lh(n){return new Ws({props:{handleKeyDown:PD(n)}})}function PD(n){let e=function(t){let r=Object.create(null);for(let i in t)r[FD(i)]=t[i];return r}(n);return function(t,r){let i,o=function(a){var l=!(wD&&(a.ctrlKey||a.altKey||a.metaKey)||(bD||LD)&&a.shiftKey&&a.key&&a.key.length==1)&&a.key||(a.shiftKey?gs:vn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l}(r),s=e[Ua(o,r)];if(s&&s(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=e[Ua(o,r,!1)];if(a&&a(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=vn[r.keyCode])&&i!=o){let a=e[Ua(i,r)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}var Ds=200,Fe=function(){};Fe.prototype.append=function(n){return n.length?(n=Fe.from(n),!this.length&&n||n.length<Ds&&this.leafAppend(n)||this.length<Ds&&n.leafPrepend(this)||this.appendInner(n)):this},Fe.prototype.prepend=function(n){return n.length?Fe.from(n).append(this):this},Fe.prototype.appendInner=function(n){return new xD(this,n)},Fe.prototype.slice=function(n,e){return n===void 0&&(n=0),e===void 0&&(e=this.length),n>=e?Fe.empty:this.sliceInner(Math.max(0,n),Math.min(this.length,e))},Fe.prototype.get=function(n){if(!(n<0||n>=this.length))return this.getInner(n)},Fe.prototype.forEach=function(n,e,t){e===void 0&&(e=0),t===void 0&&(t=this.length),e<=t?this.forEachInner(n,e,t,0):this.forEachInvertedInner(n,e,t,0)},Fe.prototype.map=function(n,e,t){e===void 0&&(e=0),t===void 0&&(t=this.length);var r=[];return this.forEach(function(i,o){return r.push(n(i,o))},e,t),r},Fe.from=function(n){return n instanceof Fe?n:n&&n.length?new _E(n):Fe.empty};var _E=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new e(this.values.slice(r,i))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Ds)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Ds)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Fe);Fe.empty=new _E([]);var xD=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(t,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(t,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},e.prototype.forEachInvertedInner=function(t,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(t,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(t,Math.min(r,s),i,o)===!1)&&void 0},e.prototype.sliceInner=function(t,r){if(t==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(t,r):t>=i?this.right.slice(t-i,r-i):this.left.slice(t,i).append(this.right.slice(0,r-i))},e.prototype.leafAppend=function(t){var r=this.right.leafAppend(t);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(t){var r=this.left.leafPrepend(t);if(r)return new e(r,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(Fe),gE=Fe;const DE=Math.pow(2,16);function BD(n,e){return n+e*DE}function wh(n){return 65535&n}let $l=class{constructor(n,e,t){this.pos=n,this.delInfo=e,this.recover=t}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}},nr=class Er{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Er.empty)return Er.empty}recover(e){let t=0,r=wh(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+t+function(i){return(i-(65535&i))/DE}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:t:t)<0?0:c);if(r)return h;let p=e==(t<0?l:d)?null:BD(a/3,e-l),f=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(f|=8),new $l(h,f,p)}i+=c-u}return r?e+i:new $l(e+i,0,null)}touches(e,t){let r=0,i=wh(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+t],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new Er(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Er.empty:new Er(e<0?[0,-e,0]:[0,0,e])}};nr.empty=new nr([]);class xi{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new xi(this.maps,this.mirror,e,t)}copy(){return new xi(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new xi;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o].mapResult(e,t);if(s.recover!=null){let a=this.getMirror(o);if(a!=null&&a>o&&a<this.to){o=a,e=this.maps[a].recover(s.recover);continue}}i|=s.delInfo,e=s.pos}return r?e:new $l(e,i,null)}}const $a=Object.create(null);let ze=class{getMap(){return nr.empty}merge(n){return null}static fromJSON(n,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let t=$a[e.stepType];if(!t)throw new RangeError(`No step type ${e.stepType} defined`);return t.fromJSON(n,e)}static jsonID(n,e){if(n in $a)throw new RangeError("Duplicate use of step JSON ID "+n);return $a[n]=e,e.prototype.jsonID=n,e}},Qe=class gi{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new gi(e,null)}static fail(e){return new gi(null,e)}static fromReplace(e,t,r,i){try{return gi.ok(e.replace(t,r,i))}catch(o){if(o instanceof Vr)return gi.fail(o.message);throw o}}};function Qu(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(Qu(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return B.fromArray(r)}let OE=class Di extends ze{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new x(Qu(t.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),t.openStart,t.openEnd);return Qe.fromReplace(e,this.from,this.to,o)}invert(){return new SE(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Di(t.pos,r.pos,this.mark)}merge(e){return e instanceof Di&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Di(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Di(t.from,t.to,e.markFromJSON(t.mark))}};ze.jsonID("addMark",OE);let SE=class Oi extends ze{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new x(Qu(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return Qe.fromReplace(e,this.from,this.to,r)}invert(){return new OE(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Oi(t.pos,r.pos,this.mark)}merge(e){return e instanceof Oi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Oi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Oi(t.from,t.to,e.markFromJSON(t.mark))}};ze.jsonID("removeMark",SE);let TE=class Si extends ze{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Qe.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Qe.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Si(this.pos,t.marks[i]);return new Si(this.pos,this.mark)}}return new RE(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Si(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Si(t.pos,e.markFromJSON(t.mark))}};ze.jsonID("addNodeMark",TE);let RE=class jl extends ze{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Qe.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Qe.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new TE(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new jl(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new jl(t.pos,e.markFromJSON(t.mark))}};ze.jsonID("removeNodeMark",RE);ze.jsonID("replace",class Mn extends ze{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&zl(e,this.from,this.to)?Qe.fail("Structure replace would overwrite content"):Qe.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new nr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Mn(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Mn(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Mn)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?x.empty:new x(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Mn(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?x.empty:new x(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Mn(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Mn(t.from,t.to,x.fromJSON(e,t.slice),!!t.structure)}});function zl(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}ze.jsonID("replaceAround",class Xo extends ze{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(zl(e,this.from,this.gapFrom)||zl(e,this.gapTo,this.to)))return Qe.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Qe.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Qe.fromReplace(e,this.from,this.to,r):Qe.fail("Content does not fit in gap")}getMap(){return new nr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Xo(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new Xo(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Xo(t.from,t.to,t.gapFrom,t.gapTo,x.fromJSON(e,t.slice),t.insert,!!t.structure)}});ze.jsonID("attr",class Ko extends ze{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Qe.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return Qe.fromReplace(e,this.pos,this.pos+1,new x(B.from(i),0,t.isLeaf?0:1))}getMap(){return nr.empty}invert(e){return new Ko(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ko(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ko(t.pos,t.attr,t.value)}});ze.jsonID("docAttr",class Vl extends ze{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Qe.ok(r)}getMap(){return nr.empty}invert(e){return new Vl(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Vl(t.attr,t.value)}});let wo=class extends Error{};wo=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},(wo.prototype=Object.create(Error.prototype)).constructor=wo,wo.prototype.name="TransformError";class Rt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=e.tr,u=[],c=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void c.push(d);if(r){c.push(new xt(d.map));let p,f=d.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],u.push(new xt(p,void 0,void 0,u.length+c.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new Rt(this.items.slice(0,o).append(c.reverse().concat(u)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(e,t,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d,h=e.steps[c].invert(e.docs[c]),p=new xt(e.mapping.maps[c],h,t);(d=l&&l.merge(p))&&(p=d,c?o.pop():a=a.slice(0,a.length-1)),o.push(p),t&&(s++,t=void 0),i||(l=p)}let u=s-r.depth;return u>HD&&(a=function(c,d){let h;return c.forEach((p,f)=>{if(p.selection&&d--==0)return h=f,!1}),c.slice(h)}(a,u),s-=u),new Rt(a.append(o),s)}remapping(e,t){let r=new xi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,t),r}addMaps(e){return this.eventCount==0?this:new Rt(this.items.append(e.map(t=>new xt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=t;this.items.forEach(h=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=e.steps[p].invert(e.docs[p]),E=h.selection&&h.selection.map(o.slice(l+1,p));E&&a++,r.push(new xt(f,m,E))}else r.push(new xt(f))},i);let u=[];for(let h=t;h<s;h++)u.push(new xt(o.maps[h]));let c=this.items.slice(0,i).append(u).append(r),d=new Rt(c,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(t.slice(r)),u=l&&l.getMap();if(r--,u&&t.appendMap(u,r),l){let c=s.selection&&s.selection.map(t.slice(r));c&&o++;let d,h=new xt(u.invert(),l,c),p=i.length-1;(d=i.length&&i[p].merge(h))?i[p]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new Rt(gE.from(i.reverse()),o)}}Rt.empty=new Rt(gE.empty,0);class xt{constructor(e,t,r,i){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new xt(t.getMap().invert(),t,this.selection)}}}class mn{constructor(e,t,r,i,o){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const HD=20;function Mh(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,i,o,s)=>e.push(o,s));return e}function ja(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let i=e.map(n[r],1),o=e.map(n[r+1],-1);i<=o&&t.push(i,o)}return t}let za=!1,Fh=null;function Jo(n){let e=n.plugins;if(Fh!=e){za=!1,Fh=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){za=!0;break}}return za}const zn=new Xs("history"),UD=new Xs("closeHistory");function $D(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new Ws({key:zn,state:{init:()=>new mn(Rt.empty,Rt.empty,null,0,-1),apply:(e,t,r)=>function(i,o,s,a){let l,u=s.getMeta(zn);if(u)return u.historyState;s.getMeta(UD)&&(i=new mn(i.done,i.undone,null,0,-1));let c=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(c&&c.getMeta(zn))return c.getMeta(zn).redo?new mn(i.done.addTransform(s,void 0,a,Jo(o)),i.undone,Mh(s.mapping.maps),i.prevTime,i.prevComposition):new mn(i.done,i.undone.addTransform(s,void 0,a,Jo(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||c&&c.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new mn(i.done.rebased(s,l),i.undone.rebased(s,l),ja(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new mn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),ja(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!c&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((A,g)=>{for(let O=0;O<m.length;O+=2)A<=m[O+1]&&g>=m[O]&&(E=!0)}),E}(s,i.prevRanges)),p=c?ja(i.prevRanges,s.mapping):Mh(s.mapping.maps);return new mn(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,Jo(o)),Rt.empty,p,s.time,d==null?i.prevComposition:d)}}(t,r,e,n)},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,i=r=="historyUndo"?IE:r=="historyRedo"?vE:null;return!!i&&(t.preventDefault(),i(e.state,e.dispatch))}}}})}function CE(n,e){return(t,r)=>{let i=zn.getState(t);if(!i||(n?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let u=Jo(a),c=zn.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,u);if(!d)return null;let h=d.selection.resolve(d.transform.doc),p=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),c,u),f=new mn(l?p:d.remaining,l?d.remaining:p,null,0,-1);return d.transform.setSelection(h).setMeta(zn,{redo:l,historyState:f})}(i,t,n);o&&r(e?o.scrollIntoView():o)}return!0}}const IE=CE(!1,!0),vE=CE(!0,!0),NE=Math.pow(2,16);function jD(n,e){return n+e*NE}function Ph(n){return 65535&n}class xh{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class ht{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ht.empty)return ht.empty}recover(e){let t=0,r=Ph(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+t+function(i){return(i-(65535&i))/NE}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+o],c=this.ranges[a+s],d=l+u;if(e<=d){let h=l+i+((u?e==l?-1:e==d?1:t:t)<0?0:c);if(r)return h;let p=e==(t<0?l:d)?null:jD(a/3,e-l),f=e==l?2:e==d?1:4;return(t<0?e!=l:e!=d)&&(f|=8),new xh(h,f,p)}i+=c-u}return r?e+i:new xh(e+i,0,null)}touches(e,t){let r=0,i=Ph(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+o];if(e<=l+u&&a==3*i)return!0;r+=this.ranges[a+s]-u}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),u=this.ranges[i+t],c=this.ranges[i+r];e(a,a+u,l,l+c),o+=c-u}}invert(){return new ht(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ht.empty:new ht(e<0?[0,-e,0]:[0,0,e])}}ht.empty=new ht([]);const Va=Object.create(null);class Ye{getMap(){return ht.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Va[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Va)throw new RangeError("Duplicate use of step JSON ID "+e);return Va[e]=t,t.prototype.jsonID=e,t}}class Ce{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ce(e,null)}static fail(e){return new Ce(null,e)}static fromReplace(e,t,r,i){try{return Ce.ok(e.replace(t,r,i))}catch(o){if(o instanceof Vr)return Ce.fail(o.message);throw o}}}function ec(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let o=n.child(i);o.content.size&&(o=o.copy(ec(o.content,e,o))),o.isInline&&(o=e(o,t,i)),r.push(o)}return B.fromArray(r)}class Vn extends Ye{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new x(ec(t.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),t.openStart,t.openEnd);return Ce.fromReplace(e,this.from,this.to,o)}invert(){return new Yn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Vn(t.pos,r.pos,this.mark)}merge(e){return e instanceof Vn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Vn(t.from,t.to,e.markFromJSON(t.mark))}}Ye.jsonID("addMark",Vn);class Yn extends Ye{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new x(ec(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return Ce.fromReplace(e,this.from,this.to,r)}invert(){return new Vn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Yn(t.pos,r.pos,this.mark)}merge(e){return e instanceof Yn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Yn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Yn(t.from,t.to,e.markFromJSON(t.mark))}}Ye.jsonID("removeMark",Yn);class Gn extends Ye{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ce.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Gn(this.pos,t.marks[i]);return new Gn(this.pos,this.mark)}}return new qi(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Gn(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Gn(t.pos,e.markFromJSON(t.mark))}}Ye.jsonID("addNodeMark",Gn);class qi extends Ye{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ce.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Ce.fromReplace(e,this.pos,this.pos+1,new x(B.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new Gn(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new qi(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new qi(t.pos,e.markFromJSON(t.mark))}}Ye.jsonID("removeNodeMark",qi);class Tt extends Ye{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Yl(e,this.from,this.to)?Ce.fail("Structure replace would overwrite content"):Ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ht([this.from,this.to-this.from,this.slice.size])}invert(e){return new Tt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Tt(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Tt)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?x.empty:new x(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Tt(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?x.empty:new x(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Tt(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Tt(t.from,t.to,x.fromJSON(e,t.slice),!!t.structure)}}Ye.jsonID("replace",Tt);class Cn extends Ye{constructor(e,t,r,i,o,s,a=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Yl(e,this.from,this.gapFrom)||Yl(e,this.gapTo,this.to)))return Ce.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ce.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Ce.fromReplace(e,this.from,this.to,r):Ce.fail("Content does not fit in gap")}getMap(){return new ht([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Cn(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||o>r.pos?null:new Cn(t.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Cn(t.from,t.to,t.gapFrom,t.gapTo,x.fromJSON(e,t.slice),t.insert,!!t.structure)}}function Yl(n,e,t){let r=n.resolve(e),i=t-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function zD(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function tc(n){let e=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let t=n.depth;;--t){let r=n.$from.node(t),i=n.$from.index(t),o=n.$to.indexAfter(t);if(t<n.depth&&r.canReplace(i,o,e))return t;if(t==0||r.type.spec.isolating||!zD(r,i,o))break}return null}function qo(n,e,t=1,r){let i=n.resolve(e),o=i.depth-t,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=t-2;u>o;u--,c--){let d=i.node(u),h=i.index(u);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=r&&r[c+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[c]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Bh(n,e){let t=n.resolve(e),r=t.index();return function(i,o){return!(!i||!o||i.isLeaf||!function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:u}=s.type.schema;for(let c=0;c<a.childCount;c++){let d=a.child(c),h=d.type==u?s.type.schema.nodes.text:d.type;if(l=l.matchType(h),!l||!s.type.allowsMarks(d.marks))return!1}return l.validEnd}(i,o))}(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function yE(n,e,t=e,r=x.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),o=n.resolve(t);return function(s,a,l){return!l.openStart&&!l.openEnd&&s.start()==a.start()&&s.parent.canReplace(s.index(),a.index(),l.content)}(i,o,r)?new Tt(e,t,r):new VD(i,o,r).fit()}Ye.jsonID("replaceAround",Cn);class VD{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=B.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=B.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new x(o,s,a);return e>-1?new Cn(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new Tt(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let o=t.firstChild;if(t.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){e=r;break}t=o.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Ya(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let l,{type:u,match:c}=this.frontier[a],d=null;if(t==1&&(s?c.matchType(s.type)||(d=c.fillBefore(B.from(s),!1)):o&&u.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:d};if(t==2&&s&&(l=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Ya(e,t);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new x(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=Ya(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new x(Ti(e,t-1,1),t-1,o?t-1:r)}else this.unplaced=new x(Ti(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-e,u=0,c=[],{match:d,type:h}=this.frontier[t];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let p=a.size+e-(s.content.size-s.openEnd);for(;u<a.childCount;){let m=a.child(u),E=d.matchType(m.type);if(!E)break;u++,(u>1||l==0||m.content.size)&&(d=E,c.push(bE(m.mark(h.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?p:-1)))}let f=u==a.childCount;f||(p=-1),this.placed=Ri(this.placed,t,B.from(c)),this.frontier[t].match=d,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=f?e==0?x.empty:new x(Ti(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new x(Ti(s.content,e,u),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!Ga(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Ga(e,t,i,r,o);if(s){for(let a=t-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Ga(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Ri(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Ri(this.placed,this.depth,B.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(B.empty,!0);e.childCount&&(this.placed=Ri(this.placed,this.frontier.length,e))}}function Ti(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Ti(n.firstChild.content,e-1,t)))}function Ri(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Ri(n.lastChild.content,e-1,t)))}function Ya(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function bE(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,bE(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(B.empty,!0)))),n.copy(r)}function Ga(n,e,t,r,i){let o=n.node(e),s=i?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,u,c){for(let d=c;d<u.childCount;d++)if(!l.allowsMarks(u.child(d).marks))return!0;return!1}(t,o.content,s)?a:null}class Bi extends Ye{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return Ce.fail("No node at attribute step's position");let r=Object.create(null);for(let o in t.attrs)r[o]=t.attrs[o];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return Ce.fromReplace(e,this.pos,this.pos+1,new x(B.from(i),0,t.isLeaf?0:1))}getMap(){return ht.empty}invert(e){return new Bi(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Bi(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Bi(t.pos,t.attr,t.value)}}Ye.jsonID("attr",Bi);class Os extends Ye{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return Ce.ok(r)}getMap(){return ht.empty}invert(e){return new Os(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Os(t.attr,t.value)}}Ye.jsonID("docAttr",Os);let Mo=class extends Error{};Mo=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},(Mo.prototype=Object.create(Error.prototype)).constructor=Mo,Mo.prototype.name="TransformError";const kE=(n,e)=>!n.selection.empty&&(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Gr(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}function Hh(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Uh(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}function Gl(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const YD=(n,e)=>{let{$from:t,$to:r}=n.selection;if(n.selection instanceof W&&n.selection.node.isBlock)return!(!t.parentOffset||!qo(n.doc,t.pos)||(e&&e(n.tr.split(t.pos).scrollIntoView()),0));if(!t.depth)return!1;let i,o,s=[],a=!1,l=!1;for(let h=t.depth;;h--){if(t.node(h).isBlock){a=t.end(h)==t.pos+(t.depth-h),l=t.start(h)==t.pos-(t.depth-h),o=Gl(t.node(h-1).contentMatchAt(t.indexAfter(h-1))),s.unshift(a&&o?{type:o}:null),i=h;break}if(h==1)return!1;s.unshift(null)}let u=n.tr;(n.selection instanceof ae||n.selection instanceof mt)&&u.deleteSelection();let c=u.mapping.map(t.pos),d=qo(u.doc,c,s.length,s);if(d||(s[0]=o?{type:o}:null,d=qo(u.doc,c,s.length,s)),u.split(c,s.length,s),!a&&l&&t.node(i).type!=o){let h=u.mapping.map(t.before(i)),p=u.doc.resolve(h);o&&t.node(i-1).canReplaceWith(p.index(),p.index()+1,o)&&u.setNodeMarkup(u.mapping.map(t.before(i)),o)}return e&&e(u.scrollIntoView()),!0};function LE(n,e,t,r){let i,o,s=e.nodeBefore,a=e.nodeAfter,l=s.type.spec.isolating||a.type.spec.isolating;if(!l&&function(p,f,m){let E=f.nodeBefore,A=f.nodeAfter,g=f.index();return!(!(E&&A&&E.type.compatibleContent(A.type))||(!E.content.size&&f.parent.canReplace(g-1,g)?(m&&m(p.tr.delete(f.pos-E.nodeSize,f.pos).scrollIntoView()),0):!f.parent.canReplace(g,g+1)||!A.isTextblock&&!Bh(p.doc,f.pos)||(m&&m(p.tr.join(f.pos).scrollIntoView()),0)))}(n,e,t))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(i=(o=s.contentMatchAt(s.childCount)).findWrapping(a.type))&&o.matchType(i[0]||a.type).validEnd){if(t){let p=e.pos+a.nodeSize,f=B.empty;for(let A=i.length-1;A>=0;A--)f=B.from(i[A].create(null,f));f=B.from(s.copy(f));let m=n.tr.step(new Cn(e.pos-1,p,e.pos,p,new x(f,1,0),i.length,!0)),E=m.doc.resolve(p+2*i.length);E.nodeAfter&&E.nodeAfter.type==s.type&&Bh(m.doc,E.pos)&&m.join(E.pos),t(m.scrollIntoView())}return!0}let c=a.type.spec.isolating||r>0&&l?null:re.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),h=d&&tc(d);if(h!=null&&h>=e.depth)return t&&t(n.tr.lift(d,h).scrollIntoView()),!0;if(u&&Gr(a,"start",!0)&&Gr(s,"end")){let p=s,f=[];for(;f.push(p),!p.isTextblock;)p=p.lastChild;let m=a,E=1;for(;!m.isTextblock;m=m.firstChild)E++;if(p.canReplace(p.childCount,p.childCount,m.content)){if(t){let A=B.empty;for(let g=f.length-1;g>=0;g--)A=B.from(f[g].copy(A));t(n.tr.step(new Cn(e.pos-f.length,e.pos+a.nodeSize,e.pos+E,e.pos+a.nodeSize-E,new x(A,f.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function wE(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(t&&t(e.tr.setSelection(ae.create(e.doc,n<0?i.start(o):i.end(o)))),!0)}}const GD=wE(-1),WD=wE(1);function nc(...n){return function(e,t,r){for(let i=0;i<n.length;i++)if(n[i](e,t,r))return!0;return!1}}let Wa=nc(kE,(n,e,t)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l}(n,t);if(!r)return!1;let i=Hh(r);if(!i){let s=r.blockRange(),a=s&&tc(s);return a!=null&&(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(LE(n,i,e,-1))return!0;if(r.parent.content.size==0&&(Gr(o,"end")||W.isSelectable(o)))for(let s=r.depth;;s--){let a=yE(n.doc,r.before(s),r.after(s),x.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=n.tr.step(a);l.setSelection(Gr(o,"end")?re.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):W.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(n.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;o=Hh(r)}let s=o&&o.nodeBefore;return!(!s||!W.isSelectable(s))&&(e&&e(n.tr.setSelection(W.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),$h=nc(kE,(n,e,t)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l}(n,t);if(!r)return!1;let i=Uh(r);if(!i)return!1;let o=i.nodeAfter;if(LE(n,i,e,1))return!0;if(r.parent.content.size==0&&(Gr(o,"start")||W.isSelectable(o))){let s=yE(n.doc,r.before(),r.after(),x.empty);if(s&&s.slice.size<s.to-s.from){if(e){let a=n.tr.step(s);a.setSelection(Gr(o,"start")?re.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):W.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(e&&e(n.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(n,e,t)=>{let{$head:r,empty:i}=n.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;o=Uh(r)}let s=o&&o.nodeAfter;return!(!s||!W.isSelectable(s))&&(e&&e(n.tr.setSelection(W.create(n.doc,o.pos)).scrollIntoView()),!0)});const nn={Enter:nc((n,e)=>{let{$head:t,$anchor:r}=n.selection;return!(!t.parent.type.spec.code||!t.sameParent(r))&&(e&&e(n.tr.insertText(`
|
|
15
|
-
`).scrollIntoView()),!0)},(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof mt||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Gl(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=n.tr.insert(s,o.createAndFill());a.setSelection(ae.create(a.doc,s+1)),e(a.scrollIntoView())}return!0},(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if(qo(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let r=t.blockRange(),i=r&&tc(r);return i!=null&&(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},YD),"Mod-Enter":(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),o=t.indexAfter(-1),s=Gl(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(re.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Backspace:Wa,"Mod-Backspace":Wa,"Shift-Backspace":Wa,Delete:$h,"Mod-Delete":$h,"Mod-a":(n,e)=>(e&&e(n.tr.setSelection(new mt(n.doc))),!0)},ME={"Ctrl-h":nn.Backspace,"Alt-Backspace":nn["Mod-Backspace"],"Ctrl-d":nn.Delete,"Ctrl-Alt-Backspace":nn["Mod-Delete"],"Alt-Delete":nn["Mod-Delete"],"Alt-d":nn["Mod-Delete"],"Ctrl-a":GD,"Ctrl-e":WD};for(let n in nn)ME[n]=nn[n];const Fo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?ME:nn;function rc(n,e){return n.reduce((t,r,i)=>t.concat(e(r,i)),[])}const Hi=(n,e,t=void 0)=>rc(n,r=>{if(typeof r=="string")return e(r,t);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:Hi(r.children,e,r.type)}];case"link":return[{type:r.type,url:r.url,children:Hi(r.children,e,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:Hi(r.children,e,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function hn(n,e){return t=>{const r=t;let i=0;const o=[];for(const s of Vs(t,n)){s.index-i>0&&o.push(r.substring(i,s.index));const a=e(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<t.length&&o.push(t.substring(i)),o}}function FE(n){return n.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const jh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Wl=(n=>(n[n.italic=1]="italic",n[n.strikethrough=2]="strikethrough",n[n.bold=4]="bold",n))(Wl||{});const XD=[0,1,2,3,4,5,6].map(n=>{const e=[];return 1&n||e.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&n||e.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&n||e.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(e.map(t=>t.source).join("|"),"g")}),KD={_:1,"*":4,"~":2};function JD(n){return PE(n,0)}function PE(n,e=0){const t=XD[e],r=t?function(i){const o=qD.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${jh}])(?:${i.source})(?=[\\s${jh}]|$)`,"g")),s=hn(o,a=>{const l=a[0][1],u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Wl[KD[l]],children:[u]}]});return a=>{const[l,...u]=s(" "+a);return l.length>1&&u.unshift(l.substring(1)),u}}(t):()=>[n];return Hi(r(n),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?PE(i,e|Wl[o]):[i])}const qD=function(){const n=function(){try{return new WeakMap}catch(e){const t={has:()=>!1,get:()=>{},set:()=>t};return t}}();return{getOrCompute(e,t){if(n.has(e))return n.get(e);const r=t();return n.set(e,r),r}}}();function zh(n,e){if(Array.prototype.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t;return-1}function kn(n,e){for(var t=n.length-1;t>=0;t--)e(n[t])===!0&&n.splice(t,1)}function xE(n){throw new Error("Unhandled case for value: '"+n+"'")}var Xl=function(){function n(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return n.prototype.setTagName=function(e){return this.tagName=e,this},n.prototype.getTagName=function(){return this.tagName||""},n.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},n.prototype.getAttr=function(e){return this.getAttrs()[e]},n.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},n.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},n.prototype.setClass=function(e){return this.setAttr("class",e)},n.prototype.addClass=function(e){for(var t,r=this.getClass(),i=this.whitespaceRegex,o=r?r.split(i):[],s=e.split(i);t=s.shift();)zh(o,t)===-1&&o.push(t);return this.getAttrs().class=o.join(" "),this},n.prototype.removeClass=function(e){for(var t,r=this.getClass(),i=this.whitespaceRegex,o=r?r.split(i):[],s=e.split(i);o.length&&(t=s.shift());){var a=zh(o,t);a!==-1&&o.splice(a,1)}return this.getAttrs().class=o.join(" "),this},n.prototype.getClass=function(){return this.getAttrs().class||""},n.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},n.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},n.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},n.prototype.getInnerHTML=function(){return this.innerHTML||""},n.prototype.getInnerHtml=function(){return this.getInnerHTML()},n.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),"</",e,">"].join("")},n.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r+'="'+e[r]+'"');return t.join(" ")},n}(),Vh=function(){function n(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return n.prototype.build=function(e){return new Xl({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},n.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},r=this.createCssClass(e);return r&&(t.class=r),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(t.title=e.getAnchorHref()),t},n.prototype.createCssClass=function(e){var t=this.className;if(t){for(var r=[t],i=e.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(t+"-"+i[o]);return r.join(" ")}return""},n.prototype.processAnchorText=function(e){return e=this.doTruncate(e)},n.prototype.doTruncate=function(e){var t=this.truncate;if(!t||!t.length)return e;var r=t.length,i=t.location;return i==="smart"?function(o,s,a){var l,u;a==null?(a="…",u=3,l=8):(u=a.length,l=a.length);var c=function(S){var T="";return S.scheme&&S.host&&(T+=S.scheme+"://"),S.host&&(T+=S.host),S.path&&(T+="/"+S.path),S.query&&(T+="?"+S.query),S.fragment&&(T+="#"+S.fragment),T},d=function(S,T){var I=T/2,C=Math.ceil(I),y=-1*Math.floor(I),_="";return y<0&&(_=S.substr(y)),S.substr(0,C)+a+_};if(o.length<=s)return o;var h=s-u,p=function(S){var T={},I=S,C=I.match(/^([a-z]+):\/\//i);return C&&(T.scheme=C[1],I=I.substr(C[0].length)),(C=I.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(T.host=C[1],I=I.substr(C[0].length)),(C=I.match(/^\/(.*?)(?=(\?|#|$))/i))&&(T.path=C[1],I=I.substr(C[0].length)),(C=I.match(/^\?(.*?)(?=(#|$))/i))&&(T.query=C[1],I=I.substr(C[0].length)),(C=I.match(/^#(.*?)$/i))&&(T.fragment=C[1]),T}(o);if(p.query){var f=p.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);f&&(p.query=p.query.substr(0,f[1].length),o=c(p))}if(o.length<=s||(p.host&&(p.host=p.host.replace(/^www\./,""),o=c(p)),o.length<=s))return o;var m="";if(p.host&&(m+=p.host),m.length>=h)return p.host.length==s?(p.host.substr(0,s-u)+a).substr(0,h+l):d(m,h).substr(0,h+l);var E="";if(p.path&&(E+="/"+p.path),p.query&&(E+="?"+p.query),E){if((m+E).length>=h)return(m+E).length==s?(m+E).substr(0,s):(m+d(E,h-m.length)).substr(0,h+l);m+=E}if(p.fragment){var A="#"+p.fragment;if((m+A).length>=h)return(m+A).length==s?(m+A).substr(0,s):(m+d(A,h-m.length)).substr(0,h+l);m+=A}if(p.scheme&&p.host){var g=p.scheme+"://";if((m+g).length<h)return(g+m).substr(0,s)}if(m.length<=s)return m;var O="";return h>0&&(O=m.substr(-1*Math.floor(h/2))),(m.substr(0,Math.ceil(h/2))+a+O).substr(0,h+l)}(e,r):i==="middle"?function(o,s,a){if(o.length<=s)return o;var l,u;a==null?(a="…",l=8,u=3):(l=a.length,u=a.length);var c=s-u,d="";return c>0&&(d=o.substr(-1*Math.floor(c/2))),(o.substr(0,Math.ceil(c/2))+a+d).substr(0,c+l)}(e,r):function(o,s,a){return function(l,u,c){var d;return l.length>u&&(c==null?(c="…",d=3):d=c.length,l=l.substring(0,u-d)+c),l}(o,s,a)}(e,r)},n}(),Zr=function(){function n(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return n.prototype.getMatchedText=function(){return this.matchedText},n.prototype.setOffset=function(e){this.offset=e},n.prototype.getOffset=function(){return this.offset},n.prototype.getCssClassSuffixes=function(){return[this.getType()]},n.prototype.buildTag=function(){return this.tagBuilder.build(this)},n}(),Kl=function(n,e){return Kl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},Kl(n,e)};function Xt(n,e){function t(){this.constructor=n}Kl(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Yh,Ae=function(){return Ae=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n},Ae.apply(this,arguments)},ic=function(n){function e(t){var r=n.call(this,t)||this;return r.email="",r.email=t.email,r}return Xt(e,n),e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e}(Zr),BE=function(n){function e(t){var r=n.call(this,t)||this;return r.serviceName="",r.hashtag="",r.serviceName=t.serviceName,r.hashtag=t.hashtag,r}return Xt(e,n),e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var t=this.serviceName,r=this.hashtag;switch(t){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;default:throw new Error("Unknown service name to point hashtag to: "+t)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e}(Zr),HE=function(n){function e(t){var r=n.call(this,t)||this;return r.serviceName="twitter",r.mention="",r.mention=t.mention,r.serviceName=t.serviceName,r}return Xt(e,n),e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var t=n.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&t.push(r),t},e}(Zr),UE=function(n){function e(t){var r=n.call(this,t)||this;return r.number="",r.plusSign=!1,r.number=t.number,r.plusSign=t.plusSign,r}return Xt(e,n),e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e}(Zr),oc=function(n){function e(t){var r=n.call(this,t)||this;return r.url="",r.urlMatchType="scheme",r.protocolUrlMatch=!1,r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.schemePrefixRegex=/^(https?:\/\/)?/i,r.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,r.protocolRelativeRegex=/^\/\//,r.protocolPrepended=!1,r.urlMatchType=t.urlMatchType,r.url=t.url,r.protocolUrlMatch=t.protocolUrlMatch,r.protocolRelativeMatch=t.protocolRelativeMatch,r.stripPrefix=t.stripPrefix,r.stripTrailingSlash=t.stripTrailingSlash,r.decodePercentEncoding=t.decodePercentEncoding,r}return Xt(e,n),e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var t=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(t=this.url="http://"+t,this.protocolPrepended=!0),t},e.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},e.prototype.getAnchorText=function(){var t=this.getMatchedText();return this.protocolRelativeMatch&&(t=this.stripProtocolRelativePrefix(t)),this.stripPrefix.scheme&&(t=this.stripSchemePrefix(t)),this.stripPrefix.www&&(t=this.stripWwwPrefix(t)),this.stripTrailingSlash&&(t=this.removeTrailingSlash(t)),this.decodePercentEncoding&&(t=this.removePercentEncoding(t)),t},e.prototype.stripSchemePrefix=function(t){return t.replace(this.schemePrefixRegex,"")},e.prototype.stripWwwPrefix=function(t){return t.replace(this.wwwPrefixRegex,"$1")},e.prototype.stripProtocolRelativePrefix=function(t){return t.replace(this.protocolRelativeRegex,"")},e.prototype.removeTrailingSlash=function(t){return t.charAt(t.length-1)==="/"&&(t=t.slice(0,-1)),t},e.prototype.removePercentEncoding=function(t){var r=t.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(r)}catch(i){return r}},e}(Zr),Qr=function(n){this.__jsduckDummyDocProp=null,this.tagBuilder=n.tagBuilder},Xa=/[A-Za-z]/,ZD=/[\d]/,QD=/[\D]/,Ln=/\s/,Ka=/['"]/,e0=/[\x00-\x1F\x7F]/,$E=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,jE=$E+/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,Ss=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,t0=jE+Ss,Oe=jE+Ss,n0="(?:["+Ss+"]{1,3}\\.){3}["+Ss+"]{1,3}",r0="["+Oe+"](?:["+Oe+"\\-]{0,61}["+Oe+"])?",Gh=function(n){return"(?=("+r0+"))\\"+n},Ja=function(n){return"(?:"+Gh(n)+"(?:\\."+Gh(n+1)+"){0,126}|"+n0+")"},Po=new RegExp("["+Oe+"]"),zE=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,i0=new RegExp("["+Oe+"!#$%&'*+/=?^_`{|}~-]"),o0=new RegExp("^"+zE.source+"$"),Wh=function(n){function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.localPartCharRegex=i0,t.strictTldRegex=o0,t}return Xt(e,n),e.prototype.parseMatches=function(t){for(var r=this.tagBuilder,i=this.localPartCharRegex,o=this.strictTldRegex,s=[],a=t.length,l=new xo,u={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},c=0,d=0,h=l;c<a;){var p=t.charAt(c);switch(d){case 0:f(p);break;case 1:m(t.charAt(c-1),p);break;case 2:E(p);break;case 3:A(p);break;case 4:g(p);break;case 5:O(p);break;case 6:S(p);break;case 7:T(p);break;default:xE(d)}c++}return y(),s;function f(_){_==="m"?I(1):i.test(_)&&I()}function m(_,D){_===":"?i.test(D)?(d=2,h=new xo(Ae(Ae({},h),{hasMailtoPrefix:!0}))):C():u[_]===D||(i.test(D)?d=2:D==="."?d=3:D==="@"?d=4:C())}function E(_){_==="."?d=3:_==="@"?d=4:i.test(_)||C()}function A(_){_==="."||_==="@"?C():i.test(_)?d=2:C()}function g(_){Po.test(_)?d=5:C()}function O(_){_==="."?d=7:_==="-"?d=6:Po.test(_)||y()}function S(_){_==="-"||_==="."?y():Po.test(_)?d=5:y()}function T(_){_==="."||_==="-"?y():Po.test(_)?(d=5,h=new xo(Ae(Ae({},h),{hasDomainDot:!0}))):y()}function I(_){_===void 0&&(_=2),d=_,h=new xo({idx:c})}function C(){d=0,h=l}function y(){if(h.hasDomainDot){var _=t.slice(h.idx,c);/[-.]$/.test(_)&&(_=_.slice(0,-1));var D=h.hasMailtoPrefix?_.slice(7):_;(function(k){var L=k.split(".").pop()||"",H=L.toLowerCase();return o.test(H)})(D)&&s.push(new ic({tagBuilder:r,matchedText:_,offset:h.idx,email:D}))}C()}},e}(Qr),xo=function(n){n===void 0&&(n={}),this.idx=n.idx!==void 0?n.idx:-1,this.hasMailtoPrefix=!!n.hasMailtoPrefix,this.hasDomainDot=!!n.hasDomainDot},s0=function(){function n(){}return n.isValid=function(e,t){return!(t&&!this.isValidUriScheme(t)||this.urlMatchDoesNotHaveProtocolOrDot(e,t)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,t)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},n.isValidIpAddress=function(e){var t=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return e.match(t)!==null},n.containsMultipleDots=function(e){var t=e;return this.hasFullProtocolRegex.test(e)&&(t=e.split("://")[1]),t.split("/")[0].indexOf("..")>-1},n.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),r=t&&t[0].toLowerCase();return r!=="javascript:"&&r!=="vbscript:"},n.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||e.indexOf(".")!==-1)},n.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t)&&!this.hasFullProtocolRegex.test(t)&&!this.hasWordCharAfterProtocolRegex.test(e)},n.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,n.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,n.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+$E+"]"),n.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,n}(),a0=(Yh=new RegExp("[/?#](?:["+Oe+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*["+Oe+"\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,Ja(2),")","|","(","(//)?",/(?:www\.)/.source,Ja(6),")","|","(","(//)?",Ja(10)+"\\.",zE.source,"(?![-"+t0+"])",")",")","(?::[0-9]+)?","(?:"+Yh.source+")?"].join(""),"gi")),l0=new RegExp("["+Oe+"]"),Xh=function(n){function e(t){var r=n.call(this,t)||this;return r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.matcherRegex=a0,r.wordCharRegExp=l0,r.stripPrefix=t.stripPrefix,r.stripTrailingSlash=t.stripTrailingSlash,r.decodePercentEncoding=t.decodePercentEncoding,r}return Xt(e,n),e.prototype.parseMatches=function(t){for(var r,i=this.matcherRegex,o=this.stripPrefix,s=this.stripTrailingSlash,a=this.decodePercentEncoding,l=this.tagBuilder,u=[],c=function(){var h=r[0],p=r[1],f=r[4],m=r[5],E=r[9],A=r.index,g=m||E,O=t.charAt(A-1);if(!s0.isValid(h,p)||A>0&&O==="@"||A>0&&g&&d.wordCharRegExp.test(O))return"continue";if(/\?$/.test(h)&&(h=h.substr(0,h.length-1)),d.matchHasUnbalancedClosingParen(h))h=h.substr(0,h.length-1);else{var S=d.matchHasInvalidCharAfterTld(h,p);S>-1&&(h=h.substr(0,S))}var T=["http://","https://"].find(function(_){return!!p&&p.indexOf(_)!==-1});if(T){var I=h.indexOf(T);h=h.substr(I),p=p.substr(I),A+=I}var C=p?"scheme":f?"www":"tld",y=!!p;u.push(new oc({tagBuilder:l,matchedText:h,offset:A,urlMatchType:C,url:h,protocolUrlMatch:y,protocolRelativeMatch:!!g,stripPrefix:o,stripTrailingSlash:s,decodePercentEncoding:a}))},d=this;(r=i.exec(t))!==null;)c();return u},e.prototype.matchHasUnbalancedClosingParen=function(t){var r,i=t.charAt(t.length-1);if(i===")")r="(";else if(i==="]")r="[";else{if(i!=="}")return!1;r="{"}for(var o=0,s=0,a=t.length-1;s<a;s++){var l=t.charAt(s);l===r?o++:l===i&&(o=Math.max(o-1,0))}return o===0},e.prototype.matchHasInvalidCharAfterTld=function(t,r){if(!t)return-1;var i=0;r&&(i=t.indexOf(":"),t=t.slice(i));var o=new RegExp("^((.?//)?[-."+Oe+"]*[-"+Oe+"]\\.[-"+Oe+"]+)").exec(t);return o===null?-1:(i+=o[1].length,t=t.slice(o[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(t)?i:-1)},e}(Qr),u0=new RegExp("#[_"+Oe+"]{1,139}(?![_"+Oe+"])","g"),c0=new RegExp("[^"+Oe+"]"),Kh=function(n){function e(t){var r=n.call(this,t)||this;return r.serviceName="twitter",r.matcherRegex=u0,r.nonWordCharRegex=c0,r.serviceName=t.serviceName,r}return Xt(e,n),e.prototype.parseMatches=function(t){for(var r,i=this.matcherRegex,o=this.nonWordCharRegex,s=this.serviceName,a=this.tagBuilder,l=[];(r=i.exec(t))!==null;){var u=r.index,c=t.charAt(u-1);if(u===0||o.test(c)){var d=r[0],h=r[0].slice(1);l.push(new BE({tagBuilder:a,matchedText:d,offset:u,serviceName:s,hashtag:h}))}}return l},e}(Qr),d0=new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source+"|"+/(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"g"),Jh=function(n){function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.matcherRegex=d0,t}return Xt(e,n),e.prototype.parseMatches=function(t){for(var r,i=this.matcherRegex,o=this.tagBuilder,s=[];(r=i.exec(t))!==null;){var a=r[0],l=a.replace(/[^0-9,;#]/g,""),u=!(!r[1]&&!r[2]),c=r.index==0?"":t.substr(r.index-1,1),d=t.substr(r.index+a.length,1),h=!c.match(/\d/)&&!d.match(/\d/);this.testMatch(r[3])&&this.testMatch(a)&&h&&s.push(new UE({tagBuilder:o,matchedText:a,offset:r.index,number:l,plusSign:u}))}return s},e.prototype.testMatch=function(t){return QD.test(t)},e}(Qr),h0=new RegExp("@[_"+Oe+"]{1,50}(?![_"+Oe+"])","g"),p0=new RegExp("@[_."+Oe+"]{1,30}(?![_"+Oe+"])","g"),f0=new RegExp("@[-_."+Oe+"]{1,50}(?![-_"+Oe+"])","g"),m0=new RegExp("[^"+Oe+"]"),qh=function(n){function e(t){var r=n.call(this,t)||this;return r.serviceName="twitter",r.matcherRegexes={twitter:h0,instagram:p0,soundcloud:f0},r.nonWordCharRegex=m0,r.serviceName=t.serviceName,r}return Xt(e,n),e.prototype.parseMatches=function(t){var r,i=this.serviceName,o=this.matcherRegexes[this.serviceName],s=this.nonWordCharRegex,a=this.tagBuilder,l=[];if(!o)return l;for(;(r=o.exec(t))!==null;){var u=r.index,c=t.charAt(u-1);if(u===0||s.test(c)){var d=r[0].replace(/\.+$/g,""),h=d.slice(1);l.push(new HE({tagBuilder:a,matchedText:d,offset:u,serviceName:i,mention:h}))}}return l},e}(Qr);function E0(n,e){for(var t,r=e.onOpenTag,i=e.onCloseTag,o=e.onText,s=e.onComment,a=e.onDoctype,l=new Ft,u=0,c=n.length,d=0,h=0,p=l;u<c;){var f=n.charAt(u);switch(d){case 0:m(f);break;case 1:E(f);break;case 2:g(f);break;case 3:A(f);break;case 4:O(f);break;case 5:S(f);break;case 6:T(f);break;case 7:I(f);break;case 8:C(f);break;case 9:y(f);break;case 10:_(f);break;case 11:D(f);break;case 12:k(f);break;case 13:L();break;case 14:H(f);break;case 15:N(f);break;case 16:w(f);break;case 17:$(f);break;case 18:U(f);break;case 19:G(f);break;case 20:z(f);break;default:xE(d)}u++}function m(M){M==="<"&&K()}function E(M){M==="!"?d=13:M==="/"?(d=2,p=new Ft(Ae(Ae({},p),{isClosing:!0}))):M==="<"?K():Xa.test(M)?(d=3,p=new Ft(Ae(Ae({},p),{isOpening:!0}))):(d=0,p=l)}function A(M){Ln.test(M)?(p=new Ft(Ae(Ae({},p),{name:oe()})),d=4):M==="<"?K():M==="/"?(p=new Ft(Ae(Ae({},p),{name:oe()})),d=12):M===">"?(p=new Ft(Ae(Ae({},p),{name:oe()})),J()):Xa.test(M)||ZD.test(M)||M===":"||V()}function g(M){M===">"?V():Xa.test(M)?d=3:V()}function O(M){Ln.test(M)||(M==="/"?d=12:M===">"?J():M==="<"?K():M==="="||Ka.test(M)||e0.test(M)?V():d=5)}function S(M){Ln.test(M)?d=6:M==="/"?d=12:M==="="?d=7:M===">"?J():M==="<"?K():Ka.test(M)&&V()}function T(M){Ln.test(M)||(M==="/"?d=12:M==="="?d=7:M===">"?J():M==="<"?K():Ka.test(M)?V():d=5)}function I(M){Ln.test(M)||(M==='"'?d=8:M==="'"?d=9:/[>=`]/.test(M)?V():M==="<"?K():d=10)}function C(M){M==='"'&&(d=11)}function y(M){M==="'"&&(d=11)}function _(M){Ln.test(M)?d=4:M===">"?J():M==="<"&&K()}function D(M){Ln.test(M)?d=4:M==="/"?d=12:M===">"?J():M==="<"?K():(d=4,u--)}function k(M){M===">"?(p=new Ft(Ae(Ae({},p),{isClosing:!0})),J()):d=4}function L(M){n.substr(u,2)==="--"?(u+=2,p=new Ft(Ae(Ae({},p),{type:"comment"})),d=14):n.substr(u,7).toUpperCase()==="DOCTYPE"?(u+=7,p=new Ft(Ae(Ae({},p),{type:"doctype"})),d=20):V()}function H(M){M==="-"?d=15:M===">"?V():d=16}function N(M){M==="-"?d=18:M===">"?V():d=16}function w(M){M==="-"&&(d=17)}function $(M){d=M==="-"?18:16}function U(M){M===">"?J():M==="!"?d=19:M==="-"||(d=16)}function G(M){M==="-"?d=17:M===">"?J():d=16}function z(M){M===">"?J():M==="<"&&K()}function V(){d=0,p=l}function K(){d=1,p=new Ft({idx:u})}function J(){var M=n.slice(h,p.idx);M&&o(M,h),p.type==="comment"?s(p.idx):p.type==="doctype"?a(p.idx):(p.isOpening&&r(p.name,p.idx),p.isClosing&&i(p.name,p.idx)),V(),h=u+1}function oe(){var M=p.idx+(p.isClosing?2:1);return n.slice(M,u).toLowerCase()}h<u&&(t=n.slice(h,u),o(t,h),h=u+1)}var Ft=function(n){n===void 0&&(n={}),this.idx=n.idx!==void 0?n.idx:-1,this.type=n.type||"tag",this.name=n.name||"",this.isOpening=!!n.isOpening,this.isClosing=!!n.isClosing},A0=function(){function n(e){e===void 0&&(e={}),this.version=n.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email=typeof e.email=="boolean"?e.email:this.email,this.phone=typeof e.phone=="boolean"?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=typeof e.newWindow=="boolean"?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash=typeof e.stripTrailingSlash=="boolean"?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=typeof e.decodePercentEncoding=="boolean"?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var t=this.mention;if(t!==!1&&t!=="twitter"&&t!=="instagram"&&t!=="soundcloud")throw new Error("invalid `mention` cfg - see docs");var r=this.hashtag;if(r!==!1&&r!=="twitter"&&r!=="facebook"&&r!=="instagram")throw new Error("invalid `hashtag` cfg - see docs");this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return n.link=function(e,t){return new n(t).link(e)},n.parse=function(e,t){return new n(t).parse(e)},n.prototype.normalizeUrlsCfg=function(e){return e==null&&(e=!0),typeof e=="boolean"?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:typeof e.schemeMatches!="boolean"||e.schemeMatches,wwwMatches:typeof e.wwwMatches!="boolean"||e.wwwMatches,tldMatches:typeof e.tldMatches!="boolean"||e.tldMatches}},n.prototype.normalizeStripPrefixCfg=function(e){return e==null&&(e=!0),typeof e=="boolean"?{scheme:e,www:e}:{scheme:typeof e.scheme!="boolean"||e.scheme,www:typeof e.www!="boolean"||e.www}},n.prototype.normalizeTruncateCfg=function(e){return typeof e=="number"?{length:e,location:"end"}:function(t,r){for(var i in r)r.hasOwnProperty(i)&&t[i]===void 0&&(t[i]=r[i]);return t}(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})},n.prototype.parse=function(e){var t=this,r=["a","style","script"],i=0,o=[];return E0(e,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=function(c,d){if(!d.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var h,p=[],f=0;h=d.exec(c);)p.push(c.substring(f,h.index)),p.push(h[0]),f=h.index+h[0].length;return p.push(c.substring(f)),p}(s,/( | |<|<|>|>|"|"|')/gi),u=a;l.forEach(function(c,d){if(d%2==0){var h=t.parseText(c,u);o.push.apply(o,h)}u+=c.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(s){},onDoctype:function(s){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},n.prototype.compactMatches=function(e){e.sort(function(l,u){return l.getOffset()-u.getOffset()});for(var t=0;t<e.length-1;t++){var r=e[t],i=r.getOffset(),o=r.getMatchedText().length,s=i+o;if(t+1<e.length){if(e[t+1].getOffset()===i){var a=e[t+1].getMatchedText().length>o?t:t+1;e.splice(a,1);continue}e[t+1].getOffset()<s&&e.splice(t+1,1)}}return e},n.prototype.removeUnwantedMatches=function(e){return this.hashtag||kn(e,function(t){return t.getType()==="hashtag"}),this.email||kn(e,function(t){return t.getType()==="email"}),this.phone||kn(e,function(t){return t.getType()==="phone"}),this.mention||kn(e,function(t){return t.getType()==="mention"}),this.urls.schemeMatches||kn(e,function(t){return t.getType()==="url"&&t.getUrlMatchType()==="scheme"}),this.urls.wwwMatches||kn(e,function(t){return t.getType()==="url"&&t.getUrlMatchType()==="www"}),this.urls.tldMatches||kn(e,function(t){return t.getType()==="url"&&t.getUrlMatchType()==="tld"}),e},n.prototype.parseText=function(e,t){t===void 0&&(t=0),t=t||0;for(var r=this.getMatchers(),i=[],o=0,s=r.length;o<s;o++){for(var a=r[o].parseMatches(e),l=0,u=a.length;l<u;l++)a[l].setOffset(t+a[l].getOffset());i.push.apply(i,a)}return i},n.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"<").replace(/>/g,">"));for(var t=this.parse(e),r=[],i=0,o=0,s=t.length;o<s;o++){var a=t[o];r.push(e.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(e.substring(i)),r.join("")},n.prototype.createMatchReturnVal=function(e){var t;return this.replaceFn&&(t=this.replaceFn.call(this.context,e)),typeof t=="string"?t:t===!1?e.getMatchedText():t instanceof Xl?t.toAnchorString():e.buildTag().toAnchorString()},n.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),t=[new Kh({tagBuilder:e,serviceName:this.hashtag}),new Wh({tagBuilder:e}),new Jh({tagBuilder:e}),new qh({tagBuilder:e,serviceName:this.mention}),new Xh({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=t},n.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new Vh({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},n.version="3.14.3",n.AnchorTagBuilder=Vh,n.HtmlTag=Xl,n.matcher={Email:Wh,Hashtag:Kh,Matcher:Qr,Mention:qh,Phone:Jh,Url:Xh},n.match={Email:ic,Hashtag:BE,Match:Zr,Mention:HE,Phone:UE,Url:oc},n}();function VE(n,e=n){return{type:"autolink",url:n,text:e}}const _0=()=>hn(/```([^]+?)```/g,([n,e])=>({type:"codespan",text:FE(e)})),g0=hn(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([n,e,t])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(e),t)),D0=hn(/<!!customemoji:(.*?)>/gm,([n,e])=>function(t){return{type:"customemoji",text:t}}(e)),YE=hn(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([n,e,t])=>function(r,i=[]){return{type:"link",url:r,children:i}}(e,[t])),O0=hn(/<actionlink:([^|]+)[|]([^>]*)>/gi,([n,e,t])=>{const{action:r,params:i}=GE(e);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[t])}),S0=hn(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([n,e,t])=>{const{action:r,params:i}=GE(e);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[t])});function GE(n){const e=n.indexOf("?");return e===-1?{action:n,params:{}}:{action:n.slice(0,e),params:Object.fromEntries(new URLSearchParams(n.slice(e)))}}const T0=hn(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([n])=>function(e=[]){return{type:"bulletlist",children:e}}([n.startsWith(`
|
|
16
|
-
`)?
|
|
17
|
-
`);function KE(n,e={except:[]}){const t=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:C0.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(T0,R0),s.includes("Mention")||o.singlelineSteps.push(g0),s.includes("CustomEmoji")||o.singlelineSteps.push(D0),s.includes("Codespan")||o.multilineSteps.push(_0()),s.includes("FormattedLink")||o.singlelineSteps.push(YE),s.includes("Actions")||(o.singlelineSteps.push(O0),o.singlelineSteps.push(S0)),s.includes("Wikitext")||o.singlelineSteps.push(JD),s.includes("Autolink")||o.singlelineSteps.push(XE,WE),o}(e);let r=JE(n,t);return r=qE(r,!1),r}function JE(n,e){let t=[n];return t=Za(t,e.multilineSteps),t=Za(t,[I0]),t=Za(t,e.singlelineSteps),t=sc(t),t}function Za(n,e){return e.reduce((t,r)=>Hi(t,r),n)}function sc(n){const e=[];let t=-1;for(const r of n)typeof r=="string"?typeof e[t]=="string"?e[t]+=r:e[++t]=r:e[++t]="children"in r?{...r,children:sc(r.children)}:r;return e}function qE(n,e){const t=[];let r=[];for(let i=0;i<n.length;i++){const o=n[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(t.push(r.join("")),r=[]);const s=qE(o.children,e||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");t.push({...o,children:s})}else o.type==="autolink"&&e?r.push(o.text):(r.length>0&&(t.push(r.join("")),r=[]),t.push(o))}return r.length>0&&(t.push(r.join("")),r=[]),t}function v0(){let n,e=0;return t=>{const r=(o=Date.now())=>{if(window.clearTimeout(n),n=void 0,e=o,t.isDestroyed)return;const s=function(a){a=a.removeMark(0,a.doc.content.size,ye.marks.bold),a=a.removeMark(0,a.doc.content.size,ye.marks.italic),a=a.removeMark(0,a.doc.content.size,ye.marks.strikethrough),a.doc.firstChild;const l=function(u){const c=[];let d,h="";return u.descendants((p,f)=>(p.isText?(h+=p.text,d!=null||(d=f)):h&&d!==void 0&&(c.push({text:h,pos:d}),h="",d=void 0),p.type!==ye.nodes.mention)),h&&d!==void 0&&c.push({text:h,pos:d}),c}(a.doc);for(const{text:u,pos:c}of l){const d=KE(u,{only:["Wikitext"]});[a]=ZE(a,c,d)}return a}(t.state.tr);t.dispatch(s)},i=Date.now();i-e<300?n||(n=window.setTimeout(r,300)):r(i)}}function ZE(n,e,t,r=0,i=[]){for(const o of t)if(typeof o=="string"){for(const s of i)n.addMark(e+r,e+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=ye.marks[o.type],a=[...i,s];[n,r]=ZE(n,e,o.children,r,a),r+=1}else pe.unreachable();return[n,r]}function Zh(n){return(e,t)=>{if(!t)return!0;let r=e.tr;const i=ae.between(e.selection.$from,e.selection.$to);return r=r.replaceRangeWith(i.from,i.from,ye.text(n,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,ye.text(n,r.storedMarks)),r=r.setSelection(ae.near(r.doc.resolve(i.to+1))),t(r),!0}}function N0(n,e,t){const r=e.clipboardData;if(!r)return!1;const i=function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const u=l[0];let c=u.getAsFile();if(!c.name){const d="image."+a[u.type];c=new File([c],d,{type:u.type,lastModified:Date.now()})}return c}(r);return i?t(i):function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)}(n,r.getData("text/plain")),!0}function y0(n,{allowSpaces:e=!1}){return t=>{const r=new RegExp(`\\s${n}$`),i=e?new RegExp(`${n}.*?(?=\\s${n}|$)`,"g"):new RegExp(`(?:^)?${n}[^\\s${n}]*`,"g"),o=t.before(),s=t.end(),a=t.doc.textBetween(o,s,"\0","\0");let l;for(;l=i.exec(a);){const u=l.input.slice(Math.max(0,l.index-1),l.index);if(!/^[\s\0]?$/.test(u))continue;const c=l.index+t.start();let d=c+l[0].length;if(e&&r.test(a.slice(d-1,d+1))&&(l[0]+=" ",d++),c<t.pos&&d>=t.pos)return{range:{from:c,to:d},text:l[0]}}}}function Qh({matcher:n=y0("#"),suggestionClass:e="ProseMirror-suggestion",onEnter:t=()=>!1,onChange:r=()=>!1,onExit:i=()=>!1,onKeyDown:o=()=>!1,debug:s=!1}){return new Ws({key:new Xs("suggestions"),view(){return{update:(a,l)=>{const u=this.key.getState(l),c=this.key.getState(a.state),d=u.active&&c.active&&u.range.from!==c.range.from,h=!u.active&&c.active,p=u.active&&!c.active,f=!h&&!p&&u.text!==c.text;(p||d)&&i({view:a,range:u.range,text:u.text}),f&&!d&&r({view:a,range:c.range,text:c.text}),(h||d)&&t({view:a,range:c.range,text:c.text})}}},state:{init:()=>({active:!1,range:{},text:null}),apply(a,l){const{selection:u}=a,c={...l};if(u.from===u.to){(u.from<l.range.from||u.from>l.range.to)&&(c.active=!1);const d=u.$from,h=n(d);h?(c.active=!0,c.range=h.range,c.text=h.text):c.active=!1}else c.active=!1;return c.active||(c.range={},c.text=null),c}},props:{handleKeyDown(a,l){const{active:u}=this.getState(a.state);return!!u&&o({view:a,event:l})},decorations(a){const{active:l,range:u}=this.getState(a);return l?Te.create(a.doc,[pt.inline(u.from,u.to,{nodeName:"span",class:e,style:s?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":null})]):null}}})}function QE({placeholder:n,disabled:e,className:t="",characterLimit:r,spellcheck:i}){const o=po(),s=Q(),a=Q(null);return Y(()=>(s.current=function(l,u,c,d,h){const p=Sr.create({schema:ye,plugins:[...h.filter(b0),$D(),Lh({...Fo,"Mod-z":IE,"Mod-y":vE,"Mod-b":Zh("*"),"Mod-i":Zh("_"),"Mod-Enter":Fo.Enter,"Shift-Enter":Fo.Enter,Enter:c}),Lh({Enter:Fo.Enter}),yh]}),f=v0(),m=new yD(l,{handlePaste:(E,A,g)=>N0(E,A,d),clipboardTextSerializer(E){const A=[];return E.content.forEach(g=>{g&&A.push(FE(g.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(ye.marks.literal)).removeStoredMark(ye.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||u(new Ts(A.doc)),m.updateState(A),E.steps.some(g=>g instanceof Tt)&&f(m)}});return m}(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),Y(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!e})},[e]),Y(()=>Gi(()=>{var l,u,c;return(c=s.current)==null?void 0:c.setProps({attributes:{spellcheck:String((u=(l=o.spellcheck$.get())!=null?l:i)!=null?u:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),Y(()=>Gi(()=>{var u;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(yh,(u=o.placeholder$.get())!=null?u:n))}),[o,n]),Y(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),v("div",{className:`t-editor ${t}`,ref:a})}function ep(n){if(n.startsWith(":"))throw new Error("Not implemented");{const e=ye.marks.emoji.create({emoji:n});return ye.text(n,[e])}}function tp(n,e){const t=encodeURIComponent(n);return ye.nodes.mention.create({id:n,name:e},ye.text(`<!!mention:${t}|${e}>`))}const Fs=class Fs{constructor(e){this.doc=e,this.size=this.doc.content.size,this.hasContent=AE(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(e){let t=!1;return e.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(t=!0,!1)),t}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};Fs.EMPTY=new Fs(ye.topNodeType.create());let Ts=Fs;function b0(n){return n!=null}const np=(n,e)=>t=>{var l;const r=(l=t.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(n);if(!i)return;const o=i[2],s=t.pos-o.length,a=t.pos;if(!t.doc.rangeHasMark(s,a,e.marks.literal))return{range:{from:s,to:a},text:o}},k0=/(^|\s)(:[^:\s]+:?)$/,L0=/(^|\s)(@[^@]*)$/;class eA{constructor(e,t,r){this.state$=e,this.device$=t,this.userPermissions$=r,this.currentDoc=Ts.EMPTY,this.maxLength=1e4,this.markAsTyping=function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}}(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=Se(),this.placeholder$=Se()}setEditorView(e){this.editorView=e}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return Qh({debug:!1,matcher:np(k0,ye),onEnter:e=>this.suggestEmoji(e.text,e.range),onChange:e=>this.suggestEmoji(e.text,e.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:e})=>{var t,r,i;return(i=(r=(t=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(t,e.key))!=null?i:!1}})}mentionsPlugin(){const e=this.userPermissions$.peek();if(pe.defined(e),e.canMention)return Qh({debug:!1,matcher:np(L0,ye),onEnter:t=>this.suggestMention(t.text,t.range),onChange:t=>this.suggestMention(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,t.key))!=null?o:!1}})}closeSuggester(){pe.defined(this._suggestionRange),function(e,t){const{from:r,to:i}=t,o=e.state.tr.addMark(r,i,ye.marks.literal.create());e.dispatch(o)}(this.editorView,this._suggestionRange)}listenKeydown(e,t){this._suggesterKeydownHandlers[e]=t}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(e,t){e.length<2||(this._suggestionRange=t,this.state$.suggestEmojiQuery.set(e))}suggestMention(e,t){e.length<1||(this._suggestionRange=t,this.state$.suggestMentionQuery.set(e))}onPasteImage(e){pe.defined(this.uploadFile),this.uploadFile(e)}onChange(e){var r;this.currentDoc=e;const t=e.size>this.maxLength&&e.asText().length>this.maxLength;e.hasContent&&this.markAsTyping(),this.state$.assign({isTyping:e.hasContent,atTextLimit:t,isEmpty:!e.hasNonWhitespaceContent(),characterCount:e.size===0?0:e.size-2}),(r=this.controller)==null||r.storeDraft(()=>e.asText())}setMaxLength(e){this.maxLength=e}focus({skipProseMirrorStuff:e}={skipProseMirrorStuff:!1}){var t,r;e?(t=this.editorView)==null||t.dom.focus():(r=this.editorView)==null||r.focus()}setText(e){this.editorView&&function(t,r){const i=t.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,u,c]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&u&&c)return tp(u,c);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?ep(h):ye.text(a)}),s=t.state.tr.replaceWith(0,i,o);t.dispatch(s)}(this.editorView,e)}typeText(e){this.editorView&&function(t,r,i="replace"){const o=t.state.doc.content.size,s=i=="insert"?t.state.tr.insertText(r):t.state.tr.insertText(r,0,o);t.dispatch(s)}(this.editorView,e,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(e){const t=e.state.doc.content.size,r=e.state.tr.insertText("",0,t);e.dispatch(r)}(this.editorView)}selectEmoji(e){pe.defined(this.editorView),function(t,r,i){const o=ep(r);if(i){const{from:a,to:l}=i,u=t.state.tr.deleteRange(a,l);t.dispatch(u)}const s=t.state.tr.replaceSelectionWith(o,!1);t.dispatch(s)}(this.editorView,e,this._suggestionRange),this.focus()}selectMention(e){pe.defined(this.editorView),function(t,r,i){const o=tp(r.id,r.name);let s=t.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),t.dispatch(s)}(this.editorView,e,this._suggestionRange),this.focus()}}const w0=Symbol("no_render");function ct(n){const e=Ct(!1),t=Q({_value:typeof n=="function"?n():n.peek(),get value(){return setTimeout(()=>{e.set(!0)}),t.current._value},set value(r){t.current._value=r}});return ne(()=>{if(!e.get())return w0;const r=typeof n=="function"?n():n.get();return t.current.value=r,r}),t.current}function ei(){const n=fo(),e=ce(),t=pm(),r=kt(),i=ct(e.app$.appMetadata),o=ct(e.currentUser$),s=ct(e.state$.currentConversation),a=ct(e.t$),l=ct(e.device$),u=ct(e.themeCustom$),c=ct(()=>e.state$.typing.child(e.state$.extCurrentConversationId.get()).get()),d=ct(()=>e.state$.participants.child(e.state$.extCurrentConversationId.get()).get());return Z(()=>({session:n,store:e,chatbox:t,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get t(){return a.value},get device(){return l.value},get themeCustom(){return u.value.value},get typing(){return c.value},get participants(){return d.value}}),[i,t,s,o,l,e,a,r,u,c,d,n])}function tA(){const n=fo(),e=ce(),t=kt(),r=pm(),i=ct(e.app$.appMetadata),o=ct(e.currentUser$),s=ct(e.t$),a=ct(e.device$),l=ct(e.themeCustom$);return Z(()=>({session:n,store:e,theme:t,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,n,e,s,t,l])}const M0=(()=>{if(typeof window!="undefined"){let n;try{n=window.localStorage;const e="__storage_test__";return n.setItem(e,e),n.removeItem(e),!0}catch(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")&&n&&n.length!==0}}return!1})(),We={};M0?(We.setItem=window.localStorage.setItem.bind(window.localStorage),We.getItem=window.localStorage.getItem.bind(window.localStorage),We.removeItem=window.localStorage.removeItem.bind(window.localStorage),We.isSupported=!0):(We.setItem=function(){},We.getItem=function(){return null},We.removeItem=function(){},We.isSupported=!1),We.set=(n,e)=>We.setItem(n,JSON.stringify(e)),We.get=n=>JSON.parse(We.getItem(n)||"null");const Jl="talkjs_drafts",F0=function(n,e){let t;return(...r)=>{clearTimeout(t),t=setTimeout(()=>e(...r),n)}}(200,(n,e,t,r)=>{const i=nA(n,e,t),o=JSON.parse(We.getItem(Jl)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,We.setItem(Jl,JSON.stringify(o))}),nA=(n,e,t)=>`draft_${n}_${e}_${t}`;function rA(n){const e=kt(),t=ce(),r=ei(),i=ne(t.referencedMessage$),o=ne(t.state$.userPermissions),s=po(),{sendMessage:a}=gg(),l=ne(Ct(()=>{const c=s.state$.get();return n.editMessageId===void 0?new Id(c,a,n.attachFile,n.shareLocation,s.toggleEmojiPicker):new Id(c,n.onEditMessage,()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,n.attachFile,n.editMessageId,n.onEditMessage,n.shareLocation,a])),u=ee(c=>s.setText(c),[s]);return function({appId:c,conversationId:d,meId:h,setText:p,enabled:f}){const m=Z(()=>nA(d,h,c),[c,d,h]);Y(()=>{var A;if(!m||!f)return;const E=(A=JSON.parse(We.getItem(Jl)||"{}")[m])!=null?A:"";p(E)},[m,f,p])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:u,enabled:!n.editMessageId}),v(fm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:c=>s.selectEmoji(c)},children:v(e.MessageField,{common:r,referencedMessage:i,permissions:o,editor:l,editMessageId:n.editMessageId})})}function P0({message:n}){const e=ce(),t=mo(),r=ne(e.state$.editingMessageId),i=Z(()=>Pt(n.content[0].children),[n]),o=Ct({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Z(()=>new eA(o,e.device$,e.state$.userPermissions),[o,e]),a=ee(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const u=s.getText();u&&await t.editMessage(n.id,{text:u}),e.state$.editingMessageId.set(null)},[e,t,s,n.id]);return Y(()=>{s.onEnter=a},[s,a]),Y(()=>{s.focus(),s.setText(Pt(n.content[0].children,!0))},[s,n]),v(lm.Provider,{value:s,children:v(rA,{editMessageId:r,onEditMessage:a})})}function x0(){const n=kt(),e=ei();return v(n.MessageListFooter,{common:e})}function B0(n){const e=kt(),t=ei();return v(e.MessageDivider,{common:t,...n})}function H0({message:n}){const e=kt(),t=ce(),r=ei(),[i,o]=ie("sent");return zr(s=>{if(n.id.startsWith("ephemeral-"))return o("sending");const a=t.state$.currentConversation.everyoneReadUntil.get();return a!==void 0?n.createdAt<=a?o("everyoneRead"):o("sent"):void 0}),v(e.Message,{common:r,message:n,messageStatus:i,permissions:t.messagePermissions$(n).get()})}function U0({extConversationId:n}){const e=fo(),t=ce(),r=mo(),i=Q(!0),o=Q(null);Et(()=>{i.current=o.current.scrollTop>-30}),Y(()=>{i.current&&(o.current.scrollTop=0)}),Y(()=>{const c=new IntersectionObserver(d=>t.state$.visibility.isInView.set(d[0].isIntersecting),{threshold:.9});return c.observe(o.current),()=>c.disconnect()},[t]),Y(()=>{const c=()=>t.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[t]);const[s,a]=ie(!1);Y(()=>{a(!1);const c=t.state$.currentConversation.peek();(c==null?void 0:c.isUnread)===!0&&e.conversation(n).markAsRead().catch(d=>{hs.warn("Could not mark conversation as read",d)})},[n,e,t]),zr(c=>{if(!o.current)return;const d=t.state$.currentConversation.get(),h=!(!d||!d.isUnread),p=d==null?void 0:d.unreadMessageCount;if(h&&p===0)return void a(!0);if(h&&s)return;if(!h)return void a(!1);const f=t.state$.visibility.tabFocused.get(),m=t.state$.visibility.isInView.get(),E=function(A){if(A.checkVisibility)return A.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const g=window.getComputedStyle(A),O=g.visibility,S=g.opacity;return!(A.getClientRects().length===0||O==="hidden"||S==="0")}}(o.current);return f&&m&&E?e.conversation(d.id).markAsRead():void 0});const l=ee(c=>{const d=c.currentTarget;d.scrollHeight-d.clientHeight+d.scrollTop<90&&t.messageSubscription&&t.messageSubscription.loadMore(10)},[t.messageSubscription]),u=ne(t.state$.typing.child(n));return v("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:l,children:[u&&v(x0,{}),v(Ol,{each:t.chatItems$,children:c=>v("div",{className:"t-message-group",children:v(Ol,{each:c,item:$0,itemProps:{controller:r,extConversationId:n}})})})]})}function $0({item$:n}){const e=ce(),t=ne(n),r=ne(e.state$.editingMessageId);return t instanceof Tl?v(B0,{timestamp:t.timestamp,isReadMarker:t.isReadMarker,isDayMarker:t.isDayMarker}):r===t.id?v(P0,{message:t}):v(H0,{message:t})}function Rs(n){return v(ce()instanceof Tm?j0:z0,{...n})}function j0(n){const e=kt(),t=ei();return v(e.Icon,{common:t,...n})}function z0(n){const e=kt(),t=tA();return v(e.Icon,{common:t,...n})}function ac(){return v(Rs,{type:"spinner","aria-label":ne(ce().t$).LOADING,className:"t-loading-icon"})}const V0=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function qs({appId:n,chatboxState:e}){const t=n.charAt(0)==="t"||V0.has(n);return Y(()=>{switch(e.type){case"auth-failed":$t.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":$t.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":$t.error(e.error);break;case"wrong-app-id":$t.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:pe.never(e)}},[e]),v("div",{className:"t-panel t-error-panel",children:[v("span",{className:"t-heading",children:"Something went wrong."}),v("p",{children:"Please reload the page and try again."}),v("p",t?{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",v("br",{}),v("small",{children:"This message only shows up in test mode."})]}:{children:"If things keep not working, do not hesitate to get in touch with us."})]})}function Y0(){return v("div",{className:"t-panel t-error-panel",children:v("span",{className:"t-heading",style:{fontStyle:"italic"},children:ne(ce().t$).CHAT_NOT_FOUND})})}function iA(){return v("div",{className:"t-panel t-loading-panel",children:v(ac,{})})}function oA(){const n=ne(ce().t$);return v("div",{className:"t-panel t-error-panel",children:[v("span",{className:"t-heading",style:{fontStyle:"italic"},children:n.AUTH_EXPIRED_OVERLAY_TITLE}),v("p",{children:n.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const G0=()=>!0;async function lc(n,e,{initialDelay:t,maxDelay:r,log:i,shouldRetry:o=G0}){return e().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${n}. Error: ${JSON.stringify(s)}.`),n===0||!await o(s))throw s;const a=1e3*t*1.2,l=r?Math.min(1e3*r,a):a,u=l*(1-(c=.05)+2*Math.random()*c);var c,d;return(d=u,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>lc(n-1,e,{initialDelay:u/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Zi(){const n={},e=new Promise(function(t,r){n.resolve=t,n.reject=r});return n.promise=e,n}function W0(n,e,t){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=ar(um);return ee(async()=>{function o(c){c==="denied"&&i({type:n})}if(!r||!await async function(c){if(!("permissions"in navigator))return!1;const d=c;try{return(await navigator.permissions.query({name:d})).state==="prompt"}catch(h){return!1}}(n))return e(c=>{o(c)});const s=Zi(),a=Zi(),l={type:n,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(c){$t.error("Your beforeBrowserPermissionPrompt callback threw an error: ",c),a.resolve({cancelled:!0})}const{cancelled:u}=await a.promise;return u?void 0:e(c=>{s.resolve(c),o(c)})},[r,i,n,e,...t])}function X0({onClose:n}){const e=ce(),t=mo(),r=fo(),[i,o]=ie(null),s=ee(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:u,upload:c}=await async function(m,E){const A=m.name;if(function(T){return/\.(mp4|ts|mov|webm|ogv)$/i.test(T)}(m.name)){const T=await Qa("video",m,y=>({width:y.videoWidth,height:y.videoHeight,duration:y.duration,filename:A})),I=E.uploadVideo(m,T),C=function(y){switch(y.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}}(m);return{uploadPromise:I,upload:{type:"video",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:C}))}}}if(function(T){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(T)}(m.name)){const T=await Qa("audio",m,I=>({duration:I.duration,filename:A}));return{uploadPromise:E.uploadAudio(m,T),upload:{type:"audio",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(T){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(T)}(m.name)){const T=await Qa("img",m,I=>({width:I.naturalWidth,height:I.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,T),upload:{type:"image",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const g={filename:A},O=E.uploadFile(m,g),S=URL.createObjectURL(new Blob([m]));return{uploadPromise:O,upload:{type:"file",file:m,metadata:g,temporaryBlobUrl:S}}}(l,r),d=c.file.size+","+c.file.name;e.state$.localFileBlobUrls.child(e.state$.extCurrentConversationId.peek()).child(d).set({url:c.temporaryBlobUrl,fetching:!1}),e.latestFileUpload=c;const h=Zi(),p={upload:c,closePreview:h.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await rp(u,h.promise),o({...p,uploaded:!0})}catch(m){if(m===ql)return;$t.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;pe.defined(f),t.sendFileMessage({fileToken:f})}finally{n(),o(null)}},[t,r,o,e,n]),a=W0("geolocation",async l=>{try{const u=Zi(),c={upload:{type:"location",location:void 0},uploaded:!1,closePreview:u.resolve,errored:!1};o(c);const{permissionResult:d,location:h}=await rp(new Promise(p=>{navigator.geolocation.getCurrentPosition(f=>{const m={latitude:f.coords.latitude,longitude:f.coords.longitude};p({permissionResult:"granted",location:m})},f=>{f.code===1?p({permissionResult:"denied"}):p({permissionResult:"granted"})})}),u.promise);if(l(d),!h||(o({...c,upload:{type:"location",location:h},uploaded:!0}),await u.promise==="cancel"))return;t.sendLocationMessage({location:h})}catch(u){if(u===ql)return;throw u}finally{n(),o(null)}},[t,o,n]);return{attachFile:s,shareLocation:a,uploadState:i}}const ql=Symbol("cancelled");function rp(n,e){return Promise.race([n,e.then(()=>Promise.reject(ql))])}async function Qa(n,e,t){const r=document.createElement(n);try{return r.src=URL.createObjectURL(e),await new Promise((i,o)=>{const s=n==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(t(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}var sA=function(n,e,t,r){var i;e[0]=0;for(var o=1;o<e.length;o++){var s=e[o++],a=e[o]?(e[0]|=s?1:2,t[e[o++]]):e[++o];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[e[++o]]=a:s===6?r[1][e[++o]]+=a+"":s?(i=n.apply(a,sA(n,a,t,["",null])),r.push(i),a[0]?e[0]|=2:(e[o-2]=0,e[o]=i)):r.push(a)}return r},ip=new Map;function K0(n){var e=ip.get(this);return e||(e=new Map,ip.set(this,e)),(e=sA(this,e.get(n)||(e.set(n,e=function(t){for(var r,i,o=1,s="",a="",l=[0],u=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},c=0;c<t.length;c++){c&&(o===1&&u(),u(c));for(var d=0;d<t[c].length;d++)r=t[c][d],o===1?r==="<"?(u(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||t[c][d+1]===">")?(u(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
18
|
-
`||r==="\r"?(u(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return u(),l}(n)),e),arguments,[])).length>1?e:e[0]}var J0={TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const q0=function(n){return J0[n]}("TALK_GMK");function je(n,e,t,r){return new(t||(t=Promise))(function(i,o){function s(u){try{l(r.next(u))}catch(c){o(c)}}function a(u){try{l(r.throw(u))}catch(c){o(c)}}function l(u){var c;u.done?i(u.value):(c=u.value,c instanceof t?c:new t(function(d){d(c)})).then(s,a)}l((r=r.apply(n,e||[])).next())})}class _o{constructor(){this.listeners={}}on(e,t,r){if(this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),r==null?void 0:r.once){const i=()=>{this.un(e,i),this.un(e,t)};return this.on(e,i),i}return()=>this.un(e,t)}un(e,t){var r;(r=this.listeners[e])===null||r===void 0||r.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach(r=>r(...t))}}const op={decode:function(n,e){return je(this,void 0,void 0,function*(){const t=new AudioContext({sampleRate:e});return t.decodeAudioData(n).finally(()=>t.close())})},createBuffer:function(n,e){return typeof n[0]=="number"&&(n=[n]),function(t){const r=t[0];if(r.some(i=>i>1||i<-1)){const i=r.length;let o=0;for(let s=0;s<i;s++){const a=Math.abs(r[s]);a>o&&(o=a)}for(const s of t)for(let a=0;a<i;a++)s[a]/=o}}(n),{duration:e,length:n[0].length,sampleRate:n[0].length/e,numberOfChannels:n.length,getChannelData:t=>n==null?void 0:n[t],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function aA(n,e){const t=e.xmlns?document.createElementNS(e.xmlns,n):document.createElement(n);for(const[r,i]of Object.entries(e))if(r==="children")for(const[o,s]of Object.entries(e))typeof s=="string"?t.appendChild(document.createTextNode(s)):t.appendChild(aA(o,s));else r==="style"?Object.assign(t.style,i):r==="textContent"?t.textContent=i:t.setAttribute(r,i.toString());return t}function sp(n,e,t){const r=aA(n,e||{});return t==null||t.appendChild(r),r}var Z0=Object.freeze({__proto__:null,createElement:sp,default:sp});const Q0={fetchBlob:function(n,e,t){return je(this,void 0,void 0,function*(){const r=yield fetch(n,t);if(r.status>=400)throw new Error(`Failed to fetch ${n}: ${r.status} (${r.statusText})`);return function(i,o){je(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const u=d=>je(this,void 0,void 0,function*(){l+=(d==null?void 0:d.length)||0;const h=Math.round(l/a*100);o(h)}),c=()=>je(this,void 0,void 0,function*(){let d;try{d=yield s.read()}catch(h){return}d.done||(u(d.value),yield c())});c()})}(r.clone(),e),r.blob()})}};class eO extends _o{constructor(e){super(),this.isExternalMedia=!1,e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),e.playbackRate!=null&&this.onMediaEvent("canplay",()=>{e.playbackRate!=null&&(this.media.playbackRate=e.playbackRate)},{once:!0})}onMediaEvent(e,t,r){return this.media.addEventListener(e,t,r),()=>this.media.removeEventListener(e,t,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return this.media.canPlayType(e)!==""}setSrc(e,t){const r=this.getSrc();if(e&&r===e)return;this.revokeSrc();const i=t instanceof Blob&&(this.canPlayType(t.type)||!e)?URL.createObjectURL(t):e;try{this.media.src=i}catch(o){this.media.src=e}}destroy(){this.media.pause(),this.isExternalMedia||(this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(e){this.media=e}play(){return je(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=e}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,t){t!=null&&(this.media.preservesPitch=t),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}class Wr extends _o{constructor(e,t){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.subscriptions=[],this.options=e;const r=this.parentFromOptionsContainer(e.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),t&&o.appendChild(t),this.initEvents()}parentFromOptionsContainer(e){let t;if(typeof e=="string"?t=document.querySelector(e):e instanceof HTMLElement&&(t=e),!t)throw new Error("Container not found");return t}initEvents(){const e=t=>{const r=this.wrapper.getBoundingClientRect(),i=t.clientX-r.left,o=t.clientY-r.top;return[i/r.width,o/r.height]};if(this.wrapper.addEventListener("click",t=>{const[r,i]=e(t);this.emit("click",r,i)}),this.wrapper.addEventListener("dblclick",t=>{const[r,i]=e(t);this.emit("dblclick",r,i)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:t,scrollWidth:r,clientWidth:i}=this.scrollContainer,o=t/r,s=(t+i)/r;this.emit("scroll",o,s,t,t+i)}),typeof ResizeObserver=="function"){const t=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{t().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=e,this.reRender())}initDrag(){this.subscriptions.push(function(e,t,r,i,o=3,s=0,a=100){if(!e)return()=>{};const l=matchMedia("(pointer: coarse)").matches;let u=()=>{};const c=d=>{if(d.button!==s)return;d.preventDefault(),d.stopPropagation();let h=d.clientX,p=d.clientY,f=!1;const m=Date.now(),E=T=>{if(T.preventDefault(),T.stopPropagation(),l&&Date.now()-m<a)return;const I=T.clientX,C=T.clientY,y=I-h,_=C-p;if(f||Math.abs(y)>o||Math.abs(_)>o){const D=e.getBoundingClientRect(),{left:k,top:L}=D;f||(r==null||r(h-k,p-L),f=!0),t(y,_,I-k,C-L),h=I,p=C}},A=T=>{if(f){const I=T.clientX,C=T.clientY,y=e.getBoundingClientRect(),{left:_,top:D}=y;i==null||i(I-_,C-D)}u()},g=T=>{T.relatedTarget&&T.relatedTarget!==document.documentElement||A(T)},O=T=>{f&&(T.stopPropagation(),T.preventDefault())},S=T=>{f&&T.preventDefault()};document.addEventListener("pointermove",E),document.addEventListener("pointerup",A),document.addEventListener("pointerout",g),document.addEventListener("pointercancel",g),document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("click",O,{capture:!0}),u=()=>{document.removeEventListener("pointermove",E),document.removeEventListener("pointerup",A),document.removeEventListener("pointerout",g),document.removeEventListener("pointercancel",g),document.removeEventListener("touchmove",S),setTimeout(()=>{document.removeEventListener("click",O,{capture:!0})},10)}};return e.addEventListener("pointerdown",c),()=>{u(),e.removeEventListener("pointerdown",c)}}(this.wrapper,(e,t,r)=>{this.emit("drag",Math.max(0,Math.min(1,r/this.wrapper.getBoundingClientRect().width)))},e=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,e/this.wrapper.getBoundingClientRect().width)))},e=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,e/this.wrapper.getBoundingClientRect().width)))}))}getHeight(e,t){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;if(e==null)return 128;if(!isNaN(Number(e)))return Number(e);if(e==="auto"){const o=this.parent.clientHeight||128;return t!=null&&t.every(s=>!s.overlay)?o/i:o}return 128}initHtml(){const e=document.createElement("div"),t=e.attachShadow({mode:"open"});return t.innerHTML=`
|
|
19
|
-
<style>
|
|
14
|
+
`);return{dom:l,text:h,slice:t}}function Hm(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",h=>{t=h(t,a||r,e)}),a)return s=new $(U.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
15
|
+
`))),0,0),e.someProp("transformPasted",h=>{s=h(s,e,!0)}),s;let d=e.someProp("clipboardTextParser",h=>h(t,i,r,e));if(d)s=d;else{let h=i.marks(),{schema:f}=e.state,p=ni.fromSchema(f);o=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let E=o.appendChild(document.createElement("p"));m&&E.appendChild(p.serializeNode(f.text(m,h)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),o=function(d){let h=/^(\s*<meta [^>]*>)*/.exec(d);h&&(d=d.slice(h[0].length));let f,p=Vm().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((f=m&&$m[m[1].toLowerCase()])&&(d=f.map(E=>"<"+E+">").join("")+d+f.map(E=>"</"+E+">").reverse().join("")),p.innerHTML=function(E){let A=window.trustedTypes;return A?(va||(va=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:_=>_})),va.createHTML(E)):E}(d),f)for(let E=0;E<f.length;E++)p=p.querySelector(f[E])||p;return p}(n),oo&&function(d){let h=d.querySelectorAll(xt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let f=0;f<h.length;f++){let p=h[f];p.childNodes.length==1&&p.textContent==" "&&p.parentNode&&p.parentNode.replaceChild(d.ownerDocument.createTextNode(" "),p)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let h=o.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;o=h}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||Fi.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||Bg.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)s=function(d,h){if(!d.size)return d;let f,p=d.content.firstChild.type.schema;try{f=JSON.parse(h)}catch(_){return d}let{content:m,openStart:E,openEnd:A}=d;for(let _=f.length-2;_>=0;_-=2){let O=p.nodes[f[_]];if(!O||O.hasRequiredAttrs())break;m=U.from(O.create(f[_+1],m)),E++,A++}return new $(m,E,A)}(Qd(s,+u[1],+u[2]),u[4]);else if(s=$.maxOpen(function(d,h){if(d.childCount<2)return d;for(let f=h.depth;f>=0;f--){let p,m=h.node(f).contentMatchAt(h.index(f)),E=[];if(d.forEach(A=>{if(!E)return;let _,O=m.findWrapping(A.type);if(!O)return E=null;if(_=E.length&&p.length&&Bm(O,p,A,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=jm(E[E.length-1],p.length));let S=Um(A,O);E.push(S),m=m.matchType(S.type),p=O}}),E)return U.from(E)}return d}(s.content,i),!0),s.openStart||s.openEnd){let d=0,h=0;for(let f=s.content.firstChild;d<s.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=s.content.lastChild;h<s.openEnd&&!f.type.spec.isolating;h++,f=f.lastChild);s=Qd(s,d,h)}return e.someProp("transformPasted",d=>{s=d(s,e,l)}),s}const Bg=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Um(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,U.from(e));return e}function Bm(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=Bm(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(U.from(Um(n,e,i+1))))}}function jm(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,jm(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(U.empty,!0);return e.copy(n.append(r))}function Tl(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=Tl(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(U.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function Qd(e,t,n){return t<e.openStart&&(e=new $(Tl(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new $(Tl(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const $m={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let th=null;function Vm(){return th||(th=document.implementation.createHTMLDocument("title"))}let va=null;const ee={},re={},jg={touchstart:!0,touchmove:!0};class $g{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Nn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Ra(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>vl(e,r))})}function vl(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function Vg(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function is(e){return{left:e.clientX,top:e.clientY}}function yc(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function wr(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function Yg(e,t,n,r,i){return yc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?function(o,s){if(s==-1)return!1;let a,l,c=o.state.selection;c instanceof X&&(a=c.node);let u=o.state.doc.resolve(s);for(let d=u.depth+1;d>0;d--){let h=d>u.depth?u.nodeAfter:u.node(d);if(X.isSelectable(h)){l=a&&c.$from.depth>0&&d>=c.$from.depth&&u.before(c.$from.depth+1)==c.$from.pos?u.before(c.$from.depth):u.before(d);break}}return l!=null&&(wr(o,X.create(o.state.doc,l)),!0)}(e,n):function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&X.isSelectable(l))&&(wr(o,new X(a)),!0)}(e,n))}function zg(e,t,n,r){return yc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function Gg(e,t,n,r){return yc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(wr(i,st.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c),d=l.before(c);if(u.inlineContent)wr(i,st.create(a,d+1,d+1+u.content.size));else{if(!X.isSelectable(u))continue;wr(i,X.create(a,d))}return!0}}(e,n,r)}function Rl(e){return ss(e)}re.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!eh(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!ln||!xt||n.keyCode!=13))if(n.keyCode!=229&&e.domObserver.forceFlush(),!Jr||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",r=>r(e,n))||Ug(e,n)?n.preventDefault():Nn(e,"key");else{let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Vn(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},re.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},re.keypress=(e,t)=>{let n=t;if(eh(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Se&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof st&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,o))||e.dispatch(o()),n.preventDefault()}};const Ym=Se?"metaKey":"ctrlKey";ee.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Rl(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(a,l){let c=l.x-a.clientX,u=l.y-a.clientY;return c*c+u*u<100}(n,e.input.lastClick)&&!n[Ym]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=e.posAtCoords(is(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Wg(e,s,n,!!r)):(o=="doubleClick"?zg:Gg)(e,s.pos,s.inside,n)?n.preventDefault():Nn(e,"pointer"))};class Wg{constructor(t,n,r,i){let o,s;if(this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Ym],this.allowDefault=r.shiftKey,n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof X&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ne||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Nn(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>dn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(is(t))),this.updateAllowDefault(t),this.allowDefault||!n?Nn(this.view,"pointer"):Yg(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||zt&&this.mightDrag&&!this.mightDrag.node.isAtom||xt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(wr(this.view,at.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Nn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Nn(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function eh(e,t){return!!e.composing||!!(zt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ee.touchstart=e=>{e.input.lastTouch=Date.now(),Rl(e),Nn(e,"pointer")},ee.touchmove=e=>{e.input.lastTouch=Date.now(),Nn(e,"pointer")},ee.contextmenu=e=>Rl(e);const Xg=ln?5e3:-1;function nh(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ss(e),t))}function zm(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Kg(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Te(i=i.childNodes[o-1])}else{if(!i.parentNode||Bi(i))return null;o=Yt(i),i=i.parentNode}}}(t.focusNode,t.focusOffset),r=function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||Bi(i))return null;o=Yt(i)+1,i=i.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function ss(e,t=!1){if(!(ln&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),zm(e),t||e.docView&&e.docView.dirty){let n=Ic(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):!e.markCursor&&!t||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.updateState(e.state):e.dispatch(e.state.tr.deleteSelection()),!0}return!1}}re.compositionstart=re.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof st&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||xt&&Nm&&function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"}(e)))e.markCursor=e.state.storedMarks||n.marks(),ss(e,!0),e.markCursor=null;else if(ss(e,!t.selection.empty),Ne&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}e.input.composing=!0}nh(e,Xg)},re.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,nh(e,20))};const Ii=le&&yn<15||Jr&&Ng<604;function Ni(e,t,n,r,i){let o=Hm(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||$.empty)))return!0;if(!o)return!1;let s=function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null}(o),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Gm(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ee.copy=re.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=Ii?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Cc(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(c,u){if(!c.dom.parentNode)return;let d=c.dom.parentNode.appendChild(document.createElement("div"));d.appendChild(u),d.style.cssText="position: fixed; left: -10000px; top: 10px";let h=getSelection(),f=document.createRange();f.selectNodeContents(u),c.dom.blur(),h.removeAllRanges(),h.addRange(f),setTimeout(()=>{d.parentNode&&d.parentNode.removeChild(d),c.focus()},50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},re.paste=(e,t)=>{let n=t;if(e.composing&&!ln)return;let r=Ii?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Ni(e,Gm(r),r.getData("text/html"),i,n)?n.preventDefault():function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let c=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?Ni(o,l.value,null,c,s):Ni(o,l.textContent,l.innerHTML,c,s)},50)}(e,n)};class Wm{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const qg=Se?"altKey":"ctrlKey";function rh(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n!=null?n:!t[qg]}ee.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=e.state.selection,s=o.empty?null:e.posAtCoords(is(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof X?o.to-1:o.to))){if(r&&r.mightDrag)i=X.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(i=X.create(e.state.doc,d.posBefore))}}let a=(i||e.state.selection).content(),{dom:l,text:c,slice:u}=Cc(e,a);(!n.dataTransfer.files.length||!xt||Im>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ii?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ii||n.dataTransfer.setData("text/plain",c),e.dragging=new Wm(u,rh(e,n),i)},ee.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},re.dragover=re.dragenter=(e,t)=>t.preventDefault(),re.drop=(e,t)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(is(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=Hm(n,Gm(r.dataTransfer),Ii?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!rh(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||$.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let c=a?function(m,E,A){let _=m.resolve(E);if(!A.content.size)return E;let O=A.content;for(let S=0;S<A.openStart;S++)O=O.firstChild.content;for(let S=1;S<=(A.openStart==0&&A.size?2:1);S++)for(let T=_.depth;T>=0;T--){let b=T==_.depth?0:_.pos<=(_.start(T+1)+_.end(T+1))/2?-1:1,v=_.index(T)+(b>0?1:0),N=_.node(T),g=!1;if(S==1)g=N.canReplace(v,v,O);else{let D=N.contentMatchAt(v).findWrapping(O.firstChild.type);g=D&&N.canReplaceWith(v,v,D[0])}if(g)return b==0?_.pos:b<0?_.before(T+1):_.after(T+1)}return null}(n.state.doc,s.pos,a):s.pos;c==null&&(c=s.pos);let u=n.state.tr;if(l){let{node:m}=i;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(c),h=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,f=u.doc;if(h?u.replaceRangeWith(d,d,a.content.firstChild):u.replaceRange(d,d,a),u.doc.eq(f))return;let p=u.doc.resolve(d);if(h&&X.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new X(p));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((E,A,_,O)=>m=O),u.setSelection(Nc(n,p,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))})(e,t,e.dragging)}finally{e.dragging=null}},ee.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&dn(e)},20))},ee.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ee.beforeinput=(e,t)=>{if(xt&&ln&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Vn(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in re)ee[e]=re[e];function ji(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class as{constructor(t,n){this.toDOM=t,this.spec=n||Zn,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Ee(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof as&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&ji(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class kn{constructor(t,n){this.attrs=t,this.spec=n||Zn}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Ee(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof kn&&ji(this.attrs,t.attrs)&&ji(this.spec,t.spec)}static is(t){return t.type instanceof kn}destroy(){}}class bc{constructor(t,n){this.attrs=t,this.spec=n||Zn}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Ee(o.pos-r,s.pos-r,this)}valid(t,n){let r,{index:i,offset:o}=t.content.findIndex(n.from);return o==n.from&&!(r=t.child(i)).isText&&o+r.nodeSize==n.to}eq(t){return this==t||t instanceof bc&&ji(this.attrs,t.attrs)&&ji(this.spec,t.spec)}destroy(){}}class Ee{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Ee(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Ee(t,t,new as(n,r))}static inline(t,n,r,i){return new Ee(t,n,new kn(r,i))}static node(t,n,r,i){return new Ee(t,n,new bc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof kn}get widget(){return this.type instanceof as}}const gr=[],Zn={};class Nt{constructor(t,n){this.local=t.length?t:gr,this.children=n.length?n:gr}static create(t,n){return n.length?Fo(n,t,0,Zn):Kt}find(t,n,r){let i=[];return this.findInner(t==null?0:t,n==null?1e9:n,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==Kt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Zn)}mapInner(t,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(a,l,c,u,d,h,f){let p=a.slice();for(let E=0,A=h;E<c.maps.length;E++){let _=0;c.maps[E].forEach((O,S,T,b)=>{let v=b-T-(S-O);for(let N=0;N<p.length;N+=3){let g=p[N+1];if(g<0||O>g+A-_)continue;let D=p[N]+A-_;S>=D?p[N+1]=O<=D?-2:-1:O>=A&&v&&(p[N]+=v,p[N+1]+=v)}_+=v}),A=c.maps[E].map(A,-1)}let m=!1;for(let E=0;E<p.length;E+=3)if(p[E+1]<0){if(p[E+1]==-2){m=!0,p[E+1]=-1;continue}let A=c.map(a[E]+h),_=A-d;if(_<0||_>=u.content.size){m=!0;continue}let O=c.map(a[E+1]+h,-1)-d,{index:S,offset:T}=u.content.findIndex(_),b=u.maybeChild(S);if(b&&T==_&&T+b.nodeSize==O){let v=p[E+2].mapInner(c,b,A+1,a[E]+h+1,f);v!=Kt?(p[E]=_,p[E+1]=O,p[E+2]=v):(p[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,O,S,T,b,v,N){function g(D,k){for(let C=0;C<D.local.length;C++){let M=D.local[C].map(T,b,k);M?S.push(M):N.onRemove&&N.onRemove(D.local[C].spec)}for(let C=0;C<D.children.length;C+=3)g(D.children[C+2],D.children[C]+k+1)}for(let D=0;D<_.length;D+=3)_[D+1]==-1&&g(_[D+2],O[D]+v+1);return S}(p,a,l,c,d,h,f),A=Fo(E,u,0,f);l=A.local;for(let _=0;_<p.length;_+=3)p[_+1]<0&&(p.splice(_,3),_-=3);for(let _=0,O=0;_<A.children.length;_+=3){let S=A.children[_];for(;O<p.length&&p[O]<S;)O+=3;p.splice(O,0,A.children[_],A.children[_+1],A.children[_+2])}}return new Nt(l.sort(Gn),p)}(this.children,s||[],t,n,r,i,o):s?new Nt(s.sort(Gn),gr):Kt}add(t,n){return n.length?this==Kt?Nt.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,l)=>{let c,u=l+r;if(c=Km(n,a,u)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,c,u+1):i.splice(o,0,l,l+a.nodeSize,Fo(c,a,u+1,Zn)),o+=3}});let s=Xm(o?qm(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Nt(s.length?this.local.concat(s).sort(Gn):this.local,i||this.children)}remove(t){return t.length==0||this==Kt?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let u,d=0;d<t.length;d++)(u=t[d])&&u.from>a&&u.to<l&&(t[d]=null,(s||(s=[])).push(u));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=Kt?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o,s=0;s<t.length;s++)if(o=t[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Nt(i,r):Kt}forChild(t,n){if(this==Kt)return this;if(n.isLeaf)return Nt.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof kn){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new Nt(i.sort(Gn),gr);return r?new Tn([a,r]):a}return r||Kt}eq(t){if(this==t)return!0;if(!(t instanceof Nt)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return kc(this.localsInner(t))}localsInner(t){if(this==Kt)return gr;if(t.inlineContent||!this.local.some(kn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof kn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}Nt.empty=new Nt([],[]),Nt.removeOverlap=kc;const Kt=Nt.empty;class Tn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,Zn));return Tn.from(r)}forChild(t,n){if(n.isLeaf)return Nt.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=Kt&&(o instanceof Tn?r=r.concat(o.members):r.push(o))}return Tn.from(r)}eq(t){if(!(t instanceof Tn)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?kc(r?n:n.sort(Gn)):gr}static from(t){switch(t.length){case 0:return Kt;case 1:return t[0];default:return new Tn(t.every(n=>n instanceof Nt)?t:t.reduce((n,r)=>n.concat(r instanceof Nt?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Xm(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Ee(i.from+t,i.to+t,i.type))}return n}function Km(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o,s=0;s<e.length;s++)(o=e[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[s]=null);return i}function qm(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function Fo(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=Km(e,a,l+n);if(c){o=!0;let u=Fo(c,a,n+l+1,r);u!=Kt&&i.push(l,l+a.nodeSize,u)}});let s=Xm(o?qm(e):e,-n).sort(Gn);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new Nt(s,i):Kt}function Gn(e,t){return e.from-t.from||e.to-t.to}function kc(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),ih(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),ih(t,i+1,o.copy(r.to,o.to)))}}return t}function ih(e,t,n){for(;t<e.length&&Gn(n,e[t])>0;)t++;e.splice(t,0,n)}function Ia(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Kt&&t.push(r)}),e.cursorWrapper&&t.push(Nt.create(e.state.doc,[e.cursorWrapper.deco])),Tn.from(t)}const Jg={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Zg=le&&yn<=11;class Qg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class tD{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Qg,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);le&&yn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():zt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Zg&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Jg)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Gd(this.view)){if(this.suppressingSelectionUpdates)return dn(this.view);if(le&&yn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&nr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n,r=new Set;for(let o=t.focusNode;o;o=qr(o))r.add(o);for(let o=t.anchorNode;o;o=qr(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Gd(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(o=o<0?d.from:Math.min(d.from,o),s=s<0?d.to:Math.max(d.to,s),d.typeOver&&(a=!0))}if(Ne&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,h]=u;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of u){let f=h.parentNode;!f||f.nodeName!="LI"||d&&eD(t,d)==f||h.remove()}}}else if((xt||zt)&&l.some(u=>u.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let d=u.nextSibling;d&&d.nodeType==1&&d.contentEditable=="false"&&u.parentNode.removeChild(u)}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&Ps(r)&&(c=Ic(t))&&c.eq(at.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,dn(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(u){if(!oh.has(u)&&(oh.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=Ne,sh)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),sh=!0}}(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(u,d){var h;let{focusNode:f,focusOffset:p}=u.domSelectionRange();for(let m of d)if(((h=m.parentNode)===null||h===void 0?void 0:h.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let _=A.firstChild;if(!_||_.nodeType!=1||_.contentEditable=="false"||/^(BR|IMG)$/.test(_.nodeName))break;A=_}A.insertBefore(m,A.firstChild),f==m&&u.domSelection().collapse(m,p)}else m.parentNode.removeChild(m)}}(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||dn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let c=0;c<t.addedNodes.length;c++){let u=t.addedNodes[c];n.push(u),u.nodeType==3&&(this.lastChangedTextNode=u)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,o=t.nextSibling;if(le&&yn<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:u,nextSibling:d}=t.addedNodes[c];(!u||Array.prototype.indexOf.call(t.addedNodes,u)<0)&&(i=u),(!d||Array.prototype.indexOf.call(t.addedNodes,d)<0)&&(o=d)}let s=i&&i.parentNode==t.target?Yt(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?Yt(o):t.target.childNodes.length;return{from:a,to:r.localPosFromDOM(t.target,l,1)}}return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let oh=new WeakMap,sh=!1;function ah(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return nr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function eD(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function nD(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(zt&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||zt&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const rD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function iD(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let v=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,N=Ic(e,v);if(N&&!e.state.selection.eq(N)){if(xt&&ln&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",D=>D(e,Vn(13,"Enter"))))return;let g=e.state.tr.setSelection(N);v=="pointer"?g.setMeta("pointer",!0):v=="key"&&g.scrollIntoView(),o&&g.setMeta("composition",o),e.dispatch(g)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l,c,u=e.state.selection,d=function(v,N,g){let D,{node:k,fromOffset:C,toOffset:M,from:I,to:w}=v.docView.parseRange(N,g),H=v.domSelectionRange(),P=H.anchorNode;if(P&&v.dom.contains(P.nodeType==1?P:P.parentNode)&&(D=[{node:P,offset:H.anchorOffset}],Ps(H)||D.push({node:H.focusNode,offset:H.focusOffset})),xt&&v.input.lastKeyCode===8)for(let q=M;q>C;q--){let nt=k.childNodes[q-1],W=nt.pmViewDesc;if(nt.nodeName=="BR"&&!W){M=q;break}if(!W||W.size)break}let z=v.state.doc,V=v.someProp("domParser")||Fi.fromSchema(v.state.schema),Y=z.resolve(I),B=null,et=V.parse(k,{topNode:Y.parent,topMatch:Y.parent.contentMatchAt(Y.index()),topOpen:!0,from:C,to:M,preserveWhitespace:Y.parent.type.whitespace!="pre"||"full",findPositions:D,ruleFromNode:nD,context:Y});if(D&&D[0].pos!=null){let q=D[0].pos,nt=D[1]&&D[1].pos;nt==null&&(nt=q),B={anchor:q+I,head:nt+I}}return{doc:et,sel:B,from:I,to:w}}(e,t,n),h=e.state.doc,f=h.slice(d.from,d.to);e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(l=e.state.selection.to,c="end"):(l=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let p=function(v,N,g,D,k){let C=v.findDiffStart(N,g);if(C==null)return null;let{a:M,b:I}=v.findDiffEnd(N,g+v.size,g+N.size);if(k=="end"&&(D-=M+Math.max(0,C-Math.min(M,I))-C),M<C&&v.size<N.size){let w=D<=C&&D>=M?C-D:0;C-=w,C&&C<N.size&&ch(N.textBetween(C-1,C+1))&&(C+=w?1:-1),I=C+(I-M),M=C}else if(I<C){let w=D<=C&&D>=I?C-D:0;C-=w,C&&C<v.size&&ch(v.textBetween(C-1,C+1))&&(C+=w?1:-1),M=C+(M-I),I=C}return{start:C,endA:M,endB:I}}(f.content,d.doc.content,d.from,l,c);if(p&&e.input.domChangeCount++,(Jr&&e.input.lastIOSEnter>Date.now()-225||ln)&&i.some(v=>v.nodeType==1&&!rD.test(v.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",v=>v(e,Vn(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!p){if(!(r&&u instanceof st&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let v=lh(e,e.state.doc,d.sel);if(v&&!v.eq(e.state.selection)){let N=e.state.tr.setSelection(v);o&&N.setMeta("composition",o),e.dispatch(N)}}return}p={start:u.from,endA:u.to,endB:u.to}}e.state.selection.from<e.state.selection.to&&p.start==p.endB&&e.state.selection instanceof st&&(p.start>e.state.selection.from&&p.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?p.start=e.state.selection.from:p.endA<e.state.selection.to&&p.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(p.endB+=e.state.selection.to-p.endA,p.endA=e.state.selection.to)),le&&yn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>d.from&&d.doc.textBetween(p.start-d.from-1,p.start-d.from+1)==" "&&(p.start--,p.endA--,p.endB--);let m=d.doc.resolveNoCache(p.start-d.from),E=d.doc.resolveNoCache(p.endB-d.from),A=h.resolve(p.start),_=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=p.endA;if((Jr&&e.input.lastIOSEnter>Date.now()-225&&(!_||i.some(v=>v.nodeName=="DIV"||v.nodeName=="P"))||!_&&m.pos<d.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(d.doc.textBetween(m.pos,E.pos,"","")))&&e.someProp("handleKeyDown",v=>v(e,Vn(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&function(v,N,g,D,k){if(g-N<=k.pos-D.pos||Na(D,!0,!1)<k.pos)return!1;let C=v.resolve(N);if(!D.parent.isTextblock){let I=C.nodeAfter;return I!=null&&g==N+I.nodeSize}if(C.parentOffset<C.parent.content.size||!C.parent.isTextblock)return!1;let M=v.resolve(Na(C,!0,!0));return!(!M.parent.isTextblock||M.pos>g||Na(M,!0,!1)<g)&&D.parent.content.cut(D.parentOffset).eq(M.parent.content)}(h,p.start,p.endA,m,E)&&e.someProp("handleKeyDown",v=>v(e,Vn(8,"Backspace"))))return void(ln&&xt&&e.domObserver.suppressSelectionUpdates());xt&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),ln&&!_&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==p.endA&&(p.endB-=2,E=d.doc.resolveNoCache(p.endB-d.from),setTimeout(()=>{e.someProp("handleKeyDown",function(v){return v(e,Vn(13,"Enter"))})},20));let O,S=p.start,T=p.endA,b=v=>{let N=v||e.state.tr.replace(S,T,d.doc.slice(p.start-d.from,p.endB-d.from));if(d.sel){let g=lh(e,N.doc,d.sel);g&&!(xt&&e.composing&&g.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(g.head==S||g.head==N.mapping.map(T)-1)||le&&g.empty&&g.head==S)&&N.setSelection(g)}return o&&N.setMeta("composition",o),N.scrollIntoView()};if(_)if(m.pos==E.pos){le&&yn<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>dn(e),20));let v=b(e.state.tr.delete(S,T)),N=h.resolve(p.start).marksAcross(h.resolve(p.endA));N&&v.ensureMarks(N),e.dispatch(v)}else if(p.endA==p.endB&&(O=function(v,N){let g,D,k,C=v.firstChild.marks,M=N.firstChild.marks,I=C,w=M;for(let P=0;P<M.length;P++)I=M[P].removeFromSet(I);for(let P=0;P<C.length;P++)w=C[P].removeFromSet(w);if(I.length==1&&w.length==0)D=I[0],g="add",k=P=>P.mark(D.addToSet(P.marks));else{if(I.length!=0||w.length!=1)return null;D=w[0],g="remove",k=P=>P.mark(D.removeFromSet(P.marks))}let H=[];for(let P=0;P<N.childCount;P++)H.push(k(N.child(P)));if(U.from(H).eq(v))return{mark:D,type:g}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,p.endA-A.start())))){let v=b(e.state.tr);O.type=="add"?v.addMark(S,T,O.mark):v.removeMark(S,T,O.mark),e.dispatch(v)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let v=m.parent.textBetween(m.parentOffset,E.parentOffset),N=()=>b(e.state.tr.insertText(v,S,T));e.someProp("handleTextInput",g=>g(e,S,T,v,N))||e.dispatch(N())}else e.dispatch(b());else e.dispatch(b())}function lh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Nc(e,t.resolve(n.anchor),t.resolve(n.head))}function Na(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let o=e.node(r).maybeChild(e.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function ch(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class Jm{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new $g,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(fh),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=hh(this),dh(this),this.nodeViews=ph(this),this.docView=Ud(this.state.doc,uh(this),Ia(this),this.dom,this),this.domObserver=new tD(this,(r,i,o,s)=>iD(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in ee){let o=ee[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!Vg(r,s)||vl(r,s)||!r.editable&&s.type in re||o(r,s)},jg[i]?{passive:!0}:void 0)}zt&&r.dom.addEventListener("input",()=>null),Ra(r)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Ra(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(fh),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(zm(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=ph(this);(function(p,m){let E=0,A=0;for(let _ in p){if(p[_]!=m[_])return!0;E++}for(let _ in m)A++;return E!=A})(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Ra(this),this.editable=hh(this),dh(this);let l=Ia(this),c=uh(this),u=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",d=o||!this.docView.matchesNode(t.doc,c,l);!d&&t.selection.eq(i.selection)||(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(f){let p,m,E=f.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let _=(E.left+E.right)/2,O=A+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=f.root.elementFromPoint(_,O);if(!S||S==f.dom||!f.dom.contains(S))continue;let T=S.getBoundingClientRect();if(T.top>=A-20){p=S,m=T.top;break}}return{refDOM:p,refTop:m,stack:Ld(f.dom)}}(this);if(s){this.domObserver.stop();let f=d&&(le||xt)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&function(p,m){let E=Math.min(p.$anchor.sharedDepth(p.head),m.$anchor.sharedDepth(m.head));return p.$anchor.start(E)!=m.$anchor.start(E)}(i.selection,t.selection);if(d){let p=xt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Kg(this)),!o&&this.docView.update(t.doc,c,l,this)||(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Ud(t.doc,c,l,this.dom,this)),!p||this.trackWrites&&this.dom.contains(this.trackWrites)||(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(p){let m=p.docView.domFromPos(p.state.selection.anchor,0),E=p.domSelectionRange();return nr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?dn(this,f):(xm(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&function({refDOM:f,refTop:p,stack:m}){let E=f?f.getBoundingClientRect().top:0;wd(m,E==0?0:E-p)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(t.nodeType==1?t:t.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof X){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&kd(this,n.getBoundingClientRect(),t)}else kd(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(t,n){let r=t.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new Wm(t.slice,t.move,i<0?void 0:X.create(this.state.doc,i))}someProp(t,n){let r,i=this._props&&this._props[t];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(le){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(mr)return t.focus(mr);let n=Ld(t);t.focus(mr==null?{get preventScroll(){return mr={preventScroll:!0},!0}}:void 0),mr||(mr=!1,wd(n,0))}(this.dom),dn(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return bg(this,t)}coordsAtPos(t,n=1){return bm(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return wg(this,n||this.state,t)}pasteHTML(t,n){return Ni(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Ni(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Cc(this,t)}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let n in t.input.eventHandlers)t.dom.removeEventListener(n,t.input.eventHandlers[n]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ia(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,El=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(n,r){vl(n,r)||!ee[r.type]||!n.editable&&r.type in re||ee[r.type](n,r)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?zt&&this.root.nodeType===11&&function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}(this.dom.ownerDocument)==this.dom&&function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return ah(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?ah(n,i):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function uh(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:t[r]||r=="contenteditable"||r=="nodeName"||(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Ee.node(0,e.state.doc.content.size,t)]}function dh(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ee.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function hh(e){return!e.someProp("editable",t=>t(e.state)===!1)}function ph(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function fh(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}Jm.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};const Lt=new class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=jt.from(e.nodes),t.marks=jt.from(e.marks||{}),this.nodes=dd.compile(this.spec.nodes,this),this.marks=ks.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=tr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?hd(this,s.split(" ")):s!=""&&i.inlineContent?null:[]}for(let r in this.marks){let i=this.marks[r],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:hd(this,o.split(" "))}this.nodeFromJSON=r=>qn.fromJSON(this,r),this.markFromJSON=r=>lt.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e=="string")e=this.nodeType(e);else{if(!(e instanceof dd))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ns(n,n.defaultAttrs,e,lt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}({nodes:{doc:{content:"paragraph+"},paragraph:{code:!0,content:"inline*",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},text:{group:"inline"},mention:{group:"inline",inline:!0,attrs:{id:{},name:{}},content:"text*",toDOM:e=>["span",{"data-mention-id":e.attrs.id,class:"t-mention"},`@${e.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:e=>["img",{src:e.attrs.url,alt:e.attrs.name,"data-custom-emoji":e.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:e=>{const t=e;return{name:t.dataset.customEmoji,url:t.src}}}]}},marks:{literal:{toDOM:()=>["span",{"data-literal":""}],parseDOM:[{tag:"span[data-literal]"}]},bold:{toDOM:()=>["b"],parseDOM:[{tag:"b"}]},italic:{toDOM:()=>["i"],parseDOM:[{tag:"i"}]},strikethrough:{toDOM:()=>["del"],parseDOM:[{tag:"del"}]},emoji:{attrs:{emoji:{}},toDOM:e=>["span",{"data-emoji":e.attrs.emoji},e.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:e=>({emoji:e.dataset.emoji})}]}}}),Ca=new Ms("placeholder"),mh=new ws({key:Ca,props:{decorations(e){if(Zm(e.doc))return;const t=e.doc.firstChild,n=Ee.node(0,t.nodeSize,{class:"empty-node","data-placeholder":Ca.getState(e)});return Nt.create(e.doc,[n])}},state:{init:()=>"",apply:(e,t)=>{var n;return(n=e.getMeta(Ca))!=null?n:t}}});function Zm(e){return e.childCount!==1||e.firstChild.childCount!==0}for(var wn={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ls={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},oD=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),sD=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),$t=0;$t<10;$t++)wn[48+$t]=wn[96+$t]=String($t);for($t=1;$t<=24;$t++)wn[$t+111]="F"+$t;for($t=65;$t<=90;$t++)wn[$t]=String.fromCharCode($t+32),ls[$t]=String.fromCharCode($t);for(var ya in wn)ls.hasOwnProperty(ya)||(ls[ya]=wn[ya]);const aD=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function lD(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];s=="Space"&&(s=" ");for(let a=0;a<o.length-1;a++){let l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);aD?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function ba(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function Eh(e){return new ws({props:{handleKeyDown:cD(e)}})}function cD(e){let t=function(n){let r=Object.create(null);for(let i in n)r[lD(i)]=n[i];return r}(e);return function(n,r){let i,o=function(a){var l=!(oD&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||sD&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?ls:wn)[a.keyCode]||a.key||"Unidentified";return l=="Esc"&&(l="Escape"),l=="Del"&&(l="Delete"),l=="Left"&&(l="ArrowLeft"),l=="Up"&&(l="ArrowUp"),l=="Right"&&(l="ArrowRight"),l=="Down"&&(l="ArrowDown"),l}(r),s=t[ba(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[ba(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=wn[r.keyCode])&&i!=o){let a=t[ba(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var cs=200,Pt=function(){};Pt.prototype.append=function(e){return e.length?(e=Pt.from(e),!this.length&&e||e.length<cs&&this.leafAppend(e)||this.length<cs&&e.leafPrepend(this)||this.appendInner(e)):this},Pt.prototype.prepend=function(e){return e.length?Pt.from(e).append(this):this},Pt.prototype.appendInner=function(e){return new uD(this,e)},Pt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Pt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Pt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Pt.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Pt.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(e(i,o))},t,n),r},Pt.from=function(e){return e instanceof Pt?e:e&&e.length?new Qm(e):Pt.empty};var Qm=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,i){return r==0&&i==this.length?this:new t(this.values.slice(r,i))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,i,o,s){for(var a=i;a<o;a++)if(r(this.values[a],s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,s){for(var a=i-1;a>=o;a--)if(r(this.values[a],s+a)===!1)return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=cs)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=cs)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Pt);Pt.empty=new Qm([]);var uD=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},t.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},t.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},t.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},t.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new t(r,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(Pt);class ye{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=t.tr,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(o,h+1),i=r.maps.length),i--,void u.push(d);if(r){u.push(new He(d.map));let f,p=d.step.map(r.slice(i));p&&l.maybeStep(p).doc&&(f=l.mapping.maps[l.mapping.maps.length-1],c.push(new He(f,void 0,void 0,c.length+u.length))),i--,f&&r.appendMap(f,i)}else l.maybeStep(d.step);return d.selection?(s=r?d.selection.map(r.slice(i)):d.selection,a=new ye(this.items.slice(0,o).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<t.steps.length;u++){let d,h=t.steps[u].invert(t.docs[u]),f=new He(t.mapping.maps[u],h,n);(d=l&&l.merge(f))&&(f=d,u?o.pop():a=a.slice(0,a.length-1)),o.push(f),n&&(s++,n=void 0),i||(l=f)}let c=s-r.depth;return c>dD&&(a=function(u,d){let h;return u.forEach((f,p)=>{if(f.selection&&d--==0)return h=p,!1}),u.slice(h)}(a,c),s-=c),new ye(a.append(o),s)}remapping(t,n){let r=new Hi;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new ye(this.items.append(t.map(n=>new He(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;s=Math.min(s,f);let p=o.maps[f];if(h.step){let m=t.steps[f].invert(t.docs[f]),E=h.selection&&h.selection.map(o.slice(l+1,f));E&&a++,r.push(new He(p,m,E))}else r.push(new He(p))},i);let c=[];for(let h=n;h<s;h++)c.push(new He(o.maps[h]));let u=this.items.slice(0,i).append(c).append(r),d=new ye(u,a);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let d,h=new He(c.invert(),l,u),f=i.length-1;(d=i.length&&i[f].merge(h))?i[f]=d:i.push(h)}}else s.map&&r--},this.items.length,0),new ye(Pt.from(i.reverse()),o)}}ye.empty=new ye(Pt.empty,0);class He{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new He(n.getMap().invert(),n,this.selection)}}}class gn{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const dD=20;function Ah(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,s)=>t.push(o,s));return t}function ka(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let La=!1,_h=null;function Ho(e){let t=e.plugins;if(_h!=t){La=!1,_h=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){La=!0;break}}return La}const Wn=new Ms("history"),hD=new Ms("closeHistory");function pD(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ws({key:Wn,state:{init:()=>new gn(ye.empty,ye.empty,null,0,-1),apply:(t,n,r)=>function(i,o,s,a){let l,c=s.getMeta(Wn);if(c)return c.historyState;s.getMeta(hD)&&(i=new gn(i.done,i.undone,null,0,-1));let u=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(u&&u.getMeta(Wn))return u.getMeta(Wn).redo?new gn(i.done.addTransform(s,void 0,a,Ho(o)),i.undone,Ah(s.mapping.maps),i.prevTime,i.prevComposition):new gn(i.done,i.undone.addTransform(s,void 0,a,Ho(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||u&&u.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new gn(i.done.rebased(s,l),i.undone.rebased(s,l),ka(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new gn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),ka(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let d=s.getMeta("composition"),h=i.prevTime==0||!u&&i.prevComposition!=d&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(p,m){if(!m)return!1;if(!p.docChanged)return!0;let E=!1;return p.mapping.maps[0].forEach((A,_)=>{for(let O=0;O<m.length;O+=2)A<=m[O+1]&&_>=m[O]&&(E=!0)}),E}(s,i.prevRanges)),f=u?ka(i.prevRanges,s.mapping):Ah(s.mapping.maps);return new gn(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,Ho(o)),ye.empty,f,s.time,d==null?i.prevComposition:d)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?eE:r=="historyRedo"?nE:null;return!(!i||!t.editable)&&(n.preventDefault(),i(t.state,t.dispatch))}}}})}function tE(e,t){return(n,r)=>{let i=Wn.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let c=Ho(a),u=Wn.get(a).spec.config,d=(l?s.undone:s.done).popEvent(a,c);if(!d)return null;let h=d.selection.resolve(d.transform.doc),f=(l?s.done:s.undone).addTransform(d.transform,a.selection.getBookmark(),u,c),p=new gn(l?f:d.remaining,l?d.remaining:f,null,0,-1);return d.transform.setSelection(h).setMeta(Wn,{redo:l,historyState:p})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const eE=tE(!1,!0),nE=tE(!0,!0),rE=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Zr(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function gh(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Dh(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function Il(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const fD=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof X&&e.selection.node.isBlock)return!(!n.parentOffset||!xo(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof st||e.selection instanceof _e)&&o.deleteSelection();let s=n.depth==0?null:Il(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=xo(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!xo(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let c=o.mapping.map(n.before()),u=o.doc.resolve(c);s&&n.node(-1).canReplaceWith(u.index(),u.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0};function iE(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(d,h,f){let p=h.nodeBefore,m=h.nodeAfter,E=h.index();return!(!(p&&m&&p.type.compatibleContent(m.type))||(!p.content.size&&h.parent.canReplace(E-1,E)?(f&&f(d.tr.delete(h.pos-p.nodeSize,h.pos).scrollIntoView()),0):!h.parent.canReplace(E,E+1)||!m.isTextblock&&!Td(d.doc,h.pos)||(f&&f(d.tr.clearIncompatible(h.pos,p.type,p.contentMatchAt(p.childCount)).join(h.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let d=t.pos+s.nodeSize,h=U.empty;for(let m=r.length-1;m>=0;m--)h=U.from(r[m].create(null,h));h=U.from(o.copy(h));let f=e.tr.step(new me(t.pos-1,d,t.pos,d,new $(h,1,0),r.length,!0)),p=d+2*r.length;Td(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let l=at.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Sc(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Zr(s,"start",!0)&&Zr(o,"end")){let d=o,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let f=s,p=1;for(;!f.isTextblock;f=f.firstChild)p++;if(d.canReplace(d.childCount,d.childCount,f.content)){if(n){let m=U.empty;for(let E=h.length-1;E>=0;E--)m=U.from(h[E].copy(m));n(e.tr.step(new me(t.pos-h.length,t.pos+s.nodeSize,t.pos+p,t.pos+s.nodeSize-p,new $(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function oE(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(st.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const mD=oE(-1),ED=oE(1);function Lc(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let wa=Lc(rE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l}(e,n);if(!r)return!1;let i=gh(r);if(!i){let s=r.blockRange(),a=s&&Sc(s);return a!=null&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&iE(e,i,t))return!0;if(r.parent.content.size==0&&(Zr(o,"end")||X.isSelectable(o))){let s=Tc(e.doc,r.before(),r.after(),$.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Zr(o,"end")?at.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):X.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=gh(r)}let s=o&&o.nodeBefore;return!(!s||!X.isSelectable(s))&&(t&&t(e.tr.setSelection(X.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),Oh=Lc(rE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l}(e,n);if(!r)return!1;let i=Dh(r);if(!i)return!1;let o=i.nodeAfter;if(iE(e,i,t))return!0;if(r.parent.content.size==0&&(Zr(o,"start")||X.isSelectable(o))){let s=Tc(e.doc,r.before(),r.after(),$.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Zr(o,"start")?at.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):X.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=Dh(r)}let s=o&&o.nodeAfter;return!(!s||!X.isSelectable(s))&&(t&&t(e.tr.setSelection(X.create(e.doc,o.pos)).scrollIntoView()),!0)});const sn={Enter:Lc((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText(`
|
|
16
|
+
`).scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof _e||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Il(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(st.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(xo(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Sc(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},fD),"Mod-Enter":(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Il(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(at.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:wa,"Mod-Backspace":wa,"Shift-Backspace":wa,Delete:Oh,"Mod-Delete":Oh,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new _e(e.doc))),!0)},sE={"Ctrl-h":sn.Backspace,"Alt-Backspace":sn["Mod-Backspace"],"Ctrl-d":sn.Delete,"Ctrl-Alt-Backspace":sn["Mod-Delete"],"Alt-Delete":sn["Mod-Delete"],"Alt-d":sn["Mod-Delete"],"Ctrl-a":mD,"Ctrl-e":ED};for(let e in sn)sE[e]=sn[e];const vo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?sE:sn;function wc(e,t){return e.reduce((n,r,i)=>n.concat(t(r,i)),[])}var Mc={};function AD(e){return String.fromCharCode(parseInt(e.slice(1),16))}Object.defineProperty(Mc,"__esModule",{value:!0});var _D=Mc.encode=function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,AD))};function gD(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}Mc.decode=function(e){return decodeURIComponent(Array.from(atob(e),gD).join(""))};const DD=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,OD=e=>e.split(DD).filter(t=>t).map(t=>t[0]).join("")||e[Symbol.iterator]().next().value||"";function aE(e){const t=function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)}(e)%Th.length;return Th[t]}function Fs(e,t){const n=t.lastIndex;let r;const i=[];for(;(r=t.exec(e))!==null;)i.push(r),r[0]===""&&(t.lastIndex+=1);return t.lastIndex=n,i}function Nl(e,t,n){let r=0;const i=[];for(const o of t)o.offset<r||(o.offset>r&&i.push(e.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<e.length&&i.push(e.substring(r)),i}function lE(e){try{return new URL(e).hostname}catch(t){return}}function Ro(e){const t=e.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function Sh(e,t){return e.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function SD(e){return[...e.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>e.substring(n))}const Th=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],Ci=(e,t,n=void 0)=>wc(e,r=>{if(typeof r=="string")return t(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:Ci(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:Ci(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:Ci(r.children,t,r.type)}];case"mention":case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return[r]}});function mn(e,t){return n=>{const r=n;let i=0;const o=[];for(const s of Fs(n,e)){s.index-i>0&&o.push(r.substring(i,s.index));const a=t(s);Array.isArray(a)?o.push(...a):o.push(a),i=s.index+s[0].length}return i<n.length&&o.push(n.substring(i)),o}}function cE(e){return e.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const vh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Cl=(e=>(e[e.italic=1]="italic",e[e.strikethrough=2]="strikethrough",e[e.bold=4]="bold",e))(Cl||{});const TD=[0,1,2,3,4,5,6].map(e=>{const t=[];return 1&e||t.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&e||t.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&e||t.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(t.map(n=>n.source).join("|"),"g")}),vD={_:1,"*":4,"~":2};function RD(e){return uE(e,0)}function uE(e,t=0){const n=TD[t],r=n?function(i){const o=ID.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${vh}])(?:${i.source})(?=[\\s${vh}]|$)`,"g")),s=mn(o,a=>{const l=a[0][1],c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Cl[vD[l]],children:[c]}]});return a=>{const[l,...c]=s(" "+a);return l.length>1&&c.unshift(l.substring(1)),c}}(n):()=>[e];return Ci(r(e),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?uE(i,t|Cl[o]):[i])}const ID=function(){const e=function(){try{return new WeakMap}catch(t){const n={has:()=>!1,get:()=>{},set:()=>n};return n}}();return{getOrCompute(t,n){if(e.has(t))return e.get(t);const r=n();return e.set(t,r),r}}}();var yl=function(e,t){return yl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},yl(e,t)};function ao(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}yl(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var kt=function(){return kt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kt.apply(this,arguments)};var ND=Object.prototype.hasOwnProperty;function Oe(e){return typeof e=="boolean"}function Hn(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function rr(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Io=/\s+/,dE=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){return this.getAttrs()[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n,r=this.getClass(),i=r?r.split(Io):[],o=t.split(Io);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n,r=this.getClass(),i=r?r.split(Io):[],o=t.split(Io);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return["<",t,n=n?" "+n:"",">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var r in t)ND.call(t,r)&&n.push(r+'="'+t[r]+'"');return n.join(" ")},e}();function Rh(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function Ma(e,t,n){var r=t/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=e.substr(o)),e.substr(0,i)+n+s}var CD=function(){function e(t){t===void 0&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new dE({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},r=this.createCssClass(t);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var r=[n],i=t.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var r=n.length,i=n.location;return i==="smart"?function(o,s,a){var l,c;if(a==null?(a="…",c=3,l=8):(c=a.length,l=a.length),o.length<=s)return o;var u=s-c,d=function(_){var O={},S=_,T=S.match(/^([a-z]+):\/\//i);return T&&(O.scheme=T[1],S=S.slice(T[0].length)),(T=S.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(O.host=T[1],S=S.slice(T[0].length)),(T=S.match(/^\/(.*?)(?=(\?|#|$))/i))&&(O.path=T[1],S=S.slice(T[0].length)),(T=S.match(/^\?(.*?)(?=(#|$))/i))&&(O.query=T[1],S=S.slice(T[0].length)),(T=S.match(/^#(.*?)$/i))&&(O.fragment=T[1]),O}(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=Rh(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=Rh(d)),o.length<=s))return o;var f="";if(d.host&&(f+=d.host),f.length>=u)return d.host.length===s?(d.host.substr(0,s-c)+a).substr(0,u+l):Ma(f,u,a).substr(0,u+l);var p="";if(d.path&&(p+="/"+d.path),d.query&&(p+="?"+d.query),p){if((f+p).length>=u)return(f+p).length==s?(f+p).substr(0,s):(f+Ma(p,u-f.length,a)).substr(0,u+l);f+=p}if(d.fragment){var m="#"+d.fragment;if((f+m).length>=u)return(f+m).length==s?(f+m).substr(0,s):(f+Ma(m,u-f.length,a)).substr(0,u+l);f+=m}if(d.scheme&&d.host){var E=d.scheme+"://";if((f+E).length<u)return(E+f).substr(0,s)}if(f.length<=s)return f;var A="";return u>0&&(A=f.substr(-1*Math.floor(u/2))),(f.substr(0,Math.ceil(u/2))+a+A).substr(0,u+l)}(t,r):i==="middle"?function(o,s,a){if(o.length<=s)return o;var l,c;a==null?(a="…",l=8,c=3):(l=a.length,c=a.length);var u=s-c,d="";return u>0&&(d=o.substr(-1*Math.floor(u/2))),(o.substr(0,Math.ceil(u/2))+a+d).substr(0,u+l)}(t,r):function(o,s,a){return function(l,c,u){var d;return l.length>c&&(u==null?(u="…",d=3):d=u.length,l=l.substring(0,c-d)+u),l}(o,s,a)}(t,r)},e}(),lo=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}();function ri(e){return e>=65&&e<=90||e>=97&&e<=122}function Gt(e){return e>=48&&e<=57}function Pc(e){return e==34||e==39}function ur(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function dr(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function hE(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function yD(e){return e<91?e==40:e==91||e==123}function Ih(e){return e<93?e==41:e==93||e==125}var bD=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,pE=/https?:\/\//i,kD=new RegExp("^"+pE.source,"i"),LD=/^(javascript|vbscript):/i,wD=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,MD=/^(?:\/\/)?([^/#?:]+)/,$i=ri;function fE(e){return ri(e)||Gt(e)||e===43||e===45||e===46}var xn=dr;function xc(e){return e===95||xn(e)}function mE(e){return dr(e)||function(t){return t<91?t<47?t>=35&&t<=43||t==45:t<61?t==47:t==61||t==64:t<95?t==91||t==93:t<123?t==95:t>=123&&t<=126||t==10003}(e)||hE(e)}function Fc(e){return e===47||e===63||e===35}function Nh(e){return bD.test(e.toLowerCase())}var PD=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,xD=/[:/?#]/,FD=/^(https?:\/\/)?(?:www\.)?/i,HD=/^\/\//,EE=function(e){function t(n){var r=e.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return ao(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(HD,"")),this.stripPrefix.scheme&&(n=n.replace(kD,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(FD,"$1"):r}(n)),this.stripTrailingSlash&&(n=function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r}(n)),this.decodePercentEncoding&&(n=function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?""":o==="%26"?"&":o==="%27"?"'":o==="%3C"||o==="%3c"?"<":">"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i}(n)),n},t}(lo),UD=/^mailto:/i,AE=dr;function Hc(e){return AE(e)||function(t){return t<47?t<42?t==33||t>=35&&t<=39:t>=42&&t<=43||t==45:t<63?t==47||t==61:t<94?t==63:t>=94&&t<=96||t>=123&&t<=126}(e)}var _E=function(e){function t(n){var r=e.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return ao(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(lo);function gE(e){return e===95||dr(e)}var BD=["twitter","facebook","instagram","tiktok","youtube"],jD=function(e){function t(n){var r=e.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return ao(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:rr(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(lo),$D={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function DE(e){return e===45||e===46||e===95||ri(e)||Gt(e)}var VD=["twitter","instagram","soundcloud","tiktok","youtube"],YD=function(e){function t(n){var r=e.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return ao(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:rr(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(lo),zD=/[-. ()]/,GD=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function OE(e){return e===45||e===46||e===32}function Uc(e){return e===44||e===59}var WD=function(e){function t(n){var r=e.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return ao(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(lo),XD=function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),yh(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),yh(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function Hs(e,t,n){var r=e.charIdx;if(n===35)e.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)e.addMachine(function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}}(r,30));else if(n===47)e.addMachine(bl(r,11));else if(n===43)e.addMachine(Pa(r,37));else if(n===40)e.addMachine(Pa(r,32));else{if(Gt(n)&&(e.addMachine(Pa(r,38)),e.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),AE(n)){var i=t.toLowerCase()==="m"?15:22;e.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}$i(n)&&e.addMachine(Us(r,0)),dr(n)&&e.addMachine(bl(r,5))}}function KD(e,t,n){n===58?t.state=2:n===45?t.state=1:fE(n)||e.removeMachine(t)}function qD(e,t,n){var r=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(bl(r,11))):fE(n)?t.state=0:e.removeMachine(t))}function JD(e,t,n){var r=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):xn(n)?(t.state=5,$i(n)&&e.addMachine(Us(r,0))):e.removeMachine(t)}function ZD(e,t,n){n===47?t.state=4:mE(n)?(t.state=10,t.acceptStateReached=!0):_t(e,t)}function QD(e,t,n,r){r===47?(t.state=10,t.acceptStateReached=!0):xn(r)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function tO(e,t,n){n===47?t.state=12:e.removeMachine(t)}function eO(e,t,n){xn(n)?t.state=5:e.removeMachine(t)}function nO(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:Fc(n)?t.state=10:xc(n)||_t(e,t)}function rO(e,t,n,r){r===45||(r===46?_t(e,t):xn(r)?t.state=5:_t(e,t))}function iO(e,t,n,r){r===46?_t(e,t):xn(r)?(t.state=5,t.acceptStateReached=!0):_t(e,t)}function oO(e,t,n){n===46?t.state=14:n===58?t.state=8:Gt(n)||(Fc(n)?t.state=10:dr(n)?e.removeMachine(t):_t(e,t))}function sO(e,t,n){Gt(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):_t(e,t)}function aO(e,t,n){Gt(n)?t.state=9:_t(e,t)}function lO(e,t,n){Gt(n)||(Fc(n)?t.state=10:_t(e,t))}function cO(e,t,n){mE(n)||_t(e,t)}function uO(e,t,n,r){n.toLowerCase()==="a"?t.state=16:hr(e,t,r)}function dO(e,t,n,r){n.toLowerCase()==="i"?t.state=17:hr(e,t,r)}function hO(e,t,n,r){n.toLowerCase()==="l"?t.state=18:hr(e,t,r)}function pO(e,t,n,r){n.toLowerCase()==="t"?t.state=19:hr(e,t,r)}function fO(e,t,n,r){n.toLowerCase()==="o"?t.state=20:hr(e,t,r)}function mO(e,t,n){n===58?t.state=21:hr(e,t,n)}function EO(e,t,n){Hc(n)?t.state=22:e.removeMachine(t)}function hr(e,t,n){n===46?t.state=23:n===64?t.state=24:Hc(n)?t.state=22:e.removeMachine(t)}function AO(e,t,n){n===46||n===64?e.removeMachine(t):Hc(n)?t.state=22:e.removeMachine(t)}function _O(e,t,n){xn(n)?t.state=25:e.removeMachine(t)}function gO(e,t,n){n===46?t.state=27:n===45?t.state=26:xc(n)||_t(e,t)}function DO(e,t,n){n===45||n===46?_t(e,t):xc(n)?t.state=25:_t(e,t)}function OO(e,t,n){n===46||n===45?_t(e,t):xn(n)?(t.state=25,t.acceptStateReached=!0):_t(e,t)}function SO(e,t,n){gE(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function TO(e,t,n){gE(n)||_t(e,t)}function vO(e,t,n){DE(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function RO(e,t,n){DE(n)||(dr(n)?e.removeMachine(t):_t(e,t))}function IO(e,t,n,r){Gt(r)?t.state=38:(e.removeMachine(t),Hs(e,n,r))}function NO(e,t,n,r){Gt(r)?t.state=33:e.removeMachine(t),Hs(e,n,r)}function CO(e,t,n){Gt(n)?t.state=34:e.removeMachine(t)}function yO(e,t,n){Gt(n)?t.state=35:e.removeMachine(t)}function bO(e,t,n){n===41?t.state=36:e.removeMachine(t)}function kO(e,t,n,r){Gt(r)?t.state=38:OE(r)?t.state=39:e.removeMachine(t)}function LO(e,t,n,r){var i=e.charIdx;t.acceptStateReached=!0,Uc(r)?t.state=40:r===35?t.state=41:Gt(r)||(r===40?t.state=32:OE(r)?t.state=39:(_t(e,t),$i(r)&&e.addMachine(Us(i,0))))}function wO(e,t,n,r){Gt(r)?t.state=38:r===40?t.state=32:(_t(e,t),Hs(e,n,r))}function MO(e,t,n){Uc(n)||(n===35?t.state=41:Gt(n)?t.state=38:_t(e,t))}function PO(e,t,n){Uc(n)?t.state=40:Gt(n)?e.removeMachine(t):_t(e,t)}function _t(e,t){var n=e.matches,r=e.text,i=e.charIdx,o=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,l=e.decodePercentEncoding,c=e.hashtagServiceName,u=e.mentionServiceName;if(e.removeMachine(t),t.acceptStateReached){var d,h,f=t.startIdx,p=r.slice(t.startIdx,i);switch(p=function(A){for(var _={"(":0,"{":0,"[":0},O=0;O<A.length;O++){var S=A.charAt(O);yD(b=A.charCodeAt(O))?_[S]++:Ih(b)&&_[Ch[S]]--}for(var T=A.length-1;T>=0;){var b;if(S=A.charAt(T),Ih(b=A.charCodeAt(T))){var v=Ch[S];if(!(_[v]<0))break;_[v]++,T--}else{if(!hE(b))break;T--}}return A.slice(0,T+1)}(p),t.type){case 0:if(r.charCodeAt(t.startIdx-1)===64)return;switch(t.matchType){case 0:var m=pE.exec(p);if(m&&(f+=m.index,p=p.slice(m.index)),!function(A){if(LD.test(A))return!1;var _=A.match(wD);if(!_)return!1;var O=!!_[1],S=_[2];return!!O||!(S.indexOf(".")===-1||!/[A-Za-z]/.test(S))}(p))return;break;case 1:if(!function(A){var _=A.match(MD);if(!_)return!1;var O=_[0].split(".");return!(O.length<2||!Nh(O[O.length-1]))}(p))return;break;case 2:if(h=p.split(xD,1)[0],!PD.test(h))return;break;default:rr(t)}n.push(new EE({tagBuilder:o,matchedText:p,offset:f,urlMatchType:xO(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:Nh(p.split(".").pop())&&n.push(new _E({tagBuilder:o,matchedText:p,offset:f,email:p.replace(UD,"")}));break;case 2:p.length<=140&&n.push(new jD({tagBuilder:o,matchedText:p,offset:f,serviceName:c,hashtag:p.slice(1)}));break;case 3:(function(A,_){return $D[_].test(A)})(p,u)&&n.push(new YD({tagBuilder:o,matchedText:p,offset:f,serviceName:u,mention:p.slice(1)}));break;case 4:if(p=p.replace(/ +$/g,""),((d=p).charAt(0)==="+"||zD.test(d))&&GD.test(d)){var E=p.replace(/[^0-9,;#]/g,"");n.push(new WD({tagBuilder:o,matchedText:p,offset:f,number:E,plusSign:p.charAt(0)==="+"}))}break;default:rr(t)}}}function xO(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:rr(e)}}var Ch={")":"(","}":"{","]":"["};function Us(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function bl(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function Pa(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function yh(e){return e.type===0&&e.matchType===0}var ze=function(e){e===void 0&&(e={}),this.idx=e.idx!==void 0?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing},Bc=new ze,FO=function(e,t){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Bc,this.html=e,this.callbacks=t};function HO(e,t){t==="<"&&Je(e)}function UO(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new ze(kt(kt({},e.currentTag),{isClosing:!0}))):t==="<"?Je(e):ri(n)?(e.state=3,e.currentTag=new ze(kt(kt({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=Bc)}function BO(e,t,n){ur(n)?(e.currentTag=new ze(kt(kt({},e.currentTag),{name:xa(e)})),e.state=4):t==="<"?Je(e):t==="/"?(e.currentTag=new ze(kt(kt({},e.currentTag),{name:xa(e)})),e.state=12):t===">"?(e.currentTag=new ze(kt(kt({},e.currentTag),{name:xa(e)})),Ze(e)):ri(n)||Gt(n)||t===":"||Ce(e)}function jO(e,t,n){t===">"?Ce(e):ri(n)?e.state=3:Ce(e)}function $O(e,t,n){ur(n)||(t==="/"?e.state=12:t===">"?Ze(e):t==="<"?Je(e):t==="="||Pc(n)||function(r){return r>=0&&r<=31||r==127}(n)?Ce(e):e.state=5)}function VO(e,t,n){ur(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Ze(e):t==="<"?Je(e):Pc(n)&&Ce(e)}function YO(e,t,n){ur(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Ze(e):t==="<"?Je(e):Pc(n)?Ce(e):e.state=5)}function zO(e,t,n){ur(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?Ce(e):t==="<"?Je(e):e.state=10)}function GO(e,t){t==='"'&&(e.state=11)}function WO(e,t){t==="'"&&(e.state=11)}function XO(e,t,n){ur(n)?e.state=4:t===">"?Ze(e):t==="<"&&Je(e)}function KO(e,t,n){ur(n)?e.state=4:t==="/"?e.state=12:t===">"?Ze(e):t==="<"?Je(e):(e.state=4,function(r){r.charIdx--}(e))}function qO(e,t){t===">"?(e.currentTag=new ze(kt(kt({},e.currentTag),{isClosing:!0})),Ze(e)):Ce(e)}function JO(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new ze(kt(kt({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new ze(kt(kt({},e.currentTag),{type:"doctype"})),e.state=20):Ce(e)}function ZO(e,t){t==="-"?e.state=15:t===">"?Ce(e):e.state=16}function QO(e,t){t==="-"?e.state=18:t===">"?Ce(e):e.state=16}function tS(e,t){t==="-"&&(e.state=17)}function eS(e,t){e.state=t==="-"?18:16}function nS(e,t){t===">"?Ze(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function rS(e,t){t==="-"?e.state=17:t===">"?Ze(e):e.state=16}function iS(e,t){t===">"?Ze(e):t==="<"&&Je(e)}function Ce(e){e.state=0,e.currentTag=Bc}function Je(e){e.state=1,e.currentTag=new ze({idx:e.charIdx})}function Ze(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),Ce(e),e.currentDataIdx=e.charIdx+1}function xa(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}var oS=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=function(o){return o==null&&(o=!0),Oe(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!Oe(o.schemeMatches)||o.schemeMatches,tldMatches:!Oe(o.tldMatches)||o.tldMatches,ipV4Matches:!Oe(o.ipV4Matches)||o.ipV4Matches}}(t.urls),this.email=Oe(t.email)?t.email:this.email,this.phone=Oe(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=Oe(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),Oe(o)?{scheme:o,www:o}:{scheme:!Oe(o.scheme)||o.scheme,www:!Oe(o.www)||o.www}}(t.stripPrefix),this.stripTrailingSlash=Oe(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Oe(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&VD.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&BD.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=t.truncate)=="number"?{length:r,location:"end"}:kt({length:Number.POSITIVE_INFINITY,location:"end"},r),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){return new e(n).link(t)},e.parse=function(t,n){return new e(n).parse(t)},e.prototype.parse=function(t){var n=this,r=["a","style","script"],i=0,o=[];return function(s,a){for(var l=new FO(s,a),c=s.length;l.charIdx<c;){var u=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:HO(l,u);break;case 1:UO(l,u,d);break;case 2:jO(l,u,d);break;case 3:BO(l,u,d);break;case 4:$O(l,u,d);break;case 5:VO(l,u,d);break;case 6:YO(l,u,d);break;case 7:zO(l,u,d);break;case 8:GO(l,u);break;case 9:WO(l,u);break;case 10:XO(l,u,d);break;case 11:KO(l,u,d);break;case 12:qO(l,u);break;case 13:JO(l);break;case 14:ZO(l,u);break;case 15:QO(l,u);break;case 16:tS(l,u);break;case 17:eS(l,u);break;case 18:nS(l,u);break;case 19:rS(l,u);break;case 20:iS(l,u);break;default:rr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&function(h){var f=h.html.slice(h.currentDataIdx,h.charIdx);h.callbacks.onText(f,h.currentDataIdx),h.currentDataIdx=h.charIdx+1}(l)}(t,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/( | |<|<|>|>|"|"|')/gi),c=a;l.forEach(function(u,d){if(d%2==0){var h=n.parseText(u,c);o.push.apply(o,function(f,p,m){if(m||arguments.length===2)for(var E,A=0,_=p.length;A<_;A++)!E&&A in p||(E||(E=Array.prototype.slice.call(p,0,A)),E[A]=p[A]);return f.concat(E||Array.prototype.slice.call(p))}([],function(f,p){var m=typeof Symbol=="function"&&f[Symbol.iterator];if(!m)return f;var E,A,_=m.call(f),O=[];try{for(;(p===void 0||p-- >0)&&!(E=_.next()).done;)O.push(E.value)}catch(S){A={error:S}}finally{try{E&&!E.done&&(m=_.return)&&m.call(_)}finally{if(A)throw A.error}}return O}(h),!1))}c+=u.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},e.prototype.compactMatches=function(t){t.sort(sS);for(var n=0;n<t.length-1;){var r=t[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===i){var s=t[n+1].getMatchedText().length>o?n:n+1;t.splice(s,1)}else n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||Hn(t,function(n){return n.getType()==="hashtag"}),this.email||Hn(t,function(n){return n.getType()==="email"}),this.phone||Hn(t,function(n){return n.getType()==="phone"}),this.mention||Hn(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Hn(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Hn(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Hn(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var r=function(s,a){for(var l=new XD(s,a);l.charIdx<l.text.length;l.charIdx++){var c=s.charAt(l.charIdx),u=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Hs(l,c,u);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:tO(l,h,u);break;case 12:eO(l,h,u);break;case 0:KD(l,h,u);break;case 1:qD(l,h,u);break;case 2:JD(l,h,u);break;case 3:ZD(l,h,u);break;case 4:QD(l,h,0,u);break;case 5:nO(l,h,u);break;case 6:rO(l,h,0,u);break;case 7:iO(l,h,0,u);break;case 13:oO(l,h,u);break;case 14:sO(l,h,u);break;case 8:aO(l,h,u);break;case 9:lO(l,h,u);break;case 10:cO(l,h,u);break;case 15:uO(l,h,c,u);break;case 16:dO(l,h,c,u);break;case 17:hO(l,h,c,u);break;case 18:pO(l,h,c,u);break;case 19:fO(l,h,c,u);break;case 20:mO(l,h,u);break;case 21:EO(l,h,u);break;case 22:hr(l,h,u);break;case 23:AO(l,h,u);break;case 24:_O(l,h,u);break;case 25:gO(l,h,u);break;case 26:DO(l,h,u);break;case 27:OO(l,h,u);break;case 28:SO(l,h,u);break;case 29:TO(l,h,u);break;case 30:vO(l,h,u);break;case 31:RO(l,h,u);break;case 32:NO(l,h,c,u);break;case 33:CO(l,h,u);break;case 34:yO(l,h,u);break;case 35:bO(l,h,u);break;case 36:kO(l,h,0,u);break;case 37:IO(l,h,c,u);break;case 38:LO(l,h,0,u);break;case 39:wO(l,h,c,u);break;case 40:MO(l,h,u);break;case 41:PO(l,h,u);break;default:rr(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&$i(u)){var f=l.text.charCodeAt(l.charIdx-1);$i(f)||l.addMachine(Us(l.charIdx,0))}}}for(var p=l.stateMachines.length-1;p>=0;p--)l.stateMachines.forEach(function(m){return _t(l,m)});return l.matches}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[o];r.push(t.substring(i,a.getOffset())),r.push(this.createMatchReturnVal(a)),i=a.getOffset()+a.getMatchedText().length}return r.push(t.substring(i)),r.join("")},e.prototype.createMatchReturnVal=function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string"?n:n===!1?t.getMatchedText():n instanceof dE?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new CD({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.1.5",e}();function sS(e,t){return e.getOffset()-t.getOffset()}function SE(e,t=e){return{type:"autolink",url:e,text:t}}const aS=()=>mn(/```([^]+?)```/g,([e,t])=>({type:"codespan",text:cE(t)})),lS=mn(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([e,t,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),n)),cS=mn(/<!!customemoji:(.*?)>/gm,([e,t])=>function(n){return{type:"customemoji",text:n}}(t)),TE=mn(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([e,t,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[n])),uS=mn(/<actionlink:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=vE(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),dS=mn(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=vE(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function vE(e){const t=e.indexOf("?");return t===-1?{action:e,params:{}}:{action:e.slice(0,t),params:Object.fromEntries(new URLSearchParams(e.slice(t)))}}const hS=mn(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([e])=>function(t=[]){return{type:"bulletlist",children:t}}([e.startsWith(`
|
|
17
|
+
`)?e.slice(1):e])),pS=mn(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([e,t])=>({type:"bulletpoint",children:[t]})),RE=e=>{const t=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;let n=0;const r=[];for(const i of Fs(e,t)){const o=i[0],s=i[1],a=o.startsWith(s)?i.index:i.index+1;a-n>0&&r.push(e.substring(n,a));const l=SE("tel:"+s.replace(/[^0-9+]/g,""),s);r.push(l),n=a+s.length}return n<e.length&&r.push(e.substring(n)),r},IE=e=>TE(e).flatMap(t=>typeof t=="string"?Fa(t):["<",...Fa(t.url),...Fa("|"+t.children[0]+">")]),Fa=e=>{const t=oS.parse(e,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of t){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof _E?l="mailto:"+i.getEmail():i instanceof EE&&(l=i.getUrl()),o>r&&n.push(e.substring(r,o)),n.push(SE(l,s)),r=o+a}return r<e.length&&n.push(e.substring(r)),n},fS=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],mS=function(e){const t=RegExp(`[^${e}]+${e}?|${e}`,"g");return n=>Array.from(n.match(t)||[])}(`
|
|
18
|
+
`);function NE(e,t={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:fS.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(hS,pS),s.includes("Mention")||o.singlelineSteps.push(lS),s.includes("CustomEmoji")||o.singlelineSteps.push(cS),s.includes("Codespan")||o.multilineSteps.push(aS()),s.includes("FormattedLink")||o.singlelineSteps.push(TE),s.includes("Actions")||(o.singlelineSteps.push(uS),o.singlelineSteps.push(dS)),s.includes("Wikitext")||o.singlelineSteps.push(RD),s.includes("Autolink")||o.singlelineSteps.push(IE,RE),o}(t);let r=CE(e,n);return r=yE(r,!1),r}function CE(e,t){let n=[e];return n=Ha(n,t.multilineSteps),n=Ha(n,[mS]),n=Ha(n,t.singlelineSteps),n=jc(n),n}function Ha(e,t){return t.reduce((n,r)=>Ci(n,r),e)}function jc(e){const t=[];let n=-1;for(const r of e)typeof r=="string"?typeof t[n]=="string"?t[n]+=r:t[++n]=r:t[++n]="children"in r?{...r,children:jc(r.children)}:r;return t}function yE(e,t){const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=yE(o.children,t||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&t?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function ES(){let e,t=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(e),e=void 0,t=o,n.isDestroyed)return;const s=function(a){a=a.removeMark(0,a.doc.content.size,Lt.marks.bold),a=a.removeMark(0,a.doc.content.size,Lt.marks.italic),a=a.removeMark(0,a.doc.content.size,Lt.marks.strikethrough),a.doc.firstChild;const l=function(c){const u=[];let d,h="";return c.descendants((f,p)=>(f.isText?(h+=f.text,d!=null||(d=p)):h&&d!==void 0&&(u.push({text:h,pos:d}),h="",d=void 0),f.type!==Lt.nodes.mention)),h&&d!==void 0&&u.push({text:h,pos:d}),u}(a.doc);for(const{text:c,pos:u}of l){const d=NE(c,{only:["Wikitext"]});[a]=bE(a,u,d)}return a}(n.state.tr);n.dispatch(s)},i=Date.now();i-t<300?e||(e=window.setTimeout(r,300)):r(i)}}function bE(e,t,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)e.addMark(t+r,t+r+o.length,s.create());r+=o.length}else if(o.type==="bold"||o.type==="italic"||o.type==="strikethrough"){r+=1;const s=Lt.marks[o.type],a=[...i,s];[e,r]=bE(e,t,o.children,r,a),r+=1}else ft.unreachable();return[e,r]}function bh(e){return(t,n)=>{if(!n)return!0;let r=t.tr;const i=st.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Lt.text(e,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Lt.text(e,r.storedMarks)),r=r.setSelection(st.near(r.doc.resolve(i.to+1))),n(r),!0}}function AS(e,t,n){const r=t.clipboardData;if(!r)return!1;const i=function(o){const s=o.items||[],a={"image/gif":"gif","image/png":"png","image/jpeg":"jpg","image/svg+xml":"svg"},l=Array.from(s).filter(d=>d.kind==="file"&&a[d.type]);if(l.length===0||o.types.includes("text/rtf"))return;const c=l[0];let u=c.getAsFile();if(!u.name){const d="image."+a[c.type];u=new File([u],d,{type:c.type,lastModified:Date.now()})}return u}(r);return i?n(i):function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)}(e,r.getData("text/plain")),!0}function _S(e,{allowSpaces:t=!1}){return n=>{const r=new RegExp(`\\s${e}$`),i=t?new RegExp(`${e}.*?(?=\\s${e}|$)`,"g"):new RegExp(`(?:^)?${e}[^\\s${e}]*`,"g"),o=n.before(),s=n.end(),a=n.doc.textBetween(o,s,"\0","\0");let l;for(;l=i.exec(a);){const c=l.input.slice(Math.max(0,l.index-1),l.index);if(!/^[\s\0]?$/.test(c))continue;const u=l.index+n.start();let d=u+l[0].length;if(t&&r.test(a.slice(d-1,d+1))&&(l[0]+=" ",d++),u<n.pos&&d>=n.pos)return{range:{from:u,to:d},text:l[0]}}}}function kh({matcher:e=_S("#"),suggestionClass:t="ProseMirror-suggestion",onEnter:n=()=>!1,onChange:r=()=>!1,onExit:i=()=>!1,onKeyDown:o=()=>!1,debug:s=!1}){return new ws({key:new Ms("suggestions"),view(){return{update:(a,l)=>{const c=this.key.getState(l),u=this.key.getState(a.state),d=c.active&&u.active&&c.range.from!==u.range.from,h=!c.active&&u.active,f=c.active&&!u.active,p=!h&&!f&&c.text!==u.text;(f||d)&&i({view:a,range:c.range,text:c.text}),p&&!d&&r({view:a,range:u.range,text:u.text}),(h||d)&&n({view:a,range:u.range,text:u.text})}}},state:{init:()=>({active:!1,range:{},text:null}),apply(a,l){const{selection:c}=a,u={...l};if(c.from===c.to){(c.from<l.range.from||c.from>l.range.to)&&(u.active=!1);const d=c.$from,h=e(d);h?(u.active=!0,u.range=h.range,u.text=h.text):u.active=!1}else u.active=!1;return u.active||(u.range={},u.text=null),u}},props:{handleKeyDown(a,l){const{active:c}=this.getState(a.state);return!!c&&o({view:a,event:l})},decorations(a){const{active:l,range:c}=this.getState(a);return l?Nt.create(a.doc,[Ee.inline(c.from,c.to,{nodeName:"span",class:t,style:s?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":null})]):null}}})}function kE({placeholder:e,disabled:t,className:n="",characterLimit:r,spellcheck:i}){const o=no(),s=Z(),a=Z(null);return G(()=>(s.current=function(l,c,u,d,h){const f=Rr.create({schema:Lt,plugins:[...h.filter(gS),pD(),Eh({...vo,"Mod-z":eE,"Mod-y":nE,"Mod-b":bh("*"),"Mod-i":bh("_"),"Mod-Enter":vo.Enter,"Shift-Enter":vo.Enter,Enter:u}),Eh({Enter:vo.Enter}),mh]}),p=ES(),m=new Jm(l,{handlePaste:(E,A,_)=>AS(E,A,d),clipboardTextSerializer(E){const A=[];return E.content.forEach(_=>{_&&A.push(cE(_.textContent))}),A.join()},state:f,dispatchTransaction(E){E=(E=E.removeStoredMark(Lt.marks.literal)).removeStoredMark(Lt.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||c(new us(A.doc)),m.updateState(A),E.steps.some(_=>_ instanceof Vt)&&p(m)}});return m}(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),G(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),G(()=>Yr(()=>{var l,c,u;return(u=s.current)==null?void 0:u.setProps({attributes:{spellcheck:String((c=(l=o.spellcheck$.get())!=null?l:i)!=null?c:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),G(()=>Yr(()=>{var c;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(mh,(c=o.placeholder$.get())!=null?c:e))}),[o,e]),G(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),y("div",{className:`t-editor ${n}`,ref:a})}function Lh(e){if(e.startsWith(":"))throw new Error("Not implemented");{const t=Lt.marks.emoji.create({emoji:e});return Lt.text(e,[t])}}function wh(e,t){const n=encodeURIComponent(e);return Lt.nodes.mention.create({id:e,name:t},Lt.text(`<!!mention:${n}|${t}>`))}const Ss=class Ss{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=Zm(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(t){let n=!1;return t.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};Ss.EMPTY=new Ss(Lt.topNodeType.create());let us=Ss;function gS(e){return e!=null}const Mh=(e,t)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(e);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,t.marks.literal))return{range:{from:s,to:a},text:o}},DS=/(^|\s)(:[^:\s]+:?)$/,OS=/(^|\s)(@[^@]*)$/;class LE{constructor(t,n,r){this.state$=t,this.device$=n,this.userPermissions$=r,this.currentDoc=us.EMPTY,this.maxLength=1e4,this.markAsTyping=function(i,o){let s=!1;return(...a)=>{if(!s)return s=!0,setTimeout(()=>{s=!1},o),i(...a)}}(()=>{var i;(i=this.controller)==null||i.markAsTyping()},5e3),this._suggesterKeydownHandlers={emoji:void 0,mention:void 0},this.toggleEmojiPicker=i=>{const o=this.state$.showEmojiPicker;i!=null||(i=!o.peek()),o.set(i),i===!1&&this.focus()},this.spellcheck$=It(),this.placeholder$=It()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return kh({debug:!1,matcher:Mh(DS,Lt),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,t.key))!=null?i:!1}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(ft.defined(t),t.canMention)return kh({debug:!1,matcher:Mh(OS,Lt),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){ft.defined(this._suggestionRange),function(t,n){const{from:r,to:i}=n,o=t.state.tr.addMark(r,i,Lt.marks.literal.create());t.dispatch(o)}(this.editorView,this._suggestionRange)}listenKeydown(t,n){this._suggesterKeydownHandlers[t]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,n){t.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,n){t.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){ft.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var r;this.currentDoc=t;const n=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({isTyping:t.hasContent,atTextLimit:n,isEmpty:!t.hasNonWhitespaceContent(),characterCount:t.size===0?0:t.size-2}),(r=this.controller)==null||r.storeDraft(()=>t.asText())}setMaxLength(t){this.maxLength=t}focus({skipProseMirrorStuff:t}={skipProseMirrorStuff:!1}){var n,r;t?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(t){this.editorView&&function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,c,u]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&c&&u)return wh(c,u);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?Lh(h):Lt.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)}(this.editorView,t)}typeText(t){this.editorView&&function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const n=t.state.doc.content.size,r=t.state.tr.insertText("",0,n);t.dispatch(r)}(this.editorView)}selectEmoji(t){ft.defined(this.editorView),function(n,r,i){const o=Lh(r);if(i){const{from:a,to:l}=i,c=n.state.tr.deleteRange(a,l);n.dispatch(c)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){ft.defined(this.editorView),function(n,r,i){const o=wh(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}}const SS=Symbol("no_render");function he(e){const t=Ie(!1),n=Z({_value:typeof e=="function"?e():e.peek(),get value(){return setTimeout(()=>{t.set(!0)}),n.current._value},set value(r){n.current._value=r}});return it(()=>{if(!t.get())return SS;const r=typeof e=="function"?e():e.get();return n.current.value=r,r}),n.current}function En(){const e=ro(),t=ct(),n=qf(),r=ce(),i=he(t.app$.appMetadata),o=he(t.currentUser$),s=he(t.state$.currentConversation),a=he(t.t$),l=he(t.device$),c=he(t.themeCustom$),u=he(()=>t.state$.typing.child(t.state$.extCurrentConversationId.get()).get()),d=he(()=>t.state$.participants.child(t.state$.extCurrentConversationId.get()).get());return Q(()=>({session:e,store:t,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get t(){return a.value},get device(){return l.value},get themeCustom(){return c.value.value},get typing(){return u.value},get participants(){return d.value}}),[i,n,s,o,l,t,a,r,c,u,d,e])}function wE(){const e=ro(),t=ct(),n=ce(),r=qf(),i=he(t.app$.appMetadata),o=he(t.currentUser$),s=he(t.t$),a=he(t.device$),l=he(t.themeCustom$);return Q(()=>({session:e,store:t,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,e,t,s,n,l])}const TS=(()=>{if(typeof window!="undefined"){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(t){return t instanceof DOMException&&(t.code===22||t.code===1014||t.name==="QuotaExceededError"||t.name==="NS_ERROR_DOM_QUOTA_REACHED")&&e&&e.length!==0}}return!1})(),Zt={};TS?(Zt.setItem=window.localStorage.setItem.bind(window.localStorage),Zt.getItem=window.localStorage.getItem.bind(window.localStorage),Zt.removeItem=window.localStorage.removeItem.bind(window.localStorage),Zt.isSupported=!0):(Zt.setItem=function(){},Zt.getItem=function(){return null},Zt.removeItem=function(){},Zt.isSupported=!1),Zt.set=(e,t)=>Zt.setItem(e,JSON.stringify(t)),Zt.get=e=>JSON.parse(Zt.getItem(e)||"null");const kl="talkjs_drafts",vS=function(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}(200,(e,t,n,r)=>{const i=ME(e,t,n),o=JSON.parse(Zt.getItem(kl)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,Zt.setItem(kl,JSON.stringify(o))}),ME=(e,t,n)=>`draft_${e}_${t}_${n}`;function PE(e){const t=ce(),n=ct(),r=En(),i=it(n.referencedMessage$),o=it(n.state$.userPermissions),s=no(),{sendMessage:a}=Z_(),l=it(Ie(()=>{const u=s.state$.get();return e.editMessageId===void 0?new ad(u,a,e.attachFile,e.shareLocation,s.toggleEmojiPicker):new ad(u,e.onEditMessage,()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,e.attachFile,e.editMessageId,e.onEditMessage,e.shareLocation,a])),c=tt(u=>s.setText(u),[s]);return function({appId:u,conversationId:d,meId:h,setText:f,enabled:p}){const m=Q(()=>ME(d,h,u),[u,d,h]);G(()=>{var A;if(!m||!p)return;const E=(A=JSON.parse(Zt.getItem(kl)||"{}")[m])!=null?A:"";f(E)},[m,p,f])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:c,enabled:!e.editMessageId}),y(Jf.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:u=>s.selectEmoji(u)},children:y(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:l,editMessageId:e.editMessageId})})}function RS({message:e}){const t=ct(),n=io(),r=it(t.state$.editingMessageId),i=Q(()=>Fe(e.content[0].children),[e]),o=Ie({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=Q(()=>new LE(o,t.device$,t.state$.userPermissions),[o,t]),a=tt(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const c=s.getText();c&&await n.editMessage(e.id,{text:c}),t.state$.editingMessageId.set(null)},[t,n,s,e.id]);return G(()=>{s.onEnter=a},[s,a]),G(()=>{s.focus(),s.setText(Fe(e.content[0].children,!0))},[s,e]),y(zf.Provider,{value:s,children:y(PE,{editMessageId:r,onEditMessage:a})})}function IS(){const e=ce(),t=En();return y(e.MessageListFooter,{common:t})}function NS(e){const t=ce(),n=En();return y(t.MessageDivider,{common:n,...e})}function CS({message:e}){const t=ce(),n=ct(),r=En(),[i,o]=ot("sent");return Kr(s=>{if(e.id.startsWith("ephemeral-"))return o("sending");const a=n.state$.currentConversation.everyoneReadUntil.get();return a!==void 0?e.createdAt<=a?o("everyoneRead"):o("sent"):void 0}),y(t.Message,{common:r,message:e,messageStatus:i,permissions:n.messagePermissions$(e).get()})}function yS(){const e=ce(),t=En();return y(e.BeforeMessages,{common:t})}function bS(){const e=ce(),t=En();return y(e.AfterMessages,{common:t})}function kS({extConversationId:e}){const t=ro(),n=ct(),r=io(),i=Z(!0),o=Z(null);ge(()=>{i.current=o.current.scrollTop>-30}),G(()=>{i.current&&(o.current.scrollTop=0)}),G(()=>{const c=new IntersectionObserver(u=>n.state$.visibility.isInView.set(u[0].isIntersecting),{threshold:.9});return c.observe(o.current),()=>c.disconnect()},[n]),G(()=>{const c=()=>n.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[n]);const[s,a]=ot(!1);G(()=>{a(!1);const c=n.state$.currentConversation.peek();(c==null?void 0:c.isUnread)===!0&&t.conversation(e).markAsRead().catch(u=>{Zo.warn("Could not mark conversation as read",u)})},[e,t,n]),Kr(c=>{if(!o.current)return;const u=n.state$.currentConversation.get(),d=!(!u||!u.isUnread),h=u==null?void 0:u.unreadMessageCount;if(d&&h===0)return void a(!0);if(d&&s)return;if(!d)return void a(!1);const f=n.state$.visibility.tabFocused.get(),p=n.state$.visibility.isInView.get(),m=function(E){if(E.checkVisibility)return E.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const A=window.getComputedStyle(E),_=A.visibility,O=A.opacity;return!(E.getClientRects().length===0||_==="hidden"||O==="0")}}(o.current);return f&&p&&m?t.conversation(u.id).markAsRead():void 0});const l=tt(c=>{const u=c.currentTarget;u.scrollHeight-u.clientHeight+u.scrollTop<90&&n.messageSubscription&&n.messageSubscription.loadMore(10)},[n.messageSubscription]);return y("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:l,children:[y(bS,{}),y(ul,{each:n.chatItems$,children:c=>y("div",{className:"t-message-group",children:y(ul,{each:c,item:LS,itemProps:{controller:r,extConversationId:e}})})}),y(yS,{})]})}function LS({item$:e}){const t=ct(),n=it(e),r=it(t.state$.editingMessageId);return n instanceof dl?y(NS,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?y(RS,{message:n}):y(CS,{message:n})}function ds(e){return y(ct()instanceof nm?wS:MS,{...e})}function wS(e){const t=ce(),n=En();return y(t.Icon,{common:n,...e})}function MS(e){const t=ce(),n=wE();return y(t.Icon,{common:n,...e})}function $c(){return y(ds,{type:"spinner","aria-label":it(ct().t$).LOADING,className:"t-loading-icon"})}const PS=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function Bs({appId:e,chatboxState:t}){const n=e.charAt(0)==="t"||PS.has(e);return G(()=>{switch(t.type){case"auth-failed":je.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":je.error(`User \`${t.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);break;case"unexpected-error":je.error(t.error);break;case"wrong-app-id":je.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:ft.never(t)}},[t]),y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",children:"Something went wrong."}),y("p",{children:"Please reload the page and try again."}),y("p",n?{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",y("br",{}),y("small",{children:"This message only shows up in test mode."})]}:{className:"text-balance",children:"If things keep not working, do not hesitate to get in touch with us."})]})}function xS(){return y("div",{className:"t-panel t-error-panel",children:y("span",{className:"t-heading",style:{fontStyle:"italic"},children:it(ct().t$).CHAT_NOT_FOUND})})}function xE(){return y("div",{className:"t-panel t-loading-panel",children:y($c,{})})}function FE(){const e=it(ct().t$);return y("div",{className:"t-panel t-error-panel",children:[y("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.AUTH_EXPIRED_OVERLAY_TITLE}),y("p",{children:e.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const FS=()=>!0;async function Vc(e,t,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=FS}){return t().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${e}. Error: ${JSON.stringify(s)}.`),e===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),c=l*(1-(u=.05)+2*Math.random()*u);var u,d;return(d=c,d<=0?Promise.resolve():new Promise(h=>setTimeout(h,d))).then(()=>Vc(e-1,t,{initialDelay:c/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Vi(){const e={},t=new Promise(function(n,r){e.resolve=n,e.reject=r});return e.promise=t,e}function HS(e,t,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=cr(Gf);return tt(async()=>{function o(u){u==="denied"&&i({type:e})}if(!r||!await async function(u){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:u})).state==="prompt"}catch(d){return!1}}(e))return t(u=>{o(u)});const s=Vi(),a=Vi(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(u){je.error("Your beforeBrowserPermissionPrompt callback threw an error: ",u),a.resolve({cancelled:!0})}const{cancelled:c}=await a.promise;return c?void 0:t(u=>{s.resolve(u),o(u)})},[r,i,e,t,...n])}function US({onClose:e}){const t=ct(),n=io(),r=ro(),[i,o]=ot(null),s=tt(async l=>{try{if(l||(l=(await new Promise(m=>{const E=document.createElement("input");E.type="file",E.multiple=!1,E.addEventListener("change",()=>{m([...E.files])}),E.addEventListener("cancel",()=>{m([])}),E.click()}))[0]),!l)return;const{uploadPromise:c,upload:u}=await async function(m,E){const A=m.name;if(function(T){return/\.(mp4|ts|mov|webm|ogv)$/i.test(T)}(m.name)){const T=await Ua("video",m,N=>({width:N.videoWidth,height:N.videoHeight,duration:N.duration,filename:A})),b=E.uploadVideo(m,T),v=function(N){switch(N.name.split(".").pop()){case"ts":return"video/MP2T";case"mov":return"video/quicktime";case"webm":return"video/webm";case"ogv":return"video/ogg";default:return"video/mp4"}}(m);return{uploadPromise:b,upload:{type:"video",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:v}))}}}if(function(T){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(T)}(m.name)){const T=await Ua("audio",m,b=>({duration:b.duration,filename:A}));return{uploadPromise:E.uploadAudio(m,T),upload:{type:"audio",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(T){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(T)}(m.name)){const T=await Ua("img",m,b=>({width:b.naturalWidth,height:b.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,T),upload:{type:"image",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:A},O=E.uploadFile(m,_),S=URL.createObjectURL(new Blob([m]));return{uploadPromise:O,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:S}}}(l,r),d=u.file.size+","+u.file.name;t.state$.localFileBlobUrls.child(t.state$.extCurrentConversationId.peek()).child(d).set({url:u.temporaryBlobUrl,fetching:!1}),t.latestFileUpload=u;const h=Vi(),f={upload:u,closePreview:h.resolve,uploaded:!1,errored:!1};let p;o(f);try{p=await Ph(c,h.promise),o({...f,uploaded:!0})}catch(m){if(m===Ll)return;je.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;ft.defined(p),n.sendFileMessage({fileToken:p})}finally{e(),o(null)}},[n,r,o,t,e]),a=HS("geolocation",async l=>{try{const c=Vi(),u={upload:{type:"location",location:void 0},uploaded:!1,closePreview:c.resolve,errored:!1};o(u);const{permissionResult:d,location:h}=await Ph(new Promise(f=>{navigator.geolocation.getCurrentPosition(p=>{const m={latitude:p.coords.latitude,longitude:p.coords.longitude};f({permissionResult:"granted",location:m})},p=>{p.code===1?f({permissionResult:"denied"}):f({permissionResult:"granted"})})}),c.promise);if(l(d),!h||(o({...u,upload:{type:"location",location:h},uploaded:!0}),await c.promise==="cancel"))return;n.sendLocationMessage({location:h})}catch(c){if(c===Ll)return;throw c}finally{e(),o(null)}},[n,o,e]);return{attachFile:s,shareLocation:a,uploadState:i}}const Ll=Symbol("cancelled");function Ph(e,t){return Promise.race([e,t.then(()=>Promise.reject(Ll))])}async function Ua(e,t,n){const r=document.createElement(e);try{return r.src=URL.createObjectURL(t),await new Promise((i,o)=>{const s=e==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}var HE=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var s=t[o++],a=t[o]?(t[0]|=s?1:2,n[t[o++]]):t[++o];s===3?r[0]=a:s===4?r[1]=Object.assign(r[1]||{},a):s===5?(r[1]=r[1]||{})[t[++o]]=a:s===6?r[1][t[++o]]+=a+"":s?(i=e.apply(a,HE(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},xh=new Map;function BS(e){var t=xh.get(this);return t||(t=new Map,xh.set(this,t)),(t=HE(this,t.get(e)||(t.set(e,t=function(n){for(var r,i,o=1,s="",a="",l=[0],c=function(h){o===1&&(h||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,h,s):o===3&&(h||s)?(l.push(3,h,s),o=2):o===2&&s==="..."&&h?l.push(4,h,0):o===2&&s&&!h?l.push(5,0,!0,s):o>=5&&((s||!h&&o===5)&&(l.push(o,0,s,i),o=6),h&&(l.push(o,h,0,i),o=6)),s=""},u=0;u<n.length;u++){u&&(o===1&&c(),c(u));for(var d=0;d<n[u].length;d++)r=n[u][d],o===1?r==="<"?(c(),l=[l],o=3):s+=r:o===4?s==="--"&&r===">"?(o=1,s=""):s=r+s[0]:a?r===a?a="":s+=r:r==='"'||r==="'"?a=r:r===">"?(c(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[u][d+1]===">")?(c(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
19
|
+
`||r==="\r"?(c(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return c(),l}(e)),t),arguments,[])).length>1?t:t[0]}const jS={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},$S=function(e){return jS[e]}("TALK_GMK");function UE(e,t=10){const n=cr(gc),[r,i]=ot([]);return G(()=>{const o=n.conversation(e).subscribeParticipants(s=>i(s!=null?s:[]));return t>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<t;){const s=Math.min(t-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[e,n,t]),r}function te(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(u){o(u)}}function a(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){var u;c.done?i(c.value):(u=c.value,u instanceof n?u:new n(function(d){d(u)})).then(s,a)}l((r=r.apply(e,t||[])).next())})}class co{constructor(){this.listeners={}}on(t,n,r){if(this.listeners[t]||(this.listeners[t]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(t,i),n(...o)};return this.listeners[t].add(i),()=>this.un(t,i)}return this.listeners[t].add(n),()=>this.un(t,n)}un(t,n){var r;(r=this.listeners[t])===null||r===void 0||r.delete(n)}once(t,n){return this.on(t,n,{once:!0})}unAll(){this.listeners={}}emit(t,...n){this.listeners[t]&&this.listeners[t].forEach(r=>r(...n))}}const No={decode:function(e,t){return te(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:t});try{return yield n.decodeAudioData(e)}finally{n.close()}})},createBuffer:function(e,t){if(!e||e.length===0)throw new Error("channelData must be a non-empty array");if(t<=0)throw new Error("duration must be greater than 0");if(typeof e[0]=="number"&&(e=[e]),!e[0]||e[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(e);const n=e.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function BE(e,t){const n=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[r,i]of Object.entries(t))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(BE(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Fh(e,t,n){const r=BE(e,t||{});return n==null||n.appendChild(r),r}var VS=Object.freeze({__proto__:null,createElement:Fh,default:Fh});const YS={fetchBlob:function(e,t,n){return te(this,void 0,void 0,function*(){const r=yield fetch(e,n);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(i,o){te(this,void 0,void 0,function*(){if(!i.body||!i.headers)return;const s=i.body.getReader(),a=Number(i.headers.get("Content-Length"))||0;let l=0;const c=u=>{l+=(u==null?void 0:u.length)||0;const d=Math.round(l/a*100);o(d)};try{for(;;){const u=yield s.read();if(u.done)break;c(u.value)}}catch(u){console.warn("Progress tracking error:",u)}})}(r.clone(),t),r.blob()})}};function St(e){let t=e;const n=new Set;return{get value(){return t},set(r){Object.is(t,r)||(t=r,n.forEach(i=>i(t)))},update(r){this.set(r(t))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Yn(e,t){const n=St(e());return t.forEach(r=>r.subscribe(()=>{const i=e();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function On(e,t){let n;const r=()=>{n&&(n(),n=void 0),n=e()},i=t.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class zS extends co{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(t){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=St(!1),this._currentTime=St(0),this._duration=St(0),this._volume=St(this.media.volume),this._muted=St(this.media.muted),this._playbackRate=St(this.media.playbackRate||1),this._seeking=St(!1),this.setupReactiveMediaEvents(),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(t,n,r){return this.media.addEventListener(t,n,r),()=>this.media.removeEventListener(t,n,r)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,n){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!t)?URL.createObjectURL(n):t;if(r&&this.media.removeAttribute("src"),i||t)try{this.media.src=i}catch(o){this.media.src=t}}destroy(){this.reactiveMediaEventCleanups.forEach(t=>t()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=t,this.setupReactiveMediaEvents()}play(){return te(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function GS({maxTop:e,maxBottom:t,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(e*n*r),a=s+Math.round(t*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function WS({barAlign:e,halfHeight:t,topHeight:n,totalHeight:r,canvasHeight:i}){return e==="top"?0:e==="bottom"?i-r:t-n}function Hh(e,t,n){const r=t-e.left,i=n-e.top;return[r/e.width,i/e.height]}function jE(e){return!!(e.barWidth||e.barGap||e.barAlign)}function Uh(e,t){if(!jE(t))return e;const n=t.barWidth||.5,r=n+(t.barGap||n/2);return r===0?e:Math.floor(e/r)*r}function Bh({scrollLeft:e,totalWidth:t,numCanvases:n}){if(t===0)return[0];const r=e/t,i=Math.floor(r*n);return[i-1,i,i+1]}function jh(e){const t=e._cleanup;typeof t=="function"&&t()}class XS extends co{constructor(t,n){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=t;const r=this.parentFromOptionsContainer(t.container);this.parent=r;const[i,o]=this.initHtml();r.appendChild(i),this.container=i,this.scrollContainer=o.querySelector(".scroll"),this.wrapper=o.querySelector(".wrapper"),this.canvasWrapper=o.querySelector(".canvases"),this.progressWrapper=o.querySelector(".progress"),this.cursor=o.querySelector(".cursor"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(t){let n;if(typeof t=="string"?n=document.querySelector(t):t instanceof HTMLElement&&(n=t),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=Hh(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=Hh(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=function(n){const r=St({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Yn(()=>function(a){const{scrollLeft:l,scrollWidth:c,clientWidth:u}=a;if(c===0)return{startX:0,endX:1};const d=l/c,h=(l+u)/c;return{startX:Math.max(0,Math.min(1,d)),endX:Math.max(0,Math.min(1,h))}}(r.value),[r]),o=Yn(()=>function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}}(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),jh(r)}}}(this.scrollContainer);const t=On(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(t),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=St(null),l=new Map,c=matchMedia("(pointer: coarse)").matches;let u=()=>{};const d=h=>{if(h.button!==o||(l.set(h.pointerId,h),l.size>1))return;let f=h.clientX,p=h.clientY,m=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:_,top:O}=A,S=g=>{if(g.defaultPrevented||l.size>1||c&&Date.now()-E<s)return;const D=g.clientX,k=g.clientY,C=D-f,M=k-p;(m||Math.abs(C)>i||Math.abs(M)>i)&&(g.preventDefault(),g.stopPropagation(),m||(a.set({type:"start",x:f-_,y:p-O}),m=!0),a.set({type:"move",x:D-_,y:k-O,deltaX:C,deltaY:M}),f=D,p=k)},T=g=>{if(l.delete(g.pointerId),m){const D=g.clientX,k=g.clientY;a.set({type:"end",x:D-_,y:k-O})}u()},b=g=>{l.delete(g.pointerId),g.relatedTarget&&g.relatedTarget!==document.documentElement||T(g)},v=g=>{m&&(g.stopPropagation(),g.preventDefault())},N=g=>{g.defaultPrevented||l.size>1||m&&g.preventDefault()};document.addEventListener("pointermove",S),document.addEventListener("pointerup",T),document.addEventListener("pointerout",b),document.addEventListener("pointercancel",b),document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("click",v,{capture:!0}),u=()=>{document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",T),document.removeEventListener("pointerout",b),document.removeEventListener("pointercancel",b),document.removeEventListener("touchmove",N),setTimeout(()=>{document.removeEventListener("click",v,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{u(),n.removeEventListener("pointerdown",d),l.clear(),jh(a)}}}(this.wrapper);const t=On(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(t)}initHtml(){const t=document.createElement("div"),n=t.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
|
|
20
|
+
<style${r?` nonce="${r}"`:""}>
|
|
20
21
|
:host {
|
|
21
22
|
user-select: none;
|
|
22
23
|
min-width: 1px;
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
}
|
|
47
48
|
:host .canvases {
|
|
48
49
|
min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;
|
|
50
|
+
pointer-events: none;
|
|
49
51
|
}
|
|
50
52
|
:host .canvases > div {
|
|
51
53
|
position: relative;
|
|
@@ -87,17 +89,18 @@
|
|
|
87
89
|
<div class="cursor" part="cursor"></div>
|
|
88
90
|
</div>
|
|
89
91
|
</div>
|
|
90
|
-
`,[e,t]}setOptions(e){if(this.options.container!==e.container){const t=this.parentFromOptionsContainer(e.container);t.appendChild(this.container),this.parent=t}e.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:t}=this.scrollContainer,r=t*e;this.setScroll(r)}destroy(){var e,t;this.subscriptions.forEach(r=>r()),this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.unsubscribeOnScroll)===null||t===void 0||t.call(this)}createDelay(e=10){let t,r;const i=()=>{t&&clearTimeout(t),r&&r()};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,t=setTimeout(()=>{t=void 0,r=void 0,o()},e)})}convertColorValues(e){if(!Array.isArray(e))return e||"";if(e.length<2)return e[0]||"";const t=document.createElement("canvas"),r=t.getContext("2d"),i=t.height*(window.devicePixelRatio||1),o=r.createLinearGradient(0,0,0,i),s=1/(e.length-1);return e.forEach((a,l)=>{const u=l*s;o.addColorStop(u,a)}),o}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(e,t,r,i){const o=e[0],s=e[1]||e[0],a=o.length,{width:l,height:u}=r.canvas,c=u/2,d=this.getPixelRatio(),h=t.barWidth?t.barWidth*d:1,p=t.barGap?t.barGap*d:t.barWidth?h/2:0,f=t.barRadius||0,m=l/(h+p)/a,E=f&&"roundRect"in r?"roundRect":"rect";r.beginPath();let A=0,g=0,O=0;for(let S=0;S<=a;S++){const T=Math.round(S*m);if(T>A){const y=Math.round(g*c*i),_=y+Math.round(O*c*i)||1;let D=c-y;t.barAlign==="top"?D=0:t.barAlign==="bottom"&&(D=u-_),r[E](A*(h+p),D,h,_,f),A=T,g=0,O=0}const I=Math.abs(o[S]||0),C=Math.abs(s[S]||0);I>g&&(g=I),C>O&&(O=C)}r.fill(),r.closePath()}renderLineWaveform(e,t,r,i){const o=s=>{const a=e[s]||e[0],l=a.length,{height:u}=r.canvas,c=u/2,d=r.canvas.width/l;r.moveTo(0,c);let h=0,p=0;for(let f=0;f<=l;f++){const m=Math.round(f*d);if(m>h){const A=c+(Math.round(p*c*i)||1)*(s===0?-1:1);r.lineTo(h,A),h=m,p=0}const E=Math.abs(a[f]||0);E>p&&(p=E)}r.lineTo(h,c)};r.beginPath(),o(0),o(1),r.fill(),r.closePath()}renderWaveform(e,t,r){if(r.fillStyle=this.convertColorValues(t.waveColor),t.renderFunction)return void t.renderFunction(e,r);let i=t.barHeight||1;if(t.normalize){const o=Array.from(e[0]).reduce((s,a)=>Math.max(s,Math.abs(a)),0);i=o?1/o:1}t.barWidth||t.barGap||t.barAlign?this.renderBarWaveform(e,t,r,i):this.renderLineWaveform(e,t,r,i)}renderSingleCanvas(e,t,r,i,o,s,a){const l=this.getPixelRatio(),u=document.createElement("canvas");u.width=Math.round(r*l),u.height=Math.round(i*l),u.style.width=`${r}px`,u.style.height=`${i}px`,u.style.left=`${Math.round(o)}px`,s.appendChild(u);const c=u.getContext("2d");if(this.renderWaveform(e,t,c),u.width>0&&u.height>0){const d=u.cloneNode(),h=d.getContext("2d");h.drawImage(u,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(t.progressColor),h.fillRect(0,0,u.width,u.height),a.appendChild(d)}}renderMultiCanvas(e,t,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer;if(l*a>=r)return void this.renderSingleCanvas(e,t,l,i,0,o,s);const u=r/a;let c=Math.min(Wr.MAX_CANVAS_WIDTH,l,u),d={};if(t.barWidth||t.barGap){const E=t.barWidth||.5,A=E+(t.barGap||E/2);c%A!=0&&(c=Math.floor(c/A)*A)}const h=E=>{if(E<0||E>=p||d[E])return;d[E]=!0;const A=E*c,g=Math.min(u-A,c);if(g<=0)return;const O=e.map(S=>{const T=Math.floor(A/u*S.length),I=Math.floor((A+g)/u*S.length);return S.slice(T,I)});this.renderSingleCanvas(O,t,g,i,A,o,s)},p=Math.ceil(u/c),f=this.scrollContainer.scrollLeft/u,m=Math.floor(f*p);h(m-1),h(m),h(m+1),p>1&&(this.unsubscribeOnScroll=this.on("scroll",()=>{const{scrollLeft:E}=this.scrollContainer,A=Math.floor(E/u*p);Object.keys(d).length>Wr.MAX_NODES&&(o.innerHTML="",s.innerHTML="",d={}),h(A-1),h(A),h(A+1)}))}renderChannel(e,t,r,i){var{overlay:o}=t,s=function(c,d){var h={};for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&d.indexOf(p)<0&&(h[p]=c[p]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(c);f<p.length;f++)d.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(c,p[f])&&(h[p[f]]=c[p[f]])}return h}(t,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const u=a.cloneNode();this.progressWrapper.appendChild(u),this.renderMultiCanvas(e,s,r,l,a,u)}render(e){return je(this,void 0,void 0,function*(){var t;this.timeouts.forEach(l=>l()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,o=Math.ceil(e.duration*(this.options.minPxPerSec||0));this.isScrollable=o>i;const s=this.options.fillParent&&!this.isScrollable,a=(s?i:o)*r;if(this.wrapper.style.width=s?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=e,this.emit("render"),this.options.splitChannels)for(let l=0;l<e.numberOfChannels;l++){const u=Object.assign(Object.assign({},this.options),(t=this.options.splitChannels)===null||t===void 0?void 0:t[l]);this.renderChannel([e.getChannelData(l)],u,a,l)}else{const l=[e.getChannelData(0)];e.numberOfChannels>1&&l.push(e.getChannelData(1)),this.renderChannel(l,this.options,a,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){var e;if((e=this.unsubscribeOnScroll)===null||e===void 0||e.call(this),delete this.unsubscribeOnScroll,!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:r}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:i}=this.progressWrapper.getBoundingClientRect();let o=i-r;o*=2,o=o<0?Math.floor(o):Math.ceil(o),o/=2,this.scrollContainer.scrollLeft+=o}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,t=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=e*i,a=r,l=r+o,u=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?u:0));const c=s-r-u;t&&this.options.autoCenter&&c>0&&(this.scrollContainer.scrollLeft+=Math.min(c,10))}{const c=this.scrollContainer.scrollLeft,d=c/i,h=(c+o)/i;this.emit("scroll",d,h,c,c+o)}}renderProgress(e,t){if(isNaN(e))return;const r=100*e;this.canvasWrapper.style.clipPath=`polygon(${r}% 0, 100% 0, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=`translateX(-${Math.round(r)===100?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(e,t)}exportImage(e,t,r){return je(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(e,t));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},e,t)})))})}}Wr.MAX_CANVAS_WIDTH=8e3,Wr.MAX_NODES=10;class tO extends _o{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",()=>{requestAnimationFrame(()=>{this.emit("tick")})}),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class ap extends _o{constructor(e=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return je(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then(t=>{if(t.status>=400)throw new Error(`Failed to fetch ${e}: ${t.status} (${t.statusText})`);return t.arrayBuffer()}).then(t=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(t)).then(t=>{this.currentSrc===e&&(this.buffer=t,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())})}_play(){var e;if(!this.paused)return;this.paused=!1,(e=this.bufferNode)===null||e===void 0||e.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;t>=this.duration&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,(e=this.bufferNode)===null||e===void 0||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return je(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){var t,r;const i=e-this.currentTime;(t=this.bufferNode)===null||t===void 0||t.stop(this.audioContext.currentTime+i),(r=this.bufferNode)===null||r===void 0||r.addEventListener("ended",()=>{this.bufferNode=null,this.pause()},{once:!0})}setSinkId(e){return je(this,void 0,void 0,function*(){return this.audioContext.setSinkId(e)})}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const t=!this.paused;t&&this._pause(),this.playedDuration=e/this._playbackRate,t&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,t;return(e=this._duration)!==null&&e!==void 0?e:((t=this.buffer)===null||t===void 0?void 0:t.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const t=this.buffer.numberOfChannels;for(let r=0;r<t;r++)e.push(this.buffer.getChannelData(r));return e}}const nO={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Qi extends eO{static create(e){return new Qi(e)}constructor(e){const t=e.media||(e.backend==="WebAudio"?new ap:void 0);super({media:t,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},nO,e),this.timer=new tO;const r=t?void 0:this.getMediaElement();this.renderer=new Wr(this.options,r),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const i=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:o,duration:s}=this.options;(i||o&&s)&&this.load(i,o,s).catch(()=>null)})}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e)}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const e=this.updateProgress();this.emit("timeupdate",e)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop()}),this.onMediaEvent("emptied",()=>{this.timer.stop()}),this.onMediaEvent("ended",()=>{this.emit("finish")}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",e=>{this.emit("error",e.error)}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(e,t)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,t))}),this.renderer.on("dblclick",(e,t)=>{this.emit("dblclick",e,t)}),this.renderer.on("scroll",(e,t,r,i)=>{const o=this.getDuration();this.emit("scroll",e*o,t*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",e=>{this.emit("dragstart",e)}),this.renderer.on("dragend",e=>{this.emit("dragend",e)}));{let e;this.subscriptions.push(this.renderer.on("drag",t=>{if(!this.options.interact)return;let r;this.renderer.renderProgress(t),clearTimeout(e),this.isPlaying()?r=0:this.options.dragToSeek===!0?r=200:typeof this.options.dragToSeek=="object"&&this.options.dragToSeek!==void 0&&(r=this.options.dragToSeek.debounceTime),e=setTimeout(()=>{this.seekTo(t)},r),this.emit("interaction",t*this.getDuration()),this.emit("drag",t)}))}}initPlugins(){var e;!((e=this.options.plugins)===null||e===void 0)&&e.length&&this.options.plugins.forEach(t=>{this.registerPlugin(t)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(e=>e()),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),e.mediaControls!=null&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){return e._init(this),this.plugins.push(e),this.subscriptions.push(e.once("destroy",()=>{this.plugins=this.plugins.filter(t=>t!==e)})),e}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const t=e/this.getDuration();this.renderer.setScrollPercentage(t)}getActivePlugins(){return this.plugins}loadAudio(e,t,r,i){return je(this,void 0,void 0,function*(){var o;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,!t&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=(o=this.abortController)===null||o===void 0?void 0:o.signal);const l=u=>this.emit("loading",u);t=yield Q0.fetchBlob(e,l,a)}this.setSrc(e,t);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!e&&!t){const a=this.getMediaElement();a instanceof ap&&(a.duration=s)}if(r)this.decodedData=op.createBuffer(r,s||0);else if(t){const a=yield t.arrayBuffer();this.decodedData=yield op.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(e,t,r){return je(this,void 0,void 0,function*(){try{return yield this.loadAudio(e,void 0,t,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(e,t,r){return je(this,void 0,void 0,function*(){try{return yield this.loadAudio("",e,t,r)}catch(i){throw this.emit("error",i),i}})}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:t=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(e,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],u=a.length/t;for(let c=0;c<t;c++){const d=a.slice(Math.floor(c*u),Math.ceil((c+1)*u));let h=0;for(let p=0;p<d.length;p++){const f=d[p];Math.abs(f)>Math.abs(h)&&(h=f)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let e=super.getDuration()||0;return e!==0&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const t=this.getDuration()*e;this.setTime(t)}playPause(){return je(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return je(this,arguments,void 0,function*(e="image/png",t=1,r="dataURL"){return this.renderer.exportImage(e,t,r)})}destroy(){var e;this.emit("destroy"),(e=this.abortController)===null||e===void 0||e.abort(),this.plugins.forEach(t=>t.destroy()),this.subscriptions.forEach(t=>t()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}function Zs({src:n,onError:e,filename:t,className:r=""}){const i=Q(null),o=Q(),s=Q(),[a,l]=ie(!1),[u,c]=ie(0),[d,h]=ie(1),p=Q(),[f,m]=ie(!1),E=ne(ce().t$);Y(()=>{o.current=new Audio;const O={normalize:!0,height:50,container:i.current};function S(){const C=o.current;C&&(C.error.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(C.load(),l(!1)):(m(!0),l(!1),e==null||e()))}const T=t.slice(t.lastIndexOf(".")+1);if(function(C){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(C)}(t)&&T==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))O.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const C=o.current;C.addEventListener("error",S),C.src=n,C.preload="auto",C.preservesPitch=!0,O.media=C}p.current=function(C){var k,L,H,N,w,$,U,G;if(!C.container)return;const y=getComputedStyle(C.container),_=(k=eo.parse(y.color))!=null?k:new eo(255,255,255,1),D=_.withAlpha(_.alpha/2);return Qi.create({...C,barGap:(L=C.barGap)!=null?L:2,barRadius:(H=C.barRadius)!=null?H:0,barWidth:(N=C.barWidth)!=null?N:2,barHeight:C.barHeight,hideScrollbar:!0,cursorWidth:(w=C.cursorWidth)!=null?w:0,cursorColor:C.cursorColor,height:($=C.height)!=null?$:24,progressColor:(U=C.progressColor)!=null?U:D.toRgbaString(),waveColor:(G=C.waveColor)!=null?G:D.toRgbaString()})}(O);const I=p.current;return I.on("finish",()=>{o.current.loop=!0,l(!1)}),I.on("ready",C=>c(Math.trunc(C))),I.on("timeupdate",C=>c(Math.trunc(C))),O.backend==="WebAudio"&&I.load(n).catch(()=>{m(!0),l(!1),e==null||e()}),()=>{var C;(C=o.current)==null||C.removeEventListener("error",S),o.current=void 0,I.destroy(),p.current=void 0}},[n,t,e]);const A=ee(()=>{var O;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((O=p.current.isPlaying())!=null?O:!1);else{const S=o.current;S.paused?S.play():S.pause(),S.loop=!1,!S.paused&&S.ended&&(S.load(),S.play()),l(!S.paused)}},[]),g=ee(O=>{p.current.setPlaybackRate(O),h(O)},[]);return v("div",f?{}:{className:`t-audio-player ${r}`,children:[v("button",{onClick:A,children:v(Rs,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),v("div",{className:"t-waveform",ref:i}),v("div",{className:"t-duration",children:_c(u)}),v(Rr,{type:"menu",popoverComponent:iO,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:g},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",v(Rs,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}Qi.BasePlugin=class extends _o{constructor(n){super(),this.subscriptions=[],this.options=n}onInit(){}_init(n){this.wavesurfer=n,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(n=>n())}},Qi.dom=Z0;const rO=[.25,.5,.75,1,1.25,1.5,2];function iO({playbackSpeed:n,selectPlaybackSpeed:e}){return v("div",{className:"t-playback-speed-menu",children:[v("div",{className:"t-playback-heading",children:"Playback Speed"}),rO.map(t=>v(An,{className:"t-menu-item",onSelect:()=>e(t),children:[v("span",{className:"t-playback-checkmark",children:n===t?"✓ ":""}),t,"x"]},t))]})}const oO=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,sO=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class eo{constructor(e,t,r,i){this.red=e,this.green=t,this.blue=r,this.alpha=i}static parse(e){var r;const t=(r=e.match(oO))!=null?r:e.match(sO);if(t){const[i,o,s,a,l="1"]=t;return new eo(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(e){return new eo(this.red,this.green,this.blue,e)}toRgbaString(){const{red:e,green:t,blue:r,alpha:i}=this;return i!==1?`rgba(${e}, ${t}, ${r}, ${i})`:`rgb(${e}, ${t}, ${r})`}}const lA=/^\/.*[^\\]\/[im]*$/;function lp(n){return lA.test(n)?!Cs(n).test(""):!1}function Cs(n){const e=n.match(/^\/(.*[^\\])\/(.*)$/);if(!e)throw new Error(`Expected ${n} to be a (non-empty) regex`);let t=e[2]||"";return t=t.replace(/[^im]/g,"")+"g",new RegExp(e[1],t)}function uA(n){const e=n.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+e+"$","i")}function aO(n,e){const t=Sm(e),r=uA(n);return t!==void 0&&r.test(t)}const lO=/^[]/g;function cA(n){return n.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Zl(n,e){!n()&&!e&&(e=n.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(n=>{function e(r){}function t(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}n.defined=e,n.has=function(r,i){r[i]},n.is=t,n.equals=function(r,i){},n.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},n.isArray=function(r,i){t(r,Array),r&&r.length>0&&t(r[0],i)},n.optional=function(r,i){r!==void 0&&t(r,i)},n.falsy=function(r){},n.never=function(r){}})(Zl||(Zl={}));const yr=Zl,uO=new RegExp(":arslan:|"+/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.source,"g"),cO=/\uFE0F/g,dO="";function hO(n){if(n===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const e=function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")}((t=n).indexOf(dO)<0?t.replace(cO,""):t);var t;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`}class dA{constructor({mode:e,allowedHostnames:t,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:u,replacement:c}){if(yr.oneOf(e,["all","otherOnly","off"]),this.mode=e,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=u!==!1,this.allowedHostnames=t||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(lp).map(d=>Cs(d)),this.forbiddenMatches=(o||[]).filter(lp).map(d=>Cs(d)),s){const d=s.split(`
|
|
91
|
-
`).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>cA(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}yr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),yr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),c=c==null?void 0:c.trim(),this.replacement=c&&c.length>0?c:void 0}shouldSuppress({isContentBySender:e}){return this.mode==="all"||this.mode==="otherOnly"&&!e}}function uc(n){var t,r,i,o,s,a,l,u,c,d,h,p,f;let e="";return n.t&&(e=`(${n.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(t=n.formattedLinks)!=null?t:"plaintext",markup:(r=n.markup)!=null?r:!1,useFallbackMentions:(i=n.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=n.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=n.enableEmojiImageFallback)!=null?s:!1,highlight:(a=n.highlight)!=null?a:[],contactInfo:(l=n.contactInfo)!=null?l:!1,suppression:(u=n.suppression)!=null?u:new dA({mode:"off"}),contactInfoHiddenText:(h=(d=n.contactInfoHiddenText)!=null?d:(c=n.suppression)==null?void 0:c.replacement)!=null?h:e,customEmojiUrls:(p=n.customEmojiUrls)!=null?p:{},enableActions:(f=n.enableActions)!=null?f:!0}}function pO({id:n,text:e}){var i;const t=ce(),r=ne(()=>{var a;if(t.type==="ConversationListStore")return;const o=t.state$.extCurrentConversationId.get(),s=o&&t.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===n))==null?void 0:a.user});return v("span",{className:"t-mention","t-is-current-user":ne(t.extUserId$)===n?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:e}`})}function fO({message:n,type:e,action:t,params:r,children:i}){const o=mo(),s=ee(l=>{l.preventDefault(),o.triggerMessageAction(n,t,r)},[o,n,t,r]),a={"t-action":t,onClick:s};return e==="actionButton"?v("button",{...a,type:"button",children:i}):v("a",{...a,href:"#",children:i})}function Xr(n,e){const t=n.flatMap(r=>{if(typeof r=="string")return el(r,e.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return mO(r,e);case"bulletlist":case"bulletList":return[de("ul",null,...Xr(r.children,e))];case"autolink":case"autoLink":case"link":return AO(r,e);case"codeblock":case"codeBlock":return[v("code",{"data-language":r.language,children:el(r.text,e.highlight)})];case"codespan":case"codeSpan":return v("code",{children:el((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),e.highlight)});case"mention":return yr.falsy(e.useFallbackMentions),v(pO,{id:r.id,text:r.text},r.id);case"suppressed":return[v("i",{children:e.contactInfoHiddenText})];case"emoji":return e.enableEmojiImageFallback?[v(EO,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return _O(r,e);case"customemoji":case"customEmoji":return r.text;default:yr.never(r)}var i});return t.every(r=>typeof r=="string")?[t.join("")]:t}function el(n,e){if(e.length===0)return[n];const t=function(i){const o=i.map(a=>a.trim()).filter(a=>a);if(o.length===0)return lO;const s=o.map(cA).join("|");return new RegExp(s,"gi")}(e),r=Vs(n,t).map(i=>({offset:i.index,matchedText:i[0]}));return Sl(n,r,({matchedText:i})=>[v("span",{className:"highlighted-text",children:i})])}const mO=(n,e)=>[de({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[n.type],null,...Xr(n.children,e))];function EO({unicode:n}){const[e,t]=ie(()=>n!==":arslan:");return Y(()=>{e&&!_m(n)&&t(!1)},[]),e?v("span",{className:"t-emoji",children:n}):v("img",{className:"t-emoji",src:hO(n),alt:n})}const AO=(n,e)=>{const t="children"in n?n.children:[n.text];switch(e.formattedLinks){case"link":return[de("a",{target:function(r,i){for(const o of r)if(lA.test(o)){if(Cs(o).test(i))return"_top"}else if(aO(o,i))return"_top";return"_blank"}(e.sameTabLinkRules,n.url),href:n.url,rel:"noreferrer"},...Xr(t,e))];case"plaintext":return"children"in n&&n.children.every(r=>typeof r=="string")?[n.children.join("")]:[de(xe,null,...Xr(t,e))];default:yr.never(e.formattedLinks)}},_O=(n,e)=>e.enableActions?[de(fO,{type:n.type==="actionlink"?"actionLink":n.type==="actionbutton"?"actionButton":n.type,action:n.action,params:n.params,message:e.message},...Xr(n.children,e))]:n.children;function gO(n,e){return Zo(n,uc(e))}function Zo(n,e){return n.flatMap(t=>{if(typeof t=="string"){let r=[t];return r=tl(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,u=rc(a,c=>Vs(o,c)).filter(([c])=>!l.some(d=>c.match(d)!==null)).map(c=>({offset:c.index,matchedText:c[0]}));return Sl(o,u,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,e)),r=tl(r,i=>function(o){return Sl(o,function(s){const a=[];let l;for(;l=uO.exec(s);){const u=l[0],c=l.index;a.push({offset:c,matchedText:u})}return a}(o),s=>[{type:"emoji",text:s.matchedText}])}(i)),r=tl(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(XE),s.suppression.suppressPhoneNumbers&&a.push(WE),a.length===0)return[o];const l=JE(o,{multilineSteps:[],singlelineSteps:a}),u=l.map(c=>typeof c=="string"?c:up(c.url,s.suppression)?c.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return sc(u)}(i,e)),r}switch(t.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:t.type,children:Zo(t.children,e)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return t;case"mention":return{type:"mention",id:t.id,text:t.text};case"autolink":case"autoLink":return function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?up(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(t,e);case"link":return{type:"link",url:t.url,children:Zo(t.children,e)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:t.type,action:t.action,params:t.params,children:Zo(t.children,e)}}})}function tl(n,e){return rc(n,t=>typeof t=="string"?e(t):[t])}function up(n,e){if(e.allowedMatches.some(t=>n.match(t)!==null))return!0;if(e.forbiddenMatches.some(t=>n.match(t)!==null))return!1;if(n.startsWith("mailto:")){const t=n.substring(7).replace(/^.*@/,"");return!e.suppressEmailAddresses||cp(e.allowedHostnames,t)}if(n.startsWith("tel:")){const t=n.substring(4).replace(/[^0-9]/g,"");return!e.suppressPhoneNumbers||e.allowedPhoneNrs.some(r=>t.endsWith(r))}{const t=Sm(n);return!e.suppressLinks||!t||cp(e.allowedHostnames,t)}}function cp(n,e){for(const t of n)if(uA(t).test(e))return!0;return!1}function cc({block:n,nonInteractive:e,message:t,className:r=""}){const i=!e,{nodes:o,roleOptions:s}=function(l,u){var g;const c=ce(),d=ne(c.app$.role);pe.defined(d);const h=u.type==="UserMessage",p=((g=u.sender)==null?void 0:g.id)===c.extUserId$.peek(),f=d.suppressContactInfo,m=h&&f.shouldSuppress({isContentBySender:p}),E=gO(l.children,{contactInfo:m?"suppress":"link",suppression:f}),A={sameTabLinkRules:d.sameTabLinkRules,contactInfoHiddenText:d.suppressContactInfo.replacement||`(${c.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:E,roleOptions:A}}(n,t),a=function(l,u={},c){return Xr(l,{...uc(u),message:c})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},t);return de("span",{className:`t-text ${r}`},...a)}function hA(n){const e=kt(),t=ce(),{className:r="",...i}=n,o=ne(()=>t.state$.messages.child(t.state$.extCurrentConversationId.get()).lookup.child(n.message.id).content.child(0).url.get());return v("div",{className:`t-message-content ${r}`,children:n.message.content.map(s=>{var a;return v(DO,{block:s,theme:e,downloadUrl:o,...i},n.message.createdAt+((a=n.message.editedAt)!=null?a:0))})})}function DO({common:n,block:e,message:t,theme:r,downloadUrl:i}){const o=function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:pe.never(a)}}(r,e);return v(o,{block:e,common:n,message:t,downloadUrl:i})}const OO=27;function go(n,e,t=!0){const r=ee(o=>{o.keyCode===OO&&n()},[n]),i=ee(o=>{o.target.closest(e)===null&&n()},[e,n]);Y(()=>{if(t)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,t])}const SO=".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}";function pA(n){const[e,t]=ie();return Y(()=>{let r=!0;return n().then(i=>{r&&t({value:i})}),()=>{r=!1}},[n]),e}function dc(n){const{onClose:e,onEmojiSelected:t}=Dg(),r=Q(null),i=pA(xu);return Y(()=>{if(!i)return;pe.defined(r.current);const o=r.current,s=o.shadowRoot;(function(u,c){const d=document.createElement("style");d.textContent=c,u.appendChild(d)})(s,SO);const a=u=>{var d;const c=(d=u.detail.unicode)!=null?d:u.detail.name;t(c)};function l(u){u.pointerType==="mouse"&&(s.querySelector("section").dataset.hasMouse="true")}return o.addEventListener("emoji-click",a),o.addEventListener("pointermove",l,{once:!0}),()=>{o.removeEventListener("emoji-click",a),o.removeEventListener("pointermove",l)}},[i,t]),Y(()=>{var o;i&&r.current&&((o=r.current.shadowRoot.getElementById("search"))==null||o.focus())},[i]),go(()=>e(),".t-emoji-picker"),v("div",i?{className:"t-emoji-picker",children:v("emoji-picker",{ref:r,class:n.colorScheme})}:{className:"t-emoji-picker","t-loading":"",children:v(ac,{})})}function fA({messageId:n,colorScheme:e}){const{closePopover:t}=Uu(),r=mo();return v("div",{className:"t-reaction-picker",children:v(fm.Provider,{value:{onClose:t,onEmojiSelected:i=>{r.addReaction(n,i),t()}},children:v(dc,{colorScheme:e})})})}function Ql(){return Ql=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Ql.apply(this,arguments)}function mA(n,e){if(n==null)return{};var t,r,i={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(i[t]=n[t]);return i}function eu(n,e){return eu=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},eu(n,e)}function EA(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,eu(n,e)}function AA(){}function _A(){}_A.resetWarningCache=AA;function dp(n,e){return n.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function n(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return n}n.isRequired=n;var t={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:_A,resetWarningCache:AA};t.PropTypes=t})();const hp=!1,gA=dt.createContext(null);var Ci="unmounted",Fn="exited",Pn="entering",Ar="entered",tu="exiting",Zt=function(n){function e(r,i){var o;o=n.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=Fn,o.appearStatus=Pn):s=Ar:s=r.unmountOnExit||r.mountOnEnter?Ci:Fn,o.state={status:s},o.nextCallback=null,o}EA(e,n),e.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ci?{status:Fn}:null};var t=e.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Pn&&o!==Ar&&(i=Pn):o!==Pn&&o!==Ar||(i=tu)}this.updateStatus(!1,i)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},t.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Pn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Fn&&this.setState({status:Ci})},t.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[dt.findDOMNode(this),s],l=a[0],u=a[1],c=this.getTimeouts(),d=s?c.appear:c.enter;!r&&!o||hp?this.safeSetState({status:Ar},function(){i.props.onEntered(l)}):(this.props.onEnter(l,u),this.safeSetState({status:Pn},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:Ar},function(){i.props.onEntered(l,u)})})}))},t.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:dt.findDOMNode(this);i&&!hp?(this.props.onExit(s),this.safeSetState({status:tu},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Fn},function(){r.props.onExited(s)})})})):this.safeSetState({status:Fn},function(){r.props.onExited(s)})},t.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},t.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},t.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:dt.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],u=a[1];this.props.addEndListener(l,u)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},t.render=function(){var r=this.state.status;if(r===Ci)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=mA(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return dt.createElement(gA.Provider,{value:null},typeof o=="function"?o(r,s):dt.cloneElement(dt.Children.only(o),s))},e}(dt.Component);function hr(){}Zt.contextType=gA,Zt.propTypes={},Zt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hr,onEntering:hr,onEntered:hr,onExit:hr,onExiting:hr,onExited:hr},Zt.UNMOUNTED=Ci,Zt.EXITED=Fn,Zt.ENTERING=Pn,Zt.ENTERED=Ar,Zt.EXITING=tu;var nl=function(n,e){return n&&e&&e.split(" ").forEach(function(t){return i=t,void((r=n).classList?r.classList.remove(i):typeof r.className=="string"?r.className=dp(r.className,i):r.setAttribute("class",dp(r.className&&r.className.baseVal||"",i)));var r,i})},nu=function(n){function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=n.call.apply(n,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1];r.removeClasses(c,"exit"),r.addClass(c,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.addClass(c,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var u=r.resolveArguments(a,l),c=u[0],d=u[1]?"appear":"enter";r.removeClasses(c,d),r.addClass(c,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,u=typeof l=="string",c=u?(u&&l?l+"-":"")+a:l[a];return{baseClassName:c,activeClassName:u?c+"-active":l[a+"Active"],doneClassName:u?c+"-done":l[a+"Done"]}},r}EA(e,n);var t=e.prototype;return t.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,function(l,u){l&&u&&u.split(" ").forEach(function(c){return h=c,void((d=l).classList?d.classList.add(h):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})}(r,s))},t.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&nl(r,s),a&&nl(r,a),l&&nl(r,l)},t.render=function(){var r=this.props;r.classNames;var i=mA(r,["classNames"]);return dt.createElement(Zt,Ql({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},e}(dt.Component);nu.defaultProps={classNames:""},nu.propTypes={};const TO={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function DA(n,{focused:e,setFocused:t,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=c=>{var d,h,p;d=0,h=c,p=r-1,c=Math.max(d,Math.min(h,p)),t(c)},[l,u]=TO[i];switch(n){case l:return a(e-1),!0;case u:return a(e+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function OA({focused:n,setFocused:e,buttonId:t}){Et(()=>{var a;const s=t(n);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[n,t]);const r=ee(s=>{const a=s.currentTarget.dataset.index;e(+a)},[e]),i=Z(()=>({role:"menu","aria-activedescendant":t(n)}),[n,t]),o=ee(s=>({onMouseMove:r,id:t(s),"data-index":s}),[r,t]);return{containerProps:i,itemProps:o}}function SA(n){const[e,t]=ie([]),[r,i]=ie([]),[o,s]=ie(0),[a,l]=ie(0),u=pA(xu),c=Z(()=>u&&new u.value.Database({}),[u]),d=po(),h=ne(d.state$.suggestEmojiQuery);Y(()=>{c&&(h?async function(){const g=await c.getPreferredSkinTone();l(g);let O=await c.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||function(T){return T.version<=gm&&!CO.includes(T.unicode)}(S)),function(S,T){T.sort((I,C)=>{var D,k;const y=(D=I.shortcodes)==null?void 0:D.find(L=>L.startsWith(S)),_=(k=C.shortcodes)==null?void 0:k.find(L=>L.startsWith(S));return y&&!_?-1:!y&&_?1:y&&_?y.length-_.length:0})}(h.substring(1),O),s(0),t(O),O.length>0&&i(O),h.endsWith(":")){const S=h.slice(1,-1),T=O.find(I=>{var C;return(C=I.shortcodes)==null?void 0:C.includes(S)});T&&d.selectEmoji(Ii(T,g))}}():t([]))},[h,d,c]);const p=ee(g=>{const O=e[g];return O&&"emoji-button-"+Ii(O,a)},[e,a]),{containerProps:f,itemProps:m}=OA({focused:o,setFocused:s,buttonId:p}),E=e.length>0;go(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),Y(()=>{if(E)return d.listenKeydown("emoji",g=>DA(g,{dir:"ltr",focused:o,setFocused:s,itemCount:e.length,onConfirm(){const O=e[o];pe.defined(O),d.selectEmoji(Ii(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,e,o,E,a]);const A=Q(null);return v(nu,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:v("div",{className:"t-emoji-suggest-bar",ref:A,...f,children:r.map((g,O)=>v(RO,{emoji:g,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},Ii(g,a)))})})}function Ii(n,e){return ru(n)?TA(n,e):n.name}function ru(n){return!!n.unicode}function RO(n){var l;const{emoji:e,focused:t,skinTone:r,onSelect:i,...o}=n,s=((l=e.shortcodes)!=null?l:[]).join(", "),a=ru(e)?[e.unicode,s].join(", "):s;return v("button",{"t-focused":t?"":void 0,title:s,"aria-label":a,onClick:()=>i(Ii(e,r)),...o,children:ru(e)?TA(e,r):null})}function TA(n,e){var r,i;const t=(r=n.skins)==null?void 0:r.find(o=>o.tone===e);return(i=t==null?void 0:t.unicode)!=null?i:n.unicode}const CO=["🏻","🏼","🏽","🏾","🏿"],IO=["top","right","bottom","left"],iu=Math.min,br=Math.max,Is=Math.round,Bo=Math.floor,zt=n=>({x:n,y:n}),vO={left:"right",right:"left",bottom:"top",top:"bottom"},NO={start:"end",end:"start"};function hc(n,e){return typeof n=="function"?n(e):n}function to(n){return n.split("-")[0]}function pc(n){return n.split("-")[1]}function RA(n){return n==="y"?"height":"width"}const yO=new Set(["top","bottom"]);function Tr(n){return yO.has(to(n))?"y":"x"}function CA(n){return Tr(n)==="x"?"y":"x"}function ou(n){return n.replace(/start|end/g,e=>NO[e])}const pp=["left","right"],fp=["right","left"],bO=["top","bottom"],kO=["bottom","top"];function LO(n,e,t,r){const i=pc(n);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?fp:pp:a?pp:fp;case"left":case"right":return a?bO:kO;default:return[]}}(to(n),t==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(ou)))),o}function Ho(n){return n.replace(/left|right|bottom|top/g,e=>vO[e])}function vs(n){const{x:e,y:t,width:r,height:i}=n;return{width:r,height:i,top:t,left:e,right:e+r,bottom:t+i,x:e,y:t}}function mp(n,e,t){let{reference:r,floating:i}=n;const o=Tr(e),s=CA(e),a=RA(s),l=to(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(pc(e)){case"start":p[s]-=h*(t&&u?-1:1);break;case"end":p[s]+=h*(t&&u?-1:1)}return p}async function su(n,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=n,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=hc(e,n),f=function(T){return typeof T!="number"?function(I){return{top:0,right:0,bottom:0,left:0,...I}}(T):{top:T,right:T,bottom:T,left:T}}(p),m=a[h?d==="floating"?"reference":"floating":d],E=vs(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(m)))==null||t?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),A=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,g=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(g))&&await(o.getScale==null?void 0:o.getScale(g))||{x:1,y:1},S=vs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,strategy:l}):A);return{top:(E.top-S.top+f.top)/O.y,bottom:(S.bottom-E.bottom+f.bottom)/O.y,left:(E.left-S.left+f.left)/O.x,right:(S.right-E.right+f.right)/O.x}}function Ep(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Ap(n){return IO.some(e=>n[e]>=0)}function Qs(){return typeof window!="undefined"}function Kr(n){return IA(n)?(n.nodeName||"").toLowerCase():"#document"}function ft(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function Vt(n){var e;return(e=(IA(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function IA(n){return!!Qs()&&(n instanceof Node||n instanceof ft(n).Node)}function It(n){return!!Qs()&&(n instanceof Element||n instanceof ft(n).Element)}function Gt(n){return!!Qs()&&(n instanceof HTMLElement||n instanceof ft(n).HTMLElement)}function _p(n){return!(!Qs()||typeof ShadowRoot=="undefined")&&(n instanceof ShadowRoot||n instanceof ft(n).ShadowRoot)}const wO=new Set(["inline","contents"]);function no(n){const{overflow:e,overflowX:t,overflowY:r,display:i}=vt(n);return/auto|scroll|overlay|hidden|clip/.test(e+r+t)&&!wO.has(i)}const MO=new Set(["table","td","th"]);function FO(n){return MO.has(Kr(n))}const PO=[":popover-open",":modal"];function Ns(n){return PO.some(e=>{try{return n.matches(e)}catch(t){return!1}})}const xO=["transform","translate","scale","rotate","perspective"],BO=["transform","translate","scale","rotate","perspective","filter"],HO=["paint","layout","strict","content"];function au(n){const e=fc(),t=It(n)?vt(n):n;return xO.some(r=>!!t[r]&&t[r]!=="none")||!!t.containerType&&t.containerType!=="normal"||!e&&!!t.backdropFilter&&t.backdropFilter!=="none"||!e&&!!t.filter&&t.filter!=="none"||BO.some(r=>(t.willChange||"").includes(r))||HO.some(r=>(t.contain||"").includes(r))}function fc(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const UO=new Set(["html","body","#document"]);function kr(n){return UO.has(Kr(n))}function vt(n){return ft(n).getComputedStyle(n)}function ea(n){return It(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function On(n){if(Kr(n)==="html")return n;const e=n.assignedSlot||n.parentNode||_p(n)&&n.host||Vt(n);return _p(e)?e.host:e}function vA(n){const e=On(n);return kr(e)?n.ownerDocument?n.ownerDocument.body:n.body:Gt(e)&&no(e)?e:vA(e)}function ro(n,e,t){var r;e===void 0&&(e=[]),t===void 0&&(t=!0);const i=vA(n),o=i===((r=n.ownerDocument)==null?void 0:r.body),s=ft(i);if(o){const a=lu(s);return e.concat(s,s.visualViewport||[],no(i)?i:[],a&&t?ro(a):[])}return e.concat(i,ro(i,[],t))}function lu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function NA(n){const e=vt(n);let t=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Gt(n),o=i?n.offsetWidth:t,s=i?n.offsetHeight:r,a=Is(t)!==o||Is(r)!==s;return a&&(t=o,r=s),{width:t,height:r,$:a}}function mc(n){return It(n)?n:n.contextElement}function Lr(n){const e=mc(n);if(!Gt(e))return zt(1);const t=e.getBoundingClientRect(),{width:r,height:i,$:o}=NA(e);let s=(o?Is(t.width):t.width)/r,a=(o?Is(t.height):t.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const $O=zt(0);function yA(n){const e=ft(n);return fc()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:$O}function rr(n,e,t,r){e===void 0&&(e=!1),t===void 0&&(t=!1);const i=n.getBoundingClientRect(),o=mc(n);let s=zt(1);e&&(r?It(r)&&(s=Lr(r)):s=Lr(n));const a=function(h,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==ft(h))&&p}(o,t,r)?yA(o):zt(0);let l=(i.left+a.x)/s.x,u=(i.top+a.y)/s.y,c=i.width/s.x,d=i.height/s.y;if(o){const h=ft(o),p=r&&It(r)?ft(r):r;let f=h,m=lu(f);for(;m&&r&&p!==f;){const E=Lr(m),A=m.getBoundingClientRect(),g=vt(m),O=A.left+(m.clientLeft+parseFloat(g.paddingLeft))*E.x,S=A.top+(m.clientTop+parseFloat(g.paddingTop))*E.y;l*=E.x,u*=E.y,c*=E.x,d*=E.y,l+=O,u+=S,f=ft(m),m=lu(f)}}return vs({width:c,height:d,x:l,y:u})}function ys(n,e){const t=ea(n).scrollLeft;return e?e.left+t:rr(Vt(n)).left+t}function bA(n,e){const t=n.getBoundingClientRect();return{x:t.left+e.scrollLeft-ys(n,t),y:t.top+e.scrollTop}}const jO=new Set(["absolute","fixed"]);function gp(n,e,t){let r;if(e==="viewport")r=function(i,o){const s=ft(i),a=Vt(i),l=s.visualViewport;let u=a.clientWidth,c=a.clientHeight,d=0,h=0;if(l){u=l.width,c=l.height;const f=fc();(!f||f&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const p=ys(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),A=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,g=Math.abs(a.clientWidth-m.clientWidth-A);g<=25&&(u-=g)}else p<=25&&(u+=p);return{width:u,height:c,x:d,y:h}}(n,t);else if(e==="document")r=function(i){const o=Vt(i),s=ea(i),a=i.ownerDocument.body,l=br(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),u=br(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let c=-s.scrollLeft+ys(i);const d=-s.scrollTop;return vt(a).direction==="rtl"&&(c+=br(o.clientWidth,a.clientWidth)-l),{width:l,height:u,x:c,y:d}}(Vt(n));else if(It(e))r=function(i,o){const s=rr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,u=Gt(i)?Lr(i):zt(1);return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:a*u.y}}(e,t);else{const i=yA(n);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return vs(r)}function kA(n,e){const t=On(n);return!(t===e||!It(t)||kr(t))&&(vt(t).position==="fixed"||kA(t,e))}function zO(n,e,t){const r=Gt(e),i=Vt(e),o=t==="fixed",s=rr(n,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=zt(0);function u(){l.x=ys(i)}if(r||!r&&!o)if((Kr(e)!=="body"||no(i))&&(a=ea(e)),r){const d=rr(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&u();o&&!r&&i&&u();const c=!i||r||o?zt(0):bA(i,a);return{x:s.left+a.scrollLeft-l.x-c.x,y:s.top+a.scrollTop-l.y-c.y,width:s.width,height:s.height}}function rl(n){return vt(n).position==="static"}function Dp(n,e){if(!Gt(n)||vt(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return Vt(n)===t&&(t=t.ownerDocument.body),t}function Op(n,e){const t=ft(n);if(Ns(n))return t;if(!Gt(n)){let i=On(n);for(;i&&!kr(i);){if(It(i)&&!rl(i))return i;i=On(i)}return t}let r=Dp(n,e);for(;r&&FO(r)&&rl(r);)r=Dp(r,e);return r&&kr(r)&&rl(r)&&!au(r)?t:r||function(i){let o=On(i);for(;Gt(o)&&!kr(o);){if(au(o))return o;if(Ns(o))return null;o=On(o)}return null}(n)||t}const VO={convertOffsetParentRelativeRectToViewportRelativeRect:function(n){let{elements:e,rect:t,offsetParent:r,strategy:i}=n;const o=i==="fixed",s=Vt(r),a=!!e&&Ns(e.floating);if(r===s||a&&o)return t;let l={scrollLeft:0,scrollTop:0},u=zt(1);const c=zt(0),d=Gt(r);if((d||!d&&!o)&&((Kr(r)!=="body"||no(s))&&(l=ea(r)),Gt(r))){const p=rr(r);u=Lr(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}const h=!s||d||o?zt(0):bA(s,l);return{width:t.width*u.x,height:t.height*u.y,x:t.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:t.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Vt,getClippingRect:function(n){let{element:e,boundary:t,rootBoundary:r,strategy:i}=n;const o=t==="clippingAncestors"?Ns(e)?[]:function(u,c){const d=c.get(u);if(d)return d;let h=ro(u,[],!1).filter(E=>It(E)&&Kr(E)!=="body"),p=null;const f=vt(u).position==="fixed";let m=f?On(u):u;for(;It(m)&&!kr(m);){const E=vt(m),A=au(m);A||E.position!=="fixed"||(p=null),(f?!A&&!p:!A&&E.position==="static"&&p&&jO.has(p.position)||no(m)&&!A&&kA(u,m))?h=h.filter(g=>g!==m):p=E,m=On(m)}return c.set(u,h),h}(e,this._c):[].concat(t),s=[...o,r],a=s[0],l=s.reduce((u,c)=>{const d=gp(e,c,i);return u.top=br(d.top,u.top),u.right=iu(d.right,u.right),u.bottom=iu(d.bottom,u.bottom),u.left=br(d.left,u.left),u},gp(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Op,getElementRects:async function(n){const e=this.getOffsetParent||Op,t=this.getDimensions,r=await t(n.floating);return{reference:zO(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(n){return Array.from(n.getClientRects())},getDimensions:function(n){const{width:e,height:t}=NA(n);return{width:e,height:t}},getScale:Lr,isElement:It,isRTL:function(n){return vt(n).direction==="rtl"}};function Sp(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function YO(n,e,t,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=mc(n),c=i||o?[...u?ro(u):[],...ro(e)]:[];c.forEach(E=>{i&&E.addEventListener("scroll",t,{passive:!0}),o&&E.addEventListener("resize",t)});const d=u&&a?function(E,A){let g,O=null;const S=Vt(E);function T(){var I;clearTimeout(g),(I=O)==null||I.disconnect(),O=null}return function I(C,y){C===void 0&&(C=!1),y===void 0&&(y=1),T();const _=E.getBoundingClientRect(),{left:D,top:k,width:L,height:H}=_;if(C||A(),!L||!H)return;const N={rootMargin:-Bo(k)+"px "+-Bo(S.clientWidth-(D+L))+"px "+-Bo(S.clientHeight-(k+H))+"px "+-Bo(D)+"px",threshold:br(0,iu(1,y))||1};let w=!0;function $(U){const G=U[0].intersectionRatio;if(G!==y){if(!w)return I();G?I(!1,G):g=setTimeout(()=>{I(!1,1e-7)},1e3)}G!==1||Sp(_,E.getBoundingClientRect())||I(),w=!1}try{O=new IntersectionObserver($,{...N,root:S.ownerDocument})}catch(U){O=new IntersectionObserver($,N)}O.observe(E)}(!0),T}(u,t):null;let h,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[A]=E;A&&A.target===u&&f&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var g;(g=f)==null||g.observe(e)})),t()}),u&&!l&&f.observe(u),f.observe(e));let m=l?rr(n):null;return l&&function E(){const A=rr(n);m&&!Sp(m,A)&&t(),m=A,h=requestAnimationFrame(E)}(),t(),()=>{var E;c.forEach(A=>{i&&A.removeEventListener("scroll",t),o&&A.removeEventListener("resize",t)}),d==null||d(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const GO=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=hc(n,e);if((t=o.arrow)!=null&&t.alignmentOffset)return{};const A=to(i),g=Tr(a),O=to(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=h||(O||!m?[Ho(a)]:function(N){const w=Ho(N);return[ou(N),w,ou(w)]}(a)),I=f!=="none";!h&&I&&T.push(...LO(a,m,f,S));const C=[a,...T],y=await su(e,E),_=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(c&&_.push(y[A]),d){const N=function(w,$,U){U===void 0&&(U=!1);const G=pc(w),z=CA(w),V=RA(z);let K=z==="x"?G===(U?"end":"start")?"right":"left":G==="start"?"bottom":"top";return $.reference[V]>$.floating[V]&&(K=Ho(K)),[K,Ho(K)]}(i,s,S);_.push(y[N[0]],y[N[1]])}if(D=[...D,{placement:i,overflows:_}],!_.every(N=>N<=0)){var k,L;const N=(((k=o.flip)==null?void 0:k.index)||0)+1,w=C[N];if(w&&(!(d==="alignment"&&g!==Tr(w))||D.every(U=>Tr(U.placement)!==g||U.overflows[0]>0)))return{data:{index:N,overflows:D},reset:{placement:w}};let $=(L=D.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:L.placement;if(!$)switch(p){case"bestFit":{var H;const U=(H=D.filter(G=>{if(I){const z=Tr(G.placement);return z===g||z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((G,z)=>G[1]-z[1])[0])==null?void 0:H[0];U&&($=U);break}case"initialPlacement":$=a}if(i!==$)return{reset:{placement:$}}}return{}}}},WO=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:r="referenceHidden",...i}=hc(n,e);switch(r){case"referenceHidden":{const o=Ep(await su(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ap(o)}}}case"escaped":{const o=Ep(await su(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:o,escaped:Ap(o)}}}default:return{}}}}},XO=(n,e,t)=>{const r=new Map,i={platform:VO,...t},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:u="bottom",strategy:c="absolute",middleware:d=[],platform:h}=l,p=d.filter(Boolean),f=await(h.isRTL==null?void 0:h.isRTL(a));let m=await h.getElementRects({reference:s,floating:a,strategy:c}),{x:E,y:A}=mp(m,u,f),g=u,O={},S=0;for(let T=0;T<p.length;T++){const{name:I,fn:C}=p[T],{x:y,y:_,data:D,reset:k}=await C({x:E,y:A,initialPlacement:u,placement:g,strategy:c,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=y!=null?y:E,A=_!=null?_:A,O={...O,[I]:{...O[I],...D}},k&&S<=50&&(S++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(m=k.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:c}):k.rects),{x:E,y:A}=mp(m,g,f)),T=-1)}return{x:E,y:A,placement:g,strategy:c,middlewareData:O}})(n,e,{...i,platform:o})};var Qo=typeof document!="undefined"?Et:function(){};function bs(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,r,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(r=t;r--!=0;)if(!bs(n[r],e[r]))return!1;return!0}if(i=Object.keys(n),t=i.length,t!==Object.keys(e).length)return!1;for(r=t;r--!=0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=t;r--!=0;){const o=i[r];if((o!=="_owner"||!n.$$typeof)&&!bs(n[o],e[o]))return!1}return!0}return n!=n&&e!=e}function LA(n){return typeof window=="undefined"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Tp(n,e){const t=LA(n);return Math.round(e*t)/t}function il(n){const e=Q(n);return Qo(()=>{e.current=n}),e}const KO=(n,e)=>({...GO(n),options:[n,e]}),JO=(n,e)=>({...WO(n),options:[n,e]});var wA={exports:{}},MA=["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])"],ks=MA.join(","),FA=typeof Element=="undefined",ir=FA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,es=!FA&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n==null?void 0:n.ownerDocument},io=function(n,e){var t;e===void 0&&(e=!0);var r=n==null||(t=n.getAttribute)===null||t===void 0?void 0:t.call(n,"inert");return r===""||r==="true"||e&&n&&io(n.parentNode)},PA=function(n,e,t){if(io(n))return[];var r=Array.prototype.slice.apply(n.querySelectorAll(ks));return e&&ir.call(n,ks)&&r.unshift(n),r=r.filter(t)},Ls=function(n,e,t){for(var r=[],i=Array.from(n);i.length;){var o=i.shift();if(!io(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=Ls(a,!0,t);t.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{ir.call(o,ks)&&t.filter(o)&&(e||!n.includes(o))&&r.push(o);var u=o.shadowRoot||typeof t.getShadowRoot=="function"&&t.getShadowRoot(o),c=!io(u,!1)&&(!t.shadowRootFilter||t.shadowRootFilter(o));if(u&&c){var d=Ls(u===!0?o.children:u.children,!0,t);t.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},xA=function(n){return!isNaN(parseInt(n.getAttribute("tabindex"),10))},gn=function(n){if(!n)throw new Error("No node provided");return n.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(n.tagName)||function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"}(n))&&!xA(n)?0:n.tabIndex},qO=function(n,e){return n.tabIndex===e.tabIndex?n.documentOrder-e.documentOrder:n.tabIndex-e.tabIndex},BA=function(n){return n.tagName==="INPUT"},ZO=function(n){return function(e){return BA(e)&&e.type==="radio"}(n)&&!function(e){if(!e.name)return!0;var t,r=e.form||es(e),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")t=i(window.CSS.escape(e.name));else try{t=i(e.name)}catch(s){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",s.message),!1}var o=function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]}(t,e.form);return!o||o===e}(n)},Rp=function(n){var e=n.getBoundingClientRect(),t=e.width,r=e.height;return t===0&&r===0},QO=function(n,e){var t=e.displayCheck,r=e.getShadowRoot;if(t==="full-native"&&"checkVisibility"in n)return!n.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(n).visibility==="hidden")return!0;var i=ir.call(n,"details>summary:first-of-type")?n.parentElement:n;if(ir.call(i,"details:not([open]) *"))return!0;if(t&&t!=="full"&&t!=="full-native"&&t!=="legacy-full"){if(t==="non-zero-area")return Rp(n)}else{if(typeof r=="function"){for(var o=n;n;){var s=n.parentElement,a=es(n);if(s&&!s.shadowRoot&&r(s)===!0)return Rp(n);n=n.assignedSlot?n.assignedSlot:s||a===n.ownerDocument?s:a.host}n=o}if(function(l){var u,c,d,h,p=l&&es(l),f=(u=p)===null||u===void 0?void 0:u.host,m=!1;if(p&&p!==l)for(m=!!((c=f)!==null&&c!==void 0&&(d=c.ownerDocument)!==null&&d!==void 0&&d.contains(f)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!m&&f;){var E,A,g;m=!((A=f=(E=p=es(f))===null||E===void 0?void 0:E.host)===null||A===void 0||(g=A.ownerDocument)===null||g===void 0||!g.contains(f))}return m}(n))return!n.getClientRects().length;if(t!=="legacy-full")return!0}return!1},ws=function(n,e){return!(e.disabled||io(e)||function(t){return BA(t)&&t.type==="hidden"}(e)||QO(e,n)||function(t){return t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"})}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!ir.call(r,"fieldset[disabled] *")||!o.contains(t)}return!0}r=r.parentElement}return!1}(e))},uu=function(n,e){return!(ZO(e)||gn(e)<0||!ws(n,e))},eS=function(n){var e=parseInt(n.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},HA=function(n){var e=[],t=[];return n.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=function(u,c){var d=gn(u);return d<0&&c&&!xA(u)?0:d}(s,o),l=o?HA(r.candidates):s;a===0?o?e.push.apply(e,l):e.push(s):t.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),t.sort(qO).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(e)},UA=function(n,e){var t;return t=(e=e||{}).getShadowRoot?Ls([n],e.includeContainer,{filter:uu.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:eS}):PA(n,e.includeContainer,uu.bind(null,e)),HA(t)},Ec=function(n,e){return(e=e||{}).getShadowRoot?Ls([n],e.includeContainer,{filter:ws.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):PA(n,e.includeContainer,ws.bind(null,e))},xn=function(n,e){if(e=e||{},!n)throw new Error("No node provided");return ir.call(n,ks)!==!1&&uu(e,n)},tS=MA.concat("iframe").join(","),ts=function(n,e){if(e=e||{},!n)throw new Error("No node provided");return ir.call(n,tS)!==!1&&ws(e,n)};const nS=Object.freeze(Object.defineProperty({__proto__:null,focusable:Ec,getTabIndex:gn,isFocusable:ts,isTabbable:xn,tabbable:UA},Symbol.toStringTag,{value:"Module"}));function ol(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function rS(n,e,t){return(e=function(r){var i=function(o,s){if(typeof o!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,s);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)}(r,"string");return typeof i=="symbol"?i:i+""}(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Cp(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Ip(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Cp(Object(t),!0).forEach(function(r){rS(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Cp(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function iS(n){return function(e){if(Array.isArray(e))return ol(e)}(n)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(n)||function(e,t){if(e){if(typeof e=="string")return ol(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ol(e,t):void 0}}(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
92
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var oS=function(n,e){if(n.length>0){var t=n[n.length-1];t!==e&&t._setPausedState(!0)}var r=n.indexOf(e);r===-1||n.splice(r,1),n.push(e)},sS=function(n,e){var t=n.indexOf(e);t!==-1&&n.splice(t,1),n.length>0&&!n[n.length-1]._isManuallyPaused()&&n[n.length-1]._setPausedState(!1)},Ui=function(n){return(n==null?void 0:n.key)==="Tab"||(n==null?void 0:n.keyCode)===9},aS=function(n){return Ui(n)&&!n.shiftKey},lS=function(n){return Ui(n)&&n.shiftKey},vp=function(n){return setTimeout(n,0)},ui=function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return typeof n=="function"?n.apply(void 0,t):n},Uo=function(n){return n.target.shadowRoot&&typeof n.composedPath=="function"?n.composedPath()[0]:n.target},uS=[];const cS=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(n,e){var t,r=(e==null?void 0:e.document)||document,i=(e==null?void 0:e.trapStack)||uS,o=Ip({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:aS,isKeyBackward:lS},e),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(_,D,k){return _&&_[D]!==void 0?_[D]:o[k||D]},l=function(_,D){var k=typeof(D==null?void 0:D.composedPath)=="function"?D.composedPath():void 0;return s.containerGroups.findIndex(function(L){var H=L.container,N=L.tabbableNodes;return H.contains(_)||(k==null?void 0:k.includes(H))||N.find(function(w){return w===_})})},u=function(_){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=D.hasFallback,L=k!==void 0&&k,H=D.params,N=H===void 0?[]:H,w=o[_];if(typeof w=="function"&&(w=w.apply(void 0,iS(N))),w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(_,"` was specified but was not a node, or did not return a node"))}var $=w;if(typeof w=="string"){try{$=r.querySelector(w)}catch(U){throw new Error("`".concat(_,'` appears to be an invalid selector; error="').concat(U.message,'"'))}if(!$&&!L)throw new Error("`".concat(_,"` as selector refers to no known node"))}return $},c=function(){var _=u("initialFocus",{hasFallback:!0});if(_===!1)return!1;if(_===void 0||_&&!ts(_,o.tabbableOptions))if(l(r.activeElement)>=0)_=r.activeElement;else{var D=s.tabbableGroups[0];_=D&&D.firstTabbableNode||u("fallbackFocus")}else _===null&&(_=u("fallbackFocus"));if(!_)throw new Error("Your focus-trap needs to have at least one focusable element");return _},d=function(){if(s.containerGroups=s.containers.map(function(_){var D=UA(_,o.tabbableOptions),k=Ec(_,o.tabbableOptions),L=D.length>0?D[0]:void 0,H=D.length>0?D[D.length-1]:void 0,N=k.find(function(U){return xn(U)}),w=k.slice().reverse().find(function(U){return xn(U)}),$=!!D.find(function(U){return gn(U)>0});return{container:_,tabbableNodes:D,focusableNodes:k,posTabIndexesFound:$,firstTabbableNode:L,lastTabbableNode:H,firstDomTabbableNode:N,lastDomTabbableNode:w,nextTabbableNode:function(U){var G=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],z=D.indexOf(U);return z<0?G?k.slice(k.indexOf(U)+1).find(function(V){return xn(V)}):k.slice(0,k.indexOf(U)).reverse().find(function(V){return xn(V)}):D[z+(G?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(_){return _.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(_){return _.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(_){var D=_.activeElement;if(D)return D.shadowRoot&&D.shadowRoot.activeElement!==null?h(D.shadowRoot):D},p=function(_){_!==!1&&_!==h(document)&&(_&&_.focus?(_.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=_,function(D){return D.tagName&&D.tagName.toLowerCase()==="input"&&typeof D.select=="function"}(_)&&_.select()):p(c()))},f=function(_){var D=u("setReturnFocus",{params:[_]});return D||D!==!1&&_},m=function(_){var D=_.target,k=_.event,L=_.isBackward,H=L!==void 0&&L;D=D||Uo(k),d();var N=null;if(s.tabbableGroups.length>0){var w=l(D,k),$=w>=0?s.containerGroups[w]:void 0;if(w<0)N=H?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(H){var U=s.tabbableGroups.findIndex(function(oe){var M=oe.firstTabbableNode;return D===M});if(U<0&&($.container===D||ts(D,o.tabbableOptions)&&!xn(D,o.tabbableOptions)&&!$.nextTabbableNode(D,!1))&&(U=w),U>=0){var G=U===0?s.tabbableGroups.length-1:U-1,z=s.tabbableGroups[G];N=gn(D)>=0?z.lastTabbableNode:z.lastDomTabbableNode}else Ui(k)||(N=$.nextTabbableNode(D,!1))}else{var V=s.tabbableGroups.findIndex(function(oe){var M=oe.lastTabbableNode;return D===M});if(V<0&&($.container===D||ts(D,o.tabbableOptions)&&!xn(D,o.tabbableOptions)&&!$.nextTabbableNode(D))&&(V=w),V>=0){var K=V===s.tabbableGroups.length-1?0:V+1,J=s.tabbableGroups[K];N=gn(D)>=0?J.firstTabbableNode:J.firstDomTabbableNode}else Ui(k)||(N=$.nextTabbableNode(D))}}else N=u("fallbackFocus");return N},E=function(_){var D=Uo(_);l(D,_)>=0||(ui(o.clickOutsideDeactivates,_)?t.deactivate({returnFocus:o.returnFocusOnDeactivate}):ui(o.allowOutsideClick,_)||_.preventDefault())},A=function(_){var D=Uo(_),k=l(D,_)>=0;if(k||D instanceof Document)k&&(s.mostRecentlyFocusedNode=D);else{var L;_.stopImmediatePropagation();var H=!0;if(s.mostRecentlyFocusedNode)if(gn(s.mostRecentlyFocusedNode)>0){var N=l(s.mostRecentlyFocusedNode),w=s.containerGroups[N].tabbableNodes;if(w.length>0){var $=w.findIndex(function(U){return U===s.mostRecentlyFocusedNode});$>=0&&(o.isKeyForward(s.recentNavEvent)?$+1<w.length&&(L=w[$+1],H=!1):$-1>=0&&(L=w[$-1],H=!1))}}else s.containerGroups.some(function(U){return U.tabbableNodes.some(function(G){return gn(G)>0})})||(H=!1);else H=!1;H&&(L=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(L||s.mostRecentlyFocusedNode||c())}s.recentNavEvent=void 0},g=function(_){(o.isKeyForward(_)||o.isKeyBackward(_))&&function(D){var k=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=D;var L=m({event:D,isBackward:k});L&&(Ui(D)&&D.preventDefault(),p(L))}(_,o.isKeyBackward(_))},O=function(_){(function(D){return(D==null?void 0:D.key)==="Escape"||(D==null?void 0:D.key)==="Esc"||(D==null?void 0:D.keyCode)===27})(_)&&ui(o.escapeDeactivates,_)!==!1&&(_.preventDefault(),t.deactivate())},S=function(_){var D=Uo(_);l(D,_)>=0||ui(o.clickOutsideDeactivates,_)||ui(o.allowOutsideClick,_)||(_.preventDefault(),_.stopImmediatePropagation())},T=function(){if(s.active)return oS(i,t),s.delayInitialFocusTimer=o.delayInitialFocus?vp(function(){p(c())}):p(c()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),r.addEventListener("keydown",O),t},I=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",g,!0),r.removeEventListener("keydown",O),t},C=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(_){_.some(function(D){return Array.from(D.removedNodes).some(function(k){return k===s.mostRecentlyFocusedNode})})&&p(c())}):void 0,y=function(){C&&(C.disconnect(),s.active&&!s.paused&&s.containers.map(function(_){C.observe(_,{subtree:!0,childList:!0})}))};return t={get active(){return s.active},get paused(){return s.paused},activate:function(_){if(s.active)return this;var D=a(_,"onActivate"),k=a(_,"onPostActivate"),L=a(_,"checkCanFocusTrap");L||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),D==null||D();var H=function(){L&&d(),T(),y(),k==null||k()};return L?(L(s.containers.concat()).then(H,H),this):(H(),this)},deactivate:function(_){if(!s.active)return this;var D=Ip({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},_);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,I(),s.active=!1,s.paused=!1,y(),sS(i,t);var k=a(D,"onDeactivate"),L=a(D,"onPostDeactivate"),H=a(D,"checkCanReturnFocus"),N=a(D,"returnFocus","returnFocusOnDeactivate");k==null||k();var w=function(){vp(function(){N&&p(f(s.nodeFocusedBeforeActivation)),L==null||L()})};return N&&H?(H(f(s.nodeFocusedBeforeActivation)).then(w,w),this):(w(),this)},pause:function(_){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,_)):this},unpause:function(_){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,_)):this},updateContainerElements:function(_){var D=[].concat(_).filter(Boolean);return s.containers=D.map(function(k){return typeof k=="string"?r.querySelector(k):k}),s.active&&d(),y(),this}},Object.defineProperties(t,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(_,D){if(s.paused===_)return this;if(s.paused=_,_){var k=a(D,"onPause"),L=a(D,"onPostPause");k==null||k(),I(),y(),L==null||L()}else{var H=a(D,"onUnpause"),N=a(D,"onPostUnpause");H==null||H(),d(),T(),y(),N==null||N()}return this}}}),t.updateContainerElements(n),t}},Symbol.toStringTag,{value:"Module"})),dS=Bu(cS),hS=Bu(nS);function wr(n){return wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(n)}var sl,al;function pS(n,e,t){return e&&function(r,i){for(var o=0;o<i.length;o++){var s=i[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,jA(s.key),s)}}(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function fS(n,e,t){return e=Ms(e),function(r,i){if(i&&(wr(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r)}(n,$A()?Reflect.construct(e,t||[],Ms(n).constructor):e.apply(n,t))}function $A(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($A=function(){return!!n})()}function Ms(n){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ms(n)}function cu(n,e){return cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},cu(n,e)}function jA(n){var e=function(t,r){if(wr(t)!="object"||!t)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var o=i.call(t,r);if(wr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n,"string");return wr(e)=="symbol"?e:e+""}var vi=im,mS=dS.createFocusTrap,ES=hS.isFocusable,AS=parseInt((sl=(al=/^(\d+)\./.exec(vi.version))===null||al===void 0?void 0:al[1])!==null&&sl!==void 0?sl:0,10),du=function(){function n(e){var t;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,n),function(o,s,a){(s=jA(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(t=fS(this,n,[e]),"getNodeForOption",function(o){var s,a=(s=this.internalOptions[o])!==null&&s!==void 0?s:this.originalOptions[o];if(typeof a=="function"){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a=a.apply(void 0,u)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var d,h=a;if(typeof a=="string"&&!(h=(d=this.getDocument())===null||d===void 0?void 0:d.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return h}),t.handleDeactivate=t.handleDeactivate.bind(t),t.handlePostDeactivate=t.handlePostDeactivate.bind(t),t.handleClickOutsideDeactivates=t.handleClickOutsideDeactivates.bind(t),t.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:t.handleDeactivate,onPostDeactivate:t.handlePostDeactivate,clickOutsideDeactivates:t.handleClickOutsideDeactivates},t.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=e.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?t.internalOptions[i]=r[i]:t.originalOptions[i]=r[i]);return t.outsideClick=null,t.focusTrapElements=e.containerElements||[],t.updatePreviousElement(),t}return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cu(e,t)}(n,vi.Component),pS(n,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var e=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return e||e!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var e=this.getDocument();e&&(this.previouslyFocusedElement=e.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(e){var t=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,e):this.originalOptions.clickOutsideDeactivates;return t&&(this.outsideClick={target:e.target,allowDeactivation:t}),t}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var e=this,t=function(){var r=e.getReturnFocusNode(),i=!(!e.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||e.outsideClick&&(!e.outsideClick.allowDeactivation||ES(e.outsideClick.target,e.internalOptions.tabbableOptions))),o=e.internalOptions.preventScroll,s=o!==void 0&&o;i&&r.focus({preventScroll:s}),e.originalOptions.onPostDeactivate&&e.originalOptions.onPostDeactivate.call(null),e.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(t,t):t()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(e){if(this.focusTrap){e.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var t=!e.active&&this.props.active,r=e.active&&!this.props.active,i=!e.paused&&this.props.paused,o=e.paused&&!this.props.paused;if(t&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else e.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var e=this,t=this.props.children?vi.Children.only(this.props.children):void 0;if(t){if(t.type&&t.type===vi.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return vi.cloneElement(t,{ref:function(r){var i=e.props.containerElements;t&&(AS>=19?typeof t.props.ref=="function"?t.props.ref(r):t.props.ref&&(t.props.ref.current=r):typeof t.ref=="function"?t.ref(r):t.ref&&(t.ref.current=r)),e.focusTrapElements=i||[r]}})}return null}}])}();du.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:mS},wA.exports=du;var _S=wA.exports.FocusTrap=du;function zA(n){var m;const{children:e,preferredPlacement:t="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,...a}=n,{anchor:l,boundary:u}=Z(()=>({anchor:Np(r),boundary:i?Np(i):void 0}),[r,i]);let c=[];u&&(c=[KO({boundary:u}),JO({boundary:u})]);const{refs:d,floatingStyles:h,middlewareData:p}=function(E){E===void 0&&(E={});const{placement:A="bottom",strategy:g="absolute",middleware:O=[],platform:S,elements:{reference:T,floating:I}={},transform:C=!0,whileElementsMounted:y,open:_}=E,[D,k]=ie({x:0,y:0,strategy:g,placement:A,middlewareData:{},isPositioned:!1}),[L,H]=ie(O);bs(L,O)||H(O);const[N,w]=ie(null),[$,U]=ie(null),G=ee(Ee=>{Ee!==J.current&&(J.current=Ee,w(Ee))},[]),z=ee(Ee=>{Ee!==oe.current&&(oe.current=Ee,U(Ee))},[]),V=T||N,K=I||$,J=Q(null),oe=Q(null),M=Q(D),le=y!=null,ve=il(y),Ne=il(S),at=il(_),Ot=ee(()=>{if(!J.current||!oe.current)return;const Ee={placement:A,strategy:g,middleware:L};Ne.current&&(Ee.platform=Ne.current),XO(J.current,oe.current,Ee).then(lr=>{const wt={...lr,isPositioned:at.current!==!1};ti.current&&!bs(M.current,wt)&&(M.current=wt,yu(()=>{k(wt)}))})},[L,A,g,Ne,at]);Qo(()=>{_===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,k(Ee=>({...Ee,isPositioned:!1})))},[_]);const ti=Q(!1);Qo(()=>(ti.current=!0,()=>{ti.current=!1}),[]),Qo(()=>{if(V&&(J.current=V),K&&(oe.current=K),V&&K){if(ve.current)return ve.current(V,K,Ot);Ot()}},[V,K,Ot,ve,le]);const Lt=Z(()=>({reference:J,floating:oe,setReference:G,setFloating:z}),[G,z]),Le=Z(()=>({reference:V,floating:K}),[V,K]),Kt=Z(()=>{const Ee={position:g,left:0,top:0};if(!Le.floating)return Ee;const lr=Tp(Le.floating,D.x),wt=Tp(Le.floating,D.y);return C?{...Ee,transform:"translate("+lr+"px, "+wt+"px)",...LA(Le.floating)>=1.5&&{willChange:"transform"}}:{position:g,left:lr,top:wt}},[g,C,Le.floating,D.x,D.y]);return Z(()=>({...D,update:Ot,refs:Lt,elements:Le,floatingStyles:Kt}),[D,Ot,Lt,Le,Kt])}({placement:t,middleware:c,whileElementsMounted:YO});Et(()=>{l&&d.setReference(l)},[d,l]);const f=o?v(_S,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:v("div",{children:[e,v("span",{className:"t-fallback-focus",tabIndex:-1})]})}):e;return v("div",{ref:d.setFloating,style:{...h,zIndex:1e3,visibility:(m=p.hide)!=null&&m.referenceHidden?"hidden":"visible"},...a,children:f})}function Np(n){return typeof n=="string"?document.querySelector(n):n}function VA(n){const e=ce(),t=po(),r=ne(t.state$.suggestMentionQuery),i=function(E,A=10){const g=ar(Hu),[O,S]=ie(null);return Y(()=>{const T=g.conversation(E).subscribeParticipants(I=>S(I));return A>10&&T.connected.then(async()=>{for(;T.state.type==="active"&&!T.state.loadedAll&&T.state.latestSnapshot!==null&&T.state.latestSnapshot.length<A;){const I=Math.min(A-T.state.latestSnapshot.length,50);await T.loadMore(I)}}),()=>{T.unsubscribe()}},[E,g,A]),O}(ne(e.state$.extCurrentConversationId),r?1e3:0),o=Z(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ie(0),l=Z(()=>Object.fromEntries(o.map(E=>[E.id,yg(E.name)])),[o]),u=Z(()=>{if(!r)return[];const E=yp(r);return E===""?o:o.filter(A=>l[A.id].some(g=>function(O,S){return Rd(O.substring(0,S.length),S)}(g,E)))},[r,o,l]),c=Q(void 0);Y(()=>{if(c.current){const E=u.findIndex(A=>A.id===c.current);a(E===-1?0:E)}},[u]),Y(()=>{var E;c.current=(E=u[s])==null?void 0:E.id},[s,u]);const d=ee(E=>{var g;const A=(g=u[E])==null?void 0:g.id;return A&&"mention-button-"+A},[u]),{containerProps:h,itemProps:p}=OA({focused:s,setFocused:a,buttonId:d});if(Y(()=>{if(u.length!==0)return t.listenKeydown("mention",E=>DA(E,{dir:"ttb",focused:s,setFocused:a,itemCount:u.length,onSpace(){if(r){const A=u[s];if(Rd(A.name,yp(r)))return t.selectMention(A),!0}return!1},onConfirm(){const A=u[s];t.selectMention(A)}})),()=>{t.listenKeydown("mention",void 0)}},[t,s,u,r]),go(()=>t.closeSuggester(),".t-mention-suggest-list",u.length>0),u.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const A=f.getBoundingClientRect();return A.width>0&&(E=A),E}}}return v(zA,{className:"t-mention-suggest-list",...h,anchorElement:m,children:u.map((E,A)=>v(gS,{user:E,isFocused:A===s,onSelect:()=>t.selectMention(E),...p(A)},E.id))})}const gS=cn(function(n){const{user:e,isFocused:t,onSelect:r,...i}=n;return v("button",{className:t?"focused":"",onClick:()=>r(e.id),...i,children:e.name})});function yp(n){return pe(n[0]==="@"),n.substring(1)}function bp(n,e,t){const r=Ec(n),i=r.indexOf(e);return i===-1?null:r[i+t]||null}const DS=Nt(function(n,e){const{children:t,triggerElement:r}=n,{closePopover:i}=Uu(),o=Q(null);Nn(e,()=>o.current),Y(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=ee(a=>{(function(l,u,c,d){var E;const h=u.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(h).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,h.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=h.length-1);break;case"Home":m=0;break;case"End":m=h.length-1;break;case"Tab":{const A=c.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),g=l.shiftKey?bp(A,c,-1):function(O,S){return bp(O,S,1)}(A,c);return g==null||g.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return v("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:t})});function Rr(n){const{popoverComponent:e,popoverProps:t,children:r,type:i="popover",initialFocus:o,...s}=n,[a,l]=ie(void 0),u=Q(null),[c,d]=ie(!1);go(ee(()=>{var p;d(!1),(p=u.current)==null||p.focus()},[]),"[t-popover-content]",c);const h=i==="menu"?v(DS,{triggerElement:u.current,children:v(e,{...t})}):v(e,{...t});return v(Og.Provider,{value:{closePopover:()=>d(!1)},children:[v(OS,{...s,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":c,onTrigger:()=>d(!0),ref:p=>(f=>{var E;const m=(E=f==null?void 0:f.closest("[t-menu-boundary]"))!=null?E:void 0;u.current=f,l(m)})(p),children:r}),c&&v(zA,{"t-popover-content":"",anchorElement:u.current,boundaryElement:a,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:h})]})}const OS=Nt(function(n,e){const{onTrigger:t,...r}=n,i=ee(o=>{o.key!=="Enter"&&o.key!==" "||t()},[t]);return v("button",{...r,ref:e,onClick:t,onKeyDown:i})});function An(n){const{onSelect:e,...t}=n,{closePopover:r}=Uu(),i=ee(o=>{o.key!=="Enter"&&o.key!==" "||(r(),e==null||e())},[e,r]);return v("div",{tabIndex:-1,role:"menuitem",onClick:ee(()=>{r(),e==null||e()},[r,e]),onKeyDown:i,"t-menu-item":"",...t})}function YA(n){return Om(n)}function or(n){var e;return(e=n.photoUrl)!=null?e:function(t,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
93
|
-
<rect x="0" y="0" width="100" height="100" fill="${Om(t)}"/>
|
|
92
|
+
`,[t,n]}setOptions(t){if(this.options.container!==t.container){const n=this.parentFromOptionsContainer(t.container);n.appendChild(this.container),this.parent=n}t.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){const{scrollWidth:n}=this.scrollContainer,r=n*t;this.setScroll(r)}destroy(){var t;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(t=this.unsubscribeOnScroll)===null||t===void 0||t.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(t=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},t)})}getHeight(t,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:c=128}){if(o==null)return c;const u=Number(o);if(!isNaN(u))return u;if(o==="auto"){const d=a||c;return s!=null&&s.every(h=>!h.overlay)?d/l:d}return c}({optionsHeight:t,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(t,n){return function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,c=a.createLinearGradient(0,0,0,l||i),u=1/(r.length-1);return r.forEach((d,h)=>{c.addColorStop(h*u,d)}),c}(t,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return t=window.devicePixelRatio,Math.max(1,t||1);var t}renderBarWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:c,barIndexScale:u,barSpacing:d,barMinHeight:h}=function({width:p,height:m,length:E,options:A,pixelRatio:_}){const O=m/2,S=A.barWidth?A.barWidth*_:1,T=A.barGap?A.barGap*_:A.barWidth?S/2:0,b=S+T||1;return{halfHeight:O,barWidth:S,barGap:T,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*_:0,barIndexScale:E>0?p/b/E:0,barSpacing:b}}({width:o,height:s,length:(t[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),f=function({channelData:p,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:_,vScale:O,canvasHeight:S,barAlign:T,barMinHeight:b}){const v=p[0]||[],N=p[1]||v,g=v.length,D=[];let k=0,C=0,M=0;for(let I=0;I<=g;I++){const w=Math.round(I*m);if(w>k){const{topHeight:z,totalHeight:V}=GS({maxTop:C,maxBottom:M,halfHeight:_,vScale:O,barMinHeight:b,barAlign:T}),Y=WS({barAlign:T,halfHeight:_,topHeight:z,totalHeight:V,canvasHeight:S});D.push({x:k*E,y:Y,width:A,height:V}),k=w,C=0,M=0}const H=Math.abs(v[I]||0),P=Math.abs(N[I]||0);H>C&&(C=H),P>M&&(M=P)}return D}({channelData:t,barIndexScale:u,barSpacing:d,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:h});r.beginPath();for(const p of f)c&&"roundRect"in r?r.roundRect(p.x,p.y,p.width,p.height,c):r.rect(p.x,p.y,p.width,p.height);r.fill(),r.closePath()}renderLineWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,a=function({channelData:l,width:c,height:u,vScale:d}){const h=u/2,f=l[0]||[];return[f,l[1]||f].map((p,m)=>{const E=p.length,A=E?c/E:0,_=h,O=m===0?-1:1,S=[{x:0,y:_}];let T=0,b=0;for(let v=0;v<=E;v++){const N=Math.round(v*A);if(N>T){const D=_+(Math.round(b*h*d)||1)*O;S.push({x:T,y:D}),T=N,b=0}const g=Math.abs(p[v]||0);g>b&&(b=g)}return S.push({x:T,y:_}),S})}({channelData:t,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let c=1;c<l.length;c++){const u=l[c];r.lineTo(u.x,u.y)}}r.fill(),r.closePath()}renderWaveform(t,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(t,r);const i=function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var c;const u=s||1;if(!a)return u;const d=o[0];if(!d||d.length===0)return u;let h=l!=null?l:0;if(!l)for(let f=0;f<d.length;f++){const p=(c=d[f])!==null&&c!==void 0?c:0,m=Math.abs(p);m>h&&(h=m)}return h?u/h:u}({channelData:t,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});jE(n)?this.renderBarWaveform(t,n,r,i):this.renderLineWaveform(t,n,r,i)}renderSingleCanvas(t,n,r,i,o,s,a){const l=this.getPixelRatio(),c=document.createElement("canvas");c.width=Math.round(r*l),c.height=Math.round(i*l),c.style.width=`${r}px`,c.style.height=`${i}px`,c.style.left=`${Math.round(o)}px`,s.appendChild(c);const u=c.getContext("2d");if(n.renderFunction?(u.fillStyle=this.convertColorValues(n.waveColor,u),n.renderFunction(t,u)):this.renderWaveform(t,n,u),c.width>0&&c.height>0){const d=c.cloneNode(),h=d.getContext("2d");h.drawImage(c,0,0),h.globalCompositeOperation="source-in",h.fillStyle=this.convertColorValues(n.progressColor,h),h.fillRect(0,0,c.width,c.height),a.appendChild(d)}}renderMultiCanvas(t,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,c=r/a,u=function({clientWidth:p,totalWidth:m,options:E}){return Uh(Math.min(8e3,p,m),E)}({clientWidth:l,totalWidth:c,options:n});let d={};if(u===0)return;const h=p=>{if(p<0||p>=f||d[p])return;d[p]=!0;const m=p*u;let E=Math.min(c-m,u);if(E=Uh(E,n),E<=0)return;const A=function({channelData:_,offset:O,clampedWidth:S,totalWidth:T}){return _.map(b=>{const v=Math.floor(O/T*b.length),N=Math.floor((O+S)/T*b.length);return b.slice(v,N)})}({channelData:t,offset:m,clampedWidth:E,totalWidth:c});this.renderSingleCanvas(A,n,E,i,m,o,s)},f=Math.ceil(c/u);if(this.isScrollable){if(Bh({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:c,numCanvases:f}).forEach(p=>h(p)),f>1){const p=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(d).length>10&&(o.innerHTML="",s.innerHTML="",d={}),Bh({scrollLeft:m,totalWidth:c,numCanvases:f}).forEach(E=>h(E))});this.unsubscribeOnScroll.push(p)}}else for(let p=0;p<f;p++)h(p)}renderChannel(t,n,r,i){var{overlay:o}=n,s=function(u,d){var h={};for(var f in u)Object.prototype.hasOwnProperty.call(u,f)&&d.indexOf(f)<0&&(h[f]=u[f]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function"){var p=0;for(f=Object.getOwnPropertySymbols(u);p<f.length;p++)d.indexOf(f[p])<0&&Object.prototype.propertyIsEnumerable.call(u,f[p])&&(h[f[p]]=u[f[p]])}return h}(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const c=a.cloneNode();this.progressWrapper.appendChild(c),this.renderMultiCanvas(t,s,r,l,a,c)}render(t){return te(this,void 0,void 0,function*(){var n;this.timeouts.forEach(c=>c()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=function({duration:c,minPxPerSec:u=0,parentWidth:d,fillParent:h,pixelRatio:f}){const p=Math.ceil(c*u),m=p>d,E=!!(h&&!m);return{scrollWidth:p,isScrollable:m,useParentWidth:E,width:(E?d:p)*f}}({duration:t.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let c=0;c<t.numberOfChannels;c++){const u=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[c]);this.renderChannel([t.getChannelData(c)],u,l,c)}else{const c=[t.getChannelData(0)];t.numberOfChannels>1&&c.push(t.getChannelData(1)),this.renderChannel(c,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2}(r-n);this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=t*i,a=r,l=r+o,c=o/2;if(this.isDragging)s+30>l?this.scrollContainer.scrollLeft+=30:s-30<a&&(this.scrollContainer.scrollLeft-=30);else{(s<a||s>l)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?c:0));const u=s-r-c;n&&this.options.autoCenter&&u>0&&(this.scrollContainer.scrollLeft+=u)}}renderProgress(t,n){if(isNaN(t))return;const r=100*t;this.canvasWrapper.style.clipPath=`polygon(${r}% 0%, 100% 0%, 100% 100%, ${r}% 100%)`,this.progressWrapper.style.width=`${r}%`,this.cursor.style.left=`${r}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${t*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(t,n)}exportImage(t,n,r){return te(this,void 0,void 0,function*(){const i=this.canvasWrapper.querySelectorAll("canvas");if(!i.length)throw new Error("No waveform data");if(r==="dataURL"){const o=Array.from(i).map(s=>s.toDataURL(t,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},t,n)})))})}}class KS extends co{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class Ba extends co{constructor(t=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return te(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${t}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===t&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;(t>=this.duration||t<0)&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return te(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const n=t-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return te(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){const n=!this.paused;n&&this._pause(),this.playedDuration=t/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,n;return(t=this._duration)!==null&&t!==void 0?t:((n=this.buffer)===null||n===void 0?void 0:n.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){const t=[];if(!this.buffer)return t;const n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)t.push(this.buffer.getChannelData(r));return t}removeAttribute(t){switch(t){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}const qS={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Yi extends zS{static create(t){return new Yi(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const n=t.media||(t.backend==="WebAudio"?new Ba:void 0);super({media:n,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},qS,t);const{state:r,actions:i}=function(a){var l,c,u,d,h,f;const p=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:St(0),m=(c=a==null?void 0:a.duration)!==null&&c!==void 0?c:St(0),E=(u=a==null?void 0:a.isPlaying)!==null&&u!==void 0?u:St(!1),A=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:St(!1),_=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:St(1),O=(f=a==null?void 0:a.playbackRate)!==null&&f!==void 0?f:St(1),S=St(null),T=St(null),b=St(""),v=St(0),N=St(0),g=Yn(()=>!E.value,[E]),D=Yn(()=>S.value!==null,[S]),k=Yn(()=>D.value&&m.value>0,[D,m]),C=Yn(()=>p.value,[p]),M=Yn(()=>m.value>0?p.value/m.value:0,[p,m]);return{state:{currentTime:p,duration:m,isPlaying:E,isPaused:g,isSeeking:A,volume:_,playbackRate:O,audioBuffer:S,peaks:T,url:b,zoom:v,scrollPosition:N,canPlay:D,isReady:k,progress:C,progressPercent:M},actions:{setCurrentTime:I=>{const w=Math.max(0,Math.min(m.value||1/0,I));p.set(w)},setDuration:I=>{m.set(Math.max(0,I))},setPlaying:I=>{E.set(I)},setSeeking:I=>{A.set(I)},setVolume:I=>{const w=Math.max(0,Math.min(1,I));_.set(w)},setPlaybackRate:I=>{const w=Math.max(.1,Math.min(16,I));O.set(w)},setAudioBuffer:I=>{S.set(I),I&&m.set(I.duration)},setPeaks:I=>{T.set(I)},setUrl:I=>{b.set(I)},setZoom:I=>{v.set(Math.max(0,I))},setScrollPosition:I=>{N.set(Math.max(0,I))}}}}({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new KS;const o=n?void 0:this.getMediaElement();this.renderer=new XS(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(c=>{this.emit("error",c instanceof Error?c:new Error(String(c)))})})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){const t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push(function(t,n){const r=[];r.push(On(()=>{const s=t.isPlaying.value;n.emit(s?"play":"pause")},[t.isPlaying])),r.push(On(()=>{const s=t.currentTime.value;n.emit("timeupdate",s),t.isPlaying.value&&n.emit("audioprocess",s)},[t.currentTime,t.isPlaying])),r.push(On(()=>{t.isSeeking.value&&n.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let i=!1;r.push(On(()=>{t.isReady.value&&!i&&(i=!0,n.emit("ready",t.duration.value))},[t.isReady,t.duration]));let o=!1;return r.push(On(()=>{const s=t.isPlaying.value,a=t.currentTime.value,l=t.duration.value,c=l>0&&a>=l;o&&!s&&c&&n.emit("finish"),o=s&&c},[t.isPlaying,t.currentTime,t.duration])),r.push(On(()=>{const s=t.zoom.value;s>0&&n.emit("zoom",s)},[t.zoom])),()=>{r.forEach(s=>s())}}(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,n)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,n))}),this.renderer.on("dblclick",(t,n)=>{this.emit("dblclick",t,n)}),this.renderer.on("scroll",(t,n,r,i)=>{const o=this.getDuration();this.emit("scroll",t*o,n*o,r,i)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let t;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(t);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),t=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(t),n()})}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=No.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=No.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){if(this.plugins.includes(t))return t;t._init(this),this.plugins.push(t);const n=t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),t}unregisterPlugin(t){this.plugins=this.plugins.filter(n=>n!==t),t.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const n=t/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(t,n,r,i){return te(this,void 0,void 0,function*(){var o;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=u=>this.emit("loading",u);n=yield YS.fetchBlob(t,l,a);const c=this.options.blobMimeType;c&&(n=new Blob([n],{type:c}))}this.setSrc(t,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!t&&!n){const a=this.getMediaElement();a instanceof Ba&&(a.duration=s)}if(r)this.decodedData=No.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield No.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,n,r){return te(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,n,r){return te(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,n,r)}catch(i){throw this.emit("error",i),i}})}zoom(t){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:n=8e3,precision:r=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const i=Math.min(t,this.decodedData.numberOfChannels),o=[];for(let s=0;s<i;s++){const a=this.decodedData.getChannelData(s),l=[],c=a.length/n;for(let u=0;u<n;u++){const d=a.slice(Math.floor(u*c),Math.ceil((u+1)*c));let h=0;for(let f=0;f<d.length;f++){const p=d[f];Math.abs(p)>Math.abs(h)&&(h=p)}l.push(Math.round(h*r)/r)}o.push(l)}return o}getDuration(){let t=super.getDuration()||0;return t!==0&&t!==1/0||!this.decodedData||(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const n=this.getDuration()*t;this.setTime(n)}play(t,n){const r=Object.create(null,{play:{get:()=>super.play}});return te(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield r.play.call(this);return n!=null&&(this.media instanceof Ba?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return te(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return te(this,arguments,void 0,function*(t="image/png",n=1,r="dataURL"){return this.renderer.exportImage(t,n,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}function js({src:e,onError:t,filename:n,className:r=""}){const i=Z(null),o=Z(),s=Z(),[a,l]=ot(!1),[c,u]=ot(0),[d,h]=ot(1),f=Z(),[p,m]=ot(!1),E=it(ct().t$);G(()=>{o.current=new Audio;const O={normalize:!0,height:50,container:i.current};function S(){const v=o.current;v&&(v.error.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(v.load(),l(!1)):(m(!0),l(!1),t==null||t()))}const T=n.slice(n.lastIndexOf(".")+1);if(function(v){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(v)}(n)&&T==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))O.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const v=o.current;v.addEventListener("error",S),v.preservesPitch=!0,O.url=e,O.media=v}f.current=function(v){var k,C,M,I,w,H,P,z;if(!v.container)return;const N=getComputedStyle(v.container),g=(k=zi.parse(N.color))!=null?k:new zi(255,255,255,1),D=g.withAlpha(g.alpha/2);return Yi.create({...v,barGap:(C=v.barGap)!=null?C:2,barRadius:(M=v.barRadius)!=null?M:0,barWidth:(I=v.barWidth)!=null?I:2,barHeight:v.barHeight,hideScrollbar:!0,cursorWidth:(w=v.cursorWidth)!=null?w:0,cursorColor:v.cursorColor,height:(H=v.height)!=null?H:24,progressColor:(P=v.progressColor)!=null?P:D.toRgbaString(),waveColor:(z=v.waveColor)!=null?z:D.toRgbaString()})}(O);const b=f.current;return b.on("finish",()=>{o.current.loop=!0,l(!1)}),b.on("ready",v=>u(Math.trunc(v))),b.on("timeupdate",v=>u(Math.trunc(v))),O.backend==="WebAudio"&&b.load(e).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var v;(v=o.current)==null||v.removeEventListener("error",S),o.current=void 0,b.destroy(),f.current=void 0}},[e,n,t]);const A=tt(()=>{var O;if(f.current.options.backend==="WebAudio")f.current.isPlaying()||s.current.play(),f.current.playPause(),l((O=f.current.isPlaying())!=null?O:!1);else{const S=o.current;S.paused?S.play():S.pause(),S.loop=!1,!S.paused&&S.ended&&(S.load(),S.play()),l(!S.paused)}},[]),_=tt(O=>{f.current.setPlaybackRate(O),h(O)},[]);return y("div",p?{}:{className:`t-audio-player ${r}`,children:[y("button",{onClick:A,children:y(ds,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),y("div",{className:"t-waveform",ref:i}),y("div",{className:"t-duration",children:tu(c)}),y(Nr,{type:"menu",popoverComponent:ZS,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:_},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",y(ds,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}Yi.BasePlugin=class extends co{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},Yi.dom=VS;const JS=[.25,.5,.75,1,1.25,1.5,2];function ZS({playbackSpeed:e,selectPlaybackSpeed:t}){return y("div",{className:"t-playback-speed-menu",children:[y("div",{className:"t-playback-heading",children:"Playback Speed"}),JS.map(n=>y(Sn,{className:"t-menu-item",onSelect:()=>t(n),children:[y("span",{className:"t-playback-checkmark",children:e===n?"✓ ":""}),n,"x"]},n))]})}const QS=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,t0=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class zi{constructor(t,n,r,i){this.red=t,this.green=n,this.blue=r,this.alpha=i}static parse(t){var r;const n=(r=t.match(QS))!=null?r:t.match(t0);if(n){const[i,o,s,a,l="1"]=n;return new zi(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new zi(this.red,this.green,this.blue,t)}toRgbaString(){const{red:t,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${t}, ${n}, ${r}, ${i})`:`rgb(${t}, ${n}, ${r})`}}const $E=/^\/.*[^\\]\/[im]*$/;function $h(e){return $E.test(e)?!hs(e).test(""):!1}function hs(e){const t=e.match(/^\/(.*[^\\])\/(.*)$/);if(!t)throw new Error(`Expected ${e} to be a (non-empty) regex`);let n=t[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(t[1],n)}function VE(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function e0(e,t){const n=lE(t),r=VE(e);return n!==void 0&&r.test(n)}const n0=/^[]/g;function YE(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function wl(e,t){!e()&&!t&&(t=e.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(e=>{function t(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}e.defined=t,e.has=function(r,i){r[i]},e.is=n,e.equals=function(r,i){},e.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},e.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},e.optional=function(r,i){r!==void 0&&n(r,i)},e.falsy=function(r){},e.never=function(r){}})(wl||(wl={}));const Mr=wl,r0=new RegExp(":arslan:|"+/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g.source,"g"),i0=/\uFE0F/g,o0="";function s0(e){if(e===":arslan:")return"https://cdn.talkjs.com/__assets/5461191341cea882b3f227c085d5772c.gif";const t=function(r){const i=[];let o=0,s=0,a=0;for(;a<r.length;)o=r.charCodeAt(a++),s?(i.push((65536+(s-55296<<10)+(o-56320)).toString(16)),s=0):55296<=o&&o<=56319?s=o:i.push(o.toString(16));return i.join("-")}((n=e).indexOf(o0)<0?n.replace(i0,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class zE{constructor({mode:t,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:c,replacement:u}){if(Mr.oneOf(t,["all","otherOnly","off"]),this.mode=t,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=c!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(d=>d).map(d=>d.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter($h).map(d=>hs(d)),this.forbiddenMatches=(o||[]).filter($h).map(d=>hs(d)),s){const d=s.split(`
|
|
93
|
+
`).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>YE(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}Mr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),Mr(()=>this.forbiddenMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"),u=u==null?void 0:u.trim(),this.replacement=u&&u.length>0?u:void 0}shouldSuppress({isContentBySender:t}){return this.mode==="all"||this.mode==="otherOnly"&&!t}}function Yc(e){var n,r,i,o,s,a,l,c,u,d,h,f,p;let t="";return e.t&&(t=`(${e.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=e.formattedLinks)!=null?n:"plaintext",markup:(r=e.markup)!=null?r:!1,useFallbackMentions:(i=e.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=e.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=e.enableEmojiImageFallback)!=null?s:!1,highlight:(a=e.highlight)!=null?a:[],contactInfo:(l=e.contactInfo)!=null?l:!1,suppression:(c=e.suppression)!=null?c:new zE({mode:"off"}),contactInfoHiddenText:(h=(d=e.contactInfoHiddenText)!=null?d:(u=e.suppression)==null?void 0:u.replacement)!=null?h:t,customEmojiUrls:(f=e.customEmojiUrls)!=null?f:{},enableActions:(p=e.enableActions)!=null?p:!0}}function a0({id:e,text:t}){var i;const n=ct(),r=it(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.extCurrentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===e))==null?void 0:a.user});return y("span",{className:"t-mention","t-is-current-user":it(n.extUserId$)===e?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:t}`})}function l0({message:e,type:t,action:n,params:r,children:i}){const o=io(),s=tt(l=>{l.preventDefault(),o.triggerMessageAction(e,n,r)},[o,e,n,r]),a={"t-action":n,onClick:s};return t==="actionButton"?y("button",{...a,type:"button",children:i}):y("a",{...a,href:"#",children:i})}function ir(e,t){const n=e.flatMap(r=>{if(typeof r=="string")return ja(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return c0(r,t);case"bulletlist":case"bulletList":return[dt("ul",null,...ir(r.children,t))];case"autolink":case"autoLink":case"link":return d0(r,t);case"codeblock":case"codeBlock":return[y("code",{"data-language":r.language,children:ja(r.text,t.highlight)})];case"codespan":case"codeSpan":return y("code",{children:ja((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return Mr.falsy(t.useFallbackMentions),y(a0,{id:r.id,text:r.text},r.id);case"suppressed":return[y("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[y(u0,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return h0(r,t);case"customemoji":case"customEmoji":return r.text;default:Mr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function ja(e,t){if(t.length===0)return[e];const n=function(i){const o=i.map(a=>a.trim()).filter(a=>a);if(o.length===0)return n0;const s=o.map(YE).join("|");return new RegExp(s,"gi")}(t),r=Fs(e,n).map(i=>({offset:i.index,matchedText:i[0]}));return Nl(e,r,({matchedText:i})=>[y("span",{className:"highlighted-text",children:i})])}const c0=(e,t)=>[dt({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[e.type],null,...ir(e.children,t))];function u0({unicode:e}){const[t,n]=ot(()=>e!==":arslan:");return G(()=>{t&&!Qf(e)&&n(!1)},[]),t?y("span",{className:"t-emoji",children:e}):y("img",{className:"t-emoji",src:s0(e),alt:e})}const d0=(e,t)=>{const n="children"in e?e.children:[e.text];switch(t.formattedLinks){case"link":return[dt("a",{target:function(r,i){for(const o of r)if($E.test(o)){if(hs(o).test(i))return"_top"}else if(e0(o,i))return"_top";return"_blank"}(t.sameTabLinkRules,e.url),href:e.url,rel:"noreferrer"},...ir(n,t))];case"plaintext":return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[dt(Ht,null,...ir(n,t))];default:Mr.never(t.formattedLinks)}},h0=(e,t)=>t.enableActions?[dt(l0,{type:e.type==="actionlink"?"actionLink":e.type==="actionbutton"?"actionButton":e.type,action:e.action,params:e.params,message:t.message},...ir(e.children,t))]:"children"in e&&e.children.every(n=>typeof n=="string")?[e.children.join("")]:[dt(Ht,null,...ir(e.children,t))];function p0(e,t){return Uo(e,Yc(t))}function Uo(e,t){return e.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=$a(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,c=wc(a,u=>Fs(o,u)).filter(([u])=>!l.some(d=>u.match(d)!==null)).map(u=>({offset:u.index,matchedText:u[0]}));return Nl(o,c,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=$a(r,i=>function(o){return Nl(o,function(s){const a=[];let l;for(;l=r0.exec(s);){const c=l[0],u=l.index;a.push({offset:u,matchedText:c})}return a}(o),s=>[{type:"emoji",text:s.matchedText}])}(i)),r=$a(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(IE),s.suppression.suppressPhoneNumbers&&a.push(RE),a.length===0)return[o];const l=CE(o,{multilineSteps:[],singlelineSteps:a}),c=l.map(u=>typeof u=="string"?u:Vh(u.url,s.suppression)?u.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return jc(c)}(i,t)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:Uo(n.children,t)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?Vh(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,t);case"link":return{type:"link",url:n.url,children:Uo(n.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:Uo(n.children,t)}}})}function $a(e,t){return wc(e,n=>typeof n=="string"?t(n):[n])}function Vh(e,t){if(t.allowedMatches.some(n=>e.match(n)!==null))return!0;if(t.forbiddenMatches.some(n=>e.match(n)!==null))return!1;if(e.startsWith("mailto:")){const n=e.substring(7).replace(/^.*@/,"");return!t.suppressEmailAddresses||Yh(t.allowedHostnames,n)}if(e.startsWith("tel:")){const n=e.substring(4).replace(/[^0-9]/g,"");return!t.suppressPhoneNumbers||t.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=lE(e);return!t.suppressLinks||!n||Yh(t.allowedHostnames,n)}}function Yh(e,t){for(const n of e)if(VE(n).test(t))return!0;return!1}function zc({block:e,nonInteractive:t,message:n,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,c){var _;const u=ct(),d=it(u.app$.role);ft.defined(d);const h=c.type==="UserMessage",f=((_=c.sender)==null?void 0:_.id)===u.extUserId$.peek(),p=d.suppressContactInfo,m=h&&p.shouldSuppress({isContentBySender:f}),E=p0(l.children,{contactInfo:m?"suppress":"link",suppression:p}),A={sameTabLinkRules:d.sameTabLinkRules,contactInfoHiddenText:d.suppressContactInfo.replacement||`(${u.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:E,roleOptions:A}}(e,n),a=function(l,c={},u){return ir(l,{...Yc(c),message:u})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},n);return dt("span",{className:`t-text ${r}`},...a)}function GE(e){const t=ce(),n=ct(),{className:r="",...i}=e,o=it(()=>n.state$.messages.child(n.state$.extCurrentConversationId.get()).lookup.child(e.message.id).content.child(0).url.get());return y("div",{className:`t-message-content ${r}`,children:e.message.content.map(s=>{var a;return y(f0,{block:s,theme:t,downloadUrl:o,...i},e.message.createdAt+((a=e.message.editedAt)!=null?a:0))})})}function f0({common:e,block:t,message:n,theme:r,downloadUrl:i}){const o=function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:ft.never(a)}}(r,t);return y(o,{block:t,common:e,message:n,downloadUrl:i})}const m0=27;function uo(e,t,n=!0){const r=tt(o=>{o.keyCode===m0&&e()},[e]),i=tt(o=>{o.target.closest(t)===null&&e()},[t,e]);G(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}const E0=".search-row{margin-right:var(--emoji-padding)}.emoji-menu{grid-template-columns:repeat(auto-fill,var(--total-emoji-size));padding:var(--emoji-padding)}.emoji,button.emoji{border-radius:8px}.favorites{border-top-width:1px}input.search:focus{border-color:var(--input-focused-border-color);outline:0}.picker{container-type:size}@container (height < 300px){.favorites{display:none}}#skintone-button{margin:0 -3px 0 4px}.custom-emoji{padding:0}#emo-🏻,#emo-🏼,#emo-🏽,#emo-🏾,#emo-🏿{display:none}[data-has-mouse] .emoji:hover{background-color:var(--button-hover-background)}",A0={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0"};async function _0(e,t){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=e!=null?e:kr.emojiPickerTranslationUrl,r=A0["emoji-picker-element"],[i,o]=await Promise.all([zh(r),zh(n)]),s=t!=null?t:kr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Zo.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function zh(e){return import(e).catch(()=>new Function("url","return import(url)")(e)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function Gc(){const e=ct(),[t,n]=ot();return function(r,i,o,s){let a;J(i)?a=i:Array.isArray(i)?(s=i,o=void 0):o=i,a&&Array.isArray(o)&&(s=o,o=void 0);const l=(s=s||(o==null?void 0:o.deps))?Ie(s):void 0,c=Z({});c.current.selector=r,c.current.reaction=a,l&&l.set(s),c.current.dispose||(c.current.dispose=Yr(u=>{var d;return l==null||l.get(),Ye((d=c.current)==null?void 0:d.selector,void 0,u)},u=>{var d,h;return(h=(d=c.current).reaction)==null?void 0:h.call(d,u)},o)),K_(()=>{var u,d;(d=(u=c.current)==null?void 0:u.dispose)==null||d.call(u)}),c.current.dispose}(()=>{const r=e.translationData$.get();e.app$.get()&&e.currentUser$.get()&&r&&function(i,o){const s=JSON.stringify([i,o]);if(Va[s])return Va[s];const a=_0(i,o);return Va[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),t}const Va={};function Wc(e){const{onClose:t,onEmojiSelected:n}=Q_(),r=Z(null),i=it(ct().t$),o=Gc();return G(()=>{if(!o)return;ft.defined(r.current);const s=r.current,a=s.shadowRoot;(function(u,d){const h=document.createElement("style");h.textContent=d,u.appendChild(h)})(a,E0);const l=u=>{var h;const d=(h=u.detail.unicode)!=null?h:u.detail.name;n(d)};function c(u){u.pointerType==="mouse"&&(a.querySelector("section").dataset.hasMouse="true")}return s.addEventListener("emoji-click",l),s.addEventListener("pointermove",c,{once:!0}),s.i18n=o.value.i18n,()=>{s.removeEventListener("emoji-click",l),s.removeEventListener("pointermove",c)}},[o,n]),G(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),uo(()=>t(),".t-emoji-picker"),y("div",o?{className:"t-emoji-picker",children:y("emoji-picker",{locale:i.locale,ref:r,class:e.colorScheme,"data-source":o.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:y($c,{})})}function WE({messageId:e,colorScheme:t}){const{closePopover:n}=Dc(),r=io();return y("div",{className:"t-reaction-picker",children:y(Jf.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(e,i),n()}},children:y(Wc,{colorScheme:t})})})}function Ml(){return Ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ml.apply(null,arguments)}function XE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Pl(e,t){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Pl(e,t)}function KE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pl(e,t)}function qE(){}function JE(){}JE.resetWarningCache=qE;function Gh(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function e(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:JE,resetWarningCache:qE};n.PropTypes=n})();const Wh=!1,ZE=pe.createContext(null);var Ai="unmounted",Un="exited",Bn="entering",Dr="entered",xl="exiting",nn=function(e){function t(r,i){var o;o=e.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=Un,o.appearStatus=Bn):s=Dr:s=r.unmountOnExit||r.mountOnEnter?Ai:Un,o.state={status:s},o.nextCallback=null,o}KE(t,e),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ai?{status:Un}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Bn&&o!==Dr&&(i=Bn):o!==Bn&&o!==Dr||(i=xl)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Bn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Un&&this.setState({status:Ai})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[pe.findDOMNode(this),s],l=a[0],c=a[1],u=this.getTimeouts(),d=s?u.appear:u.enter;!r&&!o||Wh?this.safeSetState({status:Dr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,c),this.safeSetState({status:Bn},function(){i.props.onEntering(l,c),i.onTransitionEnd(d,function(){i.safeSetState({status:Dr},function(){i.props.onEntered(l,c)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:pe.findDOMNode(this);i&&!Wh?(this.props.onExit(s),this.safeSetState({status:xl},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Un},function(){r.props.onExited(s)})})})):this.safeSetState({status:Un},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:pe.findDOMNode(this),s=r==null&&!this.props.addEndListener;if(o&&!s){if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=a[0],c=a[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Ai)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=XE(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return pe.createElement(ZE.Provider,{value:null},typeof o=="function"?o(r,s):pe.cloneElement(pe.Children.only(o),s))},t}(pe.Component);function Ar(){}nn.contextType=ZE,nn.propTypes={},nn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ar,onEntering:Ar,onEntered:Ar,onExit:Ar,onExiting:Ar,onExited:Ar},nn.UNMOUNTED=Ai,nn.EXITED=Un,nn.ENTERING=Bn,nn.ENTERED=Dr,nn.EXITING=xl;var Ya=function(e,t){return e&&t&&t.split(" ").forEach(function(n){return i=n,void((r=e).classList?r.classList.remove(i):typeof r.className=="string"?r.className=Gh(r.className,i):r.setAttribute("class",Gh(r.className&&r.className.baseVal||"",i)));var r,i})},Fl=function(e){function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1];r.removeClasses(u,"exit"),r.addClass(u,d?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1]?"appear":"enter";r.addClass(u,d,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],d=c[1]?"appear":"enter";r.removeClasses(u,d),r.addClass(u,d,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c?(c&&l?l+"-":"")+a:l[a];return{baseClassName:u,activeClassName:c?u+"-active":l[a+"Active"],doneClassName:c?u+"-done":l[a+"Done"]}},r}KE(t,e);var n=t.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,function(l,c){l&&c&&c.split(" ").forEach(function(u){return h=u,void((d=l).classList?d.classList.add(h):function(f,p){return f.classList?!!p&&f.classList.contains(p):(" "+(f.className.baseVal||f.className)+" ").indexOf(" "+p+" ")!==-1}(d,h)||(typeof d.className=="string"?d.className=d.className+" "+h:d.setAttribute("class",(d.className&&d.className.baseVal||"")+" "+h)));var d,h})}(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&Ya(r,s),a&&Ya(r,a),l&&Ya(r,l)},n.render=function(){var r=this.props;r.classNames;var i=XE(r,["classNames"]);return pe.createElement(nn,Ml({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(pe.Component);Fl.defaultProps={classNames:""},Fl.propTypes={};const g0={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function QE(e,{focused:t,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=u=>{var d,h,f;d=0,h=u,f=r-1,u=Math.max(d,Math.min(h,f)),n(u)},[l,c]=g0[i];switch(e){case l:return a(t-1),!0;case c:return a(t+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function tA({focused:e,setFocused:t,buttonId:n}){ge(()=>{var a;const s=n(e);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[e,n]);const r=tt(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=Q(()=>({role:"menu","aria-activedescendant":n(e)}),[e,n]),o=tt(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function eA(e){const[t,n]=ot([]),[r,i]=ot([]),[o,s]=ot(0),[a,l]=ot(0),c=Gc(),u=Q(()=>(c==null?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),d=no(),h=it(d.state$.suggestEmojiQuery);G(()=>{u&&(h?async function(){const _=await u.getPreferredSkinTone();l(_);let O=await u.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||function(T){return T.version<=tm&&!O0.includes(T.unicode)}(S)),function(S,T){T.sort((b,v)=>{var D,k;const N=(D=b.shortcodes)==null?void 0:D.find(C=>C.startsWith(S)),g=(k=v.shortcodes)==null?void 0:k.find(C=>C.startsWith(S));return N&&!g?-1:!N&&g?1:N&&g?N.length-g.length:0})}(h.substring(1),O),s(0),n(O),O.length>0&&i(O),h.endsWith(":")){const S=h.slice(1,-1),T=O.find(b=>{var v;return(v=b.shortcodes)==null?void 0:v.includes(S)});T&&d.selectEmoji(_i(T,_))}}():n([]))},[h,d,u]);const f=tt(_=>{const O=t[_];return O&&"emoji-button-"+_i(O,a)},[t,a]),{containerProps:p,itemProps:m}=tA({focused:o,setFocused:s,buttonId:f}),E=t.length>0;uo(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),G(()=>{if(E)return d.listenKeydown("emoji",_=>QE(_,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const O=t[o];ft.defined(O),d.selectEmoji(_i(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,t,o,E,a]);const A=Z(null);return y(Fl,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:y("div",{className:"t-emoji-suggest-bar",ref:A,...p,children:r.map((_,O)=>y(D0,{emoji:_,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},_i(_,a)))})})}function _i(e,t){return Hl(e)?nA(e,t):e.name}function Hl(e){return!!e.unicode}function D0(e){var l;const{emoji:t,focused:n,skinTone:r,onSelect:i,...o}=e,s=((l=t.shortcodes)!=null?l:[]).join(", "),a=Hl(t)?[t.unicode,s].join(", "):s;return y("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(_i(t,r)),...o,children:Hl(t)?nA(t,r):null})}function nA(e,t){var r,i;const n=(r=e.skins)==null?void 0:r.find(o=>o.tone===t);return(i=n==null?void 0:n.unicode)!=null?i:e.unicode}const O0=["🏻","🏼","🏽","🏾","🏿"],S0=["top","right","bottom","left"],Ul=Math.min,Pr=Math.max,ps=Math.round,Co=Math.floor,Ge=e=>({x:e,y:e}),T0={left:"right",right:"left",bottom:"top",top:"bottom"},v0={start:"end",end:"start"};function Xc(e,t){return typeof e=="function"?e(t):e}function Gi(e){return e.split("-")[0]}function Kc(e){return e.split("-")[1]}function rA(e){return e==="y"?"height":"width"}const R0=new Set(["top","bottom"]);function Ir(e){return R0.has(Gi(e))?"y":"x"}function iA(e){return Ir(e)==="x"?"y":"x"}function Bl(e){return e.replace(/start|end/g,t=>v0[t])}const Xh=["left","right"],Kh=["right","left"],I0=["top","bottom"],N0=["bottom","top"];function C0(e,t,n,r){const i=Kc(e);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?Kh:Xh:a?Xh:Kh;case"left":case"right":return a?I0:N0;default:return[]}}(Gi(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Bl)))),o}function yo(e){return e.replace(/left|right|bottom|top/g,t=>T0[t])}function fs(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function qh(e,t,n){let{reference:r,floating:i}=e;const o=Ir(t),s=iA(t),a=rA(s),l=Gi(t),c=o==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:r.y-i.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-i.width,y:d};break;default:f={x:r.x,y:r.y}}switch(Kc(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function jl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Xc(t,e),p=function(T){return typeof T!="number"?function(b){return{top:0,right:0,bottom:0,left:0,...b}}(T):{top:T,right:T,bottom:T,left:T}}(f),m=a[h?d==="floating"?"reference":"floating":d],E=fs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),O=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},S=fs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:_,strategy:l}):A);return{top:(E.top-S.top+p.top)/O.y,bottom:(S.bottom-E.bottom+p.bottom)/O.y,left:(E.left-S.left+p.left)/O.x,right:(S.right-E.right+p.right)/O.x}}function Jh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Zh(e){return S0.some(t=>e[t]>=0)}function $s(){return typeof window!="undefined"}function Qr(e){return oA(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function We(e){var t;return(t=(oA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oA(e){return!!$s()&&(e instanceof Node||e instanceof Ae(e).Node)}function be(e){return!!$s()&&(e instanceof Element||e instanceof Ae(e).Element)}function Ke(e){return!!$s()&&(e instanceof HTMLElement||e instanceof Ae(e).HTMLElement)}function Qh(e){return!(!$s()||typeof ShadowRoot=="undefined")&&(e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot)}const y0=new Set(["inline","contents"]);function Wi(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!y0.has(i)}const b0=new Set(["table","td","th"]);function k0(e){return b0.has(Qr(e))}const L0=[":popover-open",":modal"];function ms(e){return L0.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const w0=["transform","translate","scale","rotate","perspective"],M0=["transform","translate","scale","rotate","perspective","filter"],P0=["paint","layout","strict","content"];function $l(e){const t=qc(),n=be(e)?ke(e):e;return w0.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||M0.some(r=>(n.willChange||"").includes(r))||P0.some(r=>(n.contain||"").includes(r))}function qc(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const x0=new Set(["html","body","#document"]);function xr(e){return x0.has(Qr(e))}function ke(e){return Ae(e).getComputedStyle(e)}function Vs(e){return be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(Qr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qh(e)&&e.host||We(e);return Qh(t)?t.host:t}function sA(e){const t=Cn(e);return xr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&Wi(t)?t:sA(t)}function Xi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=sA(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Ae(i);if(o){const a=Vl(s);return t.concat(s,s.visualViewport||[],Wi(i)?i:[],a&&n?Xi(a):[])}return t.concat(i,Xi(i,[],n))}function Vl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function aA(e){const t=ke(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ke(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=ps(n)!==o||ps(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Jc(e){return be(e)?e:e.contextElement}function Fr(e){const t=Jc(e);if(!Ke(t))return Ge(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=aA(t);let s=(o?ps(n.width):n.width)/r,a=(o?ps(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const F0=Ge(0);function lA(e){const t=Ae(e);return qc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:F0}function or(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Jc(e);let s=Ge(1);t&&(r?be(r)&&(s=Fr(r)):s=Fr(e));const a=function(h,f,p){return f===void 0&&(f=!1),!(!p||f&&p!==Ae(h))&&f}(o,n,r)?lA(o):Ge(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const h=Ae(o),f=r&&be(r)?Ae(r):r;let p=h,m=Vl(p);for(;m&&r&&f!==p;){const E=Fr(m),A=m.getBoundingClientRect(),_=ke(m),O=A.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,S=A.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,c*=E.y,u*=E.x,d*=E.y,l+=O,c+=S,p=Ae(m),m=Vl(p)}}return fs({width:u,height:d,x:l,y:c})}function Es(e,t){const n=Vs(e).scrollLeft;return t?t.left+n:or(We(e)).left+n}function cA(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Es(e,n),y:n.top+t.scrollTop}}const H0=new Set(["absolute","fixed"]);function tp(e,t,n){let r;if(t==="viewport")r=function(i,o){const s=Ae(i),a=We(i),l=s.visualViewport;let c=a.clientWidth,u=a.clientHeight,d=0,h=0;if(l){c=l.width,u=l.height;const p=qc();(!p||p&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const f=Es(a);if(f<=0){const p=a.ownerDocument,m=p.body,E=getComputedStyle(m),A=p.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-A);_<=25&&(c-=_)}else f<=25&&(c+=f);return{width:c,height:u,x:d,y:h}}(e,n);else if(t==="document")r=function(i){const o=We(i),s=Vs(i),a=i.ownerDocument.body,l=Pr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=Pr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+Es(i);const d=-s.scrollTop;return ke(a).direction==="rtl"&&(u+=Pr(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}(We(e));else if(be(t))r=function(i,o){const s=or(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=Ke(i)?Fr(i):Ge(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:a*c.y}}(t,n);else{const i=lA(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return fs(r)}function uA(e,t){const n=Cn(e);return!(n===t||!be(n)||xr(n))&&(ke(n).position==="fixed"||uA(n,t))}function U0(e,t,n){const r=Ke(t),i=We(t),o=n==="fixed",s=or(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);function c(){l.x=Es(i)}if(r||!r&&!o)if((Qr(t)!=="body"||Wi(i))&&(a=Vs(t)),r){const d=or(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?Ge(0):cA(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function za(e){return ke(e).position==="static"}function ep(e,t){if(!Ke(e)||ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return We(e)===n&&(n=n.ownerDocument.body),n}function np(e,t){const n=Ae(e);if(ms(e))return n;if(!Ke(e)){let i=Cn(e);for(;i&&!xr(i);){if(be(i)&&!za(i))return i;i=Cn(i)}return n}let r=ep(e,t);for(;r&&k0(r)&&za(r);)r=ep(r,t);return r&&xr(r)&&za(r)&&!$l(r)?n:r||function(i){let o=Cn(i);for(;Ke(o)&&!xr(o);){if($l(o))return o;if(ms(o))return null;o=Cn(o)}return null}(e)||n}const B0={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=We(r),a=!!t&&ms(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ge(1);const u=Ge(0),d=Ke(r);if((d||!d&&!o)&&((Qr(r)!=="body"||Wi(s))&&(l=Vs(r)),Ke(r))){const f=or(r);c=Fr(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=!s||d||o?Ge(0):cA(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:We,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?ms(t)?[]:function(c,u){const d=u.get(c);if(d)return d;let h=Xi(c,[],!1).filter(E=>be(E)&&Qr(E)!=="body"),f=null;const p=ke(c).position==="fixed";let m=p?Cn(c):c;for(;be(m)&&!xr(m);){const E=ke(m),A=$l(m);A||E.position!=="fixed"||(f=null),(p?!A&&!f:!A&&E.position==="static"&&f&&H0.has(f.position)||Wi(m)&&!A&&uA(c,m))?h=h.filter(_=>_!==m):f=E,m=Cn(m)}return u.set(c,h),h}(t,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((c,u)=>{const d=tp(t,u,i);return c.top=Pr(d.top,c.top),c.right=Ul(d.right,c.right),c.bottom=Ul(d.bottom,c.bottom),c.left=Pr(d.left,c.left),c},tp(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:np,getElementRects:async function(e){const t=this.getOffsetParent||np,n=this.getDimensions,r=await n(e.floating);return{reference:U0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=aA(e);return{width:t,height:n}},getScale:Fr,isElement:be,isRTL:function(e){return ke(e).direction==="rtl"}};function rp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function j0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Jc(e),u=i||o?[...c?Xi(c):[],...Xi(t)]:[];u.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=c&&a?function(E,A){let _,O=null;const S=We(E);function T(){var b;clearTimeout(_),(b=O)==null||b.disconnect(),O=null}return function b(v,N){v===void 0&&(v=!1),N===void 0&&(N=1),T();const g=E.getBoundingClientRect(),{left:D,top:k,width:C,height:M}=g;if(v||A(),!C||!M)return;const I={rootMargin:-Co(k)+"px "+-Co(S.clientWidth-(D+C))+"px "+-Co(S.clientHeight-(k+M))+"px "+-Co(D)+"px",threshold:Pr(0,Ul(1,N))||1};let w=!0;function H(P){const z=P[0].intersectionRatio;if(z!==N){if(!w)return b();z?b(!1,z):_=setTimeout(()=>{b(!1,1e-7)},1e3)}z!==1||rp(g,E.getBoundingClientRect())||b(),w=!1}try{O=new IntersectionObserver(H,{...I,root:S.ownerDocument})}catch(P){O=new IntersectionObserver(H,I)}O.observe(E)}(!0),T}(c,n):null;let h,f=-1,p=null;s&&(p=new ResizeObserver(E=>{let[A]=E;A&&A.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=p)==null||_.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m=l?or(e):null;return l&&function E(){const A=or(e);m&&!rp(m,A)&&n(),m=A,h=requestAnimationFrame(E)}(),n(),()=>{var E;u.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),d==null||d(),(E=p)==null||E.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const $0=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...E}=Xc(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Gi(i),_=Ir(a),O=Gi(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(O||!m?[yo(a)]:function(I){const w=yo(I);return[Bl(I),w,Bl(w)]}(a)),b=p!=="none";!h&&b&&T.push(...C0(a,m,p,S));const v=[a,...T],N=await jl(t,E),g=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&g.push(N[A]),d){const I=function(w,H,P){P===void 0&&(P=!1);const z=Kc(w),V=iA(w),Y=rA(V);let B=V==="x"?z===(P?"end":"start")?"right":"left":z==="start"?"bottom":"top";return H.reference[Y]>H.floating[Y]&&(B=yo(B)),[B,yo(B)]}(i,s,S);g.push(N[I[0]],N[I[1]])}if(D=[...D,{placement:i,overflows:g}],!g.every(I=>I<=0)){var k,C;const I=(((k=o.flip)==null?void 0:k.index)||0)+1,w=v[I];if(w&&(!(d==="alignment"&&_!==Ir(w))||D.every(P=>Ir(P.placement)!==_||P.overflows[0]>0)))return{data:{index:I,overflows:D},reset:{placement:w}};let H=(C=D.filter(P=>P.overflows[0]<=0).sort((P,z)=>P.overflows[1]-z.overflows[1])[0])==null?void 0:C.placement;if(!H)switch(f){case"bestFit":{var M;const P=(M=D.filter(z=>{if(b){const V=Ir(z.placement);return V===_||V==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(V=>V>0).reduce((V,Y)=>V+Y,0)]).sort((z,V)=>z[1]-V[1])[0])==null?void 0:M[0];P&&(H=P);break}case"initialPlacement":H=a}if(i!==H)return{reset:{placement:H}}}return{}}}},V0=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Xc(e,t);switch(r){case"referenceHidden":{const o=Jh(await jl(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Zh(o)}}}case"escaped":{const o=Jh(await jl(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Zh(o)}}}default:return{}}}}},Y0=(e,t,n)=>{const r=new Map,i={platform:B0,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:c="bottom",strategy:u="absolute",middleware:d=[],platform:h}=l,f=d.filter(Boolean),p=await(h.isRTL==null?void 0:h.isRTL(a));let m=await h.getElementRects({reference:s,floating:a,strategy:u}),{x:E,y:A}=qh(m,c,p),_=c,O={},S=0;for(let T=0;T<f.length;T++){const{name:b,fn:v}=f[T],{x:N,y:g,data:D,reset:k}=await v({x:E,y:A,initialPlacement:c,placement:_,strategy:u,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=N!=null?N:E,A=g!=null?g:A,O={...O,[b]:{...O[b],...D}},k&&S<=50&&(S++,typeof k=="object"&&(k.placement&&(_=k.placement),k.rects&&(m=k.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:u}):k.rects),{x:E,y:A}=qh(m,_,p)),T=-1)}return{x:E,y:A,placement:_,strategy:u,middlewareData:O}})(e,t,{...i,platform:o})};var Bo=typeof document!="undefined"?ge:function(){};function As(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,i;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(!As(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!e.$$typeof)&&!As(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function dA(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ip(e,t){const n=dA(e);return Math.round(t*n)/n}function Ga(e){const t=Z(e);return Bo(()=>{t.current=e}),t}const z0=(e,t)=>({...$0(e),options:[e,t]}),G0=(e,t)=>({...V0(e),options:[e,t]});var hA={exports:{}},pA=["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])"],_s=pA.join(","),fA=typeof Element=="undefined",sr=fA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,jo=!fA&&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},Ki=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert");return r===""||r==="true"||t&&e&&Ki(e.parentNode)},mA=function(e,t,n){if(Ki(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(_s));return t&&sr.call(e,_s)&&r.unshift(e),r=r.filter(n)},gs=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Ki(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=gs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{sr.call(o,_s)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),u=!Ki(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var d=gs(c===!0?o.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:o,candidates:d})}else i.unshift.apply(i,o.children)}}return r},EA=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},vn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"}(e))&&!EA(e)?0:e.tabIndex},W0=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},AA=function(e){return e.tagName==="INPUT"},X0=function(e){return function(t){return AA(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,r=t.form||jo(t),i=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')};if(typeof window!="undefined"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(t.name));else try{n=i(t.name)}catch(s){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",s.message),!1}var o=function(s,a){for(var l=0;l<s.length;l++)if(s[l].checked&&s[l].form===a)return s[l]}(n,t.form);return!o||o===t}(e)},op=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},K0=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility==="hidden")return!0;var i=sr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(sr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return op(e)}else{if(typeof r=="function"){for(var o=e;e;){var s=e.parentElement,a=jo(e);if(s&&!s.shadowRoot&&r(s)===!0)return op(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=o}if(function(l){var c,u,d,h,f=l&&jo(l),p=(c=f)===null||c===void 0?void 0:c.host,m=!1;if(f&&f!==l)for(m=!!((u=p)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(p)||l!=null&&(h=l.ownerDocument)!==null&&h!==void 0&&h.contains(l));!m&&p;){var E,A,_;m=!((A=p=(E=f=jo(p))===null||E===void 0?void 0:E.host)===null||A===void 0||(_=A.ownerDocument)===null||_===void 0||!_.contains(p))}return m}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Ds=function(e,t){return!(t.disabled||Ki(t)||function(n){return AA(n)&&n.type==="hidden"}(t)||K0(t,e)||function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})}(t)||function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!sr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(t))},Yl=function(e,t){return!(X0(t)||vn(t)<0||!Ds(e,t))},q0=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},_A=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=function(c,u){var d=vn(c);return d<0&&u&&!EA(c)?0:d}(s,o),l=o?_A(r.candidates):s;a===0?o?t.push.apply(t,l):t.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(W0).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},gA=function(e,t){var n;return n=(t=t||{}).getShadowRoot?gs([e],t.includeContainer,{filter:Yl.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:q0}):mA(e,t.includeContainer,Yl.bind(null,t)),_A(n)},Zc=function(e,t){return(t=t||{}).getShadowRoot?gs([e],t.includeContainer,{filter:Ds.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):mA(e,t.includeContainer,Ds.bind(null,t))},jn=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return sr.call(e,_s)!==!1&&Yl(t,e)},J0=pA.concat("iframe").join(","),$o=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return sr.call(e,J0)!==!1&&Ds(t,e)};const Z0=Object.freeze(Object.defineProperty({__proto__:null,focusable:Zc,getTabIndex:vn,isFocusable:$o,isTabbable:jn,tabbable:gA},Symbol.toStringTag,{value:"Module"}));function zl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sp(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=DA(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function Q0(e,t,n){return(t=function(r){var i=function(o,s){if(typeof o!="object"||!o)return o;var a=o[Symbol.toPrimitive];if(a!==void 0){var l=a.call(o,s);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(o)}(r,"string");return typeof i=="symbol"?i:i+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ap(Object(n),!0).forEach(function(r){Q0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ap(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tT(e){return function(t){if(Array.isArray(t))return zl(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||DA(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function DA(e,t){if(e){if(typeof e=="string")return zl(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zl(e,t):void 0}}var an={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==an.getActiveTrap(e)&&an.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),an.unpauseTrap(e)},pauseTrap:function(e){var t=an.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=an.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},yi=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},eT=function(e){return yi(e)&&!e.shiftKey},nT=function(e){return yi(e)&&e.shiftKey},cp=function(e){return setTimeout(e,0)},di=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},bo=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},rT=[];const iT=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(e,t){var n,r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||rT,o=lp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:eT,isKeyBackward:nT},t),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(g,D,k){return g&&g[D]!==void 0?g[D]:o[k||D]},l=function(g,D){var k=typeof(D==null?void 0:D.composedPath)=="function"?D.composedPath():void 0;return s.containerGroups.findIndex(function(C){var M=C.container,I=C.tabbableNodes;return M.contains(g)||(k==null?void 0:k.includes(M))||I.find(function(w){return w===g})})},c=function(g){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=D.hasFallback,C=k!==void 0&&k,M=D.params,I=M===void 0?[]:M,w=o[g];if(typeof w=="function"&&(w=w.apply(void 0,tT(I))),w===!0&&(w=void 0),!w){if(w===void 0||w===!1)return w;throw new Error("`".concat(g,"` was specified but was not a node, or did not return a node"))}var H=w;if(typeof w=="string"){try{H=r.querySelector(w)}catch(P){throw new Error("`".concat(g,'` appears to be an invalid selector; error="').concat(P.message,'"'))}if(!H&&!C)throw new Error("`".concat(g,"` as selector refers to no known node"))}return H},u=function(){var g=c("initialFocus",{hasFallback:!0});if(g===!1)return!1;if(g===void 0||g&&!$o(g,o.tabbableOptions))if(l(r.activeElement)>=0)g=r.activeElement;else{var D=s.tabbableGroups[0];g=D&&D.firstTabbableNode||c("fallbackFocus")}else g===null&&(g=c("fallbackFocus"));if(!g)throw new Error("Your focus-trap needs to have at least one focusable element");return g},d=function(){if(s.containerGroups=s.containers.map(function(g){var D=gA(g,o.tabbableOptions),k=Zc(g,o.tabbableOptions),C=D.length>0?D[0]:void 0,M=D.length>0?D[D.length-1]:void 0,I=k.find(function(P){return jn(P)}),w=k.slice().reverse().find(function(P){return jn(P)}),H=!!D.find(function(P){return vn(P)>0});return{container:g,tabbableNodes:D,focusableNodes:k,posTabIndexesFound:H,firstTabbableNode:C,lastTabbableNode:M,firstDomTabbableNode:I,lastDomTabbableNode:w,nextTabbableNode:function(P){var z=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],V=D.indexOf(P);return V<0?z?k.slice(k.indexOf(P)+1).find(function(Y){return jn(Y)}):k.slice(0,k.indexOf(P)).reverse().find(function(Y){return jn(Y)}):D[V+(z?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(g){return g.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(g){return g.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function(g){var D=g.activeElement;if(D)return D.shadowRoot&&D.shadowRoot.activeElement!==null?h(D.shadowRoot):D},f=function(g){g!==!1&&g!==h(document)&&(g&&g.focus?(g.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=g,function(D){return D.tagName&&D.tagName.toLowerCase()==="input"&&typeof D.select=="function"}(g)&&g.select()):f(u()))},p=function(g){var D=c("setReturnFocus",{params:[g]});return D||D!==!1&&g},m=function(g){var D=g.target,k=g.event,C=g.isBackward,M=C!==void 0&&C;D=D||bo(k),d();var I=null;if(s.tabbableGroups.length>0){var w=l(D,k),H=w>=0?s.containerGroups[w]:void 0;if(w<0)I=M?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(M){var P=s.tabbableGroups.findIndex(function(q){var nt=q.firstTabbableNode;return D===nt});if(P<0&&(H.container===D||$o(D,o.tabbableOptions)&&!jn(D,o.tabbableOptions)&&!H.nextTabbableNode(D,!1))&&(P=w),P>=0){var z=P===0?s.tabbableGroups.length-1:P-1,V=s.tabbableGroups[z];I=vn(D)>=0?V.lastTabbableNode:V.lastDomTabbableNode}else yi(k)||(I=H.nextTabbableNode(D,!1))}else{var Y=s.tabbableGroups.findIndex(function(q){var nt=q.lastTabbableNode;return D===nt});if(Y<0&&(H.container===D||$o(D,o.tabbableOptions)&&!jn(D,o.tabbableOptions)&&!H.nextTabbableNode(D))&&(Y=w),Y>=0){var B=Y===s.tabbableGroups.length-1?0:Y+1,et=s.tabbableGroups[B];I=vn(D)>=0?et.firstTabbableNode:et.firstDomTabbableNode}else yi(k)||(I=H.nextTabbableNode(D))}}else I=c("fallbackFocus");return I},E=function(g){var D=bo(g);l(D,g)>=0||(di(o.clickOutsideDeactivates,g)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):di(o.allowOutsideClick,g)||g.preventDefault())},A=function(g){var D=bo(g),k=l(D,g)>=0;if(k||D instanceof Document)k&&(s.mostRecentlyFocusedNode=D);else{var C;g.stopImmediatePropagation();var M=!0;if(s.mostRecentlyFocusedNode)if(vn(s.mostRecentlyFocusedNode)>0){var I=l(s.mostRecentlyFocusedNode),w=s.containerGroups[I].tabbableNodes;if(w.length>0){var H=w.findIndex(function(P){return P===s.mostRecentlyFocusedNode});H>=0&&(o.isKeyForward(s.recentNavEvent)?H+1<w.length&&(C=w[H+1],M=!1):H-1>=0&&(C=w[H-1],M=!1))}}else s.containerGroups.some(function(P){return P.tabbableNodes.some(function(z){return vn(z)>0})})||(M=!1);else M=!1;M&&(C=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(C||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},_=function(g){(o.isKeyForward(g)||o.isKeyBackward(g))&&function(D){var k=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=D;var C=m({event:D,isBackward:k});C&&(yi(D)&&D.preventDefault(),f(C))}(g,o.isKeyBackward(g))},O=function(g){(function(D){return(D==null?void 0:D.key)==="Escape"||(D==null?void 0:D.key)==="Esc"||(D==null?void 0:D.keyCode)===27})(g)&&di(o.escapeDeactivates,g)!==!1&&(g.preventDefault(),n.deactivate())},S=function(g){var D=bo(g);l(D,g)>=0||di(o.clickOutsideDeactivates,g)||di(o.allowOutsideClick,g)||(g.preventDefault(),g.stopImmediatePropagation())},T=function(){if(s.active)return an.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?cp(function(){f(u())}):f(u()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",S,{capture:!0,passive:!1}),r.addEventListener("keydown",_,{capture:!0,passive:!1}),r.addEventListener("keydown",O),n},b=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",S,!0),r.removeEventListener("keydown",_,!0),r.removeEventListener("keydown",O),n},v=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(g){g.some(function(D){return Array.from(D.removedNodes).some(function(k){return k===s.mostRecentlyFocusedNode})})&&f(u())}):void 0,N=function(){v&&(v.disconnect(),s.active&&!s.paused&&s.containers.map(function(g){v.observe(g,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(g){if(s.active)return this;var D=a(g,"onActivate"),k=a(g,"onPostActivate"),C=a(g,"checkCanFocusTrap"),M=an.getActiveTrap(i),I=!1;M&&!M.paused&&(M._setSubtreeIsolation(!1),I=!0);try{C||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),D==null||D();var w=function(){C&&d(),T(),N(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),k==null||k()};if(C)return C(s.containers.concat()).then(w,w),this;w()}catch(H){throw M===an.getActiveTrap(i)&&I&&M._setSubtreeIsolation(!0),H}return this},deactivate:function(g){if(!s.active)return this;var D=lp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},g);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),b(),s.active=!1,s.paused=!1,N(),an.deactivateTrap(i,n);var k=a(D,"onDeactivate"),C=a(D,"onPostDeactivate"),M=a(D,"checkCanReturnFocus"),I=a(D,"returnFocus","returnFocusOnDeactivate");k==null||k();var w=function(){cp(function(){I&&f(p(s.nodeFocusedBeforeActivation)),C==null||C()})};return I&&M?(M(p(s.nodeFocusedBeforeActivation)).then(w,w),this):(w(),this)},pause:function(g){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,g)):this},unpause:function(g){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,g)):this},updateContainerElements:function(g){var D=[].concat(g).filter(Boolean);return s.containers=D.map(function(k){return typeof k=="string"?r.querySelector(k):k}),o.isolateSubtrees&&function(k){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var C,M=new Set,I=new Set,w=sp(k);try{for(w.s();!(C=w.n()).done;){var H=C.value;M.add(H);for(var P=typeof ShadowRoot!="undefined"&&H.getRootNode()instanceof ShadowRoot,z=H;z;){M.add(z);var V=z.parentElement,Y=[];V?Y=V.children:!V&&P&&(Y=z.getRootNode().children,V=z.getRootNode().host,P=typeof ShadowRoot!="undefined"&&V.getRootNode()instanceof ShadowRoot);var B,et=sp(Y);try{for(et.s();!(B=et.n()).done;){var q=B.value;I.add(q)}}catch(nt){et.e(nt)}finally{et.f()}z=V}}}catch(nt){w.e(nt)}finally{w.f()}M.forEach(function(nt){I.delete(nt)}),s.adjacentElements=I}(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),N(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(g,D){if(s.paused===g)return this;if(s.paused=g,g){var k=a(D,"onPause"),C=a(D,"onPostPause");k==null||k(),b(),N(),n._setSubtreeIsolation(!1),C==null||C()}else{var M=a(D,"onUnpause"),I=a(D,"onPostUnpause");M==null||M(),n._setSubtreeIsolation(!0),d(),T(),N(),I==null||I()}return this}},_setSubtreeIsolation:{value:function(g){o.isolateSubtrees&&s.adjacentElements.forEach(function(D){g?((D.inert||D.hasAttribute("inert"))&&s.alreadyInert.add(D),D.inert=!0):s.alreadyInert.has(D)||(D.inert=!1)})}}}),n.updateContainerElements(e),n}},Symbol.toStringTag,{value:"Module"})),oT=_c(iT),sT=_c(Z0);function Hr(e){return Hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(e)}var Wa,Xa;function aT(e,t,n){return t&&function(r,i){for(var o=0;o<i.length;o++){var s=i[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(r,SA(s.key),s)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lT(e,t,n){return t=Os(t),function(r,i){if(i&&(Hr(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r)}(e,OA()?Reflect.construct(t,n||[],Os(e).constructor):t.apply(e,n))}function OA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(OA=function(){return!!e})()}function Os(e){return Os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Os(e)}function Gl(e,t){return Gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Gl(e,t)}function SA(e){var t=function(n,r){if(Hr(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(Hr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return Hr(t)=="symbol"?t:t+""}var gi=Bf,cT=oT.createFocusTrap,uT=sT.isFocusable,dT=parseInt((Wa=(Xa=/^(\d+)\./.exec(gi.version))===null||Xa===void 0?void 0:Xa[1])!==null&&Wa!==void 0?Wa:0,10),Wl=function(){function e(t){var n;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),function(o,s,a){(s=SA(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=lT(this,e,[t]),"getNodeForOption",function(o){var s,a=(s=this.internalOptions[o])!==null&&s!==void 0?s:this.originalOptions[o];if(typeof a=="function"){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];a=a.apply(void 0,c)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var d,h=a;if(typeof a=="string"&&!(h=(d=this.getDocument())===null||d===void 0?void 0:d.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return h}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?n.internalOptions[i]=r[i]:n.originalOptions[i]=r[i]);return n.outsideClick=null,n.focusTrapElements=t.containerElements||[],n.updatePreviousElement(),n}return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&Gl(t,n)}(e,gi.Component),aT(e,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document!="undefined"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var t=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return t||t!==!1&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var t=this.getDocument();t&&(this.previouslyFocusedElement=t.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(t){var n=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return n&&(this.outsideClick={target:t.target,allowDeactivation:n}),n}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,n=function(){var r=t.getReturnFocusNode(),i=!(!t.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||uT(t.outsideClick.target,t.internalOptions.tabbableOptions))),o=t.internalOptions.preventScroll,s=o!==void 0&&o;i&&r.focus({preventScroll:s}),t.originalOptions.onPostDeactivate&&t.originalOptions.onPostDeactivate.call(null),t.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(n,n):n()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var n=!t.active&&this.props.active,r=t.active&&!this.props.active,i=!t.paused&&this.props.paused,o=t.paused&&!this.props.paused;if(n&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else t.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var t=this,n=this.props.children?gi.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===gi.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return gi.cloneElement(n,{ref:function(r){var i=t.props.containerElements;n&&(dT>=19?typeof n.props.ref=="function"?n.props.ref(r):n.props.ref&&(n.props.ref.current=r):typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r)),t.focusTrapElements=i||[r]}})}return null}}])}();Wl.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:cT},hA.exports=Wl;var hT=hA.exports.FocusTrap=Wl;function TA(e){var m;const{children:t,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,...a}=e,{anchor:l,boundary:c}=Q(()=>({anchor:up(r),boundary:i?up(i):void 0}),[r,i]);let u=[];c&&(u=[z0({boundary:c}),G0({boundary:c})]);const{refs:d,floatingStyles:h,middlewareData:f}=function(E){E===void 0&&(E={});const{placement:A="bottom",strategy:_="absolute",middleware:O=[],platform:S,elements:{reference:T,floating:b}={},transform:v=!0,whileElementsMounted:N,open:g}=E,[D,k]=ot({x:0,y:0,strategy:_,placement:A,middlewareData:{},isPositioned:!1}),[C,M]=ot(O);As(C,O)||M(O);const[I,w]=ot(null),[H,P]=ot(null),z=tt(gt=>{gt!==et.current&&(et.current=gt,w(gt))},[]),V=tt(gt=>{gt!==q.current&&(q.current=gt,P(gt))},[]),Y=T||I,B=b||H,et=Z(null),q=Z(null),nt=Z(D),W=N!=null,vt=Ga(N),Rt=Ga(S),ht=Ga(g),mt=tt(()=>{if(!et.current||!q.current)return;const gt={placement:A,strategy:_,middleware:C};Rt.current&&(gt.platform=Rt.current),Y0(et.current,q.current,gt).then(pr=>{const Pe={...pr,isPositioned:ht.current!==!1};wt.current&&!As(nt.current,Pe)&&(nt.current=Pe,uc(()=>{k(Pe)}))})},[C,A,_,Rt,ht]);Bo(()=>{g===!1&&nt.current.isPositioned&&(nt.current.isPositioned=!1,k(gt=>({...gt,isPositioned:!1})))},[g]);const wt=Z(!1);Bo(()=>(wt.current=!0,()=>{wt.current=!1}),[]),Bo(()=>{if(Y&&(et.current=Y),B&&(q.current=B),Y&&B){if(vt.current)return vt.current(Y,B,mt);mt()}},[Y,B,mt,vt,W]);const Me=Q(()=>({reference:et,floating:q,setReference:z,setFloating:V}),[z,V]),Ut=Q(()=>({reference:Y,floating:B}),[Y,B]),Qe=Q(()=>{const gt={position:_,left:0,top:0};if(!Ut.floating)return gt;const pr=ip(Ut.floating,D.x),Pe=ip(Ut.floating,D.y);return v?{...gt,transform:"translate("+pr+"px, "+Pe+"px)",...dA(Ut.floating)>=1.5&&{willChange:"transform"}}:{position:_,left:pr,top:Pe}},[_,v,Ut.floating,D.x,D.y]);return Q(()=>({...D,update:mt,refs:Me,elements:Ut,floatingStyles:Qe}),[D,mt,Me,Ut,Qe])}({placement:n,middleware:u,whileElementsMounted:j0});ge(()=>{l&&d.setReference(l)},[d,l]);const p=o?y(hT,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:y("div",{children:[t,y("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t;return y("div",{ref:d.setFloating,style:{...h,zIndex:1e3,visibility:(m=f.hide)!=null&&m.referenceHidden?"hidden":"visible"},...a,children:p})}function up(e){return typeof e=="string"?document.querySelector(e):e}function vA(e){const t=ct(),n=no(),r=it(n.state$.suggestMentionQuery),i=UE(it(t.state$.extCurrentConversationId),r?1e3:0),o=Q(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ot(0),l=Q(()=>Object.fromEntries(o.map(E=>[E.id,SD(E.name)])),[o]),c=Q(()=>{if(!r)return[];const E=dp(r);return E===""?o:o.filter(A=>l[A.id].some(_=>function(O,S){return Sh(O.substring(0,S.length),S)}(_,E)))},[r,o,l]),u=Z(void 0);G(()=>{if(u.current){const E=c.findIndex(A=>A.id===u.current);a(E===-1?0:E)}},[c]),G(()=>{var E;u.current=(E=c[s])==null?void 0:E.id},[s,c]);const d=tt(E=>{var _;const A=(_=c[E])==null?void 0:_.id;return A&&"mention-button-"+A},[c]),{containerProps:h,itemProps:f}=tA({focused:s,setFocused:a,buttonId:d});if(G(()=>{if(c.length!==0)return n.listenKeydown("mention",E=>QE(E,{dir:"ttb",focused:s,setFocused:a,itemCount:c.length,onSpace(){if(r){const A=c[s];if(Sh(A.name,dp(r)))return n.selectMention(A),!0}return!1},onConfirm(){const A=c[s];n.selectMention(A)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,c,r]),uo(()=>n.closeSuggester(),".t-mention-suggest-list",c.length>0),c.length===0)return null;const p=document.querySelector(".ProseMirror-suggestion");let m;if(p){let E=p.getBoundingClientRect();m={getBoundingClientRect(){const A=p.getBoundingClientRect();return A.width>0&&(E=A),E}}}return y(TA,{className:"t-mention-suggest-list",...h,anchorElement:m,children:c.map((E,A)=>y(pT,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...f(A)},E.id))})}const pT=pn(function(e){const{user:t,isFocused:n,onSelect:r,...i}=e;return y("button",{className:n?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function dp(e){return ft(e[0]==="@"),e.substring(1)}function hp(e,t,n){const r=Zc(e),i=r.indexOf(t);return i===-1?null:r[i+n]||null}const fT=Le(function(e,t){const{children:n,triggerElement:r}=e,{closePopover:i}=Dc(),o=Z(null);Mn(t,()=>o.current),G(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=tt(a=>{(function(l,c,u,d){var E;const h=c.querySelectorAll("[t-menu-item]"),f=document.activeElement;if(!f||!f.hasAttribute("t-menu-item")&&!f.hasAttribute("t-menu"))return;const p=Array.from(h).indexOf(f);let m;switch(l.key){case"ArrowDown":m=Math.min(p+1,h.length-1);break;case"ArrowUp":m=Math.max(p-1,0),p===-1&&(m=h.length-1);break;case"Home":m=0;break;case"End":m=h.length-1;break;case"Tab":{const A=u.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?hp(A,u,-1):function(O,S){return hp(O,S,1)}(A,u);return _==null||_.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return y("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function Nr(e){const{popoverComponent:t,popoverProps:n,children:r,type:i="popover",initialFocus:o,...s}=e,[a,l]=ot(void 0),c=Z(null),[u,d]=ot(!1);uo(tt(()=>{var f;d(!1),(f=c.current)==null||f.focus()},[]),"[t-popover-content]",u);const h=i==="menu"?y(fT,{triggerElement:c.current,children:y(t,{...n})}):y(t,{...n});return y(tg.Provider,{value:{closePopover:()=>d(!1)},children:[y(mT,{...s,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":u,onTrigger:()=>d(!0),ref:f=>(p=>{var E;const m=(E=p==null?void 0:p.closest("[t-menu-boundary]"))!=null?E:void 0;c.current=p,l(m)})(f),children:r}),u&&y(TA,{"t-popover-content":"",anchorElement:c.current,boundaryElement:a,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:h})]})}const mT=Le(function(e,t){const{onTrigger:n,...r}=e,i=tt(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return y("button",{...r,ref:t,onClick:n,onKeyDown:i})});function Sn(e){const{onSelect:t,...n}=e,{closePopover:r}=Dc(),i=tt(o=>{o.key!=="Enter"&&o.key!==" "||(r(),t==null||t())},[t,r]);return y("div",{tabIndex:-1,role:"menuitem",onClick:tt(()=>{r(),t==null||t()},[r,t]),onKeyDown:i,"t-menu-item":"",...n})}function RA(e){return aE(e)}function ar(e){var t;return(t=e.photoUrl)!=null?t:function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
96
|
+
<rect x="0" y="0" width="100" height="100" fill="${aE(n)}"/>
|
|
94
97
|
<text x="50%" y="54%" dominant-baseline="middle" font-size="34" font-family="San Francisco, Segoe UI, Helvetica Neue, Arial, Helvetica, sans-serif" fill="#fff" text-anchor="middle">${r}</text>
|
|
95
|
-
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+
|
|
98
|
+
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+_D(i)}(e.id,OD(e.name))}function ho(e){return e<1024?e+" B":e<1048576?Math.floor(e/1024)+" KB":e<1073741824?Math.floor(e/1048576)+" MB":e<1099511627776?Math.floor(e/1073741824)+" GB":Math.floor(e/1099511627776)+" TB"}function Qc({latitude:e,longitude:t}){const n=e+","+t;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${$S}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function IA(e,t){const[n,r]=ot({long:"",short:""});return ge(()=>{let i,o=!0;const s=()=>{const l=Date.now(),c=function(u,d,h){const f=u-d;let p,m,E;const A=new Date(d),_={month:"short",day:"numeric"};if(f<fp)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(f<mp)p=fp,m="MINUTES",E=h.MINUTES;else if(f<Ep)p=mp,m="HOURS",E=h.HOURS;else{if(!(f<ET)){if(A.getFullYear()===new Date(u).getFullYear()){const S=A.toLocaleDateString(h.locale,_);return{changeTimeout:void 0,short:S,long:S}}{const S=A.toLocaleDateString(h.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:S,long:S}}}p=Ep,m="DAYS",E=h.DAYS}const O=Math.floor(f/p);return{changeTimeout:p,short:O+E,long:AT(O,m.toLowerCase(),h.locale)}}(l,e>l?l-2e3:e,t);return r(c),c},a=()=>{const l=s();o&&l.changeTimeout&&(i=window.setTimeout(a,l.changeTimeout))};return s(),i=window.setTimeout(a,100),()=>{o=!1,clearTimeout(i)}},[t,e]),n}function tu(e){e=Math.floor(e);const t=Math.floor(e/3600);e%=3600;const n=Math.floor(e/60);e%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(e)}`;return t>0&&(i=`${r(t)}:${i}`),i}const pp=864e5;function NA(e,t){const n=Date.now(),r=(i=e,o=n,Math.floor((o-i)/pp));var i,o;if(r<0||r===0)return t.TODAY;if(r===1)return t.YESTERDAY;const s={weekday:"long"},a=new Date(e);if(r<7)return a.toLocaleDateString(t.locale,s);const l=new Date(n);return function(u,d){return Math.floor((d-u)/(365*pp))}(l.setFullYear(l.getFullYear()-1),e)===0?a.toLocaleDateString(t.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(t.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const fp=6e4,mp=36e5,Ep=864e5,ET=6048e5;function AT(e,t,n){return new Intl.RelativeTimeFormat(n).format(-e,t)}function x(e,...t){const n=BS.bind(dt)(e,...t);return Array.isArray(n)?dt(Ht,{},...n):n}function Ys(e,t=10){return UE(e,Math.min(t,100))}function CA({children:e,className:t,...n}){return y("div",{className:"t-attach-overlay "+t,...n,children:e})}function _T({uploadState:e}){const{uploaded:t,errored:n}=e;uo(()=>e.closePreview("cancel"),".t-upload-preview");const r=Z(null);G(()=>{t&&r.current.focus()},[t]);const i=it(ct().t$);return y(CA,{className:"t-upload-preview",children:y("div",{className:"t-preview",children:[!n&&y(gT,{upload:e.upload,uploaded:t}),n&&y("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),y("div",{className:"t-send-row",children:[y("button",{className:"t-cancel",onClick:()=>e.closePreview("cancel"),children:i.CANCEL}),!n&&t&&y("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>e.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function gT({upload:e,uploaded:t}){const n=it(ct().t$);return e.type!=="location"?y(Ht,{children:[y(OT,{upload:e}),y(ST,{upload:e,uploaded:t,t:n})]}):t?y(DT,{location:e.location}):y("div",{className:"t-loading",children:y($c,{})})}function DT({location:e}){const{imageUrl:t,linkUrl:n}=Qc(e);return y("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(t)}) center center / cover no-repeat`}})}const OT=pn(function({upload:e}){let t=null;const n=e.file;if(e.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";t=y("div",{className:"video-container",children:y(TT,{src:e.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else e.type==="image"?t=y("div",{className:"t-img-container",children:y("img",{src:URL.createObjectURL(n)})}):e.type==="audio"&&(t=y(js,{src:URL.createObjectURL(n),filename:n.name}));return t}),ST=pn(function({uploaded:e,upload:t,t:n}){let r;r=e?t.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return t.type==="file"&&(i="is-file",e&&(o="file-block")),y("div",{className:`t-filename-row ${i}`,children:y("div",{className:o,children:r})})});function TT(e){const{videoType:t,...n}=e;return y("video",{...n})}function vT(){const e=ce(),t=ct(),n=En(),r=it(t.state$.isUserConnected),i=it(t.state$.userPermissions);return y(e.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function RT(){const e=ce(),t=En();return y(e.MessageListHeader,{common:t})}function IT({appId:e,chatHeaderVisible:t,messageFieldVisible:n}){const r=no(),i=function(){const m=ct(),E=Ie(()=>{const O=m.extUserId$.get(),S=m.errors$.get(),T=m.authTokenState$.get(),b=O&&m.currentUser$.get(),v=m.state$.currentConversation.get(),N=m.state$.extCurrentConversationId.get(),g=N&&m.state$.participants.child(N).get(),D=N&&m.state$.typing.child(N).get(),k=m.app$.get();return S.serverError?"server-error":S.wrongAppId?"wrong-app-id":T==="loading"||T==="idle"?"loading-token":T==="invalid"?"invalid-token":T==="expired"?"expired-token":T==="valid"?S.unknownUser?"unknown-user":S.unknownConversation?"loading-conv-failed":b&&v&&g&&k&&D?"loaded":"loading-data":void ft.unreachable()}),A=Ie({type:"loading"});Kr(O=>{const S=E.get(),T=m.state$.extCurrentConversationId.peek(),b=m.extUserId$.peek(),v=m.appId$.peek();function N(g){A.set({type:"loading"});const D=setTimeout(()=>{A.set(g)},5e3);return()=>clearTimeout(D)}switch(S){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:v});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:T,userId:b});break;case"loading-conv-failed":O.onCleanup=N({type:"inaccessible-conversation",userId:b,conversationId:T});break;case"unknown-user":O.onCleanup=N({type:"unknown-user",userId:b});break;default:ft.never(S)}});const _=Ie({type:"loading"});return Kr(O=>{if(A.type.get()==="loading"){_.set({type:"invisible-loading"});const S=setTimeout(()=>{_.set({type:"loading"})},1e3);O.onCleanup=()=>{clearTimeout(S)}}else _.set(A.get())}),it(_)}(),{attachFile:o,shareLocation:s,uploadState:a}=US({onClose:()=>r.focus()});G(()=>{r.uploadFile=o},[r,o]);const[l,c]=ot(!1),u=ct(),d=it(()=>u.app$.get()?u.state$.userPermissions.canShareFile.get():void 0),h=tt(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),c(!1)},[o]),f=tt(m=>{m.preventDefault(),c(!0)},[]),p=tt(m=>{m.preventDefault(),c(!1)},[]);return Gc(),i.type==="invisible-loading"?y(Ht,{}):i.type==="loading"?y(xE,{}):i.type==="inaccessible-conversation"?y(xS,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?y(Bs,{appId:e,chatboxState:i}):i.type=="expired-token"?y(FE,{}):i.type==="loaded"?y("div",{className:"t-chatbox-content",onDragOver:d?f:void 0,onDragLeave:d?p:void 0,onDrop:d?h:void 0,children:[t&&y(vT,{}),y(RT,{}),y(kS,{extConversationId:i.conversationId}),y(IS,{}),n&&y(PE,{attachFile:o,shareLocation:s}),a&&y(_T,{uploadState:a}),l&&y(CA,{className:"t-drop-overlay",children:y(ds,{type:"attach"})})]}):y(Ht,{})}function NT(e,t){return e.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=Yc(a);return Vo(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Ro(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Ro(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Ro(i.url)}`;if(i.type==="file"&&i.subtype==="voice"){const s=i.duration;return s===void 0?"🎙️":`🎙️ (${Math.floor(s/60)}:${Math.floor(s%60).toString().padStart(2,"0")})`}return i.type==="file"?(i.subtype,`📎 ${Ro(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
|
|
96
99
|
|
|
97
|
-
`)}function
|
|
98
|
-
`+
|
|
99
|
-
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return
|
|
100
|
-
`);try{return JSON.stringify(i)}catch(o){return String(i)}}(e);super(r),this.userMessage=t!=null?t:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const oo=console;class FS{constructor(e,t,r,i){this.apiUrls=e,this.appId=t,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(e,t={}){const r=this.endpointUrl(e,t),i=await ci(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(e,t){await this._lastPutPromise;const r=ci(()=>this._doPut(e,t));return this._lastPutPromise=r,r}put(e,t,r){const i=()=>this._doPut(e,t);return r?xp(i,r):ci(i,{retries:5})}post(e,t,r){const i=()=>this._doPost(e,t);return r?xp(i,r):ci(i,{retries:5})}delete(e,t={}){return ci(()=>this._doDelete(e,t),{retries:11})}endpointUrl(e,t={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${e}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(t))r.searchParams.set(i,o);return r}async _doPut(e,t){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(t)});return await this.handleResponse(i,r)}async _doPost(e,t){const r=this.endpointUrl(e),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(t)});return await this.handleResponse(i,r)}async _doDelete(e,t){const r=this.endpointUrl(e,t),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(e,t){if(e.status>=300){if(e.status===404)throw hs.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new ll("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(e.status===401){const r=await this.authProvider.getToken();throw hs.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${t} with token ${r}.`),new ll("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(e.status>=300&&e.status<500){const{error:r}=await e.json();throw new ll(r)}{const r=await e.text();throw new Error(`Got non-success response (${r}) from the server for url: ${t}.`)}}return await e.json()}async fetchWithReauth(e,t){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(e,{...t,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(oo.error(`401 error from ${t==null?void 0:t.method} ${e}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function JA(n){return!n.userMessage}function ci(n,{retries:e=30}={}){return lc(e,n,{shouldRetry:JA,log:oo.warn.bind(oo),maxDelay:30,initialDelay:.2})}async function xp(n,e){try{return await n()}catch(r){if(!JA(r))throw r}let t=!1;return e.then(()=>{t=!0}),lc(1e3,n,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!t,log:oo.warn.bind(oo)})}var hu={exports:{}};(function(n,e){var t="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u[i]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u[o]=u["[object Map]"]=u["[object Number]"]=u[s]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1;var c=typeof yo=="object"&&yo&&yo.Object===Object&&yo,d=typeof self=="object"&&self&&self.Object===Object&&self,h=c||d||Function("return this")(),p=e&&!e.nodeType&&e,f=p&&n&&!n.nodeType&&n,m=f&&f.exports===p,E=m&&c.process,A=function(){try{var R=f&&f.require&&f.require("util").types;return R||E&&E.binding&&E.binding("util")}catch(b){}}(),g=A&&A.isTypedArray,O,S=Array.prototype,T=Function.prototype,I=Object.prototype,C=h["__core-js_shared__"],y=T.toString,_=I.hasOwnProperty,D=(O=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",k=I.toString,L=y.call(Object),H=RegExp("^"+y.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=m?h.Buffer:void 0,w=h.Symbol,$=h.Uint8Array;N&&N.allocUnsafe;var U,G,z=(U=Object.getPrototypeOf,G=Object,function(R){return U(G(R))}),V=Object.create,K=I.propertyIsEnumerable,J=S.splice,oe=w?w.toStringTag:void 0,M=function(){try{var R=na(Object,"defineProperty");return R({},"",{}),R}catch(b){}}(),le=N?N.isBuffer:void 0,ve=Math.max,Ne=Date.now,at=na(h,"Map"),Ot=na(Object,"create"),ti=function(){function R(){}return function(b){if(!bn(b))return{};if(V)return V(b);R.prototype=b;var P=new R;return R.prototype=void 0,P}}();function Lt(R){var b=-1,P=R==null?0:R.length;for(this.clear();++b<P;){var j=R[b];this.set(j[0],j[1])}}function Le(R){var b=-1,P=R==null?0:R.length;for(this.clear();++b<P;){var j=R[b];this.set(j[0],j[1])}}function Kt(R){var b=-1,P=R==null?0:R.length;for(this.clear();++b<P;){var j=R[b];this.set(j[0],j[1])}}function Ee(R){var b=this.__data__=new Le(R);this.size=b.size}function lr(R,b){var P=oa(R),j=!P&&ia(R),te=!P&&!j&&Tc(R),_e=!P&&!j&&!te&&Cc(R),fe=P||j||te||_e,Ge=fe?function(we,Jt){for(var rt=-1,ur=Array(we);++rt<we;)ur[rt]=Jt(rt);return ur}(R.length,String):[],nt=Ge.length;for(var ge in R)fe&&(ge=="length"||te&&(ge=="offset"||ge=="parent")||_e&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Oc(ge,nt))||Ge.push(ge);return Ge}function wt(R,b,P){(P!==void 0&&!Ro(R[b],P)||P===void 0&&!(b in R))&&ta(R,b,P)}function r_(R,b,P){var j=R[b];_.call(R,b)&&Ro(j,P)&&(P!==void 0||b in R)||ta(R,b,P)}function Oo(R,b){for(var P=R.length;P--;)if(Ro(R[P][0],b))return P;return-1}function ta(R,b,P){b=="__proto__"&&M?M(R,b,{configurable:!0,enumerable:!0,value:P,writable:!0}):R[b]=P}Lt.prototype.clear=function(){this.__data__=Ot?Ot(null):{},this.size=0},Lt.prototype.delete=function(R){var b=this.has(R)&&delete this.__data__[R];return this.size-=b?1:0,b},Lt.prototype.get=function(R){var b=this.__data__;if(Ot){var P=b[R];return P===t?void 0:P}return _.call(b,R)?b[R]:void 0},Lt.prototype.has=function(R){var b=this.__data__;return Ot?b[R]!==void 0:_.call(b,R)},Lt.prototype.set=function(R,b){var P=this.__data__;return this.size+=this.has(R)?0:1,P[R]=Ot&&b===void 0?t:b,this},Le.prototype.clear=function(){this.__data__=[],this.size=0},Le.prototype.delete=function(R){var b=this.__data__,P=Oo(b,R);return!(P<0)&&(P==b.length-1?b.pop():J.call(b,P,1),--this.size,!0)},Le.prototype.get=function(R){var b=this.__data__,P=Oo(b,R);return P<0?void 0:b[P][1]},Le.prototype.has=function(R){return Oo(this.__data__,R)>-1},Le.prototype.set=function(R,b){var P=this.__data__,j=Oo(P,R);return j<0?(++this.size,P.push([R,b])):P[j][1]=b,this},Kt.prototype.clear=function(){this.size=0,this.__data__={hash:new Lt,map:new(at||Le),string:new Lt}},Kt.prototype.delete=function(R){var b=To(this,R).delete(R);return this.size-=b?1:0,b},Kt.prototype.get=function(R){return To(this,R).get(R)},Kt.prototype.has=function(R){return To(this,R).has(R)},Kt.prototype.set=function(R,b){var P=To(this,R),j=P.size;return P.set(R,b),this.size+=P.size==j?0:1,this},Ee.prototype.clear=function(){this.__data__=new Le,this.size=0},Ee.prototype.delete=function(R){var b=this.__data__,P=b.delete(R);return this.size=b.size,P},Ee.prototype.get=function(R){return this.__data__.get(R)},Ee.prototype.has=function(R){return this.__data__.has(R)},Ee.prototype.set=function(R,b){var P=this.__data__;if(P instanceof Le){var j=P.__data__;if(!at||j.length<199)return j.push([R,b]),this.size=++P.size,this;P=this.__data__=new Kt(j)}return P.set(R,b),this.size=P.size,this};var i_=function(R,b,P){for(var j=-1,te=Object(R),_e=P(R),fe=_e.length;fe--;){var Ge=_e[++j];if(b(te[Ge],Ge,te)===!1)break}return R};function So(R){return R==null?R===void 0?"[object Undefined]":"[object Null]":oe&&oe in Object(R)?function(b){var P=_.call(b,oe),j=b[oe];try{b[oe]=void 0;var te=!0}catch(fe){}var _e=k.call(b);return te&&(P?b[oe]=j:delete b[oe]),_e}(R):function(b){return k.call(b)}(R)}function gc(R){return ni(R)&&So(R)==i}function o_(R){return!(!bn(R)||function(b){return!!D&&D in b}(R))&&(aa(R)?H:a).test(function(b){if(b!=null){try{return y.call(b)}catch(P){}try{return b+""}catch(P){}}return""}(R))}function s_(R){if(!bn(R))return function(te){var _e=[];if(te!=null)for(var fe in Object(te))_e.push(fe);return _e}(R);var b=Sc(R),P=[];for(var j in R)(j!="constructor"||!b&&_.call(R,j))&&P.push(j);return P}function Dc(R,b,P,j,te){R!==b&&i_(b,function(_e,fe){if(te||(te=new Ee),bn(_e))(function(nt,ge,we,Jt,rt,ur,ri){var Mt=ra(nt,we),it=ra(ge,we),Nc=ri.get(it);if(Nc)return void wt(nt,we,Nc);var lt=ur?ur(Mt,it,we+"",nt,ge,ri):void 0,ii=lt===void 0;if(ii){var ua=oa(it),ca=!ua&&Tc(it),yc=!ua&&!ca&&Cc(it);lt=it,ua||ca||yc?oa(Mt)?lt=Mt:ni(bc=Mt)&&sa(bc)?lt=function(be,At){var Be=-1,ut=be.length;for(At||(At=Array(ut));++Be<ut;)At[Be]=be[Be];return At}(Mt):ca?(ii=!1,lt=it.slice()):yc?(ii=!1,lt=function(be){var At=(Be=be.buffer,ut=new Be.constructor(Be.byteLength),new $(ut).set(new $(Be)),ut),Be,ut;return new be.constructor(At,be.byteOffset,be.length)}(it)):lt=[]:function(be){if(!ni(be)||So(be)!=s)return!1;var At=z(be);if(At===null)return!0;var Be=_.call(At,"constructor")&&At.constructor;return typeof Be=="function"&&Be instanceof Be&&y.call(Be)==L}(it)||ia(it)?(lt=Mt,ia(Mt)?lt=function(be){return function(At,Be,ut){var d_=!ut;ut||(ut={});for(var kc=-1,h_=Be.length;++kc<h_;){var da=Be[kc],Co=void 0;Co===void 0&&(Co=At[da]),d_?ta(ut,da,Co):r_(ut,da,Co)}return ut}(be,Ic(be))}(Mt):bn(Mt)&&!aa(Mt)||(lt=function(be){return typeof be.constructor!="function"||Sc(be)?{}:ti(z(be))}(it))):ii=!1}var bc;ii&&(ri.set(it,lt),rt(lt,it,Jt,ur,ri),ri.delete(it)),wt(nt,we,lt)})(R,b,fe,P,Dc,j,te);else{var Ge=j?j(ra(R,fe),_e,fe+"",R,b,te):void 0;Ge===void 0&&(Ge=_e),wt(R,fe,Ge)}},Ic)}function a_(R,b){return u_(function(P,j,te){return j=ve(j===void 0?P.length-1:j,0),function(){for(var _e=arguments,fe=-1,Ge=ve(_e.length-j,0),nt=Array(Ge);++fe<Ge;)nt[fe]=_e[j+fe];fe=-1;for(var ge=Array(j+1);++fe<j;)ge[fe]=_e[fe];return ge[j]=te(nt),function(we,Jt,rt){switch(rt.length){case 0:return we.call(Jt);case 1:return we.call(Jt,rt[0]);case 2:return we.call(Jt,rt[0],rt[1]);case 3:return we.call(Jt,rt[0],rt[1],rt[2])}return we.apply(Jt,rt)}(P,this,ge)}}(R,b,vc),R+"")}var l_=M?function(R,b){return M(R,"toString",{configurable:!0,enumerable:!1,value:(P=b,function(){return P}),writable:!0});var P}:vc;function To(R,b){var P,j,te=R.__data__;return((j=typeof(P=b))=="string"||j=="number"||j=="symbol"||j=="boolean"?P!=="__proto__":P===null)?te[typeof b=="string"?"string":"hash"]:te.map}function na(R,b){var P=function(j,te){return j==null?void 0:j[te]}(R,b);return o_(P)?P:void 0}function Oc(R,b){var P=typeof R;return!!(b=b==null?r:b)&&(P=="number"||P!="symbol"&&l.test(R))&&R>-1&&R%1==0&&R<b}function Sc(R){var b=R&&R.constructor;return R===(typeof b=="function"&&b.prototype||I)}function ra(R,b){if((b!=="constructor"||typeof R[b]!="function")&&b!="__proto__")return R[b]}var u_=function(R){var b=0,P=0;return function(){var j=Ne(),te=16-(j-P);if(P=j,te>0){if(++b>=800)return arguments[0]}else b=0;return R.apply(void 0,arguments)}}(l_);function Ro(R,b){return R===b||R!=R&&b!=b}var ia=gc(function(){return arguments}())?gc:function(R){return ni(R)&&_.call(R,"callee")&&!K.call(R,"callee")},oa=Array.isArray;function sa(R){return R!=null&&Rc(R.length)&&!aa(R)}var Tc=le||function(){return!1};function aa(R){if(!bn(R))return!1;var b=So(R);return b==o||b=="[object GeneratorFunction]"||b=="[object AsyncFunction]"||b=="[object Proxy]"}function Rc(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=r}function bn(R){var b=typeof R;return R!=null&&(b=="object"||b=="function")}function ni(R){return R!=null&&typeof R=="object"}var Cc=g?function(R){return function(b){return R(b)}}(g):function(R){return ni(R)&&Rc(R.length)&&!!u[So(R)]};function Ic(R){return sa(R)?lr(R):s_(R)}var la,c_=(la=function(R,b,P){Dc(R,b,P)},a_(function(R,b){var P=-1,j=b.length,te=j>1?b[j-1]:void 0,_e=j>2?b[2]:void 0;for(te=la.length>3&&typeof te=="function"?(j--,te):void 0,_e&&function(Ge,nt,ge){if(!bn(ge))return!1;var we=typeof nt;return!!(we=="number"?sa(ge)&&Oc(nt,ge.length):we=="string"&&nt in ge)&&Ro(ge[nt],Ge)}(b[0],b[1],_e)&&(te=j<3?void 0:te,j=1),R=Object(R);++P<j;){var fe=b[P];fe&&la(R,fe,P,te)}return R}));function vc(R){return R}n.exports=c_})(hu,hu.exports);const PS=rg(hu.exports);class xS{constructor(e,t,r,i){this.backendRestClient=new FS(e,t,r,i)}async getApp(e){return function(t){const r=function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
100
|
+
`)}function Vo(e,t){return e.flatMap(n=>{if(typeof n=="string")return n;switch(n.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return Vo(n.children,t);case"bulletlist":case"bulletList":return`
|
|
101
|
+
`+Vo(n.children,t);case"bulletpoint":case"bulletPoint":return"- "+Vo(n.children,t)+`
|
|
102
|
+
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return t.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}const ko=new Uint8Array(31);function yA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(ko);else for(let t=0;t<ko.length;t++)ko[t]=Math.floor(256*Math.random());let e=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^ko[e++]&15>>+t/4).toString(16))}class CT{constructor(t,n,r,i,o,s){this.store=t,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s}async deleteMessage(t){const n=this.store.state$.extCurrentConversationId.peek(),r=this.store.state$.messages.child(n).lookup.child(t).peek(),i=this.talkSession.conversation(n).message(t),[o]=await Promise.all([r!=null?r:i.get(),i.delete()]);if(o){const s={currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek(),message:r};this.onDeleteMessage(s)}}setEditing(t){this.store.state$.editingMessageId.set(t)}async editMessage(t,n){const r=this.store.state$.extCurrentConversationId.peek();await this.talkSession.conversation(r).message(t).edit(n)}setReferencedMessage(t){this.store.state$.referencedMessageId.set(t),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100)}async sendMessage(t){const n=this.store.state$.extCurrentConversationId.peek(),r=await async function(s,a){var m,E,A,_,O;const l=s.state$.extCurrentConversationId.peek(),c=s.state$.messages.child(l),u=typeof a.referencedMessage=="string"?c.lookup.child(a.referencedMessage).peek():await((E=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),d=u&&{...u,type:"UserMessage",sender:u.sender,referencedMessageId:(_=(A=u.referencedMessage)==null?void 0:A.id)!=null?_:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,f="content"in a?[Ap(h,a.content[0])]:[yT(a.text)],p="text"in a?a.text:NT(a.content.map(S=>Ap(h,S)),{});return{id:"ephemeral-"+yA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(O=a.custom)!=null?O:{},origin:"web",referencedMessage:d,reactions:[],content:f,plaintext:p}}(this.store,t);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=Vi();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(t);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(t){const n={type:"file",fileToken:t.fileToken};return this.sendMessage({content:[n],custom:t.custom})}sendLocationMessage(t){const n={type:"location",latitude:t.location.latitude,longitude:t.location.longitude};return this.sendMessage({content:[n],custom:t.custom})}markAsTyping(){const t=this.store.state$.extCurrentConversationId.peek();this.talkSession.conversation(t).markAsTyping()}async toggleReaction(t,n){typeof n!="string"&&(n=n.emoji);const r=this.store.state$.extCurrentConversationId.peek(),i=this.store.state$.messages.child(r).lookup.child(t).peek().reactions.find(s=>s.emoji===n),o=this._getReactionRef(t,n);i!=null&&i.currentUserReacted?await o.remove():await o.add()}async addReaction(t,n){await this._getReactionRef(t,n).add()}triggerMessageAction(t,n,r){const i=this.store.state$.currentConversation.peek();typeof t=="string"&&(t=this.store.state$.messages.child(i.id).lookup.child(t).peek()),this.onMessageAction({action:n,params:r,message:t,conversation:i})}storeDraft(t){const n=this.store.state$.extCurrentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&vS(n,r.id,i,t)}_getReactionRef(t,n){const r=this.store.state$.extCurrentConversationId.peek();return this.talkSession.conversation(r).message(t).reaction(n)}}const yT=e=>({type:"text",children:function(n){return NE(n,{except:["FormattedLink","Actions"]})}(e)});function Ap(e,t){switch(t.type){case"text":case"location":return t;case"file":return function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}}(e,t)}}function _p(e){return Object.keys(e)}class Ka extends Error{constructor(t,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
|
|
103
|
+
`);try{return JSON.stringify(i)}catch(o){return String(i)}}(t);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const qi=console;class bT{constructor(t,n,r,i){this.apiUrls=t,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(t,n={}){const r=this.endpointUrl(t,n),i=await hi(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,n){await this._lastPutPromise;const r=hi(()=>this._doPut(t,n));return this._lastPutPromise=r,r}put(t,n,r){const i=()=>this._doPut(t,n);return r?gp(i,r):hi(i,{retries:5})}post(t,n,r){const i=()=>this._doPost(t,n);return r?gp(i,r):hi(i,{retries:5})}delete(t,n={}){return hi(()=>this._doDelete(t,n),{retries:11})}endpointUrl(t,n={}){const r=new URL(this.apiUrls.internalHttpApiUrl);r.pathname+=`/${this.appId}/${t}`,r.searchParams.set("sessionId",this.sessionId);for(const[i,o]of Object.entries(n))r.searchParams.set(i,o);return r}async _doPut(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(t,n){const r=this.endpointUrl(t,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(t,n){if(t.status>=300){if(t.status===404)throw Zo.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new Ka("Could not find app.",`Could not find given appId: "${this.appId}". You can find your appId on https://talkjs.com/dashboard.`);if(t.status===401){const r=await this.authProvider.getToken();throw Zo.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new Ka("User not authenticated.","Could not authenticate user. Check if your signature is calculated correctly.")}if(t.status>=300&&t.status<500){const{error:r}=await t.json();throw new Ka(r)}{const r=await t.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await t.json()}async fetchWithReauth(t,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(t,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(qi.error(`401 error from ${n==null?void 0:n.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function bA(e){return!e.userMessage}function hi(e,{retries:t=30}={}){return Vc(t,e,{shouldRetry:bA,log:qi.warn.bind(qi),maxDelay:30,initialDelay:.2})}async function gp(e,t){try{return await e()}catch(r){if(!bA(r))throw r}let n=!1;return t.then(()=>{n=!0}),Vc(1e3,e,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:qi.warn.bind(qi)})}var Xl={exports:{}};(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u=typeof Oo=="object"&&Oo&&Oo.Object===Object&&Oo,d=typeof self=="object"&&self&&self.Object===Object&&self,h=u||d||Function("return this")(),f=t&&!t.nodeType&&t,p=f&&e&&!e.nodeType&&e,m=p&&p.exports===f,E=m&&u.process,A=function(){try{var R=p&&p.require&&p.require("util").types;return R||E&&E.binding&&E.binding("util")}catch(L){}}(),_=A&&A.isTypedArray,O,S=Array.prototype,T=Function.prototype,b=Object.prototype,v=h["__core-js_shared__"],N=T.toString,g=b.hasOwnProperty,D=(O=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",k=b.toString,C=N.call(Object),M=RegExp("^"+N.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=m?h.Buffer:void 0,w=h.Symbol,H=h.Uint8Array;I&&I.allocUnsafe;var P,z,V=(P=Object.getPrototypeOf,z=Object,function(R){return P(z(R))}),Y=Object.create,B=b.propertyIsEnumerable,et=S.splice,q=w?w.toStringTag:void 0,nt=function(){try{var R=Gs(Object,"defineProperty");return R({},"",{}),R}catch(L){}}(),W=I?I.isBuffer:void 0,vt=Math.max,Rt=Date.now,ht=Gs(h,"Map"),mt=Gs(Object,"create"),wt=function(){function R(){}return function(L){if(!Fn(L))return{};if(Y)return Y(L);R.prototype=L;var F=new R;return R.prototype=void 0,F}}();function Me(R){var L=-1,F=R==null?0:R.length;for(this.clear();++L<F;){var j=R[L];this.set(j[0],j[1])}}function Ut(R){var L=-1,F=R==null?0:R.length;for(this.clear();++L<F;){var j=R[L];this.set(j[0],j[1])}}function Qe(R){var L=-1,F=R==null?0:R.length;for(this.clear();++L<F;){var j=R[L];this.set(j[0],j[1])}}function gt(R){var L=this.__data__=new Ut(R);this.size=L.size}function pr(R,L){var F=Ks(R),j=!F&&Xs(R),rt=!F&&!j&&ou(R),Dt=!F&&!j&&!rt&&au(R),Et=F||j||rt||Dt,Jt=Et?function(Bt,tn){for(var oe=-1,fr=Array(Bt);++oe<Bt;)fr[oe]=tn(oe);return fr}(R.length,String):[],ie=Jt.length;for(var Ot in R)Et&&(Ot=="length"||rt&&(Ot=="offset"||Ot=="parent")||Dt&&(Ot=="buffer"||Ot=="byteLength"||Ot=="byteOffset")||ru(Ot,ie))||Jt.push(Ot);return Jt}function Pe(R,L,F){(F!==void 0&&!Eo(R[L],F)||F===void 0&&!(L in R))&&zs(R,L,F)}function FA(R,L,F){var j=R[L];g.call(R,L)&&Eo(j,F)&&(F!==void 0||L in R)||zs(R,L,F)}function po(R,L){for(var F=R.length;F--;)if(Eo(R[F][0],L))return F;return-1}function zs(R,L,F){L=="__proto__"&&nt?nt(R,L,{configurable:!0,enumerable:!0,value:F,writable:!0}):R[L]=F}Me.prototype.clear=function(){this.__data__=mt?mt(null):{},this.size=0},Me.prototype.delete=function(R){var L=this.has(R)&&delete this.__data__[R];return this.size-=L?1:0,L},Me.prototype.get=function(R){var L=this.__data__;if(mt){var F=L[R];return F===n?void 0:F}return g.call(L,R)?L[R]:void 0},Me.prototype.has=function(R){var L=this.__data__;return mt?L[R]!==void 0:g.call(L,R)},Me.prototype.set=function(R,L){var F=this.__data__;return this.size+=this.has(R)?0:1,F[R]=mt&&L===void 0?n:L,this},Ut.prototype.clear=function(){this.__data__=[],this.size=0},Ut.prototype.delete=function(R){var L=this.__data__,F=po(L,R);return!(F<0)&&(F==L.length-1?L.pop():et.call(L,F,1),--this.size,!0)},Ut.prototype.get=function(R){var L=this.__data__,F=po(L,R);return F<0?void 0:L[F][1]},Ut.prototype.has=function(R){return po(this.__data__,R)>-1},Ut.prototype.set=function(R,L){var F=this.__data__,j=po(F,R);return j<0?(++this.size,F.push([R,L])):F[j][1]=L,this},Qe.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(ht||Ut),string:new Me}},Qe.prototype.delete=function(R){var L=mo(this,R).delete(R);return this.size-=L?1:0,L},Qe.prototype.get=function(R){return mo(this,R).get(R)},Qe.prototype.has=function(R){return mo(this,R).has(R)},Qe.prototype.set=function(R,L){var F=mo(this,R),j=F.size;return F.set(R,L),this.size+=F.size==j?0:1,this},gt.prototype.clear=function(){this.__data__=new Ut,this.size=0},gt.prototype.delete=function(R){var L=this.__data__,F=L.delete(R);return this.size=L.size,F},gt.prototype.get=function(R){return this.__data__.get(R)},gt.prototype.has=function(R){return this.__data__.has(R)},gt.prototype.set=function(R,L){var F=this.__data__;if(F instanceof Ut){var j=F.__data__;if(!ht||j.length<199)return j.push([R,L]),this.size=++F.size,this;F=this.__data__=new Qe(j)}return F.set(R,L),this.size=F.size,this};var HA=function(R,L,F){for(var j=-1,rt=Object(R),Dt=F(R),Et=Dt.length;Et--;){var Jt=Dt[++j];if(L(rt[Jt],Jt,rt)===!1)break}return R};function fo(R){return R==null?R===void 0?"[object Undefined]":"[object Null]":q&&q in Object(R)?function(L){var F=g.call(L,q),j=L[q];try{L[q]=void 0;var rt=!0}catch(Et){}var Dt=k.call(L);return rt&&(F?L[q]=j:delete L[q]),Dt}(R):function(L){return k.call(L)}(R)}function eu(R){return ii(R)&&fo(R)==i}function UA(R){return!(!Fn(R)||function(L){return!!D&&D in L}(R))&&(Js(R)?M:a).test(function(L){if(L!=null){try{return N.call(L)}catch(F){}try{return L+""}catch(F){}}return""}(R))}function BA(R){if(!Fn(R))return function(rt){var Dt=[];if(rt!=null)for(var Et in Object(rt))Dt.push(Et);return Dt}(R);var L=iu(R),F=[];for(var j in R)(j!="constructor"||!L&&g.call(R,j))&&F.push(j);return F}function nu(R,L,F,j,rt){R!==L&&HA(L,function(Dt,Et){if(rt||(rt=new gt),Fn(Dt))(function(ie,Ot,Bt,tn,oe,fr,oi){var xe=Ws(ie,Bt),se=Ws(Ot,Bt),uu=oi.get(se);if(uu)return void Pe(ie,Bt,uu);var ue=fr?fr(xe,se,Bt+"",ie,Ot,oi):void 0,si=ue===void 0;if(si){var Qs=Ks(se),ta=!Qs&&ou(se),du=!Qs&&!ta&&au(se);ue=se,Qs||ta||du?Ks(xe)?ue=xe:ii(hu=xe)&&qs(hu)?ue=function(Mt,De){var Wt=-1,de=Mt.length;for(De||(De=Array(de));++Wt<de;)De[Wt]=Mt[Wt];return De}(xe):ta?(si=!1,ue=se.slice()):du?(si=!1,ue=function(Mt){var De=(Wt=Mt.buffer,de=new Wt.constructor(Wt.byteLength),new H(de).set(new H(Wt)),de),Wt,de;return new Mt.constructor(De,Mt.byteOffset,Mt.length)}(se)):ue=[]:function(Mt){if(!ii(Mt)||fo(Mt)!=s)return!1;var De=V(Mt);if(De===null)return!0;var Wt=g.call(De,"constructor")&&De.constructor;return typeof Wt=="function"&&Wt instanceof Wt&&N.call(Wt)==C}(se)||Xs(se)?(ue=xe,Xs(xe)?ue=function(Mt){return function(De,Wt,de){var zA=!de;de||(de={});for(var pu=-1,GA=Wt.length;++pu<GA;){var ea=Wt[pu],Ao=void 0;Ao===void 0&&(Ao=De[ea]),zA?zs(de,ea,Ao):FA(de,ea,Ao)}return de}(Mt,lu(Mt))}(xe):Fn(xe)&&!Js(xe)||(ue=function(Mt){return typeof Mt.constructor!="function"||iu(Mt)?{}:wt(V(Mt))}(se))):si=!1}var hu;si&&(oi.set(se,ue),oe(ue,se,tn,fr,oi),oi.delete(se)),Pe(ie,Bt,ue)})(R,L,Et,F,nu,j,rt);else{var Jt=j?j(Ws(R,Et),Dt,Et+"",R,L,rt):void 0;Jt===void 0&&(Jt=Dt),Pe(R,Et,Jt)}},lu)}function jA(R,L){return VA(function(F,j,rt){return j=vt(j===void 0?F.length-1:j,0),function(){for(var Dt=arguments,Et=-1,Jt=vt(Dt.length-j,0),ie=Array(Jt);++Et<Jt;)ie[Et]=Dt[j+Et];Et=-1;for(var Ot=Array(j+1);++Et<j;)Ot[Et]=Dt[Et];return Ot[j]=rt(ie),function(Bt,tn,oe){switch(oe.length){case 0:return Bt.call(tn);case 1:return Bt.call(tn,oe[0]);case 2:return Bt.call(tn,oe[0],oe[1]);case 3:return Bt.call(tn,oe[0],oe[1],oe[2])}return Bt.apply(tn,oe)}(F,this,Ot)}}(R,L,cu),R+"")}var $A=nt?function(R,L){return nt(R,"toString",{configurable:!0,enumerable:!1,value:(F=L,function(){return F}),writable:!0});var F}:cu;function mo(R,L){var F,j,rt=R.__data__;return((j=typeof(F=L))=="string"||j=="number"||j=="symbol"||j=="boolean"?F!=="__proto__":F===null)?rt[typeof L=="string"?"string":"hash"]:rt.map}function Gs(R,L){var F=function(j,rt){return j==null?void 0:j[rt]}(R,L);return UA(F)?F:void 0}function ru(R,L){var F=typeof R;return!!(L=L==null?r:L)&&(F=="number"||F!="symbol"&&l.test(R))&&R>-1&&R%1==0&&R<L}function iu(R){var L=R&&R.constructor;return R===(typeof L=="function"&&L.prototype||b)}function Ws(R,L){if((L!=="constructor"||typeof R[L]!="function")&&L!="__proto__")return R[L]}var VA=function(R){var L=0,F=0;return function(){var j=Rt(),rt=16-(j-F);if(F=j,rt>0){if(++L>=800)return arguments[0]}else L=0;return R.apply(void 0,arguments)}}($A);function Eo(R,L){return R===L||R!=R&&L!=L}var Xs=eu(function(){return arguments}())?eu:function(R){return ii(R)&&g.call(R,"callee")&&!B.call(R,"callee")},Ks=Array.isArray;function qs(R){return R!=null&&su(R.length)&&!Js(R)}var ou=W||function(){return!1};function Js(R){if(!Fn(R))return!1;var L=fo(R);return L==o||L=="[object GeneratorFunction]"||L=="[object AsyncFunction]"||L=="[object Proxy]"}function su(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=r}function Fn(R){var L=typeof R;return R!=null&&(L=="object"||L=="function")}function ii(R){return R!=null&&typeof R=="object"}var au=_?function(R){return function(L){return R(L)}}(_):function(R){return ii(R)&&su(R.length)&&!!c[fo(R)]};function lu(R){return qs(R)?pr(R):BA(R)}var Zs,YA=(Zs=function(R,L,F){nu(R,L,F)},jA(function(R,L){var F=-1,j=L.length,rt=j>1?L[j-1]:void 0,Dt=j>2?L[2]:void 0;for(rt=Zs.length>3&&typeof rt=="function"?(j--,rt):void 0,Dt&&function(Jt,ie,Ot){if(!Fn(Ot))return!1;var Bt=typeof ie;return!!(Bt=="number"?qs(Ot)&&ru(ie,Ot.length):Bt=="string"&&ie in Ot)&&Eo(Ot[ie],Jt)}(L[0],L[1],Dt)&&(rt=j<3?void 0:rt,j=1),R=Object(R);++F<j;){var Et=L[F];Et&&Zs(R,Et,F,rt)}return R}));function cu(R){return R}e.exports=YA})(Xl,Xl.exports);const kT=P_(Xl.exports);class LT{constructor(t,n,r,i){this.backendRestClient=new bT(t,n,r,i)}async getApp(t){return function(n){const r=function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
101
104
|
{{sender.name}} wants to chat with you on {{app.name}}:`,includeMessages:!0,inboxUrl:"{{app.custom.websiteUrl}}",inboxLinkText:"Join the chat",footer:`On behalf of {{sender.name}},
|
|
102
105
|
The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
|
|
103
106
|
Hi {{recipient.name}}, <br/>
|
|
@@ -121,118 +124,118 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
121
124
|
{{app.custom.websiteUrl}} Join the chat
|
|
122
125
|
|
|
123
126
|
On behalf of {{sender.name}},
|
|
124
|
-
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return
|
|
125
|
-
font-family: "${
|
|
127
|
+
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return kT(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new zE(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}}(await this.backendRestClient.get("/app",{role_name:t}))}async checkIfAppExists(){return this.backendRestClient.get("/app").then(()=>!0).catch(t=>{if(t.message==="Could not find app.")return!1;throw t})}}class Cr{constructor(t,n,r){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(t,n,r){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(t,n,r,i,o){const s=encodeURIComponent(n);return this.realtimeWsApiUrl+`/${t}/realtime/${s}?talkjs-client-build=${o!=null?o:"standalone"}&talkjs-core=${r}&talkjs-client-id=${i}`}static fromHost(t){var r;const n=new Cr("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return n;if(t==="@currentHost"){if(typeof location=="undefined")throw new Error("You can only use @currentHost in a browser.");t=((r=window.top)!=null?r:window).location.host}if(t.endsWith("talkjs.com")){const i=t.match(/^(?:\w+-)?([^.]+)\.talkjs\.com$/);if(i){const o=i[1];return["app","cdn","api","realtime"].includes(o)?n:new Cr(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new Cr(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new Cr(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function kA(e,t){const n=t.appId,r=t.userId,i="conversationId"in t?t.conversationId:void 0,o=Q(()=>Cr.fromHost(t.host),[t.host]),s=Z(void 0),a=Q(()=>{const d=s.current,h=typeof d!=typeof t.tokenFetcher?t.tokenFetcher:d;return s.current=h,h},[t.tokenFetcher]);ge(()=>{e.updateThemeCustom(t.themeCustom)},[e,t.themeCustom]);const l=Q(()=>yA(),[t.appId,t.userId,t.token,a]),c=WA.getTalkSession({apiUrls:o,appId:n,userId:r,token:t.token,tokenFetcher:a});G(()=>e.listenForErrors(c,i),[c,e,i]);const u=Q(()=>new LT(o,n,l,c._authProvider),[n,l,c,o]);return G(()=>e.listenForAuthChanges(c,a),[c,e,a]),G(()=>e.listenForUserAndAppChanges(c,u),[e,u,c]),{session:c,restApi:u}}function Di(e,t,n){const r=Z(e),i=Z(n);return ge(()=>{r.current=e,i.current=n}),tt(o=>{r.current&&r.current(o),(t==null?void 0:t.tagName)!=="T-CHATBOX"&&(t==null?void 0:t.tagName)!=="T-CONVERSATION-LIST"||function(s,a,l){for(const c of l){const u=new Event(c);Object.assign(u,a),s.dispatchEvent(u)}}(t,o,i.current)},[t])}function LA(e){G(()=>{const t=window,n=e.current;if(t.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")}(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[e])}function wA(){const[e,t]=ot(!0);return G(()=>{t(!1)},[]),e}const wT=Le(function(e,t){var v,N;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,beforeBrowserPermissionPrompt:o,onMissingBrowserPermission:s,messageFieldPlaceholder:a,messageFieldSpellcheck:l,__hostElement:c}=e;G(()=>{var g;(g=e.__internalOnLoaded)==null||g.call(e)},[]);const u=wA(),d=Z(c!=null?c:null);LA(d);const h=Di(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),f=Di(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),p=Di(i,c,["messageAction","message-action","messageaction","MessageAction"]),m={beforeBrowserPermissionPrompt:o,onMissingBrowserPermissionCallback:Di(s,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:E,controller:A,editorInternals:_,session:O}=function(g,D,k,C){const M=g.conversationId,I=Q(()=>new nm(g.appId,g.userId),[]),{session:w,restApi:H}=kA(I,g),P=Q(()=>new LE(I.state$.editor,I.device$,I.state$.userPermissions),[I]),z=Q(()=>new CT(I,w,P,D,k,C),[w,I,P,D,k,C]);return P.controller=z,G(()=>{let V,Y=!0;const B=w.currentUser.subscribe(async et=>{if(Y&&(I.errors$.unknownUser.set(!et),et&&(I.currentUser$.set(et),et.role!==V))){V=et.role;const q=await H.getApp(et.role);if(!Y)return;I.app$.set(q)}});return()=>{Y=!1,B.unsubscribe()}},[H,w,I]),G(()=>{let V=!0;Vr(()=>{I.state$.extCurrentConversationId.set(M),I.state$.currentConversation.set(null),I.state$.referencedMessageId.set(null)});const Y=w.conversation(M).subscribeMessages(async(W,vt)=>{V&&W&&(await I.readyForNewMessagesPromise,I.storeMessages(M,W,vt))});I.messageSubscription=Y;const B=w.conversation(M).subscribeParticipants(W=>{V&&W&&I.state$.participants.child(M).set(W)});I.participantSubscription=B;const et=w.conversation(M).subscribe(async W=>{V&&W&&I.state$.currentConversation.set(W)}),q=w.conversation(M).subscribeTyping(W=>{V&&W&&I.storeTyping(M,W)}),nt=I.state$.participants.child(M).onChange(({value:W})=>{if(!W)return;const vt=new Set;for(const Rt of W)vt.add(Rt.user.id);Vr(()=>{var Rt;for(const ht of _p(I.onlineSubscriptions))vt.has(ht)||((Rt=I.onlineSubscriptions[ht])==null||Rt.unsubscribe(),delete I.onlineSubscriptions[ht],I.state$.isUserConnected.child(ht).set(!1))});for(const Rt of vt)I.onlineSubscriptions[Rt]||(I.onlineSubscriptions[Rt]=w.user(Rt).subscribeOnline(ht=>{ht&&I.state$.isUserConnected.child(Rt).set(ht.isConnected)}))},{initial:!0});return()=>{V=!1,B.unsubscribe(),et.unsubscribe(),Y.unsubscribe(),q.unsubscribe(),I.messageSubscription=null,I.participantSubscription=null,nt();for(const W of _p(I.onlineSubscriptions))I.onlineSubscriptions[W].unsubscribe();I.onlineSubscriptions={},I.state$.isUserConnected.set({})}},[I,M,w]),{store:I,controller:z,editorInternals:P,session:w}}(e,f,h,p),S=tt(async()=>{const g=_.state$;if(g.isEmpty.peek()||g.atTextLimit.peek())return;const D=_.getText(),k=E.state$.referencedMessageId.peek();k&&A.setReferencedMessage(null),_.clearText(),E.state$.editor.showEmojiPicker.set(!1),await A.sendMessage({text:D,referencedMessage:k!=null?k:void 0})},[A,_,E]);G(()=>{var D;const g=(D=e.enterSendsMessage)!=null?D:!0;_.onEnter=g?S:void 0},[_,e.enterSendsMessage,S]),G(()=>{_.spellcheck$.set(l)},[_,l]),G(()=>{_.placeholder$.set(a)},[_,a]),Mn(t,()=>({controller:A,editorInternals:_}));const T=tt(({error:g})=>y(Bs,{appId:e.appId,chatboxState:{type:"unexpected-error",error:g}}),[e.appId]),b=u?null:y(Hf,{fallbackRender:T,children:y(zf.Provider,{value:_,children:y(Wf.Provider,{value:E,children:y(Yf.Provider,{value:e.theme,children:y(Gf.Provider,{value:m,children:y(Xf.Provider,{value:A,children:y(gc.Provider,{value:O,children:y(J_.Provider,{value:{sendMessage:S},children:y(IT,{appId:e.appId,chatHeaderVisible:(v=e.chatHeaderVisible)!=null?v:!0,messageFieldVisible:(N=e.messageFieldVisible)!=null?N:!0})})})})})})})})});return c?b:y("div",{className:"t-chatbox"+(e.className?` ${e.className}`:""),style:e.style,ref:d,children:b})});(function(e="Twemoji Country Flags",t="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&qu("😊")&&!qu("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
|
|
128
|
+
font-family: "${e}";
|
|
126
129
|
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
|
|
127
130
|
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
128
|
-
src: url('${
|
|
131
|
+
src: url('${t}') format('woff2');
|
|
129
132
|
font-display: swap;
|
|
130
|
-
}`,document.head.appendChild(
|
|
133
|
+
}`,document.head.appendChild(n),!0}})(),function({observableFunctions:e,observableProperties:t,jsonReplacer:n,jsonReviver:r}){if(e)for(const i in e){const o=e[i];w_.set(i,o),Wu.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(t)for(const i in t){const o=t[i];L_.set(i,o),Object.defineProperty(Wu.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Gu.replacer=n),r&&(Gu.reviver=r)}({observableFunctions:{child:(e,t)=>(ft(typeof t=="string"||typeof t=="number","Key should be a string or a number"),ys.getProxy(e,t.toString()))}}),je.registerHandler(({level:e,data:t})=>{console[e]("[TalkJS]",...t)});const MT=Le(function(e,t){const n=Z(null),r=Q(()=>new PT(n),[]);Mn(t,()=>r,[r]);const{theme:i,...o}=e,s=Q(()=>({...Kl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return y(Kf.Provider,{value:r,children:dt(wT,{...o,key:a,theme:s,ref:n})})});var Ur,Qt,rn,Yo;class PT{constructor(t){ai(this,Qt);ai(this,Ur);na(this,Ur,t)}deleteMessage(t){return Xt(this,Qt,rn).deleteMessage(t)}setEditing(t){Xt(this,Qt,rn).setEditing(t)}editMessage(t,n){return Xt(this,Qt,rn).editMessage(t,n)}sendMessage(t){return Xt(this,Qt,rn).sendMessage(t)}sendFileMessage(t){return Xt(this,Qt,rn).sendFileMessage(t)}sendLocationMessage(t){return Xt(this,Qt,rn).sendLocationMessage(t)}setReferencedMessage(t){Xt(this,Qt,rn).setReferencedMessage(t)}toggleReaction(t,n){return Xt(this,Qt,rn).toggleReaction(t,n)}getMessageFieldText(){return Xt(this,Qt,Yo).getText()}setMessageFieldText(t){Xt(this,Qt,Yo).setText(t)}focusMessageField(){Xt(this,Qt,Yo).focus()}}Ur=new WeakMap,Qt=new WeakSet,rn=function(){return Xt(this,Ur).current.controller},Yo=function(){return Xt(this,Ur).current.editorInternals};function xT({conversation:e}){const t=ct(),n=ro(),r=ce(),i=wE(),o=it(t.extCurrentConversationId$),[s,a]=ot([]);return G(()=>{const l=n.conversation(e.id).subscribeParticipants(async c=>{c&&a(c)});return()=>l.unsubscribe()},[n,e.id]),s?y(r.ConversationListItem,{common:i,conversation:e,participants:s,isSelected:o===e.id}):null}function FT(){const e=ct(),t=Z(null);G(()=>{let r=!0;const i=t.current;return async function(){var s;let o=0;for(;r&&e.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=e.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1}(),()=>{r=!1}},[e]);const n=tt(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&e.conversationListSubscription&&e.conversationListSubscription.loadMore(20)},[e]);return y("div",{className:"t-conversation-list-scrollable",ref:t,"t-menu-boundary":"",onScroll:n,children:y(ul,{each:e.conversationsArray$,children:r=>y(xT,{conversation:r.get()})})})}function HT({appId:e}){ct();const t=function(){const n=ct(),r=Ie(()=>{const s=n.currentUser$.get(),a=n.app$.get(),l=n.errors$.get(),c=n.authTokenState$.get();return l.serverError?"server-error":l.wrongAppId?"wrong-app-id":c==="loading"||c==="idle"?"loading-token":c==="invalid"?"invalid-token":c==="expired"?"expired-token":c==="valid"?l.unknownUser?"unknown-user":s&&a?"loaded":"loading-data":void ft.unreachable()}),i=Ie({type:"loading"});Kr(s=>{const a=r.get(),l=n.extUserId$.peek(),c=n.appId$.peek();switch(a){case"invalid-token":i.set({type:"auth-failed"});break;case"expired-token":i.set({type:"expired-token"});break;case"wrong-app-id":i.set({type:"wrong-app-id",appId:c});break;case"server-error":i.set({type:"server-error"});break;case"loading-data":case"loading-token":i.set({type:"loading"});break;case"loaded":i.set({type:"loaded",currentUser:n.currentUser$.peek()});break;case"unknown-user":s.onCleanup=function(u){i.set({type:"loading"});const d=setTimeout(()=>{i.set(u)},5e3);return()=>clearTimeout(d)}({type:"unknown-user",userId:l});break;default:ft.never(a)}});const o=Ie({type:"loading"});return Kr(s=>{if(i.type.get()==="loading"){o.set({type:"invisible-loading"});const a=setTimeout(()=>{o.set({type:"loading"})},1e3);s.onCleanup=()=>{clearTimeout(a)}}else o.set(i.get())}),it(o)}();return t.type==="invisible-loading"?y(Ht,{}):t.type==="loading"?y(xE,{}):t.type==="unknown-user"||t.type==="auth-failed"||t.type==="wrong-app-id"||t.type==="server-error"||t.type==="unexpected-error"?y(Bs,{appId:e,chatboxState:t}):t.type=="expired-token"?y(FE,{}):t.type==="loaded"?y(FT,{}):y(Ht,{})}class UT extends em{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.extCurrentConversationId$=It(null),this.conversationsArray$=It([]),this.conversationsMap$=It({})}listenForConversations(t){const n=t.subscribeConversations(r=>{Vr(()=>{this.conversationsArray$.set(r);const i={};for(const o of r)i[o.id]=o;this.conversationsMap$.set(i)})});return this.conversationListSubscription=n,()=>{n.unsubscribe(),this.conversationListSubscription=null}}}class BT{constructor(t,n){this.store=t,this.onSelectConversation=n}selectConversation(t){if(t===this.store.extCurrentConversationId$.peek())return;this.store.extCurrentConversationId$.set(t);const n={currentUser:this.store.currentUser$.peek(),conversation:this.store.conversationsMap$.child(t).peek()};this.onSelectConversation(n)}}const jT=Le(function(e,t){const{__hostElement:n,onSelectConversation:r}=e;G(()=>{var h;(h=e.__internalOnLoaded)==null||h.call(e)},[]);const i=wA(),o=Z(n!=null?n:null);LA(o);const s=Di(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=Q(()=>new UT(e.appId,e.userId),[]);G(()=>{Vr(()=>{a.extUserId$.set(e.userId),a.appId$.set(e.appId)})},[a,e.appId,e.userId]);const{session:l}=kA(a,e),c=Q(()=>new BT(a,s),[a,s]);G(()=>a.listenForConversations(l),[a,l]),G(()=>{e.selectedConversationId!==void 0&&a.extCurrentConversationId$.set(e.selectedConversationId)},[a,e.selectedConversationId]),G(()=>{const h=e.__hostElement;if(h)return a.extCurrentConversationId$.onChange(({value:f})=>{h.selectedConversationId=f})},[a,e.__hostElement]),Mn(t,()=>({controller:c}));const u=tt(({error:h})=>y(Bs,{appId:e.appId,chatboxState:{type:"unexpected-error",error:h}}),[e.appId]),d=i?null:y(Hf,{fallbackRender:u,children:y(Wf.Provider,{value:a,children:y(Yf.Provider,{value:e.theme,children:y(Xf.Provider,{value:c,children:y(gc.Provider,{value:l,children:y(HT,{appId:e.appId})})})})})});return n?d:y("div",{className:"t-conversation-list"+(e.className?` ${e.className}`:""),style:e.style,ref:o,children:d})});var Ji,Ts,MA;class $T{constructor(t){ai(this,Ts);ai(this,Ji);na(this,Ji,t)}selectConversation(t){Xt(this,Ts,MA).selectConversation(t)}}Ji=new WeakMap,Ts=new WeakSet,MA=function(){return Xt(this,Ji).current.controller};const VT=Le(function(e,t){const n=Z(null),r=Q(()=>new $T(n),[]);Mn(t,()=>r,[r]);const{theme:i,...o}=e,s=Q(()=>({...Kl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return y(Kf.Provider,{value:r,children:dt(jT,{...o,key:a,theme:s,ref:n})})});function YT(e){const{conversation:t,theme:n}=e.common,{ConversationImage:r}=n;return x`
|
|
131
134
|
<div className="t-theme-chat-header">
|
|
132
135
|
<div className="t-inner">
|
|
133
136
|
<div className="t-content">
|
|
134
137
|
<div className="t-image">
|
|
135
|
-
<${
|
|
136
|
-
conversation=${
|
|
137
|
-
participants=${t}
|
|
138
|
-
common=${
|
|
138
|
+
<${r}
|
|
139
|
+
conversation=${t}
|
|
140
|
+
participants=${Ys(t.id,10)}
|
|
141
|
+
common=${e.common}
|
|
139
142
|
/>
|
|
140
143
|
</div>
|
|
141
144
|
|
|
142
145
|
<div className="t-info">
|
|
143
|
-
<${
|
|
146
|
+
<${zT} ...${e} />
|
|
144
147
|
</div>
|
|
145
148
|
</div>
|
|
146
149
|
</div>
|
|
147
150
|
</div>
|
|
148
|
-
`}function
|
|
149
|
-
<div className="t-title">${
|
|
151
|
+
`}function zT(e){const{common:t}=e;return t.conversation.subject?x`
|
|
152
|
+
<div className="t-title">${t.conversation.subject}</div>
|
|
150
153
|
<div className="t-subtitle">
|
|
151
|
-
<${
|
|
154
|
+
<${Dp} ...${e} />
|
|
152
155
|
</div>
|
|
153
|
-
`:
|
|
154
|
-
<${
|
|
155
|
-
</div>`}function
|
|
156
|
+
`:x`<div className="t-title">
|
|
157
|
+
<${Dp} ...${e} />
|
|
158
|
+
</div>`}function Dp({common:e,isUserConnected:t,permissions:n}){const{participants:r}=e,i=r.filter(({user:s})=>s.id!==e.currentUser.id),o=i.length===0?r:i;return n.showOnlineStatus?x`
|
|
156
159
|
<span className="t-participants">
|
|
157
|
-
${o.map(({user:s})=>
|
|
160
|
+
${o.map(({user:s})=>x`
|
|
158
161
|
<span className="t-participant" key=${s.id}>
|
|
159
162
|
<span>${s.name}</span>
|
|
160
163
|
<span
|
|
161
164
|
className="t-online-indicator"
|
|
162
|
-
t-status=${
|
|
165
|
+
t-status=${t[s.id]?"online":"offline"}
|
|
163
166
|
></span>
|
|
164
167
|
</span>
|
|
165
168
|
`)}
|
|
166
169
|
</span>
|
|
167
|
-
`:
|
|
170
|
+
`:x`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function GT({common:e}){return null}function WT(e){const{message:t,messageStatus:n,permissions:r,common:i}=e,{currentUser:o,theme:s,chatbox:a,conversation:l,t:c}=i,{Avatar:u,Icon:d,ReferencedMessage:h,TimeAgo:f,MessageActionMenu:p}=s,m=Ys(l.id,3).length>=3,E=t.sender,A=(E==null?void 0:E.id)!==o.id&&m,_=t.referencedMessage,O=n!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage);let S;return S=E?E.id===o.id?"currentUser":"other":"system",x`
|
|
168
171
|
<div
|
|
169
172
|
className="t-theme-message"
|
|
170
173
|
t-sender=${S}
|
|
171
|
-
t-message-id=${
|
|
174
|
+
t-message-id=${t.id}
|
|
172
175
|
>
|
|
173
176
|
<div className="t-message-row">
|
|
174
|
-
${E&&
|
|
175
|
-
photoUrl=${
|
|
177
|
+
${E&&x`<${u}
|
|
178
|
+
photoUrl=${ar(E)}
|
|
176
179
|
common=${i}
|
|
177
180
|
/>`}
|
|
178
181
|
|
|
179
182
|
<div className="t-message-body">
|
|
180
183
|
<!-- in group chats, show the message sender name in a random color -->
|
|
181
|
-
${E&&A&&
|
|
184
|
+
${E&&A&&x`<div
|
|
182
185
|
className="t-message-sender-name"
|
|
183
|
-
style=${{color:
|
|
186
|
+
style=${{color:RA(E.id)}}
|
|
184
187
|
>
|
|
185
188
|
${E.name}
|
|
186
189
|
</div>`}
|
|
187
|
-
${
|
|
188
|
-
referencedMessage=${
|
|
190
|
+
${_&&x`<${h}
|
|
191
|
+
referencedMessage=${_}
|
|
189
192
|
common=${i}
|
|
190
193
|
/>`}
|
|
191
194
|
|
|
192
|
-
<${
|
|
195
|
+
<${GE}
|
|
193
196
|
common=${i}
|
|
194
|
-
message=${
|
|
195
|
-
messageStatus=${
|
|
197
|
+
message=${t}
|
|
198
|
+
messageStatus=${n}
|
|
196
199
|
/>
|
|
197
200
|
|
|
198
201
|
<div className="t-message-status">
|
|
199
|
-
<${
|
|
200
|
-
${S=="currentUser"&&
|
|
202
|
+
<${f} timestamp=${t.createdAt} common=${i} />
|
|
203
|
+
${S=="currentUser"&&x`<${XT} ...${e} />`}
|
|
201
204
|
</div>
|
|
202
205
|
</div>
|
|
203
206
|
|
|
204
|
-
${O&&
|
|
205
|
-
<${
|
|
207
|
+
${O&&x`
|
|
208
|
+
<${Nr}
|
|
206
209
|
type="menu"
|
|
207
|
-
popoverComponent=${
|
|
208
|
-
popoverProps=${{message:
|
|
210
|
+
popoverComponent=${p}
|
|
211
|
+
popoverProps=${{message:t,permissions:r,common:i}}
|
|
209
212
|
className="t-message-action-menu-button"
|
|
210
|
-
aria-label=${
|
|
213
|
+
aria-label=${c.ARIA_MORE_ACTIONS}
|
|
211
214
|
>
|
|
212
215
|
<${d} className="t-action-menu-icon" type="horizontalDots" />
|
|
213
|
-
</${
|
|
216
|
+
</${Nr}>
|
|
214
217
|
`}
|
|
215
|
-
${r.canAddReaction&&
|
|
216
|
-
<${
|
|
218
|
+
${r.canAddReaction&&x`
|
|
219
|
+
<${Nr}
|
|
217
220
|
className="t-add-reaction-button"
|
|
218
|
-
popoverComponent=${
|
|
219
|
-
popoverProps=${{messageId:
|
|
220
|
-
aria-label=${
|
|
221
|
+
popoverComponent=${WE}
|
|
222
|
+
popoverProps=${{messageId:t.id,colorScheme:"light"}}
|
|
223
|
+
aria-label=${c.ADD_REACTION}
|
|
221
224
|
>
|
|
222
225
|
<${d} type="addEmoji" />
|
|
223
|
-
</${
|
|
226
|
+
</${Nr}>
|
|
224
227
|
`}
|
|
225
228
|
</div>
|
|
226
229
|
|
|
227
|
-
${
|
|
230
|
+
${t.reactions.length>0&&x`
|
|
228
231
|
<div className="t-emoji-reactions">
|
|
229
|
-
${
|
|
232
|
+
${t.reactions.map(T=>x`
|
|
230
233
|
<button
|
|
231
234
|
className="t-reaction-button"
|
|
232
235
|
t-active=${T.currentUserReacted?"true":void 0}
|
|
233
|
-
onClick=${()=>
|
|
236
|
+
onClick=${()=>a.toggleReaction(t.id,T.emoji)}
|
|
234
237
|
disabled=${!r.canAddReaction}
|
|
235
|
-
aria-label=${
|
|
238
|
+
aria-label=${c.ARIA_REACTION_COUNT(T.count,T.emoji)}
|
|
236
239
|
aria-pressed=${T.currentUserReacted}
|
|
237
240
|
key=${T.emoji}
|
|
238
241
|
>
|
|
@@ -243,129 +246,129 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
243
246
|
</div>
|
|
244
247
|
`}
|
|
245
248
|
</div>
|
|
246
|
-
`}function
|
|
249
|
+
`}function XT({messageStatus:e,common:t}){const{Icon:n}=t.theme;return e==="sending"?x`
|
|
247
250
|
<span className="t-status-icon">
|
|
248
|
-
<${
|
|
251
|
+
<${n}
|
|
249
252
|
type="spinner"
|
|
250
253
|
className="t-message-loading-spinner"
|
|
251
|
-
common=${
|
|
254
|
+
common=${t}
|
|
252
255
|
/>
|
|
253
256
|
</span>
|
|
254
|
-
`:
|
|
255
|
-
${
|
|
256
|
-
<${
|
|
257
|
+
`:e==="sent"?x`<span className="t-status-icon">✓</span>`:e==="everyoneRead"?x`<span className="t-status-icon">✓✓</span>`:null}function KT(e){const{message:t,permissions:n,common:r}=e,{chatbox:i,t:o}=r;return x` <div className="t-theme-message-action-menu">
|
|
258
|
+
${n.canReplyToMessage&&x`
|
|
259
|
+
<${Sn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(t.id)}>
|
|
257
260
|
${o.REPLY_TO_MESSAGE}
|
|
258
|
-
</${
|
|
261
|
+
</${Sn}>
|
|
259
262
|
`}
|
|
260
|
-
${
|
|
261
|
-
<${
|
|
263
|
+
${n.canEditMessage&&x`
|
|
264
|
+
<${Sn} className="t-menu-item" onSelect=${()=>i.setEditing(t.id)}>
|
|
262
265
|
${o.EDIT_MESSAGE}
|
|
263
|
-
</${
|
|
266
|
+
</${Sn}>
|
|
264
267
|
`}
|
|
265
|
-
${
|
|
266
|
-
<${
|
|
268
|
+
${n.canDeleteMessage&&x`
|
|
269
|
+
<${Sn} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(t.id)}>
|
|
267
270
|
${o.DELETE_MESSAGE}
|
|
268
|
-
</${
|
|
271
|
+
</${Sn}>
|
|
269
272
|
`}
|
|
270
|
-
</div>`}function
|
|
271
|
-
<div className="t-theme-message-field" t-mode=${
|
|
272
|
-
${r.showEmojiPicker&&
|
|
273
|
+
</div>`}function qT(e){const{common:t,referencedMessage:n,editor:r,permissions:i,editMessageId:o}=e,{chatbox:s,device:a,conversation:l,t:c,theme:u}=t,{ReplyBar:d,Icon:h}=u,f=o?"edit":"send",p=f==="edit"&&!r.atTextLimit&&r.characterCount>0,m=f==="send"&&r.isEmpty&&i.canShareLocation,E=f==="send"&&r.isEmpty&&i.canShareFile,A=f==="send"&&a.supportsEmojiPicker&&!a.isMobile;return x`
|
|
274
|
+
<div className="t-theme-message-field" t-mode=${f}>
|
|
275
|
+
${r.showEmojiPicker&&x`
|
|
273
276
|
<div className="t-emoji-picker-wrapper">
|
|
274
|
-
<${
|
|
277
|
+
<${Wc} colorScheme="light" />
|
|
275
278
|
</div>
|
|
276
279
|
`}
|
|
277
|
-
<${
|
|
278
|
-
<${
|
|
280
|
+
<${eA} />
|
|
281
|
+
<${vA} />
|
|
279
282
|
|
|
280
|
-
${
|
|
281
|
-
common=${
|
|
282
|
-
referencedMessage=${
|
|
283
|
+
${n&&x`<${d}
|
|
284
|
+
common=${t}
|
|
285
|
+
referencedMessage=${n}
|
|
283
286
|
/>`}
|
|
284
287
|
|
|
285
288
|
<div className="t-wrapper">
|
|
286
|
-
${r.atTextLimit&&
|
|
287
|
-
${
|
|
289
|
+
${r.atTextLimit&&x`<div className="t-text-limit-indicator">
|
|
290
|
+
${c.ENTRYBOX_TEXT_LIMIT}
|
|
288
291
|
</div>`}
|
|
289
292
|
<div className="t-text-form">
|
|
290
|
-
${l.access==="Read"&&
|
|
293
|
+
${l.access==="Read"&&x`
|
|
291
294
|
<div className="t-readonly">
|
|
292
|
-
${
|
|
295
|
+
${c.ENTRYBOX_PLACEHOLDER_CHAT_READONLY}
|
|
293
296
|
</div>
|
|
294
297
|
`}
|
|
295
|
-
${l.access==="ReadWrite"&&
|
|
298
|
+
${l.access==="ReadWrite"&&x`
|
|
296
299
|
<div className="t-textbox-column">
|
|
297
|
-
<${
|
|
300
|
+
<${kE} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
|
|
298
301
|
|
|
299
302
|
<div className="t-button-overlay">
|
|
300
|
-
${m&&
|
|
303
|
+
${m&&x`<button
|
|
301
304
|
className="t-location-button"
|
|
302
305
|
t-kind="icon-button"
|
|
303
|
-
aria-label=${
|
|
304
|
-
title=${
|
|
306
|
+
aria-label=${c.UPLOAD_SHARE_LOCATION}
|
|
307
|
+
title=${c.UPLOAD_SHARE_LOCATION}
|
|
305
308
|
onClick=${()=>r.shareLocation()}
|
|
306
309
|
>
|
|
307
|
-
<${h} type="locationPin" common=${
|
|
310
|
+
<${h} type="locationPin" common=${t} />
|
|
308
311
|
</button>`}
|
|
309
|
-
${E&&
|
|
312
|
+
${E&&x`<button
|
|
310
313
|
className="t-attachment-button"
|
|
311
314
|
t-kind="icon-button"
|
|
312
|
-
aria-label=${
|
|
313
|
-
title=${
|
|
315
|
+
aria-label=${c.UPLOAD_SEND_FILE}
|
|
316
|
+
title=${c.UPLOAD_SEND_FILE}
|
|
314
317
|
onClick=${()=>r.attachFile()}
|
|
315
318
|
>
|
|
316
|
-
<${h} type="attach" common=${
|
|
319
|
+
<${h} type="attach" common=${t} />
|
|
317
320
|
</button>`}
|
|
318
|
-
${A&&
|
|
321
|
+
${A&&x`<button
|
|
319
322
|
className="t-emoji-button"
|
|
320
323
|
t-kind="icon-button"
|
|
321
|
-
aria-label=${
|
|
322
|
-
title=${
|
|
324
|
+
aria-label=${c.ARIA_INSERT_EMOJI}
|
|
325
|
+
title=${c.ARIA_INSERT_EMOJI}
|
|
323
326
|
onClick=${()=>r.toggleEmojiPicker()}
|
|
324
327
|
>
|
|
325
328
|
<${h}
|
|
326
329
|
type=${r.showEmojiPicker?"close":"emoji"}
|
|
327
|
-
common=${
|
|
330
|
+
common=${t}
|
|
328
331
|
/>
|
|
329
332
|
</button>`}
|
|
330
333
|
</div>
|
|
331
334
|
</div>
|
|
332
335
|
`}
|
|
333
|
-
${
|
|
336
|
+
${f==="send"&&x`
|
|
334
337
|
<div className="t-send-column">
|
|
335
338
|
<button
|
|
336
339
|
className="t-send-button"
|
|
337
340
|
t-kind="icon-button"
|
|
338
|
-
aria-label=${
|
|
339
|
-
title=${
|
|
341
|
+
aria-label=${c.SEND_BUTTON_TEXT}
|
|
342
|
+
title=${c.SEND_BUTTON_TEXT}
|
|
340
343
|
onClick=${()=>r.send()}
|
|
341
344
|
>
|
|
342
|
-
<${h} type="send" common=${
|
|
345
|
+
<${h} type="send" common=${t} />
|
|
343
346
|
</button>
|
|
344
347
|
</div>
|
|
345
348
|
`}
|
|
346
|
-
${
|
|
349
|
+
${f==="edit"&&x`
|
|
347
350
|
<div className="t-edit-row">
|
|
348
351
|
<button
|
|
349
352
|
t-action="cancel"
|
|
350
353
|
onClick=${()=>s.setEditing(null)}
|
|
351
354
|
>
|
|
352
|
-
${
|
|
355
|
+
${c.CANCEL}
|
|
353
356
|
</button>
|
|
354
357
|
<button
|
|
355
358
|
t-action="save"
|
|
356
359
|
onClick=${()=>r.send()}
|
|
357
|
-
disabled=${!
|
|
360
|
+
disabled=${!p}
|
|
358
361
|
>
|
|
359
|
-
${
|
|
362
|
+
${c.SAVE}
|
|
360
363
|
</button>
|
|
361
364
|
</div>
|
|
362
365
|
`}
|
|
363
366
|
</div>
|
|
364
367
|
</div>
|
|
365
368
|
</div>
|
|
366
|
-
`}function
|
|
369
|
+
`}function JT({className:e="",type:t}){return x`<${ZT[t]} className=${`t-theme-icon ${e}`} />`}const ZT={attach:function({className:e}){return x`
|
|
367
370
|
<svg
|
|
368
|
-
className=${
|
|
371
|
+
className=${e}
|
|
369
372
|
xmlns="http://www.w3.org/2000/svg"
|
|
370
373
|
fill="none"
|
|
371
374
|
stroke="currentColor"
|
|
@@ -381,9 +384,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
381
384
|
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
|
|
382
385
|
></path>
|
|
383
386
|
</svg>
|
|
384
|
-
`},chevronLeft:
|
|
387
|
+
`},chevronLeft:Op,left:Op,chevronRight:Sp,right:Sp,chevronUp:Tp,up:Tp,chevronDown:vp,down:vp,close:function({className:e}){return x`
|
|
385
388
|
<svg
|
|
386
|
-
className=${
|
|
389
|
+
className=${e}
|
|
387
390
|
xmlns="http://www.w3.org/2000/svg"
|
|
388
391
|
fill="none"
|
|
389
392
|
stroke="currentColor"
|
|
@@ -397,9 +400,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
397
400
|
<line x1="18" y1="6" x2="6" y2="18" fill="none"></line>
|
|
398
401
|
<line fill="none" x1="6" y1="6" x2="18" y2="18"></line>
|
|
399
402
|
</svg>
|
|
400
|
-
`},emoji:function({className:
|
|
403
|
+
`},emoji:function({className:e}){return x`
|
|
401
404
|
<svg
|
|
402
|
-
className=${
|
|
405
|
+
className=${e}
|
|
403
406
|
xmlns="http://www.w3.org/2000/svg"
|
|
404
407
|
fill="none"
|
|
405
408
|
stroke="currentColor"
|
|
@@ -413,9 +416,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
413
416
|
<circle fill="none" cx="12" cy="12" r="10"></circle>
|
|
414
417
|
<path fill="none" d="M8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01"></path>
|
|
415
418
|
</svg>
|
|
416
|
-
`},locationPin:function({className:
|
|
419
|
+
`},locationPin:function({className:e}){return x`
|
|
417
420
|
<svg
|
|
418
|
-
className=${
|
|
421
|
+
className=${e}
|
|
419
422
|
xmlns="http://www.w3.org/2000/svg"
|
|
420
423
|
fill="none"
|
|
421
424
|
stroke="currentColor"
|
|
@@ -432,9 +435,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
432
435
|
></path>
|
|
433
436
|
<circle fill="none" cx="12" cy="10" r="3"></circle>
|
|
434
437
|
</svg>
|
|
435
|
-
`},more:function({className:
|
|
438
|
+
`},more:function({className:e}){return x`
|
|
436
439
|
<svg
|
|
437
|
-
className=${
|
|
440
|
+
className=${e}
|
|
438
441
|
xmlns="http://www.w3.org/2000/svg"
|
|
439
442
|
fill="none"
|
|
440
443
|
stroke="currentColor"
|
|
@@ -450,9 +453,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
450
453
|
fill="currentColor"
|
|
451
454
|
></path>
|
|
452
455
|
</svg>
|
|
453
|
-
`},plus:function({className:
|
|
456
|
+
`},plus:function({className:e}){return x`
|
|
454
457
|
<svg
|
|
455
|
-
className=${
|
|
458
|
+
className=${e}
|
|
456
459
|
xmlns="http://www.w3.org/2000/svg"
|
|
457
460
|
fill="none"
|
|
458
461
|
stroke="currentColor"
|
|
@@ -466,9 +469,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
466
469
|
<line x1="12" y1="5" x2="12" y2="19" fill="none"></line>
|
|
467
470
|
<line fill="none" x1="5" y1="12" x2="19" y2="12"></line>
|
|
468
471
|
</svg>
|
|
469
|
-
`},search:function({className:
|
|
472
|
+
`},search:function({className:e}){return x`
|
|
470
473
|
<svg
|
|
471
|
-
className=${
|
|
474
|
+
className=${e}
|
|
472
475
|
xmlns="http://www.w3.org/2000/svg"
|
|
473
476
|
fill="none"
|
|
474
477
|
stroke="currentColor"
|
|
@@ -484,9 +487,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
484
487
|
d="M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM21.35 21.35 17 17"
|
|
485
488
|
></path>
|
|
486
489
|
</svg>
|
|
487
|
-
`},send:function({className:
|
|
490
|
+
`},send:function({className:e}){return x`
|
|
488
491
|
<svg
|
|
489
|
-
className=${
|
|
492
|
+
className=${e}
|
|
490
493
|
xmlns="http://www.w3.org/2000/svg"
|
|
491
494
|
fill="none"
|
|
492
495
|
stroke="currentColor"
|
|
@@ -502,9 +505,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
502
505
|
fill="currentColor"
|
|
503
506
|
></path>
|
|
504
507
|
</svg>
|
|
505
|
-
`},spinner:function({className:
|
|
508
|
+
`},spinner:function({className:e}){return x`
|
|
506
509
|
<svg
|
|
507
|
-
className=${
|
|
510
|
+
className=${e}
|
|
508
511
|
xmlns="http://www.w3.org/2000/svg"
|
|
509
512
|
fill="none"
|
|
510
513
|
stroke="currentColor"
|
|
@@ -520,9 +523,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
520
523
|
fill="currentColor"
|
|
521
524
|
></path>
|
|
522
525
|
</svg>
|
|
523
|
-
`},play:function({className:
|
|
526
|
+
`},play:function({className:e}){return x`
|
|
524
527
|
<svg
|
|
525
|
-
className=${
|
|
528
|
+
className=${e}
|
|
526
529
|
xmlns="http://www.w3.org/2000/svg"
|
|
527
530
|
fill="none"
|
|
528
531
|
stroke="currentColor"
|
|
@@ -535,9 +538,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
535
538
|
>
|
|
536
539
|
<polygon points="5 3 19 12 5 21 5 3"></polygon>
|
|
537
540
|
</svg>
|
|
538
|
-
`},pause:function({className:
|
|
541
|
+
`},pause:function({className:e}){return x`
|
|
539
542
|
<svg
|
|
540
|
-
className=${
|
|
543
|
+
className=${e}
|
|
541
544
|
xmlns="http://www.w3.org/2000/svg"
|
|
542
545
|
fill="none"
|
|
543
546
|
stroke="currentColor"
|
|
@@ -551,9 +554,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
551
554
|
<rect x="6" y="4" width="4" height="16"></rect>
|
|
552
555
|
<rect x="14" y="4" width="4" height="16"></rect>
|
|
553
556
|
</svg>
|
|
554
|
-
`},updown:function({className:
|
|
557
|
+
`},updown:function({className:e}){return x`
|
|
555
558
|
<svg
|
|
556
|
-
className=${
|
|
559
|
+
className=${e}
|
|
557
560
|
xmlns="http://www.w3.org/2000/svg"
|
|
558
561
|
fill="none"
|
|
559
562
|
stroke="currentColor"
|
|
@@ -573,9 +576,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
573
576
|
fill="currentColor"
|
|
574
577
|
></path>
|
|
575
578
|
</svg>
|
|
576
|
-
`},addEmoji:function({className:
|
|
579
|
+
`},addEmoji:function({className:e}){return x`
|
|
577
580
|
<svg
|
|
578
|
-
className=${
|
|
581
|
+
className=${e}
|
|
579
582
|
xmlns="http://www.w3.org/2000/svg"
|
|
580
583
|
fill="none"
|
|
581
584
|
stroke="currentColor"
|
|
@@ -608,9 +611,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
608
611
|
strokeLinecap="round"
|
|
609
612
|
></line>
|
|
610
613
|
</svg>
|
|
611
|
-
`},microphone:function({className:
|
|
614
|
+
`},microphone:function({className:e}){return x`
|
|
612
615
|
<svg
|
|
613
|
-
className=${
|
|
616
|
+
className=${e}
|
|
614
617
|
xmlns="http://www.w3.org/2000/svg"
|
|
615
618
|
fill="none"
|
|
616
619
|
stroke="currentColor"
|
|
@@ -668,9 +671,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
668
671
|
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
669
672
|
></path>
|
|
670
673
|
</svg>
|
|
671
|
-
`},mic:function({className:
|
|
674
|
+
`},mic:function({className:e}){return x`
|
|
672
675
|
<svg
|
|
673
|
-
className=${
|
|
676
|
+
className=${e}
|
|
674
677
|
xmlns="http://www.w3.org/2000/svg"
|
|
675
678
|
fill="none"
|
|
676
679
|
stroke="currentColor"
|
|
@@ -728,9 +731,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
728
731
|
transform="matrix(2.133333, 0, 0, 2.133333, 0, 0)"
|
|
729
732
|
></path>
|
|
730
733
|
</svg>
|
|
731
|
-
`},stop:function({className:
|
|
734
|
+
`},stop:function({className:e}){return x`
|
|
732
735
|
<svg
|
|
733
|
-
className=${
|
|
736
|
+
className=${e}
|
|
734
737
|
xmlns="http://www.w3.org/2000/svg"
|
|
735
738
|
fill="none"
|
|
736
739
|
stroke="currentColor"
|
|
@@ -750,9 +753,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
750
753
|
fill="currentColor"
|
|
751
754
|
></path>
|
|
752
755
|
</svg>
|
|
753
|
-
`},download:function({className:
|
|
756
|
+
`},download:function({className:e}){return x`
|
|
754
757
|
<svg
|
|
755
|
-
className=${
|
|
758
|
+
className=${e}
|
|
756
759
|
xmlns="http://www.w3.org/2000/svg"
|
|
757
760
|
fill="none"
|
|
758
761
|
stroke="currentColor"
|
|
@@ -776,9 +779,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
776
779
|
fill="currentColor"
|
|
777
780
|
></path>
|
|
778
781
|
</svg>
|
|
779
|
-
`},location:function({className:
|
|
782
|
+
`},location:function({className:e}){return x`
|
|
780
783
|
<svg
|
|
781
|
-
className=${
|
|
784
|
+
className=${e}
|
|
782
785
|
xmlns="http://www.w3.org/2000/svg"
|
|
783
786
|
fill="none"
|
|
784
787
|
stroke="currentColor"
|
|
@@ -795,9 +798,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
795
798
|
></path>
|
|
796
799
|
<circle fill="none" cx="12" cy="10" r="3"></circle>
|
|
797
800
|
</svg>
|
|
798
|
-
`},email:function({className:
|
|
801
|
+
`},email:function({className:e}){return x`
|
|
799
802
|
<svg
|
|
800
|
-
className=${
|
|
803
|
+
className=${e}
|
|
801
804
|
xmlns="http://www.w3.org/2000/svg"
|
|
802
805
|
fill="none"
|
|
803
806
|
strokeWidth="2"
|
|
@@ -816,9 +819,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
816
819
|
fill="currentColor"
|
|
817
820
|
></path>
|
|
818
821
|
</svg>
|
|
819
|
-
`},movie:function({className:
|
|
822
|
+
`},movie:function({className:e}){return x`
|
|
820
823
|
<svg
|
|
821
|
-
className=${
|
|
824
|
+
className=${e}
|
|
822
825
|
xmlns="http://www.w3.org/2000/svg"
|
|
823
826
|
fill="none"
|
|
824
827
|
stroke="currentColor"
|
|
@@ -832,9 +835,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
832
835
|
<polygon points="23 7 16 12 23 17 23 7" fill="none"></polygon>
|
|
833
836
|
<rect x="1" y="5" width="15" height="14" rx="2" ry="2" fill="none"></rect>
|
|
834
837
|
</svg>
|
|
835
|
-
`},image:function({className:
|
|
838
|
+
`},image:function({className:e}){return x`
|
|
836
839
|
<svg
|
|
837
|
-
className=${
|
|
840
|
+
className=${e}
|
|
838
841
|
xmlns="http://www.w3.org/2000/svg"
|
|
839
842
|
fill="none"
|
|
840
843
|
stroke="currentColor"
|
|
@@ -849,9 +852,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
849
852
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
850
853
|
<polyline points="21 15 16 10 5 21" fill="none"></polyline>
|
|
851
854
|
</svg>
|
|
852
|
-
`},attachment:function({className:
|
|
855
|
+
`},attachment:function({className:e}){return x`
|
|
853
856
|
<svg
|
|
854
|
-
className=${
|
|
857
|
+
className=${e}
|
|
855
858
|
xmlns="http://www.w3.org/2000/svg"
|
|
856
859
|
fill="none"
|
|
857
860
|
stroke="currentColor"
|
|
@@ -867,9 +870,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
867
870
|
d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"
|
|
868
871
|
></path>
|
|
869
872
|
</svg>
|
|
870
|
-
`},horizontalDots:function({className:
|
|
873
|
+
`},horizontalDots:function({className:e}){return x`
|
|
871
874
|
<svg
|
|
872
|
-
className=${
|
|
875
|
+
className=${e}
|
|
873
876
|
xmlns="http://www.w3.org/2000/svg"
|
|
874
877
|
fill="none"
|
|
875
878
|
stroke="currentColor"
|
|
@@ -884,9 +887,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
884
887
|
<circle fill="currentColor" cx="8" cy="8" r="1"></circle>
|
|
885
888
|
<circle fill="currentColor" cx="14" cy="8" r="1"></circle>
|
|
886
889
|
</svg>
|
|
887
|
-
`},verticalDots:function({className:
|
|
890
|
+
`},verticalDots:function({className:e}){return x`
|
|
888
891
|
<svg
|
|
889
|
-
className=${
|
|
892
|
+
className=${e}
|
|
890
893
|
xmlns="http://www.w3.org/2000/svg"
|
|
891
894
|
fill="none"
|
|
892
895
|
stroke="currentColor"
|
|
@@ -901,9 +904,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
901
904
|
<circle fill="currentColor" cx="8" cy="8" r="1"></circle>
|
|
902
905
|
<circle fill="currentColor" cx="8" cy="12" r="1"></circle>
|
|
903
906
|
</svg>
|
|
904
|
-
`},reply:function({className:
|
|
907
|
+
`},reply:function({className:e}){return x`
|
|
905
908
|
<svg
|
|
906
|
-
className=${
|
|
909
|
+
className=${e}
|
|
907
910
|
xmlns="http://www.w3.org/2000/svg"
|
|
908
911
|
fill="none"
|
|
909
912
|
stroke="currentColor"
|
|
@@ -929,9 +932,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
929
932
|
transform="translate(178.603 27.624) scale(-1,1)"
|
|
930
933
|
></path>
|
|
931
934
|
</svg>
|
|
932
|
-
`},back:function({className:
|
|
935
|
+
`},back:function({className:e}){return x`
|
|
933
936
|
<svg
|
|
934
|
-
className=${
|
|
937
|
+
className=${e}
|
|
935
938
|
xmlns="http://www.w3.org/2000/svg"
|
|
936
939
|
fill="none"
|
|
937
940
|
stroke="currentColor"
|
|
@@ -945,9 +948,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
945
948
|
<line x1="19" y1="12" x2="5" y2="12"></line>
|
|
946
949
|
<polyline points="12 19 5 12 12 5"></polyline>
|
|
947
950
|
</svg>
|
|
948
|
-
`}};function
|
|
951
|
+
`}};function Op({className:e}){return x`
|
|
949
952
|
<svg
|
|
950
|
-
className=${
|
|
953
|
+
className=${e}
|
|
951
954
|
xmlns="http://www.w3.org/2000/svg"
|
|
952
955
|
stroke="currentColor"
|
|
953
956
|
strokeWidth="2"
|
|
@@ -959,9 +962,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
959
962
|
>
|
|
960
963
|
<polyline fill="none" points="15 6 9 12 15 18"></polyline>
|
|
961
964
|
</svg>
|
|
962
|
-
`}function
|
|
965
|
+
`}function Sp({className:e}){return x`
|
|
963
966
|
<svg
|
|
964
|
-
className=${
|
|
967
|
+
className=${e}
|
|
965
968
|
xmlns="http://www.w3.org/2000/svg"
|
|
966
969
|
stroke="currentColor"
|
|
967
970
|
strokeWidth="2"
|
|
@@ -973,9 +976,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
973
976
|
>
|
|
974
977
|
<polyline fill="none" points="9 6 15 12 9 18"></polyline>
|
|
975
978
|
</svg>
|
|
976
|
-
`}function
|
|
979
|
+
`}function Tp({className:e}){return x`
|
|
977
980
|
<svg
|
|
978
|
-
className=${
|
|
981
|
+
className=${e}
|
|
979
982
|
xmlns="http://www.w3.org/2000/svg"
|
|
980
983
|
fill="none"
|
|
981
984
|
stroke="currentColor"
|
|
@@ -988,9 +991,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
988
991
|
>
|
|
989
992
|
<polyline fill="none" points="18 15 12 9 6 15"></polyline>
|
|
990
993
|
</svg>
|
|
991
|
-
`}function
|
|
994
|
+
`}function vp({className:e}){return x`
|
|
992
995
|
<svg
|
|
993
|
-
className=${
|
|
996
|
+
className=${e}
|
|
994
997
|
xmlns="http://www.w3.org/2000/svg"
|
|
995
998
|
fill="none"
|
|
996
999
|
stroke="currentColor"
|
|
@@ -1003,34 +1006,34 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1003
1006
|
>
|
|
1004
1007
|
<polyline fill="none" points="6 9 12 15 18 9"></polyline>
|
|
1005
1008
|
</svg>
|
|
1006
|
-
`}function
|
|
1009
|
+
`}function QT(e){const{timestamp:t,isReadMarker:n,isDayMarker:r,common:i}=e,{t:o}=i;return x`
|
|
1007
1010
|
<div className="t-message-divider">
|
|
1008
1011
|
<div className="t-line" t-side="left">
|
|
1009
1012
|
<div className="t-line-segment" />
|
|
1010
1013
|
</div>
|
|
1011
|
-
${r&&
|
|
1012
|
-
<span className="t-day-marker">${
|
|
1014
|
+
${r&&x`
|
|
1015
|
+
<span className="t-day-marker">${NA(t,o)}</span>
|
|
1013
1016
|
`}
|
|
1014
1017
|
<div className="t-line" t-side="right">
|
|
1015
1018
|
<div className="t-line-segment" />
|
|
1016
|
-
${
|
|
1019
|
+
${n&&x`
|
|
1017
1020
|
<span className="t-unread-marker">${o.MESSAGELIST_NEW_MARKER}</span>
|
|
1018
1021
|
`}
|
|
1019
1022
|
</div>
|
|
1020
1023
|
</div>
|
|
1021
|
-
`}function
|
|
1024
|
+
`}function tv({common:e}){return null}function ev({common:e}){return null}function nv({common:e}){const{typing:t,theme:n}=e,{Avatar:r}=n,{users:i,many:o}=t;if(!o&&i.length===0)return null;const s=o?x`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>x`<${r}
|
|
1022
1025
|
key=${a.id}
|
|
1023
|
-
photoUrl=${
|
|
1024
|
-
common=${
|
|
1025
|
-
/>`);return
|
|
1026
|
+
photoUrl=${ar(a)}
|
|
1027
|
+
common=${e}
|
|
1028
|
+
/>`);return x`
|
|
1026
1029
|
<div
|
|
1027
|
-
className="t-theme-
|
|
1030
|
+
className="t-theme-after-messages"
|
|
1028
1031
|
t-many=${String(o)}
|
|
1029
1032
|
aria-label="${function(a,l){return l?"Several people are typing":a.length===1?`${a[0].name} is typing`:a.length===2?`${a[0].name} and ${a[1].name} are typing`:`${a[0].name}, ${a[1].name}, and ${a.length-2} others are typing`}(i,o)}"
|
|
1030
1033
|
>
|
|
1031
1034
|
<div className="t-typing-avatars" aria-hidden="true">
|
|
1032
1035
|
${s}
|
|
1033
|
-
${!o&&i.length>2&&
|
|
1036
|
+
${!o&&i.length>2&&x`<div className="t-theme-avatar">+${i.length-2}</div>`}
|
|
1034
1037
|
</div>
|
|
1035
1038
|
<div className="t-typing-bubble">
|
|
1036
1039
|
<div className="t-typing-animation">
|
|
@@ -1040,146 +1043,146 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1040
1043
|
</div>
|
|
1041
1044
|
</div>
|
|
1042
1045
|
</div>
|
|
1043
|
-
`}function
|
|
1046
|
+
`}function rv(e){return x`
|
|
1044
1047
|
<span className="t-theme-compact-message-content">
|
|
1045
|
-
<${
|
|
1048
|
+
<${iv} ...${e} />
|
|
1046
1049
|
</span>
|
|
1047
|
-
`}function
|
|
1048
|
-
block=${
|
|
1049
|
-
message=${
|
|
1050
|
+
`}function iv({message:e,common:t}){var s;const n=e.content[0],{theme:r,t:i}=t,{Icon:o}=r;if(n.type==="text")return x`<${zc}
|
|
1051
|
+
block=${n}
|
|
1052
|
+
message=${e}
|
|
1050
1053
|
nonInteractive
|
|
1051
|
-
/>`;if(
|
|
1052
|
-
<${o} type="image" common=${
|
|
1053
|
-
${
|
|
1054
|
-
`;if(
|
|
1055
|
-
<${o} type="movie" common=${
|
|
1056
|
-
${
|
|
1057
|
-
`;if(
|
|
1058
|
-
<${o} type="attachment" common=${
|
|
1059
|
-
${
|
|
1060
|
-
`;if(
|
|
1061
|
-
<${o} type="microphone" common=${
|
|
1062
|
-
${i.VOICE_MESSAGE} (${
|
|
1063
|
-
`;if(
|
|
1064
|
-
<${o} type="attachment" common=${
|
|
1065
|
-
${
|
|
1066
|
-
`}return null}function
|
|
1054
|
+
/>`;if(n.type==="location")return x`<${o} type="location" common=${t} /> ${i.LOCATION}`;if(n.type==="file"){if(n.subtype==="image")return x`
|
|
1055
|
+
<${o} type="image" common=${t} />
|
|
1056
|
+
${n.filename}
|
|
1057
|
+
`;if(n.subtype==="video")return x`
|
|
1058
|
+
<${o} type="movie" common=${t} />
|
|
1059
|
+
${n.filename}
|
|
1060
|
+
`;if(n.subtype==="audio")return x`
|
|
1061
|
+
<${o} type="attachment" common=${t} />
|
|
1062
|
+
${n.filename}
|
|
1063
|
+
`;if(n.subtype==="voice")return x`
|
|
1064
|
+
<${o} type="microphone" common=${t} />
|
|
1065
|
+
${i.VOICE_MESSAGE} (${tu((s=n.duration)!=null?s:0)})
|
|
1066
|
+
`;if(n.subtype===void 0)return x`
|
|
1067
|
+
<${o} type="attachment" common=${t} />
|
|
1068
|
+
${n.filename}
|
|
1069
|
+
`}return null}function ov({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return x`
|
|
1067
1070
|
<div className="t-theme-audio-block">
|
|
1068
|
-
<${
|
|
1071
|
+
<${js} src=${e.url} filename=${e.filename} />
|
|
1069
1072
|
|
|
1070
|
-
<a className="t-body-text" href=${
|
|
1073
|
+
<a className="t-body-text" href=${t} target="_blank">
|
|
1071
1074
|
<${r}
|
|
1072
1075
|
type="attachment"
|
|
1073
1076
|
className="t-attachment-icon"
|
|
1074
|
-
common=${
|
|
1077
|
+
common=${n}
|
|
1075
1078
|
/>
|
|
1076
|
-
<span className="t-filename">${
|
|
1077
|
-
<span className="t-filesize"> (${
|
|
1079
|
+
<span className="t-filename">${e.filename}</span>
|
|
1080
|
+
<span className="t-filesize"> (${ho(e.size)})</span>
|
|
1078
1081
|
</a>
|
|
1079
1082
|
</div>
|
|
1080
|
-
`}function
|
|
1083
|
+
`}function sv({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return x`
|
|
1081
1084
|
<div className="t-theme-file-block">
|
|
1082
|
-
<a className="t-body-text" href=${
|
|
1085
|
+
<a className="t-body-text" href=${t} target="_blank">
|
|
1083
1086
|
<${r}
|
|
1084
1087
|
type="attachment"
|
|
1085
1088
|
className="t-attachment-icon"
|
|
1086
|
-
common=${
|
|
1089
|
+
common=${n}
|
|
1087
1090
|
/>
|
|
1088
|
-
<span className="t-filename">${
|
|
1089
|
-
<span className="t-filesize"> (${
|
|
1091
|
+
<span className="t-filename">${e.filename}</span>
|
|
1092
|
+
<span className="t-filesize"> (${ho(e.size)})</span>
|
|
1090
1093
|
</a>
|
|
1091
1094
|
</div>
|
|
1092
|
-
`}function
|
|
1095
|
+
`}function av({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme,i={"--img-w":e.width||1,"--img-h":e.height||1};return x`
|
|
1093
1096
|
<div className="t-theme-image-block">
|
|
1094
1097
|
<a
|
|
1095
|
-
href=${
|
|
1098
|
+
href=${e.url}
|
|
1096
1099
|
className="t-image-wrapper"
|
|
1097
1100
|
target="_blank"
|
|
1098
1101
|
rel="noopener noreferrer"
|
|
1099
1102
|
>
|
|
1100
1103
|
<div className="t-root" style=${i}>
|
|
1101
|
-
<img src=${
|
|
1104
|
+
<img src=${e.url} className="t-image" />
|
|
1102
1105
|
</div>
|
|
1103
1106
|
</a>
|
|
1104
1107
|
|
|
1105
|
-
<a href=${
|
|
1106
|
-
<${r} className="download-icon" type="download" common=${
|
|
1107
|
-
<span>${
|
|
1108
|
-
<span className="t-filesize"> (${
|
|
1108
|
+
<a href=${t} className="t-body-text" target="_blank">
|
|
1109
|
+
<${r} className="download-icon" type="download" common=${n} />
|
|
1110
|
+
<span>${e.filename}</span>
|
|
1111
|
+
<span className="t-filesize"> (${ho(e.size)})</span>
|
|
1109
1112
|
</a>
|
|
1110
1113
|
</div>
|
|
1111
|
-
`}function
|
|
1114
|
+
`}function lv({block:e}){const{imageUrl:t,linkUrl:n}=Qc(e);return x`
|
|
1112
1115
|
<div className="t-theme-location-block">
|
|
1113
1116
|
<a
|
|
1114
|
-
href=${
|
|
1117
|
+
href=${n}
|
|
1115
1118
|
target="_blank"
|
|
1116
1119
|
className="t-root"
|
|
1117
|
-
style=${{background:`${`url(${JSON.stringify(
|
|
1120
|
+
style=${{background:`${`url(${JSON.stringify(t)})`} center center / cover no-repeat`}}
|
|
1118
1121
|
></a>
|
|
1119
1122
|
|
|
1120
1123
|
<span className="t-body-text">
|
|
1121
|
-
<a href=${
|
|
1122
|
-
>${
|
|
1124
|
+
<a href=${n} target="_blank" rel="noopener noreferrer"
|
|
1125
|
+
>${n}</a
|
|
1123
1126
|
>
|
|
1124
1127
|
</span>
|
|
1125
1128
|
</div>
|
|
1126
|
-
`}function
|
|
1129
|
+
`}function cv({block:e,message:t}){return x`
|
|
1127
1130
|
<div className="t-theme-text-block">
|
|
1128
|
-
<${
|
|
1131
|
+
<${zc} block=${e} message=${t} />
|
|
1129
1132
|
</div>
|
|
1130
|
-
`}function
|
|
1133
|
+
`}function uv({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return x`
|
|
1131
1134
|
<div className="t-theme-video-block">
|
|
1132
1135
|
<div className="t-video-wrapper">
|
|
1133
|
-
<div className="t-root" style=${{"--video-w":
|
|
1136
|
+
<div className="t-root" style=${{"--video-w":e.width||1,"--video-h":e.height||1}}>
|
|
1134
1137
|
<!-- We are using media fragments in the src as a workaround to iOS Safari -->
|
|
1135
1138
|
<!-- not showing the video preview properly. See: https://muffinman.io/blog/hack-for-ios-safari-to-display-html-video-thumbnail/ -->
|
|
1136
1139
|
<video
|
|
1137
1140
|
className="t-video"
|
|
1138
1141
|
controls
|
|
1139
1142
|
preload="metadata"
|
|
1140
|
-
src=${`${
|
|
1143
|
+
src=${`${e.url}#t=0.1`}
|
|
1141
1144
|
playsInline
|
|
1142
1145
|
></video>
|
|
1143
1146
|
</div>
|
|
1144
1147
|
</div>
|
|
1145
1148
|
|
|
1146
|
-
<a href=${
|
|
1147
|
-
<${r} className="download-icon" type="download" common=${
|
|
1148
|
-
<span>${
|
|
1149
|
-
<span className="t-filesize"> (${
|
|
1149
|
+
<a href=${t} className="t-body-text" target="_blank">
|
|
1150
|
+
<${r} className="download-icon" type="download" common=${n} />
|
|
1151
|
+
<span>${e.filename}</span>
|
|
1152
|
+
<span className="t-filesize"> (${ho(e.size)})</span>
|
|
1150
1153
|
</a>
|
|
1151
1154
|
</div>
|
|
1152
|
-
`}function
|
|
1155
|
+
`}function dv({block:e}){return x`<${js}
|
|
1153
1156
|
className="t-theme-voice-block"
|
|
1154
|
-
src=${
|
|
1155
|
-
filename=${
|
|
1156
|
-
/>`}function
|
|
1157
|
+
src=${e.url}
|
|
1158
|
+
filename=${e.filename}
|
|
1159
|
+
/>`}function hv({photoUrl:e}){return x`
|
|
1157
1160
|
<div
|
|
1158
1161
|
className="t-theme-avatar"
|
|
1159
|
-
style=${{backgroundImage:`url(${
|
|
1162
|
+
style=${{backgroundImage:`url(${e})`}}
|
|
1160
1163
|
/>
|
|
1161
|
-
`}function
|
|
1162
|
-
photoUrl=${
|
|
1163
|
-
common=${
|
|
1164
|
-
/>`:
|
|
1165
|
-
photoUrl=${
|
|
1166
|
-
common=${
|
|
1167
|
-
/>`:
|
|
1168
|
-
photoUrl=${
|
|
1169
|
-
common=${
|
|
1170
|
-
/>`:
|
|
1171
|
-
<${s} participants=${
|
|
1172
|
-
`}function
|
|
1164
|
+
`}function pv({common:e,conversation:t,participants:n}){const{currentUser:r,theme:i}=e,{Avatar:o,GroupChatImage:s}=i;return t.photoUrl?x`<${o}
|
|
1165
|
+
photoUrl=${t.photoUrl}
|
|
1166
|
+
common=${e}
|
|
1167
|
+
/>`:n.length===0?null:n.length===1?x`<${o}
|
|
1168
|
+
photoUrl=${ar(r)}
|
|
1169
|
+
common=${e}
|
|
1170
|
+
/>`:n.length===2?x`<${o}
|
|
1171
|
+
photoUrl=${ar(n[0].user.id===r.id?n[1].user:n[0].user)}
|
|
1172
|
+
common=${e}
|
|
1173
|
+
/>`:x`
|
|
1174
|
+
<${s} participants=${n} common=${e} />
|
|
1175
|
+
`}function fv({participants:e}){return x`
|
|
1173
1176
|
<div className="t-theme-group-chat-image">
|
|
1174
1177
|
<div
|
|
1175
1178
|
className="t-mini-avatar"
|
|
1176
|
-
style=${{backgroundImage:`url("${
|
|
1179
|
+
style=${{backgroundImage:`url("${ar(e[0].user)}")`}}
|
|
1177
1180
|
></div>
|
|
1178
1181
|
<div
|
|
1179
1182
|
className="t-mini-avatar"
|
|
1180
|
-
style=${{backgroundImage:`url("${
|
|
1183
|
+
style=${{backgroundImage:`url("${ar(e[1].user)}")`}}
|
|
1181
1184
|
></div>
|
|
1182
|
-
${
|
|
1185
|
+
${e.length>2&&x`<svg
|
|
1183
1186
|
className="t-counter"
|
|
1184
1187
|
viewBox="0 0 22 22"
|
|
1185
1188
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1210,33 +1213,33 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1210
1213
|
y=${Math.round(.666*22)}
|
|
1211
1214
|
width=${22}
|
|
1212
1215
|
height=${22}
|
|
1213
|
-
fontSize=${
|
|
1216
|
+
fontSize=${e.length>9?10:12}
|
|
1214
1217
|
fill="currentColor"
|
|
1215
1218
|
>
|
|
1216
|
-
${
|
|
1219
|
+
${e.length>9?"9+":e.length}
|
|
1217
1220
|
</text>
|
|
1218
1221
|
</svg>`}
|
|
1219
1222
|
</div>
|
|
1220
|
-
`}function
|
|
1223
|
+
`}function mv({referencedMessage:e,common:t}){const{theme:n}=t,{CompactMessageContent:r}=n;return x`
|
|
1221
1224
|
<div className="t-theme-referenced-message">
|
|
1222
|
-
<div className="t-sender-name">${
|
|
1225
|
+
<div className="t-sender-name">${e.sender.name}</div>
|
|
1223
1226
|
<div className="t-content">
|
|
1224
1227
|
<${r}
|
|
1225
|
-
message=${
|
|
1226
|
-
common=${
|
|
1228
|
+
message=${e}
|
|
1229
|
+
common=${t}
|
|
1227
1230
|
/>
|
|
1228
1231
|
</div>
|
|
1229
1232
|
</div>
|
|
1230
|
-
`}function
|
|
1233
|
+
`}function Ev(e){const{common:t,referencedMessage:n}=e,{chatbox:r,t:i,theme:o}=t,{Icon:s,CompactMessageContent:a}=o;return x`
|
|
1231
1234
|
<div className="t-theme-reply-bar">
|
|
1232
|
-
<${s} className="t-reply-icon" type="reply" common=${
|
|
1235
|
+
<${s} className="t-reply-icon" type="reply" common=${t} />
|
|
1233
1236
|
|
|
1234
1237
|
<div className="t-body">
|
|
1235
|
-
<div className="t-sender-name">${
|
|
1238
|
+
<div className="t-sender-name">${n.sender.name}</div>
|
|
1236
1239
|
<div className="t-content">
|
|
1237
1240
|
<${a}
|
|
1238
|
-
message=${
|
|
1239
|
-
common=${
|
|
1241
|
+
message=${n}
|
|
1242
|
+
common=${t}
|
|
1240
1243
|
/>
|
|
1241
1244
|
</div>
|
|
1242
1245
|
</div>
|
|
@@ -1247,10 +1250,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1247
1250
|
aria-label=${i.REPLY_MODE_LEAVE_ARIA_LABEL}
|
|
1248
1251
|
onClick=${()=>r.setReferencedMessage(null)}
|
|
1249
1252
|
>
|
|
1250
|
-
<${s} className="t-close-icon" type="close" common=${
|
|
1253
|
+
<${s} className="t-close-icon" type="close" common=${t} />
|
|
1251
1254
|
</button>
|
|
1252
1255
|
</div>
|
|
1253
|
-
`}function
|
|
1256
|
+
`}function Av({timestamp:e,common:t}){const{t:n}=t,r=new Date(e).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=IA(e,n);return x`
|
|
1254
1257
|
<span className="t-theme-time-ago">
|
|
1255
1258
|
<span
|
|
1256
1259
|
role="time"
|
|
@@ -1260,52 +1263,52 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1260
1263
|
${i.short}
|
|
1261
1264
|
</span>
|
|
1262
1265
|
</span>
|
|
1263
|
-
`}function
|
|
1266
|
+
`}function _v(e){var _,O,S;const{common:t,conversation:n,isSelected:r}=e,{currentUser:i,theme:o,conversationList:s}=t,{TimeAgo:a,ConversationImage:l,CompactMessageContent:c}=o,{lastMessage:u}=n,d=Ys(n.id,10),h=d.length>=3,f=(_=u==null?void 0:u.sender)==null?void 0:_.name,p=(O=u==null?void 0:u.editedAt)!=null?O:u==null?void 0:u.createdAt,m=d.filter(T=>T.user.id!==i.id),E=m.length?m:d,A=(S=n.subject)!=null?S:E.map(T=>T.user.name).join(", ");return x`
|
|
1264
1267
|
<div
|
|
1265
1268
|
className="t-theme-conversation-list-item"
|
|
1266
|
-
t-unread=${
|
|
1267
|
-
t-selected=${
|
|
1268
|
-
onClick=${()=>
|
|
1269
|
+
t-unread=${n.unreadMessageCount?"":void 0}
|
|
1270
|
+
t-selected=${r?"":void 0}
|
|
1271
|
+
onClick=${()=>s.selectConversation(n.id)}
|
|
1269
1272
|
>
|
|
1270
|
-
<${
|
|
1271
|
-
conversation=${
|
|
1272
|
-
participants=${
|
|
1273
|
-
common=${
|
|
1273
|
+
<${l}
|
|
1274
|
+
conversation=${n}
|
|
1275
|
+
participants=${d}
|
|
1276
|
+
common=${t}
|
|
1274
1277
|
/>
|
|
1275
1278
|
|
|
1276
1279
|
<div className="t-inner">
|
|
1277
1280
|
<div className="t-header">
|
|
1278
1281
|
<div className="t-conversation-name">${A}</div>
|
|
1279
1282
|
|
|
1280
|
-
${
|
|
1283
|
+
${p&&x`
|
|
1281
1284
|
<span className="t-timestamp">
|
|
1282
|
-
<${
|
|
1285
|
+
<${a} timestamp=${p} common=${t} />
|
|
1283
1286
|
</span>
|
|
1284
1287
|
`}
|
|
1285
1288
|
</div>
|
|
1286
1289
|
|
|
1287
1290
|
<div className="t-body">
|
|
1288
|
-
${
|
|
1291
|
+
${u&&x`
|
|
1289
1292
|
<div className="t-message">
|
|
1290
|
-
${h&&
|
|
1293
|
+
${h&&f&&x`<span className="t-message-sender">${f}:</span>`}
|
|
1291
1294
|
|
|
1292
1295
|
<${c}
|
|
1293
|
-
message=${
|
|
1294
|
-
common=${
|
|
1296
|
+
message=${u}
|
|
1297
|
+
common=${t}
|
|
1295
1298
|
/>
|
|
1296
1299
|
</div>
|
|
1297
1300
|
`}
|
|
1298
1301
|
|
|
1299
|
-
<${
|
|
1302
|
+
<${gv} ...${e} />
|
|
1300
1303
|
</div>
|
|
1301
1304
|
</div>
|
|
1302
1305
|
</div>
|
|
1303
|
-
`}function
|
|
1306
|
+
`}function gv({conversation:e}){const{isUnread:t,unreadMessageCount:n}=e;return t?n===0?x`<div className="t-unread-generic-dot" />`:n>999?x`
|
|
1304
1307
|
<div className="t-unread-dot">
|
|
1305
1308
|
<span>999+</span>
|
|
1306
1309
|
</div>
|
|
1307
|
-
`:
|
|
1310
|
+
`:x`
|
|
1308
1311
|
<div className="t-unread-dot">
|
|
1309
|
-
<span>${
|
|
1312
|
+
<span>${n}</span>
|
|
1310
1313
|
</div>
|
|
1311
|
-
`:null}const
|
|
1314
|
+
`:null}const Dv=new Promise(e=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(void 0)});function PA(e,t,n,r){const i=new Map,o=[],s=[];for(const[d,h]of(a=n,Object.entries(a))){const f=[d,d.toLowerCase(),Ov(d)];for(const p of f)i.set(p,d);["string","boolean","number"].includes(h.type)&&o.push(...f),h.required!==!1&&s.push(d)}var a;const u=class u extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[h,f]of i)if(Object.hasOwnProperty.call(this,h)){const p=this[h];this.updateProp(f,p),delete this[h]}else this.hasAttribute(h)&&this.syncAttributeToProp(h)}updateProp(h,f){const{type:p}=n[h];if(p==="boolean"&&typeof f=="string"?f=f!=="false":p==="number"&&typeof f=="string"&&(f=Number(f)),f===void 0){const m=h in this._props;return delete this._props[h],m}{const m=this._props[h]!==f;return this._props[h]=f,m}}syncAttributeToProp(h){const f=i.get(h);ft(f,`Attribute "${h}" should have matching prop`);const p=this.getAttribute(h);return this.updateProp(f,p)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var h;this._renderRoot||(this._renderRoot=(h=this,{render:function(A){ac(A,h)},unmount:function(){cc(h)}}));const f=s.filter(A=>!(A in this._props));if(f.length>0)return r(f),void this._renderRoot.render(null);const p=Object.assign({},this._props),m=A=>{const _=[...Object.getOwnPropertyNames(A.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(A.current))];for(const O of _)O!=="constructor"&&typeof A.current[O]=="function"&&(this[O]=(...S)=>A.current[O](...S))},E=e;this._renderRoot.render(y(E,{...p,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))}async connectedCallback(){await Dv;for(const h of o)this.hasAttribute(h)&&this.syncAttributeToProp(h);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(h,f,p){f!==p&&this.syncAttributeToProp(h)&&this.requestRender()}};u.observedAttributes=o;let l=u;const c={};for(const[d,h]of i)c[d]={set(f){this.updateProp(h,f)&&this.requestRender()},get(){return this._props[h]}};return Object.defineProperties(l.prototype,c),Object.defineProperty(l,"name",{value:t}),l}function Ov(e){return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase())}function xA(e,t){const n=JSON.stringify(t).replace(",",", ");je.error(`Could not initialize ${e} because the following required props are missing: ${n}.`)}const Rp=PA(MT,"ChatboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},conversationId:{type:"string"},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},onSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},e=>xA("<t-chatbox>",e)),Ip=PA(VT,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},themeCustom:{type:"object",required:!1}},e=>xA("<t-conversation-list>",e)),Sv=Kl;customElements.get("t-chatbox")||customElements.define("t-chatbox",Rp),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",Ip),exports.AudioPlayer=js,exports.ChatboxElement=Rp,exports.ConversationListElement=Ip,exports.Editor=kE,exports.EmojiPicker=Wc,exports.EmojiSuggestBar=eA,exports.MentionSuggestList=vA,exports.MenuItem=Sn,exports.MessageContent=GE,exports.PopoverButton=Nr,exports.Preact=lf,exports.ReactionPicker=WE,exports.Text=zc,exports.defaultTheme=Sv,exports.formatDuration=tu,exports.formatFilesize=ho,exports.getGoogleMapsUrls=Qc,exports.getPhotoUrlWithFallback=ar,exports.getRandomColor=RA,exports.html=x,exports.useParticipants=Ys,exports.useTimeAgo=IA,exports.userFriendlyDate=NA;
|