@talkjs/react-components 0.1.1 → 0.1.3

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.
Files changed (3) hide show
  1. package/default.cjs +86 -86
  2. package/default.js +3955 -3878
  3. package/package.json +1 -1
package/default.cjs CHANGED
@@ -1,11 +1,11 @@
1
- "use client";"use strict";var lc=e=>{throw TypeError(e)};var cc=(e,t,n)=>t.has(e)||lc("Cannot "+n);var xt=(e,t,n)=>(cc(e,t,"read from private field"),n?n.call(e):t.get(e)),Hr=(e,t,n)=>t.has(e)?lc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Os=(e,t,n,r)=>(cc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),T=require("react"),Hm=require("@talkjs/core"),Qi=require("react-dom");function th(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const at=th(T),Bm=th(Qi);var ol=Object.prototype.hasOwnProperty;function Dt(e){return Array.isArray(e)}function ve(e){return!(!e||typeof e!="object"||e instanceof Date||Dt(e))}function Um(e){return ve(e)&&e.constructor===Object}function X(e){return typeof e=="function"}function Yt(e){const t=typeof e;return e!==void 0&&(pa(e)||t!=="object"&&t!=="function")}function pa(e){return e instanceof Date}function eh(e){return typeof e=="boolean"}function Ce(e){return e instanceof Promise}function It(e){return e instanceof Map||e instanceof WeakMap}function qe(e){return e instanceof Set||e instanceof WeakSet}function fo(e){if(!e)return!1;if(Dt(e))return e.length===0;if(It(e)||qe(e))return e.size===0;for(const t in e)if(ol.call(e,t))return!1;return!0}var jm=new Set(["boolean","string","number"]);function zo(e){return!!e.parent}var $m=Symbol.toPrimitive,Vm=Symbol.iterator,gr=Symbol("getNode"),Go=Symbol("delete"),nh=Symbol("opaque"),Ym=Symbol("plain"),sl=Symbol("optimized"),si=Symbol("linked"),At={pendingNodes:new Map,dirtyNodes:new Set};function ai(e){return e&&(e[nh]||e.$$typeof)}function rh(e){return e&&e[Ym]}function ih(e){return Dt(e)?"array":It(e)?"map":e instanceof Set?"set":"object"}function zm(e,t){return It(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(At.replacer&&(t=At.replacer(e,t)),t)}var Gm=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function Xm(e,t){if(t){if(typeof t=="string"&&Gm.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)}At.reviver&&(t=At.reviver(e,t))}return t}function oh(e){return e&&JSON.stringify(e,zm)}function sh(e){return e&&JSON.parse(e,Xm)}function ah(e){return sh(oh(e))}function ft(e){return!!e&&!!e[gr]}function Ii(e){return e&&e[gr]}function lh(e,t,n,r,i){return r?e.add(n):i?e.set(t,n):e[t]=n,n}function We(e,t){var n;const r=(n=e.parent)!=null?n:e,i=e.parent?e.key:"_",o=t===Go;o&&(t=void 0);const s=e.parent?al(r):r.root,a=qe(s),l=It(s),c=a?i:l?s.get(i):s[i],u=X(t);if((t=r.isAssigning||!u||X(c)?t:t(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:lh(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:t,parentValue:s}}var uc=[];function ot(e){let t=0,n=e;for(;zo(n);)uc[t++]=n.key,n=n.parent;let r=e.root._;for(let i=t-1;r&&i>=0;i--){const o=uc[i];r=o!=="size"&&It(r)?r.get(o):r[o]}return r}function _e(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)),X(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),e.children||(e.children=new Map),e.children.set(t,o)),o}function al(e){let t=ot(e);if(!t||X(t))if(zo(e)){const n=al(e.parent),r=qe(n),i=It(n);t=lh(n,e.key,{},r,i)}else t=e.root._={};return t}function ch(e,t){var n,r;let i=ft(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:ot(t.parent)[t.key+"_keyExtractor"];s&&X(s)&&(i=s)}return i}function dc(e,t,n){e.functions||(e.functions=new Map),e.functions.set(t,n)}function uh(e,t){return e===t||pa(e)&&pa(t)&&+e==+t}function fa(e,t,n,r){return t?void 0:e?r?Array.from(e):n?Array.from(e.keys()):Object.keys(e):[]}function Wm(e,t){return e&&Object.defineProperty(e,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),e}var hc=function(e){return Wm(e,nh)};function dh(e,t){var n;e.isPlain||!((n=e.parent)!=null&&n.isPlain)&&!rh(t)||(e.isPlain=!0)}function ye(e,t,n,r){let i=e;return!ft(i)&&X(i)&&(i=n?i(n):i()),ft(i)&&!r?i.get(t):i}var Qr,Km=(e,t)=>e&&e[t];function hh(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=It(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===Go)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=ll(n[u]),It(l)?l.set(a,h):l[a]=h),u<t.length-1&&(l=h,c&&(c=f))}}return a===void 0?e=i==="merge"?mo(e,r):r:i==="merge"?l[a]=mo(l[a],r):It(l)?l.set(a,r):l[a]=r,e}function pc(e,t,n){let r=n;for(let i=0;i<e.length;i++){const o=e[i];r=r?r[o]:ll(t[i])}return r}function fc(e){return!(!e||(ve(e)||Dt(e))&&fo(e))}function ll(e){switch(e){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function qm(e,t,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return hh(e,r,s,o)}function mo(e,...t){if(Yt(e))return t[t.length-1];let n=Dt(e)?[...e]:{...e};for(let r=0;r<t.length;r++){const i=t[r];if(Um(i)||Dt(i)){const o=i;for(const s in o)ol.call(o,s)&&(o[s]instanceof Object&&!ft(o[s])&&Object.keys(o[s]).length>0?n[s]=mo(n[s]||(Dt(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Eo=0,Ss=!1,Ts=!1,ar=new Map;function Jm(){ar.size>0&&br(!0)}function ph(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Zm(e,t){try{return function(n,r){for(let i=0;i<r.length;i++)n=qm(n,r[i]);return n}(e?ah(e):{},t)}catch(n){return}}function cl(e,t){return function(){return Zm(e,t)}}function li(e,t,n,r,i){const o=new Map;Ao(o,e,!!At.isLoadingLocal,!!At.isLoadingRemote,t,[],[],t,n,!0,r,i);const s=ar.get(e);s?s.prev===t?ar.delete(e):s.value=t:ar.set(e,{value:t,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!At.isLoadingRemote,isFromPersist:!!At.isLoadingLocal}),o.size&&fh(o,!0),Eo<=0&&mh()}function Ao(e,t,n,r,i,o,s,a,l,c,u,d){if(t.numListenersRecursive>0&&(function(h,f,p,m,E,A,g,O,S,R,b,I){if(R?f.listenersImmediate:f.listeners){const y={path:A,pathTypes:g,valueAtPath:O,prevAtPath:S},D=h.get(f);if(D&&A.length>0){const{changes:_}=D;ph(_[0].path,y.path)||(_.push(y),D.level=Math.min(D.level,b),D.whenOptimizedOnlyIf||(D.whenOptimizedOnlyIf=I))}else h.set(f,{level:b,value:E,isFromSync:m,isFromPersist:p,whenOptimizedOnlyIf:I,changes:[y]})}}(e,t,n,r,i,o,s,a,l,c,u,d),t.linkedFromNodes))for(const h of t.linkedFromNodes)Ao(e,Qm(h,o),n,r,a,[],[],a,l,c,0,d);if(t.parent){const h=t.parent;h&&Ao(e,h,n,r,ot(h),[t.key].concat(o),[ih(i)].concat(s),a,l,c,u+1,d)}}function fh(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!==sl||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:cl(o,r),changes:r}),m||n.add(A),A(d))}}})}function mh(){const e=Array.from(At.dirtyNodes);At.dirtyNodes.clear(),e.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=ar;ar=new Map;const n=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{Ao(n,c,s,a,r,[],[],r,i,!1,o,l)}),n.size&&fh(n,!1)}function Dr(e){Xo();try{e()}finally{br()}}function Xo(){Eo++,Qr||(Qr=setTimeout(Jm,0))}function br(e){(--Eo<=0||e)&&(Ss?Ts=!0:(Qr&&(clearTimeout(Qr),Qr=void 0),Eo=0,Ss=!0,mh(),Ss=!1,Ts&&(Ts=!1,br(!0))))}function Qm(e,t){let n=e;for(let r=0;r<t.length;r++)n=_e(n,t[r]);return n}function ul(e,t,n,r,i){if(ft(e))return e;const o=Ce(e);let s={root:{_:e},lazy:!0,numListenersRecursive:0};X(e)&&(s=Object.assign(()=>{},s),s.lazyFn=e);var a;const l=t||(a=e,jm.has(typeof a))?new i(s):r(s);return o&&(We(s,void 0),n(s,e)),l}var tr=new WeakMap,Eh=[],Ah=[],gh=[],er=0,ma=!1;function Rs(e,t,n){const r=tr.get(e);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(Eh[er]=e,Ah[er]=t,gh[er]=n,er++,ma||(ma=!0,queueMicrotask(tE)))}var Br={type:"listener-added",node:null,listener:void 0,timestamp:0};function tE(){ma=!1;const e=typeof performance!="undefined"?performance.now():Date.now();Br.timestamp=e;for(let t=0;t<er;t++){const n=Eh[t],r=Ah[t],i=gh[t],o=tr.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){Br.type=i,Br.node=n,Br.listener=r;const u=Array.from(s);for(let d=0;d<u.length;d++)try{u[d](Br)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}er=0}function mn(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=ot(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 g={trackingType:!0,...n};d=[...d||[],mn(m,E,g,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,eE(m,p,t),f);f.numListenersRecursive++,p=[f.key,...p],f=f.parent}return Rs(e,u,"listener-added"),()=>{c.delete(u),d==null||d.forEach(E=>E());let m=e;for(;m;)m.numListenersRecursive--,m=m.parent;Rs(e,u,"listener-removed"),c.size===0&&Rs(e,void 0,"listeners-cleared")}}function eE(e,t,n){let r=pc(t,[],ot(e));return function({value:i,isFromPersist:o,isFromSync:s}){const a=pc(t,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function mc(e,t,n,r){let i=[];return e==null||e.forEach(o=>{const{node:s,track:a}=o;i.push(mn(s,t,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var to=0,Ec=[],nr={current:void 0};function eo(e,t){if(to){const n=nr.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 Dh(e,t,n,r,i,o){let s,a,l=t;Ec.push(nr.current),to++,nr.current={};const c=e&&ye(e,n,r,i==null?void 0:i.fromComputed),u=nr.current.nodes;return--to<0&&(to=0),nr.current=Ec.pop(),r!=null&&r.cancel||(s=mc(u,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=mc(u,l),s):void 0),{nodes:u,value:c,dispose:s,resubscribe:a}}function _r(e,t,n){let r,i;X(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,Xo(),delete s.value,i==null||i();const{dispose:l,value:c,nodes:u}=Dh(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),br(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=e)&&((h=d[gr])!=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 _h(e,t,n){if(Ce(e))return t?e.then(t):e;const r=Dt(e);let i,o;return _r(function(s){const a=r?e.map(l=>ye(l)):ye(e);if(!Ce(a)){{let l=!0;if(Dt(a))for(let c=0;c<a.length;c++){let u=a[c];ft(u)?u=ye(u):X(u)&&(u=u()),l=l&&!!(n?fc(u):u)}else l=n?fc(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),Ce(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(Ce(c)?c.then(u=>u):c)}}else t=s})}function Oh(e,t){return _h(e,t,!1)}var Is=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),Ac=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),nE=new Set(["filter","find"]),Ea=new Map,Aa=new Map([["get",Wo],["set",he],["peek",Lr],["onChange",mn],["assign",function(e,t){const n=Kt(e);if(Xo(),Yt(e.root._)&&(e.root._={}),It(t)){const r=ot(e);It(r)?t.forEach((i,o)=>r.set(o,i)):he(e,t)}else{e.isAssigning=(e.isAssigning||0)+1;try{Object.assign(n,t)}finally{e.isAssigning--}}return br(),n}],["delete",Rh],["toggle",function(e){const t=ot(e);(t==null||eh(t))&&he(e,!t)}]]);function Sh(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=zo(e),l=a?e.key:"_";(a?ot(e.parent):e.root)[l]=o,Or((i=e.parent)!=null?i:e,l,t)}return s}Or(e,t.length+"",r[0])}function dl(e,t,n){var r,i,o;if(ve(t)&&ai(t)||ve(n)&&ai(n)){const R=t!==n;return R&&(e.listeners||e.listenersImmediate)&&li(e,t,n,0),R}const s=Dt(t);let a,l;const c=It(t),u=qe(t),d=It(n),h=qe(n),f=fa(t,s,c,u),p=fa(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,g,O,S=!1;if(s&&Dt(n)){if(n.length>0){const R=n[0];if(R!==void 0&&(A=ch(R,e),A&&(g=X(A),a=new Map,l=[]),e.children))for(let b=0;b<n.length;b++){const I=n[b];if(I){const y=e.children.get(b+"");if(y&&(t[b]||gc(y,I),A)){const D=g?A(I):I[A];a.set(D,y)}}}}}else if(n&&(!t||ve(t))){const R=p.length;for(let b=0;b<R;b++){const I=p[b];if(!f.includes(I)){S=!0;const y=_e(e,I),D=d?n.get(I):n[I];D!==void 0&&gc(y,D)}}}if(t&&!Yt(t)){S=S||m!==E;const R=S;let b=!1;for(let I=0;I<m;I++){const y=s?I+"":f[I];let D=c?t.get(y):t[y];const _=d?n==null?void 0:n.get(y):n==null?void 0:n[y];let w=!uh(D,_);if(w){const k=A&&D?g?A(D):D[A]:void 0,x=(o=e.children)==null?void 0:o.get(y);if(ft(D)){const M=Ii(D);if((x==null?void 0:x.linkedToNode)===M){const F=ot(M);c?t.set(y,F):t[y]=F;continue}const U=D;D=()=>U}let N=_e(e,y,D);if(N.lazy||!X(D)&&!ft(D)||(Nh(N,D),xn(N)),s&&k!==void 0){const M=k!==void 0?a==null?void 0:a.get(k):void 0;if(M){if(M!==void 0&&M.key!==y){const U=n[M.key];R&&(N=M,e.children.delete(N.key),N.key=y,l.push([y,N])),b=!0,w=U!==D}}else S=!0}if(w)if(X(D)||ft(D))Tr(e,y,D);else if(Yt(D))S=!0;else{const M=dl(N,D,_);S=S||M,w=M}(w||s&&!R)&&(N.listeners||N.listenersImmediate)&&li(N,D,_,0,!R)}}if(l)for(let I=0;I<l.length;I++){const[y,D]=l[I];e.children.set(y,D)}O=S||b}else n!==void 0&&(O=!0);return O!=null&&O}function gc(e,t){var n,r;(n=e.linkedToNodeDispose)==null||n.call(e),(r=e.activatedObserveDispose)==null||r.call(e),Yt(t)||dl(e,void 0,t),(e.listeners||e.listenersImmediate)&&li(e,void 0,t,0)}function Kt(e,t,n){return t!==void 0&&(e=_e(e,t,n)),e.proxy||(e.proxy=new Proxy(e,Th))}function ga(){if(At.pendingNodes.size>0){const e=Array.from(At.pendingNodes.values());At.pendingNodes.clear(),e.forEach(t=>t())}}var Th={get(e,t,n){var r,i;if(t===$m)throw new Error("[legend-state] observable is not a primitive.");if(t===gr)return e;if(t==="apply"||t==="call"){const d=ot(e);if(X(d))return d[t]}let o=xn(e,t==="get"||t==="peek");if(t===Vm)return!o||Yt(o)?void 0:o[t];const s=e.linkedToNode||(o==null?void 0:o[gr]);if(s&&t!=="onChange")return Th.get(s,t,n);if(It(o)||qe(o)){const d=function(h,f,p){const m=p==null?void 0:p[f];if(f==="size")return eo(h,!0),p[f];if(X(m))return function(E,A,g){const O=arguments.length,S=p;if(f==="get"){if(O>0&&typeof E!="boolean"&&E!==sl)return Kt(h,E)}else{if(f==="set")return O===2?he(_e(h,E),A):O===1&&It(p)&&he(h,E),Kt(h);if(f==="delete"){if(O>0){const b=p.get?S.get(E):E;return Rh(h,E),b!==void 0}}else{if(f==="clear"){const b=qe(S)?new Set(S):new Map(S),I=S.size;return S.clear(),void(I&&Ih(h,p,b))}if(f==="add"){const b=new Set(p),I=p.add(E);return p.has(f)||li(h,I,b,0),Kt(h)}}}const R=Aa.get(f);if(!R)return p[f](E,A);switch(O){case 0:return R(h);case 1:return R(h,E);case 2:return R(h,E,A);default:return R(h,E,A,g)}}}(e,t,o);if(d!==void 0)return d}const a=Aa.get(t);if(a)return t!=="get"&&t!=="peek"||ga(),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=Ea.get(t);if(l)return l.get(e);let c=o==null?void 0:o[t];if(ve(o)&&ai(o))return c;const u=(r=e.functions)==null?void 0:r.get(t);if(u)return ft(u)?u:Kt(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){X(p)&&(p={get:p});const m=function(){return{[si]:p}};return m.prototype[si]=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&&(Is.has(t)||Ac.has(t))&&(o=[],Is.has(t)&&We(e,o),c=o[t]),X(c)){if(Dt(o)){if(Is.has(t))return(...h)=>Sh(e,o,t,...h);if(Ac.has(t))return eo(e,!0),function(h,f){const p=t==="reduce",m=p?(g,O,S,R)=>h(g,Kt(e,S+"",O),S,R):(g,O,S)=>h(Kt(e,O+"",g),O,S);if(p||!nE.has(t))return o[t](m,f);const E=t==="find",A=[];for(let g=0;g<o.length;g++)if(m(o[g],g,o)){const O=Kt(e,g+"");if(E)return O;A.push(O)}return E?void 0:A}}Tr(e,t,c);const d=(i=e.functions)==null?void 0:i.get(t);return d?Kt(e,t,d):c.bind(o)}return Yt(c)&&t==="length"&&Dt(o)?(eo(e,!0),c):Kt(e,t)},getPrototypeOf(e){const t=ot(e);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(e){xn(e);const t=Wo(e,!0);if(Yt(t))return[];const n=t?Reflect.ownKeys(t):[];if(Dt(t)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),X(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=ot(e);if(Yt(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 Or(e,t,n),!0;const r=Ea.get(t);return!!r&&(r.set(e,n),!0)},deleteProperty:(e,t)=>!!e.isSetting&&Reflect.deleteProperty(e,t),has(e,t){const n=ot(e);return Reflect.has(n,t)},apply(e,t,n){ft(t)&&(t=t.peek());const r=ot(e),i=X(r)?r:e.lazyFn||e;return Reflect.apply(i,t,n)}};function he(e,t){e.parent?Or(e.parent,e.key,t):Or(e,"_",t)}function Or(e,t,n,r){const i=!e.parent&&t==="_";dh(e,n),!e.parent||ot(e)||X(n)||he(e,{[t]:n});const o=i?e:_e(e,t,n);if(ft(n))go(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=We(o,n),c=Yt(a)||a instanceof Date||Yt(s)||s instanceof Date;if(!c){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const u=!uh(s,a),d=!u&&o.isComputing&&!c&&!o.isPlain;!u&&!d||o.isComputing&&o.isPlain&&e.numListenersRecursive===0||Ih(e,s,a,o,l,c,i,r,d),Tr(e,t,s)}}function Rh(e,t){t===void 0&&zo(e)&&(t=e.key,e=e.parent);const n=ot(e);Dt(n)?Sh(e,n,"splice",t,1):Or(e,t!=null?t:"_",Go,-1)}function Ih(e,t,n,r,i,o,s,a,l){r||(r=e),Xo(),o===void 0&&(o=Yt(t));let c,u,d=l||o,h=!1;(!o||n&&!Yt(n))&&(d=d||dl(r,t,n),Dt(t)?c=t:(It(t)||qe(t))&&(u=t)),Dt(i)?c=i:(It(i)||qe(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||fo(t)&&!fo(n)?t!==n:d)&&li(o&&s?e:r,t,n,(a!=null?a:n===void 0)?-1:d?0:1,h),br()}function Sr(e,t,n){const r=e.numGets=(e.numGets||0)+1;e.state||(e.state=ul({isLoaded:!1},!1,Sr,Kt)),t.then(i=>{r>=(e.getNumResolved||0)&&(e.getNumResolved=e.numGets,n?n({value:i}):he(e,i),e.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{e.state.error.set(i)})}function Tr(e,t,n){if(Ce(n)){const r=_e(e,t);return Sr(r,n),void We(r,void 0)}if(ft(n)){const r=()=>n;dc(e,t,r);const i=_e(e,t,r),o=Lr(Ii(n));return go(i,n),We(i,o),ot(i)}if(typeof n=="function")return dc(e,t,n),t}function Wo(e,t){return eo(e,t?ve(t)?t.shallow:t:void 0),Lr(e)}function Lr(e){return xn(e,!0)}var Ui=!1;function xn(e,t){var n;if(Ui=!0,t&&((n=e.dirtyChildren)==null?void 0:n.size)){const i=Array.from(e.dirtyChildren);e.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&xn(o))}if(e.dirtyFn){const i=e.dirtyFn;e.dirtyFn=void 0,At.dirtyNodes.delete(e),i()}Ui=!1;let r=ot(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,X(c))if(c.length===1)o={};else{if(i.parent){const u=ot(i.parent);X(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,g,O=[];function S(){u.dirtyFn=g,At.dirtyNodes.add(u)}const R=_r(()=>{var b,I,y,D;if(m)m=!1,X(ot(u))&&We(u,void 0);else if(!Ui&&g&&function(N,M){if(!Ui&&!function(F){var Y,z;let V=F,J=F.numListenersRecursive>0;for(;V&&!J;)((Y=V.listeners)!=null&&Y.size||(z=V.listenersImmediate)!=null&&z.size)&&(J=!0),V=V.parent;return J}(N)){M&&(N.dirtyFn=M);let F=N;for(;F;)F.dirtyChildren||(F.dirtyChildren=new Set),F.dirtyChildren.add(N),F=F.parent;return!0}}(u,g))return void(p=!0);let _=E(),w=!1;const k=ft(_);(k||u.linkedToNode)&&(w=k,_=go(u,_)),X(_)&&_.length===0&&(_=_());const x=k||_==null?void 0:_[si];if(x&&(u.activationState=x,_=void 0),p=!1,f=Ce(_),u.activated){if(u.activationState){const N=u.activationState;(I=(b=u.state)==null?void 0:b.peek())!=null&&I.sync?(u.state.sync(),p=!0):_=(D=(y=N.get)==null?void 0:y.call(N))!=null?D:N.initial}}else{u.activated=!0;let N=rE;x!=null&&x.synced&&(N=At.activateSyncedNode,p=!0);const M=N(u,_);h=M.update;let U=M.value;!w&&ft(U)&&(U=go(u,U)),_=U!=null?U:x==null?void 0:x.initial}return p&&(A=_),f=f||Ce(_),_},b=>{const{value:I,nodes:y,refresh:D}=b;if(g=D,!p){if(!f||!At.isLoadingRemote)if(f)if(u.activationState){const{initial:_}=u.activationState;I&&Ce(I)&&Sr(u,I,h),X(ot(u))&&We(u,_!=null?_:void 0)}else u.activated&&(Sr(u,I,h),X(ot(u))&&We(u,void 0));else{A=I;const _=u.state.isLoaded.peek();!_&&X(I)||(u.isComputing=!0,he(u,I),u.isComputing=!1),_||u.state.assign({isLoaded:!0,error:void 0})}O.forEach(_=>_()),O=[],y==null||y.forEach(({node:_,track:w})=>{O.push(mn(_,S,{immediate:!0,trackingType:w}))})}b.cancel=!0},{fromComputed:!0});return u.activatedObserveDispose=()=>{R==null||R(),O.forEach(b=>b())},A}(i,c)}else ft(o)&&(o=Tr(i.parent,i.key,o))}return dh(i,o),!l&&!i.needsExtract||i.isPlain||ft(o)||Yt(o)||(s&&function(c,u){if(!u.recursivelyAutoActivated&&(ve(c)||Dt(c))&&!ai(c)){u.recursivelyAutoActivated=!0;const d=[];vh(c,d,()=>{var f;let p=u;for(let m=0;m<d.length;m++){const E=d[m],A=(f=ot(p))==null?void 0:f[E];p=_e(p,E,X(A)?A:void 0),xn(p)}return p})}}(o,i),i.parent&&Tr(i.parent,i.key,a)),o}(e,r,!!t)),r}function Ch(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 Nh(e,t){Ch(e),e.lazyFn=t,e.lazy=!0}function rE(e,t){if(e.state||(e.state=ul({isLoaded:!1},!1,Sr,Kt)),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=cl(d,u)),s=[],o=void 0,At.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)};_h(e.state.isLoaded,E,!0)}};mn(e,({value:c,changes:u})=>{e.isComputing||(u.length>1||!X(u[0].prevAtPath))&&(o=c,s.length>0&&(u=u.filter(d=>!ph(s[0].path,d.path))),s.push(...u),At.pendingNodes.set(e,l))},{immediate:!0}),mn(e,l)}}return{update:({value:n})=>{e.isComputing||(e.isComputing=!0,he(e,n),e.isComputing=!1)},value:t}}function go(e,t){var n;const r=t?Ii(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=mn(r,()=>{X(t=xn(r))||he(e,t)},{initial:!0},new Set([e])))),t}function vh(e,t,n){var r;if((ve(e)||Dt(e))&&!ai(e)&&!rh(e)){for(const i in e)if(ol.call(e,i)){const o=e[i];if(ft(o)){const s=n();Tr(s,i,o),delete s.lazy}else{const s=X(o)&&((r=o.prototype)==null?void 0:r[si]);if(s){const a=s.activate;(!a||a==="auto")&&Lr(_e(n(),i,o))}}typeof o=="object"&&(t.push(i),vh(o,t,n),t.pop())}}}var Dc=["get","set","peek","onChange","toggle"];function lr(e){this._node=e;for(let t=0;t<Dc.length;t++){const n=Dc[t];this[n]=this[n].bind(this)}}function ji(e,t){lr.prototype[e]=function(...n){return t.call(this,this._node,...n)}}function mt(e){return ul(e,!1,Sr,Kt,lr)}ji("peek",e=>(ga(),Lr(e))),ji("get",(e,t)=>(ga(),Wo(e,t))),ji("set",he),ji("onChange",mn),Object.defineProperty(lr.prototype,gr,{configurable:!0,get(){return this._node}}),lr.prototype.toggle=function(){const e=this.peek();(e==null||eh(e))&&this.set(!e)},lr.prototype.delete=function(){return this.set(void 0),this};var Ko={createPreviousHandler:cl,clone:ah,deactivateNode:Ch,deepMerge:mo,ensureNodeValue:al,findIDKey:ch,get:Wo,getChildNode:_e,getKeys:fa,getNode:Ii,getNodeValue:ot,getPathType:ih,getProxy:Kt,getValueAtPath:function(e,t){return t.reduce(Km,e)},globalState:At,initializePathType:ll,ObservablePrimitiveClass:lr,observableProperties:Ea,observableFns:Aa,optimized:sl,peek:Lr,reactivateNode:Nh,registerMiddleware:function(e,t,n){let r=tr.get(e);r||(r=new Map,tr.set(e,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(n),()=>{const o=tr.get(e);if(!o)return;const s=o.get(t);s&&(s.delete(n),s.size===0&&(o.delete(t),o.size===0&&tr.delete(e)))}},safeParse:sh,safeStringify:oh,set:he,setAtPath:hh,setNodeValue:We,symbolLinked:si,symbolDelete:Go,tracking:nr},{globalState:_c,observableProperties:iE,observableFns:oE,ObservablePrimitiveClass:Oc}=Ko;class yh extends Error{}function Sc(e,t){if(!e)throw new yh(t!=null?t:"Assertion failed")}const lt=Object.assign(Sc,{is:function(e,t,n){return Sc(t,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(e){throw new Error("Unreachable")},defined:function(e){if(e==null)throw new yh("Value is not defined")}});class qo{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new qo(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 Do=new qo,Ge=new qo;function Tc(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 Rc(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=Tc(t,e,"#fff"),r=Tc(t,e,"#000");return r===n&&!r.startsWith("0,0,0,")}function sE(e){const{common:t}=e;return t.conversation.subject?P`
1
+ "use client";"use strict";var cc=e=>{throw TypeError(e)};var uc=(e,t,n)=>t.has(e)||cc("Cannot "+n);var Mt=(e,t,n)=>(uc(e,t,"read from private field"),n?n.call(e):t.get(e)),Br=(e,t,n)=>t.has(e)?cc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Is=(e,t,n,r)=>(uc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),R=require("react"),jm=require("@talkjs/core"),to=require("react-dom");function nh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const st=nh(R),$m=nh(to);var al=Object.prototype.hasOwnProperty;function At(e){return Array.isArray(e)}function Ie(e){return!(!e||typeof e!="object"||e instanceof Date||At(e))}function Vm(e){return Ie(e)&&e.constructor===Object}function X(e){return typeof e=="function"}function Vt(e){const t=typeof e;return e!==void 0&&(Aa(e)||t!=="object"&&t!=="function")}function Aa(e){return e instanceof Date}function rh(e){return typeof e=="boolean"}function Te(e){return e instanceof Promise}function Rt(e){return e instanceof Map||e instanceof WeakMap}function Xe(e){return e instanceof Set||e instanceof WeakSet}function mo(e){if(!e)return!1;if(At(e))return e.length===0;if(Rt(e)||Xe(e))return e.size===0;for(const t in e)if(al.call(e,t))return!1;return!0}var Ym=new Set(["boolean","string","number"]);function Wo(e){return!!e.parent}var zm=Symbol.toPrimitive,Gm=Symbol.iterator,Ar=Symbol("getNode"),Ko=Symbol("delete"),ih=Symbol("opaque"),Xm=Symbol("plain"),ll=Symbol("optimized"),ai=Symbol("linked"),mt={pendingNodes:new Map,dirtyNodes:new Set};function li(e){return e&&(e[ih]||e.$$typeof)}function oh(e){return e&&e[Xm]}function sh(e){return At(e)?"array":Rt(e)?"map":e instanceof Set?"set":"object"}function Wm(e,t){return Rt(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(mt.replacer&&(t=mt.replacer(e,t)),t)}var Km=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function qm(e,t){if(t){if(typeof t=="string"&&Km.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)}mt.reviver&&(t=mt.reviver(e,t))}return t}function ah(e){return e&&JSON.stringify(e,Wm)}function lh(e){return e&&JSON.parse(e,qm)}function ch(e){return lh(ah(e))}function pt(e){return!!e&&!!e[Ar]}function Ci(e){return e&&e[Ar]}function uh(e,t,n,r,i){return r?e.add(n):i?e.set(t,n):e[t]=n,n}function ze(e,t){var n;const r=(n=e.parent)!=null?n:e,i=e.parent?e.key:"_",o=t===Ko;o&&(t=void 0);const s=e.parent?cl(r):r.root,a=Xe(s),l=Rt(s),c=a?i:l?s.get(i):s[i],u=X(t);if((t=r.isAssigning||!u||X(c)?t:t(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:uh(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:t,parentValue:s}}var dc=[];function it(e){let t=0,n=e;for(;Wo(n);)dc[t++]=n.key,n=n.parent;let r=e.root._;for(let i=t-1;r&&i>=0;i--){const o=dc[i];r=o!=="size"&&Rt(r)?r.get(o):r[o]}return r}function Ae(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)),X(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),e.children||(e.children=new Map),e.children.set(t,o)),o}function cl(e){let t=it(e);if(!t||X(t))if(Wo(e)){const n=cl(e.parent),r=Xe(n),i=Rt(n);t=uh(n,e.key,{},r,i)}else t=e.root._={};return t}function dh(e,t){var n,r;let i=pt(e)?void 0:Ie(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:it(t.parent)[t.key+"_keyExtractor"];s&&X(s)&&(i=s)}return i}function hc(e,t,n){e.functions||(e.functions=new Map),e.functions.set(t,n)}function hh(e,t){return e===t||Aa(e)&&Aa(t)&&+e==+t}function ga(e,t,n,r){return t?void 0:e?r?Array.from(e):n?Array.from(e.keys()):Object.keys(e):[]}function Jm(e,t){return e&&Object.defineProperty(e,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),e}var pc=function(e){return Jm(e,ih)};function ph(e,t){var n;e.isPlain||!((n=e.parent)!=null&&n.isPlain)&&!oh(t)||(e.isPlain=!0)}function Ce(e,t,n,r){let i=e;return!pt(i)&&X(i)&&(i=n?i(n):i()),pt(i)&&!r?i.get(t):i}var ti,Zm=(e,t)=>e&&e[t];function fh(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=Rt(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===Ko)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=ul(n[u]),Rt(l)?l.set(a,h):l[a]=h),u<t.length-1&&(l=h,c&&(c=f))}}return a===void 0?e=i==="merge"?Eo(e,r):r:i==="merge"?l[a]=Eo(l[a],r):Rt(l)?l.set(a,r):l[a]=r,e}function fc(e,t,n){let r=n;for(let i=0;i<e.length;i++){const o=e[i];r=r?r[o]:ul(t[i])}return r}function mc(e){return!(!e||(Ie(e)||At(e))&&mo(e))}function ul(e){switch(e){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function Qm(e,t,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return fh(e,r,s,o)}function Eo(e,...t){if(Vt(e))return t[t.length-1];let n=At(e)?[...e]:{...e};for(let r=0;r<t.length;r++){const i=t[r];if(Vm(i)||At(i)){const o=i;for(const s in o)al.call(o,s)&&(o[s]instanceof Object&&!pt(o[s])&&Object.keys(o[s]).length>0?n[s]=Eo(n[s]||(At(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Ao=0,Cs=!1,vs=!1,ar=new Map;function tE(){ar.size>0&&yr(!0)}function mh(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function eE(e,t){try{return function(n,r){for(let i=0;i<r.length;i++)n=Qm(n,r[i]);return n}(e?ch(e):{},t)}catch(n){return}}function dl(e,t){return function(){return eE(e,t)}}function ci(e,t,n,r,i){const o=new Map;go(o,e,!!mt.isLoadingLocal,!!mt.isLoadingRemote,t,[],[],t,n,!0,r,i);const s=ar.get(e);s?s.prev===t?ar.delete(e):s.value=t:ar.set(e,{value:t,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!mt.isLoadingRemote,isFromPersist:!!mt.isLoadingLocal}),o.size&&Eh(o,!0),Ao<=0&&Ah()}function go(e,t,n,r,i,o,s,a,l,c,u,d){if(t.numListenersRecursive>0&&(function(h,f,p,m,E,A,g,O,S,T,y,I){if(T?f.listenersImmediate:f.listeners){const N={path:A,pathTypes:g,valueAtPath:O,prevAtPath:S},D=h.get(f);if(D&&A.length>0){const{changes:_}=D;mh(_[0].path,N.path)||(_.push(N),D.level=Math.min(D.level,y),D.whenOptimizedOnlyIf||(D.whenOptimizedOnlyIf=I))}else h.set(f,{level:y,value:E,isFromSync:m,isFromPersist:p,whenOptimizedOnlyIf:I,changes:[N]})}}(e,t,n,r,i,o,s,a,l,c,u,d),t.linkedFromNodes))for(const h of t.linkedFromNodes)go(e,nE(h,o),n,r,a,[],[],a,l,c,0,d);if(t.parent){const h=t.parent;h&&go(e,h,n,r,it(h),[t.key].concat(o),[sh(i)].concat(s),a,l,c,u+1,d)}}function Eh(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!==ll||l&&i<=0)&&(E||d||(d={value:o,isFromPersist:s,isFromSync:a,getPrevious:dl(o,r),changes:r}),m||n.add(A),A(d))}}})}function Ah(){const e=Array.from(mt.dirtyNodes);mt.dirtyNodes.clear(),e.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=ar;ar=new Map;const n=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{go(n,c,s,a,r,[],[],r,i,!1,o,l)}),n.size&&Eh(n,!1)}function gr(e){qo();try{e()}finally{yr()}}function qo(){Ao++,ti||(ti=setTimeout(tE,0))}function yr(e){(--Ao<=0||e)&&(Cs?vs=!0:(ti&&(clearTimeout(ti),ti=void 0),Ao=0,Cs=!0,Ah(),Cs=!1,vs&&(vs=!1,yr(!0))))}function nE(e,t){let n=e;for(let r=0;r<t.length;r++)n=Ae(n,t[r]);return n}function hl(e,t,n,r,i){if(pt(e))return e;const o=Te(e);let s={root:{_:e},lazy:!0,numListenersRecursive:0};X(e)&&(s=Object.assign(()=>{},s),s.lazyFn=e);var a;const l=t||(a=e,Ym.has(typeof a))?new i(s):r(s);return o&&(ze(s,void 0),n(s,e)),l}var er=new WeakMap,gh=[],Dh=[],_h=[],nr=0,Da=!1;function Ns(e,t,n){const r=er.get(e);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(gh[nr]=e,Dh[nr]=t,_h[nr]=n,nr++,Da||(Da=!0,queueMicrotask(rE)))}var Ur={type:"listener-added",node:null,listener:void 0,timestamp:0};function rE(){Da=!1;const e=typeof performance!="undefined"?performance.now():Date.now();Ur.timestamp=e;for(let t=0;t<nr;t++){const n=gh[t],r=Dh[t],i=_h[t],o=er.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){Ur.type=i,Ur.node=n,Ur.listener=r;const u=Array.from(s);for(let d=0;d<u.length;d++)try{u[d](Ur)}catch(h){console.error(`Error in middleware handler for ${i}:`,h)}}}nr=0}function hn(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=it(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 g={trackingType:!0,...n};d=[...d||[],hn(m,E,g,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,iE(m,p,t),f);f.numListenersRecursive++,p=[f.key,...p],f=f.parent}return Ns(e,u,"listener-added"),()=>{c.delete(u),d==null||d.forEach(E=>E());let m=e;for(;m;)m.numListenersRecursive--,m=m.parent;Ns(e,u,"listener-removed"),c.size===0&&Ns(e,void 0,"listeners-cleared")}}function iE(e,t,n){let r=fc(t,[],it(e));return function({value:i,isFromPersist:o,isFromSync:s}){const a=fc(t,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function Ec(e,t,n,r){let i=[];return e==null||e.forEach(o=>{const{node:s,track:a}=o;i.push(hn(s,t,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var eo=0,Ac=[],rr={current:void 0};function no(e,t){if(eo){const n=rr.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 Oh(e,t,n,r,i,o){let s,a,l=t;Ac.push(rr.current),eo++,rr.current={};const c=e&&Ce(e,n,r,i==null?void 0:i.fromComputed),u=rr.current.nodes;return--eo<0&&(eo=0),rr.current=Ac.pop(),r!=null&&r.cancel||(s=Ec(u,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=Ec(u,l),s):void 0),{nodes:u,value:c,dispose:s,resubscribe:a}}function Bt(e,t,n){let r,i;X(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,qo(),delete s.value,i==null||i();const{dispose:l,value:c,nodes:u}=Oh(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),yr(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(d=e)&&((h=d[Ar])!=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 Sh(e,t,n){if(Te(e))return t?e.then(t):e;const r=At(e);let i,o;return Bt(function(s){const a=r?e.map(l=>Ce(l)):Ce(e);if(!Te(a)){{let l=!0;if(At(a))for(let c=0;c<a.length;c++){let u=a[c];pt(u)?u=Ce(u):X(u)&&(u=u()),l=l&&!!(n?mc(u):u)}else l=n?mc(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),Te(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(Te(c)?c.then(u=>u):c)}}else t=s})}function Th(e,t){return Sh(e,t,!1)}var ys=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),gc=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),oE=new Set(["filter","find"]),_a=new Map,Oa=new Map([["get",Jo],["set",ce],["peek",br],["onChange",hn],["assign",function(e,t){const n=Wt(e);if(qo(),Vt(e.root._)&&(e.root._={}),Rt(t)){const r=it(e);Rt(r)?t.forEach((i,o)=>r.set(o,i)):ce(e,t)}else{e.isAssigning=(e.isAssigning||0)+1;try{Object.assign(n,t)}finally{e.isAssigning--}}return yr(),n}],["delete",Ch],["toggle",function(e){const t=it(e);(t==null||rh(t))&&ce(e,!t)}]]);function Rh(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=Wo(e),l=a?e.key:"_";(a?it(e.parent):e.root)[l]=o,Dr((i=e.parent)!=null?i:e,l,t)}return s}Dr(e,t.length+"",r[0])}function pl(e,t,n){var r,i,o;if(Ie(t)&&li(t)||Ie(n)&&li(n)){const T=t!==n;return T&&(e.listeners||e.listenersImmediate)&&ci(e,t,n,0),T}const s=At(t);let a,l;const c=Rt(t),u=Xe(t),d=Rt(n),h=Xe(n),f=ga(t,s,c,u),p=ga(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,g,O,S=!1;if(s&&At(n)){if(n.length>0){const T=n[0];if(T!==void 0&&(A=dh(T,e),A&&(g=X(A),a=new Map,l=[]),e.children))for(let y=0;y<n.length;y++){const I=n[y];if(I){const N=e.children.get(y+"");if(N&&(t[y]||Dc(N,I),A)){const D=g?A(I):I[A];a.set(D,N)}}}}}else if(n&&(!t||Ie(t))){const T=p.length;for(let y=0;y<T;y++){const I=p[y];if(!f.includes(I)){S=!0;const N=Ae(e,I),D=d?n.get(I):n[I];D!==void 0&&Dc(N,D)}}}if(t&&!Vt(t)){S=S||m!==E;const T=S;let y=!1;for(let I=0;I<m;I++){const N=s?I+"":f[I];let D=c?t.get(N):t[N];const _=d?n==null?void 0:n.get(N):n==null?void 0:n[N];let w=!hh(D,_);if(w){const k=A&&D?g?A(D):D[A]:void 0,x=(o=e.children)==null?void 0:o.get(N);if(pt(D)){const M=Ci(D);if((x==null?void 0:x.linkedToNode)===M){const H=it(M);c?t.set(N,H):t[N]=H;continue}const U=D;D=()=>U}let L=Ae(e,N,D);if(L.lazy||!X(D)&&!pt(D)||(yh(L,D),xn(L)),s&&k!==void 0){const M=k!==void 0?a==null?void 0:a.get(k):void 0;if(M){if(M!==void 0&&M.key!==N){const U=n[M.key];T&&(L=M,e.children.delete(L.key),L.key=N,l.push([N,L])),y=!0,w=U!==D}}else S=!0}if(w)if(X(D)||pt(D))Or(e,N,D);else if(Vt(D))S=!0;else{const M=pl(L,D,_);S=S||M,w=M}(w||s&&!T)&&(L.listeners||L.listenersImmediate)&&ci(L,D,_,0,!T)}}if(l)for(let I=0;I<l.length;I++){const[N,D]=l[I];e.children.set(N,D)}O=S||y}else n!==void 0&&(O=!0);return O!=null&&O}function Dc(e,t){var n,r;(n=e.linkedToNodeDispose)==null||n.call(e),(r=e.activatedObserveDispose)==null||r.call(e),Vt(t)||pl(e,void 0,t),(e.listeners||e.listenersImmediate)&&ci(e,void 0,t,0)}function Wt(e,t,n){return t!==void 0&&(e=Ae(e,t,n)),e.proxy||(e.proxy=new Proxy(e,Ih))}function Sa(){if(mt.pendingNodes.size>0){const e=Array.from(mt.pendingNodes.values());mt.pendingNodes.clear(),e.forEach(t=>t())}}var Ih={get(e,t,n){var r,i;if(t===zm)throw new Error("[legend-state] observable is not a primitive.");if(t===Ar)return e;if(t==="apply"||t==="call"){const d=it(e);if(X(d))return d[t]}let o=xn(e,t==="get"||t==="peek");if(t===Gm)return!o||Vt(o)?void 0:o[t];const s=e.linkedToNode||(o==null?void 0:o[Ar]);if(s&&t!=="onChange")return Ih.get(s,t,n);if(Rt(o)||Xe(o)){const d=function(h,f,p){const m=p==null?void 0:p[f];if(f==="size")return no(h,!0),p[f];if(X(m))return function(E,A,g){const O=arguments.length,S=p;if(f==="get"){if(O>0&&typeof E!="boolean"&&E!==ll)return Wt(h,E)}else{if(f==="set")return O===2?ce(Ae(h,E),A):O===1&&Rt(p)&&ce(h,E),Wt(h);if(f==="delete"){if(O>0){const y=p.get?S.get(E):E;return Ch(h,E),y!==void 0}}else{if(f==="clear"){const y=Xe(S)?new Set(S):new Map(S),I=S.size;return S.clear(),void(I&&vh(h,p,y))}if(f==="add"){const y=new Set(p),I=p.add(E);return p.has(f)||ci(h,I,y,0),Wt(h)}}}const T=Oa.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,g)}}}(e,t,o);if(d!==void 0)return d}const a=Oa.get(t);if(a)return t!=="get"&&t!=="peek"||Sa(),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=_a.get(t);if(l)return l.get(e);let c=o==null?void 0:o[t];if(Ie(o)&&li(o))return c;const u=(r=e.functions)==null?void 0:r.get(t);if(u)return pt(u)?u:Wt(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){X(p)&&(p={get:p});const m=function(){return{[ai]:p}};return m.prototype[ai]=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&&(ys.has(t)||gc.has(t))&&(o=[],ys.has(t)&&ze(e,o),c=o[t]),X(c)){if(At(o)){if(ys.has(t))return(...h)=>Rh(e,o,t,...h);if(gc.has(t))return no(e,!0),function(h,f){const p=t==="reduce",m=p?(g,O,S,T)=>h(g,Wt(e,S+"",O),S,T):(g,O,S)=>h(Wt(e,O+"",g),O,S);if(p||!oE.has(t))return o[t](m,f);const E=t==="find",A=[];for(let g=0;g<o.length;g++)if(m(o[g],g,o)){const O=Wt(e,g+"");if(E)return O;A.push(O)}return E?void 0:A}}Or(e,t,c);const d=(i=e.functions)==null?void 0:i.get(t);return d?Wt(e,t,d):c.bind(o)}return Vt(c)&&t==="length"&&At(o)?(no(e,!0),c):Wt(e,t)},getPrototypeOf(e){const t=it(e);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(e){xn(e);const t=Jo(e,!0);if(Vt(t))return[];const n=t?Reflect.ownKeys(t):[];if(At(t)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),X(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=it(e);if(Vt(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 Dr(e,t,n),!0;const r=_a.get(t);return!!r&&(r.set(e,n),!0)},deleteProperty:(e,t)=>!!e.isSetting&&Reflect.deleteProperty(e,t),has(e,t){const n=it(e);return Reflect.has(n,t)},apply(e,t,n){pt(t)&&(t=t.peek());const r=it(e),i=X(r)?r:e.lazyFn||e;return Reflect.apply(i,t,n)}};function ce(e,t){e.parent?Dr(e.parent,e.key,t):Dr(e,"_",t)}function Dr(e,t,n,r){const i=!e.parent&&t==="_";ph(e,n),!e.parent||it(e)||X(n)||ce(e,{[t]:n});const o=i?e:Ae(e,t,n);if(pt(n))Do(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=ze(o,n),c=Vt(a)||a instanceof Date||Vt(s)||s instanceof Date;if(!c){let h=o;do h.needsExtract=!0,h.recursivelyAutoActivated=!1;while(h=h.parent)}const u=!hh(s,a),d=!u&&o.isComputing&&!c&&!o.isPlain;!u&&!d||o.isComputing&&o.isPlain&&e.numListenersRecursive===0||vh(e,s,a,o,l,c,i,r,d),Or(e,t,s)}}function Ch(e,t){t===void 0&&Wo(e)&&(t=e.key,e=e.parent);const n=it(e);At(n)?Rh(e,n,"splice",t,1):Dr(e,t!=null?t:"_",Ko,-1)}function vh(e,t,n,r,i,o,s,a,l){r||(r=e),qo(),o===void 0&&(o=Vt(t));let c,u,d=l||o,h=!1;(!o||n&&!Vt(n))&&(d=d||pl(r,t,n),At(t)?c=t:(Rt(t)||Xe(t))&&(u=t)),At(i)?c=i:(Rt(i)||Xe(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||mo(t)&&!mo(n)?t!==n:d)&&ci(o&&s?e:r,t,n,(a!=null?a:n===void 0)?-1:d?0:1,h),yr()}function _r(e,t,n){const r=e.numGets=(e.numGets||0)+1;e.state||(e.state=hl({isLoaded:!1},!1,_r,Wt)),t.then(i=>{r>=(e.getNumResolved||0)&&(e.getNumResolved=e.numGets,n?n({value:i}):ce(e,i),e.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{e.state.error.set(i)})}function Or(e,t,n){if(Te(n)){const r=Ae(e,t);return _r(r,n),void ze(r,void 0)}if(pt(n)){const r=()=>n;hc(e,t,r);const i=Ae(e,t,r),o=br(Ci(n));return Do(i,n),ze(i,o),it(i)}if(typeof n=="function")return hc(e,t,n),t}function Jo(e,t){return no(e,t?Ie(t)?t.shallow:t:void 0),br(e)}function br(e){return xn(e,!0)}var ji=!1;function xn(e,t){var n;if(ji=!0,t&&((n=e.dirtyChildren)==null?void 0:n.size)){const i=Array.from(e.dirtyChildren);e.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&xn(o))}if(e.dirtyFn){const i=e.dirtyFn;e.dirtyFn=void 0,mt.dirtyNodes.delete(e),i()}ji=!1;let r=it(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,X(c))if(c.length===1)o={};else{if(i.parent){const u=it(i.parent);X(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,g,O=[];function S(){u.dirtyFn=g,mt.dirtyNodes.add(u)}const T=Bt(()=>{var y,I,N,D;if(m)m=!1,X(it(u))&&ze(u,void 0);else if(!ji&&g&&function(L,M){if(!ji&&!function(H){var V,G;let Y=H,nt=H.numListenersRecursive>0;for(;Y&&!nt;)((V=Y.listeners)!=null&&V.size||(G=Y.listenersImmediate)!=null&&G.size)&&(nt=!0),Y=Y.parent;return nt}(L)){M&&(L.dirtyFn=M);let H=L;for(;H;)H.dirtyChildren||(H.dirtyChildren=new Set),H.dirtyChildren.add(L),H=H.parent;return!0}}(u,g))return void(p=!0);let _=E(),w=!1;const k=pt(_);(k||u.linkedToNode)&&(w=k,_=Do(u,_)),X(_)&&_.length===0&&(_=_());const x=k||_==null?void 0:_[ai];if(x&&(u.activationState=x,_=void 0),p=!1,f=Te(_),u.activated){if(u.activationState){const L=u.activationState;(I=(y=u.state)==null?void 0:y.peek())!=null&&I.sync?(u.state.sync(),p=!0):_=(D=(N=L.get)==null?void 0:N.call(L))!=null?D:L.initial}}else{u.activated=!0;let L=sE;x!=null&&x.synced&&(L=mt.activateSyncedNode,p=!0);const M=L(u,_);h=M.update;let U=M.value;!w&&pt(U)&&(U=Do(u,U)),_=U!=null?U:x==null?void 0:x.initial}return p&&(A=_),f=f||Te(_),_},y=>{const{value:I,nodes:N,refresh:D}=y;if(g=D,!p){if(!f||!mt.isLoadingRemote)if(f)if(u.activationState){const{initial:_}=u.activationState;I&&Te(I)&&_r(u,I,h),X(it(u))&&ze(u,_!=null?_:void 0)}else u.activated&&(_r(u,I,h),X(it(u))&&ze(u,void 0));else{A=I;const _=u.state.isLoaded.peek();!_&&X(I)||(u.isComputing=!0,ce(u,I),u.isComputing=!1),_||u.state.assign({isLoaded:!0,error:void 0})}O.forEach(_=>_()),O=[],N==null||N.forEach(({node:_,track:w})=>{O.push(hn(_,S,{immediate:!0,trackingType:w}))})}y.cancel=!0},{fromComputed:!0});return u.activatedObserveDispose=()=>{T==null||T(),O.forEach(y=>y())},A}(i,c)}else pt(o)&&(o=Or(i.parent,i.key,o))}return ph(i,o),!l&&!i.needsExtract||i.isPlain||pt(o)||Vt(o)||(s&&function(c,u){if(!u.recursivelyAutoActivated&&(Ie(c)||At(c))&&!li(c)){u.recursivelyAutoActivated=!0;const d=[];bh(c,d,()=>{var f;let p=u;for(let m=0;m<d.length;m++){const E=d[m],A=(f=it(p))==null?void 0:f[E];p=Ae(p,E,X(A)?A:void 0),xn(p)}return p})}}(o,i),i.parent&&Or(i.parent,i.key,a)),o}(e,r,!!t)),r}function Nh(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 yh(e,t){Nh(e),e.lazyFn=t,e.lazy=!0}function sE(e,t){if(e.state||(e.state=hl({isLoaded:!1},!1,_r,Wt)),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=dl(d,u)),s=[],o=void 0,mt.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)};Sh(e.state.isLoaded,E,!0)}};hn(e,({value:c,changes:u})=>{e.isComputing||(u.length>1||!X(u[0].prevAtPath))&&(o=c,s.length>0&&(u=u.filter(d=>!mh(s[0].path,d.path))),s.push(...u),mt.pendingNodes.set(e,l))},{immediate:!0}),hn(e,l)}}return{update:({value:n})=>{e.isComputing||(e.isComputing=!0,ce(e,n),e.isComputing=!1)},value:t}}function Do(e,t){var n;const r=t?Ci(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=hn(r,()=>{X(t=xn(r))||ce(e,t)},{initial:!0},new Set([e])))),t}function bh(e,t,n){var r;if((Ie(e)||At(e))&&!li(e)&&!oh(e)){for(const i in e)if(al.call(e,i)){const o=e[i];if(pt(o)){const s=n();Or(s,i,o),delete s.lazy}else{const s=X(o)&&((r=o.prototype)==null?void 0:r[ai]);if(s){const a=s.activate;(!a||a==="auto")&&br(Ae(n(),i,o))}}typeof o=="object"&&(t.push(i),bh(o,t,n),t.pop())}}}var _c=["get","set","peek","onChange","toggle"];function lr(e){this._node=e;for(let t=0;t<_c.length;t++){const n=_c[t];this[n]=this[n].bind(this)}}function $i(e,t){lr.prototype[e]=function(...n){return t.call(this,this._node,...n)}}function dt(e){return hl(e,!1,_r,Wt,lr)}$i("peek",e=>(Sa(),br(e))),$i("get",(e,t)=>(Sa(),Jo(e,t))),$i("set",ce),$i("onChange",hn),Object.defineProperty(lr.prototype,Ar,{configurable:!0,get(){return this._node}}),lr.prototype.toggle=function(){const e=this.peek();(e==null||rh(e))&&this.set(!e)},lr.prototype.delete=function(){return this.set(void 0),this};var Zo={createPreviousHandler:dl,clone:ch,deactivateNode:Nh,deepMerge:Eo,ensureNodeValue:cl,findIDKey:dh,get:Jo,getChildNode:Ae,getKeys:ga,getNode:Ci,getNodeValue:it,getPathType:sh,getProxy:Wt,getValueAtPath:function(e,t){return t.reduce(Zm,e)},globalState:mt,initializePathType:ul,ObservablePrimitiveClass:lr,observableProperties:_a,observableFns:Oa,optimized:ll,peek:br,reactivateNode:yh,registerMiddleware:function(e,t,n){let r=er.get(e);r||(r=new Map,er.set(e,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(n),()=>{const o=er.get(e);if(!o)return;const s=o.get(t);s&&(s.delete(n),s.size===0&&(o.delete(t),o.size===0&&er.delete(e)))}},safeParse:lh,safeStringify:ah,set:ce,setAtPath:fh,setNodeValue:ze,symbolLinked:ai,symbolDelete:Ko,tracking:rr},{globalState:Oc,observableProperties:aE,observableFns:lE,ObservablePrimitiveClass:Sc}=Zo;class Lh extends Error{}function Tc(e,t){if(!e)throw new Lh(t!=null?t:"Assertion failed")}const Z=Object.assign(Tc,{is:function(e,t,n){return Tc(t,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(e){throw new Error("Unreachable")},defined:function(e){if(e==null)throw new Lh("Value is not defined")}});class Qo{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new Qo(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 _o=new Qo,Ve=new Qo;function Rc(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 Ic(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=Rc(t,e,"#fff"),r=Rc(t,e,"#000");return r===n&&!r.startsWith("0,0,0,")}function cE(e){const{common:t}=e;return t.conversation.subject?P`
2
2
  <div className="t-title">${t.conversation.subject}</div>
3
3
  <div className="t-subtitle">
4
- <${Ic} ...${e} />
4
+ <${Cc} ...${e} />
5
5
  </div>
6
6
  `:P`<div className="t-title">
7
- <${Ic} ...${e} />
8
- </div>`}function Ic({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?P`
7
+ <${Cc} ...${e} />
8
+ </div>`}function Cc({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?P`
9
9
  <span className="t-participants">
10
10
  ${o.map(({user:s})=>P`
11
11
  <span className="t-participant" key=${s.id}>
@@ -17,7 +17,7 @@
17
17
  </span>
18
18
  `)}
19
19
  </span>
20
- `:P`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function aE({messageStatus:e,common:t}){const{Icon:n}=t.theme;return e==="sending"?P`
20
+ `:P`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function uE({messageStatus:e,common:t}){const{Icon:n}=t.theme;return e==="sending"?P`
21
21
  <span className="t-status-icon">
22
22
  <${n}
23
23
  type="spinner"
@@ -25,7 +25,7 @@
25
25
  common=${t}
26
26
  />
27
27
  </span>
28
- `:e==="sent"?P`<span className="t-status-icon">✓</span>`:e==="everyoneRead"?P`<span className="t-status-icon">✓✓</span>`:null}const lE={attach:function({className:e}){return P`
28
+ `:e==="sent"?P`<span className="t-status-icon">✓</span>`:e==="everyoneRead"?P`<span className="t-status-icon">✓✓</span>`:null}const dE={attach:function({className:e}){return P`
29
29
  <svg
30
30
  className=${e}
31
31
  xmlns="http://www.w3.org/2000/svg"
@@ -43,7 +43,7 @@
43
43
  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"
44
44
  ></path>
45
45
  </svg>
46
- `},chevronLeft:Cc,left:Cc,chevronRight:Nc,right:Nc,chevronUp:vc,up:vc,chevronDown:yc,down:yc,close:function({className:e}){return P`
46
+ `},chevronLeft:vc,left:vc,chevronRight:Nc,right:Nc,chevronUp:yc,up:yc,chevronDown:bc,down:bc,close:function({className:e}){return P`
47
47
  <svg
48
48
  className=${e}
49
49
  xmlns="http://www.w3.org/2000/svg"
@@ -607,7 +607,7 @@
607
607
  <line x1="19" y1="12" x2="5" y2="12"></line>
608
608
  <polyline points="12 19 5 12 12 5"></polyline>
609
609
  </svg>
610
- `}};function Cc({className:e}){return P`
610
+ `}};function vc({className:e}){return P`
611
611
  <svg
612
612
  className=${e}
613
613
  xmlns="http://www.w3.org/2000/svg"
@@ -635,7 +635,7 @@
635
635
  >
636
636
  <polyline fill="none" points="9 6 15 12 9 18"></polyline>
637
637
  </svg>
638
- `}function vc({className:e}){return P`
638
+ `}function yc({className:e}){return P`
639
639
  <svg
640
640
  className=${e}
641
641
  xmlns="http://www.w3.org/2000/svg"
@@ -650,7 +650,7 @@
650
650
  >
651
651
  <polyline fill="none" points="18 15 12 9 6 15"></polyline>
652
652
  </svg>
653
- `}function yc({className:e}){return P`
653
+ `}function bc({className:e}){return P`
654
654
  <svg
655
655
  className=${e}
656
656
  xmlns="http://www.w3.org/2000/svg"
@@ -665,7 +665,7 @@
665
665
  >
666
666
  <polyline fill="none" points="6 9 12 15 18 9"></polyline>
667
667
  </svg>
668
- `}function cE({message:e,common:t}){var s;const n=e.content[0],{theme:r,t:i}=t,{Icon:o}=r;if(n.type==="text")return P`<${Bl}
668
+ `}function hE({message:e,common:t}){var s;const n=e.content[0],{theme:r,t:i}=t,{Icon:o}=r;if(n.type==="text")return P`<${jl}
669
669
  block=${n}
670
670
  message=${e}
671
671
  nonInteractive
@@ -680,11 +680,11 @@
680
680
  ${n.filename}
681
681
  `;if(n.subtype==="voice")return P`
682
682
  <${o} type="microphone" common=${t} />
683
- ${i.VOICE_MESSAGE} (${Wl((s=n.duration)!=null?s:0)})
683
+ ${i.VOICE_MESSAGE} (${Kl((s=n.duration)!=null?s:0)})
684
684
  `;if(n.subtype===void 0)return P`
685
685
  <${o} type="attachment" common=${t} />
686
686
  ${n.filename}
687
- `}return null}function uE({conversation:e}){const{isUnread:t,unreadMessageCount:n}=e;return t?n===0?P`<div className="t-unread-generic-dot" />`:n>999?P`
687
+ `}return null}function pE({conversation:e}){const{isUnread:t,unreadMessageCount:n}=e;return t?n===0?P`<div className="t-unread-generic-dot" />`:n>999?P`
688
688
  <div className="t-unread-dot">
689
689
  <span>999+</span>
690
690
  </div>
@@ -692,9 +692,9 @@
692
692
  <div className="t-unread-dot">
693
693
  <span>${n}</span>
694
694
  </div>
695
- `:null}const hl=Object.freeze(Object.defineProperty({__proto__:null,AfterMessages:function({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?P`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>P`<${r}
695
+ `:null}const fl=Object.freeze(Object.defineProperty({__proto__:null,AfterMessages:function({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?P`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>P`<${r}
696
696
  key=${a.id}
697
- photoUrl=${Rn(a)}
697
+ photoUrl=${Sn(a)}
698
698
  common=${e}
699
699
  />`);return P`
700
700
  <div
@@ -716,7 +716,7 @@
716
716
  </div>
717
717
  `},AudioBlock:function({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return P`
718
718
  <div className="t-theme-audio-block">
719
- <${ko} src=${e.url} filename=${e.filename} />
719
+ <${wo} src=${e.url} filename=${e.filename} />
720
720
 
721
721
  <a className="t-body-text" href=${t} target="_blank">
722
722
  <${r}
@@ -725,7 +725,7 @@
725
725
  common=${n}
726
726
  />
727
727
  <span className="t-filename">${e.filename}</span>
728
- <span className="t-filesize"> (${Jr(e.size)})</span>
728
+ <span className="t-filesize"> (${Zr(e.size)})</span>
729
729
  </a>
730
730
  </div>
731
731
  `},Avatar:function({photoUrl:e}){return P`
@@ -740,33 +740,33 @@
740
740
  <div className="t-image">
741
741
  <${r}
742
742
  conversation=${t}
743
- participants=${uo(t.id,10)}
743
+ participants=${ho(t.id,10)}
744
744
  common=${e.common}
745
745
  />
746
746
  </div>
747
747
 
748
748
  <div className="t-info">
749
- <${sE} ...${e} />
749
+ <${cE} ...${e} />
750
750
  </div>
751
751
  </div>
752
752
  </div>
753
753
  </div>
754
754
  `},CompactMessageContent:function(e){return P`
755
755
  <span className="t-theme-compact-message-content">
756
- <${cE} ...${e} />
756
+ <${hE} ...${e} />
757
757
  </span>
758
758
  `},ConversationImage:function({common:e,conversation:t,participants:n}){const{currentUser:r,theme:i}=e,{Avatar:o,GroupChatImage:s}=i;return t.photoUrl?P`<${o}
759
759
  photoUrl=${t.photoUrl}
760
760
  common=${e}
761
761
  />`:n.length===0?null:n.length===1?P`<${o}
762
- photoUrl=${Rn(r)}
762
+ photoUrl=${Sn(r)}
763
763
  common=${e}
764
764
  />`:n.length===2?P`<${o}
765
- photoUrl=${Rn(n[0].user.id===r.id?n[1].user:n[0].user)}
765
+ photoUrl=${Sn(n[0].user.id===r.id?n[1].user:n[0].user)}
766
766
  common=${e}
767
767
  />`:P`
768
768
  <${s} participants=${n} common=${e} />
769
- `},ConversationListItem:function(e){var g,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=uo(n.id,10),h=d.length>=3,f=(g=u==null?void 0:u.sender)==null?void 0:g.name,p=(O=u==null?void 0:u.editedAt)!=null?O:u==null?void 0:u.createdAt,m=d.filter(R=>R.user.id!==i.id),E=m.length?m:d,A=(S=n.subject)!=null?S:E.map(R=>R.user.name).join(", ");return P`
769
+ `},ConversationListItem:function(e){var g,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=ho(n.id,10),h=d.length>=3,f=(g=u==null?void 0:u.sender)==null?void 0:g.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 P`
770
770
  <div
771
771
  className="t-theme-conversation-list-item"
772
772
  t-unread=${n.unreadMessageCount?"":void 0}
@@ -802,7 +802,7 @@
802
802
  </div>
803
803
  `}
804
804
 
805
- <${uE} ...${e} />
805
+ <${pE} ...${e} />
806
806
  </div>
807
807
  </div>
808
808
  </div>
@@ -815,18 +815,18 @@
815
815
  common=${n}
816
816
  />
817
817
  <span className="t-filename">${e.filename}</span>
818
- <span className="t-filesize"> (${Jr(e.size)})</span>
818
+ <span className="t-filesize"> (${Zr(e.size)})</span>
819
819
  </a>
820
820
  </div>
821
821
  `},GroupChatImage:function({participants:e}){return P`
822
822
  <div className="t-theme-group-chat-image">
823
823
  <div
824
824
  className="t-mini-avatar"
825
- style=${{backgroundImage:`url("${Rn(e[0].user)}")`}}
825
+ style=${{backgroundImage:`url("${Sn(e[0].user)}")`}}
826
826
  ></div>
827
827
  <div
828
828
  className="t-mini-avatar"
829
- style=${{backgroundImage:`url("${Rn(e[1].user)}")`}}
829
+ style=${{backgroundImage:`url("${Sn(e[1].user)}")`}}
830
830
  ></div>
831
831
  ${e.length>2&&P`<svg
832
832
  className="t-counter"
@@ -866,7 +866,7 @@
866
866
  </text>
867
867
  </svg>`}
868
868
  </div>
869
- `},Icon:function({className:e="",type:t}){return P`<${lE[t]} className=${`t-theme-icon ${e}`} />`},ImageBlock:function({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme,i={"--img-w":e.width||1,"--img-h":e.height||1};return P`
869
+ `},Icon:function({className:e="",type:t}){return P`<${dE[t]} className=${`t-theme-icon ${e}`} />`},ImageBlock:function({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme,i={"--img-w":e.width||1,"--img-h":e.height||1};return P`
870
870
  <div className="t-theme-image-block">
871
871
  <a
872
872
  href=${e.url}
@@ -882,10 +882,10 @@
882
882
  <a href=${t} className="t-body-text" target="_blank">
883
883
  <${r} className="download-icon" type="download" common=${n} />
884
884
  <span>${e.filename}</span>
885
- <span className="t-filesize"> (${Jr(e.size)})</span>
885
+ <span className="t-filesize"> (${Zr(e.size)})</span>
886
886
  </a>
887
887
  </div>
888
- `},LocationBlock:function({block:e}){const{imageUrl:t,linkUrl:n}=Xl(e);return P`
888
+ `},LocationBlock:function({block:e}){const{imageUrl:t,linkUrl:n}=Wl(e);return P`
889
889
  <div className="t-theme-location-block">
890
890
  <a
891
891
  href=${n}
@@ -900,7 +900,7 @@
900
900
  >
901
901
  </span>
902
902
  </div>
903
- `},Message:function(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=uo(l.id,3).length>=3,E=t.sender,A=(E==null?void 0:E.id)!==o.id&&m,g=t.referencedMessage,O=n!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage);let S;return S=E?E.id===o.id?"currentUser":"other":"system",P`
903
+ `},Message:function(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=ho(l.id,3).length>=3,E=t.sender,A=(E==null?void 0:E.id)!==o.id&&m,g=t.referencedMessage,O=n!=="sending"&&(r.canReplyToMessage||r.canDeleteMessage);let S;return S=E?E.id===o.id?"currentUser":"other":"system",P`
904
904
  <div
905
905
  className="t-theme-message"
906
906
  t-sender=${S}
@@ -908,7 +908,7 @@
908
908
  >
909
909
  <div className="t-message-row">
910
910
  ${E&&P`<${u}
911
- photoUrl=${Rn(E)}
911
+ photoUrl=${Sn(E)}
912
912
  common=${i}
913
913
  />`}
914
914
 
@@ -916,7 +916,7 @@
916
916
  <!-- in group chats, show the message sender name in a random color -->
917
917
  ${E&&A&&P`<div
918
918
  className="t-message-sender-name"
919
- style=${{color:gm(E.id)}}
919
+ style=${{color:Om(E.id)}}
920
920
  >
921
921
  ${E.name}
922
922
  </div>`}
@@ -925,7 +925,7 @@
925
925
  common=${i}
926
926
  />`}
927
927
 
928
- <${Bf}
928
+ <${jf}
929
929
  common=${i}
930
930
  message=${t}
931
931
  messageStatus=${n}
@@ -933,7 +933,7 @@
933
933
 
934
934
  <div className="t-message-status">
935
935
  <${f} timestamp=${t.createdAt} common=${i} />
936
- ${S=="currentUser"&&P`<${aE} ...${e} />`}
936
+ ${S=="currentUser"&&P`<${uE} ...${e} />`}
937
937
  </div>
938
938
  </div>
939
939
 
@@ -951,7 +951,7 @@
951
951
  ${r.canAddReaction&&P`
952
952
  <${or}
953
953
  className="t-add-reaction-button"
954
- popoverComponent=${Uf}
954
+ popoverComponent=${$f}
955
955
  popoverProps=${{messageId:t.id,colorScheme:"light"}}
956
956
  aria-label=${c.ADD_REACTION}
957
957
  >
@@ -962,18 +962,18 @@
962
962
 
963
963
  ${t.reactions.length>0&&P`
964
964
  <div className="t-emoji-reactions">
965
- ${t.reactions.map(R=>P`
965
+ ${t.reactions.map(T=>P`
966
966
  <button
967
967
  className="t-reaction-button"
968
- t-active=${R.currentUserReacted?"true":void 0}
969
- onClick=${()=>a.toggleReaction(t.id,R.emoji)}
968
+ t-active=${T.currentUserReacted?"true":void 0}
969
+ onClick=${()=>a.toggleReaction(t.id,T.emoji)}
970
970
  disabled=${!r.canAddReaction}
971
- aria-label=${c.ARIA_REACTION_COUNT(R.count,R.emoji)}
972
- aria-pressed=${R.currentUserReacted}
973
- key=${R.emoji}
971
+ aria-label=${c.ARIA_REACTION_COUNT(T.count,T.emoji)}
972
+ aria-pressed=${T.currentUserReacted}
973
+ key=${T.emoji}
974
974
  >
975
- <span className="t-emoji">${R.emoji}</span>
976
- <span className="t-num-reactions">${R.count}</span>
975
+ <span className="t-emoji">${T.emoji}</span>
976
+ <span className="t-num-reactions">${T.count}</span>
977
977
  </button>
978
978
  `)}
979
979
  </div>
@@ -981,19 +981,19 @@
981
981
  </div>
982
982
  `},MessageActionMenu:function(e){const{message:t,permissions:n,common:r}=e,{chatbox:i,t:o}=r;return P` <div className="t-theme-message-action-menu">
983
983
  ${n.canReplyToMessage&&P`
984
- <${on} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(t.id)}>
984
+ <${en} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(t.id)}>
985
985
  ${o.REPLY_TO_MESSAGE}
986
- </${on}>
986
+ </${en}>
987
987
  `}
988
988
  ${n.canEditMessage&&P`
989
- <${on} className="t-menu-item" onSelect=${()=>i.setEditing(t.id)}>
989
+ <${en} className="t-menu-item" onSelect=${()=>i.setEditing(t.id)}>
990
990
  ${o.EDIT_MESSAGE}
991
- </${on}>
991
+ </${en}>
992
992
  `}
993
993
  ${n.canDeleteMessage&&P`
994
- <${on} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(t.id)}>
994
+ <${en} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(t.id)}>
995
995
  ${o.DELETE_MESSAGE}
996
- </${on}>
996
+ </${en}>
997
997
  `}
998
998
  </div>`},MessageDivider:function(e){const{timestamp:t,isReadMarker:n,isDayMarker:r,common:i}=e,{t:o}=i;return P`
999
999
  <div className="t-message-divider">
@@ -1001,7 +1001,7 @@
1001
1001
  <div className="t-line-segment" />
1002
1002
  </div>
1003
1003
  ${r&&P`
1004
- <span className="t-day-marker">${_m(t,o)}</span>
1004
+ <span className="t-day-marker">${Tm(t,o)}</span>
1005
1005
  `}
1006
1006
  <div className="t-line" t-side="right">
1007
1007
  <div className="t-line-segment" />
@@ -1014,11 +1014,11 @@
1014
1014
  <div className="t-theme-message-field" t-mode=${f}>
1015
1015
  ${r.showEmojiPicker&&P`
1016
1016
  <div className="t-emoji-picker-wrapper">
1017
- <${jl} colorScheme="light" />
1017
+ <${Vl} colorScheme="light" />
1018
1018
  </div>
1019
1019
  `}
1020
- <${Wf} />
1021
- <${Am} />
1020
+ <${qf} />
1021
+ <${_m} />
1022
1022
 
1023
1023
  ${n&&P`<${d}
1024
1024
  common=${t}
@@ -1037,7 +1037,7 @@
1037
1037
  `}
1038
1038
  ${l.access==="ReadWrite"&&P`
1039
1039
  <div className="t-textbox-column">
1040
- <${Rf} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
1040
+ <${Cf} placeholder=${c.ENTRYBOX_PLACEHOLDER} />
1041
1041
 
1042
1042
  <div className="t-button-overlay">
1043
1043
  ${m&&P`<button
@@ -1141,9 +1141,9 @@
1141
1141
  </div>
1142
1142
  `},TextBlock:function({block:e,message:t}){return P`
1143
1143
  <div className="t-theme-text-block">
1144
- <${Bl} block=${e} message=${t} />
1144
+ <${jl} block=${e} message=${t} />
1145
1145
  </div>
1146
- `},TimeAgo:function({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=Dm(e,n);return P`
1146
+ `},TimeAgo:function({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=Sm(e,n);return P`
1147
1147
  <span className="t-theme-time-ago">
1148
1148
  <span
1149
1149
  role="time"
@@ -1172,32 +1172,32 @@
1172
1172
  <a href=${t} className="t-body-text" target="_blank">
1173
1173
  <${r} className="download-icon" type="download" common=${n} />
1174
1174
  <span>${e.filename}</span>
1175
- <span className="t-filesize"> (${Jr(e.size)})</span>
1175
+ <span className="t-filesize"> (${Zr(e.size)})</span>
1176
1176
  </a>
1177
1177
  </div>
1178
- `},VoiceBlock:function({block:e}){return P`<${ko}
1178
+ `},VoiceBlock:function({block:e}){return P`<${wo}
1179
1179
  className="t-theme-voice-block"
1180
1180
  src=${e.url}
1181
1181
  filename=${e.filename}
1182
- />`}},Symbol.toStringTag,{value:"Module"})),dE=T.createContext(null),Cs={didCatch:!1,error:null};class bh extends T.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Cs}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(Cs)}}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(Cs))}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=T.createElement(r,l);else{if(i===void 0)throw s;a=i}}return T.createElement(dE.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var $i=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function hE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Lh(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 kh={exports:{}},bc={},Rr=T,pE=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},fE=Rr.useState,mE=Rr.useEffect,EE=Rr.useLayoutEffect,AE=Rr.useDebugValue;function Ns(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pE(e,n)}catch(r){return!0}}var gE=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=fE({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return EE(function(){i.value=n,i.getSnapshot=t,Ns(i)&&o({inst:i})},[e,n,t]),mE(function(){return Ns(i)&&o({inst:i}),e(function(){Ns(i)&&o({inst:i})})},[e]),AE(n),n};bc.useSyncExternalStore=Rr.useSyncExternalStore!==void 0?Rr.useSyncExternalStore:gE,kh.exports=bc;var DE=kh.exports,Lc=!1,Da={inObserver:!1},kc=void 0,_E=()=>kc||(kc=T.createContext(null));function wc(e){const t=Oh(e);if(!T.use)throw t;T.use(t)}function q(e,t){let n;if(Da.inObserver&&ft(e)&&!(t!=null&&t.suspense))return n=ye(e,t),t!=null&&t.suspense&&n===void 0&&wc(e),n;try{const r=T.useContext(_E()),i=T.useMemo(()=>function(l,c){let u,d,h,f,p,m,E=0;const A=()=>{d==null||d();const{value:O,dispose:S,resubscribe:R}=Dh(f,g,l,void 0,void 0,!0);return d=S,h=R,O},g=({value:O})=>{if(c!=null&&c.peek()){const S=m;m=O,S===void 0&&Oh(()=>!c.get(),()=>{const R=m;m=void 0,g({value:R})})}else{let S=l==null?void 0:l.skipCheck;if(!S){const R=A();(R!==p||!Yt(R)&&R===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),DE.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&n===void 0&&wc(e),n}var Mc=typeof Symbol=="function"&&Symbol.for;function wh(e,t,n,r,i){const o=Mc?Symbol.for("react.forward_ref"):typeof T.forwardRef=="function"&&T.forwardRef(p=>null).$$typeof,s=Mc?Symbol.for("react.memo"):typeof T.forwardRef=="function"&&T.memo(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],g={},O=Object.keys(A);for(let S=0;S<O.length;S++){const R=O[S],b=A[R],I=u&&u.has(R);if(R==="children"&&(X(b)||ft(b)))g[R]=q(b,{skipCheck:!0});else if(I||R.startsWith("$")||R.endsWith("$")){const y=I?R:R.endsWith("$")?R.slice(0,-1):R.slice(1),D=i==null?void 0:i[y],_=D&&ft(b);if(g[y]=_&&(D!=null&&D.selector)?D.selector(g,b):q(b),_&&(D.defaultValue!==void 0&&g[y]===void 0&&(g[y]=D.defaultValue),D.handler&&D.getValue)){const w=k=>{var x;b.set(D.getValue(k)),(x=A[D.handler])==null||x.call(A,k)};g[D.handler]=T.useCallback(w,[A[D.handler],i])}I||delete g[R]}else g[R]===void 0&&(g[R]=b)}E[0]=g}return t?q(()=>{Da.inObserver=!0;try{return Reflect.apply(p,m,E)}finally{Da.inObserver=!1}},{skipCheck:!0}):Reflect.apply(p,m,E)}},h=new Proxy(c,d);let f;return a?(f=T.forwardRef(h),f.__legend_proxied=!0):f=h,t||l?T.memo(f):f}var{findIDKey:OE,getNode:SE,optimized:TE}=Ko,xc=new Map;function _a({each:e,optimized:t,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!e)return null;const a=q(()=>e.get(!t||TE));if(!n&&o){const c=T.useRef();c.current=o,n=T.useMemo(()=>{return u=({item$:d,id:h})=>c.current(d,h),wh(u,!0);var u},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let c=xc.get(n);c||(c=T.memo(n),xc.set(n,c)),n=c}if(!a)return null;const l=[];if(Dt(a)){const c=a[0],u=SE(e),d=a.length,h=d>0?u&&OE(c,u)||(c.id!==void 0?"id":c.key!==void 0?"key":void 0):void 0,f=X(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],g={key:E,id:E,item$:A,item:A};l.push(T.createElement(n,r?Object.assign(g,r):g))}}else{const c=It(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(T.createElement(n,r?Object.assign(p,r):p))}}}return l}T.memo(function({children:e}){return q(()=>ye(ye(e)),{skipCheck:!0})},(e,t)=>!t.scoped||e.children===t.children);var Pc=new Map,Fc=new Map;new Proxy({},{get(e,t){if(!e[t]){const n=Pc.get(t)||t,r=T.forwardRef((i,o)=>{const s={...i};return!o||!X(o)&&fo(o)||(s.ref=o),T.createElement(n,s)});e[t]=function(i,o,s){return wh(i,!1,!0,o,s)}(r,[],Fc.get(t))}return e[t]}}),function(e){(function(t){if(Lc)return;Lc=!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)Pc.set(n,e[n]);if(t)for(const n in t)Fc.set(n,t[n])});var RE=(e,t)=>{{const n=T.useRef({num:0});T.useEffect(()=>{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&&X(s))return i.dispose=s,()=>queueMicrotask(o)}},t)}};function Mh(e){return RE(()=>{const t=e();if(!Ce(t))return t},[])}var IE=Mh;function xh(e){return Mh(()=>e)}var CE=xh,{deactivateNode:NE}=Ko;function pe(e,t){var n;const r=T.useRef({});r.current.value=e;const i=t?pe(t):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?X(e)&&e.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),ye(r.current.value)):e;r.current.obs$=mt(o)}return i&&i.set(t),xh(()=>{const o=r.current.obs$;if(o){const s=Ii(o);NE(s)}}),r.current.obs$}function Ir(e,t,n,r){let i;X(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=T.useRef({}),s=r?pe(r):void 0;o.current.selector=e,o.current.reaction=i,s&&s.set(r),IE(()=>_r(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[Ph,Jt]=xe(),[Fh,Ci]=xe(),[Hh]=xe(),[pl,Ni]=xe(),[vE,yE]=xe(),[Bh,nt]=xe(),[Uh,vi]=xe(),[jh,$h]=xe(),[Vh,bE]=xe(),[LE,fl]=xe();function xe(){const e=T.createContext(void 0);return[e,()=>{const t=T.useContext(e);return lt(t!==void 0),t}]}const cr={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"}},Hc={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:cr,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:"退出回覆模式"}}},Yh=()=>{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},Bc=(e,t)=>{const n=Yh();return n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data},kE=e=>!e.includes("‍")||Yh().measureText(e).width<160,wE=(e,t)=>{const n=[...e].join(",");return n===[...t].join(",")&&!n.startsWith("0,0,0,")};function zh(e){try{return function(t){const n=Bc(t,"#000"),r=Bc(t,"#fff"),i=kE(t);return n&&r&&i&&wE(n,r)}(e)}catch(t){return!0}}var Qd;const Gh=(Qd=globalThis.window)!=null&&Qd.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(zh(t))return n}():0;class Xh{constructor(t,n){this.currentUser$=mt(null),this.app$=mt(null),this.appId$=mt(null),this.extUserId$=mt(null),this.authTokenState$=mt("idle"),this.themeCustom$=mt(hc({value:void 0})),this.device$=mt({supportsEmojiPicker:!!Gh,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=mt({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.locale$=mt(()=>{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$=mt(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Hc[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Hc[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ge.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...cr.translation,locale:"en-US"},emojiPickerTranslationUrl:cr.emojiPickerTranslationUrl,emojiDataUrl:cr.emojiDataUrl})}(this.locale$.get())),this.t$=mt(()=>this.translationData$.strings.get()),Dr(()=>{this.appId$.set(t),this.extUserId$.set(n)})}updateThemeCustom(t){this.themeCustom$.set(hc({value:t}))}listenForErrors(t,n){this.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const r=t.onError(s=>{Ge.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 ME={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Wh extends Xh{constructor(t,n){super(t,n),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=mt({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 lt.defined(r),lt.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();lt.defined(r);const i=this.state$.userPermissions.get(),o={...ME,...i},s={canReplyToMessage:Qe(r.messages.reply,!0),canEditMessage:Qe(r.messages.edit,!0),canDeleteMessage:Qe(r.messages.delete,!0),canAddReaction:Qe(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:Qe(r.messages.reply,!1),canEditMessage:Qe(r.messages.edit,!1),canDeleteMessage:Qe(r.messages.delete,!1),canAddReaction:Qe(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=mt(()=>{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$=mt(()=>{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 g=E.size+","+E.filename,O=this.state$.localFileBlobUrls.child(r).child(g).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),g=u&&A!==u,O=E.getTime()>i,S=!(!d||O||c!=null&&c.id.startsWith("ephemeral"));(S||g)&&h.push(new Oa({id:"border-before-"+m.id,isDayMarker:!!g,isReadMarker:!!S,timestamp:g?u:void 0})),h.push(m),d=O,u=A,c=m}return function(m,E){const A=[];let g=[];const O=Symbol("NO_KEY");let S=O;for(const R of m){const b=E(R);S===O||S===b?g.push(R):(A.push(g),g=[R]),S=b}return g.length!==0&&A.push(g),A}(h,m=>{var E;return m instanceof Oa?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){Dr(()=>{var l;const i=n.reduce((c,u)=>(c[u.id]=u,c),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();lt(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 Qe(e,t){return e==="all"||e==="own"&&t||e==="other"&&!t}class Oa{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 Re(e,t=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Re(i.children)+"*";case"italic":return"_"+Re(i.children)+"_";case"strikethrough":return"~"+Re(i.children)+"~";case"blockquote":return Re(i.children).split(`
1182
+ />`}},Symbol.toStringTag,{value:"Module"})),fE=R.createContext(null),bs={didCatch:!1,error:null};class kh extends R.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=bs}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(bs)}}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(bs))}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=R.createElement(r,l);else{if(i===void 0)throw s;a=i}}return R.createElement(fE.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Vi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function mE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wh(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 Mh={exports:{}},Lc={},Sr=R,EE=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},AE=Sr.useState,gE=Sr.useEffect,DE=Sr.useLayoutEffect,_E=Sr.useDebugValue;function Ls(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!EE(e,n)}catch(r){return!0}}var OE=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=AE({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return DE(function(){i.value=n,i.getSnapshot=t,Ls(i)&&o({inst:i})},[e,n,t]),gE(function(){return Ls(i)&&o({inst:i}),e(function(){Ls(i)&&o({inst:i})})},[e]),_E(n),n};Lc.useSyncExternalStore=Sr.useSyncExternalStore!==void 0?Sr.useSyncExternalStore:OE,Mh.exports=Lc;var SE=Mh.exports,kc=!1,Ta={inObserver:!1},wc=void 0,TE=()=>wc||(wc=R.createContext(null));function Mc(e){const t=Th(e);if(!R.use)throw t;R.use(t)}function K(e,t){let n;if(Ta.inObserver&&pt(e)&&!(t!=null&&t.suspense))return n=Ce(e,t),t!=null&&t.suspense&&n===void 0&&Mc(e),n;try{const r=R.useContext(TE()),i=R.useMemo(()=>function(l,c){let u,d,h,f,p,m,E=0;const A=()=>{d==null||d();const{value:O,dispose:S,resubscribe:T}=Oh(f,g,l,void 0,void 0,!0);return d=S,h=T,O},g=({value:O})=>{if(c!=null&&c.peek()){const S=m;m=O,S===void 0&&Th(()=>!c.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!==p||!Vt(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),SE.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&n===void 0&&Mc(e),n}var xc=typeof Symbol=="function"&&Symbol.for;function xh(e,t,n,r,i){const o=xc?Symbol.for("react.forward_ref"):typeof R.forwardRef=="function"&&R.forwardRef(p=>null).$$typeof,s=xc?Symbol.for("react.memo"):typeof R.forwardRef=="function"&&R.memo(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],g={},O=Object.keys(A);for(let S=0;S<O.length;S++){const T=O[S],y=A[T],I=u&&u.has(T);if(T==="children"&&(X(y)||pt(y)))g[T]=K(y,{skipCheck:!0});else if(I||T.startsWith("$")||T.endsWith("$")){const N=I?T:T.endsWith("$")?T.slice(0,-1):T.slice(1),D=i==null?void 0:i[N],_=D&&pt(y);if(g[N]=_&&(D!=null&&D.selector)?D.selector(g,y):K(y),_&&(D.defaultValue!==void 0&&g[N]===void 0&&(g[N]=D.defaultValue),D.handler&&D.getValue)){const w=k=>{var x;y.set(D.getValue(k)),(x=A[D.handler])==null||x.call(A,k)};g[D.handler]=R.useCallback(w,[A[D.handler],i])}I||delete g[T]}else g[T]===void 0&&(g[T]=y)}E[0]=g}return t?K(()=>{Ta.inObserver=!0;try{return Reflect.apply(p,m,E)}finally{Ta.inObserver=!1}},{skipCheck:!0}):Reflect.apply(p,m,E)}},h=new Proxy(c,d);let f;return a?(f=R.forwardRef(h),f.__legend_proxied=!0):f=h,t||l?R.memo(f):f}var{findIDKey:RE,getNode:IE,optimized:CE}=Zo,Pc=new Map;function Ra({each:e,optimized:t,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!e)return null;const a=K(()=>e.get(!t||CE));if(!n&&o){const c=R.useRef();c.current=o,n=R.useMemo(()=>{return u=({item$:d,id:h})=>c.current(d,h),xh(u,!0);var u},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let c=Pc.get(n);c||(c=R.memo(n),Pc.set(n,c)),n=c}if(!a)return null;const l=[];if(At(a)){const c=a[0],u=IE(e),d=a.length,h=d>0?u&&RE(c,u)||(c.id!==void 0?"id":c.key!==void 0?"key":void 0):void 0,f=X(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],g={key:E,id:E,item$:A,item:A};l.push(R.createElement(n,r?Object.assign(g,r):g))}}else{const c=Rt(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(R.createElement(n,r?Object.assign(p,r):p))}}}return l}R.memo(function({children:e}){return K(()=>Ce(Ce(e)),{skipCheck:!0})},(e,t)=>!t.scoped||e.children===t.children);var Fc=new Map,Hc=new Map;new Proxy({},{get(e,t){if(!e[t]){const n=Fc.get(t)||t,r=R.forwardRef((i,o)=>{const s={...i};return!o||!X(o)&&mo(o)||(s.ref=o),R.createElement(n,s)});e[t]=function(i,o,s){return xh(i,!1,!0,o,s)}(r,[],Hc.get(t))}return e[t]}}),function(e){(function(t){if(kc)return;kc=!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)Fc.set(n,e[n]);if(t)for(const n in t)Hc.set(n,t[n])});var vE=(e,t)=>{{const n=R.useRef({num:0});R.useEffect(()=>{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&&X(s))return i.dispose=s,()=>queueMicrotask(o)}},t)}};function Ph(e){return vE(()=>{const t=e();if(!Te(t))return t},[])}var NE=Ph;function Fh(e){return Ph(()=>e)}var yE=Fh,{deactivateNode:bE}=Zo;function ue(e,t){var n;const r=R.useRef({});r.current.value=e;const i=t?ue(t):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?X(e)&&e.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),Ce(r.current.value)):e;r.current.obs$=dt(o)}return i&&i.set(t),Fh(()=>{const o=r.current.obs$;if(o){const s=Ci(o);bE(s)}}),r.current.obs$}function Tr(e,t,n,r){let i;X(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=R.useRef({}),s=r?ue(r):void 0;o.current.selector=e,o.current.reaction=i,s&&s.set(r),NE(()=>Bt(a=>{var l;return s==null||s.get(),Ce((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[Hh,qt]=ke(),[Bh,vi]=ke(),[Uh]=ke(),[ml,Ni]=ke(),[LE,kE]=ke(),[jh,et]=ke(),[$h,yi]=ke(),[Vh,Yh]=ke(),[zh,wE]=ke(),[ME,El]=ke();function ke(){const e=R.createContext(void 0);return[e,()=>{const t=R.useContext(e);return Z(t!==void 0),t}]}const cr={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"}},Bc={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:cr,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:"退出回覆模式"}}},Gh=()=>{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},Uc=(e,t)=>{const n=Gh();return n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data},xE=e=>!e.includes("‍")||Gh().measureText(e).width<160,PE=(e,t)=>{const n=[...e].join(",");return n===[...t].join(",")&&!n.startsWith("0,0,0,")};function Xh(e){try{return function(t){const n=Uc(t,"#000"),r=Uc(t,"#fff"),i=xE(t);return n&&r&&i&&PE(n,r)}(e)}catch(t){return!0}}var eh;const Wh=(eh=globalThis.window)!=null&&eh.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(Xh(t))return n}():0;class Kh{constructor(t,n){this.currentUser$=dt(null),this.app$=dt(null),this.appId$=dt(null),this.extUserId$=dt(null),this.hasTokenFetcher$=dt(!1),this.authTokenState$=dt("idle"),this.themeCustom$=dt(pc({value:void 0})),this.device$=dt({supportsEmojiPicker:!!Wh,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=dt({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.locale$=dt(()=>{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$=dt(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Bc[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Bc[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Ve.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...cr.translation,locale:"en-US"},emojiPickerTranslationUrl:cr.emojiPickerTranslationUrl,emojiDataUrl:cr.emojiDataUrl})}(this.locale$.get())),this.t$=dt(()=>this.translationData$.strings.get()),gr(()=>{this.appId$.set(t),this.extUserId$.set(n)})}updateThemeCustom(t){this.themeCustom$.set(pc({value:t}))}}const FE={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class qh extends Kh{constructor(t,n){super(t,n),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=dt({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 Z.defined(r),Z.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();Z.defined(r);const i=this.state$.userPermissions.get(),o={...FE,...i},s={canReplyToMessage:qe(r.messages.reply,!0),canEditMessage:qe(r.messages.edit,!0),canDeleteMessage:qe(r.messages.delete,!0),canAddReaction:qe(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:qe(r.messages.reply,!1),canEditMessage:qe(r.messages.edit,!1),canDeleteMessage:qe(r.messages.delete,!1),canAddReaction:qe(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=dt(()=>{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$=dt(()=>{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 g=E.size+","+E.filename,O=this.state$.localFileBlobUrls.child(r).child(g).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),g=u&&A!==u,O=E.getTime()>i,S=!(!d||O||c!=null&&c.id.startsWith("ephemeral"));(S||g)&&h.push(new Ia({id:"border-before-"+m.id,isDayMarker:!!g,isReadMarker:!!S,timestamp:g?u:void 0})),h.push(m),d=O,u=A,c=m}return function(m,E){const A=[];let g=[];const O=Symbol("NO_KEY");let S=O;for(const T of m){const y=E(T);S===O||S===y?g.push(T):(A.push(g),g=[T]),S=y}return g.length!==0&&A.push(g),A}(h,m=>{var E;return m instanceof Ia?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){gr(()=>{var l;const i=n.reduce((c,u)=>(c[u.id]=u,c),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();Z(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 qe(e,t){return e==="all"||e==="own"&&t||e==="other"&&!t}class Ia{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 Oe(e,t=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+Oe(i.children)+"*";case"italic":return"_"+Oe(i.children)+"_";case"strikethrough":return"~"+Oe(i.children)+"~";case"blockquote":return Oe(i.children).split(`
1183
1183
  `).map(o=>"> "+o).join(`
1184
1184
  `)+`
1185
1185
  `;case"autolink":case"autoLink":case"suppressed":case"emoji":return i.text;case"codeblock":case"codeBlock":return"```"+i.language+`
1186
- `+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}|${Re(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}|${Re(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
1187
- `+Re(i.children);case"bulletpoint":case"bulletPoint":return"- "+Re(i.children)+`
1188
- `}}).join("")}(e,t).trim()}class Uc{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 vt(e){this.content=e}function Kh(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=Kh(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function qh(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=qh(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}else n-=l,r-=l}}vt.prototype={constructor:vt,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 vt(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 vt(n)},addToStart:function(e,t){return new vt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new vt(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 vt(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=vt.from(e)).size?new vt(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=vt.from(e)).size?new vt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=vt.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}},vt.from=function(e){if(e instanceof vt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new vt(t)};class B{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 B(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 B(r,i)}cutByIndex(t,n){return t==n?B.empty:t==0&&n==this.content.length?this:new B(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 B(i,o)}addToStart(t){return new B([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new B(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 Kh(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return qh(this,t,n,r)}findIndex(t){if(t==0)return Vi(0,t);if(t==this.size)return Vi(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?Vi(n+1,i):Vi(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 B.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new B(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return B.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 B(n||t,r)}static from(t){if(!t)return B.empty;if(t instanceof B)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new B([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}B.empty=new B([],0);const vs={index:0,offset:0};function Vi(e,t){return vs.index=e,vs.offset=t,vs}function _o(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(!_o(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!_o(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class tt{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&&_o(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 tt.none;if(t instanceof tt)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}tt.none=[];class Oo 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=Zh(this.content,t+this.openStart,n);return r&&new $(r,this.openStart,this.openEnd)}removeBetween(t,n){return new $(Jh(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 $(B.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 Jh(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(Jh(o.content,t-i-1,n-i-1)))}function Zh(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=Zh(s.content,t-o-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function xE(e,t,n){if(n.openStart>e.depth)throw new Oo("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Oo("Inconsistent open depths");return Qh(e,t,n,0)}function Qh(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=Qh(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(B.from(d));return{start:d.resolveNoCache(l.openStart+u),end:d.resolveNoCache(d.content.size-l.openEnd-u)}}(n,e);return Ln(o,ep(e,s,a,t,r))}{let s=e.parent,a=s.content;return Ln(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}}return Ln(o,So(e,t,r))}function tp(e,t){if(!t.type.compatibleContent(e.type))throw new Oo("Cannot join "+t.type.name+" onto "+e.type.name)}function Sa(e,t,n){let r=e.node(n);return tp(r,t.node(n)),r}function bn(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 ti(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&&(bn(e.nodeAfter,r),o++));for(let a=o;a<s;a++)bn(i.child(a),r);t&&t.depth==n&&t.textOffset&&bn(t.nodeBefore,r)}function Ln(e,t){return e.type.checkContent(t),e.copy(t)}function ep(e,t,n,r,i){let o=e.depth>i&&Sa(e,t,i+1),s=r.depth>i&&Sa(n,r,i+1),a=[];return ti(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(tp(o,s),bn(Ln(o,ep(e,t,n,r,i+1)),a)):(o&&bn(Ln(o,So(e,t,i+1)),a),ti(t,n,i,a),s&&bn(Ln(s,So(n,r,i+1)),a)),ti(r,null,i,a),new B(a)}function So(e,t,n){let r=[];return ti(null,e,n,r),e.depth>n&&bn(Ln(Sa(e,t,n+1),So(e,t,n+1)),r),ti(t,null,n,r),new B(r)}$.empty=new $(B.empty,0,0);class ci{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 tt.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 HE(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 ci(n,r,o)}static resolveCached(t,n){let r=jc.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 jc.set(t,r=new PE);let i=r.elts[r.i]=ci.resolve(t,n);return r.i=(r.i+1)%FE,i}}class PE{constructor(){this.elts=[],this.i=0}}const FE=12,jc=new WeakMap;class HE{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 BE=Object.create(null);let kn=class Ta{constructor(t,n,r,i=tt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||B.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&&_o(this.attrs,n||t.defaultAttrs||BE)&&tt.sameSet(this.marks,r||tt.none)}copy(t=null){return t==this.content?this:new Ta(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Ta(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 xE(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 ci.resolveCached(this,t)}resolveNoCache(t){return ci.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()+")"),np(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=B.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=tt.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(!tt.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=B.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};kn.prototype.text=void 0;class To extends kn{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):np(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 To(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new To(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 np(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Pn{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new UE(t,n);if(r.next==null)return Pn.empty;let i=rp(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Vc(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]);Vc(s,p).forEach(E=>{m||u.push([f,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[c.join(",")]=new Pn(c.indexOf(s.length-1)>-1);for(let h=0;h<u.length;h++){let f=u[h][1].sort(ip);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 B.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(`
1189
- `)}}Pn.empty=new Pn(!0);class UE{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 rp(e){let t=[];do t.push(jE(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function jE(e){let t=[];do t.push($E(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function $E(e){let t=function(n){if(n.eat("(")){let r=rp(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=VE(e,t)}return t}function $c(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function VE(e,t){let n=$c(e),r=n;return e.eat(",")&&(r=e.next!="}"?$c(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ip(e,t){return t-e}function Vc(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(ip)}function op(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 sp(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 ap(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 lp(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new YE(e,r,t[r]);return n}let Yc=class cp{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=lp(t,r.attrs),this.defaultAttrs=op(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==Pn.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:sp(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new kn(this,this.computeAttrs(t),B.from(n),tt.setFrom(r))}createChecked(t=null,n,r){return n=B.from(n),this.checkContent(n),new kn(this,this.computeAttrs(t),n,tt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),(n=B.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(B.empty,!0);return o?new kn(this,t,n.append(o),tt.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){ap(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:tt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new cp(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 YE{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 Jo{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=lp(t,i.attrs),this.excluded=null;let o=op(this.attrs);this.instance=o?new tt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new tt(this,sp(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new Jo(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){ap(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}function zc(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 ui{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 Wc(this,n,!1);return r.addAll(t,tt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Wc(this,n,!0);return r.addAll(t,tt.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(GE(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=Kc(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=Kc(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new ui(t,ui.schemaRules(t)))}}const up={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},zE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Gc={ol:!0,ul:!0};function Xc(e,t,n){return t!=null?(t?1:0)|(t==="full"?2:0):e&&e.whitespace=="pre"?3:-5&n}class ys{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=tt.none,this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(B.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=B.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(B.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&&!up.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Wc{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=Xc(null,n.preserveWhitespace,0)|(r?4:0);i=o?new ys(o.type,o.attrs,tt.none,!0,n.topMatch||o.type.contentMatch,s):new ys(r?null:t.schema.topNodeType,null,tt.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,`
1190
- `);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();Gc.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&&Gc.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:zE.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(up.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(`
1191
- `),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=tt.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):qc(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=Xc(t,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=tt.none;return r=r.filter(c=>!(s.type?s.type.allowsMarkType(c.type):qc(c.type,t))||(l=c.addToSet(l),!1)),this.nodes.push(new ys(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 GE(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Kc(e){let t={};for(let n in e)t[n]=e[n];return t}function qc(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 kr{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=bs(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}=no(bs(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&&no(bs(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return no(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new kr(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Jc(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Jc(t.marks)}}function Jc(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function bs(e){return e.document||window.document}const Zc=new WeakMap;function XE(e){let t=Zc.get(e);return t===void 0&&Zc.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 no(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=XE(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}=no(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 dp=Math.pow(2,16);function WE(e,t){return e+t*dp}function Qc(e){return 65535&e}class Ra{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 ne{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&ne.empty)return ne.empty}recover(t){let n=0,r=Qc(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))/dp}(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:WE(a/3,t-l),p=t==l?2:t==d?1:4;return(n<0?t!=l:t!=d)&&(p|=8),new Ra(h,p,f)}i+=u-c}return r?t+i:new Ra(t+i,0,null)}touches(t,n){let r=0,i=Qc(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 ne(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?ne.empty:new ne(t<0?[0,-t,0]:[0,0,t])}}ne.empty=new ne([]);class di{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 di(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 di;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 Ra(t,i,null)}}const Ls=Object.create(null);class Ft{getMap(){return ne.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ls[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 Ls)throw new RangeError("Duplicate use of step JSON ID "+t);return Ls[t]=n,n.prototype.jsonID=t,n}}class gt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new gt(t,null)}static fail(t){return new gt(null,t)}static fromReplace(t,n,r,i){try{return gt.ok(t.replace(n,r,i))}catch(o){if(o instanceof Oo)return gt.fail(o.message);throw o}}}function ml(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(ml(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return B.fromArray(r)}class ln extends Ft{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 $(ml(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 gt.fromReplace(t,this.from,this.to,o)}invert(){return new Ne(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 ln(n.pos,r.pos,this.mark)}merge(t){return t instanceof ln&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ln(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 ln(n.from,n.to,t.markFromJSON(n.mark))}}Ft.jsonID("addMark",ln);class Ne extends Ft{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 $(ml(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return gt.fromReplace(t,this.from,this.to,r)}invert(){return new ln(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 Ne(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ne&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ne(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 Ne(n.from,n.to,t.markFromJSON(n.mark))}}Ft.jsonID("removeMark",Ne);class cn extends Ft{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return gt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return gt.fromReplace(t,this.pos,this.pos+1,new $(B.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 cn(this.pos,n.marks[i]);return new cn(this.pos,this.mark)}}return new Fn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new cn(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 cn(n.pos,t.markFromJSON(n.mark))}}Ft.jsonID("addNodeMark",cn);class Fn extends Ft{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return gt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return gt.fromReplace(t,this.pos,this.pos+1,new $(B.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new cn(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fn(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 Fn(n.pos,t.markFromJSON(n.mark))}}Ft.jsonID("removeNodeMark",Fn);class bt extends Ft{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&Ia(t,this.from,this.to)?gt.fail("Structure replace would overwrite content"):gt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new ne([this.from,this.to-this.from,this.slice.size])}invert(t){return new bt(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 bt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof bt)||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 bt(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 bt(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 bt(n.from,n.to,$.fromJSON(t,n.slice),!!n.structure)}}Ft.jsonID("replace",bt);class re extends Ft{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&&(Ia(t,this.from,this.gapFrom)||Ia(t,this.gapTo,this.to)))return gt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return gt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?gt.fromReplace(t,this.from,this.to,r):gt.fail("Content does not fit in gap")}getMap(){return new ne([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 re(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 re(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 re(n.from,n.to,n.gapFrom,n.gapTo,$.fromJSON(t,n.slice),n.insert,!!n.structure)}}function Ia(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 ks(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 Ne(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 $(B.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new bt(a+h.index,a+h.index+h[0].length,f))}}else s.push(new bt(a,u,$.empty));a=u}if(!r.validEnd){let l=r.fillBefore(B.empty,!0);e.replace(a,a,new $(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function KE(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function El(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||!KE(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function tu(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 eu(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(`
1192
- `))}})}function ro(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 nu(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 Al(e,t,n=t,r=$.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return hp(i,o,r)?new bt(t,n,r):new qE(i,o,r).fit()}function hp(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ft.jsonID("replaceAround",re);class qE{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=B.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=B.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 re(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new bt(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=ws(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(B.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=ws(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=ws(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new $(Yr(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new $(Yr(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(pp(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=zr(this.placed,n,B.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 $(Yr(s.content,t-1,1),t-1,f<0?s.openEnd:t-1):new $(Yr(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||!Ms(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=Ms(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Ms(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=zr(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=zr(this.placed,this.depth,B.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(B.empty,!0);t.childCount&&(this.placed=zr(this.placed,this.frontier.length,t))}}function Yr(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Yr(e.firstChild.content,t-1,n)))}function zr(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(zr(e.lastChild.content,t-1,n)))}function ws(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function pp(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,pp(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(B.empty,!0)))),e.copy(r)}function Ms(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 JE(e){return e.spec.defining||e.spec.definingForContent}function fp(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(fp(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(B.empty,!0))}return e}function ru(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 ur extends Ft{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 gt.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 gt.fromReplace(t,this.pos,this.pos+1,new $(B.from(i),0,n.isLeaf?0:1))}getMap(){return ne.empty}invert(t){return new ur(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 ur(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 ur(n.pos,n.attr,n.value)}}Ft.jsonID("attr",ur);class hi extends Ft{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 gt.ok(r)}getMap(){return ne.empty}invert(t){return new hi(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 hi(n.attr,n.value)}}Ft.jsonID("docAttr",hi);let Gr=class extends Error{};Gr=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(Gr.prototype=Object.create(Error.prototype)).constructor=Gr,Gr.prototype.name="TransformError";class ZE{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new di}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Gr(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=Al(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new $(B.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(hp(l,c,a))return i.step(new bt(o,s,a));let u=ru(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 g=l.node(E).type.spec;if(g.defining||g.definingAsContext||g.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 g=E.firstChild;if(f.push(g),A==a.openStart)break;E=g.content}for(let E=p-1;E>=0;E--){let A=f[E],g=JE(A.type);if(g&&!A.sameMarkup(l.node(Math.abs(d)-1)))p=E;else if(g||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+p+1)%(a.openStart+1),g=f[A];if(g)for(let O=0;O<u.length;O++){let S=u[(O+h)%u.length],R=!0;S<0&&(R=!1,S=-S);let b=l.node(S-1),I=l.index(S-1);if(b.canReplaceWith(I,I,g.type,g.marks))return i.replace(l.before(S),R?c.after(S):s,new $(fp(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 $(B.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=ru(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=B.empty,p=0;for(let A=l,g=!1;A>o;A--)g||s.index(A)>0?(g=!0,f=B.from(s.node(A).copy(f)),p++):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 re(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);eu(r,f.node(),f.before(),u)}c.inlineContent&&ks(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 bt(h,d.map(i+o,-1),$.empty,!0)),s===!0){let f=r.doc.resolve(h);tu(r,f.node(),f.before(),r.steps.length)}}(this,t,n),this}wrap(t,n){return function(r,i,o){let s=B.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=B.from(o[c].type.create(o[c].attrs,s))}let a=i.start,l=i.end;r.step(new re(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),g=A.index();return A.parent.canReplaceWith(g,g+1,E)}(o.doc,o.mapping.slice(u).map(h),l)){let p=null;if(l.schema.linebreakReplacement){let g=l.whitespace=="pre",O=!!l.contentMatch.matchType(l.schema.linebreakReplacement);g&&!O?p=!1:!g&&O&&(p=!0)}p===!1&&eu(o,d,h,u),ks(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 re(E,A,E+1,A-1,new $(B.from(l.create(f,null,d.marks)),0,0),1,!0)),p===!0&&tu(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 re(s,s+u.nodeSize,s+1,s+u.nodeSize-1,new $(B.from(d),0,0),1,!0))}(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ur(t,n,r)),this}setDocAttribute(t,n){return this.step(new hi(t,n)),this}addNodeMark(t,n){return this.step(new cn(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 tt)n.isInSet(r.marks)&&this.step(new Fn(t,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new Fn(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=B.empty,u=B.empty;for(let d=l.depth,h=l.depth-s,f=s-1;d>h;d--,f--){c=B.from(l.node(d).copy(c));let p=a&&a[f];u=B.from(p?p.type.create(p.attrs,u):l.node(d).copy(u))}i.step(new bt(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),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:u.push(l=new Ne(E,A,m[O])));c&&c.to==E?c.to=A:d.push(c=new ln(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 Jo){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 g=l[A];g.step==c-1&&E.eq(l[A].style)&&(m=g)}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 Ne(u.from,u.to,u.style)))}(this,t,n,r),this}clearIncompatible(t,n,r){return ks(this,t,n,r),this}}const xs=Object.create(null);class Q{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new QE(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&&su(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),su(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Z(t):Jn(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?Jn(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):Jn(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 se(t.node(0))}static atStart(t){return Jn(t,t,0,0,1)||new se(t)}static atEnd(t){return Jn(t,t,t.content.size,t.childCount,-1)||new se(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=xs[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 xs)throw new RangeError("Duplicate use of selection JSON ID "+t);return xs[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Z.between(this.$anchor,this.$head).getBookmark()}}Q.prototype.visible=!0;class QE{constructor(t,n){this.$from=t,this.$to=n}}let iu=!1;function ou(e){iu||e.parent.inlineContent||(iu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Z extends Q{constructor(t,n=t){ou(t),ou(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 Q.near(r);let i=t.resolve(n.map(this.anchor));return new Z(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 Z&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Zo(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 Z(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=Q.findFrom(n,r,!0)||Q.findFrom(n,-r,!0);if(!o)return Q.near(n,r);n=o.$head}return t.parent.inlineContent||(i==0||(t=(Q.findFrom(t,-r,!0)||Q.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0)&&(t=n),new Z(t,n)}}Q.jsonID("text",Z);class Zo{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Zo(t.map(this.anchor),t.map(this.head))}resolve(t){return Z.between(t.resolve(this.anchor),t.resolve(this.head))}}class G extends Q{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?Q.near(o):new G(o)}content(){return new $(B.from(this.node),0,0)}eq(t){return t instanceof G&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new gl(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new G(t.resolve(n.anchor))}static create(t,n){return new G(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}G.prototype.visible=!1,Q.jsonID("node",G);class gl{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new Zo(r,r):new gl(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&G.isSelectable(r)?new G(n):Q.near(n)}}class se extends Q{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=Q.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new se(t)}map(t){return new se(t)}eq(t){return t instanceof se}getBookmark(){return tA}}Q.jsonID("all",se);const tA={map(){return this},resolve:e=>new se(e)};function Jn(e,t,n,r,i,o=!1){if(t.inlineContent)return Z.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&&G.isSelectable(a))return G.create(e,n-(i<0?a.nodeSize:0))}else{let l=Jn(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function su(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof bt||o instanceof re)&&(e.mapping.maps[r].forEach((s,a,l,c)=>{i==null&&(i=c)}),e.setSelection(Q.near(e.doc.resolve(i),n)))}class eA extends ZE{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 tt.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)||tt.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(Q.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 au(e,t){return t&&e?e.bind(t):e}class Xr{constructor(t,n,r){this.name=t,this.init=au(n.init,r),this.apply=au(n.apply,r)}}const nA=[new Xr("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Xr("selection",{init:(e,t)=>e.selection||Q.atStart(t.doc),apply:e=>e.selection}),new Xr("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Xr("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class Ps{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=nA.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 Xr(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 eA(this)}static create(t){let n=new Ps(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 Ps(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 Ps(t.schema,t.plugins),o=new rr(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=kn.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=Q.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 mp(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=mp(i,t,{})),n[r]=i}return n}class Qo{constructor(t){this.spec=t,this.props={},t.props&&mp(t.props,this,this.props),this.key=t.key?t.key.key:Ep("plugin")}getState(t){return t[this.key]}}const Fs=Object.create(null);function Ep(e){return e in Fs?e+"$"+ ++Fs[e]:(Fs[e]=0,e+"$")}class ts{constructor(t="key"){this.key=Ep(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const Lt=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Cr=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Ca=null;const Ve=function(e,t,n){let r=Ca||(Ca=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},Hn=function(e,t,n,r){return n&&(lu(e,t,n,r,-1)||lu(e,t,n,r,1))},rA=/^(img|br|input|textarea|hr)$/i;function lu(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:de(e))){let s=e.parentNode;if(!s||s.nodeType!=1||pi(e)||rA.test(e.nodeName)||e.contentEditable=="false")return!1;t=Lt(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?de(e):0}}}}function de(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function pi(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 es=function(e){return e.focusNode&&Hn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function In(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const we=typeof navigator!="undefined"?navigator:null,cu=typeof document!="undefined"?document:null,An=we&&we.userAgent||"",Na=/Edge\/(\d+)/.exec(An),Ap=/MSIE \d/.exec(An),va=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(An),qt=!!(Ap||va||Na),hn=Ap?document.documentMode:va?+va[1]:Na?+Na[1]:0,fe=!qt&&/gecko\/(\d+)/i.test(An);fe&&(/Firefox\/(\d+)/.exec(An)||[0,0])[1];const ya=!qt&&/Chrome\/(\d+)/.exec(An),Rt=!!ya,gp=ya?+ya[1]:0,kt=!qt&&!!we&&/Apple Computer/.test(we.vendor),Nr=kt&&(/Mobile\/\w+/.test(An)||!!we&&we.maxTouchPoints>2),ue=Nr||!!we&&/Mac/.test(we.platform),Dp=!!we&&/Win/.test(we.platform),Xe=/Android \d/.test(An),yi=!!cu&&"webkitFontSmoothing"in cu.documentElement.style,iA=yi?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function oA(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 Ue(e,t){return typeof e=="number"?e:e[t]}function sA(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 uu(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=Cr(s);continue}let a=s,l=a==o.body,c=l?oA(o):sA(a),u=0,d=0;if(t.top<c.top+Ue(r,"top")?d=-(c.top-t.top+Ue(i,"top")):t.bottom>c.bottom-Ue(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+Ue(i,"top")-c.top:t.bottom-c.bottom+Ue(i,"bottom")),t.left<c.left+Ue(r,"left")?u=-(c.left-t.left+Ue(i,"left")):t.right>c.right-Ue(r,"right")&&(u=t.right-c.right+Ue(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:Cr(s)}}function du(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Cr(r));return t}function hu(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 Wn=null;function _p(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=Ve(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=tn(p,1);if(E.top!=E.bottom&&Dl(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}:_p(n,r)}function Dl(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Op(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(Dl(t,c))return Op(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function aA(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(de(h.offsetNode),h.offset)}}catch(h){}if(c.caretRangeFromPoint){let h=c.caretRangeFromPoint(u,d);if(h)return{node:h.startContainer,offset:Math.min(de(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(!Dl(t,c)||(a=Op(e.dom,t,c),!a))return null}if(kt)for(let c=a;n&&c;c=Cr(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(fe&&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;yi&&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,g=u.docView.nearestDesc(m,!0);if(!g)return null;if(g.dom.nodeType==1&&(g.node.isBlock&&g.parent||!g.contentDOM)&&((A=g.dom.getBoundingClientRect()).width||A.height)&&(g.node.isBlock&&g.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(g.dom.nodeName)&&(!E&&A.left>f.left||A.top>f.top?p=g.posBefore:(!E&&A.right<f.left||A.bottom<f.top)&&(p=g.posAfter),E=!0),!g.contentDOM&&p<0&&!g.node.isText))return(g.node.isBlock?f.top<(A.top+A.bottom)/2:f.left<(A.left+A.right)/2)?g.posBefore:g.posAfter;m=g.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}=_p(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 pu(e){return e.top<e.bottom||e.left<e.right}function tn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(pu(r))return r}return Array.prototype.find.call(n,pu)||e.getBoundingClientRect()}const lA=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Sp(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=yi||fe;if(r.nodeType==3){if(!s||!lA.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++,Ur(tn(Ve(r,a,l),c),c<0)}{let a=tn(Ve(r,i,i),n);if(fe&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=tn(Ve(r,i-1,i-1),-1);if(l.top==a.top){let c=tn(Ve(r,i,i+1),-1);if(c.top!=a.top)return Ur(c,c.left<l.left)}}return a}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==de(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Hs(a.getBoundingClientRect(),!1)}if(o==null&&i<de(r)){let a=r.childNodes[i];if(a.nodeType==1)return Hs(a.getBoundingClientRect(),!0)}return Hs(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==de(r))){let a=r.childNodes[i-1],l=a.nodeType==3?Ve(a,de(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return Ur(tn(l,1),!1)}if(o==null&&i<de(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?Ve(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return Ur(tn(l,-1),!0)}return Ur(tn(r.nodeType==3?Ve(r):r,-n),n>=0)}function Ur(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 Hs(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 fu(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 cA=/[\u0590-\u08ac]/;let mu=null,Eu=null,Au=!1;function uA(e,t,n){return mu==t&&Eu==n?Au:(mu=t,Eu=n,Au=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return fu(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=Sp(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=Ve(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?cA.test(s.parent.textContent)&&u.modify?fu(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:g}=r.domSelectionRange(),O=A&&!E.contains(A.nodeType==1?A:A.parentNode)||d==A&&h==g;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 bi{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>Lt(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 Rp){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 Tp&&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?Lt(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?Lt(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=Lt(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=Lt(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((fe||kt)&&t==n){let{node:f,offset:p}=a;if(f.nodeType==3){if(d=!(!p||f.nodeValue[p-1]!=`
1193
- `),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:Lt(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(fe&&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&&kt)&&Hn(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Hn(l.node,l.offset,u.focusNode,u.focusOffset))return;let h=!1;if((c.extend||t==n)&&(!d||!fe)){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 Tp extends bi{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 dA extends bi{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 wn extends bi{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=kr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new wn(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=wn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=La(o,n,s,r)),t>0&&(o=La(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 pn extends bi{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}=kr.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=Np(u,r,n),c?a=new hA(t,n,r,i,u,d||null,h,c,o,s+1):n.isText?new ns(t,n,r,i,u,h,o):new pn(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=()=>B.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)&&Ro(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 fA(this,s&&s.node,t);(function(c,u,d,h){let f=u.locals(c),p=0;if(f.length==0){for(let g=0;g<c.childCount;g++){let O=c.child(g);h(O,f,u.forChild(p,O),g),p+=O.nodeSize}return}let m=0,E=[],A=null;for(let g=0;;){let O,S,R,b;for(;m<f.length&&f[m].to==p;){let D=f[m++];D.widget&&(O?(S||(S=[O])).push(D):O=D)}if(O)if(S){S.sort(mA);for(let D=0;D<S.length;D++)d(S[D],g,!!A)}else d(O,g,!!A);if(A)b=-1,R=A,A=null;else{if(!(g<c.childCount))break;b=g,R=c.child(g++)}for(let D=0;D<E.length;D++)E[D].to<=p&&E.splice(D--,1);for(;m<f.length&&f[m].from<=p&&f[m].to>p;)E.push(f[m++]);let I=p+R.nodeSize;if(R.isText){let D=I;m<f.length&&f[m].from<D&&(D=f[m].from);for(let _=0;_<E.length;_++)E[_].to<D&&(D=E[_].to);D<I&&(A=R.cut(D-p),R=R.cut(0,D-p),I=D,b=-1)}else for(;m<f.length&&f[m].to<I;)m++;let y=R.isInline&&!R.isLeaf?E.filter(D=>!D.inline):E.slice();h(R,y,u.forChild(p,R),b),p=I}})(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?tt.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),Ip(this.contentDOM,this.children,t),Nr&&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 Z)||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 dA(this,o,n,i);t.input.compositionNodes.push(s),this.children=La(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(Ro(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Cp(this.dom,this.nodeDOM,ba(this.outerDeco,this.node,n),ba(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 gu(e,t,n,r,i){Np(r,t,e);let o=new pn(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ns extends pn{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 ns(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 Rp extends bi{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 hA extends pn{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 Ip(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=Du(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof wn){let l=r?r.previousSibling:e.lastChild;Ip(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=Du(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const ei=function(e){e&&(this.nodeName=e)};ei.prototype=Object.create(null);const Nn=[new ei];function ba(e,t,n){if(e.length==0)return Nn;let r=n?Nn[0]:new ei,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new ei(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new ei(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 Cp(e,t,n,r){if(n==Nn&&r==Nn)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=Nn[0]),i=l}pA(i,a||Nn[0],s)}return i}function pA(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 Np(e,t,n){return Cp(e,e,Nn,ba(t,n,e.nodeType!=1))}function Ro(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 Du(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class fA{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 wn)){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=wn.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 pn){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&&Ro(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)||!Ro(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=pn.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=pn.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 Tp(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 wn;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof ns)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((kt||Rt)&&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 Rp(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 mA(e,t){return e.type.side-t.type.side}function La(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 _l(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(es(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&G.isSelectable(d)&&i.parent&&(!d.isInline||!function(h,f,p){for(let m=f==0,E=f==de(h);m||E;){if(h==p)return!0;let A=Lt(h);if(!(h=h.parentNode))return!1;m=m&&A==0,E=E&&A==de(h)}}(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new G(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=Ol(e,u,c,t=="pointer"||e.state.selection.head<c.pos&&!o?1:-1)),l}function _u(e){return e.editable?e.hasFocus():yp(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ke(e,t=!1){let n=e.state.selection;if(vp(e,n),_u(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Rt){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Hn(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,Lt(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&qt&&hn<=11&&(o.disabled=!0,o.disabled=!1)})(e);else{let r,i,{anchor:o,head:s}=n;!Ou||n instanceof Z||(n.$from.parent.inlineContent||(r=Su(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Su(e,n.to))),e.docView.setSelection(o,s,e,t),Ou&&(r&&Tu(r),i&&Tu(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(()=>{_u(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ou=kt||Rt&&gp<63;function Su(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(kt&&i&&i.contentEditable=="false")return Bs(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Bs(i);if(o)return Bs(o)}}function Bs(e){return e.contentEditable="true",kt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Tu(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function vp(e,t){if(t instanceof G){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Ru(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Ru(e)}function Ru(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Ol(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Z.between(t,n,r)}function Iu(e){return!(e.editable&&!e.hasFocus())&&yp(e)}function yp(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 ka(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&&Q.findFrom(o,t)}function nn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Cu(e,t,n){let r=e.state.selection;if(!(r instanceof Z)){if(r instanceof G&&r.node.isInline)return nn(e,new Z(t>0?r.$to:r.$from));{let i=ka(e.state,t);return!!i&&nn(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 nn(e,new Z(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let i=ka(e.state,t);return!!(i&&i instanceof G)&&nn(e,i)}if(!(ue&&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)&&(G.isSelectable(s)?nn(e,new G(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!yi&&nn(e,new Z(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function Yi(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function jr(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Kn(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(fe&&i.nodeType==1&&o<Yi(i)&&jr(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let c=i.childNodes[o-1];if(jr(c,-1))s=i,a=--o;else{if(c.nodeType!=3)break;i=c,o=i.nodeValue.length}}}else{if(Nu(i))break;{let c=i.previousSibling;for(;c&&jr(c,-1);)s=i.parentNode,a=Lt(c),c=c.previousSibling;if(c)i=c,o=Yi(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Us(n,i,o):s&&Us(n,s,a)}(e):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Yi(i);for(;;)if(o<l){if(i.nodeType!=1||!jr(i.childNodes[o],1))break;s=i,a=++o}else{if(Nu(i))break;{let c=i.nextSibling;for(;c&&jr(c,1);)s=c.parentNode,a=Lt(c)+1,c=c.nextSibling;if(c)i=c,o=0,l=Yi(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Us(n,s,a)}(e)}function Nu(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Us(e,t,n){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!pi(a);)l=Lt(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&&!pi(a);)l=Lt(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(es(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&&Ke(e)},50)}function vu(e,t){let n=e.state.doc.resolve(t);if(!Rt&&!Dp&&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 yu(e,t,n){let r=e.state.selection;if(r instanceof Z&&!r.empty||n.indexOf("s")>-1||ue&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=ka(e.state,t);if(s&&s instanceof G)return nn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof se?Q.near(s,t):Q.findFrom(s,t);return!!a&&nn(e,a)}return!1}function bu(e,t){if(!(e.state.selection instanceof Z))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 Lu(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function EA(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||ue&&n==72&&r=="c")return bu(e,-1)||Kn(e,-1);if(n==46&&!t.shiftKey||ue&&n==68&&r=="c")return bu(e,1)||Kn(e,1);if(n==13||n==27)return!0;if(n==37||ue&&n==66&&r=="c"){let i=n==37?vu(e,e.state.selection.from)=="ltr"?-1:1:-1;return Cu(e,i,r)||Kn(e,i)}if(n==39||ue&&n==70&&r=="c"){let i=n==39?vu(e,e.state.selection.from)=="ltr"?1:-1:1;return Cu(e,i,r)||Kn(e,i)}return n==38||ue&&n==80&&r=="c"?yu(e,-1,r)||Kn(e,-1):n==40||ue&&n==78&&r=="c"?function(i){if(!kt||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;Lu(i,a,"true"),setTimeout(()=>Lu(i,a,"false"),20)}return!1}(e)||yu(e,1,r)||Kn(e,1):r==(ue?"m":"c")&&(n==66||n==73||n==89||n==90)}function Sl(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")||kr.fromSchema(e.state.schema),a=xp(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&u.nodeType==1&&(c=Mp[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,`
1186
+ `+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}|${Oe(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}|${Oe(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
1187
+ `+Oe(i.children);case"bulletpoint":case"bulletPoint":return"- "+Oe(i.children)+`
1188
+ `}}).join("")}(e,t).trim()}class jc{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 vt(e){this.content=e}function Jh(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=Jh(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function Zh(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=Zh(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}else n-=l,r-=l}}vt.prototype={constructor:vt,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 vt(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 vt(n)},addToStart:function(e,t){return new vt([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new vt(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 vt(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=vt.from(e)).size?new vt(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=vt.from(e)).size?new vt(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=vt.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}},vt.from=function(e){if(e instanceof vt)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new vt(t)};class B{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 B(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 B(r,i)}cutByIndex(t,n){return t==n?B.empty:t==0&&n==this.content.length?this:new B(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 B(i,o)}addToStart(t){return new B([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new B(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 Jh(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return Zh(this,t,n,r)}findIndex(t){if(t==0)return Yi(0,t);if(t==this.size)return Yi(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?Yi(n+1,i):Yi(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 B.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new B(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return B.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 B(n||t,r)}static from(t){if(!t)return B.empty;if(t instanceof B)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new B([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}B.empty=new B([],0);const ks={index:0,offset:0};function Yi(e,t){return ks.index=e,ks.offset=t,ks}function Oo(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(!Oo(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Oo(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class Q{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&&Oo(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 Q.none;if(t instanceof Q)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}Q.none=[];class So 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=tp(this.content,t+this.openStart,n);return r&&new $(r,this.openStart,this.openEnd)}removeBetween(t,n){return new $(Qh(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 $(B.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 Qh(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(Qh(o.content,t-i-1,n-i-1)))}function tp(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=tp(s.content,t-o-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function HE(e,t,n){if(n.openStart>e.depth)throw new So("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new So("Inconsistent open depths");return ep(e,t,n,0)}function ep(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=ep(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(B.from(d));return{start:d.resolveNoCache(l.openStart+u),end:d.resolveNoCache(d.content.size-l.openEnd-u)}}(n,e);return bn(o,rp(e,s,a,t,r))}{let s=e.parent,a=s.content;return bn(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}}return bn(o,To(e,t,r))}function np(e,t){if(!t.type.compatibleContent(e.type))throw new So("Cannot join "+t.type.name+" onto "+e.type.name)}function Ca(e,t,n){let r=e.node(n);return np(r,t.node(n)),r}function yn(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 ei(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&&(yn(e.nodeAfter,r),o++));for(let a=o;a<s;a++)yn(i.child(a),r);t&&t.depth==n&&t.textOffset&&yn(t.nodeBefore,r)}function bn(e,t){return e.type.checkContent(t),e.copy(t)}function rp(e,t,n,r,i){let o=e.depth>i&&Ca(e,t,i+1),s=r.depth>i&&Ca(n,r,i+1),a=[];return ei(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(np(o,s),yn(bn(o,rp(e,t,n,r,i+1)),a)):(o&&yn(bn(o,To(e,t,i+1)),a),ei(t,n,i,a),s&&yn(bn(s,To(n,r,i+1)),a)),ei(r,null,i,a),new B(a)}function To(e,t,n){let r=[];return ei(null,e,n,r),e.depth>n&&yn(bn(Ca(e,t,n+1),To(e,t,n+1)),r),ei(t,null,n,r),new B(r)}$.empty=new $(B.empty,0,0);class ui{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 Q.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 jE(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 ui(n,r,o)}static resolveCached(t,n){let r=$c.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 $c.set(t,r=new BE);let i=r.elts[r.i]=ui.resolve(t,n);return r.i=(r.i+1)%UE,i}}class BE{constructor(){this.elts=[],this.i=0}}const UE=12,$c=new WeakMap;class jE{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 $E=Object.create(null);let Ln=class va{constructor(t,n,r,i=Q.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||B.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&&Oo(this.attrs,n||t.defaultAttrs||$E)&&Q.sameSet(this.marks,r||Q.none)}copy(t=null){return t==this.content?this:new va(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new va(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 HE(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 ui.resolveCached(this,t)}resolveNoCache(t){return ui.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()+")"),ip(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=B.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=Q.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(!Q.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=B.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Ln.prototype.text=void 0;class Ro extends Ln{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):ip(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 Ro(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Ro(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 ip(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Pn{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new VE(t,n);if(r.next==null)return Pn.empty;let i=op(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Yc(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]);Yc(s,p).forEach(E=>{m||u.push([f,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let d=a[c.join(",")]=new Pn(c.indexOf(s.length-1)>-1);for(let h=0;h<u.length;h++){let f=u[h][1].sort(sp);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 B.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(`
1189
+ `)}}Pn.empty=new Pn(!0);class VE{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 op(e){let t=[];do t.push(YE(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function YE(e){let t=[];do t.push(zE(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function zE(e){let t=function(n){if(n.eat("(")){let r=op(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=GE(e,t)}return t}function Vc(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function GE(e,t){let n=Vc(e),r=n;return e.eat(",")&&(r=e.next!="}"?Vc(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function sp(e,t){return t-e}function Yc(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(sp)}function ap(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 lp(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 cp(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 up(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new XE(e,r,t[r]);return n}let zc=class dp{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=up(t,r.attrs),this.defaultAttrs=ap(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==Pn.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:lp(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ln(this,this.computeAttrs(t),B.from(n),Q.setFrom(r))}createChecked(t=null,n,r){return n=B.from(n),this.checkContent(n),new Ln(this,this.computeAttrs(t),n,Q.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),(n=B.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(B.empty,!0);return o?new Ln(this,t,n.append(o),Q.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){cp(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:Q.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new dp(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 XE{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 ts{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=up(t,i.attrs),this.excluded=null;let o=ap(this.attrs);this.instance=o?new Q(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Q(this,lp(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new ts(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){cp(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}function Gc(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 di{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 Kc(this,n,!1);return r.addAll(t,Q.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Kc(this,n,!0);return r.addAll(t,Q.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(KE(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=qc(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=qc(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new di(t,di.schemaRules(t)))}}const hp={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},WE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Xc={ol:!0,ul:!0};function Wc(e,t,n){return t!=null?(t?1:0)|(t==="full"?2:0):e&&e.whitespace=="pre"?3:-5&n}class ws{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=Q.none,this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(B.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=B.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(B.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&&!hp.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Kc{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=Wc(null,n.preserveWhitespace,0)|(r?4:0);i=o?new ws(o.type,o.attrs,Q.none,!0,n.topMatch||o.type.contentMatch,s):new ws(r?null:t.schema.topNodeType,null,Q.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,`
1190
+ `);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();Xc.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&&Xc.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:WE.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(hp.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(`
1191
+ `),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=Q.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):Jc(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=Wc(t,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=Q.none;return r=r.filter(c=>!(s.type?s.type.allowsMarkType(c.type):Jc(c.type,t))||(l=c.addToSet(l),!1)),this.nodes.push(new ws(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 KE(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function qc(e){let t={};for(let n in e)t[n]=e[n];return t}function Jc(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 Lr{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Ms(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}=ro(Ms(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&&ro(Ms(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ro(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Lr(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Zc(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Zc(t.marks)}}function Zc(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Ms(e){return e.document||window.document}const Qc=new WeakMap;function qE(e){let t=Qc.get(e);return t===void 0&&Qc.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 ro(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=qE(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}=ro(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 pp=Math.pow(2,16);function JE(e,t){return e+t*pp}function tu(e){return 65535&e}class Na{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 te{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&te.empty)return te.empty}recover(t){let n=0,r=tu(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))/pp}(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:JE(a/3,t-l),p=t==l?2:t==d?1:4;return(n<0?t!=l:t!=d)&&(p|=8),new Na(h,p,f)}i+=u-c}return r?t+i:new Na(t+i,0,null)}touches(t,n){let r=0,i=tu(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 te(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?te.empty:new te(t<0?[0,-t,0]:[0,0,t])}}te.empty=new te([]);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 Na(t,i,null)}}const xs=Object.create(null);class Pt{getMap(){return te.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=xs[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 xs)throw new RangeError("Duplicate use of step JSON ID "+t);return xs[t]=n,n.prototype.jsonID=t,n}}class Et{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Et(t,null)}static fail(t){return new Et(null,t)}static fromReplace(t,n,r,i){try{return Et.ok(t.replace(n,r,i))}catch(o){if(o instanceof So)return Et.fail(o.message);throw o}}}function Al(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(Al(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return B.fromArray(r)}class on extends Pt{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 $(Al(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 Et.fromReplace(t,this.from,this.to,o)}invert(){return new Re(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 on(n.pos,r.pos,this.mark)}merge(t){return t instanceof on&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new on(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 on(n.from,n.to,t.markFromJSON(n.mark))}}Pt.jsonID("addMark",on);class Re extends Pt{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 $(Al(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return Et.fromReplace(t,this.from,this.to,r)}invert(){return new on(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 Re(n.pos,r.pos,this.mark)}merge(t){return t instanceof Re&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Re(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 Re(n.from,n.to,t.markFromJSON(n.mark))}}Pt.jsonID("removeMark",Re);class sn extends Pt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Et.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Et.fromReplace(t,this.pos,this.pos+1,new $(B.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 sn(this.pos,n.marks[i]);return new sn(this.pos,this.mark)}}return new Fn(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new sn(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 sn(n.pos,t.markFromJSON(n.mark))}}Pt.jsonID("addNodeMark",sn);class Fn extends Pt{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Et.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Et.fromReplace(t,this.pos,this.pos+1,new $(B.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new sn(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Fn(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 Fn(n.pos,t.markFromJSON(n.mark))}}Pt.jsonID("removeNodeMark",Fn);class yt extends Pt{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&ya(t,this.from,this.to)?Et.fail("Structure replace would overwrite content"):Et.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new te([this.from,this.to-this.from,this.slice.size])}invert(t){return new yt(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 yt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof yt)||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 yt(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 yt(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 yt(n.from,n.to,$.fromJSON(t,n.slice),!!n.structure)}}Pt.jsonID("replace",yt);class ee extends Pt{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&&(ya(t,this.from,this.gapFrom)||ya(t,this.gapTo,this.to)))return Et.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Et.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Et.fromReplace(t,this.from,this.to,r):Et.fail("Content does not fit in gap")}getMap(){return new te([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 ee(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 ee(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 ee(n.from,n.to,n.gapFrom,n.gapTo,$.fromJSON(t,n.slice),n.insert,!!n.structure)}}function ya(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 Ps(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 Re(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 $(B.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new yt(a+h.index,a+h.index+h[0].length,f))}}else s.push(new yt(a,u,$.empty));a=u}if(!r.validEnd){let l=r.fillBefore(B.empty,!0);e.replace(a,a,new $(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function ZE(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function gl(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||!ZE(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function eu(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 nu(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(`
1192
+ `))}})}function io(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 ru(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 Dl(e,t,n=t,r=$.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return fp(i,o,r)?new yt(t,n,r):new QE(i,o,r).fit()}function fp(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Pt.jsonID("replaceAround",ee);class QE{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=B.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=B.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 ee(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new yt(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=Fs(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(B.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=Fs(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=Fs(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new $(zr(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new $(zr(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(mp(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=Gr(this.placed,n,B.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 $(zr(s.content,t-1,1),t-1,f<0?s.openEnd:t-1):new $(zr(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||!Hs(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=Hs(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Hs(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=Gr(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=Gr(this.placed,this.depth,B.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(B.empty,!0);t.childCount&&(this.placed=Gr(this.placed,this.frontier.length,t))}}function zr(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(zr(e.firstChild.content,t-1,n)))}function Gr(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Gr(e.lastChild.content,t-1,n)))}function Fs(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function mp(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,mp(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(B.empty,!0)))),e.copy(r)}function Hs(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 tA(e){return e.spec.defining||e.spec.definingForContent}function Ep(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Ep(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(B.empty,!0))}return e}function iu(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 ur extends Pt{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 Et.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 Et.fromReplace(t,this.pos,this.pos+1,new $(B.from(i),0,n.isLeaf?0:1))}getMap(){return te.empty}invert(t){return new ur(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 ur(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 ur(n.pos,n.attr,n.value)}}Pt.jsonID("attr",ur);class pi extends Pt{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 Et.ok(r)}getMap(){return te.empty}invert(t){return new pi(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 pi(n.attr,n.value)}}Pt.jsonID("docAttr",pi);let Xr=class extends Error{};Xr=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(Xr.prototype=Object.create(Error.prototype)).constructor=Xr,Xr.prototype.name="TransformError";class eA{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 Xr(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=Dl(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new $(B.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(fp(l,c,a))return i.step(new yt(o,s,a));let u=iu(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 g=l.node(E).type.spec;if(g.defining||g.definingAsContext||g.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 g=E.firstChild;if(f.push(g),A==a.openStart)break;E=g.content}for(let E=p-1;E>=0;E--){let A=f[E],g=tA(A.type);if(g&&!A.sameMarkup(l.node(Math.abs(d)-1)))p=E;else if(g||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+p+1)%(a.openStart+1),g=f[A];if(g)for(let O=0;O<u.length;O++){let S=u[(O+h)%u.length],T=!0;S<0&&(T=!1,S=-S);let y=l.node(S-1),I=l.index(S-1);if(y.canReplaceWith(I,I,g.type,g.marks))return i.replace(l.before(S),T?c.after(S):s,new $(Ep(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 $(B.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=iu(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=B.empty,p=0;for(let A=l,g=!1;A>o;A--)g||s.index(A)>0?(g=!0,f=B.from(s.node(A).copy(f)),p++):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 ee(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);nu(r,f.node(),f.before(),u)}c.inlineContent&&Ps(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 yt(h,d.map(i+o,-1),$.empty,!0)),s===!0){let f=r.doc.resolve(h);eu(r,f.node(),f.before(),r.steps.length)}}(this,t,n),this}wrap(t,n){return function(r,i,o){let s=B.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=B.from(o[c].type.create(o[c].attrs,s))}let a=i.start,l=i.end;r.step(new ee(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),g=A.index();return A.parent.canReplaceWith(g,g+1,E)}(o.doc,o.mapping.slice(u).map(h),l)){let p=null;if(l.schema.linebreakReplacement){let g=l.whitespace=="pre",O=!!l.contentMatch.matchType(l.schema.linebreakReplacement);g&&!O?p=!1:!g&&O&&(p=!0)}p===!1&&nu(o,d,h,u),Ps(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 ee(E,A,E+1,A-1,new $(B.from(l.create(f,null,d.marks)),0,0),1,!0)),p===!0&&eu(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 ee(s,s+u.nodeSize,s+1,s+u.nodeSize-1,new $(B.from(d),0,0),1,!0))}(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ur(t,n,r)),this}setDocAttribute(t,n){return this.step(new pi(t,n)),this}addNodeMark(t,n){return this.step(new sn(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 Q)n.isInSet(r.marks)&&this.step(new Fn(t,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new Fn(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=B.empty,u=B.empty;for(let d=l.depth,h=l.depth-s,f=s-1;d>h;d--,f--){c=B.from(l.node(d).copy(c));let p=a&&a[f];u=B.from(p?p.type.create(p.attrs,u):l.node(d).copy(u))}i.step(new yt(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),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:u.push(l=new Re(E,A,m[O])));c&&c.to==E?c.to=A:d.push(c=new on(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 ts){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 g=l[A];g.step==c-1&&E.eq(l[A].style)&&(m=g)}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 Re(u.from,u.to,u.style)))}(this,t,n,r),this}clearIncompatible(t,n,r){return Ps(this,t,n,r),this}}const Bs=Object.create(null);class J{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new nA(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&&au(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),au(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new q(t):Zn(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?Zn(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):Zn(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 ie(t.node(0))}static atStart(t){return Zn(t,t,0,0,1)||new ie(t)}static atEnd(t){return Zn(t,t,t.content.size,t.childCount,-1)||new ie(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Bs[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 Bs)throw new RangeError("Duplicate use of selection JSON ID "+t);return Bs[t]=n,n.prototype.jsonID=t,n}getBookmark(){return q.between(this.$anchor,this.$head).getBookmark()}}J.prototype.visible=!0;class nA{constructor(t,n){this.$from=t,this.$to=n}}let ou=!1;function su(e){ou||e.parent.inlineContent||(ou=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class q extends J{constructor(t,n=t){su(t),su(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 J.near(r);let i=t.resolve(n.map(this.anchor));return new q(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 q&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new es(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 q(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=J.findFrom(n,r,!0)||J.findFrom(n,-r,!0);if(!o)return J.near(n,r);n=o.$head}return t.parent.inlineContent||(i==0||(t=(J.findFrom(t,-r,!0)||J.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0)&&(t=n),new q(t,n)}}J.jsonID("text",q);class es{constructor(t,n){this.anchor=t,this.head=n}map(t){return new es(t.map(this.anchor),t.map(this.head))}resolve(t){return q.between(t.resolve(this.anchor),t.resolve(this.head))}}class z extends J{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?J.near(o):new z(o)}content(){return new $(B.from(this.node),0,0)}eq(t){return t instanceof z&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new _l(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new z(t.resolve(n.anchor))}static create(t,n){return new z(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}z.prototype.visible=!1,J.jsonID("node",z);class _l{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new es(r,r):new _l(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&z.isSelectable(r)?new z(n):J.near(n)}}class ie extends J{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=J.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new ie(t)}map(t){return new ie(t)}eq(t){return t instanceof ie}getBookmark(){return rA}}J.jsonID("all",ie);const rA={map(){return this},resolve:e=>new ie(e)};function Zn(e,t,n,r,i,o=!1){if(t.inlineContent)return q.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&&z.isSelectable(a))return z.create(e,n-(i<0?a.nodeSize:0))}else{let l=Zn(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function au(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof yt||o instanceof ee)&&(e.mapping.maps[r].forEach((s,a,l,c)=>{i==null&&(i=c)}),e.setSelection(J.near(e.doc.resolve(i),n)))}class iA extends eA{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 Q.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)||Q.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(J.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 lu(e,t){return t&&e?e.bind(t):e}class Wr{constructor(t,n,r){this.name=t,this.init=lu(n.init,r),this.apply=lu(n.apply,r)}}const oA=[new Wr("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Wr("selection",{init:(e,t)=>e.selection||J.atStart(t.doc),apply:e=>e.selection}),new Wr("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Wr("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class Us{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=oA.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 Wr(r.key,r.spec.state,r))})}}class ir{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 ir(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 iA(this)}static create(t){let n=new Us(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ir(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 Us(this.schema,t.plugins),r=n.fields,i=new ir(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 Us(t.schema,t.plugins),o=new ir(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Ln.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=J.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 Ap(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Ap(i,t,{})),n[r]=i}return n}class ns{constructor(t){this.spec=t,this.props={},t.props&&Ap(t.props,this,this.props),this.key=t.key?t.key.key:gp("plugin")}getState(t){return t[this.key]}}const js=Object.create(null);function gp(e){return e in js?e+"$"+ ++js[e]:(js[e]=0,e+"$")}class rs{constructor(t="key"){this.key=gp(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const bt=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Rr=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let ba=null;const Ue=function(e,t,n){let r=ba||(ba=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},Hn=function(e,t,n,r){return n&&(cu(e,t,n,r,-1)||cu(e,t,n,r,1))},sA=/^(img|br|input|textarea|hr)$/i;function cu(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:le(e))){let s=e.parentNode;if(!s||s.nodeType!=1||fi(e)||sA.test(e.nodeName)||e.contentEditable=="false")return!1;t=bt(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?le(e):0}}}}function le(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function fi(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 is=function(e){return e.focusNode&&Hn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Tn(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const be=typeof navigator!="undefined"?navigator:null,uu=typeof document!="undefined"?document:null,fn=be&&be.userAgent||"",La=/Edge\/(\d+)/.exec(fn),Dp=/MSIE \d/.exec(fn),ka=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fn),Kt=!!(Dp||ka||La),cn=Dp?document.documentMode:ka?+ka[1]:La?+La[1]:0,de=!Kt&&/gecko\/(\d+)/i.test(fn);de&&(/Firefox\/(\d+)/.exec(fn)||[0,0])[1];const wa=!Kt&&/Chrome\/(\d+)/.exec(fn),Tt=!!wa,_p=wa?+wa[1]:0,Lt=!Kt&&!!be&&/Apple Computer/.test(be.vendor),Ir=Lt&&(/Mobile\/\w+/.test(fn)||!!be&&be.maxTouchPoints>2),ae=Ir||!!be&&/Mac/.test(be.platform),Op=!!be&&/Win/.test(be.platform),Ye=/Android \d/.test(fn),bi=!!uu&&"webkitFontSmoothing"in uu.documentElement.style,aA=bi?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function lA(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 Fe(e,t){return typeof e=="number"?e:e[t]}function cA(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 du(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=Rr(s);continue}let a=s,l=a==o.body,c=l?lA(o):cA(a),u=0,d=0;if(t.top<c.top+Fe(r,"top")?d=-(c.top-t.top+Fe(i,"top")):t.bottom>c.bottom-Fe(r,"bottom")&&(d=t.bottom-t.top>c.bottom-c.top?t.top+Fe(i,"top")-c.top:t.bottom-c.bottom+Fe(i,"bottom")),t.left<c.left+Fe(r,"left")?u=-(c.left-t.left+Fe(i,"left")):t.right>c.right-Fe(r,"right")&&(u=t.right-c.right+Fe(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:Rr(s)}}function hu(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Rr(r));return t}function pu(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 Kn=null;function Sp(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=Ue(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=Je(p,1);if(E.top!=E.bottom&&Ol(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}:Sp(n,r)}function Ol(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function Tp(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(Ol(t,c))return Tp(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function uA(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(le(h.offsetNode),h.offset)}}catch(h){}if(c.caretRangeFromPoint){let h=c.caretRangeFromPoint(u,d);if(h)return{node:h.startContainer,offset:Math.min(le(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(!Ol(t,c)||(a=Tp(e.dom,t,c),!a))return null}if(Lt)for(let c=a;n&&c;c=Rr(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(de&&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;bi&&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,g=u.docView.nearestDesc(m,!0);if(!g)return null;if(g.dom.nodeType==1&&(g.node.isBlock&&g.parent||!g.contentDOM)&&((A=g.dom.getBoundingClientRect()).width||A.height)&&(g.node.isBlock&&g.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(g.dom.nodeName)&&(!E&&A.left>f.left||A.top>f.top?p=g.posBefore:(!E&&A.right<f.left||A.bottom<f.top)&&(p=g.posAfter),E=!0),!g.contentDOM&&p<0&&!g.node.isText))return(g.node.isBlock?f.top<(A.top+A.bottom)/2:f.left<(A.left+A.right)/2)?g.posBefore:g.posAfter;m=g.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}=Sp(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 fu(e){return e.top<e.bottom||e.left<e.right}function Je(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(fu(r))return r}return Array.prototype.find.call(n,fu)||e.getBoundingClientRect()}const dA=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Rp(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=bi||de;if(r.nodeType==3){if(!s||!dA.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++,jr(Je(Ue(r,a,l),c),c<0)}{let a=Je(Ue(r,i,i),n);if(de&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Je(Ue(r,i-1,i-1),-1);if(l.top==a.top){let c=Je(Ue(r,i,i+1),-1);if(c.top!=a.top)return jr(c,c.left<l.left)}}return a}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==le(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return $s(a.getBoundingClientRect(),!1)}if(o==null&&i<le(r)){let a=r.childNodes[i];if(a.nodeType==1)return $s(a.getBoundingClientRect(),!0)}return $s(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==le(r))){let a=r.childNodes[i-1],l=a.nodeType==3?Ue(a,le(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return jr(Je(l,1),!1)}if(o==null&&i<le(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?Ue(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return jr(Je(l,-1),!0)}return jr(Je(r.nodeType==3?Ue(r):r,-n),n>=0)}function jr(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 $s(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 mu(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 hA=/[\u0590-\u08ac]/;let Eu=null,Au=null,gu=!1;function pA(e,t,n){return Eu==t&&Au==n?gu:(Eu=t,Au=n,gu=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return mu(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=Rp(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=Ue(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?hA.test(s.parent.textContent)&&u.modify?mu(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:g}=r.domSelectionRange(),O=A&&!E.contains(A.nodeType==1?A:A.parentNode)||d==A&&h==g;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 Li{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>bt(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 Cp){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 Ip&&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?bt(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?bt(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=bt(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=bt(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((de||Lt)&&t==n){let{node:f,offset:p}=a;if(f.nodeType==3){if(d=!(!p||f.nodeValue[p-1]!=`
1193
+ `),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:bt(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(de&&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&&Lt)&&Hn(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Hn(l.node,l.offset,u.focusNode,u.focusOffset))return;let h=!1;if((c.extend||t==n)&&(!d||!de)){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 Ip extends Li{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 fA extends Li{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 kn extends Li{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=Lr.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new kn(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=kn.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=xa(o,n,s,r)),t>0&&(o=xa(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 un extends Li{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}=Lr.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=yp(u,r,n),c?a=new mA(t,n,r,i,u,d||null,h,c,o,s+1):n.isText?new ss(t,n,r,i,u,h,o):new un(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=()=>B.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)&&Io(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 AA(this,s&&s.node,t);(function(c,u,d,h){let f=u.locals(c),p=0;if(f.length==0){for(let g=0;g<c.childCount;g++){let O=c.child(g);h(O,f,u.forChild(p,O),g),p+=O.nodeSize}return}let m=0,E=[],A=null;for(let g=0;;){let O,S,T,y;for(;m<f.length&&f[m].to==p;){let D=f[m++];D.widget&&(O?(S||(S=[O])).push(D):O=D)}if(O)if(S){S.sort(gA);for(let D=0;D<S.length;D++)d(S[D],g,!!A)}else d(O,g,!!A);if(A)y=-1,T=A,A=null;else{if(!(g<c.childCount))break;y=g,T=c.child(g++)}for(let D=0;D<E.length;D++)E[D].to<=p&&E.splice(D--,1);for(;m<f.length&&f[m].from<=p&&f[m].to>p;)E.push(f[m++]);let I=p+T.nodeSize;if(T.isText){let D=I;m<f.length&&f[m].from<D&&(D=f[m].from);for(let _=0;_<E.length;_++)E[_].to<D&&(D=E[_].to);D<I&&(A=T.cut(D-p),T=T.cut(0,D-p),I=D,y=-1)}else for(;m<f.length&&f[m].to<I;)m++;let N=T.isInline&&!T.isLeaf?E.filter(D=>!D.inline):E.slice();h(T,N,u.forChild(p,T),y),p=I}})(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?Q.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),vp(this.contentDOM,this.children,t),Ir&&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 q)||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 fA(this,o,n,i);t.input.compositionNodes.push(s),this.children=xa(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(Io(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Np(this.dom,this.nodeDOM,Ma(this.outerDeco,this.node,n),Ma(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 Du(e,t,n,r,i){yp(r,t,e);let o=new un(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ss extends un{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 ss(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 Cp extends Li{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 mA extends un{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 vp(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=_u(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof kn){let l=r?r.previousSibling:e.lastChild;vp(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=_u(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const ni=function(e){e&&(this.nodeName=e)};ni.prototype=Object.create(null);const In=[new ni];function Ma(e,t,n){if(e.length==0)return In;let r=n?In[0]:new ni,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new ni(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new ni(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 Np(e,t,n,r){if(n==In&&r==In)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=In[0]),i=l}EA(i,a||In[0],s)}return i}function EA(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 yp(e,t,n){return Np(e,e,In,Ma(t,n,e.nodeType!=1))}function Io(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 _u(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class AA{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 kn)){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=kn.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 un){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&&Io(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)||!Io(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=un.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=un.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 Ip(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 kn;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof ss)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Lt||Tt)&&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 Cp(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 gA(e,t){return e.type.side-t.type.side}function xa(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 Sl(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(is(n)){for(a=s;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&z.isSelectable(d)&&i.parent&&(!d.isInline||!function(h,f,p){for(let m=f==0,E=f==le(h);m||E;){if(h==p)return!0;let A=bt(h);if(!(h=h.parentNode))return!1;m=m&&A==0,E=E&&A==le(h)}}(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;l=new z(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=Tl(e,u,c,t=="pointer"||e.state.selection.head<c.pos&&!o?1:-1)),l}function Ou(e){return e.editable?e.hasFocus():Lp(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Ge(e,t=!1){let n=e.state.selection;if(bp(e,n),Ou(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Tt){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Hn(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,bt(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Kt&&cn<=11&&(o.disabled=!0,o.disabled=!1)})(e);else{let r,i,{anchor:o,head:s}=n;!Su||n instanceof q||(n.$from.parent.inlineContent||(r=Tu(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=Tu(e,n.to))),e.docView.setSelection(o,s,e,t),Su&&(r&&Ru(r),i&&Ru(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(()=>{Ou(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Su=Lt||Tt&&_p<63;function Tu(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(Lt&&i&&i.contentEditable=="false")return Vs(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Vs(i);if(o)return Vs(o)}}function Vs(e){return e.contentEditable="true",Lt&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ru(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bp(e,t){if(t instanceof z){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(Iu(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else Iu(e)}function Iu(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Tl(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||q.between(t,n,r)}function Cu(e){return!(e.editable&&!e.hasFocus())&&Lp(e)}function Lp(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 Pa(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&&J.findFrom(o,t)}function Qe(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function vu(e,t,n){let r=e.state.selection;if(!(r instanceof q)){if(r instanceof z&&r.node.isInline)return Qe(e,new q(t>0?r.$to:r.$from));{let i=Pa(e.state,t);return!!i&&Qe(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 Qe(e,new q(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let i=Pa(e.state,t);return!!(i&&i instanceof z)&&Qe(e,i)}if(!(ae&&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)&&(z.isSelectable(s)?Qe(e,new z(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!bi&&Qe(e,new q(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function zi(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function $r(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function qn(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(de&&i.nodeType==1&&o<zi(i)&&$r(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let c=i.childNodes[o-1];if($r(c,-1))s=i,a=--o;else{if(c.nodeType!=3)break;i=c,o=i.nodeValue.length}}}else{if(Nu(i))break;{let c=i.previousSibling;for(;c&&$r(c,-1);)s=i.parentNode,a=bt(c),c=c.previousSibling;if(c)i=c,o=zi(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Ys(n,i,o):s&&Ys(n,s,a)}(e):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=zi(i);for(;;)if(o<l){if(i.nodeType!=1||!$r(i.childNodes[o],1))break;s=i,a=++o}else{if(Nu(i))break;{let c=i.nextSibling;for(;c&&$r(c,1);)s=c.parentNode,a=bt(c)+1,c=c.nextSibling;if(c)i=c,o=0,l=zi(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Ys(n,s,a)}(e)}function Nu(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ys(e,t,n){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!fi(a);)l=bt(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&&!fi(a);)l=bt(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(is(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&&Ge(e)},50)}function yu(e,t){let n=e.state.doc.resolve(t);if(!Tt&&!Op&&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 bu(e,t,n){let r=e.state.selection;if(r instanceof q&&!r.empty||n.indexOf("s")>-1||ae&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Pa(e.state,t);if(s&&s instanceof z)return Qe(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof ie?J.near(s,t):J.findFrom(s,t);return!!a&&Qe(e,a)}return!1}function Lu(e,t){if(!(e.state.selection instanceof q))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 ku(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function DA(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||ae&&n==72&&r=="c")return Lu(e,-1)||qn(e,-1);if(n==46&&!t.shiftKey||ae&&n==68&&r=="c")return Lu(e,1)||qn(e,1);if(n==13||n==27)return!0;if(n==37||ae&&n==66&&r=="c"){let i=n==37?yu(e,e.state.selection.from)=="ltr"?-1:1:-1;return vu(e,i,r)||qn(e,i)}if(n==39||ae&&n==70&&r=="c"){let i=n==39?yu(e,e.state.selection.from)=="ltr"?1:-1:1;return vu(e,i,r)||qn(e,i)}return n==38||ae&&n==80&&r=="c"?bu(e,-1,r)||qn(e,-1):n==40||ae&&n==78&&r=="c"?function(i){if(!Lt||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;ku(i,a,"true"),setTimeout(()=>ku(i,a,"false"),20)}return!1}(e)||bu(e,1,r)||qn(e,1):r==(ae?"m":"c")&&(n==66||n==73||n==89||n==90)}function Rl(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")||Lr.fromSchema(e.state.schema),a=Fp(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&u.nodeType==1&&(c=Pp[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,`
1194
1194
 
1195
- `);return{dom:l,text:h,slice:t}}function bp(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 $(B.from(e.state.schema.text(t.replace(/\r\n?/g,`
1196
- `))),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=kr.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=xp().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((f=m&&Mp[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?(js||(js=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:g=>g})),js.createHTML(E)):E}(d),f)for(let E=0;E<f.length;E++)p=p.querySelector(f[E])||p;return p}(n),yi&&function(d){let h=d.querySelectorAll(Rt?"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")||ui.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||AA.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(g){return d}let{content:m,openStart:E,openEnd:A}=d;for(let g=f.length-2;g>=0;g-=2){let O=p.nodes[f[g]];if(!O||O.hasRequiredAttrs())break;m=B.from(O.create(f[g+1],m)),E++,A++}return new $(m,E,A)}(ku(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 g,O=m.findWrapping(A.type);if(!O)return E=null;if(g=E.length&&p.length&&kp(O,p,A,E[E.length-1],0))E[E.length-1]=g;else{E.length&&(E[E.length-1]=wp(E[E.length-1],p.length));let S=Lp(A,O);E.push(S),m=m.matchType(S.type),p=O}}),E)return B.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=ku(s,d,h)}return e.someProp("transformPasted",d=>{s=d(s,e,l)}),s}const AA=/^(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 Lp(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,B.from(e));return e}function kp(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=kp(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(B.from(Lp(n,e,i+1))))}}function wp(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,wp(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(B.empty,!0);return e.copy(n.append(r))}function wa(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=wa(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(B.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function ku(e,t,n){return t<e.openStart&&(e=new $(wa(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new $(wa(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Mp={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 wu=null;function xp(){return wu||(wu=document.implementation.createHTMLDocument("title"))}let js=null;const Vt={},zt={},gA={touchstart:!0,touchmove:!0};class DA{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 un(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function $s(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Ma(e,r))})}function Ma(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function _A(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 Io(e){return{left:e.clientX,top:e.clientY}}function Tl(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 dr(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 OA(e,t,n,r,i){return Tl(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 G&&(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(G.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&&(dr(o,G.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&&G.isSelectable(l))&&(dr(o,new G(a)),!0)}(e,n))}function SA(e,t,n,r){return Tl(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function TA(e,t,n,r){return Tl(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&&(dr(i,Z.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)dr(i,Z.create(a,d+1,d+1+u.content.size));else{if(!G.isSelectable(u))continue;dr(i,G.create(a,d))}return!0}}(e,n,r)}function xa(e){return Co(e)}zt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Mu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Xe||!Rt||n.keyCode!=13))if(n.keyCode!=229&&e.domObserver.forceFlush(),!Nr||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",r=>r(e,n))||EA(e,n)?n.preventDefault():un(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,In(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},zt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},zt.keypress=(e,t)=>{let n=t;if(Mu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ue&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Z&&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 Pp=ue?"metaKey":"ctrlKey";Vt.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=xa(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[Pp]&&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(Io(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new RA(e,s,n,!!r)):(o=="doubleClick"?SA:TA)(e,s.pos,s.inside,n)?n.preventDefault():un(e,"pointer"))};class RA{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[Pp],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 G&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!fe||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)),un(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(()=>Ke(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(Io(t))),this.updateAllowDefault(t),this.allowDefault||!n?un(this.view,"pointer"):OA(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||kt&&this.mightDrag&&!this.mightDrag.node.isAtom||Rt&&!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)?(dr(this.view,Q.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):un(this.view,"pointer")}move(t){this.updateAllowDefault(t),un(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 Mu(e,t){return!!e.composing||!!(kt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Vt.touchstart=e=>{e.input.lastTouch=Date.now(),xa(e),un(e,"pointer")},Vt.touchmove=e=>{e.input.lastTouch=Date.now(),un(e,"pointer")},Vt.contextmenu=e=>xa(e);const IA=Xe?5e3:-1;function xu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Co(e),t))}function Fp(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 CA(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=de(i=i.childNodes[o-1])}else{if(!i.parentNode||pi(i))return null;o=Lt(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||pi(i))return null;o=Lt(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 Co(e,t=!1){if(!(Xe&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Fp(e),t||e.docView&&e.docView.dirty){let n=_l(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}}zt.compositionstart=zt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Z&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Rt&&Dp&&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(),Co(e,!0),e.markCursor=null;else if(Co(e,!t.selection.empty),fe&&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}xu(e,IA)},zt.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++,xu(e,20))};const ni=qt&&hn<15||Nr&&iA<604;function ri(e,t,n,r,i){let o=bp(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 Hp(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," "):""}Vt.copy=zt.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=ni?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Sl(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"))},zt.paste=(e,t)=>{let n=t;if(e.composing&&!Xe)return;let r=ni?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ri(e,Hp(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?ri(o,l.value,null,c,s):ri(o,l.textContent,l.innerHTML,c,s)},50)}(e,n)};class Bp{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const NA=ue?"altKey":"ctrlKey";function Pu(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n!=null?n:!t[NA]}Vt.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(Io(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof G?o.to-1:o.to))){if(r&&r.mightDrag)i=G.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=G.create(e.state.doc,d.posBefore))}}let a=(i||e.state.selection).content(),{dom:l,text:c,slice:u}=Sl(e,a);(!n.dataTransfer.files.length||!Rt||gp>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ni?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ni||n.dataTransfer.setData("text/plain",c),e.dragging=new Bp(u,Pu(e,n),i)},Vt.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},zt.dragover=zt.dragenter=(e,t)=>t.preventDefault(),zt.drop=(e,t)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Io(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=bp(n,Hp(r.dataTransfer),ni?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Pu(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 g=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 R=g.depth;R>=0;R--){let b=R==g.depth?0:g.pos<=(g.start(R+1)+g.end(R+1))/2?-1:1,I=g.index(R)+(b>0?1:0),y=g.node(R),D=!1;if(S==1)D=y.canReplace(I,I,O);else{let _=y.contentMatchAt(I).findWrapping(O.firstChild.type);D=_&&y.canReplaceWith(I,I,_[0])}if(D)return b==0?g.pos:b<0?g.before(R+1):g.after(R+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&&G.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new G(p));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((E,A,g,O)=>m=O),u.setSelection(Ol(n,p,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))})(e,t,e.dragging)}finally{e.dragging=null}},Vt.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())&&Ke(e)},20))},Vt.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)},Vt.beforeinput=(e,t)=>{if(Rt&&Xe&&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,In(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 zt)Vt[e]=zt[e];function fi(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 No{constructor(t,n){this.toDOM=t,this.spec=n||Mn,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 ie(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof No&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&fi(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class fn{constructor(t,n){this.attrs=t,this.spec=n||Mn}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 ie(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof fn&&fi(this.attrs,t.attrs)&&fi(this.spec,t.spec)}static is(t){return t.type instanceof fn}destroy(){}}class Rl{constructor(t,n){this.attrs=t,this.spec=n||Mn}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 ie(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 Rl&&fi(this.attrs,t.attrs)&&fi(this.spec,t.spec)}destroy(){}}class ie{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new ie(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 ie(t,t,new No(n,r))}static inline(t,n,r,i){return new ie(t,n,new fn(r,i))}static node(t,n,r,i){return new ie(t,n,new Rl(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof fn}get widget(){return this.type instanceof No}}const Zn=[],Mn={};class Et{constructor(t,n){this.local=t.length?t:Zn,this.children=n.length?n:Zn}static create(t,n){return n.length?io(n,t,0,Mn):Pt}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==Pt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Mn)}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 g=0;c.maps[E].forEach((O,S,R,b)=>{let I=b-R-(S-O);for(let y=0;y<p.length;y+=3){let D=p[y+1];if(D<0||O>D+A-g)continue;let _=p[y]+A-g;S>=_?p[y+1]=O<=_?-2:-1:O>=A&&I&&(p[y]+=I,p[y+1]+=I)}g+=I}),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),g=A-d;if(g<0||g>=u.content.size){m=!0;continue}let O=c.map(a[E+1]+h,-1)-d,{index:S,offset:R}=u.content.findIndex(g),b=u.maybeChild(S);if(b&&R==g&&R+b.nodeSize==O){let I=p[E+2].mapInner(c,b,A+1,a[E]+h+1,f);I!=Pt?(p[E]=g,p[E+1]=O,p[E+2]=I):(p[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(g,O,S,R,b,I,y){function D(_,w){for(let k=0;k<_.local.length;k++){let x=_.local[k].map(R,b,w);x?S.push(x):y.onRemove&&y.onRemove(_.local[k].spec)}for(let k=0;k<_.children.length;k+=3)D(_.children[k+2],_.children[k]+w+1)}for(let _=0;_<g.length;_+=3)g[_+1]==-1&&D(g[_+2],O[_]+I+1);return S}(p,a,l,c,d,h,f),A=io(E,u,0,f);l=A.local;for(let g=0;g<p.length;g+=3)p[g+1]<0&&(p.splice(g,3),g-=3);for(let g=0,O=0;g<A.children.length;g+=3){let S=A.children[g];for(;O<p.length&&p[O]<S;)O+=3;p.splice(O,0,A.children[g],A.children[g+1],A.children[g+2])}}return new Et(l.sort(vn),p)}(this.children,s||[],t,n,r,i,o):s?new Et(s.sort(vn),Zn):Pt}add(t,n){return n.length?this==Pt?Et.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=jp(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,io(c,a,u+1,Mn)),o+=3}});let s=Up(o?$p(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new Et(s.length?this.local.concat(s).sort(vn):this.local,i||this.children)}remove(t){return t.length==0||this==Pt?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!=Pt?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 Et(i,r):Pt}forChild(t,n){if(this==Pt)return this;if(n.isLeaf)return Et.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 fn){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 Et(i.sort(vn),Zn);return r?new sn([a,r]):a}return r||Pt}eq(t){if(this==t)return!0;if(!(t instanceof Et)||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 Il(this.localsInner(t))}localsInner(t){if(this==Pt)return Zn;if(t.inlineContent||!this.local.some(fn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof fn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}Et.empty=new Et([],[]),Et.removeOverlap=Il;const Pt=Et.empty;class sn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,Mn));return sn.from(r)}forChild(t,n){if(n.isLeaf)return Et.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=Pt&&(o instanceof sn?r=r.concat(o.members):r.push(o))}return sn.from(r)}eq(t){if(!(t instanceof sn)||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?Il(r?n:n.sort(vn)):Zn}static from(t){switch(t.length){case 0:return Pt;case 1:return t[0];default:return new sn(t.every(n=>n instanceof Et)?t:t.reduce((n,r)=>n.concat(r instanceof Et?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function Up(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 ie(i.from+t,i.to+t,i.type))}return n}function jp(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 $p(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function io(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=jp(e,a,l+n);if(c){o=!0;let u=io(c,a,n+l+1,r);u!=Pt&&i.push(l,l+a.nodeSize,u)}});let s=Up(o?$p(e):e,-n).sort(vn);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 Et(s,i):Pt}function vn(e,t){return e.from-t.from||e.to-t.to}function Il(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),Fu(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),Fu(t,i+1,o.copy(r.to,o.to)))}}return t}function Fu(e,t,n){for(;t<e.length&&vn(n,e[t])>0;)t++;e.splice(t,0,n)}function Vs(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=Pt&&t.push(r)}),e.cursorWrapper&&t.push(Et.create(e.state.doc,[e.cursorWrapper.deco])),sn.from(t)}const vA={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},yA=qt&&hn<=11;class bA{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 LA{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new bA,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]);qt&&hn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():kt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),yA&&(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,vA)),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(Iu(this.view)){if(this.suppressingSelectionUpdates)return Ke(this.view);if(qt&&hn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Hn(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=Cr(o))r.add(o);for(let o=t.anchorNode;o;o=Cr(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)&&Iu(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(fe&&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&&kA(t,d)==f||h.remove()}}}else if((Rt||kt)&&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&&es(r)&&(c=_l(t))&&c.eq(Q.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Ke(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(u){if(!Hu.has(u)&&(Hu.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=fe,Bu)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."),Bu=!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 g=A.firstChild;if(!g||g.nodeType!=1||g.contentEditable=="false"||/^(BR|IMG)$/.test(g.nodeName))break;A=g}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)||Ke(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(qt&&hn<=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?Lt(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?Lt(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 Hu=new WeakMap,Bu=!1;function Uu(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Hn(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function kA(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 wA(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(kt&&/^(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||kt&&/^(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 MA=/^(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 xA(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let I=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,y=_l(e,I);if(y&&!e.state.selection.eq(y)){if(Rt&&Xe&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",_=>_(e,In(13,"Enter"))))return;let D=e.state.tr.setSelection(y);I=="pointer"?D.setMeta("pointer",!0):I=="key"&&D.scrollIntoView(),o&&D.setMeta("composition",o),e.dispatch(D)}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(I,y,D){let _,{node:w,fromOffset:k,toOffset:x,from:N,to:M}=I.docView.parseRange(y,D),U=I.domSelectionRange(),F=U.anchorNode;if(F&&I.dom.contains(F.nodeType==1?F:F.parentNode)&&(_=[{node:F,offset:U.anchorOffset}],es(U)||_.push({node:U.focusNode,offset:U.focusOffset})),Rt&&I.input.lastKeyCode===8)for(let W=x;W>k;W--){let et=w.childNodes[W-1],it=et.pmViewDesc;if(et.nodeName=="BR"&&!it){x=W;break}if(!it||it.size)break}let Y=I.state.doc,z=I.someProp("domParser")||ui.fromSchema(I.state.schema),V=Y.resolve(N),J=null,rt=z.parse(w,{topNode:V.parent,topMatch:V.parent.contentMatchAt(V.index()),topOpen:!0,from:k,to:x,preserveWhitespace:V.parent.type.whitespace!="pre"||"full",findPositions:_,ruleFromNode:wA,context:V});if(_&&_[0].pos!=null){let W=_[0].pos,et=_[1]&&_[1].pos;et==null&&(et=W),J={anchor:W+N,head:et+N}}return{doc:rt,sel:J,from:N,to:M}}(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(I,y,D,_,w){let k=I.findDiffStart(y,D);if(k==null)return null;let{a:x,b:N}=I.findDiffEnd(y,D+I.size,D+y.size);if(w=="end"&&(_-=x+Math.max(0,k-Math.min(x,N))-k),x<k&&I.size<y.size){let M=_<=k&&_>=x?k-_:0;k-=M,k&&k<y.size&&$u(y.textBetween(k-1,k+1))&&(k+=M?1:-1),N=k+(N-x),x=k}else if(N<k){let M=_<=k&&_>=N?k-_:0;k-=M,k&&k<I.size&&$u(I.textBetween(k-1,k+1))&&(k+=M?1:-1),x=k+(x-N),N=k}return{start:k,endA:x,endB:N}}(f.content,d.doc.content,d.from,l,c);if(p&&e.input.domChangeCount++,(Nr&&e.input.lastIOSEnter>Date.now()-225||Xe)&&i.some(I=>I.nodeType==1&&!MA.test(I.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",I=>I(e,In(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!p){if(!(r&&u instanceof Z&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let I=ju(e,e.state.doc,d.sel);if(I&&!I.eq(e.state.selection)){let y=e.state.tr.setSelection(I);o&&y.setMeta("composition",o),e.dispatch(y)}}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 Z&&(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)),qt&&hn<=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),g=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=p.endA;if((Nr&&e.input.lastIOSEnter>Date.now()-225&&(!g||i.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!g&&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",I=>I(e,In(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&function(I,y,D,_,w){if(D-y<=w.pos-_.pos||Ys(_,!0,!1)<w.pos)return!1;let k=I.resolve(y);if(!_.parent.isTextblock){let N=k.nodeAfter;return N!=null&&D==y+N.nodeSize}if(k.parentOffset<k.parent.content.size||!k.parent.isTextblock)return!1;let x=I.resolve(Ys(k,!0,!0));return!(!x.parent.isTextblock||x.pos>D||Ys(x,!0,!1)<D)&&_.parent.content.cut(_.parentOffset).eq(x.parent.content)}(h,p.start,p.endA,m,E)&&e.someProp("handleKeyDown",I=>I(e,In(8,"Backspace"))))return void(Xe&&Rt&&e.domObserver.suppressSelectionUpdates());Rt&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),Xe&&!g&&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(I){return I(e,In(13,"Enter"))})},20));let O,S=p.start,R=p.endA,b=I=>{let y=I||e.state.tr.replace(S,R,d.doc.slice(p.start-d.from,p.endB-d.from));if(d.sel){let D=ju(e,y.doc,d.sel);D&&!(Rt&&e.composing&&D.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(D.head==S||D.head==y.mapping.map(R)-1)||qt&&D.empty&&D.head==S)&&y.setSelection(D)}return o&&y.setMeta("composition",o),y.scrollIntoView()};if(g)if(m.pos==E.pos){qt&&hn<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ke(e),20));let I=b(e.state.tr.delete(S,R)),y=h.resolve(p.start).marksAcross(h.resolve(p.endA));y&&I.ensureMarks(y),e.dispatch(I)}else if(p.endA==p.endB&&(O=function(I,y){let D,_,w,k=I.firstChild.marks,x=y.firstChild.marks,N=k,M=x;for(let F=0;F<x.length;F++)N=x[F].removeFromSet(N);for(let F=0;F<k.length;F++)M=k[F].removeFromSet(M);if(N.length==1&&M.length==0)_=N[0],D="add",w=F=>F.mark(_.addToSet(F.marks));else{if(N.length!=0||M.length!=1)return null;_=M[0],D="remove",w=F=>F.mark(_.removeFromSet(F.marks))}let U=[];for(let F=0;F<y.childCount;F++)U.push(w(y.child(F)));if(B.from(U).eq(I))return{mark:_,type:D}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,p.endA-A.start())))){let I=b(e.state.tr);O.type=="add"?I.addMark(S,R,O.mark):I.removeMark(S,R,O.mark),e.dispatch(I)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,E.parentOffset),y=()=>b(e.state.tr.insertText(I,S,R));e.someProp("handleTextInput",D=>D(e,S,R,I,y))||e.dispatch(y())}else e.dispatch(b());else e.dispatch(b())}function ju(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Ol(e,t.resolve(n.anchor),t.resolve(n.head))}function Ys(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 $u(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 Vp{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 DA,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Xu),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=zu(this),Yu(this),this.nodeViews=Gu(this),this.docView=gu(this.state.doc,Vu(this),Vs(this),this.dom,this),this.domObserver=new LA(this,(r,i,o,s)=>xA(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in Vt){let o=Vt[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!_A(r,s)||Ma(r,s)||!r.editable&&s.type in zt||o(r,s)},gA[i]?{passive:!0}:void 0)}kt&&r.dom.addEventListener("input",()=>null),$s(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&&$s(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Xu),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&&(Fp(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=Gu(this);(function(p,m){let E=0,A=0;for(let g in p){if(p[g]!=m[g])return!0;E++}for(let g in m)A++;return E!=A})(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&$s(this),this.editable=zu(this),Yu(this);let l=Vs(this),c=Vu(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 g=(E.left+E.right)/2,O=A+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=f.root.elementFromPoint(g,O);if(!S||S==f.dom||!f.dom.contains(S))continue;let R=S.getBoundingClientRect();if(R.top>=A-20){p=S,m=R.top;break}}return{refDOM:p,refTop:m,stack:du(f.dom)}}(this);if(s){this.domObserver.stop();let f=d&&(qt||Rt)&&!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=Rt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=CA(this)),!o&&this.docView.update(t.doc,c,l,this)||(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=gu(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 Hn(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Ke(this,f):(vp(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;hu(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 G){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&uu(this,n.getBoundingClientRect(),t)}else uu(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 Bp(t.slice,t.move,i<0?void 0:G.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(qt){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(Wn)return t.focus(Wn);let n=du(t);t.focus(Wn==null?{get preventScroll(){return Wn={preventScroll:!0},!0}}:void 0),Wn||(Wn=!1,hu(n,0))}(this.dom),Ke(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 aA(this,t)}coordsAtPos(t,n=1){return Sp(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 uA(this,n||this.state,t)}pasteHTML(t,n){return ri(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ri(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Sl(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,[],Vs(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Ca=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(n,r){Ma(n,r)||!Vt[r.type]||!n.editable&&r.type in zt||Vt[r.type](n,r)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?kt&&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 Uu(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?Uu(n,i):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Vu(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"),[ie.node(0,e.state.doc.content.size,t)]}function Yu(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:ie.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function zu(e){return!e.someProp("editable",t=>t(e.state)===!1)}function Gu(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 Xu(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")}Vp.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};const Ot=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=vt.from(e.nodes),t.marks=vt.from(e.marks||{}),this.nodes=Yc.compile(this.spec.nodes,this),this.marks=Jo.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]=Pn.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?zc(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==""?[]:zc(this,o.split(" "))}this.nodeFromJSON=r=>kn.fromJSON(this,r),this.markFromJSON=r=>tt.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 Yc))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 To(n,n.defaultAttrs,e,tt.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})}]}}}),zs=new ts("placeholder"),Wu=new Qo({key:zs,props:{decorations(e){if(Yp(e.doc))return;const t=e.doc.firstChild,n=ie.node(0,t.nodeSize,{class:"empty-node","data-placeholder":zs.getState(e)});return Et.create(e.doc,[n])}},state:{init:()=>"",apply:(e,t)=>{var n;return(n=e.getMeta(zs))!=null?n:t}}});function Yp(e){return e.childCount!==1||e.firstChild.childCount!==0}for(var En={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:"'"},vo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},PA=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),FA=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),yt=0;yt<10;yt++)En[48+yt]=En[96+yt]=String(yt);for(yt=1;yt<=24;yt++)En[yt+111]="F"+yt;for(yt=65;yt<=90;yt++)En[yt]=String.fromCharCode(yt+32),vo[yt]=String.fromCharCode(yt);for(var Gs in En)vo.hasOwnProperty(Gs)||(vo[Gs]=En[Gs]);const HA=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function BA(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);HA?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Xs(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 Ku(e){return new Qo({props:{handleKeyDown:UA(e)}})}function UA(e){let t=function(n){let r=Object.create(null);for(let i in n)r[BA(i)]=n[i];return r}(e);return function(n,r){let i,o=function(a){var l=!(PA&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||FA&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?vo:En)[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[Xs(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[Xs(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=En[r.keyCode])&&i!=o){let a=t[Xs(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var yo=200,Tt=function(){};Tt.prototype.append=function(e){return e.length?(e=Tt.from(e),!this.length&&e||e.length<yo&&this.leafAppend(e)||this.length<yo&&e.leafPrepend(this)||this.appendInner(e)):this},Tt.prototype.prepend=function(e){return e.length?Tt.from(e).append(this):this},Tt.prototype.appendInner=function(e){return new jA(this,e)},Tt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Tt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Tt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Tt.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)},Tt.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},Tt.from=function(e){return e instanceof Tt?e:e&&e.length?new zp(e):Tt.empty};var zp=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<=yo)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=yo)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}(Tt);Tt.empty=new zp([]);var jA=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}(Tt);class Ae{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 Ie(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 Ie(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 Ae(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 Ie(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>$A&&(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 Ae(a.append(o),s)}remapping(t,n){let r=new di;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 Ae(this.items.append(t.map(n=>new Ie(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 Ie(p,m,E))}else r.push(new Ie(p))},i);let c=[];for(let h=n;h<s;h++)c.push(new Ie(o.maps[h]));let u=this.items.slice(0,i).append(c).append(r),d=new Ae(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 Ie(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 Ae(Tt.from(i.reverse()),o)}}Ae.empty=new Ae(Tt.empty,0);class Ie{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 Ie(n.getMap().invert(),n,this.selection)}}}class en{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const $A=20;function qu(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 Ws(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 Ks=!1,Ju=null;function oo(e){let t=e.plugins;if(Ju!=t){Ks=!1,Ju=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Ks=!0;break}}return Ks}const yn=new ts("history"),VA=new ts("closeHistory");function YA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Qo({key:yn,state:{init:()=>new en(Ae.empty,Ae.empty,null,0,-1),apply:(t,n,r)=>function(i,o,s,a){let l,c=s.getMeta(yn);if(c)return c.historyState;s.getMeta(VA)&&(i=new en(i.done,i.undone,null,0,-1));let u=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(u&&u.getMeta(yn))return u.getMeta(yn).redo?new en(i.done.addTransform(s,void 0,a,oo(o)),i.undone,qu(s.mapping.maps),i.prevTime,i.prevComposition):new en(i.done,i.undone.addTransform(s,void 0,a,oo(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||u&&u.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new en(i.done.rebased(s,l),i.undone.rebased(s,l),Ws(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new en(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Ws(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,g)=>{for(let O=0;O<m.length;O+=2)A<=m[O+1]&&g>=m[O]&&(E=!0)}),E}(s,i.prevRanges)),f=u?Ws(i.prevRanges,s.mapping):qu(s.mapping.maps);return new en(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,oo(o)),Ae.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"?Xp:r=="historyRedo"?Wp:null;return!(!i||!t.editable)&&(n.preventDefault(),i(t.state,t.dispatch))}}}})}function Gp(e,t){return(n,r)=>{let i=yn.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let c=oo(a),u=yn.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 en(l?f:d.remaining,l?d.remaining:f,null,0,-1);return d.transform.setSelection(h).setMeta(yn,{redo:l,historyState:p})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const Xp=Gp(!1,!0),Wp=Gp(!0,!0),Kp=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function vr(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 Zu(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 Qu(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 Pa(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 zA=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof G&&e.selection.node.isBlock)return!(!n.parentOffset||!ro(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 Z||e.selection instanceof se)&&o.deleteSelection();let s=n.depth==0?null:Pa(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=ro(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!ro(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 qp(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&&!nu(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=B.empty;for(let m=r.length-1;m>=0;m--)h=B.from(r[m].create(null,h));h=B.from(o.copy(h));let f=e.tr.step(new re(t.pos-1,d,t.pos,d,new $(h,1,0),r.length,!0)),p=d+2*r.length;nu(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let l=Q.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&El(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&vr(s,"start",!0)&&vr(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=B.empty;for(let E=h.length-1;E>=0;E--)m=B.from(h[E].copy(m));n(e.tr.step(new re(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 Jp(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(Z.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const GA=Jp(-1),XA=Jp(1);function Cl(...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 qs=Cl(Kp,(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=Zu(r);if(!i){let s=r.blockRange(),a=s&&El(s);return a!=null&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&qp(e,i,t))return!0;if(r.parent.content.size==0&&(vr(o,"end")||G.isSelectable(o))){let s=Al(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(vr(o,"end")?Q.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):G.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=Zu(r)}let s=o&&o.nodeBefore;return!(!s||!G.isSelectable(s))&&(t&&t(e.tr.setSelection(G.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),td=Cl(Kp,(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=Qu(r);if(!i)return!1;let o=i.nodeAfter;if(qp(e,i,t))return!0;if(r.parent.content.size==0&&(vr(o,"start")||G.isSelectable(o))){let s=Al(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(vr(o,"start")?Q.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):G.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=Qu(r)}let s=o&&o.nodeAfter;return!(!s||!G.isSelectable(s))&&(t&&t(e.tr.setSelection(G.create(e.doc,o.pos)).scrollIntoView()),!0)});const Ye={Enter:Cl((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText(`
1197
- `).scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof se||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Pa(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(Z.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(ro(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&El(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},zA),"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=Pa(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(Q.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:qs,"Mod-Backspace":qs,"Shift-Backspace":qs,Delete:td,"Mod-Delete":td,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new se(e.doc))),!0)},Zp={"Ctrl-h":Ye.Backspace,"Alt-Backspace":Ye["Mod-Backspace"],"Ctrl-d":Ye.Delete,"Ctrl-Alt-Backspace":Ye["Mod-Delete"],"Alt-Delete":Ye["Mod-Delete"],"Alt-d":Ye["Mod-Delete"],"Ctrl-a":GA,"Ctrl-e":XA};for(let e in Ye)Zp[e]=Ye[e];const zi=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?Zp:Ye;function Nl(e,t){return e.reduce((n,r,i)=>n.concat(t(r,i)),[])}var vl={};function WA(e){return String.fromCharCode(parseInt(e.slice(1),16))}Object.defineProperty(vl,"__esModule",{value:!0});var KA=vl.encode=function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,WA))};function qA(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}vl.decode=function(e){return decodeURIComponent(Array.from(atob(e),qA).join(""))};const JA=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,ZA=e=>e.split(JA).filter(t=>t).map(t=>t[0]).join("")||e[Symbol.iterator]().next().value||"";function Qp(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)%nd.length;return nd[t]}function rs(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 Fa(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 tf(e){try{return new URL(e).hostname}catch(t){return}}function Gi(e){const t=e.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function ed(e,t){return e.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function QA(e){return[...e.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>e.substring(n))}const nd=["#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"],ii=(e,t,n=void 0)=>Nl(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:ii(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:ii(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:ii(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 Je(e,t){return n=>{const r=n;let i=0;const o=[];for(const s of rs(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 ef(e){return e.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const rd="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var Ha=(e=>(e[e.italic=1]="italic",e[e.strikethrough=2]="strikethrough",e[e.bold=4]="bold",e))(Ha||{});const tg=[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")}),eg={_:1,"*":4,"~":2};function ng(e){return nf(e,0)}function nf(e,t=0){const n=tg[t],r=n?function(i){const o=rg.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${rd}])(?:${i.source})(?=[\\s${rd}]|$)`,"g")),s=Je(o,a=>{const l=a[0][1],c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:Ha[eg[l]],children:[c]}]});return a=>{const[l,...c]=s(" "+a);return l.length>1&&c.unshift(l.substring(1)),c}}(n):()=>[e];return ii(r(e),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?nf(i,t|Ha[o]):[i])}const rg=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 Ba=function(e,t){return Ba=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])},Ba(e,t)};function Li(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}Ba(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _t=function(){return _t=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},_t.apply(this,arguments)};var ig=Object.prototype.hasOwnProperty;function ce(e){return typeof e=="boolean"}function _n(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Bn(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Xi=/\s+/,rf=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(Xi):[],o=t.split(Xi);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(Xi):[],o=t.split(Xi);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)ig.call(t,r)&&n.push(r+'="'+t[r]+'"');return n.join(" ")},e}();function id(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 Js(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 og=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 rf({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="&hellip;",c=3,l=8):(c=a.length,l=a.length),o.length<=s)return o;var u=s-c,d=function(g){var O={},S=g,R=S.match(/^([a-z]+):\/\//i);return R&&(O.scheme=R[1],S=S.slice(R[0].length)),(R=S.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(O.host=R[1],S=S.slice(R[0].length)),(R=S.match(/^\/(.*?)(?=(\?|#|$))/i))&&(O.path=R[1],S=S.slice(R[0].length)),(R=S.match(/^\?(.*?)(?=(#|$))/i))&&(O.query=R[1],S=S.slice(R[0].length)),(R=S.match(/^#(.*?)$/i))&&(O.fragment=R[1]),O}(o);if(d.query){var h=d.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);h&&(d.query=d.query.substr(0,h[1].length),o=id(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=id(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):Js(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+Js(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+Js(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="&hellip;",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="&hellip;",d=3):d=u.length,l=l.substring(0,c-d)+u),l}(o,s,a)}(t,r)},e}(),ki=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 wr(e){return e>=65&&e<=90||e>=97&&e<=122}function wt(e){return e>=48&&e<=57}function yl(e){return e==34||e==39}function Vn(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 Yn(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 of(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function sg(e){return e<91?e==40:e==91||e==123}function od(e){return e<93?e==41:e==93||e==125}var ag=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,sf=/https?:\/\//i,lg=new RegExp("^"+sf.source,"i"),cg=/^(javascript|vbscript):/i,ug=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,dg=/^(?:\/\/)?([^/#?:]+)/,mi=wr;function af(e){return wr(e)||wt(e)||e===43||e===45||e===46}var gn=Yn;function bl(e){return e===95||gn(e)}function lf(e){return Yn(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)||of(e)}function Ll(e){return e===47||e===63||e===35}function sd(e){return ag.test(e.toLowerCase())}var hg=/^(?:(?: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]?)$/,pg=/[:/?#]/,fg=/^(https?:\/\/)?(?:www\.)?/i,mg=/^\/\//,cf=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 Li(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(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(mg,"")),this.stripPrefix.scheme&&(n=n.replace(lg,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(fg,"$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"?"&quot;":o==="%26"?"&amp;":o==="%27"?"&#39;":o==="%3C"||o==="%3c"?"&lt;":"&gt;"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i}(n)),n},t}(ki),Eg=/^mailto:/i,uf=Yn;function kl(e){return uf(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 df=function(e){function t(n){var r=e.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Li(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}(ki);function hf(e){return e===95||Yn(e)}var Ag=["twitter","facebook","instagram","tiktok","youtube"],gg=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 Li(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:Bn(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}(ki),Dg={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function pf(e){return e===45||e===46||e===95||wr(e)||wt(e)}var _g=["twitter","instagram","soundcloud","tiktok","youtube"],Og=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 Li(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:Bn(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}(ki),Sg=/[-. ()]/,Tg=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 ff(e){return e===45||e===46||e===32}function wl(e){return e===44||e===59}var Rg=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 Li(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}(ki),Ig=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),ld(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),ld(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function is(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(Ua(r,11));else if(n===43)e.addMachine(Zs(r,37));else if(n===40)e.addMachine(Zs(r,32));else{if(wt(n)&&(e.addMachine(Zs(r,38)),e.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),uf(n)){var i=t.toLowerCase()==="m"?15:22;e.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}mi(n)&&e.addMachine(ss(r,0)),Yn(n)&&e.addMachine(Ua(r,5))}}function Cg(e,t,n){n===58?t.state=2:n===45?t.state=1:af(n)||e.removeMachine(t)}function Ng(e,t,n){var r=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(Ua(r,11))):af(n)?t.state=0:e.removeMachine(t))}function vg(e,t,n){var r=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):gn(n)?(t.state=5,mi(n)&&e.addMachine(ss(r,0))):e.removeMachine(t)}function yg(e,t,n){n===47?t.state=4:lf(n)?(t.state=10,t.acceptStateReached=!0):ct(e,t)}function bg(e,t,n,r){r===47?(t.state=10,t.acceptStateReached=!0):gn(r)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function Lg(e,t,n){n===47?t.state=12:e.removeMachine(t)}function kg(e,t,n){gn(n)?t.state=5:e.removeMachine(t)}function wg(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:Ll(n)?t.state=10:bl(n)||ct(e,t)}function Mg(e,t,n,r){r===45||(r===46?ct(e,t):gn(r)?t.state=5:ct(e,t))}function xg(e,t,n,r){r===46?ct(e,t):gn(r)?(t.state=5,t.acceptStateReached=!0):ct(e,t)}function Pg(e,t,n){n===46?t.state=14:n===58?t.state=8:wt(n)||(Ll(n)?t.state=10:Yn(n)?e.removeMachine(t):ct(e,t))}function Fg(e,t,n){wt(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):ct(e,t)}function Hg(e,t,n){wt(n)?t.state=9:ct(e,t)}function Bg(e,t,n){wt(n)||(Ll(n)?t.state=10:ct(e,t))}function Ug(e,t,n){lf(n)||ct(e,t)}function jg(e,t,n,r){n.toLowerCase()==="a"?t.state=16:zn(e,t,r)}function $g(e,t,n,r){n.toLowerCase()==="i"?t.state=17:zn(e,t,r)}function Vg(e,t,n,r){n.toLowerCase()==="l"?t.state=18:zn(e,t,r)}function Yg(e,t,n,r){n.toLowerCase()==="t"?t.state=19:zn(e,t,r)}function zg(e,t,n,r){n.toLowerCase()==="o"?t.state=20:zn(e,t,r)}function Gg(e,t,n){n===58?t.state=21:zn(e,t,n)}function Xg(e,t,n){kl(n)?t.state=22:e.removeMachine(t)}function zn(e,t,n){n===46?t.state=23:n===64?t.state=24:kl(n)?t.state=22:e.removeMachine(t)}function Wg(e,t,n){n===46||n===64?e.removeMachine(t):kl(n)?t.state=22:e.removeMachine(t)}function Kg(e,t,n){gn(n)?t.state=25:e.removeMachine(t)}function qg(e,t,n){n===46?t.state=27:n===45?t.state=26:bl(n)||ct(e,t)}function Jg(e,t,n){n===45||n===46?ct(e,t):bl(n)?t.state=25:ct(e,t)}function Zg(e,t,n){n===46||n===45?ct(e,t):gn(n)?(t.state=25,t.acceptStateReached=!0):ct(e,t)}function Qg(e,t,n){hf(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function tD(e,t,n){hf(n)||ct(e,t)}function eD(e,t,n){pf(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function nD(e,t,n){pf(n)||(Yn(n)?e.removeMachine(t):ct(e,t))}function rD(e,t,n,r){wt(r)?t.state=38:(e.removeMachine(t),is(e,n,r))}function iD(e,t,n,r){wt(r)?t.state=33:e.removeMachine(t),is(e,n,r)}function oD(e,t,n){wt(n)?t.state=34:e.removeMachine(t)}function sD(e,t,n){wt(n)?t.state=35:e.removeMachine(t)}function aD(e,t,n){n===41?t.state=36:e.removeMachine(t)}function lD(e,t,n,r){wt(r)?t.state=38:ff(r)?t.state=39:e.removeMachine(t)}function cD(e,t,n,r){var i=e.charIdx;t.acceptStateReached=!0,wl(r)?t.state=40:r===35?t.state=41:wt(r)||(r===40?t.state=32:ff(r)?t.state=39:(ct(e,t),mi(r)&&e.addMachine(ss(i,0))))}function uD(e,t,n,r){wt(r)?t.state=38:r===40?t.state=32:(ct(e,t),is(e,n,r))}function dD(e,t,n){wl(n)||(n===35?t.state=41:wt(n)?t.state=38:ct(e,t))}function hD(e,t,n){wl(n)?t.state=40:wt(n)?e.removeMachine(t):ct(e,t)}function ct(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 g={"(":0,"{":0,"[":0},O=0;O<A.length;O++){var S=A.charAt(O);sg(b=A.charCodeAt(O))?g[S]++:od(b)&&g[ad[S]]--}for(var R=A.length-1;R>=0;){var b;if(S=A.charAt(R),od(b=A.charCodeAt(R))){var I=ad[S];if(!(g[I]<0))break;g[I]++,R--}else{if(!of(b))break;R--}}return A.slice(0,R+1)}(p),t.type){case 0:if(r.charCodeAt(t.startIdx-1)===64)return;switch(t.matchType){case 0:var m=sf.exec(p);if(m&&(f+=m.index,p=p.slice(m.index)),!function(A){if(cg.test(A))return!1;var g=A.match(ug);if(!g)return!1;var O=!!g[1],S=g[2];return!!O||!(S.indexOf(".")===-1||!/[A-Za-z]/.test(S))}(p))return;break;case 1:if(!function(A){var g=A.match(dg);if(!g)return!1;var O=g[0].split(".");return!(O.length<2||!sd(O[O.length-1]))}(p))return;break;case 2:if(h=p.split(pg,1)[0],!hg.test(h))return;break;default:Bn(t)}n.push(new cf({tagBuilder:o,matchedText:p,offset:f,urlMatchType:pD(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:sd(p.split(".").pop())&&n.push(new df({tagBuilder:o,matchedText:p,offset:f,email:p.replace(Eg,"")}));break;case 2:p.length<=140&&n.push(new gg({tagBuilder:o,matchedText:p,offset:f,serviceName:c,hashtag:p.slice(1)}));break;case 3:(function(A,g){return Dg[g].test(A)})(p,u)&&n.push(new Og({tagBuilder:o,matchedText:p,offset:f,serviceName:u,mention:p.slice(1)}));break;case 4:if(p=p.replace(/ +$/g,""),((d=p).charAt(0)==="+"||Sg.test(d))&&Tg.test(d)){var E=p.replace(/[^0-9,;#]/g,"");n.push(new Rg({tagBuilder:o,matchedText:p,offset:f,number:E,plusSign:p.charAt(0)==="+"}))}break;default:Bn(t)}}}function pD(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Bn(e)}}var ad={")":"(","}":"{","]":"["};function ss(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function Ua(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function Zs(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function ld(e){return e.type===0&&e.matchType===0}var be=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},Ml=new be,fD=function(e,t){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Ml,this.html=e,this.callbacks=t};function mD(e,t){t==="<"&&Pe(e)}function ED(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new be(_t(_t({},e.currentTag),{isClosing:!0}))):t==="<"?Pe(e):wr(n)?(e.state=3,e.currentTag=new be(_t(_t({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=Ml)}function AD(e,t,n){Vn(n)?(e.currentTag=new be(_t(_t({},e.currentTag),{name:Qs(e)})),e.state=4):t==="<"?Pe(e):t==="/"?(e.currentTag=new be(_t(_t({},e.currentTag),{name:Qs(e)})),e.state=12):t===">"?(e.currentTag=new be(_t(_t({},e.currentTag),{name:Qs(e)})),Fe(e)):wr(n)||wt(n)||t===":"||me(e)}function gD(e,t,n){t===">"?me(e):wr(n)?e.state=3:me(e)}function DD(e,t,n){Vn(n)||(t==="/"?e.state=12:t===">"?Fe(e):t==="<"?Pe(e):t==="="||yl(n)||function(r){return r>=0&&r<=31||r==127}(n)?me(e):e.state=5)}function _D(e,t,n){Vn(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Fe(e):t==="<"?Pe(e):yl(n)&&me(e)}function OD(e,t,n){Vn(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Fe(e):t==="<"?Pe(e):yl(n)?me(e):e.state=5)}function SD(e,t,n){Vn(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?me(e):t==="<"?Pe(e):e.state=10)}function TD(e,t){t==='"'&&(e.state=11)}function RD(e,t){t==="'"&&(e.state=11)}function ID(e,t,n){Vn(n)?e.state=4:t===">"?Fe(e):t==="<"&&Pe(e)}function CD(e,t,n){Vn(n)?e.state=4:t==="/"?e.state=12:t===">"?Fe(e):t==="<"?Pe(e):(e.state=4,function(r){r.charIdx--}(e))}function ND(e,t){t===">"?(e.currentTag=new be(_t(_t({},e.currentTag),{isClosing:!0})),Fe(e)):me(e)}function vD(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new be(_t(_t({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new be(_t(_t({},e.currentTag),{type:"doctype"})),e.state=20):me(e)}function yD(e,t){t==="-"?e.state=15:t===">"?me(e):e.state=16}function bD(e,t){t==="-"?e.state=18:t===">"?me(e):e.state=16}function LD(e,t){t==="-"&&(e.state=17)}function kD(e,t){e.state=t==="-"?18:16}function wD(e,t){t===">"?Fe(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function MD(e,t){t==="-"?e.state=17:t===">"?Fe(e):e.state=16}function xD(e,t){t===">"?Fe(e):t==="<"&&Pe(e)}function me(e){e.state=0,e.currentTag=Ml}function Pe(e){e.state=1,e.currentTag=new be({idx:e.charIdx})}function Fe(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)),me(e),e.currentDataIdx=e.charIdx+1}function Qs(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}var PD=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),ce(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!ce(o.schemeMatches)||o.schemeMatches,tldMatches:!ce(o.tldMatches)||o.tldMatches,ipV4Matches:!ce(o.ipV4Matches)||o.ipV4Matches}}(t.urls),this.email=ce(t.email)?t.email:this.email,this.phone=ce(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=ce(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),ce(o)?{scheme:o,www:o}:{scheme:!ce(o.scheme)||o.scheme,www:!ce(o.www)||o.www}}(t.stripPrefix),this.stripTrailingSlash=ce(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=ce(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&_g.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&Ag.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=t.truncate)=="number"?{length:r,location:"end"}:_t({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 fD(s,a),c=s.length;l.charIdx<c;){var u=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:mD(l,u);break;case 1:ED(l,u,d);break;case 2:gD(l,u,d);break;case 3:AD(l,u,d);break;case 4:DD(l,u,d);break;case 5:_D(l,u,d);break;case 6:OD(l,u,d);break;case 7:SD(l,u,d);break;case 8:TD(l,u);break;case 9:RD(l,u);break;case 10:ID(l,u,d);break;case 11:CD(l,u,d);break;case 12:ND(l,u);break;case 13:vD(l);break;case 14:yD(l,u);break;case 15:bD(l,u);break;case 16:LD(l,u);break;case 17:kD(l,u);break;case 18:wD(l,u);break;case 19:MD(l,u);break;case 20:xD(l,u);break;default:Bn(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(/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/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,g=p.length;A<g;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,g=m.call(f),O=[];try{for(;(p===void 0||p-- >0)&&!(E=g.next()).done;)O.push(E.value)}catch(S){A={error:S}}finally{try{E&&!E.done&&(m=g.return)&&m.call(g)}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(FD);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||_n(t,function(n){return n.getType()==="hashtag"}),this.email||_n(t,function(n){return n.getType()==="email"}),this.phone||_n(t,function(n){return n.getType()==="phone"}),this.mention||_n(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||_n(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||_n(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||_n(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 Ig(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)is(l,c,u);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:Lg(l,h,u);break;case 12:kg(l,h,u);break;case 0:Cg(l,h,u);break;case 1:Ng(l,h,u);break;case 2:vg(l,h,u);break;case 3:yg(l,h,u);break;case 4:bg(l,h,0,u);break;case 5:wg(l,h,u);break;case 6:Mg(l,h,0,u);break;case 7:xg(l,h,0,u);break;case 13:Pg(l,h,u);break;case 14:Fg(l,h,u);break;case 8:Hg(l,h,u);break;case 9:Bg(l,h,u);break;case 10:Ug(l,h,u);break;case 15:jg(l,h,c,u);break;case 16:$g(l,h,c,u);break;case 17:Vg(l,h,c,u);break;case 18:Yg(l,h,c,u);break;case 19:zg(l,h,c,u);break;case 20:Gg(l,h,u);break;case 21:Xg(l,h,u);break;case 22:zn(l,h,u);break;case 23:Wg(l,h,u);break;case 24:Kg(l,h,u);break;case 25:qg(l,h,u);break;case 26:Jg(l,h,u);break;case 27:Zg(l,h,u);break;case 28:Qg(l,h,u);break;case 29:tD(l,h,u);break;case 30:eD(l,h,u);break;case 31:nD(l,h,u);break;case 32:iD(l,h,c,u);break;case 33:oD(l,h,u);break;case 34:sD(l,h,u);break;case 35:aD(l,h,u);break;case 36:lD(l,h,0,u);break;case 37:rD(l,h,c,u);break;case 38:cD(l,h,0,u);break;case 39:uD(l,h,c,u);break;case 40:dD(l,h,u);break;case 41:hD(l,h,u);break;default:Bn(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&mi(u)){var f=l.text.charCodeAt(l.charIdx-1);mi(f)||l.addMachine(ss(l.charIdx,0))}}}for(var p=l.stateMachines.length-1;p>=0;p--)l.stateMachines.forEach(function(m){return ct(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,"&lt;").replace(/>/g,"&gt;"));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 rf?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new og({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.1.5",e}();function FD(e,t){return e.getOffset()-t.getOffset()}function mf(e,t=e){return{type:"autolink",url:e,text:t}}const HD=()=>Je(/```([^]+?)```/g,([e,t])=>({type:"codespan",text:ef(t)})),BD=Je(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([e,t,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),n)),UD=Je(/<!!customemoji:(.*?)>/gm,([e,t])=>function(n){return{type:"customemoji",text:n}}(t)),Ef=Je(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([e,t,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[n])),jD=Je(/<actionlink:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=Af(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),$D=Je(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=Af(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function Af(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 VD=Je(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([e])=>function(t=[]){return{type:"bulletlist",children:t}}([e.startsWith(`
1198
- `)?e.slice(1):e])),YD=Je(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([e,t])=>({type:"bulletpoint",children:[t]})),gf=e=>{const t=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;let n=0;const r=[];for(const i of rs(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=mf("tel:"+s.replace(/[^0-9+]/g,""),s);r.push(l),n=a+s.length}return n<e.length&&r.push(e.substring(n)),r},Df=e=>Ef(e).flatMap(t=>typeof t=="string"?ta(t):["<",...ta(t.url),...ta("|"+t.children[0]+">")]),ta=e=>{const t=PD.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 df?l="mailto:"+i.getEmail():i instanceof cf&&(l=i.getUrl()),o>r&&n.push(e.substring(r,o)),n.push(mf(l,s)),r=o+a}return r<e.length&&n.push(e.substring(r)),n},zD=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],GD=function(e){const t=RegExp(`[^${e}]+${e}?|${e}`,"g");return n=>Array.from(n.match(t)||[])}(`
1199
- `);function _f(e,t={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:zD.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(VD,YD),s.includes("Mention")||o.singlelineSteps.push(BD),s.includes("CustomEmoji")||o.singlelineSteps.push(UD),s.includes("Codespan")||o.multilineSteps.push(HD()),s.includes("FormattedLink")||o.singlelineSteps.push(Ef),s.includes("Actions")||(o.singlelineSteps.push(jD),o.singlelineSteps.push($D)),s.includes("Wikitext")||o.singlelineSteps.push(ng),s.includes("Autolink")||o.singlelineSteps.push(Df,gf),o}(t);let r=Of(e,n);return r=Sf(r,!1),r}function Of(e,t){let n=[e];return n=ea(n,t.multilineSteps),n=ea(n,[GD]),n=ea(n,t.singlelineSteps),n=xl(n),n}function ea(e,t){return t.reduce((n,r)=>ii(n,r),e)}function xl(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:xl(r.children)}:r;return t}function Sf(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=Sf(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 XD(){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,Ot.marks.bold),a=a.removeMark(0,a.doc.content.size,Ot.marks.italic),a=a.removeMark(0,a.doc.content.size,Ot.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!==Ot.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=_f(c,{only:["Wikitext"]});[a]=Tf(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 Tf(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=Ot.marks[o.type],a=[...i,s];[e,r]=Tf(e,t,o.children,r,a),r+=1}else lt.unreachable();return[e,r]}function cd(e){return(t,n)=>{if(!n)return!0;let r=t.tr;const i=Z.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Ot.text(e,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Ot.text(e,r.storedMarks)),r=r.setSelection(Z.near(r.doc.resolve(i.to+1))),n(r),!0}}function WD(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 KD(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 ud({matcher:e=KD("#"),suggestionClass:t="ProseMirror-suggestion",onEnter:n=()=>!1,onChange:r=()=>!1,onExit:i=()=>!1,onKeyDown:o=()=>!1,debug:s=!1}){return new Qo({key:new ts("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?Et.create(a.doc,[ie.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 Rf({placeholder:e,disabled:t,className:n="",characterLimit:r,spellcheck:i}){const o=Ci(),s=T.useRef(),a=T.useRef(null);return T.useEffect(()=>(s.current=function(l,c,u,d,h){const f=rr.create({schema:Ot,plugins:[...h.filter(qD),YA(),Ku({...zi,"Mod-z":Xp,"Mod-y":Wp,"Mod-b":cd("*"),"Mod-i":cd("_"),"Mod-Enter":zi.Enter,"Shift-Enter":zi.Enter,Enter:u}),Ku({Enter:zi.Enter}),Wu]}),p=XD(),m=new Vp(l,{handlePaste:(E,A,g)=>WD(E,A,d),clipboardTextSerializer(E){const A=[];return E.content.forEach(g=>{g&&A.push(ef(g.textContent))}),A.join()},state:f,dispatchTransaction(E){E=(E=E.removeStoredMark(Ot.marks.literal)).removeStoredMark(Ot.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||c(new bo(A.doc)),m.updateState(A),E.steps.some(g=>g instanceof bt)&&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]),T.useEffect(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),T.useEffect(()=>_r(()=>{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]),T.useEffect(()=>_r(()=>{var c;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Wu,(c=o.placeholder$.get())!=null?c:e))}),[o,e]),T.useEffect(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),v.jsx("div",{className:`t-editor ${n}`,ref:a})}function dd(e){if(e.startsWith(":"))throw new Error("Not implemented");{const t=Ot.marks.emoji.create({emoji:e});return Ot.text(e,[t])}}function hd(e,t){const n=encodeURIComponent(e);return Ot.nodes.mention.create({id:e,name:t},Ot.text(`<!!mention:${n}|${t}>`))}const Vo=class Vo{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=Yp(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," ")}};Vo.EMPTY=new Vo(Ot.topNodeType.create());let bo=Vo;function qD(e){return e!=null}const pd=(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}},JD=/(^|\s)(:[^:\s]+:?)$/,ZD=/(^|\s)(@[^@]*)$/;class If{constructor(t,n,r){this.state$=t,this.device$=n,this.userPermissions$=r,this.currentDoc=bo.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$=mt(),this.placeholder$=mt()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return ud({debug:!1,matcher:pd(JD,Ot),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(lt.defined(t),t.canMention)return ud({debug:!1,matcher:pd(ZD,Ot),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(){lt.defined(this._suggestionRange),function(t,n){const{from:r,to:i}=n,o=t.state.tr.addMark(r,i,Ot.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){lt.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 hd(c,u);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?dd(h):Ot.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){lt.defined(this.editorView),function(n,r,i){const o=dd(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){lt.defined(this.editorView),function(n,r,i){const o=hd(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 QD=Symbol("no_render");function ee(e){const t=pe(!1),n=T.useRef({_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 q(()=>{if(!t.get())return QD;const r=typeof e=="function"?e():e.get();return n.current.value=r,r}),n.current}function Ze(){const e=Ni(),t=nt(),n=$h(),r=Jt(),i=ee(t.app$.appMetadata),o=ee(t.currentUser$),s=ee(t.state$.currentConversation),a=ee(t.t$),l=ee(t.device$),c=ee(t.themeCustom$),u=ee(()=>t.state$.typing.child(t.state$.extCurrentConversationId.get()).get()),d=ee(()=>t.state$.participants.child(t.state$.extCurrentConversationId.get()).get());return T.useMemo(()=>({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 Cf(){const e=Ni(),t=nt(),n=Jt(),r=$h(),i=ee(t.app$.appMetadata),o=ee(t.currentUser$),s=ee(t.t$),a=ee(t.device$),l=ee(t.themeCustom$);return T.useMemo(()=>({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 t_=(()=>{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})(),Ut={};t_?(Ut.setItem=window.localStorage.setItem.bind(window.localStorage),Ut.getItem=window.localStorage.getItem.bind(window.localStorage),Ut.removeItem=window.localStorage.removeItem.bind(window.localStorage),Ut.isSupported=!0):(Ut.setItem=function(){},Ut.getItem=function(){return null},Ut.removeItem=function(){},Ut.isSupported=!1),Ut.set=(e,t)=>Ut.setItem(e,JSON.stringify(t)),Ut.get=e=>JSON.parse(Ut.getItem(e)||"null");const ja="talkjs_drafts",e_=function(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}(200,(e,t,n,r)=>{const i=Nf(e,t,n),o=JSON.parse(Ut.getItem(ja)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,Ut.setItem(ja,JSON.stringify(o))}),Nf=(e,t,n)=>`draft_${e}_${t}_${n}`;function vf(e){const t=Jt(),n=nt(),r=Ze(),i=q(n.referencedMessage$),o=q(n.state$.userPermissions),s=Ci(),{sendMessage:a}=yE(),l=q(pe(()=>{const u=s.state$.get();return e.editMessageId===void 0?new Uc(u,a,e.attachFile,e.shareLocation,s.toggleEmojiPicker):new Uc(u,e.onEditMessage,()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,e.attachFile,e.editMessageId,e.onEditMessage,e.shareLocation,a])),c=T.useCallback(u=>s.setText(u),[s]);return function({appId:u,conversationId:d,meId:h,setText:f,enabled:p}){const m=T.useMemo(()=>Nf(d,h,u),[u,d,h]);T.useEffect(()=>{var A;if(!m||!p)return;const E=(A=JSON.parse(Ut.getItem(ja)||"{}")[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}),v.jsx(Vh.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:u=>s.selectEmoji(u)},children:v.jsx(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:l,editMessageId:e.editMessageId})})}function n_({message:e}){const t=nt(),n=vi(),r=q(t.state$.editingMessageId),i=T.useMemo(()=>Re(e.content[0].children),[e]),o=pe({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=T.useMemo(()=>new If(o,t.device$,t.state$.userPermissions),[o,t]),a=T.useCallback(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 T.useEffect(()=>{s.onEnter=a},[s,a]),T.useEffect(()=>{s.focus(),s.setText(Re(e.content[0].children,!0))},[s,e]),v.jsx(Fh.Provider,{value:s,children:v.jsx(vf,{editMessageId:r,onEditMessage:a})})}function r_(){const e=Jt(),t=Ze();return v.jsx(e.MessageListFooter,{common:t})}function i_(e){const t=Jt(),n=Ze();return v.jsx(t.MessageDivider,{common:n,...e})}function o_({message:e}){const t=Jt(),n=nt(),r=Ze(),[i,o]=T.useState("sent");return Ir(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}),v.jsx(t.Message,{common:r,message:e,messageStatus:i,permissions:n.messagePermissions$(e).get()})}function s_(){const e=Jt(),t=Ze();return v.jsx(e.BeforeMessages,{common:t})}function a_(){const e=Jt(),t=Ze();return v.jsx(e.AfterMessages,{common:t})}function l_({extConversationId:e}){const t=Ni(),n=nt(),r=vi(),i=T.useRef(!0),o=T.useRef(null);T.useLayoutEffect(()=>{i.current=o.current.scrollTop>-30}),T.useEffect(()=>{i.current&&(o.current.scrollTop=0)}),T.useEffect(()=>{const c=new IntersectionObserver(u=>n.state$.visibility.isInView.set(u[0].isIntersecting),{threshold:.9});return c.observe(o.current),()=>c.disconnect()},[n]),T.useEffect(()=>{const c=()=>n.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[n]);const[s,a]=T.useState(!1);T.useEffect(()=>{a(!1);const c=n.state$.currentConversation.peek();(c==null?void 0:c.isUnread)===!0&&t.conversation(e).markAsRead().catch(u=>{Do.warn("Could not mark conversation as read",u)})},[e,t,n]),Ir(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),g=A.visibility,O=A.opacity;return!(E.getClientRects().length===0||g==="hidden"||O==="0")}}(o.current);return f&&p&&m?t.conversation(u.id).markAsRead():void 0});const l=T.useCallback(c=>{const u=c.currentTarget;u.scrollHeight-u.clientHeight+u.scrollTop<90&&n.messageSubscription&&n.messageSubscription.loadMore(10)},[n.messageSubscription]);return v.jsxs("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:l,children:[v.jsx(a_,{}),v.jsx(_a,{each:n.chatItems$,children:c=>v.jsx("div",{className:"t-message-group",children:v.jsx(_a,{each:c,item:c_,itemProps:{controller:r,extConversationId:e}})})}),v.jsx(s_,{})]})}function c_({item$:e}){const t=nt(),n=q(e),r=q(t.state$.editingMessageId);return n instanceof Oa?v.jsx(i_,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?v.jsx(n_,{message:n}):v.jsx(o_,{message:n})}function Lo(e){const t=nt()instanceof Wh?u_:d_;return v.jsx(t,{...e})}function u_(e){const t=Jt(),n=Ze();return v.jsx(t.Icon,{common:n,...e})}function d_(e){const t=Jt(),n=Cf();return v.jsx(t.Icon,{common:n,...e})}function Pl(){const e=q(nt().t$);return v.jsx(Lo,{type:"spinner","aria-label":e.LOADING,className:"t-loading-icon"})}const h_=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function as({appId:e,chatboxState:t}){const n=e.charAt(0)==="t"||h_.has(e);return T.useEffect(()=>{switch(t.type){case"auth-failed":Ge.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ge.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":Ge.error(t.error);break;case"wrong-app-id":Ge.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:lt.never(t)}},[t]),v.jsxs("div",{className:"t-panel t-error-panel",children:[v.jsx("span",{className:"t-heading",children:"Something went wrong."}),v.jsx("p",{children:"Please reload the page and try again."}),n?v.jsxs("p",{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",v.jsx("br",{}),v.jsx("small",{children:"This message only shows up in test mode."})]}):v.jsx("p",{className:"text-balance",children:"If things keep not working, do not hesitate to get in touch with us."})]})}function p_(){const e=q(nt().t$);return v.jsx("div",{className:"t-panel t-error-panel",children:v.jsx("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.CHAT_NOT_FOUND})})}function yf(){return v.jsx("div",{className:"t-panel t-loading-panel",children:v.jsx(Pl,{})})}function bf(){const e=q(nt().t$);return v.jsxs("div",{className:"t-panel t-error-panel",children:[v.jsx("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.AUTH_EXPIRED_OVERLAY_TITLE}),v.jsx("p",{children:e.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const f_=()=>!0;async function Fl(e,t,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=f_}){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(()=>Fl(e-1,t,{initialDelay:c/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Ei(){const e={},t=new Promise(function(n,r){e.resolve=n,e.reject=r});return e.promise=t,e}function m_(e,t,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=T.useContext(Hh);return T.useCallback(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=Ei(),a=Ei(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(u){Ge.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 E_({onClose:e}){const t=nt(),n=vi(),r=Ni(),[i,o]=T.useState(null),s=T.useCallback(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(R){return/\.(mp4|ts|mov|webm|ogv)$/i.test(R)}(m.name)){const R=await na("video",m,y=>({width:y.videoWidth,height:y.videoHeight,duration:y.duration,filename:A})),b=E.uploadVideo(m,R),I=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:b,upload:{type:"video",file:m,metadata:R,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:I}))}}}if(function(R){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(R)}(m.name)){const R=await na("audio",m,b=>({duration:b.duration,filename:A}));return{uploadPromise:E.uploadAudio(m,R),upload:{type:"audio",file:m,metadata:R,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}if(function(R){return/(gif|png|jpg|jpeg|svg|bmp|webp)$/i.test(R)}(m.name)){const R=await na("img",m,b=>({width:b.naturalWidth,height:b.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,R),upload:{type:"image",file:m,metadata:R,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=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=Ei(),f={upload:u,closePreview:h.resolve,uploaded:!1,errored:!1};let p;o(f);try{p=await fd(c,h.promise),o({...f,uploaded:!0})}catch(m){if(m===$a)return;Ge.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;lt.defined(p),n.sendFileMessage({fileToken:p})}finally{e(),o(null)}},[n,r,o,t,e]),a=m_("geolocation",async l=>{try{const c=Ei(),u={upload:{type:"location",location:void 0},uploaded:!1,closePreview:c.resolve,errored:!1};o(u);const{permissionResult:d,location:h}=await fd(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===$a)return;throw c}finally{e(),o(null)}},[n,o,e]);return{attachFile:s,shareLocation:a,uploadState:i}}const $a=Symbol("cancelled");function fd(e,t){return Promise.race([e,t.then(()=>Promise.reject($a))])}async function na(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 Lf=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,Lf(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},md=new Map;function A_(e){var t=md.get(this);return t||(t=new Map,md.set(this,t)),(t=Lf(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===`
1200
- `||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 g_={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},D_=function(e){return g_[e]}("TALK_GMK");function kf(e,t=10){const n=T.useContext(pl),[r,i]=T.useState([]);return T.useEffect(()=>{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 $t(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 wi{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 Wi={decode:function(e,t){return $t(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 wf(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(wf(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Ed(e,t,n){const r=wf(e,t||{});return n==null||n.appendChild(r),r}var __=Object.freeze({__proto__:null,createElement:Ed,default:Ed});const O_={fetchBlob:function(e,t,n){return $t(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){$t(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 pt(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 Cn(e,t){const n=pt(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 rn(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 S_ extends wi{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=pt(!1),this._currentTime=pt(0),this._duration=pt(0),this._volume=pt(this.media.volume),this._muted=pt(this.media.muted),this._playbackRate=pt(this.media.playbackRate||1),this._seeking=pt(!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 $t(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 T_({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 R_({barAlign:e,halfHeight:t,topHeight:n,totalHeight:r,canvasHeight:i}){return e==="top"?0:e==="bottom"?i-r:t-n}function Ad(e,t,n){const r=t-e.left,i=n-e.top;return[r/e.width,i/e.height]}function Mf(e){return!!(e.barWidth||e.barGap||e.barAlign)}function gd(e,t){if(!Mf(t))return e;const n=t.barWidth||.5,r=n+(t.barGap||n/2);return r===0?e:Math.floor(e/r)*r}function Dd({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 _d(e){const t=e._cleanup;typeof t=="function"&&t()}class I_ extends wi{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]=Ad(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=Ad(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=pt({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Cn(()=>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=Cn(()=>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),_d(r)}}}(this.scrollContainer);const t=rn(()=>{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=pt(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:g,top:O}=A,S=D=>{if(D.defaultPrevented||l.size>1||c&&Date.now()-E<s)return;const _=D.clientX,w=D.clientY,k=_-f,x=w-p;(m||Math.abs(k)>i||Math.abs(x)>i)&&(D.preventDefault(),D.stopPropagation(),m||(a.set({type:"start",x:f-g,y:p-O}),m=!0),a.set({type:"move",x:_-g,y:w-O,deltaX:k,deltaY:x}),f=_,p=w)},R=D=>{if(l.delete(D.pointerId),m){const _=D.clientX,w=D.clientY;a.set({type:"end",x:_-g,y:w-O})}u()},b=D=>{l.delete(D.pointerId),D.relatedTarget&&D.relatedTarget!==document.documentElement||R(D)},I=D=>{m&&(D.stopPropagation(),D.preventDefault())},y=D=>{D.defaultPrevented||l.size>1||m&&D.preventDefault()};document.addEventListener("pointermove",S),document.addEventListener("pointerup",R),document.addEventListener("pointerout",b),document.addEventListener("pointercancel",b),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("click",I,{capture:!0}),u=()=>{document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",R),document.removeEventListener("pointerout",b),document.removeEventListener("pointercancel",b),document.removeEventListener("touchmove",y),setTimeout(()=>{document.removeEventListener("click",I,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{u(),n.removeEventListener("pointerdown",d),l.clear(),_d(a)}}}(this.wrapper);const t=rn(()=>{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=`
1195
+ `);return{dom:l,text:h,slice:t}}function kp(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 $(B.from(e.state.schema.text(t.replace(/\r\n?/g,`
1196
+ `))),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=Lr.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=Fp().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(d);if((f=m&&Pp[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?(zs||(zs=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:g=>g})),zs.createHTML(E)):E}(d),f)for(let E=0;E<f.length;E++)p=p.querySelector(f[E])||p;return p}(n),bi&&function(d){let h=d.querySelectorAll(Tt?"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")||di.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:h=>h.nodeName!="BR"||h.nextSibling||!h.parentNode||_A.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(g){return d}let{content:m,openStart:E,openEnd:A}=d;for(let g=f.length-2;g>=0;g-=2){let O=p.nodes[f[g]];if(!O||O.hasRequiredAttrs())break;m=B.from(O.create(f[g+1],m)),E++,A++}return new $(m,E,A)}(wu(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 g,O=m.findWrapping(A.type);if(!O)return E=null;if(g=E.length&&p.length&&Mp(O,p,A,E[E.length-1],0))E[E.length-1]=g;else{E.length&&(E[E.length-1]=xp(E[E.length-1],p.length));let S=wp(A,O);E.push(S),m=m.matchType(S.type),p=O}}),E)return B.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=wu(s,d,h)}return e.someProp("transformPasted",d=>{s=d(s,e,l)}),s}const _A=/^(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 wp(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,B.from(e));return e}function Mp(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=Mp(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(B.from(wp(n,e,i+1))))}}function xp(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,xp(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(B.empty,!0);return e.copy(n.append(r))}function Fa(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=Fa(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(B.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function wu(e,t,n){return t<e.openStart&&(e=new $(Fa(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new $(Fa(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Pp={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 Mu=null;function Fp(){return Mu||(Mu=document.implementation.createHTMLDocument("title"))}let zs=null;const $t={},Yt={},OA={touchstart:!0,touchmove:!0};class SA{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 an(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Gs(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Ha(e,r))})}function Ha(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function TA(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 Co(e){return{left:e.clientX,top:e.clientY}}function Il(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 dr(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 RA(e,t,n,r,i){return Il(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 z&&(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(z.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&&(dr(o,z.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&&z.isSelectable(l))&&(dr(o,new z(a)),!0)}(e,n))}function IA(e,t,n,r){return Il(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function CA(e,t,n,r){return Il(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&&(dr(i,q.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)dr(i,q.create(a,d+1,d+1+u.content.size));else{if(!z.isSelectable(u))continue;dr(i,z.create(a,d))}return!0}}(e,n,r)}function Ba(e){return vo(e)}Yt.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!xu(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Ye||!Tt||n.keyCode!=13))if(n.keyCode!=229&&e.domObserver.forceFlush(),!Ir||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",r=>r(e,n))||DA(e,n)?n.preventDefault():an(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,Tn(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},Yt.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Yt.keypress=(e,t)=>{let n=t;if(xu(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||ae&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof q&&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 Hp=ae?"metaKey":"ctrlKey";$t.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Ba(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[Hp]&&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(Co(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new vA(e,s,n,!!r)):(o=="doubleClick"?IA:CA)(e,s.pos,s.inside,n)?n.preventDefault():an(e,"pointer"))};class vA{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[Hp],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 z&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!de||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)),an(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(()=>Ge(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(Co(t))),this.updateAllowDefault(t),this.allowDefault||!n?an(this.view,"pointer"):RA(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Lt&&this.mightDrag&&!this.mightDrag.node.isAtom||Tt&&!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)?(dr(this.view,J.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):an(this.view,"pointer")}move(t){this.updateAllowDefault(t),an(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 xu(e,t){return!!e.composing||!!(Lt&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}$t.touchstart=e=>{e.input.lastTouch=Date.now(),Ba(e),an(e,"pointer")},$t.touchmove=e=>{e.input.lastTouch=Date.now(),an(e,"pointer")},$t.contextmenu=e=>Ba(e);const NA=Ye?5e3:-1;function Pu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>vo(e),t))}function Bp(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 yA(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=le(i=i.childNodes[o-1])}else{if(!i.parentNode||fi(i))return null;o=bt(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||fi(i))return null;o=bt(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 vo(e,t=!1){if(!(Ye&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Bp(e),t||e.docView&&e.docView.dirty){let n=Sl(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}}Yt.compositionstart=Yt.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof q&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Tt&&Op&&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(),vo(e,!0),e.markCursor=null;else if(vo(e,!t.selection.empty),de&&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}Pu(e,NA)},Yt.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++,Pu(e,20))};const ri=Kt&&cn<15||Ir&&aA<604;function ii(e,t,n,r,i){let o=kp(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 Up(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," "):""}$t.copy=Yt.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=ri?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Rl(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"))},Yt.paste=(e,t)=>{let n=t;if(e.composing&&!Ye)return;let r=ri?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ii(e,Up(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?ii(o,l.value,null,c,s):ii(o,l.textContent,l.innerHTML,c,s)},50)}(e,n)};class jp{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const bA=ae?"altKey":"ctrlKey";function Fu(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n!=null?n:!t[bA]}$t.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(Co(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof z?o.to-1:o.to))){if(r&&r.mightDrag)i=z.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=z.create(e.state.doc,d.posBefore))}}let a=(i||e.state.selection).content(),{dom:l,text:c,slice:u}=Rl(e,a);(!n.dataTransfer.files.length||!Tt||_p>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ri?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ri||n.dataTransfer.setData("text/plain",c),e.dragging=new jp(u,Fu(e,n),i)},$t.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Yt.dragover=Yt.dragenter=(e,t)=>t.preventDefault(),Yt.drop=(e,t)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Co(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=kp(n,Up(r.dataTransfer),ri?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Fu(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 g=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=g.depth;T>=0;T--){let y=T==g.depth?0:g.pos<=(g.start(T+1)+g.end(T+1))/2?-1:1,I=g.index(T)+(y>0?1:0),N=g.node(T),D=!1;if(S==1)D=N.canReplace(I,I,O);else{let _=N.contentMatchAt(I).findWrapping(O.firstChild.type);D=_&&N.canReplaceWith(I,I,_[0])}if(D)return y==0?g.pos:y<0?g.before(T+1):g.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&&z.isSelectable(a.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new z(p));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((E,A,g,O)=>m=O),u.setSelection(Tl(n,p,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))})(e,t,e.dragging)}finally{e.dragging=null}},$t.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())&&Ge(e)},20))},$t.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)},$t.beforeinput=(e,t)=>{if(Tt&&Ye&&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,Tn(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 Yt)$t[e]=Yt[e];function mi(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 No{constructor(t,n){this.toDOM=t,this.spec=n||wn,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 ne(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof No&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&mi(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class dn{constructor(t,n){this.attrs=t,this.spec=n||wn}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 ne(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof dn&&mi(this.attrs,t.attrs)&&mi(this.spec,t.spec)}static is(t){return t.type instanceof dn}destroy(){}}class Cl{constructor(t,n){this.attrs=t,this.spec=n||wn}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 ne(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 Cl&&mi(this.attrs,t.attrs)&&mi(this.spec,t.spec)}destroy(){}}class ne{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new ne(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 ne(t,t,new No(n,r))}static inline(t,n,r,i){return new ne(t,n,new dn(r,i))}static node(t,n,r,i){return new ne(t,n,new Cl(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof dn}get widget(){return this.type instanceof No}}const Qn=[],wn={};class ft{constructor(t,n){this.local=t.length?t:Qn,this.children=n.length?n:Qn}static create(t,n){return n.length?oo(n,t,0,wn):xt}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==xt||t.maps.length==0?this:this.mapInner(t,n,0,0,r||wn)}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 g=0;c.maps[E].forEach((O,S,T,y)=>{let I=y-T-(S-O);for(let N=0;N<p.length;N+=3){let D=p[N+1];if(D<0||O>D+A-g)continue;let _=p[N]+A-g;S>=_?p[N+1]=O<=_?-2:-1:O>=A&&I&&(p[N]+=I,p[N+1]+=I)}g+=I}),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),g=A-d;if(g<0||g>=u.content.size){m=!0;continue}let O=c.map(a[E+1]+h,-1)-d,{index:S,offset:T}=u.content.findIndex(g),y=u.maybeChild(S);if(y&&T==g&&T+y.nodeSize==O){let I=p[E+2].mapInner(c,y,A+1,a[E]+h+1,f);I!=xt?(p[E]=g,p[E+1]=O,p[E+2]=I):(p[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(g,O,S,T,y,I,N){function D(_,w){for(let k=0;k<_.local.length;k++){let x=_.local[k].map(T,y,w);x?S.push(x):N.onRemove&&N.onRemove(_.local[k].spec)}for(let k=0;k<_.children.length;k+=3)D(_.children[k+2],_.children[k]+w+1)}for(let _=0;_<g.length;_+=3)g[_+1]==-1&&D(g[_+2],O[_]+I+1);return S}(p,a,l,c,d,h,f),A=oo(E,u,0,f);l=A.local;for(let g=0;g<p.length;g+=3)p[g+1]<0&&(p.splice(g,3),g-=3);for(let g=0,O=0;g<A.children.length;g+=3){let S=A.children[g];for(;O<p.length&&p[O]<S;)O+=3;p.splice(O,0,A.children[g],A.children[g+1],A.children[g+2])}}return new ft(l.sort(Cn),p)}(this.children,s||[],t,n,r,i,o):s?new ft(s.sort(Cn),Qn):xt}add(t,n){return n.length?this==xt?ft.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=Vp(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,oo(c,a,u+1,wn)),o+=3}});let s=$p(o?Yp(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new ft(s.length?this.local.concat(s).sort(Cn):this.local,i||this.children)}remove(t){return t.length==0||this==xt?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!=xt?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 ft(i,r):xt}forChild(t,n){if(this==xt)return this;if(n.isLeaf)return ft.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 dn){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 ft(i.sort(Cn),Qn);return r?new nn([a,r]):a}return r||xt}eq(t){if(this==t)return!0;if(!(t instanceof ft)||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 vl(this.localsInner(t))}localsInner(t){if(this==xt)return Qn;if(t.inlineContent||!this.local.some(dn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof dn||n.push(this.local[r]);return n}forEachSet(t){t(this)}}ft.empty=new ft([],[]),ft.removeOverlap=vl;const xt=ft.empty;class nn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,wn));return nn.from(r)}forChild(t,n){if(n.isLeaf)return ft.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=xt&&(o instanceof nn?r=r.concat(o.members):r.push(o))}return nn.from(r)}eq(t){if(!(t instanceof nn)||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?vl(r?n:n.sort(Cn)):Qn}static from(t){switch(t.length){case 0:return xt;case 1:return t[0];default:return new nn(t.every(n=>n instanceof ft)?t:t.reduce((n,r)=>n.concat(r instanceof ft?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function $p(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 ne(i.from+t,i.to+t,i.type))}return n}function Vp(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 Yp(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function oo(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=Vp(e,a,l+n);if(c){o=!0;let u=oo(c,a,n+l+1,r);u!=xt&&i.push(l,l+a.nodeSize,u)}});let s=$p(o?Yp(e):e,-n).sort(Cn);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 ft(s,i):xt}function Cn(e,t){return e.from-t.from||e.to-t.to}function vl(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),Hu(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),Hu(t,i+1,o.copy(r.to,o.to)))}}return t}function Hu(e,t,n){for(;t<e.length&&Cn(n,e[t])>0;)t++;e.splice(t,0,n)}function Xs(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=xt&&t.push(r)}),e.cursorWrapper&&t.push(ft.create(e.state.doc,[e.cursorWrapper.deco])),nn.from(t)}const LA={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},kA=Kt&&cn<=11;class wA{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 MA{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new wA,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]);Kt&&cn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Lt&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),kA&&(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,LA)),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(Cu(this.view)){if(this.suppressingSelectionUpdates)return Ge(this.view);if(Kt&&cn<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Hn(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=Rr(o))r.add(o);for(let o=t.anchorNode;o;o=Rr(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)&&Cu(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(de&&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&&xA(t,d)==f||h.remove()}}}else if((Tt||Lt)&&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&&is(r)&&(c=Sl(t))&&c.eq(J.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Ge(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(u){if(!Bu.has(u)&&(Bu.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=de,Uu)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."),Uu=!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 g=A.firstChild;if(!g||g.nodeType!=1||g.contentEditable=="false"||/^(BR|IMG)$/.test(g.nodeName))break;A=g}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)||Ge(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(Kt&&cn<=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?bt(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?bt(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 Bu=new WeakMap,Uu=!1;function ju(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Hn(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function xA(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 PA(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Lt&&/^(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||Lt&&/^(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 FA=/^(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 HA(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let I=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,N=Sl(e,I);if(N&&!e.state.selection.eq(N)){if(Tt&&Ye&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",_=>_(e,Tn(13,"Enter"))))return;let D=e.state.tr.setSelection(N);I=="pointer"?D.setMeta("pointer",!0):I=="key"&&D.scrollIntoView(),o&&D.setMeta("composition",o),e.dispatch(D)}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(I,N,D){let _,{node:w,fromOffset:k,toOffset:x,from:L,to:M}=I.docView.parseRange(N,D),U=I.domSelectionRange(),H=U.anchorNode;if(H&&I.dom.contains(H.nodeType==1?H:H.parentNode)&&(_=[{node:H,offset:U.anchorOffset}],is(U)||_.push({node:U.focusNode,offset:U.focusOffset})),Tt&&I.input.lastKeyCode===8)for(let tt=x;tt>k;tt--){let rt=w.childNodes[tt-1],En=rt.pmViewDesc;if(rt.nodeName=="BR"&&!En){x=tt;break}if(!En||En.size)break}let V=I.state.doc,G=I.someProp("domParser")||di.fromSchema(I.state.schema),Y=V.resolve(L),nt=null,_t=G.parse(w,{topNode:Y.parent,topMatch:Y.parent.contentMatchAt(Y.index()),topOpen:!0,from:k,to:x,preserveWhitespace:Y.parent.type.whitespace!="pre"||"full",findPositions:_,ruleFromNode:PA,context:Y});if(_&&_[0].pos!=null){let tt=_[0].pos,rt=_[1]&&_[1].pos;rt==null&&(rt=tt),nt={anchor:tt+L,head:rt+L}}return{doc:_t,sel:nt,from:L,to:M}}(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(I,N,D,_,w){let k=I.findDiffStart(N,D);if(k==null)return null;let{a:x,b:L}=I.findDiffEnd(N,D+I.size,D+N.size);if(w=="end"&&(_-=x+Math.max(0,k-Math.min(x,L))-k),x<k&&I.size<N.size){let M=_<=k&&_>=x?k-_:0;k-=M,k&&k<N.size&&Vu(N.textBetween(k-1,k+1))&&(k+=M?1:-1),L=k+(L-x),x=k}else if(L<k){let M=_<=k&&_>=L?k-_:0;k-=M,k&&k<I.size&&Vu(I.textBetween(k-1,k+1))&&(k+=M?1:-1),x=k+(x-L),L=k}return{start:k,endA:x,endB:L}}(f.content,d.doc.content,d.from,l,c);if(p&&e.input.domChangeCount++,(Ir&&e.input.lastIOSEnter>Date.now()-225||Ye)&&i.some(I=>I.nodeType==1&&!FA.test(I.nodeName))&&(!p||p.endA>=p.endB)&&e.someProp("handleKeyDown",I=>I(e,Tn(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!p){if(!(r&&u instanceof q&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let I=$u(e,e.state.doc,d.sel);if(I&&!I.eq(e.state.selection)){let N=e.state.tr.setSelection(I);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 q&&(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)),Kt&&cn<=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),g=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=p.endA;if((Ir&&e.input.lastIOSEnter>Date.now()-225&&(!g||i.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!g&&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",I=>I(e,Tn(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>p.start&&function(I,N,D,_,w){if(D-N<=w.pos-_.pos||Ws(_,!0,!1)<w.pos)return!1;let k=I.resolve(N);if(!_.parent.isTextblock){let L=k.nodeAfter;return L!=null&&D==N+L.nodeSize}if(k.parentOffset<k.parent.content.size||!k.parent.isTextblock)return!1;let x=I.resolve(Ws(k,!0,!0));return!(!x.parent.isTextblock||x.pos>D||Ws(x,!0,!1)<D)&&_.parent.content.cut(_.parentOffset).eq(x.parent.content)}(h,p.start,p.endA,m,E)&&e.someProp("handleKeyDown",I=>I(e,Tn(8,"Backspace"))))return void(Ye&&Tt&&e.domObserver.suppressSelectionUpdates());Tt&&p.endB==p.start&&(e.input.lastChromeDelete=Date.now()),Ye&&!g&&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(I){return I(e,Tn(13,"Enter"))})},20));let O,S=p.start,T=p.endA,y=I=>{let N=I||e.state.tr.replace(S,T,d.doc.slice(p.start-d.from,p.endB-d.from));if(d.sel){let D=$u(e,N.doc,d.sel);D&&!(Tt&&e.composing&&D.empty&&(p.start!=p.endB||e.input.lastChromeDelete<Date.now()-100)&&(D.head==S||D.head==N.mapping.map(T)-1)||Kt&&D.empty&&D.head==S)&&N.setSelection(D)}return o&&N.setMeta("composition",o),N.scrollIntoView()};if(g)if(m.pos==E.pos){Kt&&cn<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ge(e),20));let I=y(e.state.tr.delete(S,T)),N=h.resolve(p.start).marksAcross(h.resolve(p.endA));N&&I.ensureMarks(N),e.dispatch(I)}else if(p.endA==p.endB&&(O=function(I,N){let D,_,w,k=I.firstChild.marks,x=N.firstChild.marks,L=k,M=x;for(let H=0;H<x.length;H++)L=x[H].removeFromSet(L);for(let H=0;H<k.length;H++)M=k[H].removeFromSet(M);if(L.length==1&&M.length==0)_=L[0],D="add",w=H=>H.mark(_.addToSet(H.marks));else{if(L.length!=0||M.length!=1)return null;_=M[0],D="remove",w=H=>H.mark(_.removeFromSet(H.marks))}let U=[];for(let H=0;H<N.childCount;H++)U.push(w(N.child(H)));if(B.from(U).eq(I))return{mark:_,type:D}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,p.endA-A.start())))){let I=y(e.state.tr);O.type=="add"?I.addMark(S,T,O.mark):I.removeMark(S,T,O.mark),e.dispatch(I)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,E.parentOffset),N=()=>y(e.state.tr.insertText(I,S,T));e.someProp("handleTextInput",D=>D(e,S,T,I,N))||e.dispatch(N())}else e.dispatch(y());else e.dispatch(y())}function $u(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Tl(e,t.resolve(n.anchor),t.resolve(n.head))}function Ws(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 Vu(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 zp{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 SA,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Wu),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=Gu(this),zu(this),this.nodeViews=Xu(this),this.docView=Du(this.state.doc,Yu(this),Xs(this),this.dom,this),this.domObserver=new MA(this,(r,i,o,s)=>HA(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in $t){let o=$t[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!TA(r,s)||Ha(r,s)||!r.editable&&s.type in Yt||o(r,s)},OA[i]?{passive:!0}:void 0)}Lt&&r.dom.addEventListener("input",()=>null),Gs(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&&Gs(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Wu),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&&(Bp(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=Xu(this);(function(p,m){let E=0,A=0;for(let g in p){if(p[g]!=m[g])return!0;E++}for(let g in m)A++;return E!=A})(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Gs(this),this.editable=Gu(this),zu(this);let l=Xs(this),c=Yu(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 g=(E.left+E.right)/2,O=A+1;O<Math.min(innerHeight,E.bottom);O+=5){let S=f.root.elementFromPoint(g,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:hu(f.dom)}}(this);if(s){this.domObserver.stop();let f=d&&(Kt||Tt)&&!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=Tt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=yA(this)),!o&&this.docView.update(t.doc,c,l,this)||(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Du(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 Hn(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Ge(this,f):(bp(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;pu(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 z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&du(this,n.getBoundingClientRect(),t)}else du(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 jp(t.slice,t.move,i<0?void 0:z.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(Kt){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(Kn)return t.focus(Kn);let n=hu(t);t.focus(Kn==null?{get preventScroll(){return Kn={preventScroll:!0},!0}}:void 0),Kn||(Kn=!1,pu(n,0))}(this.dom),Ge(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 uA(this,t)}coordsAtPos(t,n=1){return Rp(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 pA(this,n||this.state,t)}pasteHTML(t,n){return ii(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ii(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return Rl(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,[],Xs(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ba=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(n,r){Ha(n,r)||!$t[r.type]||!n.editable&&r.type in Yt||$t[r.type](n,r)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?Lt&&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 ju(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?ju(n,i):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Yu(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"),[ne.node(0,e.state.doc.content.size,t)]}function zu(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:ne.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Gu(e){return!e.someProp("editable",t=>t(e.state)===!1)}function Xu(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 Wu(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")}zp.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};const Dt=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=vt.from(e.nodes),t.marks=vt.from(e.marks||{}),this.nodes=zc.compile(this.spec.nodes,this),this.marks=ts.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]=Pn.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?Gc(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==""?[]:Gc(this,o.split(" "))}this.nodeFromJSON=r=>Ln.fromJSON(this,r),this.markFromJSON=r=>Q.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 zc))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 Ro(n,n.defaultAttrs,e,Q.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})}]}}}),Ks=new rs("placeholder"),Ku=new ns({key:Ks,props:{decorations(e){if(Gp(e.doc))return;const t=e.doc.firstChild,n=ne.node(0,t.nodeSize,{class:"empty-node","data-placeholder":Ks.getState(e)});return ft.create(e.doc,[n])}},state:{init:()=>"",apply:(e,t)=>{var n;return(n=e.getMeta(Ks))!=null?n:t}}});function Gp(e){return e.childCount!==1||e.firstChild.childCount!==0}for(var pn={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:"'"},yo={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},BA=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),UA=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Nt=0;Nt<10;Nt++)pn[48+Nt]=pn[96+Nt]=String(Nt);for(Nt=1;Nt<=24;Nt++)pn[Nt+111]="F"+Nt;for(Nt=65;Nt<=90;Nt++)pn[Nt]=String.fromCharCode(Nt+32),yo[Nt]=String.fromCharCode(Nt);for(var qs in pn)yo.hasOwnProperty(qs)||(yo[qs]=pn[qs]);const jA=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function $A(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);jA?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Js(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 qu(e){return new ns({props:{handleKeyDown:VA(e)}})}function VA(e){let t=function(n){let r=Object.create(null);for(let i in n)r[$A(i)]=n[i];return r}(e);return function(n,r){let i,o=function(a){var l=!(BA&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||UA&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?yo:pn)[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[Js(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[Js(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=pn[r.keyCode])&&i!=o){let a=t[Js(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var bo=200,St=function(){};St.prototype.append=function(e){return e.length?(e=St.from(e),!this.length&&e||e.length<bo&&this.leafAppend(e)||this.length<bo&&e.leafPrepend(this)||this.appendInner(e)):this},St.prototype.prepend=function(e){return e.length?St.from(e).append(this):this},St.prototype.appendInner=function(e){return new YA(this,e)},St.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?St.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},St.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},St.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)},St.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},St.from=function(e){return e instanceof St?e:e&&e.length?new Xp(e):St.empty};var Xp=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<=bo)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=bo)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}(St);St.empty=new Xp([]);var YA=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}(St);class fe{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 Se(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 Se(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 fe(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 Se(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>zA&&(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 fe(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 fe(this.items.append(t.map(n=>new Se(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 Se(p,m,E))}else r.push(new Se(p))},i);let c=[];for(let h=n;h<s;h++)c.push(new Se(o.maps[h]));let u=this.items.slice(0,i).append(c).append(r),d=new fe(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 Se(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 fe(St.from(i.reverse()),o)}}fe.empty=new fe(St.empty,0);class Se{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 Se(n.getMap().invert(),n,this.selection)}}}class Ze{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const zA=20;function Ju(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 Zs(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 Qs=!1,Zu=null;function so(e){let t=e.plugins;if(Zu!=t){Qs=!1,Zu=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Qs=!0;break}}return Qs}const vn=new rs("history"),GA=new rs("closeHistory");function XA(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ns({key:vn,state:{init:()=>new Ze(fe.empty,fe.empty,null,0,-1),apply:(t,n,r)=>function(i,o,s,a){let l,c=s.getMeta(vn);if(c)return c.historyState;s.getMeta(GA)&&(i=new Ze(i.done,i.undone,null,0,-1));let u=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(u&&u.getMeta(vn))return u.getMeta(vn).redo?new Ze(i.done.addTransform(s,void 0,a,so(o)),i.undone,Ju(s.mapping.maps),i.prevTime,i.prevComposition):new Ze(i.done,i.undone.addTransform(s,void 0,a,so(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||u&&u.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Ze(i.done.rebased(s,l),i.undone.rebased(s,l),Zs(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Ze(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),Zs(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,g)=>{for(let O=0;O<m.length;O+=2)A<=m[O+1]&&g>=m[O]&&(E=!0)}),E}(s,i.prevRanges)),f=u?Zs(i.prevRanges,s.mapping):Ju(s.mapping.maps);return new Ze(i.done.addTransform(s,h?o.selection.getBookmark():void 0,a,so(o)),fe.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"?Kp:r=="historyRedo"?qp:null;return!(!i||!t.editable)&&(n.preventDefault(),i(t.state,t.dispatch))}}}})}function Wp(e,t){return(n,r)=>{let i=vn.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let c=so(a),u=vn.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 Ze(l?f:d.remaining,l?d.remaining:f,null,0,-1);return d.transform.setSelection(h).setMeta(vn,{redo:l,historyState:p})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const Kp=Wp(!1,!0),qp=Wp(!0,!0),Jp=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Cr(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 Qu(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 td(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 Ua(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 WA=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof z&&e.selection.node.isBlock)return!(!n.parentOffset||!io(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 q||e.selection instanceof ie)&&o.deleteSelection();let s=n.depth==0?null:Ua(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=io(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!io(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 Zp(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&&!ru(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=B.empty;for(let m=r.length-1;m>=0;m--)h=B.from(r[m].create(null,h));h=B.from(o.copy(h));let f=e.tr.step(new ee(t.pos-1,d,t.pos,d,new $(h,1,0),r.length,!0)),p=d+2*r.length;ru(f.doc,p)&&f.join(p),n(f.scrollIntoView())}return!0}let l=J.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&gl(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Cr(s,"start",!0)&&Cr(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=B.empty;for(let E=h.length-1;E>=0;E--)m=B.from(h[E].copy(m));n(e.tr.step(new ee(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 Qp(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(q.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const KA=Qp(-1),qA=Qp(1);function Nl(...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 ta=Nl(Jp,(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=Qu(r);if(!i){let s=r.blockRange(),a=s&&gl(s);return a!=null&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&Zp(e,i,t))return!0;if(r.parent.content.size==0&&(Cr(o,"end")||z.isSelectable(o))){let s=Dl(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(Cr(o,"end")?J.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):z.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=Qu(r)}let s=o&&o.nodeBefore;return!(!s||!z.isSelectable(s))&&(t&&t(e.tr.setSelection(z.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),ed=Nl(Jp,(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=td(r);if(!i)return!1;let o=i.nodeAfter;if(Zp(e,i,t))return!0;if(r.parent.content.size==0&&(Cr(o,"start")||z.isSelectable(o))){let s=Dl(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(Cr(o,"start")?J.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):z.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=td(r)}let s=o&&o.nodeAfter;return!(!s||!z.isSelectable(s))&&(t&&t(e.tr.setSelection(z.create(e.doc,o.pos)).scrollIntoView()),!0)});const je={Enter:Nl((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText(`
1197
+ `).scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof ie||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Ua(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(q.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(io(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&gl(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},WA),"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=Ua(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(J.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:ta,"Mod-Backspace":ta,"Shift-Backspace":ta,Delete:ed,"Mod-Delete":ed,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new ie(e.doc))),!0)},tf={"Ctrl-h":je.Backspace,"Alt-Backspace":je["Mod-Backspace"],"Ctrl-d":je.Delete,"Ctrl-Alt-Backspace":je["Mod-Delete"],"Alt-Delete":je["Mod-Delete"],"Alt-d":je["Mod-Delete"],"Ctrl-a":KA,"Ctrl-e":qA};for(let e in je)tf[e]=je[e];const Gi=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?tf:je;function yl(e,t){return e.reduce((n,r,i)=>n.concat(t(r,i)),[])}var bl={};function JA(e){return String.fromCharCode(parseInt(e.slice(1),16))}Object.defineProperty(bl,"__esModule",{value:!0});var ZA=bl.encode=function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,JA))};function QA(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}bl.decode=function(e){return decodeURIComponent(Array.from(atob(e),QA).join(""))};const tg=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,eg=e=>e.split(tg).filter(t=>t).map(t=>t[0]).join("")||e[Symbol.iterator]().next().value||"";function ef(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)%rd.length;return rd[t]}function as(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 ja(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 nf(e){try{return new URL(e).hostname}catch(t){return}}function Xi(e){const t=e.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function nd(e,t){return e.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function ng(e){return[...e.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>e.substring(n))}const rd=["#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"],oi=(e,t,n=void 0)=>yl(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:oi(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:oi(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:oi(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 We(e,t){return n=>{const r=n;let i=0;const o=[];for(const s of as(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 rf(e){return e.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const id="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var $a=(e=>(e[e.italic=1]="italic",e[e.strikethrough=2]="strikethrough",e[e.bold=4]="bold",e))($a||{});const rg=[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")}),ig={_:1,"*":4,"~":2};function og(e){return of(e,0)}function of(e,t=0){const n=rg[t],r=n?function(i){const o=sg.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${id}])(?:${i.source})(?=[\\s${id}]|$)`,"g")),s=We(o,a=>{const l=a[0][1],c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:$a[ig[l]],children:[c]}]});return a=>{const[l,...c]=s(" "+a);return l.length>1&&c.unshift(l.substring(1)),c}}(n):()=>[e];return oi(r(e),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?of(i,t|$a[o]):[i])}const sg=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 Va=function(e,t){return Va=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])},Va(e,t)};function ki(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}Va(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var gt=function(){return gt=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},gt.apply(this,arguments)};var ag=Object.prototype.hasOwnProperty;function se(e){return typeof e=="boolean"}function gn(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Bn(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Wi=/\s+/,sf=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(Wi):[],o=t.split(Wi);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(Wi):[],o=t.split(Wi);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)ag.call(t,r)&&n.push(r+'="'+t[r]+'"');return n.join(" ")},e}();function od(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 ea(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 lg=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 sf({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="&hellip;",c=3,l=8):(c=a.length,l=a.length),o.length<=s)return o;var u=s-c,d=function(g){var O={},S=g,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=od(d))}if(o.length<=s||(d.host&&(d.host=d.host.replace(/^www\./,""),o=od(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):ea(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+ea(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+ea(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="&hellip;",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="&hellip;",d=3):d=u.length,l=l.substring(0,c-d)+u),l}(o,s,a)}(t,r)},e}(),wi=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 kr(e){return e>=65&&e<=90||e>=97&&e<=122}function kt(e){return e>=48&&e<=57}function Ll(e){return e==34||e==39}function Vn(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 Yn(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 af(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function cg(e){return e<91?e==40:e==91||e==123}function sd(e){return e<93?e==41:e==93||e==125}var ug=/^(?: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|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,lf=/https?:\/\//i,dg=new RegExp("^"+lf.source,"i"),hg=/^(javascript|vbscript):/i,pg=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,fg=/^(?:\/\/)?([^/#?:]+)/,Ei=kr;function cf(e){return kr(e)||kt(e)||e===43||e===45||e===46}var mn=Yn;function kl(e){return e===95||mn(e)}function uf(e){return Yn(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)||af(e)}function wl(e){return e===47||e===63||e===35}function ad(e){return ug.test(e.toLowerCase())}var mg=/^(?:(?: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]?)$/,Eg=/[:/?#]/,Ag=/^(https?:\/\/)?(?:www\.)?/i,gg=/^\/\//,df=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 ki(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(/&amp;/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(gg,"")),this.stripPrefix.scheme&&(n=n.replace(dg,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(Ag,"$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"?"&quot;":o==="%26"?"&amp;":o==="%27"?"&#39;":o==="%3C"||o==="%3c"?"&lt;":"&gt;"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i}(n)),n},t}(wi),Dg=/^mailto:/i,hf=Yn;function Ml(e){return hf(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 pf=function(e){function t(n){var r=e.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return ki(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}(wi);function ff(e){return e===95||Yn(e)}var _g=["twitter","facebook","instagram","tiktok","youtube"],Og=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 ki(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:Bn(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}(wi),Sg={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function mf(e){return e===45||e===46||e===95||kr(e)||kt(e)}var Tg=["twitter","instagram","soundcloud","tiktok","youtube"],Rg=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 ki(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:Bn(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}(wi),Ig=/[-. ()]/,Cg=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 Ef(e){return e===45||e===46||e===32}function xl(e){return e===44||e===59}var vg=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 ki(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}(wi),Ng=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),cd(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),cd(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function ls(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(Ya(r,11));else if(n===43)e.addMachine(na(r,37));else if(n===40)e.addMachine(na(r,32));else{if(kt(n)&&(e.addMachine(na(r,38)),e.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),hf(n)){var i=t.toLowerCase()==="m"?15:22;e.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}Ei(n)&&e.addMachine(cs(r,0)),Yn(n)&&e.addMachine(Ya(r,5))}}function yg(e,t,n){n===58?t.state=2:n===45?t.state=1:cf(n)||e.removeMachine(t)}function bg(e,t,n){var r=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(Ya(r,11))):cf(n)?t.state=0:e.removeMachine(t))}function Lg(e,t,n){var r=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):mn(n)?(t.state=5,Ei(n)&&e.addMachine(cs(r,0))):e.removeMachine(t)}function kg(e,t,n){n===47?t.state=4:uf(n)?(t.state=10,t.acceptStateReached=!0):at(e,t)}function wg(e,t,n,r){r===47?(t.state=10,t.acceptStateReached=!0):mn(r)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function Mg(e,t,n){n===47?t.state=12:e.removeMachine(t)}function xg(e,t,n){mn(n)?t.state=5:e.removeMachine(t)}function Pg(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:wl(n)?t.state=10:kl(n)||at(e,t)}function Fg(e,t,n,r){r===45||(r===46?at(e,t):mn(r)?t.state=5:at(e,t))}function Hg(e,t,n,r){r===46?at(e,t):mn(r)?(t.state=5,t.acceptStateReached=!0):at(e,t)}function Bg(e,t,n){n===46?t.state=14:n===58?t.state=8:kt(n)||(wl(n)?t.state=10:Yn(n)?e.removeMachine(t):at(e,t))}function Ug(e,t,n){kt(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):at(e,t)}function jg(e,t,n){kt(n)?t.state=9:at(e,t)}function $g(e,t,n){kt(n)||(wl(n)?t.state=10:at(e,t))}function Vg(e,t,n){uf(n)||at(e,t)}function Yg(e,t,n,r){n.toLowerCase()==="a"?t.state=16:zn(e,t,r)}function zg(e,t,n,r){n.toLowerCase()==="i"?t.state=17:zn(e,t,r)}function Gg(e,t,n,r){n.toLowerCase()==="l"?t.state=18:zn(e,t,r)}function Xg(e,t,n,r){n.toLowerCase()==="t"?t.state=19:zn(e,t,r)}function Wg(e,t,n,r){n.toLowerCase()==="o"?t.state=20:zn(e,t,r)}function Kg(e,t,n){n===58?t.state=21:zn(e,t,n)}function qg(e,t,n){Ml(n)?t.state=22:e.removeMachine(t)}function zn(e,t,n){n===46?t.state=23:n===64?t.state=24:Ml(n)?t.state=22:e.removeMachine(t)}function Jg(e,t,n){n===46||n===64?e.removeMachine(t):Ml(n)?t.state=22:e.removeMachine(t)}function Zg(e,t,n){mn(n)?t.state=25:e.removeMachine(t)}function Qg(e,t,n){n===46?t.state=27:n===45?t.state=26:kl(n)||at(e,t)}function tD(e,t,n){n===45||n===46?at(e,t):kl(n)?t.state=25:at(e,t)}function eD(e,t,n){n===46||n===45?at(e,t):mn(n)?(t.state=25,t.acceptStateReached=!0):at(e,t)}function nD(e,t,n){ff(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function rD(e,t,n){ff(n)||at(e,t)}function iD(e,t,n){mf(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function oD(e,t,n){mf(n)||(Yn(n)?e.removeMachine(t):at(e,t))}function sD(e,t,n,r){kt(r)?t.state=38:(e.removeMachine(t),ls(e,n,r))}function aD(e,t,n,r){kt(r)?t.state=33:e.removeMachine(t),ls(e,n,r)}function lD(e,t,n){kt(n)?t.state=34:e.removeMachine(t)}function cD(e,t,n){kt(n)?t.state=35:e.removeMachine(t)}function uD(e,t,n){n===41?t.state=36:e.removeMachine(t)}function dD(e,t,n,r){kt(r)?t.state=38:Ef(r)?t.state=39:e.removeMachine(t)}function hD(e,t,n,r){var i=e.charIdx;t.acceptStateReached=!0,xl(r)?t.state=40:r===35?t.state=41:kt(r)||(r===40?t.state=32:Ef(r)?t.state=39:(at(e,t),Ei(r)&&e.addMachine(cs(i,0))))}function pD(e,t,n,r){kt(r)?t.state=38:r===40?t.state=32:(at(e,t),ls(e,n,r))}function fD(e,t,n){xl(n)||(n===35?t.state=41:kt(n)?t.state=38:at(e,t))}function mD(e,t,n){xl(n)?t.state=40:kt(n)?e.removeMachine(t):at(e,t)}function at(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 g={"(":0,"{":0,"[":0},O=0;O<A.length;O++){var S=A.charAt(O);cg(y=A.charCodeAt(O))?g[S]++:sd(y)&&g[ld[S]]--}for(var T=A.length-1;T>=0;){var y;if(S=A.charAt(T),sd(y=A.charCodeAt(T))){var I=ld[S];if(!(g[I]<0))break;g[I]++,T--}else{if(!af(y))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=lf.exec(p);if(m&&(f+=m.index,p=p.slice(m.index)),!function(A){if(hg.test(A))return!1;var g=A.match(pg);if(!g)return!1;var O=!!g[1],S=g[2];return!!O||!(S.indexOf(".")===-1||!/[A-Za-z]/.test(S))}(p))return;break;case 1:if(!function(A){var g=A.match(fg);if(!g)return!1;var O=g[0].split(".");return!(O.length<2||!ad(O[O.length-1]))}(p))return;break;case 2:if(h=p.split(Eg,1)[0],!mg.test(h))return;break;default:Bn(t)}n.push(new df({tagBuilder:o,matchedText:p,offset:f,urlMatchType:ED(t.matchType),url:p,protocolRelativeMatch:p.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:ad(p.split(".").pop())&&n.push(new pf({tagBuilder:o,matchedText:p,offset:f,email:p.replace(Dg,"")}));break;case 2:p.length<=140&&n.push(new Og({tagBuilder:o,matchedText:p,offset:f,serviceName:c,hashtag:p.slice(1)}));break;case 3:(function(A,g){return Sg[g].test(A)})(p,u)&&n.push(new Rg({tagBuilder:o,matchedText:p,offset:f,serviceName:u,mention:p.slice(1)}));break;case 4:if(p=p.replace(/ +$/g,""),((d=p).charAt(0)==="+"||Ig.test(d))&&Cg.test(d)){var E=p.replace(/[^0-9,;#]/g,"");n.push(new vg({tagBuilder:o,matchedText:p,offset:f,number:E,plusSign:p.charAt(0)==="+"}))}break;default:Bn(t)}}}function ED(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Bn(e)}}var ld={")":"(","}":"{","]":"["};function cs(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function Ya(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function na(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function cd(e){return e.type===0&&e.matchType===0}var ve=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},Pl=new ve,AD=function(e,t){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Pl,this.html=e,this.callbacks=t};function gD(e,t){t==="<"&&we(e)}function DD(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new ve(gt(gt({},e.currentTag),{isClosing:!0}))):t==="<"?we(e):kr(n)?(e.state=3,e.currentTag=new ve(gt(gt({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=Pl)}function _D(e,t,n){Vn(n)?(e.currentTag=new ve(gt(gt({},e.currentTag),{name:ra(e)})),e.state=4):t==="<"?we(e):t==="/"?(e.currentTag=new ve(gt(gt({},e.currentTag),{name:ra(e)})),e.state=12):t===">"?(e.currentTag=new ve(gt(gt({},e.currentTag),{name:ra(e)})),Me(e)):kr(n)||kt(n)||t===":"||he(e)}function OD(e,t,n){t===">"?he(e):kr(n)?e.state=3:he(e)}function SD(e,t,n){Vn(n)||(t==="/"?e.state=12:t===">"?Me(e):t==="<"?we(e):t==="="||Ll(n)||function(r){return r>=0&&r<=31||r==127}(n)?he(e):e.state=5)}function TD(e,t,n){Vn(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Me(e):t==="<"?we(e):Ll(n)&&he(e)}function RD(e,t,n){Vn(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Me(e):t==="<"?we(e):Ll(n)?he(e):e.state=5)}function ID(e,t,n){Vn(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?he(e):t==="<"?we(e):e.state=10)}function CD(e,t){t==='"'&&(e.state=11)}function vD(e,t){t==="'"&&(e.state=11)}function ND(e,t,n){Vn(n)?e.state=4:t===">"?Me(e):t==="<"&&we(e)}function yD(e,t,n){Vn(n)?e.state=4:t==="/"?e.state=12:t===">"?Me(e):t==="<"?we(e):(e.state=4,function(r){r.charIdx--}(e))}function bD(e,t){t===">"?(e.currentTag=new ve(gt(gt({},e.currentTag),{isClosing:!0})),Me(e)):he(e)}function LD(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new ve(gt(gt({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new ve(gt(gt({},e.currentTag),{type:"doctype"})),e.state=20):he(e)}function kD(e,t){t==="-"?e.state=15:t===">"?he(e):e.state=16}function wD(e,t){t==="-"?e.state=18:t===">"?he(e):e.state=16}function MD(e,t){t==="-"&&(e.state=17)}function xD(e,t){e.state=t==="-"?18:16}function PD(e,t){t===">"?Me(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function FD(e,t){t==="-"?e.state=17:t===">"?Me(e):e.state=16}function HD(e,t){t===">"?Me(e):t==="<"&&we(e)}function he(e){e.state=0,e.currentTag=Pl}function we(e){e.state=1,e.currentTag=new ve({idx:e.charIdx})}function Me(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)),he(e),e.currentDataIdx=e.charIdx+1}function ra(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}var BD=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),se(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!se(o.schemeMatches)||o.schemeMatches,tldMatches:!se(o.tldMatches)||o.tldMatches,ipV4Matches:!se(o.ipV4Matches)||o.ipV4Matches}}(t.urls),this.email=se(t.email)?t.email:this.email,this.phone=se(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=se(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),se(o)?{scheme:o,www:o}:{scheme:!se(o.scheme)||o.scheme,www:!se(o.www)||o.www}}(t.stripPrefix),this.stripTrailingSlash=se(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=se(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&Tg.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&_g.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=t.truncate)=="number"?{length:r,location:"end"}:gt({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 AD(s,a),c=s.length;l.charIdx<c;){var u=s.charAt(l.charIdx),d=s.charCodeAt(l.charIdx);switch(l.state){case 0:gD(l,u);break;case 1:DD(l,u,d);break;case 2:OD(l,u,d);break;case 3:_D(l,u,d);break;case 4:SD(l,u,d);break;case 5:TD(l,u,d);break;case 6:RD(l,u,d);break;case 7:ID(l,u,d);break;case 8:CD(l,u);break;case 9:vD(l,u);break;case 10:ND(l,u,d);break;case 11:yD(l,u,d);break;case 12:bD(l,u);break;case 13:LD(l);break;case 14:kD(l,u);break;case 15:wD(l,u);break;case 16:MD(l,u);break;case 17:xD(l,u);break;case 18:PD(l,u);break;case 19:FD(l,u);break;case 20:HD(l,u);break;default:Bn(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(/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/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,g=p.length;A<g;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,g=m.call(f),O=[];try{for(;(p===void 0||p-- >0)&&!(E=g.next()).done;)O.push(E.value)}catch(S){A={error:S}}finally{try{E&&!E.done&&(m=g.return)&&m.call(g)}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(UD);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||gn(t,function(n){return n.getType()==="hashtag"}),this.email||gn(t,function(n){return n.getType()==="email"}),this.phone||gn(t,function(n){return n.getType()==="phone"}),this.mention||gn(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||gn(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||gn(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||gn(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 Ng(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)ls(l,c,u);else{for(var d=l.stateMachines.length-1;d>=0;d--){var h=l.stateMachines[d];switch(h.state){case 11:Mg(l,h,u);break;case 12:xg(l,h,u);break;case 0:yg(l,h,u);break;case 1:bg(l,h,u);break;case 2:Lg(l,h,u);break;case 3:kg(l,h,u);break;case 4:wg(l,h,0,u);break;case 5:Pg(l,h,u);break;case 6:Fg(l,h,0,u);break;case 7:Hg(l,h,0,u);break;case 13:Bg(l,h,u);break;case 14:Ug(l,h,u);break;case 8:jg(l,h,u);break;case 9:$g(l,h,u);break;case 10:Vg(l,h,u);break;case 15:Yg(l,h,c,u);break;case 16:zg(l,h,c,u);break;case 17:Gg(l,h,c,u);break;case 18:Xg(l,h,c,u);break;case 19:Wg(l,h,c,u);break;case 20:Kg(l,h,u);break;case 21:qg(l,h,u);break;case 22:zn(l,h,u);break;case 23:Jg(l,h,u);break;case 24:Zg(l,h,u);break;case 25:Qg(l,h,u);break;case 26:tD(l,h,u);break;case 27:eD(l,h,u);break;case 28:nD(l,h,u);break;case 29:rD(l,h,u);break;case 30:iD(l,h,u);break;case 31:oD(l,h,u);break;case 32:aD(l,h,c,u);break;case 33:lD(l,h,u);break;case 34:cD(l,h,u);break;case 35:uD(l,h,u);break;case 36:dD(l,h,0,u);break;case 37:sD(l,h,c,u);break;case 38:hD(l,h,0,u);break;case 39:pD(l,h,c,u);break;case 40:fD(l,h,u);break;case 41:mD(l,h,u);break;default:Bn(h.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Ei(u)){var f=l.text.charCodeAt(l.charIdx-1);Ei(f)||l.addMachine(cs(l.charIdx,0))}}}for(var p=l.stateMachines.length-1;p>=0;p--)l.stateMachines.forEach(function(m){return at(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,"&lt;").replace(/>/g,"&gt;"));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 sf?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new lg({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.1.5",e}();function UD(e,t){return e.getOffset()-t.getOffset()}function Af(e,t=e){return{type:"autolink",url:e,text:t}}const jD=()=>We(/```([^]+?)```/g,([e,t])=>({type:"codespan",text:rf(t)})),$D=We(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([e,t,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),n)),VD=We(/<!!customemoji:(.*?)>/gm,([e,t])=>function(n){return{type:"customemoji",text:n}}(t)),gf=We(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([e,t,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[n])),YD=We(/<actionlink:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=Df(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),zD=We(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=Df(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function Df(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 GD=We(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([e])=>function(t=[]){return{type:"bulletlist",children:t}}([e.startsWith(`
1198
+ `)?e.slice(1):e])),XD=We(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([e,t])=>({type:"bulletpoint",children:[t]})),_f=e=>{const t=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;let n=0;const r=[];for(const i of as(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=Af("tel:"+s.replace(/[^0-9+]/g,""),s);r.push(l),n=a+s.length}return n<e.length&&r.push(e.substring(n)),r},Of=e=>gf(e).flatMap(t=>typeof t=="string"?ia(t):["<",...ia(t.url),...ia("|"+t.children[0]+">")]),ia=e=>{const t=BD.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 pf?l="mailto:"+i.getEmail():i instanceof df&&(l=i.getUrl()),o>r&&n.push(e.substring(r,o)),n.push(Af(l,s)),r=o+a}return r<e.length&&n.push(e.substring(r)),n},WD=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],KD=function(e){const t=RegExp(`[^${e}]+${e}?|${e}`,"g");return n=>Array.from(n.match(t)||[])}(`
1199
+ `);function Sf(e,t={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:WD.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(GD,XD),s.includes("Mention")||o.singlelineSteps.push($D),s.includes("CustomEmoji")||o.singlelineSteps.push(VD),s.includes("Codespan")||o.multilineSteps.push(jD()),s.includes("FormattedLink")||o.singlelineSteps.push(gf),s.includes("Actions")||(o.singlelineSteps.push(YD),o.singlelineSteps.push(zD)),s.includes("Wikitext")||o.singlelineSteps.push(og),s.includes("Autolink")||o.singlelineSteps.push(Of,_f),o}(t);let r=Tf(e,n);return r=Rf(r,!1),r}function Tf(e,t){let n=[e];return n=oa(n,t.multilineSteps),n=oa(n,[KD]),n=oa(n,t.singlelineSteps),n=Fl(n),n}function oa(e,t){return t.reduce((n,r)=>oi(n,r),e)}function Fl(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:Fl(r.children)}:r;return t}function Rf(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=Rf(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 qD(){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,Dt.marks.bold),a=a.removeMark(0,a.doc.content.size,Dt.marks.italic),a=a.removeMark(0,a.doc.content.size,Dt.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!==Dt.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=Sf(c,{only:["Wikitext"]});[a]=If(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 If(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=Dt.marks[o.type],a=[...i,s];[e,r]=If(e,t,o.children,r,a),r+=1}else Z.unreachable();return[e,r]}function ud(e){return(t,n)=>{if(!n)return!0;let r=t.tr;const i=q.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Dt.text(e,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Dt.text(e,r.storedMarks)),r=r.setSelection(q.near(r.doc.resolve(i.to+1))),n(r),!0}}function JD(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 dd(e){const{matcher:t,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=e;return new ns({key:new rs("suggestions"),view(){return{update:(l,c)=>{const u=this.key.getState(c),d=this.key.getState(l.state);if(!u||!d)return;const h=u.active&&d.active&&u.range.from!==d.range.from,f=!u.active&&d.active,p=u.active&&!d.active,m=!f&&!p&&u.text!==d.text;(p||h)&&o({view:l,range:u.range,text:u.text}),m&&!h&&i({view:l,range:d.range,text:d.text}),(f||h)&&r({view:l,range:d.range,text:d.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,c){const{selection:u}=l,d={...c};if(u.from===u.to){(u.from<c.range.from||u.from>c.range.to)&&(d.active=!1);const h=u.$from,f=t(h);f?(d.active=!0,d.range=f.range,d.text=f.text):d.active=!1}else d.active=!1;return d.active||(d.range={from:0,to:0},d.text=null),d}},props:{handleKeyDown(l,c){var d;const u=this.getState(l.state);return!!(u!=null&&u.active)&&((d=s({view:l,event:c}))!=null?d:!1)},decorations(l){const c=this.getState(l);return c!=null&&c.active?ft.create(l.doc,[ne.inline(c.range.from,c.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const hd=(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}},ZD=/(^|\s)(:[^:\s]+:?)$/,QD=/(^|\s)(@[^@]*)$/;function Cf({placeholder:e,disabled:t,className:n="",characterLimit:r,spellcheck:i}){const o=vi(),s=R.useRef(),a=R.useRef(null);return R.useEffect(()=>(s.current=function(l,c,u,d,h){const f=ir.create({schema:Dt,plugins:[...h.filter(t_),XA(),qu({...Gi,"Mod-z":Kp,"Mod-y":qp,"Mod-b":ud("*"),"Mod-i":ud("_"),"Mod-Enter":Gi.Enter,"Shift-Enter":Gi.Enter,Enter:u}),qu({Enter:Gi.Enter}),Ku]}),p=qD(),m=new zp(l,{handlePaste:(E,A,g)=>JD(E,A,d),clipboardTextSerializer(E){const A=[];return E.content.forEach(g=>{g&&A.push(rf(g.textContent))}),A.join()},state:f,dispatchTransaction(E){E=(E=E.removeStoredMark(Dt.marks.literal)).removeStoredMark(Dt.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||c(new Lo(A.doc)),m.updateState(A),E.steps.some(g=>g instanceof yt)&&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]),R.useEffect(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),R.useEffect(()=>Bt(()=>{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]),R.useEffect(()=>Bt(()=>{var c;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Ku,(c=o.placeholder$.get())!=null?c:e))}),[o,e]),R.useEffect(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),v.jsx("div",{className:`t-editor ${n}`,ref:a})}function pd(e){if(e.startsWith(":"))throw new Error("Not implemented");{const t=Dt.marks.emoji.create({emoji:e});return Dt.text(e,[t])}}function fd(e,t){const n=encodeURIComponent(e);return Dt.nodes.mention.create({id:e,name:t},Dt.text(`<!!mention:${n}|${t}>`))}const Go=class Go{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=Gp(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," ")}};Go.EMPTY=new Go(Dt.topNodeType.create());let Lo=Go;function t_(e){return e!=null}class vf{constructor(t,n,r){this.state$=t,this.device$=n,this.userPermissions$=r,this.currentDoc=Lo.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$=dt(),this.placeholder$=dt()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return dd({debug:!1,matcher:hd(ZD,Dt),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(Z.defined(t),t.canMention)return dd({debug:!1,matcher:hd(QD,Dt),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(){Z.defined(this._suggestionRange),function(t,n){const{from:r,to:i}=n,o=t.state.tr.addMark(r,i,Dt.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){Z.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 fd(c,u);const[d,h]=a.match(/<!!customemoji:(.*?)>/)||[null];return d&&h?pd(h):Dt.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){Z.defined(this.editorView),function(n,r,i){const o=pd(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){Z.defined(this.editorView),function(n,r,i){const o=fd(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 e_=Symbol("no_render");function Qt(e){const t=ue(!1),n=R.useRef({_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 K(()=>{if(!t.get())return e_;const r=typeof e=="function"?e():e.get();return n.current.value=r,r}),n.current}function Ke(){const e=Ni(),t=et(),n=Yh(),r=qt(),i=Qt(t.app$.appMetadata),o=Qt(t.currentUser$),s=Qt(t.state$.currentConversation),a=Qt(t.t$),l=Qt(t.device$),c=Qt(t.themeCustom$),u=Qt(()=>t.state$.typing.child(t.state$.extCurrentConversationId.get()).get()),d=Qt(()=>t.state$.participants.child(t.state$.extCurrentConversationId.get()).get());return R.useMemo(()=>({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 Nf(){const e=Ni(),t=et(),n=qt(),r=Yh(),i=Qt(t.app$.appMetadata),o=Qt(t.currentUser$),s=Qt(t.t$),a=Qt(t.device$),l=Qt(t.themeCustom$);return R.useMemo(()=>({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 n_=(()=>{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})(),Ht={};n_?(Ht.setItem=window.localStorage.setItem.bind(window.localStorage),Ht.getItem=window.localStorage.getItem.bind(window.localStorage),Ht.removeItem=window.localStorage.removeItem.bind(window.localStorage),Ht.isSupported=!0):(Ht.setItem=function(){},Ht.getItem=function(){return null},Ht.removeItem=function(){},Ht.isSupported=!1),Ht.set=(e,t)=>Ht.setItem(e,JSON.stringify(t)),Ht.get=e=>JSON.parse(Ht.getItem(e)||"null");const za="talkjs_drafts",r_=function(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}(200,(e,t,n,r)=>{const i=yf(e,t,n),o=JSON.parse(Ht.getItem(za)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,Ht.setItem(za,JSON.stringify(o))}),yf=(e,t,n)=>`draft_${e}_${t}_${n}`;function bf(e){const t=qt(),n=et(),r=Ke(),i=K(n.referencedMessage$),o=K(n.state$.userPermissions),s=vi(),{sendMessage:a}=kE(),l=K(ue(()=>{const u=s.state$.get();return e.editMessageId===void 0?new jc(u,a,e.attachFile,e.shareLocation,s.toggleEmojiPicker):new jc(u,e.onEditMessage,()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,e.attachFile,e.editMessageId,e.onEditMessage,e.shareLocation,a])),c=R.useCallback(u=>s.setText(u),[s]);return function({appId:u,conversationId:d,meId:h,setText:f,enabled:p}){const m=R.useMemo(()=>yf(d,h,u),[u,d,h]);R.useEffect(()=>{var A;if(!m||!p)return;const E=(A=JSON.parse(Ht.getItem(za)||"{}")[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}),v.jsx(zh.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:u=>s.selectEmoji(u)},children:v.jsx(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:l,editMessageId:e.editMessageId})})}function i_({message:e}){const t=et(),n=yi(),r=K(t.state$.editingMessageId),i=R.useMemo(()=>Oe(e.content[0].children),[e]),o=ue({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=R.useMemo(()=>new vf(o,t.device$,t.state$.userPermissions),[o,t]),a=R.useCallback(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 R.useEffect(()=>{s.onEnter=a},[s,a]),R.useEffect(()=>{s.focus(),s.setText(Oe(e.content[0].children,!0))},[s,e]),v.jsx(Bh.Provider,{value:s,children:v.jsx(bf,{editMessageId:r,onEditMessage:a})})}function o_(){const e=qt(),t=Ke();return v.jsx(e.MessageListFooter,{common:t})}function s_(e){const t=qt(),n=Ke();return v.jsx(t.MessageDivider,{common:n,...e})}function a_({message:e}){const t=qt(),n=et(),r=Ke(),[i,o]=R.useState("sent");return Tr(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}),v.jsx(t.Message,{common:r,message:e,messageStatus:i,permissions:n.messagePermissions$(e).get()})}function l_(){const e=qt(),t=Ke();return v.jsx(e.BeforeMessages,{common:t})}function c_(){const e=qt(),t=Ke();return v.jsx(e.AfterMessages,{common:t})}function u_({extConversationId:e}){const t=Ni(),n=et(),r=yi(),i=R.useRef(!0),o=R.useRef(null);R.useLayoutEffect(()=>{i.current=o.current.scrollTop>-30}),R.useEffect(()=>{i.current&&(o.current.scrollTop=0)}),R.useEffect(()=>{const c=new IntersectionObserver(u=>n.state$.visibility.isInView.set(u[0].isIntersecting),{threshold:.9});return c.observe(o.current),()=>c.disconnect()},[n]),R.useEffect(()=>{const c=()=>n.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[n]);const[s,a]=R.useState(!1);R.useEffect(()=>{a(!1);const c=n.state$.currentConversation.peek();(c==null?void 0:c.isUnread)===!0&&t.conversation(e).markAsRead().catch(u=>{_o.warn("Could not mark conversation as read",u)})},[e,t,n]),Tr(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),g=A.visibility,O=A.opacity;return!(E.getClientRects().length===0||g==="hidden"||O==="0")}}(o.current);return f&&p&&m?t.conversation(u.id).markAsRead():void 0});const l=R.useCallback(c=>{const u=c.currentTarget;u.scrollHeight-u.clientHeight+u.scrollTop<90&&n.messageSubscription&&n.messageSubscription.loadMore(10)},[n.messageSubscription]);return v.jsxs("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:l,children:[v.jsx(c_,{}),v.jsx(Ra,{each:n.chatItems$,children:c=>v.jsx("div",{className:"t-message-group",children:v.jsx(Ra,{each:c,item:d_,itemProps:{controller:r,extConversationId:e}})})}),v.jsx(l_,{})]})}function d_({item$:e}){const t=et(),n=K(e),r=K(t.state$.editingMessageId);return n instanceof Ia?v.jsx(s_,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?v.jsx(i_,{message:n}):v.jsx(a_,{message:n})}function ko(e){const t=et()instanceof qh?h_:p_;return v.jsx(t,{...e})}function h_(e){const t=qt(),n=Ke();return v.jsx(t.Icon,{common:n,...e})}function p_(e){const t=qt(),n=Nf();return v.jsx(t.Icon,{common:n,...e})}function Hl(){const e=K(et().t$);return v.jsx(ko,{type:"spinner","aria-label":e.LOADING,className:"t-loading-icon"})}const f_=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function us({appId:e,chatboxState:t}){const n=e.charAt(0)==="t"||f_.has(e);return R.useEffect(()=>{switch(t.type){case"auth-failed":Ve.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Ve.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":Ve.error(t.error);break;case"wrong-app-id":Ve.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:Z.never(t)}},[t]),v.jsxs("div",{className:"t-panel t-error-panel",children:[v.jsx("span",{className:"t-heading",children:"Something went wrong."}),v.jsx("p",{children:"Please reload the page and try again."}),n?v.jsxs("p",{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",v.jsx("br",{}),v.jsx("small",{children:"This message only shows up in test mode."})]}):v.jsx("p",{className:"text-balance",children:"If things keep not working, do not hesitate to get in touch with us."})]})}function m_(){const e=K(et().t$);return v.jsx("div",{className:"t-panel t-error-panel",children:v.jsx("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.CHAT_NOT_FOUND})})}function Lf(){return v.jsx("div",{className:"t-panel t-loading-panel",children:v.jsx(Hl,{})})}function kf(){const e=K(et().t$);return v.jsxs("div",{className:"t-panel t-error-panel",children:[v.jsx("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.AUTH_EXPIRED_OVERLAY_TITLE}),v.jsx("p",{children:e.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const E_=()=>!0;async function Bl(e,t,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=E_}){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(()=>Bl(e-1,t,{initialDelay:c/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Ai(){const e={},t=new Promise(function(n,r){e.resolve=n,e.reject=r});return e.promise=t,e}function A_(e,t,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=R.useContext(Uh);return R.useCallback(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=Ai(),a=Ai(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(u){Ve.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 g_({onClose:e}){const t=et(),n=yi(),r=Ni(),[i,o]=R.useState(null),s=R.useCallback(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 sa("video",m,N=>({width:N.videoWidth,height:N.videoHeight,duration:N.duration,filename:A})),y=E.uploadVideo(m,T),I=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:y,upload:{type:"video",file:m,metadata:T,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:I}))}}}if(function(T){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(T)}(m.name)){const T=await sa("audio",m,y=>({duration:y.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 sa("img",m,y=>({width:y.naturalWidth,height:y.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=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=Ai(),f={upload:u,closePreview:h.resolve,uploaded:!1,errored:!1};let p;o(f);try{p=await md(c,h.promise),o({...f,uploaded:!0})}catch(m){if(m===Ga)return;Ve.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await h.promise==="cancel")return;Z.defined(p),n.sendFileMessage({fileToken:p})}finally{e(),o(null)}},[n,r,o,t,e]),a=A_("geolocation",async l=>{try{const c=Ai(),u={upload:{type:"location",location:void 0},uploaded:!1,closePreview:c.resolve,errored:!1};o(u);const{permissionResult:d,location:h}=await md(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===Ga)return;throw c}finally{e(),o(null)}},[n,o,e]);return{attachFile:s,shareLocation:a,uploadState:i}}const Ga=Symbol("cancelled");function md(e,t){return Promise.race([e,t.then(()=>Promise.reject(Ga))])}async function sa(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 wf=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,wf(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},Ed=new Map;function D_(e){var t=Ed.get(this);return t||(t=new Map,Ed.set(this,t)),(t=wf(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===`
1200
+ `||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 __={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},O_=function(e){return __[e]}("TALK_GMK");function Mf(e,t=10){const n=R.useContext(ml),[r,i]=R.useState([]);return R.useEffect(()=>{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 jt(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 Mi{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 Ki={decode:function(e,t){return jt(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 xf(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(xf(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function Ad(e,t,n){const r=xf(e,t||{});return n==null||n.appendChild(r),r}var S_=Object.freeze({__proto__:null,createElement:Ad,default:Ad});const T_={fetchBlob:function(e,t,n){return jt(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){jt(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 ht(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 Rn(e,t){const n=ht(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 tn(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 R_ extends Mi{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=ht(!1),this._currentTime=ht(0),this._duration=ht(0),this._volume=ht(this.media.volume),this._muted=ht(this.media.muted),this._playbackRate=ht(this.media.playbackRate||1),this._seeking=ht(!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 jt(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 I_({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 C_({barAlign:e,halfHeight:t,topHeight:n,totalHeight:r,canvasHeight:i}){return e==="top"?0:e==="bottom"?i-r:t-n}function gd(e,t,n){const r=t-e.left,i=n-e.top;return[r/e.width,i/e.height]}function Pf(e){return!!(e.barWidth||e.barGap||e.barAlign)}function Dd(e,t){if(!Pf(t))return e;const n=t.barWidth||.5,r=n+(t.barGap||n/2);return r===0?e:Math.floor(e/r)*r}function _d({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 Od(e){const t=e._cleanup;typeof t=="function"&&t()}class v_ extends Mi{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]=gd(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=gd(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=ht({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Rn(()=>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=Rn(()=>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),Od(r)}}}(this.scrollContainer);const t=tn(()=>{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=ht(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:g,top:O}=A,S=D=>{if(D.defaultPrevented||l.size>1||c&&Date.now()-E<s)return;const _=D.clientX,w=D.clientY,k=_-f,x=w-p;(m||Math.abs(k)>i||Math.abs(x)>i)&&(D.preventDefault(),D.stopPropagation(),m||(a.set({type:"start",x:f-g,y:p-O}),m=!0),a.set({type:"move",x:_-g,y:w-O,deltaX:k,deltaY:x}),f=_,p=w)},T=D=>{if(l.delete(D.pointerId),m){const _=D.clientX,w=D.clientY;a.set({type:"end",x:_-g,y:w-O})}u()},y=D=>{l.delete(D.pointerId),D.relatedTarget&&D.relatedTarget!==document.documentElement||T(D)},I=D=>{m&&(D.stopPropagation(),D.preventDefault())},N=D=>{D.defaultPrevented||l.size>1||m&&D.preventDefault()};document.addEventListener("pointermove",S),document.addEventListener("pointerup",T),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",N,{passive:!1}),document.addEventListener("click",I,{capture:!0}),u=()=>{document.removeEventListener("pointermove",S),document.removeEventListener("pointerup",T),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",N),setTimeout(()=>{document.removeEventListener("click",I,{capture:!0})},10)}};return n.addEventListener("pointerdown",d),{signal:a,cleanup:()=>{u(),n.removeEventListener("pointerdown",d),l.clear(),Od(a)}}}(this.wrapper);const t=tn(()=>{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=`
1201
1201
  <style${r?` nonce="${r}"`:""}>
1202
1202
  :host {
1203
1203
  user-select: none;
@@ -1270,18 +1270,18 @@
1270
1270
  <div class="cursor" part="cursor"></div>
1271
1271
  </div>
1272
1272
  </div>
1273
- `,[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:g}){const O=m/2,S=A.barWidth?A.barWidth*g:1,R=A.barGap?A.barGap*g:A.barWidth?S/2:0,b=S+R||1;return{halfHeight:O,barWidth:S,barGap:R,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*g: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:g,vScale:O,canvasHeight:S,barAlign:R,barMinHeight:b}){const I=p[0]||[],y=p[1]||I,D=I.length,_=[];let w=0,k=0,x=0;for(let N=0;N<=D;N++){const M=Math.round(N*m);if(M>w){const{topHeight:Y,totalHeight:z}=T_({maxTop:k,maxBottom:x,halfHeight:g,vScale:O,barMinHeight:b,barAlign:R}),V=R_({barAlign:R,halfHeight:g,topHeight:Y,totalHeight:z,canvasHeight:S});_.push({x:w*E,y:V,width:A,height:z}),w=M,k=0,x=0}const U=Math.abs(I[N]||0),F=Math.abs(y[N]||0);U>k&&(k=U),F>x&&(x=F)}return _}({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,g=h,O=m===0?-1:1,S=[{x:0,y:g}];let R=0,b=0;for(let I=0;I<=E;I++){const y=Math.round(I*A);if(y>R){const _=g+(Math.round(b*h*d)||1)*O;S.push({x:R,y:_}),R=y,b=0}const D=Math.abs(p[I]||0);D>b&&(b=D)}return S.push({x:R,y:g}),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});Mf(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 gd(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=gd(E,n),E<=0)return;const A=function({channelData:g,offset:O,clampedWidth:S,totalWidth:R}){return g.map(b=>{const I=Math.floor(O/R*b.length),y=Math.floor((O+S)/R*b.length);return b.slice(I,y)})}({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(Dd({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={}),Dd({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 $t(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 $t(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 C_ extends wi{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 ra extends wi{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 $t(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 $t(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 $t(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 N_={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Ai extends S_{static create(t){return new Ai(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const n=t.media||(t.backend==="WebAudio"?new ra: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({},N_,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:pt(0),m=(c=a==null?void 0:a.duration)!==null&&c!==void 0?c:pt(0),E=(u=a==null?void 0:a.isPlaying)!==null&&u!==void 0?u:pt(!1),A=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:pt(!1),g=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:pt(1),O=(f=a==null?void 0:a.playbackRate)!==null&&f!==void 0?f:pt(1),S=pt(null),R=pt(null),b=pt(""),I=pt(0),y=pt(0),D=Cn(()=>!E.value,[E]),_=Cn(()=>S.value!==null,[S]),w=Cn(()=>_.value&&m.value>0,[_,m]),k=Cn(()=>p.value,[p]),x=Cn(()=>m.value>0?p.value/m.value:0,[p,m]);return{state:{currentTime:p,duration:m,isPlaying:E,isPaused:D,isSeeking:A,volume:g,playbackRate:O,audioBuffer:S,peaks:R,url:b,zoom:I,scrollPosition:y,canPlay:_,isReady:w,progress:k,progressPercent:x},actions:{setCurrentTime:N=>{const M=Math.max(0,Math.min(m.value||1/0,N));p.set(M)},setDuration:N=>{m.set(Math.max(0,N))},setPlaying:N=>{E.set(N)},setSeeking:N=>{A.set(N)},setVolume:N=>{const M=Math.max(0,Math.min(1,N));g.set(M)},setPlaybackRate:N=>{const M=Math.max(.1,Math.min(16,N));O.set(M)},setAudioBuffer:N=>{S.set(N),N&&m.set(N.duration)},setPeaks:N=>{R.set(N)},setUrl:N=>{b.set(N)},setZoom:N=>{I.set(Math.max(0,N))},setScrollPosition:N=>{y.set(Math.max(0,N))}}}}({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 C_;const o=n?void 0:this.getMediaElement();this.renderer=new I_(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(rn(()=>{const s=t.isPlaying.value;n.emit(s?"play":"pause")},[t.isPlaying])),r.push(rn(()=>{const s=t.currentTime.value;n.emit("timeupdate",s),t.isPlaying.value&&n.emit("audioprocess",s)},[t.currentTime,t.isPlaying])),r.push(rn(()=>{t.isSeeking.value&&n.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let i=!1;r.push(rn(()=>{t.isReady.value&&!i&&(i=!0,n.emit("ready",t.duration.value))},[t.isReady,t.duration]));let o=!1;return r.push(rn(()=>{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(rn(()=>{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=Wi.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Wi.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 $t(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 O_.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 ra&&(a.duration=s)}if(r)this.decodedData=Wi.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Wi.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 $t(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 $t(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 $t(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield r.play.call(this);return n!=null&&(this.media instanceof ra?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return $t(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 $t(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 ko({src:e,onError:t,filename:n,className:r=""}){const i=T.useRef(null),o=T.useRef(),s=T.useRef(),[a,l]=T.useState(!1),[c,u]=T.useState(0),[d,h]=T.useState(1),f=T.useRef(),[p,m]=T.useState(!1),E=q(nt().t$);T.useEffect(()=>{o.current=new Audio;const O={normalize:!0,height:50,container:i.current};function S(){const I=o.current;I&&(I.error.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(I.load(),l(!1)):(m(!0),l(!1),t==null||t()))}const R=n.slice(n.lastIndexOf(".")+1);if(function(I){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(I)}(n)&&R==="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 I=o.current;I.addEventListener("error",S),I.preservesPitch=!0,O.url=e,O.media=I}f.current=function(I){var w,k,x,N,M,U,F,Y;if(!I.container)return;const y=getComputedStyle(I.container),D=(w=gi.parse(y.color))!=null?w:new gi(255,255,255,1),_=D.withAlpha(D.alpha/2);return Ai.create({...I,barGap:(k=I.barGap)!=null?k:2,barRadius:(x=I.barRadius)!=null?x:0,barWidth:(N=I.barWidth)!=null?N:2,barHeight:I.barHeight,hideScrollbar:!0,cursorWidth:(M=I.cursorWidth)!=null?M:0,cursorColor:I.cursorColor,height:(U=I.height)!=null?U:24,progressColor:(F=I.progressColor)!=null?F:_.toRgbaString(),waveColor:(Y=I.waveColor)!=null?Y:_.toRgbaString()})}(O);const b=f.current;return b.on("finish",()=>{o.current.loop=!0,l(!1)}),b.on("ready",I=>u(Math.trunc(I))),b.on("timeupdate",I=>u(Math.trunc(I))),O.backend==="WebAudio"&&b.load(e).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var I;(I=o.current)==null||I.removeEventListener("error",S),o.current=void 0,b.destroy(),f.current=void 0}},[e,n,t]);const A=T.useCallback(()=>{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)}},[]),g=T.useCallback(O=>{f.current.setPlaybackRate(O),h(O)},[]);return p?v.jsx("div",{}):v.jsxs("div",{className:`t-audio-player ${r}`,children:[v.jsx("button",{onClick:A,children:v.jsx(Lo,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),v.jsx("div",{className:"t-waveform",ref:i}),v.jsx("div",{className:"t-duration",children:Wl(c)}),v.jsxs(or,{type:"menu",popoverComponent:y_,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:g},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",v.jsx(Lo,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}Ai.BasePlugin=class extends wi{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}},Ai.dom=__;const v_=[.25,.5,.75,1,1.25,1.5,2];function y_({playbackSpeed:e,selectPlaybackSpeed:t}){return v.jsxs("div",{className:"t-playback-speed-menu",children:[v.jsx("div",{className:"t-playback-heading",children:"Playback Speed"}),v_.map(n=>v.jsxs(on,{className:"t-menu-item",onSelect:()=>t(n),children:[v.jsx("span",{className:"t-playback-checkmark",children:e===n?"✓ ":""}),n,"x"]},n))]})}const b_=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,L_=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class gi{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(b_))!=null?r:t.match(L_);if(n){const[i,o,s,a,l="1"]=n;return new gi(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new gi(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 xf=/^\/.*[^\\]\/[im]*$/;function Od(e){return xf.test(e)?!wo(e).test(""):!1}function wo(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 Pf(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function k_(e,t){const n=tf(t),r=Pf(e);return n!==void 0&&r.test(n)}const w_=/^[]/g;function Ff(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Va(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){}})(Va||(Va={}));const hr=Va,M_=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"),x_=/\uFE0F/g,P_="‍";function F_(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(P_)<0?n.replace(x_,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class Hf{constructor({mode:t,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:c,replacement:u}){if(hr.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(Od).map(d=>wo(d)),this.forbiddenMatches=(o||[]).filter(Od).map(d=>wo(d)),s){const d=s.split(`
1274
- `).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>Ff(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}hr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),hr(()=>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 Hl(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 Hf({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 H_({id:e,text:t}){var s;const n=nt(),r=q(()=>{var c;if(n.type==="ConversationListStore")return;const a=n.state$.extCurrentConversationId.get(),l=a&&n.state$.participants.child(a).get();return(c=l==null?void 0:l.find(u=>u.user.id===e))==null?void 0:c.user}),i=q(n.extUserId$)===e,o=`@${(s=r==null?void 0:r.name)!=null?s:t}`;return v.jsx("span",{className:"t-mention","t-is-current-user":i?"":void 0,children:o})}function B_({message:e,type:t,action:n,params:r,children:i}){const o=vi(),s=T.useCallback(l=>{l.preventDefault(),o.triggerMessageAction(e,n,r)},[o,e,n,r]),a={"t-action":n,onClick:s};return t==="actionButton"?v.jsx("button",{...a,type:"button",children:i}):v.jsx("a",{...a,href:"#",children:i})}function Un(e,t){const n=e.flatMap(r=>{if(typeof r=="string")return ia(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return U_(r,t);case"bulletlist":case"bulletList":return[T.createElement("ul",null,...Un(r.children,t))];case"autolink":case"autoLink":case"link":return $_(r,t);case"codeblock":case"codeBlock":return[v.jsx("code",{"data-language":r.language,children:ia(r.text,t.highlight)})];case"codespan":case"codeSpan":return v.jsx("code",{children:ia((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return hr.falsy(t.useFallbackMentions),v.jsx(H_,{id:r.id,text:r.text},r.id);case"suppressed":return[v.jsx("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[v.jsx(j_,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return V_(r,t);case"customemoji":case"customEmoji":return r.text;default:hr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function ia(e,t){if(t.length===0)return[e];const n=function(r){const i=r.map(s=>s.trim()).filter(s=>s);if(i.length===0)return w_;const o=i.map(Ff).join("|");return new RegExp(o,"gi")}(t);return Fa(e,rs(e,n).map(r=>({offset:r.index,matchedText:r[0]})),({matchedText:r})=>[v.jsx("span",{className:"highlighted-text",children:r})])}const U_=(e,t)=>{const n={bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[e.type];return[T.createElement(n,null,...Un(e.children,t))]};function j_({unicode:e}){const[t,n]=T.useState(()=>e!==":arslan:");if(T.useEffect(()=>{t&&!zh(e)&&n(!1)},[]),t)return v.jsx("span",{className:"t-emoji",children:e});const r=F_(e);return v.jsx("img",{className:"t-emoji",src:r,alt:e})}const $_=(e,t)=>{const n="children"in e?e.children:[e.text];switch(t.formattedLinks){case"link":{const r=function(i,o){for(const s of i)if(xf.test(s)){if(wo(s).test(o))return"_top"}else if(k_(s,o))return"_top";return"_blank"}(t.sameTabLinkRules,e.url);return[T.createElement("a",{target:r,href:e.url,rel:"noreferrer"},...Un(n,t))]}case"plaintext":return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[T.createElement(T.Fragment,null,...Un(n,t))];default:hr.never(t.formattedLinks)}},V_=(e,t)=>{if(!t.enableActions)return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[T.createElement(T.Fragment,null,...Un(e.children,t))];const n=e.type==="actionlink"?"actionLink":e.type==="actionbutton"?"actionButton":e.type;return[T.createElement(B_,{type:n,action:e.action,params:e.params,message:t.message},...Un(e.children,t))]};function Y_(e,t){return so(e,Hl(t))}function so(e,t){return e.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=oa(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,c=Nl(a,u=>rs(o,u)).filter(([u])=>!l.some(d=>u.match(d)!==null)).map(u=>({offset:u.index,matchedText:u[0]}));return Fa(o,c,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=oa(r,i=>function(o){return Fa(o,function(s){const a=[];let l;for(;l=M_.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=oa(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(Df),s.suppression.suppressPhoneNumbers&&a.push(gf),a.length===0)return[o];const l=Of(o,{multilineSteps:[],singlelineSteps:a}),c=l.map(u=>typeof u=="string"?u:Sd(u.url,s.suppression)?u.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return xl(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:so(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"?Sd(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,t);case"link":return{type:"link",url:n.url,children:so(n.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:so(n.children,t)}}})}function oa(e,t){return Nl(e,n=>typeof n=="string"?t(n):[n])}function Sd(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||Td(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=tf(e);return!t.suppressLinks||!n||Td(t.allowedHostnames,n)}}function Td(e,t){for(const n of e)if(Pf(n).test(t))return!0;return!1}function Bl({block:e,nonInteractive:t,message:n,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,c){var g;const u=nt(),d=q(u.app$.role);lt.defined(d);const h=c.type==="UserMessage",f=((g=c.sender)==null?void 0:g.id)===u.extUserId$.peek(),p=d.suppressContactInfo,m=h&&p.shouldSuppress({isContentBySender:f}),E=Y_(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 Un(l,{...Hl(c),message:u})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},n);return at.createElement("span",{className:`t-text ${r}`},...a)}function Bf(e){const t=Jt(),n=nt(),{className:r="",...i}=e,o=q(()=>n.state$.messages.child(n.state$.extCurrentConversationId.get()).lookup.child(e.message.id).content.child(0).url.get());return v.jsx("div",{className:`t-message-content ${r}`,children:e.message.content.map(s=>{var a;return v.jsx(z_,{block:s,theme:t,downloadUrl:o,...i},e.message.createdAt+((a=e.message.editedAt)!=null?a:0))})})}function z_({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:lt.never(a)}}(r,t);return v.jsx(o,{block:t,common:e,message:n,downloadUrl:i})}const G_=27;function Mi(e,t,n=!0){const r=T.useCallback(o=>{o.keyCode===G_&&e()},[e]),i=T.useCallback(o=>{o.target.closest(t)===null&&e()},[t,e]);T.useEffect(()=>{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 X_=".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)}",W_={"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 K_(e,t){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=e!=null?e:cr.emojiPickerTranslationUrl,r=W_["emoji-picker-element"],[i,o]=await Promise.all([Rd(r),Rd(n)]),s=t!=null?t:cr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Do.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function Rd(e){return import(e).catch(()=>new Function("url","return import(url)")(e)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function Ul(){const e=nt(),[t,n]=T.useState();return function(r,i,o,s){let a;X(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))?pe(s):void 0,c=T.useRef({});c.current.selector=r,c.current.reaction=a,l&&l.set(s),c.current.dispose||(c.current.dispose=_r(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)),CE(()=>{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(sa[s])return sa[s];const a=K_(i,o);return sa[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),t}const sa={};function jl(e){const{onClose:t,onEmojiSelected:n}=bE(),r=T.useRef(null),i=q(nt().t$),o=Ul();return T.useEffect(()=>{if(!o)return;lt.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,X_);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]),T.useEffect(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),Mi(()=>t(),".t-emoji-picker"),o?v.jsx("div",{className:"t-emoji-picker",children:v.jsx("emoji-picker",{locale:i.locale,ref:r,class:e.colorScheme,"data-source":o.value.dataSource})}):v.jsx("div",{className:"t-emoji-picker","t-loading":"",children:v.jsx(Pl,{})})}function Uf({messageId:e,colorScheme:t}){const{closePopover:n}=fl(),r=vi();return v.jsx("div",{className:"t-reaction-picker",children:v.jsx(Vh.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(e,i),n()}},children:v.jsx(jl,{colorScheme:t})})})}function Ya(){return Ya=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},Ya.apply(null,arguments)}function jf(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 za(e,t){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},za(e,t)}function $f(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,za(e,t)}function Vf(){}function Yf(){}Yf.resetWarningCache=Vf;function Id(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:Yf,resetWarningCache:Vf};n.PropTypes=n})();const Cd=!1,zf=T.createContext(null);var Wr="unmounted",On="exited",Sn="entering",Qn="entered",Ga="exiting",je=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=On,o.appearStatus=Sn):s=Qn:s=r.unmountOnExit||r.mountOnEnter?Wr:On,o.state={status:s},o.nextCallback=null,o}$f(t,e),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Wr?{status:On}: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!==Sn&&o!==Qn&&(i=Sn):o!==Sn&&o!==Qn||(i=Ga)}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===Sn?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===On&&this.setState({status:Wr})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[Qi.findDOMNode(this),s],l=a[0],c=a[1],u=this.getTimeouts(),d=s?u.appear:u.enter;!r&&!o||Cd?this.safeSetState({status:Qn},function(){i.props.onEntered(l)}):(this.props.onEnter(l,c),this.safeSetState({status:Sn},function(){i.props.onEntering(l,c),i.onTransitionEnd(d,function(){i.safeSetState({status:Qn},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:Qi.findDOMNode(this);i&&!Cd?(this.props.onExit(s),this.safeSetState({status:Ga},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:On},function(){r.props.onExited(s)})})})):this.safeSetState({status:On},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:Qi.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===Wr)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=jf(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return T.createElement(zf.Provider,{value:null},typeof o=="function"?o(r,s):T.cloneElement(T.Children.only(o),s))},t}(T.Component);function qn(){}je.contextType=zf,je.propTypes={},je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qn,onEntering:qn,onEntered:qn,onExit:qn,onExiting:qn,onExited:qn},je.UNMOUNTED=Wr,je.EXITED=On,je.ENTERING=Sn,je.ENTERED=Qn,je.EXITING=Ga;var aa=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=Id(r.className,i):r.setAttribute("class",Id(r.className&&r.className.baseVal||"",i)));var r,i})},Xa=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}$f(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&&aa(r,s),a&&aa(r,a),l&&aa(r,l)},n.render=function(){var r=this.props;r.classNames;var i=jf(r,["classNames"]);return T.createElement(je,Ya({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(T.Component);Xa.defaultProps={classNames:""},Xa.propTypes={};const q_={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function Gf(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]=q_[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 Xf({focused:e,setFocused:t,buttonId:n}){T.useLayoutEffect(()=>{var a;const s=n(e);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[e,n]);const r=T.useCallback(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=T.useMemo(()=>({role:"menu","aria-activedescendant":n(e)}),[e,n]),o=T.useCallback(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function Wf(e){const[t,n]=T.useState([]),[r,i]=T.useState([]),[o,s]=T.useState(0),[a,l]=T.useState(0),c=Ul(),u=T.useMemo(()=>(c==null?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),d=Ci(),h=q(d.state$.suggestEmojiQuery);T.useEffect(()=>{u&&(h?async function(){const g=await u.getPreferredSkinTone();l(g);let O=await u.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||function(R){return R.version<=Gh&&!Z_.includes(R.unicode)}(S)),function(S,R){R.sort((b,I)=>{var _,w;const y=(_=b.shortcodes)==null?void 0:_.find(k=>k.startsWith(S)),D=(w=I.shortcodes)==null?void 0:w.find(k=>k.startsWith(S));return y&&!D?-1:!y&&D?1:y&&D?y.length-D.length:0})}(h.substring(1),O),s(0),n(O),O.length>0&&i(O),h.endsWith(":")){const S=h.slice(1,-1),R=O.find(b=>{var I;return(I=b.shortcodes)==null?void 0:I.includes(S)});R&&d.selectEmoji(Kr(R,g))}}():n([]))},[h,d,u]);const f=T.useCallback(g=>{const O=t[g];return O&&"emoji-button-"+Kr(O,a)},[t,a]),{containerProps:p,itemProps:m}=Xf({focused:o,setFocused:s,buttonId:f}),E=t.length>0;Mi(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),T.useEffect(()=>{if(E)return d.listenKeydown("emoji",g=>Gf(g,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const O=t[o];lt.defined(O),d.selectEmoji(Kr(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,t,o,E,a]);const A=T.useRef(null);return v.jsx(Xa,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:v.jsx("div",{className:"t-emoji-suggest-bar",ref:A,...p,children:r.map((g,O)=>v.jsx(J_,{emoji:g,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},Kr(g,a)))})})}function Kr(e,t){return Wa(e)?Kf(e,t):e.name}function Wa(e){return!!e.unicode}function J_(e){var c;const{emoji:t,focused:n,skinTone:r,onSelect:i,...o}=e,s=((c=t.shortcodes)!=null?c:[]).join(", "),a=Wa(t)?[t.unicode,s].join(", "):s,l=Wa(t)?Kf(t,r):null;return v.jsx("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Kr(t,r)),...o,children:l})}function Kf(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 Z_=["🏻","🏼","🏽","🏾","🏿"],Q_=["top","right","bottom","left"],Ka=Math.min,pr=Math.max,Mo=Math.round,Ki=Math.floor,Le=e=>({x:e,y:e}),tO={left:"right",right:"left",bottom:"top",top:"bottom"},eO={start:"end",end:"start"};function $l(e,t){return typeof e=="function"?e(t):e}function Di(e){return e.split("-")[0]}function Vl(e){return e.split("-")[1]}function qf(e){return e==="y"?"height":"width"}const nO=new Set(["top","bottom"]);function ir(e){return nO.has(Di(e))?"y":"x"}function Jf(e){return ir(e)==="x"?"y":"x"}function qa(e){return e.replace(/start|end/g,t=>eO[t])}const Nd=["left","right"],vd=["right","left"],rO=["top","bottom"],iO=["bottom","top"];function oO(e,t,n,r){const i=Vl(e);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?vd:Nd:a?Nd:vd;case"left":case"right":return a?rO:iO;default:return[]}}(Di(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(qa)))),o}function qi(e){return e.replace(/left|right|bottom|top/g,t=>tO[t])}function xo(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 yd(e,t,n){let{reference:r,floating:i}=e;const o=ir(t),s=Jf(t),a=qf(s),l=Di(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(Vl(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function Ja(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}=$l(t,e),p=function(R){return typeof R!="number"?function(b){return{top:0,right:0,bottom:0,left:0,...b}}(R):{top:R,right:R,bottom:R,left:R}}(f),m=a[h?d==="floating"?"reference":"floating":d],E=xo(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,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=xo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,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 bd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ld(e){return Q_.some(t=>e[t]>=0)}function ls(){return typeof window!="undefined"}function yr(e){return Zf(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ke(e){var t;return(t=(Zf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zf(e){return!!ls()&&(e instanceof Node||e instanceof oe(e).Node)}function ge(e){return!!ls()&&(e instanceof Element||e instanceof oe(e).Element)}function Me(e){return!!ls()&&(e instanceof HTMLElement||e instanceof oe(e).HTMLElement)}function kd(e){return!(!ls()||typeof ShadowRoot=="undefined")&&(e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot)}const sO=new Set(["inline","contents"]);function _i(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=De(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!sO.has(i)}const aO=new Set(["table","td","th"]);function lO(e){return aO.has(yr(e))}const cO=[":popover-open",":modal"];function Po(e){return cO.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const uO=["transform","translate","scale","rotate","perspective"],dO=["transform","translate","scale","rotate","perspective","filter"],hO=["paint","layout","strict","content"];function Za(e){const t=Yl(),n=ge(e)?De(e):e;return uO.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||dO.some(r=>(n.willChange||"").includes(r))||hO.some(r=>(n.contain||"").includes(r))}function Yl(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const pO=new Set(["html","body","#document"]);function fr(e){return pO.has(yr(e))}function De(e){return oe(e).getComputedStyle(e)}function cs(e){return ge(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function dn(e){if(yr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||kd(e)&&e.host||ke(e);return kd(t)?t.host:t}function Qf(e){const t=dn(e);return fr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Me(t)&&_i(t)?t:Qf(t)}function Oi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qf(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=oe(i);if(o){const a=Qa(s);return t.concat(s,s.visualViewport||[],_i(i)?i:[],a&&n?Oi(a):[])}return t.concat(i,Oi(i,[],n))}function Qa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function tm(e){const t=De(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Me(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Mo(n)!==o||Mo(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function zl(e){return ge(e)?e:e.contextElement}function mr(e){const t=zl(e);if(!Me(t))return Le(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=tm(t);let s=(o?Mo(n.width):n.width)/r,a=(o?Mo(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const fO=Le(0);function em(e){const t=oe(e);return Yl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:fO}function jn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=zl(e);let s=Le(1);t&&(r?ge(r)&&(s=mr(r)):s=mr(e));const a=function(h,f,p){return f===void 0&&(f=!1),!(!p||f&&p!==oe(h))&&f}(o,n,r)?em(o):Le(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=oe(o),f=r&&ge(r)?oe(r):r;let p=h,m=Qa(p);for(;m&&r&&f!==p;){const E=mr(m),A=m.getBoundingClientRect(),g=De(m),O=A.left+(m.clientLeft+parseFloat(g.paddingLeft))*E.x,S=A.top+(m.clientTop+parseFloat(g.paddingTop))*E.y;l*=E.x,c*=E.y,u*=E.x,d*=E.y,l+=O,c+=S,p=oe(m),m=Qa(p)}}return xo({width:u,height:d,x:l,y:c})}function Fo(e,t){const n=cs(e).scrollLeft;return t?t.left+n:jn(ke(e)).left+n}function nm(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Fo(e,n),y:n.top+t.scrollTop}}const mO=new Set(["absolute","fixed"]);function wd(e,t,n){let r;if(t==="viewport")r=function(i,o){const s=oe(i),a=ke(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=Yl();(!p||p&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const f=Fo(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,g=Math.abs(a.clientWidth-m.clientWidth-A);g<=25&&(c-=g)}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=ke(i),s=cs(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+Fo(i);const d=-s.scrollTop;return De(a).direction==="rtl"&&(u+=pr(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}(ke(e));else if(ge(t))r=function(i,o){const s=jn(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=Me(i)?mr(i):Le(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=em(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return xo(r)}function rm(e,t){const n=dn(e);return!(n===t||!ge(n)||fr(n))&&(De(n).position==="fixed"||rm(n,t))}function EO(e,t,n){const r=Me(t),i=ke(t),o=n==="fixed",s=jn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Le(0);function c(){l.x=Fo(i)}if(r||!r&&!o)if((yr(t)!=="body"||_i(i))&&(a=cs(t)),r){const d=jn(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?Le(0):nm(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 la(e){return De(e).position==="static"}function Md(e,t){if(!Me(e)||De(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ke(e)===n&&(n=n.ownerDocument.body),n}function xd(e,t){const n=oe(e);if(Po(e))return n;if(!Me(e)){let i=dn(e);for(;i&&!fr(i);){if(ge(i)&&!la(i))return i;i=dn(i)}return n}let r=Md(e,t);for(;r&&lO(r)&&la(r);)r=Md(r,t);return r&&fr(r)&&la(r)&&!Za(r)?n:r||function(i){let o=dn(i);for(;Me(o)&&!fr(o);){if(Za(o))return o;if(Po(o))return null;o=dn(o)}return null}(e)||n}const AO={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=ke(r),a=!!t&&Po(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Le(1);const u=Le(0),d=Me(r);if((d||!d&&!o)&&((yr(r)!=="body"||_i(s))&&(l=cs(r)),Me(r))){const f=jn(r);c=mr(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=!s||d||o?Le(0):nm(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:ke,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?Po(t)?[]:function(c,u){const d=u.get(c);if(d)return d;let h=Oi(c,[],!1).filter(E=>ge(E)&&yr(E)!=="body"),f=null;const p=De(c).position==="fixed";let m=p?dn(c):c;for(;ge(m)&&!fr(m);){const E=De(m),A=Za(m);A||E.position!=="fixed"||(f=null),(p?!A&&!f:!A&&E.position==="static"&&f&&mO.has(f.position)||_i(m)&&!A&&rm(c,m))?h=h.filter(g=>g!==m):f=E,m=dn(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=wd(t,u,i);return c.top=pr(d.top,c.top),c.right=Ka(d.right,c.right),c.bottom=Ka(d.bottom,c.bottom),c.left=pr(d.left,c.left),c},wd(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:xd,getElementRects:async function(e){const t=this.getOffsetParent||xd,n=this.getDimensions,r=await n(e.floating);return{reference:EO(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}=tm(e);return{width:t,height:n}},getScale:mr,isElement:ge,isRTL:function(e){return De(e).direction==="rtl"}};function Pd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gO(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=zl(e),u=i||o?[...c?Oi(c):[],...Oi(t)]:[];u.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=c&&a?function(E,A){let g,O=null;const S=ke(E);function R(){var b;clearTimeout(g),(b=O)==null||b.disconnect(),O=null}return function b(I,y){I===void 0&&(I=!1),y===void 0&&(y=1),R();const D=E.getBoundingClientRect(),{left:_,top:w,width:k,height:x}=D;if(I||A(),!k||!x)return;const N={rootMargin:-Ki(w)+"px "+-Ki(S.clientWidth-(_+k))+"px "+-Ki(S.clientHeight-(w+x))+"px "+-Ki(_)+"px",threshold:pr(0,Ka(1,y))||1};let M=!0;function U(F){const Y=F[0].intersectionRatio;if(Y!==y){if(!M)return b();Y?b(!1,Y):g=setTimeout(()=>{b(!1,1e-7)},1e3)}Y!==1||Pd(D,E.getBoundingClientRect())||b(),M=!1}try{O=new IntersectionObserver(U,{...N,root:S.ownerDocument})}catch(F){O=new IntersectionObserver(U,N)}O.observe(E)}(!0),R}(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 g;(g=p)==null||g.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m=l?jn(e):null;return l&&function E(){const A=jn(e);m&&!Pd(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 DO=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}=$l(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Di(i),g=ir(a),O=Di(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),R=h||(O||!m?[qi(a)]:function(N){const M=qi(N);return[qa(N),M,qa(M)]}(a)),b=p!=="none";!h&&b&&R.push(...oO(a,m,p,S));const I=[a,...R],y=await Ja(t,E),D=[];let _=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&D.push(y[A]),d){const N=function(M,U,F){F===void 0&&(F=!1);const Y=Vl(M),z=Jf(M),V=qf(z);let J=z==="x"?Y===(F?"end":"start")?"right":"left":Y==="start"?"bottom":"top";return U.reference[V]>U.floating[V]&&(J=qi(J)),[J,qi(J)]}(i,s,S);D.push(y[N[0]],y[N[1]])}if(_=[..._,{placement:i,overflows:D}],!D.every(N=>N<=0)){var w,k;const N=(((w=o.flip)==null?void 0:w.index)||0)+1,M=I[N];if(M&&(!(d==="alignment"&&g!==ir(M))||_.every(F=>ir(F.placement)!==g||F.overflows[0]>0)))return{data:{index:N,overflows:_},reset:{placement:M}};let U=(k=_.filter(F=>F.overflows[0]<=0).sort((F,Y)=>F.overflows[1]-Y.overflows[1])[0])==null?void 0:k.placement;if(!U)switch(f){case"bestFit":{var x;const F=(x=_.filter(Y=>{if(b){const z=ir(Y.placement);return z===g||z==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(z=>z>0).reduce((z,V)=>z+V,0)]).sort((Y,z)=>Y[1]-z[1])[0])==null?void 0:x[0];F&&(U=F);break}case"initialPlacement":U=a}if(i!==U)return{reset:{placement:U}}}return{}}}},_O=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=$l(e,t);switch(r){case"referenceHidden":{const o=bd(await Ja(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Ld(o)}}}case"escaped":{const o=bd(await Ja(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Ld(o)}}}default:return{}}}}},OO=(e,t,n)=>{const r=new Map,i={platform:AO,...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}=yd(m,c,p),g=c,O={},S=0;for(let R=0;R<f.length;R++){const{name:b,fn:I}=f[R],{x:y,y:D,data:_,reset:w}=await I({x:E,y:A,initialPlacement:c,placement:g,strategy:u,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=y!=null?y:E,A=D!=null?D:A,O={...O,[b]:{...O[b],..._}},w&&S<=50&&(S++,typeof w=="object"&&(w.placement&&(g=w.placement),w.rects&&(m=w.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:u}):w.rects),{x:E,y:A}=yd(m,g,p)),R=-1)}return{x:E,y:A,placement:g,strategy:u,middlewareData:O}})(e,t,{...i,platform:o})};var ao=typeof document!="undefined"?T.useLayoutEffect:function(){};function Ho(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(!Ho(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)&&!Ho(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function im(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fd(e,t){const n=im(e);return Math.round(t*n)/n}function ca(e){const t=at.useRef(e);return ao(()=>{t.current=e}),t}const SO=(e,t)=>({...DO(e),options:[e,t]}),TO=(e,t)=>({..._O(e),options:[e,t]});var om={exports:{}},sm=["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])"],Bo=sm.join(","),am=typeof Element=="undefined",$n=am?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,lo=!am&&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},Si=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&&Si(e.parentNode)},lm=function(e,t,n){if(Si(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Bo));return t&&$n.call(e,Bo)&&r.unshift(e),r=r.filter(n)},Uo=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Si(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=Uo(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{$n.call(o,Bo)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),u=!Si(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var d=Uo(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},cm=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},an=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))&&!cm(e)?0:e.tabIndex},RO=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},um=function(e){return e.tagName==="INPUT"},IO=function(e){return function(t){return um(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,r=t.form||lo(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)},Hd=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},CO=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=$n.call(e,"details>summary:first-of-type")?e.parentElement:e;if($n.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Hd(e)}else{if(typeof r=="function"){for(var o=e;e;){var s=e.parentElement,a=lo(e);if(s&&!s.shadowRoot&&r(s)===!0)return Hd(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&&lo(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,g;m=!((A=p=(E=f=lo(p))===null||E===void 0?void 0:E.host)===null||A===void 0||(g=A.ownerDocument)===null||g===void 0||!g.contains(p))}return m}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},jo=function(e,t){return!(t.disabled||Si(t)||function(n){return um(n)&&n.type==="hidden"}(t)||CO(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!!$n.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(t))},tl=function(e,t){return!(IO(t)||an(t)<0||!jo(e,t))},NO=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},dm=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=an(c);return d<0&&u&&!cm(c)?0:d}(s,o),l=o?dm(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(RO).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},hm=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Uo([e],t.includeContainer,{filter:tl.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:NO}):lm(e,t.includeContainer,tl.bind(null,t)),dm(n)},Gl=function(e,t){return(t=t||{}).getShadowRoot?Uo([e],t.includeContainer,{filter:jo.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):lm(e,t.includeContainer,jo.bind(null,t))},Tn=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $n.call(e,Bo)!==!1&&tl(t,e)},vO=sm.concat("iframe").join(","),co=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $n.call(e,vO)!==!1&&jo(t,e)};const yO=Object.freeze(Object.defineProperty({__proto__:null,focusable:Gl,getTabIndex:an,isFocusable:co,isTabbable:Tn,tabbable:hm},Symbol.toStringTag,{value:"Module"}));function el(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 Bd(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=pm(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.
1275
- 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 bO(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 Ud(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 jd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(n),!0).forEach(function(r){bO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LO(e){return function(t){if(Array.isArray(t))return el(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||pm(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1276
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function pm(e,t){if(e){if(typeof e=="string")return el(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)?el(e,t):void 0}}var ze={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==ze.getActiveTrap(e)&&ze.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),ze.unpauseTrap(e)},pauseTrap:function(e){var t=ze.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=ze.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},oi=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},kO=function(e){return oi(e)&&!e.shiftKey},wO=function(e){return oi(e)&&e.shiftKey},$d=function(e){return setTimeout(e,0)},$r=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},Ji=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},MO=[];const xO=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)||MO,o=jd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:kO,isKeyBackward:wO},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(D,_,w){return D&&D[_]!==void 0?D[_]:o[w||_]},l=function(D,_){var w=typeof(_==null?void 0:_.composedPath)=="function"?_.composedPath():void 0;return s.containerGroups.findIndex(function(k){var x=k.container,N=k.tabbableNodes;return x.contains(D)||(w==null?void 0:w.includes(x))||N.find(function(M){return M===D})})},c=function(D){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=_.hasFallback,k=w!==void 0&&w,x=_.params,N=x===void 0?[]:x,M=o[D];if(typeof M=="function"&&(M=M.apply(void 0,LO(N))),M===!0&&(M=void 0),!M){if(M===void 0||M===!1)return M;throw new Error("`".concat(D,"` was specified but was not a node, or did not return a node"))}var U=M;if(typeof M=="string"){try{U=r.querySelector(M)}catch(F){throw new Error("`".concat(D,'` appears to be an invalid selector; error="').concat(F.message,'"'))}if(!U&&!k)throw new Error("`".concat(D,"` as selector refers to no known node"))}return U},u=function(){var D=c("initialFocus",{hasFallback:!0});if(D===!1)return!1;if(D===void 0||D&&!co(D,o.tabbableOptions))if(l(r.activeElement)>=0)D=r.activeElement;else{var _=s.tabbableGroups[0];D=_&&_.firstTabbableNode||c("fallbackFocus")}else D===null&&(D=c("fallbackFocus"));if(!D)throw new Error("Your focus-trap needs to have at least one focusable element");return D},d=function(){if(s.containerGroups=s.containers.map(function(D){var _=hm(D,o.tabbableOptions),w=Gl(D,o.tabbableOptions),k=_.length>0?_[0]:void 0,x=_.length>0?_[_.length-1]:void 0,N=w.find(function(F){return Tn(F)}),M=w.slice().reverse().find(function(F){return Tn(F)}),U=!!_.find(function(F){return an(F)>0});return{container:D,tabbableNodes:_,focusableNodes:w,posTabIndexesFound:U,firstTabbableNode:k,lastTabbableNode:x,firstDomTabbableNode:N,lastDomTabbableNode:M,nextTabbableNode:function(F){var Y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],z=_.indexOf(F);return z<0?Y?w.slice(w.indexOf(F)+1).find(function(V){return Tn(V)}):w.slice(0,w.indexOf(F)).reverse().find(function(V){return Tn(V)}):_[z+(Y?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(D){return D.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(D){return D.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(D){var _=D.activeElement;if(_)return _.shadowRoot&&_.shadowRoot.activeElement!==null?h(_.shadowRoot):_},f=function(D){D!==!1&&D!==h(document)&&(D&&D.focus?(D.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=D,function(_){return _.tagName&&_.tagName.toLowerCase()==="input"&&typeof _.select=="function"}(D)&&D.select()):f(u()))},p=function(D){var _=c("setReturnFocus",{params:[D]});return _||_!==!1&&D},m=function(D){var _=D.target,w=D.event,k=D.isBackward,x=k!==void 0&&k;_=_||Ji(w),d();var N=null;if(s.tabbableGroups.length>0){var M=l(_,w),U=M>=0?s.containerGroups[M]:void 0;if(M<0)N=x?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(x){var F=s.tabbableGroups.findIndex(function(W){var et=W.firstTabbableNode;return _===et});if(F<0&&(U.container===_||co(_,o.tabbableOptions)&&!Tn(_,o.tabbableOptions)&&!U.nextTabbableNode(_,!1))&&(F=M),F>=0){var Y=F===0?s.tabbableGroups.length-1:F-1,z=s.tabbableGroups[Y];N=an(_)>=0?z.lastTabbableNode:z.lastDomTabbableNode}else oi(w)||(N=U.nextTabbableNode(_,!1))}else{var V=s.tabbableGroups.findIndex(function(W){var et=W.lastTabbableNode;return _===et});if(V<0&&(U.container===_||co(_,o.tabbableOptions)&&!Tn(_,o.tabbableOptions)&&!U.nextTabbableNode(_))&&(V=M),V>=0){var J=V===s.tabbableGroups.length-1?0:V+1,rt=s.tabbableGroups[J];N=an(_)>=0?rt.firstTabbableNode:rt.firstDomTabbableNode}else oi(w)||(N=U.nextTabbableNode(_))}}else N=c("fallbackFocus");return N},E=function(D){var _=Ji(D);l(_,D)>=0||($r(o.clickOutsideDeactivates,D)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):$r(o.allowOutsideClick,D)||D.preventDefault())},A=function(D){var _=Ji(D),w=l(_,D)>=0;if(w||_ instanceof Document)w&&(s.mostRecentlyFocusedNode=_);else{var k;D.stopImmediatePropagation();var x=!0;if(s.mostRecentlyFocusedNode)if(an(s.mostRecentlyFocusedNode)>0){var N=l(s.mostRecentlyFocusedNode),M=s.containerGroups[N].tabbableNodes;if(M.length>0){var U=M.findIndex(function(F){return F===s.mostRecentlyFocusedNode});U>=0&&(o.isKeyForward(s.recentNavEvent)?U+1<M.length&&(k=M[U+1],x=!1):U-1>=0&&(k=M[U-1],x=!1))}}else s.containerGroups.some(function(F){return F.tabbableNodes.some(function(Y){return an(Y)>0})})||(x=!1);else x=!1;x&&(k=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(k||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},g=function(D){(o.isKeyForward(D)||o.isKeyBackward(D))&&function(_){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=_;var k=m({event:_,isBackward:w});k&&(oi(_)&&_.preventDefault(),f(k))}(D,o.isKeyBackward(D))},O=function(D){(function(_){return(_==null?void 0:_.key)==="Escape"||(_==null?void 0:_.key)==="Esc"||(_==null?void 0:_.keyCode)===27})(D)&&$r(o.escapeDeactivates,D)!==!1&&(D.preventDefault(),n.deactivate())},S=function(D){var _=Ji(D);l(_,D)>=0||$r(o.clickOutsideDeactivates,D)||$r(o.allowOutsideClick,D)||(D.preventDefault(),D.stopImmediatePropagation())},R=function(){if(s.active)return ze.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?$d(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",g,{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",g,!0),r.removeEventListener("keydown",O),n},I=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(D){D.some(function(_){return Array.from(_.removedNodes).some(function(w){return w===s.mostRecentlyFocusedNode})})&&f(u())}):void 0,y=function(){I&&(I.disconnect(),s.active&&!s.paused&&s.containers.map(function(D){I.observe(D,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(D){if(s.active)return this;var _=a(D,"onActivate"),w=a(D,"onPostActivate"),k=a(D,"checkCanFocusTrap"),x=ze.getActiveTrap(i),N=!1;x&&!x.paused&&(x._setSubtreeIsolation(!1),N=!0);try{k||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),_==null||_();var M=function(){k&&d(),R(),y(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),w==null||w()};if(k)return k(s.containers.concat()).then(M,M),this;M()}catch(U){throw x===ze.getActiveTrap(i)&&N&&x._setSubtreeIsolation(!0),U}return this},deactivate:function(D){if(!s.active)return this;var _=jd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},D);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),b(),s.active=!1,s.paused=!1,y(),ze.deactivateTrap(i,n);var w=a(_,"onDeactivate"),k=a(_,"onPostDeactivate"),x=a(_,"checkCanReturnFocus"),N=a(_,"returnFocus","returnFocusOnDeactivate");w==null||w();var M=function(){$d(function(){N&&f(p(s.nodeFocusedBeforeActivation)),k==null||k()})};return N&&x?(x(p(s.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(D){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,D)):this},unpause:function(D){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,D)):this},updateContainerElements:function(D){var _=[].concat(D).filter(Boolean);return s.containers=_.map(function(w){return typeof w=="string"?r.querySelector(w):w}),o.isolateSubtrees&&function(w){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var k,x=new Set,N=new Set,M=Bd(w);try{for(M.s();!(k=M.n()).done;){var U=k.value;x.add(U);for(var F=typeof ShadowRoot!="undefined"&&U.getRootNode()instanceof ShadowRoot,Y=U;Y;){x.add(Y);var z=Y.parentElement,V=[];z?V=z.children:!z&&F&&(V=Y.getRootNode().children,z=Y.getRootNode().host,F=typeof ShadowRoot!="undefined"&&z.getRootNode()instanceof ShadowRoot);var J,rt=Bd(V);try{for(rt.s();!(J=rt.n()).done;){var W=J.value;N.add(W)}}catch(et){rt.e(et)}finally{rt.f()}Y=z}}}catch(et){M.e(et)}finally{M.f()}x.forEach(function(et){N.delete(et)}),s.adjacentElements=N}(s.containers),s.active&&(d(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),y(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(D,_){if(s.paused===D)return this;if(s.paused=D,D){var w=a(_,"onPause"),k=a(_,"onPostPause");w==null||w(),b(),y(),n._setSubtreeIsolation(!1),k==null||k()}else{var x=a(_,"onUnpause"),N=a(_,"onPostUnpause");x==null||x(),n._setSubtreeIsolation(!0),d(),R(),y(),N==null||N()}return this}},_setSubtreeIsolation:{value:function(D){o.isolateSubtrees&&s.adjacentElements.forEach(function(_){D?((_.inert||_.hasAttribute("inert"))&&s.alreadyInert.add(_),_.inert=!0):s.alreadyInert.has(_)||(_.inert=!1)})}}}),n.updateContainerElements(e),n}},Symbol.toStringTag,{value:"Module"})),PO=Lh(xO),FO=Lh(yO);function Er(e){return Er=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},Er(e)}var ua,da;function HO(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,mm(s.key),s)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function BO(e,t,n){return t=$o(t),function(r,i){if(i&&(Er(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,fm()?Reflect.construct(t,n||[],$o(e).constructor):t.apply(e,n))}function fm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fm=function(){return!!e})()}function $o(e){return $o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$o(e)}function nl(e,t){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},nl(e,t)}function mm(e){var t=function(n,r){if(Er(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(Er(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return Er(t)=="symbol"?t:t+""}var qr=T,UO=PO.createFocusTrap,jO=FO.isFocusable,$O=parseInt((ua=(da=/^(\d+)\./.exec(qr.version))===null||da===void 0?void 0:da[1])!==null&&ua!==void 0?ua:0,10),rl=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=mm(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=BO(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&&nl(t,n)}(e,qr.Component),HO(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||jO(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?qr.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===qr.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return qr.cloneElement(n,{ref:function(r){var i=t.props.containerElements;n&&($O>=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}}])}();rl.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:UO},om.exports=rl;var VO=om.exports.FocusTrap=rl;function Em(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}=T.useMemo(()=>({anchor:Vd(r),boundary:i?Vd(i):void 0}),[r,i]);let u=[];c&&(u=[SO({boundary:c}),TO({boundary:c})]);const{refs:d,floatingStyles:h,middlewareData:f}=function(E){E===void 0&&(E={});const{placement:A="bottom",strategy:g="absolute",middleware:O=[],platform:S,elements:{reference:R,floating:b}={},transform:I=!0,whileElementsMounted:y,open:D}=E,[_,w]=at.useState({x:0,y:0,strategy:g,placement:A,middlewareData:{},isPositioned:!1}),[k,x]=at.useState(O);Ho(k,O)||x(O);const[N,M]=at.useState(null),[U,F]=at.useState(null),Y=at.useCallback(ut=>{ut!==rt.current&&(rt.current=ut,M(ut))},[]),z=at.useCallback(ut=>{ut!==W.current&&(W.current=ut,F(ut))},[]),V=R||N,J=b||U,rt=at.useRef(null),W=at.useRef(null),et=at.useRef(_),it=y!=null,ae=ca(y),Ht=ca(S),Zt=ca(D),Ee=at.useCallback(()=>{if(!rt.current||!W.current)return;const ut={placement:A,strategy:g,middleware:k};Ht.current&&(ut.platform=Ht.current),OO(rt.current,W.current,ut).then(Gn=>{const Se={...Gn,isPositioned:Zt.current!==!1};Mr.current&&!Ho(et.current,Se)&&(et.current=Se,Bm.flushSync(()=>{w(Se)}))})},[k,A,g,Ht,Zt]);ao(()=>{D===!1&&et.current.isPositioned&&(et.current.isPositioned=!1,w(ut=>({...ut,isPositioned:!1})))},[D]);const Mr=at.useRef(!1);ao(()=>(Mr.current=!0,()=>{Mr.current=!1}),[]),ao(()=>{if(V&&(rt.current=V),J&&(W.current=J),V&&J){if(ae.current)return ae.current(V,J,Ee);Ee()}},[V,J,Ee,ae,it]);const Oe=at.useMemo(()=>({reference:rt,floating:W,setReference:Y,setFloating:z}),[Y,z]),Ct=at.useMemo(()=>({reference:V,floating:J}),[V,J]),He=at.useMemo(()=>{const ut={position:g,left:0,top:0};if(!Ct.floating)return ut;const Gn=Fd(Ct.floating,_.x),Se=Fd(Ct.floating,_.y);return I?{...ut,transform:"translate("+Gn+"px, "+Se+"px)",...im(Ct.floating)>=1.5&&{willChange:"transform"}}:{position:g,left:Gn,top:Se}},[g,I,Ct.floating,_.x,_.y]);return at.useMemo(()=>({..._,update:Ee,refs:Oe,elements:Ct,floatingStyles:He}),[_,Ee,Oe,Ct,He])}({placement:n,middleware:u,whileElementsMounted:gO});T.useLayoutEffect(()=>{l&&d.setReference(l)},[d,l]);const p=o?v.jsx(VO,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:v.jsxs("div",{children:[t,v.jsx("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t;return v.jsx("div",{ref:d.setFloating,style:{...h,zIndex:1e3,visibility:(m=f.hide)!=null&&m.referenceHidden?"hidden":"visible"},...a,children:p})}function Vd(e){return typeof e=="string"?document.querySelector(e):e}function Am(e){const t=nt(),n=Ci(),r=q(n.state$.suggestMentionQuery),i=kf(q(t.state$.extCurrentConversationId),r?1e3:0),o=T.useMemo(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=T.useState(0),l=T.useMemo(()=>Object.fromEntries(o.map(E=>[E.id,QA(E.name)])),[o]),c=T.useMemo(()=>{if(!r)return[];const E=Yd(r);return E===""?o:o.filter(A=>l[A.id].some(g=>function(O,S){return ed(O.substring(0,S.length),S)}(g,E)))},[r,o,l]),u=T.useRef(void 0);T.useEffect(()=>{if(u.current){const E=c.findIndex(A=>A.id===u.current);a(E===-1?0:E)}},[c]),T.useEffect(()=>{var E;u.current=(E=c[s])==null?void 0:E.id},[s,c]);const d=T.useCallback(E=>{var g;const A=(g=c[E])==null?void 0:g.id;return A&&"mention-button-"+A},[c]),{containerProps:h,itemProps:f}=Xf({focused:s,setFocused:a,buttonId:d});if(T.useEffect(()=>{if(c.length!==0)return n.listenKeydown("mention",E=>Gf(E,{dir:"ttb",focused:s,setFocused:a,itemCount:c.length,onSpace(){if(r){const A=c[s];if(ed(A.name,Yd(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]),Mi(()=>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 v.jsx(Em,{className:"t-mention-suggest-list",...h,anchorElement:m,children:c.map((E,A)=>v.jsx(YO,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...f(A)},E.id))})}const YO=at.memo(function(e){const{user:t,isFocused:n,onSelect:r,...i}=e;return v.jsx("button",{className:n?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function Yd(e){return lt(e[0]==="@"),e.substring(1)}function zd(e,t,n){const r=Gl(e),i=r.indexOf(t);return i===-1?null:r[i+n]||null}const zO=T.forwardRef(function(e,t){const{children:n,triggerElement:r}=e,{closePopover:i}=fl(),o=T.useRef(null);T.useImperativeHandle(t,()=>o.current),T.useEffect(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=T.useCallback(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"),g=l.shiftKey?zd(A,u,-1):function(O,S){return zd(O,S,1)}(A,u);return g==null||g.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return v.jsx("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function or(e){const{popoverComponent:t,popoverProps:n,children:r,type:i="popover",initialFocus:o,...s}=e,[a,l]=T.useState(void 0),c=T.useRef(null),[u,d]=T.useState(!1);Mi(T.useCallback(()=>{var f;d(!1),(f=c.current)==null||f.focus()},[]),"[t-popover-content]",u);const h=i==="menu"?v.jsx(zO,{triggerElement:c.current,children:v.jsx(t,{...n})}):v.jsx(t,{...n});return v.jsxs(LE.Provider,{value:{closePopover:()=>d(!1)},children:[v.jsx(GO,{...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&&v.jsx(Em,{"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 GO=T.forwardRef(function(e,t){const{onTrigger:n,...r}=e,i=T.useCallback(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return v.jsx("button",{...r,ref:t,onClick:n,onKeyDown:i})});function on(e){const{onSelect:t,...n}=e,{closePopover:r}=fl(),i=T.useCallback(s=>{s.key!=="Enter"&&s.key!==" "||(r(),t==null||t())},[t,r]),o=T.useCallback(()=>{r(),t==null||t()},[r,t]);return v.jsx("div",{tabIndex:-1,role:"menuitem",onClick:o,onKeyDown:i,"t-menu-item":"",...n})}function gm(e){return Qp(e)}function Rn(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">
1277
- <rect x="0" y="0" width="100" height="100" fill="${Qp(n)}"/>
1273
+ `,[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:g}){const O=m/2,S=A.barWidth?A.barWidth*g:1,T=A.barGap?A.barGap*g:A.barWidth?S/2:0,y=S+T||1;return{halfHeight:O,barWidth:S,barGap:T,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*g:0,barIndexScale:E>0?p/y/E:0,barSpacing:y}}({width:o,height:s,length:(t[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),f=function({channelData:p,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:g,vScale:O,canvasHeight:S,barAlign:T,barMinHeight:y}){const I=p[0]||[],N=p[1]||I,D=I.length,_=[];let w=0,k=0,x=0;for(let L=0;L<=D;L++){const M=Math.round(L*m);if(M>w){const{topHeight:V,totalHeight:G}=I_({maxTop:k,maxBottom:x,halfHeight:g,vScale:O,barMinHeight:y,barAlign:T}),Y=C_({barAlign:T,halfHeight:g,topHeight:V,totalHeight:G,canvasHeight:S});_.push({x:w*E,y:Y,width:A,height:G}),w=M,k=0,x=0}const U=Math.abs(I[L]||0),H=Math.abs(N[L]||0);U>k&&(k=U),H>x&&(x=H)}return _}({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,g=h,O=m===0?-1:1,S=[{x:0,y:g}];let T=0,y=0;for(let I=0;I<=E;I++){const N=Math.round(I*A);if(N>T){const _=g+(Math.round(y*h*d)||1)*O;S.push({x:T,y:_}),T=N,y=0}const D=Math.abs(p[I]||0);D>y&&(y=D)}return S.push({x:T,y:g}),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});Pf(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 Dd(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=Dd(E,n),E<=0)return;const A=function({channelData:g,offset:O,clampedWidth:S,totalWidth:T}){return g.map(y=>{const I=Math.floor(O/T*y.length),N=Math.floor((O+S)/T*y.length);return y.slice(I,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(_d({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={}),_d({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 jt(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 jt(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 N_ extends Mi{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 aa extends Mi{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 jt(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 jt(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 jt(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 y_={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class gi extends R_{static create(t){return new gi(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const n=t.media||(t.backend==="WebAudio"?new aa: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({},y_,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:ht(0),m=(c=a==null?void 0:a.duration)!==null&&c!==void 0?c:ht(0),E=(u=a==null?void 0:a.isPlaying)!==null&&u!==void 0?u:ht(!1),A=(d=a==null?void 0:a.isSeeking)!==null&&d!==void 0?d:ht(!1),g=(h=a==null?void 0:a.volume)!==null&&h!==void 0?h:ht(1),O=(f=a==null?void 0:a.playbackRate)!==null&&f!==void 0?f:ht(1),S=ht(null),T=ht(null),y=ht(""),I=ht(0),N=ht(0),D=Rn(()=>!E.value,[E]),_=Rn(()=>S.value!==null,[S]),w=Rn(()=>_.value&&m.value>0,[_,m]),k=Rn(()=>p.value,[p]),x=Rn(()=>m.value>0?p.value/m.value:0,[p,m]);return{state:{currentTime:p,duration:m,isPlaying:E,isPaused:D,isSeeking:A,volume:g,playbackRate:O,audioBuffer:S,peaks:T,url:y,zoom:I,scrollPosition:N,canPlay:_,isReady:w,progress:k,progressPercent:x},actions:{setCurrentTime:L=>{const M=Math.max(0,Math.min(m.value||1/0,L));p.set(M)},setDuration:L=>{m.set(Math.max(0,L))},setPlaying:L=>{E.set(L)},setSeeking:L=>{A.set(L)},setVolume:L=>{const M=Math.max(0,Math.min(1,L));g.set(M)},setPlaybackRate:L=>{const M=Math.max(.1,Math.min(16,L));O.set(M)},setAudioBuffer:L=>{S.set(L),L&&m.set(L.duration)},setPeaks:L=>{T.set(L)},setUrl:L=>{y.set(L)},setZoom:L=>{I.set(Math.max(0,L))},setScrollPosition:L=>{N.set(Math.max(0,L))}}}}({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 N_;const o=n?void 0:this.getMediaElement();this.renderer=new v_(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(tn(()=>{const s=t.isPlaying.value;n.emit(s?"play":"pause")},[t.isPlaying])),r.push(tn(()=>{const s=t.currentTime.value;n.emit("timeupdate",s),t.isPlaying.value&&n.emit("audioprocess",s)},[t.currentTime,t.isPlaying])),r.push(tn(()=>{t.isSeeking.value&&n.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let i=!1;r.push(tn(()=>{t.isReady.value&&!i&&(i=!0,n.emit("ready",t.duration.value))},[t.isReady,t.duration]));let o=!1;return r.push(tn(()=>{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(tn(()=>{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=Ki.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Ki.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 jt(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 T_.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 aa&&(a.duration=s)}if(r)this.decodedData=Ki.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Ki.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 jt(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 jt(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 jt(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield r.play.call(this);return n!=null&&(this.media instanceof aa?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return jt(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 jt(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 wo({src:e,onError:t,filename:n,className:r=""}){const i=R.useRef(null),o=R.useRef(),s=R.useRef(),[a,l]=R.useState(!1),[c,u]=R.useState(0),[d,h]=R.useState(1),f=R.useRef(),[p,m]=R.useState(!1),E=K(et().t$);R.useEffect(()=>{o.current=new Audio;const O={normalize:!0,height:50,container:i.current};function S(){const I=o.current;I&&(I.error.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(I.load(),l(!1)):(m(!0),l(!1),t==null||t()))}const T=n.slice(n.lastIndexOf(".")+1);if(function(I){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(I)}(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 I=o.current;I.addEventListener("error",S),I.preservesPitch=!0,O.url=e,O.media=I}f.current=function(I){var w,k,x,L,M,U,H,V;if(!I.container)return;const N=getComputedStyle(I.container),D=(w=Di.parse(N.color))!=null?w:new Di(255,255,255,1),_=D.withAlpha(D.alpha/2);return gi.create({...I,barGap:(k=I.barGap)!=null?k:2,barRadius:(x=I.barRadius)!=null?x:0,barWidth:(L=I.barWidth)!=null?L:2,barHeight:I.barHeight,hideScrollbar:!0,cursorWidth:(M=I.cursorWidth)!=null?M:0,cursorColor:I.cursorColor,height:(U=I.height)!=null?U:24,progressColor:(H=I.progressColor)!=null?H:_.toRgbaString(),waveColor:(V=I.waveColor)!=null?V:_.toRgbaString()})}(O);const y=f.current;return y.on("finish",()=>{o.current.loop=!0,l(!1)}),y.on("ready",I=>u(Math.trunc(I))),y.on("timeupdate",I=>u(Math.trunc(I))),O.backend==="WebAudio"&&y.load(e).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var I;(I=o.current)==null||I.removeEventListener("error",S),o.current=void 0,y.destroy(),f.current=void 0}},[e,n,t]);const A=R.useCallback(()=>{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)}},[]),g=R.useCallback(O=>{f.current.setPlaybackRate(O),h(O)},[]);return p?v.jsx("div",{}):v.jsxs("div",{className:`t-audio-player ${r}`,children:[v.jsx("button",{onClick:A,children:v.jsx(ko,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),v.jsx("div",{className:"t-waveform",ref:i}),v.jsx("div",{className:"t-duration",children:Kl(c)}),v.jsxs(or,{type:"menu",popoverComponent:L_,popoverProps:{playbackSpeed:d,selectPlaybackSpeed:g},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[d,"x",v.jsx(ko,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}gi.BasePlugin=class extends Mi{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}},gi.dom=S_;const b_=[.25,.5,.75,1,1.25,1.5,2];function L_({playbackSpeed:e,selectPlaybackSpeed:t}){return v.jsxs("div",{className:"t-playback-speed-menu",children:[v.jsx("div",{className:"t-playback-heading",children:"Playback Speed"}),b_.map(n=>v.jsxs(en,{className:"t-menu-item",onSelect:()=>t(n),children:[v.jsx("span",{className:"t-playback-checkmark",children:e===n?"✓ ":""}),n,"x"]},n))]})}const k_=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,w_=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class Di{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(k_))!=null?r:t.match(w_);if(n){const[i,o,s,a,l="1"]=n;return new Di(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new Di(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 Ff=/^\/.*[^\\]\/[im]*$/;function Sd(e){return Ff.test(e)?!Mo(e).test(""):!1}function Mo(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 Hf(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function M_(e,t){const n=nf(t),r=Hf(e);return n!==void 0&&r.test(n)}const x_=/^[]/g;function Bf(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function Xa(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){}})(Xa||(Xa={}));const hr=Xa,P_=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"),F_=/\uFE0F/g,H_="‍";function B_(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(H_)<0?n.replace(F_,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class Uf{constructor({mode:t,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:c,replacement:u}){if(hr.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(Sd).map(d=>Mo(d)),this.forbiddenMatches=(o||[]).filter(Sd).map(d=>Mo(d)),s){const d=s.split(`
1274
+ `).map(h=>h.trim().toLowerCase()).filter(h=>h.length>0&&!h.startsWith("#")).map(h=>Bf(h));d.length&&this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`,"gi"))}hr(()=>this.allowedMatches.every(d=>d.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),hr(()=>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 Ul(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 Uf({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 U_({id:e,text:t}){var s;const n=et(),r=K(()=>{var c;if(n.type==="ConversationListStore")return;const a=n.state$.extCurrentConversationId.get(),l=a&&n.state$.participants.child(a).get();return(c=l==null?void 0:l.find(u=>u.user.id===e))==null?void 0:c.user}),i=K(n.extUserId$)===e,o=`@${(s=r==null?void 0:r.name)!=null?s:t}`;return v.jsx("span",{className:"t-mention","t-is-current-user":i?"":void 0,children:o})}function j_({message:e,type:t,action:n,params:r,children:i}){const o=yi(),s=R.useCallback(l=>{l.preventDefault(),o.triggerMessageAction(e,n,r)},[o,e,n,r]),a={"t-action":n,onClick:s};return t==="actionButton"?v.jsx("button",{...a,type:"button",children:i}):v.jsx("a",{...a,href:"#",children:i})}function Un(e,t){const n=e.flatMap(r=>{if(typeof r=="string")return la(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return $_(r,t);case"bulletlist":case"bulletList":return[R.createElement("ul",null,...Un(r.children,t))];case"autolink":case"autoLink":case"link":return Y_(r,t);case"codeblock":case"codeBlock":return[v.jsx("code",{"data-language":r.language,children:la(r.text,t.highlight)})];case"codespan":case"codeSpan":return v.jsx("code",{children:la((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return hr.falsy(t.useFallbackMentions),v.jsx(U_,{id:r.id,text:r.text},r.id);case"suppressed":return[v.jsx("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[v.jsx(V_,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return z_(r,t);case"customemoji":case"customEmoji":return r.text;default:hr.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function la(e,t){if(t.length===0)return[e];const n=function(r){const i=r.map(s=>s.trim()).filter(s=>s);if(i.length===0)return x_;const o=i.map(Bf).join("|");return new RegExp(o,"gi")}(t);return ja(e,as(e,n).map(r=>({offset:r.index,matchedText:r[0]})),({matchedText:r})=>[v.jsx("span",{className:"highlighted-text",children:r})])}const $_=(e,t)=>{const n={bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[e.type];return[R.createElement(n,null,...Un(e.children,t))]};function V_({unicode:e}){const[t,n]=R.useState(()=>e!==":arslan:");if(R.useEffect(()=>{t&&!Xh(e)&&n(!1)},[]),t)return v.jsx("span",{className:"t-emoji",children:e});const r=B_(e);return v.jsx("img",{className:"t-emoji",src:r,alt:e})}const Y_=(e,t)=>{const n="children"in e?e.children:[e.text];switch(t.formattedLinks){case"link":{const r=function(i,o){for(const s of i)if(Ff.test(s)){if(Mo(s).test(o))return"_top"}else if(M_(s,o))return"_top";return"_blank"}(t.sameTabLinkRules,e.url);return[R.createElement("a",{target:r,href:e.url,rel:"noreferrer"},...Un(n,t))]}case"plaintext":return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[R.createElement(R.Fragment,null,...Un(n,t))];default:hr.never(t.formattedLinks)}},z_=(e,t)=>{if(!t.enableActions)return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[R.createElement(R.Fragment,null,...Un(e.children,t))];const n=e.type==="actionlink"?"actionLink":e.type==="actionbutton"?"actionButton":e.type;return[R.createElement(j_,{type:n,action:e.action,params:e.params,message:t.message},...Un(e.children,t))]};function G_(e,t){return ao(e,Ul(t))}function ao(e,t){return e.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=ca(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,c=yl(a,u=>as(o,u)).filter(([u])=>!l.some(d=>u.match(d)!==null)).map(u=>({offset:u.index,matchedText:u[0]}));return ja(o,c,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=ca(r,i=>function(o){return ja(o,function(s){const a=[];let l;for(;l=P_.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=ca(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(Of),s.suppression.suppressPhoneNumbers&&a.push(_f),a.length===0)return[o];const l=Tf(o,{multilineSteps:[],singlelineSteps:a}),c=l.map(u=>typeof u=="string"?u:Td(u.url,s.suppression)?u.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return Fl(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:ao(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"?Td(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,t);case"link":return{type:"link",url:n.url,children:ao(n.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:ao(n.children,t)}}})}function ca(e,t){return yl(e,n=>typeof n=="string"?t(n):[n])}function Td(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||Rd(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=nf(e);return!t.suppressLinks||!n||Rd(t.allowedHostnames,n)}}function Rd(e,t){for(const n of e)if(Hf(n).test(t))return!0;return!1}function jl({block:e,nonInteractive:t,message:n,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,c){var g;const u=et(),d=K(u.app$.role);Z.defined(d);const h=c.type==="UserMessage",f=((g=c.sender)==null?void 0:g.id)===u.extUserId$.peek(),p=d.suppressContactInfo,m=h&&p.shouldSuppress({isContentBySender:f}),E=G_(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 Un(l,{...Ul(c),message:u})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},n);return st.createElement("span",{className:`t-text ${r}`},...a)}function jf(e){const t=qt(),n=et(),{className:r="",...i}=e,o=K(()=>n.state$.messages.child(n.state$.extCurrentConversationId.get()).lookup.child(e.message.id).content.child(0).url.get());return v.jsx("div",{className:`t-message-content ${r}`,children:e.message.content.map(s=>{var a;return v.jsx(X_,{block:s,theme:t,downloadUrl:o,...i},e.message.createdAt+((a=e.message.editedAt)!=null?a:0))})})}function X_({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:Z.never(a)}}(r,t);return v.jsx(o,{block:t,common:e,message:n,downloadUrl:i})}const W_=27;function xi(e,t,n=!0){const r=R.useCallback(o=>{o.keyCode===W_&&e()},[e]),i=R.useCallback(o=>{o.target.closest(t)===null&&e()},[t,e]);R.useEffect(()=>{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 K_=".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)}",q_={"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 J_(e,t){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=e!=null?e:cr.emojiPickerTranslationUrl,r=q_["emoji-picker-element"],[i,o]=await Promise.all([Id(r),Id(n)]),s=t!=null?t:cr.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return _o.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function Id(e){return import(e).catch(()=>new Function("url","return import(url)")(e)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function $l(){const e=et(),[t,n]=R.useState();return function(r,i,o,s){let a;X(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))?ue(s):void 0,c=R.useRef({});c.current.selector=r,c.current.reaction=a,l&&l.set(s),c.current.dispose||(c.current.dispose=Bt(u=>{var d;return l==null||l.get(),Ce((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)),yE(()=>{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(ua[s])return ua[s];const a=J_(i,o);return ua[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),t}const ua={};function Vl(e){const{onClose:t,onEmojiSelected:n}=wE(),r=R.useRef(null),i=K(et().t$),o=$l();return R.useEffect(()=>{if(!o)return;Z.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,K_);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]),R.useEffect(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),xi(()=>t(),".t-emoji-picker"),o?v.jsx("div",{className:"t-emoji-picker",children:v.jsx("emoji-picker",{locale:i.locale,ref:r,class:e.colorScheme,"data-source":o.value.dataSource})}):v.jsx("div",{className:"t-emoji-picker","t-loading":"",children:v.jsx(Hl,{})})}function $f({messageId:e,colorScheme:t}){const{closePopover:n}=El(),r=yi();return v.jsx("div",{className:"t-reaction-picker",children:v.jsx(zh.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(e,i),n()}},children:v.jsx(Vl,{colorScheme:t})})})}function Wa(){return Wa=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},Wa.apply(null,arguments)}function Vf(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 Ka(e,t){return Ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Ka(e,t)}function Yf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ka(e,t)}function zf(){}function Gf(){}Gf.resetWarningCache=zf;function Cd(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:Gf,resetWarningCache:zf};n.PropTypes=n})();const vd=!1,Xf=R.createContext(null);var Kr="unmounted",Dn="exited",_n="entering",tr="entered",qa="exiting",He=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=Dn,o.appearStatus=_n):s=tr:s=r.unmountOnExit||r.mountOnEnter?Kr:Dn,o.state={status:s},o.nextCallback=null,o}Yf(t,e),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Kr?{status:Dn}: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!==_n&&o!==tr&&(i=_n):o!==_n&&o!==tr||(i=qa)}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===_n?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===Dn&&this.setState({status:Kr})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[to.findDOMNode(this),s],l=a[0],c=a[1],u=this.getTimeouts(),d=s?u.appear:u.enter;!r&&!o||vd?this.safeSetState({status:tr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,c),this.safeSetState({status:_n},function(){i.props.onEntering(l,c),i.onTransitionEnd(d,function(){i.safeSetState({status:tr},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:to.findDOMNode(this);i&&!vd?(this.props.onExit(s),this.safeSetState({status:qa},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:Dn},function(){r.props.onExited(s)})})})):this.safeSetState({status:Dn},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:to.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===Kr)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=Vf(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return R.createElement(Xf.Provider,{value:null},typeof o=="function"?o(r,s):R.cloneElement(R.Children.only(o),s))},t}(R.Component);function Jn(){}He.contextType=Xf,He.propTypes={},He.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Jn,onEntering:Jn,onEntered:Jn,onExit:Jn,onExiting:Jn,onExited:Jn},He.UNMOUNTED=Kr,He.EXITED=Dn,He.ENTERING=_n,He.ENTERED=tr,He.EXITING=qa;var da=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=Cd(r.className,i):r.setAttribute("class",Cd(r.className&&r.className.baseVal||"",i)));var r,i})},Ja=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}Yf(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&&da(r,s),a&&da(r,a),l&&da(r,l)},n.render=function(){var r=this.props;r.classNames;var i=Vf(r,["classNames"]);return R.createElement(He,Wa({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(R.Component);Ja.defaultProps={classNames:""},Ja.propTypes={};const Z_={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function Wf(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]=Z_[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 Kf({focused:e,setFocused:t,buttonId:n}){R.useLayoutEffect(()=>{var a;const s=n(e);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[e,n]);const r=R.useCallback(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=R.useMemo(()=>({role:"menu","aria-activedescendant":n(e)}),[e,n]),o=R.useCallback(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function qf(e){const[t,n]=R.useState([]),[r,i]=R.useState([]),[o,s]=R.useState(0),[a,l]=R.useState(0),c=$l(),u=R.useMemo(()=>(c==null?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),d=vi(),h=K(d.state$.suggestEmojiQuery);R.useEffect(()=>{u&&(h?async function(){const g=await u.getPreferredSkinTone();l(g);let O=await u.getEmojiBySearchQuery(h);if(O=O.filter(S=>S.url||function(T){return T.version<=Wh&&!tO.includes(T.unicode)}(S)),function(S,T){T.sort((y,I)=>{var _,w;const N=(_=y.shortcodes)==null?void 0:_.find(k=>k.startsWith(S)),D=(w=I.shortcodes)==null?void 0:w.find(k=>k.startsWith(S));return N&&!D?-1:!N&&D?1:N&&D?N.length-D.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(y=>{var I;return(I=y.shortcodes)==null?void 0:I.includes(S)});T&&d.selectEmoji(qr(T,g))}}():n([]))},[h,d,u]);const f=R.useCallback(g=>{const O=t[g];return O&&"emoji-button-"+qr(O,a)},[t,a]),{containerProps:p,itemProps:m}=Kf({focused:o,setFocused:s,buttonId:f}),E=t.length>0;xi(()=>d.closeSuggester(),".t-emoji-suggest-bar",E),R.useEffect(()=>{if(E)return d.listenKeydown("emoji",g=>Wf(g,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const O=t[o];Z.defined(O),d.selectEmoji(qr(O,a))}})),()=>{d.listenKeydown("emoji",void 0)};d.listenKeydown("emoji",void 0)},[d,t,o,E,a]);const A=R.useRef(null);return v.jsx(Ja,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:v.jsx("div",{className:"t-emoji-suggest-bar",ref:A,...p,children:r.map((g,O)=>v.jsx(Q_,{emoji:g,skinTone:a,focused:O===o,onSelect:S=>d.selectEmoji(S),...m(O)},qr(g,a)))})})}function qr(e,t){return Za(e)?Jf(e,t):e.name}function Za(e){return!!e.unicode}function Q_(e){var c;const{emoji:t,focused:n,skinTone:r,onSelect:i,...o}=e,s=((c=t.shortcodes)!=null?c:[]).join(", "),a=Za(t)?[t.unicode,s].join(", "):s,l=Za(t)?Jf(t,r):null;return v.jsx("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(qr(t,r)),...o,children:l})}function Jf(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 tO=["🏻","🏼","🏽","🏾","🏿"],eO=["top","right","bottom","left"],xo=Math.min,Mn=Math.max,Po=Math.round,qi=Math.floor,Ne=e=>({x:e,y:e}),nO={left:"right",right:"left",bottom:"top",top:"bottom"},rO={start:"end",end:"start"};function Nd(e,t,n){return Mn(e,xo(t,n))}function ds(e,t){return typeof e=="function"?e(t):e}function vr(e){return e.split("-")[0]}function Yl(e){return e.split("-")[1]}function Zf(e){return e==="x"?"y":"x"}function Qf(e){return e==="y"?"height":"width"}const iO=new Set(["top","bottom"]);function Nn(e){return iO.has(vr(e))?"y":"x"}function tm(e){return Zf(Nn(e))}function Qa(e){return e.replace(/start|end/g,t=>rO[t])}const yd=["left","right"],bd=["right","left"],oO=["top","bottom"],sO=["bottom","top"];function aO(e,t,n,r){const i=Yl(e);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?bd:yd:a?yd:bd;case"left":case"right":return a?oO:sO;default:return[]}}(vr(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(Qa)))),o}function Ji(e){return e.replace(/left|right|bottom|top/g,t=>nO[t])}function Fo(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 Ld(e,t,n){let{reference:r,floating:i}=e;const o=Nn(t),s=tm(t),a=Qf(s),l=vr(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(Yl(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function Ho(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}=ds(t,e),p=function(T){return typeof T!="number"?function(y){return{top:0,right:0,bottom:0,left:0,...y}}(T):{top:T,right:T,bottom:T,left:T}}(f),m=a[h?d==="floating"?"reference":"floating":d],E=Fo(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,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=Fo(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:g,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 kd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wd(e){return eO.some(t=>e[t]>=0)}function hs(){return typeof window!="undefined"}function Nr(e){return em(e)?(e.nodeName||"").toLowerCase():"#document"}function re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(em(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function em(e){return!!hs()&&(e instanceof Node||e instanceof re(e).Node)}function me(e){return!!hs()&&(e instanceof Element||e instanceof re(e).Element)}function Le(e){return!!hs()&&(e instanceof HTMLElement||e instanceof re(e).HTMLElement)}function Md(e){return!(!hs()||typeof ShadowRoot=="undefined")&&(e instanceof ShadowRoot||e instanceof re(e).ShadowRoot)}const lO=new Set(["inline","contents"]);function _i(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lO.has(i)}const cO=new Set(["table","td","th"]);function uO(e){return cO.has(Nr(e))}const dO=[":popover-open",":modal"];function Bo(e){return dO.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const hO=["transform","translate","scale","rotate","perspective"],pO=["transform","translate","scale","rotate","perspective","filter"],fO=["paint","layout","strict","content"];function tl(e){const t=zl(),n=me(e)?Ee(e):e;return hO.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||pO.some(r=>(n.willChange||"").includes(r))||fO.some(r=>(n.contain||"").includes(r))}function zl(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const mO=new Set(["html","body","#document"]);function pr(e){return mO.has(Nr(e))}function Ee(e){return re(e).getComputedStyle(e)}function ps(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ln(e){if(Nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Md(e)&&e.host||ye(e);return Md(t)?t.host:t}function nm(e){const t=ln(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&_i(t)?t:nm(t)}function Oi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=nm(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=re(i);if(o){const a=el(s);return t.concat(s,s.visualViewport||[],_i(i)?i:[],a&&n?Oi(a):[])}return t.concat(i,Oi(i,[],n))}function el(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function rm(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Le(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Po(n)!==o||Po(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function Gl(e){return me(e)?e:e.contextElement}function fr(e){const t=Gl(e);if(!Le(t))return Ne(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=rm(t);let s=(o?Po(n.width):n.width)/r,a=(o?Po(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const EO=Ne(0);function im(e){const t=re(e);return zl()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:EO}function jn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Gl(e);let s=Ne(1);t&&(r?me(r)&&(s=fr(r)):s=fr(e));const a=function(h,f,p){return f===void 0&&(f=!1),!(!p||f&&p!==re(h))&&f}(o,n,r)?im(o):Ne(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=re(o),f=r&&me(r)?re(r):r;let p=h,m=el(p);for(;m&&r&&f!==p;){const E=fr(m),A=m.getBoundingClientRect(),g=Ee(m),O=A.left+(m.clientLeft+parseFloat(g.paddingLeft))*E.x,S=A.top+(m.clientTop+parseFloat(g.paddingTop))*E.y;l*=E.x,c*=E.y,u*=E.x,d*=E.y,l+=O,c+=S,p=re(m),m=el(p)}}return Fo({width:u,height:d,x:l,y:c})}function Uo(e,t){const n=ps(e).scrollLeft;return t?t.left+n:jn(ye(e)).left+n}function om(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Uo(e,n),y:n.top+t.scrollTop}}const AO=new Set(["absolute","fixed"]);function xd(e,t,n){let r;if(t==="viewport")r=function(i,o){const s=re(i),a=ye(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=zl();(!p||p&&o==="fixed")&&(d=l.offsetLeft,h=l.offsetTop)}const f=Uo(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,g=Math.abs(a.clientWidth-m.clientWidth-A);g<=25&&(c-=g)}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=ye(i),s=ps(i),a=i.ownerDocument.body,l=Mn(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=Mn(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+Uo(i);const d=-s.scrollTop;return Ee(a).direction==="rtl"&&(u+=Mn(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}(ye(e));else if(me(t))r=function(i,o){const s=jn(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=Le(i)?fr(i):Ne(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=im(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fo(r)}function sm(e,t){const n=ln(e);return!(n===t||!me(n)||pr(n))&&(Ee(n).position==="fixed"||sm(n,t))}function gO(e,t,n){const r=Le(t),i=ye(t),o=n==="fixed",s=jn(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Ne(0);function c(){l.x=Uo(i)}if(r||!r&&!o)if((Nr(t)!=="body"||_i(i))&&(a=ps(t)),r){const d=jn(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?Ne(0):om(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 ha(e){return Ee(e).position==="static"}function Pd(e,t){if(!Le(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function Fd(e,t){const n=re(e);if(Bo(e))return n;if(!Le(e)){let i=ln(e);for(;i&&!pr(i);){if(me(i)&&!ha(i))return i;i=ln(i)}return n}let r=Pd(e,t);for(;r&&uO(r)&&ha(r);)r=Pd(r,t);return r&&pr(r)&&ha(r)&&!tl(r)?n:r||function(i){let o=ln(i);for(;Le(o)&&!pr(o);){if(tl(o))return o;if(Bo(o))return null;o=ln(o)}return null}(e)||n}const DO={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=ye(r),a=!!t&&Bo(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Ne(1);const u=Ne(0),d=Le(r);if((d||!d&&!o)&&((Nr(r)!=="body"||_i(s))&&(l=ps(r)),Le(r))){const f=jn(r);c=fr(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}const h=!s||d||o?Ne(0):om(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:ye,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?Bo(t)?[]:function(c,u){const d=u.get(c);if(d)return d;let h=Oi(c,[],!1).filter(E=>me(E)&&Nr(E)!=="body"),f=null;const p=Ee(c).position==="fixed";let m=p?ln(c):c;for(;me(m)&&!pr(m);){const E=Ee(m),A=tl(m);A||E.position!=="fixed"||(f=null),(p?!A&&!f:!A&&E.position==="static"&&f&&AO.has(f.position)||_i(m)&&!A&&sm(c,m))?h=h.filter(g=>g!==m):f=E,m=ln(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=xd(t,u,i);return c.top=Mn(d.top,c.top),c.right=xo(d.right,c.right),c.bottom=xo(d.bottom,c.bottom),c.left=Mn(d.left,c.left),c},xd(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Fd,getElementRects:async function(e){const t=this.getOffsetParent||Fd,n=this.getDimensions,r=await n(e.floating);return{reference:gO(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}=rm(e);return{width:t,height:n}},getScale:fr,isElement:me,isRTL:function(e){return Ee(e).direction==="rtl"}};function Hd(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _O(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=Gl(e),u=i||o?[...c?Oi(c):[],...Oi(t)]:[];u.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const d=c&&a?function(E,A){let g,O=null;const S=ye(E);function T(){var y;clearTimeout(g),(y=O)==null||y.disconnect(),O=null}return function y(I,N){I===void 0&&(I=!1),N===void 0&&(N=1),T();const D=E.getBoundingClientRect(),{left:_,top:w,width:k,height:x}=D;if(I||A(),!k||!x)return;const L={rootMargin:-qi(w)+"px "+-qi(S.clientWidth-(_+k))+"px "+-qi(S.clientHeight-(w+x))+"px "+-qi(_)+"px",threshold:Mn(0,xo(1,N))||1};let M=!0;function U(H){const V=H[0].intersectionRatio;if(V!==N){if(!M)return y();V?y(!1,V):g=setTimeout(()=>{y(!1,1e-7)},1e3)}V!==1||Hd(D,E.getBoundingClientRect())||y(),M=!1}try{O=new IntersectionObserver(U,{...L,root:S.ownerDocument})}catch(H){O=new IntersectionObserver(U,L)}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 g;(g=p)==null||g.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let m=l?jn(e):null;return l&&function E(){const A=jn(e);m&&!Hd(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 OO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:A,y:g}=E;return{x:A,y:g}}},...l}=ds(e,t),c={x:n,y:r},u=await Ho(t,l),d=Nn(vr(i)),h=Zf(d);let f=c[h],p=c[d];if(o){const E=h==="y"?"bottom":"right";f=Nd(f+u[h==="y"?"top":"left"],f,f-u[E])}if(s){const E=d==="y"?"bottom":"right";p=Nd(p+u[d==="y"?"top":"left"],p,p-u[E])}const m=a.fn({...t,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:o,[d]:s}}}}}},SO=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}=ds(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=vr(i),g=Nn(a),O=vr(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=h||(O||!m?[Ji(a)]:function(L){const M=Ji(L);return[Qa(L),M,Qa(M)]}(a)),y=p!=="none";!h&&y&&T.push(...aO(a,m,p,S));const I=[a,...T],N=await Ho(t,E),D=[];let _=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&D.push(N[A]),d){const L=function(M,U,H){H===void 0&&(H=!1);const V=Yl(M),G=tm(M),Y=Qf(G);let nt=G==="x"?V===(H?"end":"start")?"right":"left":V==="start"?"bottom":"top";return U.reference[Y]>U.floating[Y]&&(nt=Ji(nt)),[nt,Ji(nt)]}(i,s,S);D.push(N[L[0]],N[L[1]])}if(_=[..._,{placement:i,overflows:D}],!D.every(L=>L<=0)){var w,k;const L=(((w=o.flip)==null?void 0:w.index)||0)+1,M=I[L];if(M&&(!(d==="alignment"&&g!==Nn(M))||_.every(H=>Nn(H.placement)!==g||H.overflows[0]>0)))return{data:{index:L,overflows:_},reset:{placement:M}};let U=(k=_.filter(H=>H.overflows[0]<=0).sort((H,V)=>H.overflows[1]-V.overflows[1])[0])==null?void 0:k.placement;if(!U)switch(f){case"bestFit":{var x;const H=(x=_.filter(V=>{if(y){const G=Nn(V.placement);return G===g||G==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(G=>G>0).reduce((G,Y)=>G+Y,0)]).sort((V,G)=>V[1]-G[1])[0])==null?void 0:x[0];H&&(U=H);break}case"initialPlacement":U=a}if(i!==U)return{reset:{placement:U}}}return{}}}},TO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ds(e,t);switch(r){case"referenceHidden":{const o=kd(await Ho(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:wd(o)}}}case"escaped":{const o=kd(await Ho(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:wd(o)}}}default:return{}}}}},RO=(e,t,n)=>{const r=new Map,i={platform:DO,...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}=Ld(m,c,p),g=c,O={},S=0;for(let T=0;T<f.length;T++){const{name:y,fn:I}=f[T],{x:N,y:D,data:_,reset:w}=await I({x:E,y:A,initialPlacement:c,placement:g,strategy:u,middlewareData:O,rects:m,platform:h,elements:{reference:s,floating:a}});E=N!=null?N:E,A=D!=null?D:A,O={...O,[y]:{...O[y],..._}},w&&S<=50&&(S++,typeof w=="object"&&(w.placement&&(g=w.placement),w.rects&&(m=w.rects===!0?await h.getElementRects({reference:s,floating:a,strategy:u}):w.rects),{x:E,y:A}=Ld(m,g,p)),T=-1)}return{x:E,y:A,placement:g,strategy:u,middlewareData:O}})(e,t,{...i,platform:o})};var lo=typeof document!="undefined"?R.useLayoutEffect:function(){};function jo(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(!jo(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)&&!jo(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function am(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bd(e,t){const n=am(e);return Math.round(t*n)/n}function pa(e){const t=st.useRef(e);return lo(()=>{t.current=e}),t}const IO=(e,t)=>({...OO(e),options:[e,t]}),CO=(e,t)=>({...SO(e),options:[e,t]}),vO=(e,t)=>({...TO(e),options:[e,t]});var lm={exports:{}},cm=["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])"],$o=cm.join(","),um=typeof Element=="undefined",$n=um?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,co=!um&&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},Si=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&&Si(e.parentNode)},dm=function(e,t,n){if(Si(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll($o));return t&&$n.call(e,$o)&&r.unshift(e),r=r.filter(n)},Vo=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Si(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=Vo(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{$n.call(o,$o)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),u=!Si(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var d=Vo(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},hm=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},rn=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))&&!hm(e)?0:e.tabIndex},NO=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},pm=function(e){return e.tagName==="INPUT"},yO=function(e){return function(t){return pm(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,r=t.form||co(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)},Ud=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},bO=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=$n.call(e,"details>summary:first-of-type")?e.parentElement:e;if($n.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Ud(e)}else{if(typeof r=="function"){for(var o=e;e;){var s=e.parentElement,a=co(e);if(s&&!s.shadowRoot&&r(s)===!0)return Ud(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&&co(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,g;m=!((A=p=(E=f=co(p))===null||E===void 0?void 0:E.host)===null||A===void 0||(g=A.ownerDocument)===null||g===void 0||!g.contains(p))}return m}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Yo=function(e,t){return!(t.disabled||Si(t)||function(n){return pm(n)&&n.type==="hidden"}(t)||bO(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!!$n.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(t))},nl=function(e,t){return!(yO(t)||rn(t)<0||!Yo(e,t))},LO=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},fm=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=rn(c);return d<0&&u&&!hm(c)?0:d}(s,o),l=o?fm(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(NO).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},mm=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Vo([e],t.includeContainer,{filter:nl.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:LO}):dm(e,t.includeContainer,nl.bind(null,t)),fm(n)},Xl=function(e,t){return(t=t||{}).getShadowRoot?Vo([e],t.includeContainer,{filter:Yo.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):dm(e,t.includeContainer,Yo.bind(null,t))},On=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $n.call(e,$o)!==!1&&nl(t,e)},kO=cm.concat("iframe").join(","),uo=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return $n.call(e,kO)!==!1&&Yo(t,e)};const wO=Object.freeze(Object.defineProperty({__proto__:null,focusable:Xl,getTabIndex:rn,isFocusable:uo,isTabbable:On,tabbable:mm},Symbol.toStringTag,{value:"Module"}));function rl(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 jd(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Em(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.
1275
+ 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 MO(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 $d(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 Vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$d(Object(n),!0).forEach(function(r){MO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$d(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xO(e){return function(t){if(Array.isArray(t))return rl(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Em(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1276
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Em(e,t){if(e){if(typeof e=="string")return rl(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)?rl(e,t):void 0}}var $e={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==$e.getActiveTrap(e)&&$e.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),$e.unpauseTrap(e)},pauseTrap:function(e){var t=$e.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=$e.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},si=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},PO=function(e){return si(e)&&!e.shiftKey},FO=function(e){return si(e)&&e.shiftKey},Yd=function(e){return setTimeout(e,0)},Vr=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},Zi=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},HO=[];const BO=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)||HO,o=Vd({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:PO,isKeyBackward:FO},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(D,_,w){return D&&D[_]!==void 0?D[_]:o[w||_]},l=function(D,_){var w=typeof(_==null?void 0:_.composedPath)=="function"?_.composedPath():void 0;return s.containerGroups.findIndex(function(k){var x=k.container,L=k.tabbableNodes;return x.contains(D)||(w==null?void 0:w.includes(x))||L.find(function(M){return M===D})})},c=function(D){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=_.hasFallback,k=w!==void 0&&w,x=_.params,L=x===void 0?[]:x,M=o[D];if(typeof M=="function"&&(M=M.apply(void 0,xO(L))),M===!0&&(M=void 0),!M){if(M===void 0||M===!1)return M;throw new Error("`".concat(D,"` was specified but was not a node, or did not return a node"))}var U=M;if(typeof M=="string"){try{U=r.querySelector(M)}catch(H){throw new Error("`".concat(D,'` appears to be an invalid selector; error="').concat(H.message,'"'))}if(!U&&!k)throw new Error("`".concat(D,"` as selector refers to no known node"))}return U},u=function(){var D=c("initialFocus",{hasFallback:!0});if(D===!1)return!1;if(D===void 0||D&&!uo(D,o.tabbableOptions))if(l(r.activeElement)>=0)D=r.activeElement;else{var _=s.tabbableGroups[0];D=_&&_.firstTabbableNode||c("fallbackFocus")}else D===null&&(D=c("fallbackFocus"));if(!D)throw new Error("Your focus-trap needs to have at least one focusable element");return D},d=function(){if(s.containerGroups=s.containers.map(function(D){var _=mm(D,o.tabbableOptions),w=Xl(D,o.tabbableOptions),k=_.length>0?_[0]:void 0,x=_.length>0?_[_.length-1]:void 0,L=w.find(function(H){return On(H)}),M=w.slice().reverse().find(function(H){return On(H)}),U=!!_.find(function(H){return rn(H)>0});return{container:D,tabbableNodes:_,focusableNodes:w,posTabIndexesFound:U,firstTabbableNode:k,lastTabbableNode:x,firstDomTabbableNode:L,lastDomTabbableNode:M,nextTabbableNode:function(H){var V=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],G=_.indexOf(H);return G<0?V?w.slice(w.indexOf(H)+1).find(function(Y){return On(Y)}):w.slice(0,w.indexOf(H)).reverse().find(function(Y){return On(Y)}):_[G+(V?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(D){return D.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(D){return D.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(D){var _=D.activeElement;if(_)return _.shadowRoot&&_.shadowRoot.activeElement!==null?h(_.shadowRoot):_},f=function(D){D!==!1&&D!==h(document)&&(D&&D.focus?(D.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=D,function(_){return _.tagName&&_.tagName.toLowerCase()==="input"&&typeof _.select=="function"}(D)&&D.select()):f(u()))},p=function(D){var _=c("setReturnFocus",{params:[D]});return _||_!==!1&&D},m=function(D){var _=D.target,w=D.event,k=D.isBackward,x=k!==void 0&&k;_=_||Zi(w),d();var L=null;if(s.tabbableGroups.length>0){var M=l(_,w),U=M>=0?s.containerGroups[M]:void 0;if(M<0)L=x?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(x){var H=s.tabbableGroups.findIndex(function(tt){var rt=tt.firstTabbableNode;return _===rt});if(H<0&&(U.container===_||uo(_,o.tabbableOptions)&&!On(_,o.tabbableOptions)&&!U.nextTabbableNode(_,!1))&&(H=M),H>=0){var V=H===0?s.tabbableGroups.length-1:H-1,G=s.tabbableGroups[V];L=rn(_)>=0?G.lastTabbableNode:G.lastDomTabbableNode}else si(w)||(L=U.nextTabbableNode(_,!1))}else{var Y=s.tabbableGroups.findIndex(function(tt){var rt=tt.lastTabbableNode;return _===rt});if(Y<0&&(U.container===_||uo(_,o.tabbableOptions)&&!On(_,o.tabbableOptions)&&!U.nextTabbableNode(_))&&(Y=M),Y>=0){var nt=Y===s.tabbableGroups.length-1?0:Y+1,_t=s.tabbableGroups[nt];L=rn(_)>=0?_t.firstTabbableNode:_t.firstDomTabbableNode}else si(w)||(L=U.nextTabbableNode(_))}}else L=c("fallbackFocus");return L},E=function(D){var _=Zi(D);l(_,D)>=0||(Vr(o.clickOutsideDeactivates,D)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):Vr(o.allowOutsideClick,D)||D.preventDefault())},A=function(D){var _=Zi(D),w=l(_,D)>=0;if(w||_ instanceof Document)w&&(s.mostRecentlyFocusedNode=_);else{var k;D.stopImmediatePropagation();var x=!0;if(s.mostRecentlyFocusedNode)if(rn(s.mostRecentlyFocusedNode)>0){var L=l(s.mostRecentlyFocusedNode),M=s.containerGroups[L].tabbableNodes;if(M.length>0){var U=M.findIndex(function(H){return H===s.mostRecentlyFocusedNode});U>=0&&(o.isKeyForward(s.recentNavEvent)?U+1<M.length&&(k=M[U+1],x=!1):U-1>=0&&(k=M[U-1],x=!1))}}else s.containerGroups.some(function(H){return H.tabbableNodes.some(function(V){return rn(V)>0})})||(x=!1);else x=!1;x&&(k=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),f(k||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},g=function(D){(o.isKeyForward(D)||o.isKeyBackward(D))&&function(_){var w=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=_;var k=m({event:_,isBackward:w});k&&(si(_)&&_.preventDefault(),f(k))}(D,o.isKeyBackward(D))},O=function(D){(function(_){return(_==null?void 0:_.key)==="Escape"||(_==null?void 0:_.key)==="Esc"||(_==null?void 0:_.keyCode)===27})(D)&&Vr(o.escapeDeactivates,D)!==!1&&(D.preventDefault(),n.deactivate())},S=function(D){var _=Zi(D);l(_,D)>=0||Vr(o.clickOutsideDeactivates,D)||Vr(o.allowOutsideClick,D)||(D.preventDefault(),D.stopImmediatePropagation())},T=function(){if(s.active)return $e.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?Yd(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",g,{capture:!0,passive:!1}),r.addEventListener("keydown",O),n},y=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),n},I=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(D){D.some(function(_){return Array.from(_.removedNodes).some(function(w){return w===s.mostRecentlyFocusedNode})})&&f(u())}):void 0,N=function(){I&&(I.disconnect(),s.active&&!s.paused&&s.containers.map(function(D){I.observe(D,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(D){if(s.active)return this;var _=a(D,"onActivate"),w=a(D,"onPostActivate"),k=a(D,"checkCanFocusTrap"),x=$e.getActiveTrap(i),L=!1;x&&!x.paused&&(x._setSubtreeIsolation(!1),L=!0);try{k||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=h(r),_==null||_();var M=function(){k&&d(),T(),N(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),w==null||w()};if(k)return k(s.containers.concat()).then(M,M),this;M()}catch(U){throw x===$e.getActiveTrap(i)&&L&&x._setSubtreeIsolation(!0),U}return this},deactivate:function(D){if(!s.active)return this;var _=Vd({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},D);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),y(),s.active=!1,s.paused=!1,N(),$e.deactivateTrap(i,n);var w=a(_,"onDeactivate"),k=a(_,"onPostDeactivate"),x=a(_,"checkCanReturnFocus"),L=a(_,"returnFocus","returnFocusOnDeactivate");w==null||w();var M=function(){Yd(function(){L&&f(p(s.nodeFocusedBeforeActivation)),k==null||k()})};return L&&x?(x(p(s.nodeFocusedBeforeActivation)).then(M,M),this):(M(),this)},pause:function(D){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,D)):this},unpause:function(D){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,D)):this},updateContainerElements:function(D){var _=[].concat(D).filter(Boolean);return s.containers=_.map(function(w){return typeof w=="string"?r.querySelector(w):w}),o.isolateSubtrees&&function(w){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var k,x=new Set,L=new Set,M=jd(w);try{for(M.s();!(k=M.n()).done;){var U=k.value;x.add(U);for(var H=typeof ShadowRoot!="undefined"&&U.getRootNode()instanceof ShadowRoot,V=U;V;){x.add(V);var G=V.parentElement,Y=[];G?Y=G.children:!G&&H&&(Y=V.getRootNode().children,G=V.getRootNode().host,H=typeof ShadowRoot!="undefined"&&G.getRootNode()instanceof ShadowRoot);var nt,_t=jd(Y);try{for(_t.s();!(nt=_t.n()).done;){var tt=nt.value;L.add(tt)}}catch(rt){_t.e(rt)}finally{_t.f()}V=G}}}catch(rt){M.e(rt)}finally{M.f()}x.forEach(function(rt){L.delete(rt)}),s.adjacentElements=L}(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(D,_){if(s.paused===D)return this;if(s.paused=D,D){var w=a(_,"onPause"),k=a(_,"onPostPause");w==null||w(),y(),N(),n._setSubtreeIsolation(!1),k==null||k()}else{var x=a(_,"onUnpause"),L=a(_,"onPostUnpause");x==null||x(),n._setSubtreeIsolation(!0),d(),T(),N(),L==null||L()}return this}},_setSubtreeIsolation:{value:function(D){o.isolateSubtrees&&s.adjacentElements.forEach(function(_){D?((_.inert||_.hasAttribute("inert"))&&s.alreadyInert.add(_),_.inert=!0):s.alreadyInert.has(_)||(_.inert=!1)})}}}),n.updateContainerElements(e),n}},Symbol.toStringTag,{value:"Module"})),UO=wh(BO),jO=wh(wO);function mr(e){return mr=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},mr(e)}var fa,ma;function $O(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,gm(s.key),s)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VO(e,t,n){return t=zo(t),function(r,i){if(i&&(mr(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,Am()?Reflect.construct(t,n||[],zo(e).constructor):t.apply(e,n))}function Am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Am=function(){return!!e})()}function zo(e){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(e)}function il(e,t){return il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},il(e,t)}function gm(e){var t=function(n,r){if(mr(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(mr(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return mr(t)=="symbol"?t:t+""}var Jr=R,YO=UO.createFocusTrap,zO=jO.isFocusable,GO=parseInt((fa=(ma=/^(\d+)\./.exec(Jr.version))===null||ma===void 0?void 0:ma[1])!==null&&fa!==void 0?fa:0,10),ol=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=gm(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=VO(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&&il(t,n)}(e,Jr.Component),$O(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||zO(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?Jr.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===Jr.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return Jr.cloneElement(n,{ref:function(r){var i=t.props.containerElements;n&&(GO>=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}}])}();ol.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:YO},lm.exports=ol;var XO=lm.exports.FocusTrap=ol;function Dm(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}=R.useMemo(()=>({anchor:zd(r),boundary:i?zd(i):void 0}),[r,i]);let u=[];c&&(u=[CO({boundary:c,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),IO({boundary:c,padding:8}),vO({boundary:c})]);const{refs:d,floatingStyles:h,middlewareData:f}=function(E){E===void 0&&(E={});const{placement:A="bottom",strategy:g="absolute",middleware:O=[],platform:S,elements:{reference:T,floating:y}={},transform:I=!0,whileElementsMounted:N,open:D}=E,[_,w]=st.useState({x:0,y:0,strategy:g,placement:A,middlewareData:{},isPositioned:!1}),[k,x]=st.useState(O);jo(k,O)||x(O);const[L,M]=st.useState(null),[U,H]=st.useState(null),V=st.useCallback(lt=>{lt!==_t.current&&(_t.current=lt,M(lt))},[]),G=st.useCallback(lt=>{lt!==tt.current&&(tt.current=lt,H(lt))},[]),Y=T||L,nt=y||U,_t=st.useRef(null),tt=st.useRef(null),rt=st.useRef(_),En=N!=null,Gn=pa(N),wr=pa(S),Mr=pa(D),pe=st.useCallback(()=>{if(!_t.current||!tt.current)return;const lt={placement:A,strategy:g,middleware:k};wr.current&&(lt.platform=wr.current),RO(_t.current,tt.current,lt).then(Xn=>{const De={...Xn,isPositioned:Mr.current!==!1};xr.current&&!jo(rt.current,De)&&(rt.current=De,$m.flushSync(()=>{w(De)}))})},[k,A,g,wr,Mr]);lo(()=>{D===!1&&rt.current.isPositioned&&(rt.current.isPositioned=!1,w(lt=>({...lt,isPositioned:!1})))},[D]);const xr=st.useRef(!1);lo(()=>(xr.current=!0,()=>{xr.current=!1}),[]),lo(()=>{if(Y&&(_t.current=Y),nt&&(tt.current=nt),Y&&nt){if(Gn.current)return Gn.current(Y,nt,pe);pe()}},[Y,nt,pe,Gn,En]);const ge=st.useMemo(()=>({reference:_t,floating:tt,setReference:V,setFloating:G}),[V,G]),It=st.useMemo(()=>({reference:Y,floating:nt}),[Y,nt]),xe=st.useMemo(()=>{const lt={position:g,left:0,top:0};if(!It.floating)return lt;const Xn=Bd(It.floating,_.x),De=Bd(It.floating,_.y);return I?{...lt,transform:"translate("+Xn+"px, "+De+"px)",...am(It.floating)>=1.5&&{willChange:"transform"}}:{position:g,left:Xn,top:De}},[g,I,It.floating,_.x,_.y]);return st.useMemo(()=>({..._,update:pe,refs:ge,elements:It,floatingStyles:xe}),[_,pe,ge,It,xe])}({placement:n,middleware:u,whileElementsMounted:_O});R.useLayoutEffect(()=>{l&&d.setReference(l)},[d,l]);const p=o?v.jsx(XO,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:v.jsxs("div",{children:[t,v.jsx("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t;return v.jsx("div",{ref:d.setFloating,style:{...h,zIndex:1e3,visibility:(m=f.hide)!=null&&m.referenceHidden?"hidden":"visible"},...a,children:p})}function zd(e){return typeof e=="string"?document.querySelector(e):e}function _m(e){const t=et(),n=vi(),r=K(n.state$.suggestMentionQuery),i=Mf(K(t.state$.extCurrentConversationId),r?1e3:0),o=R.useMemo(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=R.useState(0),l=R.useMemo(()=>Object.fromEntries(o.map(E=>[E.id,ng(E.name)])),[o]),c=R.useMemo(()=>{if(!r)return[];const E=Gd(r);return E===""?o:o.filter(A=>l[A.id].some(g=>function(O,S){return nd(O.substring(0,S.length),S)}(g,E)))},[r,o,l]),u=R.useRef(void 0);R.useEffect(()=>{if(u.current){const E=c.findIndex(A=>A.id===u.current);a(E===-1?0:E)}},[c]),R.useEffect(()=>{var E;u.current=(E=c[s])==null?void 0:E.id},[s,c]);const d=R.useCallback(E=>{var g;const A=(g=c[E])==null?void 0:g.id;return A&&"mention-button-"+A},[c]),{containerProps:h,itemProps:f}=Kf({focused:s,setFocused:a,buttonId:d});if(R.useEffect(()=>{if(c.length!==0)return n.listenKeydown("mention",E=>Wf(E,{dir:"ttb",focused:s,setFocused:a,itemCount:c.length,onSpace(){if(r){const A=c[s];if(nd(A.name,Gd(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]),xi(()=>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 v.jsx(Dm,{className:"t-mention-suggest-list",...h,anchorElement:m,children:c.map((E,A)=>v.jsx(WO,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...f(A)},E.id))})}const WO=st.memo(function(e){const{user:t,isFocused:n,onSelect:r,...i}=e;return v.jsx("button",{className:n?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function Gd(e){return Z(e[0]==="@"),e.substring(1)}function Xd(e,t,n){const r=Xl(e),i=r.indexOf(t);return i===-1?null:r[i+n]||null}const KO=R.forwardRef(function(e,t){const{children:n,triggerElement:r}=e,{closePopover:i}=El(),o=R.useRef(null);R.useImperativeHandle(t,()=>o.current),R.useEffect(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=R.useCallback(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"),g=l.shiftKey?Xd(A,u,-1):function(O,S){return Xd(O,S,1)}(A,u);return g==null||g.focus(),void d()}default:return}(E=h[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return v.jsx("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function or(e){const{popoverComponent:t,popoverProps:n,children:r,type:i="popover",initialFocus:o,...s}=e,[a,l]=R.useState(void 0),c=R.useRef(null),[u,d]=R.useState(!1);xi(R.useCallback(()=>{var f;d(!1),(f=c.current)==null||f.focus()},[]),"[t-popover-content]",u);const h=i==="menu"?v.jsx(KO,{triggerElement:c.current,children:v.jsx(t,{...n})}):v.jsx(t,{...n});return v.jsxs(ME.Provider,{value:{closePopover:()=>d(!1)},children:[v.jsx(qO,{...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&&v.jsx(Dm,{"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 qO=R.forwardRef(function(e,t){const{onTrigger:n,...r}=e,i=R.useCallback(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return v.jsx("button",{...r,ref:t,onClick:n,onKeyDown:i})});function en(e){const{onSelect:t,...n}=e,{closePopover:r}=El(),i=R.useCallback(s=>{s.key!=="Enter"&&s.key!==" "||(r(),t==null||t())},[t,r]),o=R.useCallback(()=>{r(),t==null||t()},[r,t]);return v.jsx("div",{tabIndex:-1,role:"menuitem",onClick:o,onKeyDown:i,"t-menu-item":"",...n})}function Om(e){return ef(e)}function Sn(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">
1277
+ <rect x="0" y="0" width="100" height="100" fill="${ef(n)}"/>
1278
1278
  <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>
1279
- </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+KA(i)}(e.id,ZA(e.name))}function Jr(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 Xl({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=${D_}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function Dm(e,t){const[n,r]=T.useState({long:"",short:""});return T.useLayoutEffect(()=>{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),g={month:"short",day:"numeric"};if(f<Xd)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(f<Wd)p=Xd,m="MINUTES",E=h.MINUTES;else if(f<Kd)p=Wd,m="HOURS",E=h.HOURS;else{if(!(f<XO)){if(A.getFullYear()===new Date(u).getFullYear()){const S=A.toLocaleDateString(h.locale,g);return{changeTimeout:void 0,short:S,long:S}}{const S=A.toLocaleDateString(h.locale,{...g,year:"numeric"});return{changeTimeout:void 0,short:S,long:S}}}p=Kd,m="DAYS",E=h.DAYS}const O=Math.floor(f/p);return{changeTimeout:p,short:O+E,long:WO(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 Wl(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 Gd=864e5;function _m(e,t){const n=Date.now(),r=(i=e,o=n,Math.floor((o-i)/Gd));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*Gd))}(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 Xd=6e4,Wd=36e5,Kd=864e5,XO=6048e5;function WO(e,t,n){return new Intl.RelativeTimeFormat(n).format(-e,t)}function P(e,...t){const n=A_.bind(at.createElement)(e,...t);return Array.isArray(n)?at.createElement(at.Fragment,{},...n):n}function uo(e,t=10){return kf(e,Math.min(t,100))}function Om({children:e,className:t,...n}){return v.jsx("div",{className:"t-attach-overlay "+t,...n,children:e})}function KO({uploadState:e}){const{uploaded:t,errored:n}=e;Mi(()=>e.closePreview("cancel"),".t-upload-preview");const r=T.useRef(null);T.useEffect(()=>{t&&r.current.focus()},[t]);const i=q(nt().t$);return v.jsx(Om,{className:"t-upload-preview",children:v.jsxs("div",{className:"t-preview",children:[!n&&v.jsx(qO,{upload:e.upload,uploaded:t}),n&&v.jsx("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),v.jsxs("div",{className:"t-send-row",children:[v.jsx("button",{className:"t-cancel",onClick:()=>e.closePreview("cancel"),children:i.CANCEL}),!n&&t&&v.jsx("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>e.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function qO({upload:e,uploaded:t}){const n=q(nt().t$);return e.type!=="location"?v.jsxs(v.Fragment,{children:[v.jsx(ZO,{upload:e}),v.jsx(QO,{upload:e,uploaded:t,t:n})]}):t?v.jsx(JO,{location:e.location}):v.jsx("div",{className:"t-loading",children:v.jsx(Pl,{})})}function JO({location:e}){const{imageUrl:t,linkUrl:n}=Xl(e),r=JSON.stringify(t);return v.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${r}) center center / cover no-repeat`}})}const ZO=at.memo(function({upload:e}){let t=null;const n=e.file;if(e.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";t=v.jsx("div",{className:"video-container",children:v.jsx(tS,{src:e.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else if(e.type==="image"){const r=URL.createObjectURL(n);t=v.jsx("div",{className:"t-img-container",children:v.jsx("img",{src:r})})}else if(e.type==="audio"){const r=URL.createObjectURL(n);t=v.jsx(ko,{src:r,filename:n.name})}return t}),QO=at.memo(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")),v.jsx("div",{className:`t-filename-row ${i}`,children:v.jsx("div",{className:o,children:r})})});function tS(e){const{videoType:t,...n}=e;return v.jsx("video",{...n})}function eS(){const e=Jt(),t=nt(),n=Ze(),r=q(t.state$.isUserConnected),i=q(t.state$.userPermissions);return v.jsx(e.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function nS(){const e=Jt(),t=Ze();return v.jsx(e.MessageListHeader,{common:t})}function rS({appId:e,chatHeaderVisible:t,messageFieldVisible:n}){const r=Ci(),i=function(){const m=nt(),E=pe(()=>{const O=m.extUserId$.get(),S=m.errors$.get(),R=m.authTokenState$.get(),b=O&&m.currentUser$.get(),I=m.state$.currentConversation.get(),y=m.state$.extCurrentConversationId.get(),D=y&&m.state$.participants.child(y).get(),_=y&&m.state$.typing.child(y).get(),w=m.app$.get();return S.serverError?"server-error":S.wrongAppId?"wrong-app-id":R==="loading"||R==="idle"?"loading-token":R==="invalid"?"invalid-token":R==="expired"?"expired-token":R==="valid"?S.unknownUser?"unknown-user":S.unknownConversation?"loading-conv-failed":b&&I&&D&&w&&_?"loaded":"loading-data":void lt.unreachable()}),A=pe({type:"loading"});Ir(O=>{const S=E.get(),R=m.state$.extCurrentConversationId.peek(),b=m.extUserId$.peek(),I=m.appId$.peek();function y(D){A.set({type:"loading"});const _=setTimeout(()=>{A.set(D)},5e3);return()=>clearTimeout(_)}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:I});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:R,userId:b});break;case"loading-conv-failed":O.onCleanup=y({type:"inaccessible-conversation",userId:b,conversationId:R});break;case"unknown-user":O.onCleanup=y({type:"unknown-user",userId:b});break;default:lt.never(S)}});const g=pe({type:"loading"});return Ir(O=>{if(A.type.get()==="loading"){g.set({type:"invisible-loading"});const S=setTimeout(()=>{g.set({type:"loading"})},1e3);O.onCleanup=()=>{clearTimeout(S)}}else g.set(A.get())}),q(g)}(),{attachFile:o,shareLocation:s,uploadState:a}=E_({onClose:()=>r.focus()});T.useEffect(()=>{r.uploadFile=o},[r,o]);const[l,c]=T.useState(!1),u=nt(),d=q(()=>u.app$.get()?u.state$.userPermissions.canShareFile.get():void 0),h=T.useCallback(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),c(!1)},[o]),f=T.useCallback(m=>{m.preventDefault(),c(!0)},[]),p=T.useCallback(m=>{m.preventDefault(),c(!1)},[]);return Ul(),i.type==="invisible-loading"?v.jsx(v.Fragment,{}):i.type==="loading"?v.jsx(yf,{}):i.type==="inaccessible-conversation"?v.jsx(p_,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?v.jsx(as,{appId:e,chatboxState:i}):i.type=="expired-token"?v.jsx(bf,{}):i.type==="loaded"?v.jsxs("div",{className:"t-chatbox-content",onDragOver:d?f:void 0,onDragLeave:d?p:void 0,onDrop:d?h:void 0,children:[t&&v.jsx(eS,{}),v.jsx(nS,{}),v.jsx(l_,{extConversationId:i.conversationId}),v.jsx(r_,{}),n&&v.jsx(vf,{attachFile:o,shareLocation:s}),a&&v.jsx(KO,{uploadState:a}),l&&v.jsx(Om,{className:"t-drop-overlay",children:v.jsx(Lo,{type:"attach"})})]}):v.jsx(v.Fragment,{})}function iS(e,t){return e.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=Hl(a);return ho(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Gi(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Gi(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Gi(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,`📎 ${Gi(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
1279
+ </svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+ZA(i)}(e.id,eg(e.name))}function Zr(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 Wl({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=${O_}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function Sm(e,t){const[n,r]=R.useState({long:"",short:""});return R.useLayoutEffect(()=>{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),g={month:"short",day:"numeric"};if(f<Kd)return{changeTimeout:5e3,short:h.JUST_NOW,long:h.JUST_NOW};if(f<qd)p=Kd,m="MINUTES",E=h.MINUTES;else if(f<Jd)p=qd,m="HOURS",E=h.HOURS;else{if(!(f<JO)){if(A.getFullYear()===new Date(u).getFullYear()){const S=A.toLocaleDateString(h.locale,g);return{changeTimeout:void 0,short:S,long:S}}{const S=A.toLocaleDateString(h.locale,{...g,year:"numeric"});return{changeTimeout:void 0,short:S,long:S}}}p=Jd,m="DAYS",E=h.DAYS}const O=Math.floor(f/p);return{changeTimeout:p,short:O+E,long:ZO(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 Kl(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 Wd=864e5;function Tm(e,t){const n=Date.now(),r=(i=e,o=n,Math.floor((o-i)/Wd));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*Wd))}(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 Kd=6e4,qd=36e5,Jd=864e5,JO=6048e5;function ZO(e,t,n){return new Intl.RelativeTimeFormat(n).format(-e,t)}function P(e,...t){const n=D_.bind(st.createElement)(e,...t);return Array.isArray(n)?st.createElement(st.Fragment,{},...n):n}function ho(e,t=10){return Mf(e,Math.min(t,100))}function Rm({children:e,className:t,...n}){return v.jsx("div",{className:"t-attach-overlay "+t,...n,children:e})}function QO({uploadState:e}){const{uploaded:t,errored:n}=e;xi(()=>e.closePreview("cancel"),".t-upload-preview");const r=R.useRef(null);R.useEffect(()=>{t&&r.current.focus()},[t]);const i=K(et().t$);return v.jsx(Rm,{className:"t-upload-preview",children:v.jsxs("div",{className:"t-preview",children:[!n&&v.jsx(tS,{upload:e.upload,uploaded:t}),n&&v.jsx("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),v.jsxs("div",{className:"t-send-row",children:[v.jsx("button",{className:"t-cancel",onClick:()=>e.closePreview("cancel"),children:i.CANCEL}),!n&&t&&v.jsx("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>e.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function tS({upload:e,uploaded:t}){const n=K(et().t$);return e.type!=="location"?v.jsxs(v.Fragment,{children:[v.jsx(nS,{upload:e}),v.jsx(rS,{upload:e,uploaded:t,t:n})]}):t?v.jsx(eS,{location:e.location}):v.jsx("div",{className:"t-loading",children:v.jsx(Hl,{})})}function eS({location:e}){const{imageUrl:t,linkUrl:n}=Wl(e),r=JSON.stringify(t);return v.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${r}) center center / cover no-repeat`}})}const nS=st.memo(function({upload:e}){let t=null;const n=e.file;if(e.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";t=v.jsx("div",{className:"video-container",children:v.jsx(iS,{src:e.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else if(e.type==="image"){const r=URL.createObjectURL(n);t=v.jsx("div",{className:"t-img-container",children:v.jsx("img",{src:r})})}else if(e.type==="audio"){const r=URL.createObjectURL(n);t=v.jsx(wo,{src:r,filename:n.name})}return t}),rS=st.memo(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")),v.jsx("div",{className:`t-filename-row ${i}`,children:v.jsx("div",{className:o,children:r})})});function iS(e){const{videoType:t,...n}=e;return v.jsx("video",{...n})}function oS(){const e=qt(),t=et(),n=Ke(),r=K(t.state$.isUserConnected),i=K(t.state$.userPermissions);return v.jsx(e.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function sS(){const e=qt(),t=Ke();return v.jsx(e.MessageListHeader,{common:t})}function aS({appId:e,chatHeaderVisible:t,messageFieldVisible:n}){const r=vi(),i=function(){const m=et(),E=ue(()=>{const O=m.extUserId$.get(),S=m.errors$.get(),T=m.authTokenState$.get(),y=O&&m.currentUser$.get(),I=m.state$.currentConversation.get(),N=m.state$.extCurrentConversationId.get(),D=N&&m.state$.participants.child(N).get(),_=N&&m.state$.typing.child(N).get(),w=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":y&&I&&D&&w&&_?"loaded":"loading-data":void Z.unreachable()}),A=ue({type:"loading"});Tr(O=>{const S=E.get(),T=m.state$.extCurrentConversationId.peek(),y=m.extUserId$.peek(),I=m.appId$.peek();function N(D){A.set({type:"loading"});const _=setTimeout(()=>{A.set(D)},5e3);return()=>clearTimeout(_)}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:I});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:y});break;case"loading-conv-failed":O.onCleanup=N({type:"inaccessible-conversation",userId:y,conversationId:T});break;case"unknown-user":O.onCleanup=N({type:"unknown-user",userId:y});break;default:Z.never(S)}});const g=ue({type:"loading"});return Tr(O=>{if(A.type.get()==="loading"){g.set({type:"invisible-loading"});const S=setTimeout(()=>{g.set({type:"loading"})},1e3);O.onCleanup=()=>{clearTimeout(S)}}else g.set(A.get())}),K(g)}(),{attachFile:o,shareLocation:s,uploadState:a}=g_({onClose:()=>r.focus()});R.useEffect(()=>{r.uploadFile=o},[r,o]);const[l,c]=R.useState(!1),u=et(),d=K(()=>u.app$.get()?u.state$.userPermissions.canShareFile.get():void 0),h=R.useCallback(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),c(!1)},[o]),f=R.useCallback(m=>{m.preventDefault(),c(!0)},[]),p=R.useCallback(m=>{m.preventDefault(),c(!1)},[]);return $l(),i.type==="invisible-loading"?v.jsx(v.Fragment,{}):i.type==="loading"?v.jsx(Lf,{}):i.type==="inaccessible-conversation"?v.jsx(m_,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?v.jsx(us,{appId:e,chatboxState:i}):i.type=="expired-token"?v.jsx(kf,{}):i.type==="loaded"?v.jsxs("div",{className:"t-chatbox-content",onDragOver:d?f:void 0,onDragLeave:d?p:void 0,onDrop:d?h:void 0,children:[t&&v.jsx(oS,{}),v.jsx(sS,{}),v.jsx(u_,{extConversationId:i.conversationId}),v.jsx(o_,{}),n&&v.jsx(bf,{attachFile:o,shareLocation:s}),a&&v.jsx(QO,{uploadState:a}),l&&v.jsx(Rm,{className:"t-drop-overlay",children:v.jsx(ko,{type:"attach"})})]}):v.jsx(v.Fragment,{})}function lS(e,t){return e.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=Ul(a);return po(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Xi(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Xi(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Xi(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,`📎 ${Xi(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
1280
1280
 
1281
- `)}function ho(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 ho(n.children,t);case"bulletlist":case"bulletList":return`
1282
- `+ho(n.children,t);case"bulletpoint":case"bulletPoint":return"- "+ho(n.children,t)+`
1283
- `;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 Zi=new Uint8Array(31);function Sm(){if(globalThis.crypto!==void 0)crypto.getRandomValues(Zi);else for(let t=0;t<Zi.length;t++)Zi[t]=Math.floor(256*Math.random());let e=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^Zi[e++]&15>>+t/4).toString(16))}class oS{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,g,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:(g=(A=u.referencedMessage)==null?void 0:A.id)!=null?g:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,f="content"in a?[qd(h,a.content[0])]:[sS(a.text)],p="text"in a?a.text:iS(a.content.map(S=>qd(h,S)),{});return{id:"ephemeral-"+Sm(),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=Ei();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&&e_(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 sS=e=>({type:"text",children:function(n){return _f(n,{except:["FormattedLink","Actions"]})}(e)});function qd(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 Jd(e){return Object.keys(e)}class ha extends Error{constructor(t,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
1284
- `);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 Ti=console;class aS{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 Vr(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,n){await this._lastPutPromise;const r=Vr(()=>this._doPut(t,n));return this._lastPutPromise=r,r}put(t,n,r){const i=()=>this._doPut(t,n);return r?Zd(i,r):Vr(i,{retries:5})}post(t,n,r){const i=()=>this._doPost(t,n);return r?Zd(i,r):Vr(i,{retries:5})}delete(t,n={}){return Vr(()=>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 Do.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new ha("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 Do.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new ha("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 ha(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:(Ti.error(`401 error from ${n==null?void 0:n.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function Tm(e){return!e.userMessage}function Vr(e,{retries:t=30}={}){return Fl(t,e,{shouldRetry:Tm,log:Ti.warn.bind(Ti),maxDelay:30,initialDelay:.2})}async function Zd(e,t){try{return await e()}catch(r){if(!Tm(r))throw r}let n=!1;return t.then(()=>{n=!0}),Fl(1e3,e,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:Ti.warn.bind(Ti)})}var il={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 $i=="object"&&$i&&$i.Object===Object&&$i,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 C=p&&p.require&&p.require("util").types;return C||E&&E.binding&&E.binding("util")}catch(L){}}(),g=A&&A.isTypedArray,O,S=Array.prototype,R=Function.prototype,b=Object.prototype,I=h["__core-js_shared__"],y=R.toString,D=b.hasOwnProperty,_=(O=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",w=b.toString,k=y.call(Object),x=RegExp("^"+y.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=m?h.Buffer:void 0,M=h.Symbol,U=h.Uint8Array;N&&N.allocUnsafe;var F,Y,z=(F=Object.getPrototypeOf,Y=Object,function(C){return F(Y(C))}),V=Object.create,J=b.propertyIsEnumerable,rt=S.splice,W=M?M.toStringTag:void 0,et=function(){try{var C=ds(Object,"defineProperty");return C({},"",{}),C}catch(L){}}(),it=N?N.isBuffer:void 0,ae=Math.max,Ht=Date.now,Zt=ds(h,"Map"),Ee=ds(Object,"create"),Mr=function(){function C(){}return function(L){if(!Dn(L))return{};if(V)return V(L);C.prototype=L;var H=new C;return C.prototype=void 0,H}}();function Oe(C){var L=-1,H=C==null?0:C.length;for(this.clear();++L<H;){var j=C[L];this.set(j[0],j[1])}}function Ct(C){var L=-1,H=C==null?0:C.length;for(this.clear();++L<H;){var j=C[L];this.set(j[0],j[1])}}function He(C){var L=-1,H=C==null?0:C.length;for(this.clear();++L<H;){var j=C[L];this.set(j[0],j[1])}}function ut(C){var L=this.__data__=new Ct(C);this.size=L.size}function Gn(C,L){var H=fs(C),j=!H&&ps(C),K=!H&&!j&&Ql(C),dt=!H&&!j&&!K&&ec(C),st=H||j||K||dt,Bt=st?function(Nt,Be){for(var Xt=-1,Xn=Array(Nt);++Xt<Nt;)Xn[Xt]=Be(Xt);return Xn}(C.length,String):[],Gt=Bt.length;for(var ht in C)st&&(ht=="length"||K&&(ht=="offset"||ht=="parent")||dt&&(ht=="buffer"||ht=="byteLength"||ht=="byteOffset")||Jl(ht,Gt))||Bt.push(ht);return Bt}function Se(C,L,H){(H!==void 0&&!Hi(C[L],H)||H===void 0&&!(L in C))&&us(C,L,H)}function vm(C,L,H){var j=C[L];D.call(C,L)&&Hi(j,H)&&(H!==void 0||L in C)||us(C,L,H)}function xi(C,L){for(var H=C.length;H--;)if(Hi(C[H][0],L))return H;return-1}function us(C,L,H){L=="__proto__"&&et?et(C,L,{configurable:!0,enumerable:!0,value:H,writable:!0}):C[L]=H}Oe.prototype.clear=function(){this.__data__=Ee?Ee(null):{},this.size=0},Oe.prototype.delete=function(C){var L=this.has(C)&&delete this.__data__[C];return this.size-=L?1:0,L},Oe.prototype.get=function(C){var L=this.__data__;if(Ee){var H=L[C];return H===n?void 0:H}return D.call(L,C)?L[C]:void 0},Oe.prototype.has=function(C){var L=this.__data__;return Ee?L[C]!==void 0:D.call(L,C)},Oe.prototype.set=function(C,L){var H=this.__data__;return this.size+=this.has(C)?0:1,H[C]=Ee&&L===void 0?n:L,this},Ct.prototype.clear=function(){this.__data__=[],this.size=0},Ct.prototype.delete=function(C){var L=this.__data__,H=xi(L,C);return!(H<0)&&(H==L.length-1?L.pop():rt.call(L,H,1),--this.size,!0)},Ct.prototype.get=function(C){var L=this.__data__,H=xi(L,C);return H<0?void 0:L[H][1]},Ct.prototype.has=function(C){return xi(this.__data__,C)>-1},Ct.prototype.set=function(C,L){var H=this.__data__,j=xi(H,C);return j<0?(++this.size,H.push([C,L])):H[j][1]=L,this},He.prototype.clear=function(){this.size=0,this.__data__={hash:new Oe,map:new(Zt||Ct),string:new Oe}},He.prototype.delete=function(C){var L=Fi(this,C).delete(C);return this.size-=L?1:0,L},He.prototype.get=function(C){return Fi(this,C).get(C)},He.prototype.has=function(C){return Fi(this,C).has(C)},He.prototype.set=function(C,L){var H=Fi(this,C),j=H.size;return H.set(C,L),this.size+=H.size==j?0:1,this},ut.prototype.clear=function(){this.__data__=new Ct,this.size=0},ut.prototype.delete=function(C){var L=this.__data__,H=L.delete(C);return this.size=L.size,H},ut.prototype.get=function(C){return this.__data__.get(C)},ut.prototype.has=function(C){return this.__data__.has(C)},ut.prototype.set=function(C,L){var H=this.__data__;if(H instanceof Ct){var j=H.__data__;if(!Zt||j.length<199)return j.push([C,L]),this.size=++H.size,this;H=this.__data__=new He(j)}return H.set(C,L),this.size=H.size,this};var ym=function(C,L,H){for(var j=-1,K=Object(C),dt=H(C),st=dt.length;st--;){var Bt=dt[++j];if(L(K[Bt],Bt,K)===!1)break}return C};function Pi(C){return C==null?C===void 0?"[object Undefined]":"[object Null]":W&&W in Object(C)?function(L){var H=D.call(L,W),j=L[W];try{L[W]=void 0;var K=!0}catch(st){}var dt=w.call(L);return K&&(H?L[W]=j:delete L[W]),dt}(C):function(L){return w.call(L)}(C)}function Kl(C){return xr(C)&&Pi(C)==i}function bm(C){return!(!Dn(C)||function(L){return!!_&&_ in L}(C))&&(Es(C)?x:a).test(function(L){if(L!=null){try{return y.call(L)}catch(H){}try{return L+""}catch(H){}}return""}(C))}function Lm(C){if(!Dn(C))return function(K){var dt=[];if(K!=null)for(var st in Object(K))dt.push(st);return dt}(C);var L=Zl(C),H=[];for(var j in C)(j!="constructor"||!L&&D.call(C,j))&&H.push(j);return H}function ql(C,L,H,j,K){C!==L&&ym(L,function(dt,st){if(K||(K=new ut),Dn(dt))(function(Gt,ht,Nt,Be,Xt,Xn,Pr){var Te=hs(Gt,Nt),Wt=hs(ht,Nt),ic=Pr.get(Wt);if(ic)return void Se(Gt,Nt,ic);var Qt=Xn?Xn(Te,Wt,Nt+"",Gt,ht,Pr):void 0,Fr=Qt===void 0;if(Fr){var gs=fs(Wt),Ds=!gs&&Ql(Wt),oc=!gs&&!Ds&&ec(Wt);Qt=Wt,gs||Ds||oc?fs(Te)?Qt=Te:xr(sc=Te)&&ms(sc)?Qt=function(St,le){var Mt=-1,te=St.length;for(le||(le=Array(te));++Mt<te;)le[Mt]=St[Mt];return le}(Te):Ds?(Fr=!1,Qt=Wt.slice()):oc?(Fr=!1,Qt=function(St){var le=(Mt=St.buffer,te=new Mt.constructor(Mt.byteLength),new U(te).set(new U(Mt)),te),Mt,te;return new St.constructor(le,St.byteOffset,St.length)}(Wt)):Qt=[]:function(St){if(!xr(St)||Pi(St)!=s)return!1;var le=z(St);if(le===null)return!0;var Mt=D.call(le,"constructor")&&le.constructor;return typeof Mt=="function"&&Mt instanceof Mt&&y.call(Mt)==k}(Wt)||ps(Wt)?(Qt=Te,ps(Te)?Qt=function(St){return function(le,Mt,te){var Pm=!te;te||(te={});for(var ac=-1,Fm=Mt.length;++ac<Fm;){var _s=Mt[ac],Bi=void 0;Bi===void 0&&(Bi=le[_s]),Pm?us(te,_s,Bi):vm(te,_s,Bi)}return te}(St,nc(St))}(Te):Dn(Te)&&!Es(Te)||(Qt=function(St){return typeof St.constructor!="function"||Zl(St)?{}:Mr(z(St))}(Wt))):Fr=!1}var sc;Fr&&(Pr.set(Wt,Qt),Xt(Qt,Wt,Be,Xn,Pr),Pr.delete(Wt)),Se(Gt,Nt,Qt)})(C,L,st,H,ql,j,K);else{var Bt=j?j(hs(C,st),dt,st+"",C,L,K):void 0;Bt===void 0&&(Bt=dt),Se(C,st,Bt)}},nc)}function km(C,L){return Mm(function(H,j,K){return j=ae(j===void 0?H.length-1:j,0),function(){for(var dt=arguments,st=-1,Bt=ae(dt.length-j,0),Gt=Array(Bt);++st<Bt;)Gt[st]=dt[j+st];st=-1;for(var ht=Array(j+1);++st<j;)ht[st]=dt[st];return ht[j]=K(Gt),function(Nt,Be,Xt){switch(Xt.length){case 0:return Nt.call(Be);case 1:return Nt.call(Be,Xt[0]);case 2:return Nt.call(Be,Xt[0],Xt[1]);case 3:return Nt.call(Be,Xt[0],Xt[1],Xt[2])}return Nt.apply(Be,Xt)}(H,this,ht)}}(C,L,rc),C+"")}var wm=et?function(C,L){return et(C,"toString",{configurable:!0,enumerable:!1,value:(H=L,function(){return H}),writable:!0});var H}:rc;function Fi(C,L){var H,j,K=C.__data__;return((j=typeof(H=L))=="string"||j=="number"||j=="symbol"||j=="boolean"?H!=="__proto__":H===null)?K[typeof L=="string"?"string":"hash"]:K.map}function ds(C,L){var H=function(j,K){return j==null?void 0:j[K]}(C,L);return bm(H)?H:void 0}function Jl(C,L){var H=typeof C;return!!(L=L==null?r:L)&&(H=="number"||H!="symbol"&&l.test(C))&&C>-1&&C%1==0&&C<L}function Zl(C){var L=C&&C.constructor;return C===(typeof L=="function"&&L.prototype||b)}function hs(C,L){if((L!=="constructor"||typeof C[L]!="function")&&L!="__proto__")return C[L]}var Mm=function(C){var L=0,H=0;return function(){var j=Ht(),K=16-(j-H);if(H=j,K>0){if(++L>=800)return arguments[0]}else L=0;return C.apply(void 0,arguments)}}(wm);function Hi(C,L){return C===L||C!=C&&L!=L}var ps=Kl(function(){return arguments}())?Kl:function(C){return xr(C)&&D.call(C,"callee")&&!J.call(C,"callee")},fs=Array.isArray;function ms(C){return C!=null&&tc(C.length)&&!Es(C)}var Ql=it||function(){return!1};function Es(C){if(!Dn(C))return!1;var L=Pi(C);return L==o||L=="[object GeneratorFunction]"||L=="[object AsyncFunction]"||L=="[object Proxy]"}function tc(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=r}function Dn(C){var L=typeof C;return C!=null&&(L=="object"||L=="function")}function xr(C){return C!=null&&typeof C=="object"}var ec=g?function(C){return function(L){return C(L)}}(g):function(C){return xr(C)&&tc(C.length)&&!!c[Pi(C)]};function nc(C){return ms(C)?Gn(C):Lm(C)}var As,xm=(As=function(C,L,H){ql(C,L,H)},km(function(C,L){var H=-1,j=L.length,K=j>1?L[j-1]:void 0,dt=j>2?L[2]:void 0;for(K=As.length>3&&typeof K=="function"?(j--,K):void 0,dt&&function(Bt,Gt,ht){if(!Dn(ht))return!1;var Nt=typeof Gt;return!!(Nt=="number"?ms(ht)&&Jl(Gt,ht.length):Nt=="string"&&Gt in ht)&&Hi(ht[Gt],Bt)}(L[0],L[1],dt)&&(K=j<3?void 0:K,j=1),C=Object(C);++H<j;){var st=L[H];st&&As(C,st,H,K)}return C}));function rc(C){return C}e.exports=xm})(il,il.exports);const lS=hE(il.exports);class cS{constructor(t,n,r,i){this.backendRestClient=new aS(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}},
1281
+ `)}function po(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 po(n.children,t);case"bulletlist":case"bulletList":return`
1282
+ `+po(n.children,t);case"bulletpoint":case"bulletPoint":return"- "+po(n.children,t)+`
1283
+ `;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 Qi=new Uint8Array(31);function Im(){if(globalThis.crypto!==void 0)crypto.getRandomValues(Qi);else for(let t=0;t<Qi.length;t++)Qi[t]=Math.floor(256*Math.random());let e=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^Qi[e++]&15>>+t/4).toString(16))}class cS{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,g,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:(g=(A=u.referencedMessage)==null?void 0:A.id)!=null?g:null};d&&delete d.referencedMessage;const h=s.latestFileUpload,f="content"in a?[Zd(h,a.content[0])]:[uS(a.text)],p="text"in a?a.text:lS(a.content.map(S=>Zd(h,S)),{});return{id:"ephemeral-"+Im(),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=Ai();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&&r_(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 uS=e=>({type:"text",children:function(n){return Sf(n,{except:["FormattedLink","Actions"]})}(e)});function Zd(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)}}class Ea extends Error{constructor(t,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
1284
+ `);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 Ti=console;class dS{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 Yr(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,n){await this._lastPutPromise;const r=Yr(()=>this._doPut(t,n));return this._lastPutPromise=r,r}put(t,n,r){const i=()=>this._doPut(t,n);return r?Qd(i,r):Yr(i,{retries:5})}post(t,n,r){const i=()=>this._doPost(t,n);return r?Qd(i,r):Yr(i,{retries:5})}delete(t,n={}){return Yr(()=>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 _o.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new Ea("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 _o.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new Ea("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 Ea(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:(Ti.error(`401 error from ${n==null?void 0:n.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function Cm(e){return!e.userMessage}function Yr(e,{retries:t=30}={}){return Bl(t,e,{shouldRetry:Cm,log:Ti.warn.bind(Ti),maxDelay:30,initialDelay:.2})}async function Qd(e,t){try{return await e()}catch(r){if(!Cm(r))throw r}let n=!1;return t.then(()=>{n=!0}),Bl(1e3,e,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:Ti.warn.bind(Ti)})}var sl={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 Vi=="object"&&Vi&&Vi.Object===Object&&Vi,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 C=p&&p.require&&p.require("util").types;return C||E&&E.binding&&E.binding("util")}catch(b){}}(),g=A&&A.isTypedArray,O,S=Array.prototype,T=Function.prototype,y=Object.prototype,I=h["__core-js_shared__"],N=T.toString,D=y.hasOwnProperty,_=(O=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",w=y.toString,k=N.call(Object),x=RegExp("^"+N.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=m?h.Buffer:void 0,M=h.Symbol,U=h.Uint8Array;L&&L.allocUnsafe;var H,V,G=(H=Object.getPrototypeOf,V=Object,function(C){return H(V(C))}),Y=Object.create,nt=y.propertyIsEnumerable,_t=S.splice,tt=M?M.toStringTag:void 0,rt=function(){try{var C=ms(Object,"defineProperty");return C({},"",{}),C}catch(b){}}(),En=L?L.isBuffer:void 0,Gn=Math.max,wr=Date.now,Mr=ms(h,"Map"),pe=ms(Object,"create"),xr=function(){function C(){}return function(b){if(!An(b))return{};if(Y)return Y(b);C.prototype=b;var F=new C;return C.prototype=void 0,F}}();function ge(C){var b=-1,F=C==null?0:C.length;for(this.clear();++b<F;){var j=C[b];this.set(j[0],j[1])}}function It(C){var b=-1,F=C==null?0:C.length;for(this.clear();++b<F;){var j=C[b];this.set(j[0],j[1])}}function xe(C){var b=-1,F=C==null?0:C.length;for(this.clear();++b<F;){var j=C[b];this.set(j[0],j[1])}}function lt(C){var b=this.__data__=new It(C);this.size=b.size}function Xn(C,b){var F=gs(C),j=!F&&As(C),W=!F&&!j&&tc(C),ct=!F&&!j&&!W&&nc(C),ot=F||j||W||ct,Ft=ot?function(Ct,Pe){for(var Gt=-1,Wn=Array(Ct);++Gt<Ct;)Wn[Gt]=Pe(Gt);return Wn}(C.length,String):[],zt=Ft.length;for(var ut in C)ot&&(ut=="length"||W&&(ut=="offset"||ut=="parent")||ct&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||Zl(ut,zt))||Ft.push(ut);return Ft}function De(C,b,F){(F!==void 0&&!Bi(C[b],F)||F===void 0&&!(b in C))&&fs(C,b,F)}function Lm(C,b,F){var j=C[b];D.call(C,b)&&Bi(j,F)&&(F!==void 0||b in C)||fs(C,b,F)}function Pi(C,b){for(var F=C.length;F--;)if(Bi(C[F][0],b))return F;return-1}function fs(C,b,F){b=="__proto__"&&rt?rt(C,b,{configurable:!0,enumerable:!0,value:F,writable:!0}):C[b]=F}ge.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},ge.prototype.delete=function(C){var b=this.has(C)&&delete this.__data__[C];return this.size-=b?1:0,b},ge.prototype.get=function(C){var b=this.__data__;if(pe){var F=b[C];return F===n?void 0:F}return D.call(b,C)?b[C]:void 0},ge.prototype.has=function(C){var b=this.__data__;return pe?b[C]!==void 0:D.call(b,C)},ge.prototype.set=function(C,b){var F=this.__data__;return this.size+=this.has(C)?0:1,F[C]=pe&&b===void 0?n:b,this},It.prototype.clear=function(){this.__data__=[],this.size=0},It.prototype.delete=function(C){var b=this.__data__,F=Pi(b,C);return!(F<0)&&(F==b.length-1?b.pop():_t.call(b,F,1),--this.size,!0)},It.prototype.get=function(C){var b=this.__data__,F=Pi(b,C);return F<0?void 0:b[F][1]},It.prototype.has=function(C){return Pi(this.__data__,C)>-1},It.prototype.set=function(C,b){var F=this.__data__,j=Pi(F,C);return j<0?(++this.size,F.push([C,b])):F[j][1]=b,this},xe.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(Mr||It),string:new ge}},xe.prototype.delete=function(C){var b=Hi(this,C).delete(C);return this.size-=b?1:0,b},xe.prototype.get=function(C){return Hi(this,C).get(C)},xe.prototype.has=function(C){return Hi(this,C).has(C)},xe.prototype.set=function(C,b){var F=Hi(this,C),j=F.size;return F.set(C,b),this.size+=F.size==j?0:1,this},lt.prototype.clear=function(){this.__data__=new It,this.size=0},lt.prototype.delete=function(C){var b=this.__data__,F=b.delete(C);return this.size=b.size,F},lt.prototype.get=function(C){return this.__data__.get(C)},lt.prototype.has=function(C){return this.__data__.has(C)},lt.prototype.set=function(C,b){var F=this.__data__;if(F instanceof It){var j=F.__data__;if(!Mr||j.length<199)return j.push([C,b]),this.size=++F.size,this;F=this.__data__=new xe(j)}return F.set(C,b),this.size=F.size,this};var km=function(C,b,F){for(var j=-1,W=Object(C),ct=F(C),ot=ct.length;ot--;){var Ft=ct[++j];if(b(W[Ft],Ft,W)===!1)break}return C};function Fi(C){return C==null?C===void 0?"[object Undefined]":"[object Null]":tt&&tt in Object(C)?function(b){var F=D.call(b,tt),j=b[tt];try{b[tt]=void 0;var W=!0}catch(ot){}var ct=w.call(b);return W&&(F?b[tt]=j:delete b[tt]),ct}(C):function(b){return w.call(b)}(C)}function ql(C){return Pr(C)&&Fi(C)==i}function wm(C){return!(!An(C)||function(b){return!!_&&_ in b}(C))&&(_s(C)?x:a).test(function(b){if(b!=null){try{return N.call(b)}catch(F){}try{return b+""}catch(F){}}return""}(C))}function Mm(C){if(!An(C))return function(W){var ct=[];if(W!=null)for(var ot in Object(W))ct.push(ot);return ct}(C);var b=Ql(C),F=[];for(var j in C)(j!="constructor"||!b&&D.call(C,j))&&F.push(j);return F}function Jl(C,b,F,j,W){C!==b&&km(b,function(ct,ot){if(W||(W=new lt),An(ct))(function(zt,ut,Ct,Pe,Gt,Wn,Fr){var _e=Es(zt,Ct),Xt=Es(ut,Ct),oc=Fr.get(Xt);if(oc)return void De(zt,Ct,oc);var Jt=Wn?Wn(_e,Xt,Ct+"",zt,ut,Fr):void 0,Hr=Jt===void 0;if(Hr){var Ss=gs(Xt),Ts=!Ss&&tc(Xt),sc=!Ss&&!Ts&&nc(Xt);Jt=Xt,Ss||Ts||sc?gs(_e)?Jt=_e:Pr(ac=_e)&&Ds(ac)?Jt=function(Ot,oe){var wt=-1,Zt=Ot.length;for(oe||(oe=Array(Zt));++wt<Zt;)oe[wt]=Ot[wt];return oe}(_e):Ts?(Hr=!1,Jt=Xt.slice()):sc?(Hr=!1,Jt=function(Ot){var oe=(wt=Ot.buffer,Zt=new wt.constructor(wt.byteLength),new U(Zt).set(new U(wt)),Zt),wt,Zt;return new Ot.constructor(oe,Ot.byteOffset,Ot.length)}(Xt)):Jt=[]:function(Ot){if(!Pr(Ot)||Fi(Ot)!=s)return!1;var oe=G(Ot);if(oe===null)return!0;var wt=D.call(oe,"constructor")&&oe.constructor;return typeof wt=="function"&&wt instanceof wt&&N.call(wt)==k}(Xt)||As(Xt)?(Jt=_e,As(_e)?Jt=function(Ot){return function(oe,wt,Zt){var Bm=!Zt;Zt||(Zt={});for(var lc=-1,Um=wt.length;++lc<Um;){var Rs=wt[lc],Ui=void 0;Ui===void 0&&(Ui=oe[Rs]),Bm?fs(Zt,Rs,Ui):Lm(Zt,Rs,Ui)}return Zt}(Ot,rc(Ot))}(_e):An(_e)&&!_s(_e)||(Jt=function(Ot){return typeof Ot.constructor!="function"||Ql(Ot)?{}:xr(G(Ot))}(Xt))):Hr=!1}var ac;Hr&&(Fr.set(Xt,Jt),Gt(Jt,Xt,Pe,Wn,Fr),Fr.delete(Xt)),De(zt,Ct,Jt)})(C,b,ot,F,Jl,j,W);else{var Ft=j?j(Es(C,ot),ct,ot+"",C,b,W):void 0;Ft===void 0&&(Ft=ct),De(C,ot,Ft)}},rc)}function xm(C,b){return Fm(function(F,j,W){return j=Gn(j===void 0?F.length-1:j,0),function(){for(var ct=arguments,ot=-1,Ft=Gn(ct.length-j,0),zt=Array(Ft);++ot<Ft;)zt[ot]=ct[j+ot];ot=-1;for(var ut=Array(j+1);++ot<j;)ut[ot]=ct[ot];return ut[j]=W(zt),function(Ct,Pe,Gt){switch(Gt.length){case 0:return Ct.call(Pe);case 1:return Ct.call(Pe,Gt[0]);case 2:return Ct.call(Pe,Gt[0],Gt[1]);case 3:return Ct.call(Pe,Gt[0],Gt[1],Gt[2])}return Ct.apply(Pe,Gt)}(F,this,ut)}}(C,b,ic),C+"")}var Pm=rt?function(C,b){return rt(C,"toString",{configurable:!0,enumerable:!1,value:(F=b,function(){return F}),writable:!0});var F}:ic;function Hi(C,b){var F,j,W=C.__data__;return((j=typeof(F=b))=="string"||j=="number"||j=="symbol"||j=="boolean"?F!=="__proto__":F===null)?W[typeof b=="string"?"string":"hash"]:W.map}function ms(C,b){var F=function(j,W){return j==null?void 0:j[W]}(C,b);return wm(F)?F:void 0}function Zl(C,b){var F=typeof C;return!!(b=b==null?r:b)&&(F=="number"||F!="symbol"&&l.test(C))&&C>-1&&C%1==0&&C<b}function Ql(C){var b=C&&C.constructor;return C===(typeof b=="function"&&b.prototype||y)}function Es(C,b){if((b!=="constructor"||typeof C[b]!="function")&&b!="__proto__")return C[b]}var Fm=function(C){var b=0,F=0;return function(){var j=wr(),W=16-(j-F);if(F=j,W>0){if(++b>=800)return arguments[0]}else b=0;return C.apply(void 0,arguments)}}(Pm);function Bi(C,b){return C===b||C!=C&&b!=b}var As=ql(function(){return arguments}())?ql:function(C){return Pr(C)&&D.call(C,"callee")&&!nt.call(C,"callee")},gs=Array.isArray;function Ds(C){return C!=null&&ec(C.length)&&!_s(C)}var tc=En||function(){return!1};function _s(C){if(!An(C))return!1;var b=Fi(C);return b==o||b=="[object GeneratorFunction]"||b=="[object AsyncFunction]"||b=="[object Proxy]"}function ec(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=r}function An(C){var b=typeof C;return C!=null&&(b=="object"||b=="function")}function Pr(C){return C!=null&&typeof C=="object"}var nc=g?function(C){return function(b){return C(b)}}(g):function(C){return Pr(C)&&ec(C.length)&&!!c[Fi(C)]};function rc(C){return Ds(C)?Xn(C):Mm(C)}var Os,Hm=(Os=function(C,b,F){Jl(C,b,F)},xm(function(C,b){var F=-1,j=b.length,W=j>1?b[j-1]:void 0,ct=j>2?b[2]:void 0;for(W=Os.length>3&&typeof W=="function"?(j--,W):void 0,ct&&function(Ft,zt,ut){if(!An(ut))return!1;var Ct=typeof zt;return!!(Ct=="number"?Ds(ut)&&Zl(zt,ut.length):Ct=="string"&&zt in ut)&&Bi(ut[zt],Ft)}(b[0],b[1],ct)&&(W=j<3?void 0:W,j=1),C=Object(C);++F<j;){var ot=b[F];ot&&Os(C,ot,F,W)}return C}));function ic(C){return C}e.exports=Hm})(sl,sl.exports);const hS=mE(sl.exports);class pS{constructor(t,n,r,i){this.backendRestClient=new dS(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}},
1285
1285
  {{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}},
1286
1286
  The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
1287
1287
  Hi {{recipient.name}}, <br/>
@@ -1305,10 +1305,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1305
1305
  {{app.custom.websiteUrl}} Join the chat
1306
1306
 
1307
1307
  On behalf of {{sender.name}},
1308
- 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 lS(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new Hf(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 sr{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 sr("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 sr(`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 sr(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new sr(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function Rm(e,t){const n=t.appId,r=t.userId,i="conversationId"in t?t.conversationId:void 0,o=T.useMemo(()=>sr.fromHost(t.host),[t.host]),s=T.useRef(void 0),a=T.useMemo(()=>{const d=s.current,h=typeof d!=typeof t.tokenFetcher?t.tokenFetcher:d;return s.current=h,h},[t.tokenFetcher]);T.useLayoutEffect(()=>{e.updateThemeCustom(t.themeCustom)},[e,t.themeCustom]);const l=T.useMemo(()=>Sm(),[t.appId,t.userId,t.token,a]),c=Hm.getTalkSession({apiUrls:o,appId:n,userId:r,token:t.token,tokenFetcher:a});T.useEffect(()=>e.listenForErrors(c,i),[c,e,i]);const u=T.useMemo(()=>new cS(o,n,l,c._authProvider),[n,l,c,o]);return T.useEffect(()=>e.listenForAuthChanges(c,a),[c,e,a]),T.useEffect(()=>e.listenForUserAndAppChanges(c,u),[e,u,c]),{session:c,restApi:u}}function Zr(e,t,n){const r=T.useRef(e),i=T.useRef(n);return T.useLayoutEffect(()=>{r.current=e,i.current=n}),T.useCallback(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 Im(e){T.useEffect(()=>{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 Cm(){const[e,t]=T.useState(!0);return T.useEffect(()=>{t(!1)},[]),e}const uS=T.forwardRef(function(e,t){var I,y;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,beforeBrowserPermissionPrompt:o,onMissingBrowserPermission:s,messageFieldPlaceholder:a,messageFieldSpellcheck:l,__hostElement:c}=e;T.useEffect(()=>{var D;(D=e.__internalOnLoaded)==null||D.call(e)},[]);const u=Cm(),d=T.useRef(c!=null?c:null);Im(d);const h=Zr(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),f=Zr(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),p=Zr(i,c,["messageAction","message-action","messageaction","MessageAction"]),m={beforeBrowserPermissionPrompt:o,onMissingBrowserPermissionCallback:Zr(s,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:E,controller:A,editorInternals:g,session:O}=function(D,_,w,k){const x=D.conversationId,N=T.useMemo(()=>new Wh(D.appId,D.userId),[]),{session:M,restApi:U}=Rm(N,D),F=T.useMemo(()=>new If(N.state$.editor,N.device$,N.state$.userPermissions),[N]),Y=T.useMemo(()=>new oS(N,M,F,_,w,k),[M,N,F,_,w,k]);return F.controller=Y,T.useEffect(()=>{let z,V=!0;const J=M.currentUser.subscribe(async rt=>{if(V&&(N.errors$.unknownUser.set(!rt),rt&&(N.currentUser$.set(rt),rt.role!==z))){z=rt.role;const W=await U.getApp(rt.role);if(!V)return;N.app$.set(W)}});return()=>{V=!1,J.unsubscribe()}},[U,M,N]),T.useEffect(()=>{let z=!0;Dr(()=>{N.state$.extCurrentConversationId.set(x),N.state$.currentConversation.set(null),N.state$.referencedMessageId.set(null)});const V=M.conversation(x).subscribeMessages(async(it,ae)=>{z&&it&&(await N.readyForNewMessagesPromise,N.storeMessages(x,it,ae))});N.messageSubscription=V;const J=M.conversation(x).subscribeParticipants(it=>{z&&it&&N.state$.participants.child(x).set(it)});N.participantSubscription=J;const rt=M.conversation(x).subscribe(async it=>{z&&it&&N.state$.currentConversation.set(it)}),W=M.conversation(x).subscribeTyping(it=>{z&&it&&N.storeTyping(x,it)}),et=N.state$.participants.child(x).onChange(({value:it})=>{if(!it)return;const ae=new Set;for(const Ht of it)ae.add(Ht.user.id);Dr(()=>{var Ht;for(const Zt of Jd(N.onlineSubscriptions))ae.has(Zt)||((Ht=N.onlineSubscriptions[Zt])==null||Ht.unsubscribe(),delete N.onlineSubscriptions[Zt],N.state$.isUserConnected.child(Zt).set(!1))});for(const Ht of ae)N.onlineSubscriptions[Ht]||(N.onlineSubscriptions[Ht]=M.user(Ht).subscribeOnline(Zt=>{Zt&&N.state$.isUserConnected.child(Ht).set(Zt.isConnected)}))},{initial:!0});return()=>{z=!1,J.unsubscribe(),rt.unsubscribe(),V.unsubscribe(),W.unsubscribe(),N.messageSubscription=null,N.participantSubscription=null,et();for(const it of Jd(N.onlineSubscriptions))N.onlineSubscriptions[it].unsubscribe();N.onlineSubscriptions={},N.state$.isUserConnected.set({})}},[N,x,M]),{store:N,controller:Y,editorInternals:F,session:M}}(e,f,h,p),S=T.useCallback(async()=>{const D=g.state$;if(D.isEmpty.peek()||D.atTextLimit.peek())return;const _=g.getText(),w=E.state$.referencedMessageId.peek();w&&A.setReferencedMessage(null),g.clearText(),E.state$.editor.showEmojiPicker.set(!1),await A.sendMessage({text:_,referencedMessage:w!=null?w:void 0})},[A,g,E]);T.useEffect(()=>{var _;const D=(_=e.enterSendsMessage)!=null?_:!0;g.onEnter=D?S:void 0},[g,e.enterSendsMessage,S]),T.useEffect(()=>{g.spellcheck$.set(l)},[g,l]),T.useEffect(()=>{g.placeholder$.set(a)},[g,a]),T.useImperativeHandle(t,()=>({controller:A,editorInternals:g}));const R=T.useCallback(({error:D})=>v.jsx(as,{appId:e.appId,chatboxState:{type:"unexpected-error",error:D}}),[e.appId]),b=u?null:v.jsx(bh,{fallbackRender:R,children:v.jsx(Fh.Provider,{value:g,children:v.jsx(Bh.Provider,{value:E,children:v.jsx(Ph.Provider,{value:e.theme,children:v.jsx(Hh.Provider,{value:m,children:v.jsx(Uh.Provider,{value:A,children:v.jsx(pl.Provider,{value:O,children:v.jsx(vE.Provider,{value:{sendMessage:S},children:v.jsx(rS,{appId:e.appId,chatHeaderVisible:(I=e.chatHeaderVisible)!=null?I:!0,messageFieldVisible:(y=e.messageFieldVisible)!=null?y:!0})})})})})})})})});if(c)return b;{const D="t-chatbox"+(e.className?` ${e.className}`:"");return v.jsx("div",{className:D,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"&&Rc("😊")&&!Rc("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
1308
+ 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 hS(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new Uf(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 sr{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 sr("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 sr(`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 sr(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new sr(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function th(e){return Object.keys(e)}class Ri{static subscribeToConversationListData(t,n,r){const i=new Ri(t,n,r),o=[i.listenForErrors(),i.listenForAuth(),i.listenForUserAndApp(),i.listenForConversations()];return()=>{o.forEach(s=>s())}}static subscribeToChatboxData(t,n,r){const i=new Ri(t,n,r),o=[i.listenForErrors(),i.listenForAuth(),i.listenForUserAndApp(),i.listenForMessages(),i.listenForParticipants(),i.listenForCurrentConversation(),i.listenForTyping(),i.listenForPresence()];return()=>{o.forEach(s=>s())}}constructor(t,n,r){this.store=t,this.session=n,this.restApi=r}listenForErrors(){const{store:t,session:n}=this;return Bt(r=>{t.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const i=n.onError(l=>{Ve.error(l.message),t.errors$.serverError.set(!0)}),o=n.currentUser.subscribe(l=>{t.errors$.unknownUser.set(l===null)}),s=t.type==="ChatboxStore"?t.state$.extCurrentConversationId.get():null,a=s&&n.conversation(s).subscribe(l=>{t.errors$.unknownConversation.set(l===null)});r.onCleanup=()=>{i.unsubscribe(),o.unsubscribe(),a==null||a.unsubscribe()}})}listenForAuth(){const{store:t,session:n}=this;return Bt(r=>{let i=!0;const o=t.hasTokenFetcher$.get();t.authTokenState$.peek()!=="loading"&&t.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&t.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&t.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:t,session:n,restApi:r}=this;return Bt(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(t.currentUser$.set(l),l.role!==s)){s=l.role;const c=await r.getApp(l.role);if(!o)return;t.app$.set(c)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}listenForConversations(){const{store:t,session:n}=this;return Z(t.type==="ConversationListStore"),Bt(r=>{const i=n.subscribeConversations(o=>{gr(()=>{t.conversationsArray$.set(o);const s={};for(const a of o)s[a.id]=a;t.conversationsMap$.set(s)})});t.conversationListSubscription=i,r.onCleanup=()=>{i.unsubscribe(),t.conversationListSubscription=null}})}listenForMessages(){const{store:t,session:n}=this;return Z(t.type==="ChatboxStore"),Bt(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeMessages(async(a,l)=>{i&&a&&(await t.readyForNewMessagesPromise,t.storeMessages(o,a,l))});t.messageSubscription=s,r.onCleanup=()=>{i=!1,s==null||s.unsubscribe(),t.messageSubscription=null}})}listenForParticipants(){const{store:t,session:n}=this;return Z(t.type==="ChatboxStore"),Bt(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeParticipants(a=>{i&&a&&t.state$.participants.child(o).set(a)});t.participantSubscription=s,r.onCleanup=()=>{i=!1,s==null||s.unsubscribe(),t.participantSubscription=null}})}listenForCurrentConversation(){const{store:t,session:n}=this;return Z(t.type==="ChatboxStore"),Bt(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribe(async a=>{i&&a&&t.state$.currentConversation.set(a)});r.onCleanup=()=>{i=!1,s==null||s.unsubscribe()}})}listenForTyping(){const{store:t,session:n}=this;return Z(t.type==="ChatboxStore"),Bt(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeTyping(a=>{i&&a&&t.storeTyping(o,a)});r.onCleanup=()=>{i=!1,s==null||s.unsubscribe()}})}listenForPresence(){const{store:t,session:n}=this;return Z(t.type==="ChatboxStore"),Bt(r=>{const i=t.state$.extCurrentConversationId.get(),o=i&&t.state$.participants.child(i).onChange(({value:s})=>{if(!s)return;const a=new Set;for(const l of s)a.add(l.user.id);gr(()=>{var l;for(const c of th(t.onlineSubscriptions))a.has(c)||((l=t.onlineSubscriptions[c])==null||l.unsubscribe(),delete t.onlineSubscriptions[c],t.state$.isUserConnected.child(c).set(!1))});for(const l of a)t.onlineSubscriptions[l]||(t.onlineSubscriptions[l]=n.user(l).subscribeOnline(c=>{c&&t.state$.isUserConnected.child(l).set(c.isConnected)}))},{initial:!0});r.onCleanup=()=>{o==null||o();for(const s of th(t.onlineSubscriptions))t.onlineSubscriptions[s].unsubscribe();t.onlineSubscriptions={},t.state$.isUserConnected.set({})}})}}function vm(e,t){const n=t.appId,r=t.userId,i=R.useRef(void 0),o=R.useMemo(()=>{const c=i.current,u=typeof c!=typeof t.tokenFetcher?t.tokenFetcher:c;return i.current=u,u},[t.tokenFetcher]);R.useLayoutEffect(()=>{e.updateThemeCustom(t.themeCustom)},[e,t.themeCustom]);const s=R.useMemo(()=>Im(),[t.appId,t.userId,t.token,o]);R.useEffect(()=>{e.hasTokenFetcher$.set(!!o)},[e,o]);const a=jm.getTalkSession({host:t.host,appId:n,userId:r,token:t.token,tokenFetcher:o}),l=R.useMemo(()=>{const c=sr.fromHost(t.host);return new pS(c,n,s,a._authProvider)},[n,s,a,t.host]);return R.useEffect(()=>e.type==="ChatboxStore"?Ri.subscribeToChatboxData(e,a,l):Ri.subscribeToConversationListData(e,a,l),[e,a,l]),{session:a,restApi:l}}function Qr(e,t,n){const r=R.useRef(e),i=R.useRef(n);return R.useLayoutEffect(()=>{r.current=e,i.current=n}),R.useCallback(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 Nm(e){R.useEffect(()=>{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 ym(){const[e,t]=R.useState(!0);return R.useEffect(()=>{t(!1)},[]),e}const fS=R.forwardRef(function(e,t){var I,N;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,beforeBrowserPermissionPrompt:o,onMissingBrowserPermission:s,messageFieldPlaceholder:a,messageFieldSpellcheck:l,__hostElement:c}=e;R.useEffect(()=>{var D;(D=e.__internalOnLoaded)==null||D.call(e)},[]);const u=ym(),d=R.useRef(c!=null?c:null);Nm(d);const h=Qr(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),f=Qr(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),p=Qr(i,c,["messageAction","message-action","messageaction","MessageAction"]),m={beforeBrowserPermissionPrompt:o,onMissingBrowserPermissionCallback:Qr(s,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:E,controller:A,editorInternals:g,session:O}=function(D,_,w,k){const x=R.useMemo(()=>new qh(D.appId,D.userId),[]),{session:L}=vm(x,D),M=R.useMemo(()=>new vf(x.state$.editor,x.device$,x.state$.userPermissions),[x]),U=R.useMemo(()=>new cS(x,L,M,_,w,k),[L,x,M,_,w,k]);return M.controller=U,R.useEffect(()=>{gr(()=>{x.state$.extCurrentConversationId.set(D.conversationId),x.state$.currentConversation.set(null),x.state$.referencedMessageId.set(null)})},[x,D.conversationId]),{store:x,controller:U,editorInternals:M,session:L}}(e,f,h,p),S=R.useCallback(async()=>{const D=g.state$;if(D.isEmpty.peek()||D.atTextLimit.peek())return;const _=g.getText(),w=E.state$.referencedMessageId.peek();w&&A.setReferencedMessage(null),g.clearText(),E.state$.editor.showEmojiPicker.set(!1),await A.sendMessage({text:_,referencedMessage:w!=null?w:void 0})},[A,g,E]);R.useEffect(()=>{var _;const D=(_=e.enterSendsMessage)!=null?_:!0;g.onEnter=D?S:void 0},[g,e.enterSendsMessage,S]),R.useEffect(()=>{g.spellcheck$.set(l)},[g,l]),R.useEffect(()=>{g.placeholder$.set(a)},[g,a]),R.useImperativeHandle(t,()=>({controller:A,editorInternals:g}));const T=R.useCallback(({error:D})=>v.jsx(us,{appId:e.appId,chatboxState:{type:"unexpected-error",error:D}}),[e.appId]),y=u?null:v.jsx(kh,{fallbackRender:T,children:v.jsx(Bh.Provider,{value:g,children:v.jsx(jh.Provider,{value:E,children:v.jsx(Hh.Provider,{value:e.theme,children:v.jsx(Uh.Provider,{value:m,children:v.jsx($h.Provider,{value:A,children:v.jsx(ml.Provider,{value:O,children:v.jsx(LE.Provider,{value:{sendMessage:S},children:v.jsx(aS,{appId:e.appId,chatHeaderVisible:(I=e.chatHeaderVisible)!=null?I:!0,messageFieldVisible:(N=e.messageFieldVisible)!=null?N:!0})})})})})})})})});if(c)return y;{const D="t-chatbox"+(e.className?` ${e.className}`:"");return v.jsx("div",{className:D,style:e.style,ref:d,children:y})}});(function(e="Twemoji Country Flags",t="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&Ic("😊")&&!Ic("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
1309
1309
  font-family: "${e}";
1310
1310
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
1311
1311
  U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
1312
1312
  src: url('${t}') format('woff2');
1313
1313
  font-display: swap;
1314
- }`,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];oE.set(i,o),Oc.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(t)for(const i in t){const o=t[i];iE.set(i,o),Object.defineProperty(Oc.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(_c.replacer=n),r&&(_c.reviver=r)}({observableFunctions:{child:(e,t)=>(lt(typeof t=="string"||typeof t=="number","Key should be a string or a number"),Ko.getProxy(e,t.toString()))}}),Ge.registerHandler(({level:e,data:t})=>{console[e]("[TalkJS]",...t)});const dS=T.forwardRef(function(e,t){const n=T.useRef(null),r=T.useMemo(()=>new hS(n),[]);T.useImperativeHandle(t,()=>r,[r]);const{theme:i,...o}=e,s=T.useMemo(()=>({...hl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return v.jsx(jh.Provider,{value:r,children:T.createElement(uS,{...o,key:a,theme:s,ref:n})})});var Ar,jt,$e,po;class hS{constructor(t){Hr(this,jt);Hr(this,Ar);Os(this,Ar,t)}deleteMessage(t){return xt(this,jt,$e).deleteMessage(t)}setEditing(t){xt(this,jt,$e).setEditing(t)}editMessage(t,n){return xt(this,jt,$e).editMessage(t,n)}sendMessage(t){return xt(this,jt,$e).sendMessage(t)}sendFileMessage(t){return xt(this,jt,$e).sendFileMessage(t)}sendLocationMessage(t){return xt(this,jt,$e).sendLocationMessage(t)}setReferencedMessage(t){xt(this,jt,$e).setReferencedMessage(t)}toggleReaction(t,n){return xt(this,jt,$e).toggleReaction(t,n)}getMessageFieldText(){return xt(this,jt,po).getText()}setMessageFieldText(t){xt(this,jt,po).setText(t)}focusMessageField(){xt(this,jt,po).focus()}}Ar=new WeakMap,jt=new WeakSet,$e=function(){return xt(this,Ar).current.controller},po=function(){return xt(this,Ar).current.editorInternals};function pS({conversation:e}){const t=nt(),n=Ni(),r=Jt(),i=Cf(),o=q(t.extCurrentConversationId$),[s,a]=T.useState([]);return T.useEffect(()=>{const l=n.conversation(e.id).subscribeParticipants(async c=>{c&&a(c)});return()=>l.unsubscribe()},[n,e.id]),s?v.jsx(r.ConversationListItem,{common:i,conversation:e,participants:s,isSelected:o===e.id}):null}function fS(){const e=nt(),t=T.useRef(null);T.useEffect(()=>{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=T.useCallback(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&e.conversationListSubscription&&e.conversationListSubscription.loadMore(20)},[e]);return v.jsx("div",{className:"t-conversation-list-scrollable",ref:t,"t-menu-boundary":"",onScroll:n,children:v.jsx(_a,{each:e.conversationsArray$,children:r=>v.jsx(pS,{conversation:r.get()})})})}function mS({appId:e}){nt();const t=function(){const n=nt(),r=pe(()=>{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 lt.unreachable()}),i=pe({type:"loading"});Ir(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:lt.never(a)}});const o=pe({type:"loading"});return Ir(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())}),q(o)}();return t.type==="invisible-loading"?v.jsx(v.Fragment,{}):t.type==="loading"?v.jsx(yf,{}):t.type==="unknown-user"||t.type==="auth-failed"||t.type==="wrong-app-id"||t.type==="server-error"||t.type==="unexpected-error"?v.jsx(as,{appId:e,chatboxState:t}):t.type=="expired-token"?v.jsx(bf,{}):t.type==="loaded"?v.jsx(fS,{}):v.jsx(v.Fragment,{})}class ES extends Xh{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.extCurrentConversationId$=mt(null),this.conversationsArray$=mt([]),this.conversationsMap$=mt({})}listenForConversations(t){const n=t.subscribeConversations(r=>{Dr(()=>{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 AS{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 gS=T.forwardRef(function(e,t){const{__hostElement:n,onSelectConversation:r}=e;T.useEffect(()=>{var h;(h=e.__internalOnLoaded)==null||h.call(e)},[]);const i=Cm(),o=T.useRef(n!=null?n:null);Im(o);const s=Zr(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=T.useMemo(()=>new ES(e.appId,e.userId),[]);T.useEffect(()=>{Dr(()=>{a.extUserId$.set(e.userId),a.appId$.set(e.appId)})},[a,e.appId,e.userId]);const{session:l}=Rm(a,e),c=T.useMemo(()=>new AS(a,s),[a,s]);T.useEffect(()=>a.listenForConversations(l),[a,l]),T.useEffect(()=>{e.selectedConversationId!==void 0&&a.extCurrentConversationId$.set(e.selectedConversationId)},[a,e.selectedConversationId]),T.useEffect(()=>{const h=e.__hostElement;if(h)return a.extCurrentConversationId$.onChange(({value:f})=>{h.selectedConversationId=f})},[a,e.__hostElement]),T.useImperativeHandle(t,()=>({controller:c}));const u=T.useCallback(({error:h})=>v.jsx(as,{appId:e.appId,chatboxState:{type:"unexpected-error",error:h}}),[e.appId]),d=i?null:v.jsx(bh,{fallbackRender:u,children:v.jsx(Bh.Provider,{value:a,children:v.jsx(Ph.Provider,{value:e.theme,children:v.jsx(Uh.Provider,{value:c,children:v.jsx(pl.Provider,{value:l,children:v.jsx(mS,{appId:e.appId})})})})})});if(n)return d;{const h="t-conversation-list"+(e.className?` ${e.className}`:"");return v.jsx("div",{className:h,style:e.style,ref:o,children:d})}});var Ri,Yo,Nm;class DS{constructor(t){Hr(this,Yo);Hr(this,Ri);Os(this,Ri,t)}selectConversation(t){xt(this,Yo,Nm).selectConversation(t)}}Ri=new WeakMap,Yo=new WeakSet,Nm=function(){return xt(this,Ri).current.controller};const _S=T.forwardRef(function(e,t){const n=T.useRef(null),r=T.useMemo(()=>new DS(n),[]);T.useImperativeHandle(t,()=>r,[r]);const{theme:i,...o}=e,s=T.useMemo(()=>({...hl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return v.jsx(jh.Provider,{value:r,children:T.createElement(gS,{...o,key:a,theme:s,ref:n})})}),OS=hl;exports.AudioPlayer=ko,exports.Chatbox=dS,exports.ConversationList=_S,exports.Editor=Rf,exports.EmojiPicker=jl,exports.EmojiSuggestBar=Wf,exports.MentionSuggestList=Am,exports.MenuItem=on,exports.MessageContent=Bf,exports.PopoverButton=or,exports.ReactionPicker=Uf,exports.Text=Bl,exports.defaultTheme=OS,exports.formatDuration=Wl,exports.formatFilesize=Jr,exports.getGoogleMapsUrls=Xl,exports.getPhotoUrlWithFallback=Rn,exports.getRandomColor=gm,exports.html=P,exports.useParticipants=uo,exports.useTimeAgo=Dm,exports.userFriendlyDate=_m;
1314
+ }`,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];lE.set(i,o),Sc.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(t)for(const i in t){const o=t[i];aE.set(i,o),Object.defineProperty(Sc.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Oc.replacer=n),r&&(Oc.reviver=r)}({observableFunctions:{child:(e,t)=>(Z(typeof t=="string"||typeof t=="number","Key should be a string or a number"),Zo.getProxy(e,t.toString()))}}),Ve.registerHandler(({level:e,data:t})=>{console[e]("[TalkJS]",...t)});const mS=R.forwardRef(function(e,t){const n=R.useRef(null),r=R.useMemo(()=>new ES(n),[]);R.useImperativeHandle(t,()=>r,[r]);const{theme:i,...o}=e,s=R.useMemo(()=>({...fl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return v.jsx(Vh.Provider,{value:r,children:R.createElement(fS,{...o,key:a,theme:s,ref:n})})});var Er,Ut,Be,fo;class ES{constructor(t){Br(this,Ut);Br(this,Er);Is(this,Er,t)}deleteMessage(t){return Mt(this,Ut,Be).deleteMessage(t)}setEditing(t){Mt(this,Ut,Be).setEditing(t)}editMessage(t,n){return Mt(this,Ut,Be).editMessage(t,n)}sendMessage(t){return Mt(this,Ut,Be).sendMessage(t)}sendFileMessage(t){return Mt(this,Ut,Be).sendFileMessage(t)}sendLocationMessage(t){return Mt(this,Ut,Be).sendLocationMessage(t)}setReferencedMessage(t){Mt(this,Ut,Be).setReferencedMessage(t)}toggleReaction(t,n){return Mt(this,Ut,Be).toggleReaction(t,n)}getMessageFieldText(){return Mt(this,Ut,fo).getText()}setMessageFieldText(t){Mt(this,Ut,fo).setText(t)}focusMessageField(){Mt(this,Ut,fo).focus()}}Er=new WeakMap,Ut=new WeakSet,Be=function(){return Mt(this,Er).current.controller},fo=function(){return Mt(this,Er).current.editorInternals};function AS({conversation:e}){const t=et(),n=Ni(),r=qt(),i=Nf(),o=K(t.extCurrentConversationId$),[s,a]=R.useState([]);return R.useEffect(()=>{const l=n.conversation(e.id).subscribeParticipants(async c=>{c&&a(c)});return()=>l.unsubscribe()},[n,e.id]),s?v.jsx(r.ConversationListItem,{common:i,conversation:e,participants:s,isSelected:o===e.id}):null}function gS(){const e=et(),t=R.useRef(null);R.useEffect(()=>{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=R.useCallback(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&e.conversationListSubscription&&e.conversationListSubscription.loadMore(20)},[e]);return v.jsx("div",{className:"t-conversation-list-scrollable",ref:t,"t-menu-boundary":"",onScroll:n,children:v.jsx(Ra,{each:e.conversationsArray$,children:r=>v.jsx(AS,{conversation:r.get()})})})}function DS({appId:e}){et();const t=function(){const n=et(),r=ue(()=>{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 Z.unreachable()}),i=ue({type:"loading"});Tr(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:Z.never(a)}});const o=ue({type:"loading"});return Tr(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())}),K(o)}();return t.type==="invisible-loading"?v.jsx(v.Fragment,{}):t.type==="loading"?v.jsx(Lf,{}):t.type==="unknown-user"||t.type==="auth-failed"||t.type==="wrong-app-id"||t.type==="server-error"||t.type==="unexpected-error"?v.jsx(us,{appId:e,chatboxState:t}):t.type=="expired-token"?v.jsx(kf,{}):t.type==="loaded"?v.jsx(gS,{}):v.jsx(v.Fragment,{})}class _S extends Kh{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.extCurrentConversationId$=dt(null),this.conversationsArray$=dt([]),this.conversationsMap$=dt({})}}class OS{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 SS=R.forwardRef(function(e,t){const{__hostElement:n,onSelectConversation:r}=e;R.useEffect(()=>{var h;(h=e.__internalOnLoaded)==null||h.call(e)},[]);const i=ym(),o=R.useRef(n!=null?n:null);Nm(o);const s=Qr(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=R.useMemo(()=>new _S(e.appId,e.userId),[]);R.useEffect(()=>{gr(()=>{a.extUserId$.set(e.userId),a.appId$.set(e.appId)})},[a,e.appId,e.userId]);const{session:l}=vm(a,e),c=R.useMemo(()=>new OS(a,s),[a,s]);R.useEffect(()=>{e.selectedConversationId!==void 0&&a.extCurrentConversationId$.set(e.selectedConversationId)},[a,e.selectedConversationId]),R.useEffect(()=>{const h=e.__hostElement;if(h)return a.extCurrentConversationId$.onChange(({value:f})=>{h.selectedConversationId=f})},[a,e.__hostElement]),R.useImperativeHandle(t,()=>({controller:c}));const u=R.useCallback(({error:h})=>v.jsx(us,{appId:e.appId,chatboxState:{type:"unexpected-error",error:h}}),[e.appId]),d=i?null:v.jsx(kh,{fallbackRender:u,children:v.jsx(jh.Provider,{value:a,children:v.jsx(Hh.Provider,{value:e.theme,children:v.jsx($h.Provider,{value:c,children:v.jsx(ml.Provider,{value:l,children:v.jsx(DS,{appId:e.appId})})})})})});if(n)return d;{const h="t-conversation-list"+(e.className?` ${e.className}`:"");return v.jsx("div",{className:h,style:e.style,ref:o,children:d})}});var Ii,Xo,bm;class TS{constructor(t){Br(this,Xo);Br(this,Ii);Is(this,Ii,t)}selectConversation(t){Mt(this,Xo,bm).selectConversation(t)}}Ii=new WeakMap,Xo=new WeakSet,bm=function(){return Mt(this,Ii).current.controller};const RS=R.forwardRef(function(e,t){const n=R.useRef(null),r=R.useMemo(()=>new TS(n),[]);R.useImperativeHandle(t,()=>r,[r]);const{theme:i,...o}=e,s=R.useMemo(()=>({...fl,...i!=null?i:{}}),[i]),a=`${e.userId}|${e.appId}`;return v.jsx(Vh.Provider,{value:r,children:R.createElement(SS,{...o,key:a,theme:s,ref:n})})}),IS=fl;exports.AudioPlayer=wo,exports.Chatbox=mS,exports.ConversationList=RS,exports.Editor=Cf,exports.EmojiPicker=Vl,exports.EmojiSuggestBar=qf,exports.MentionSuggestList=_m,exports.MenuItem=en,exports.MessageContent=jf,exports.PopoverButton=or,exports.ReactionPicker=$f,exports.Text=jl,exports.defaultTheme=IS,exports.formatDuration=Kl,exports.formatFilesize=Zr,exports.getGoogleMapsUrls=Wl,exports.getPhotoUrlWithFallback=Sn,exports.getRandomColor=Om,exports.html=P,exports.useParticipants=ho,exports.useTimeAgo=Sm,exports.userFriendlyDate=Tm;