@veltdev/sdk-dev 4.5.2-beta.36 → 4.5.2-beta.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/velt.js CHANGED
@@ -1,4 +1,4 @@
1
- var SNIPPYLY_VERSION = '4.5.2-beta.36';
1
+ var SNIPPYLY_VERSION = '4.5.2-beta.37';
2
2
  (function(m,w){"use strict";function rt(){var e=K.splice(0,K.length);for(ie=0;e.length;)e.shift().call(null,e.shift())}function me(e,t){for(var n=0,r=e.length;n<r;n++)Te(e[n],t)}function ot(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],U(t,q[pe(t)])}function fe(e){return function(t){Lt(t)&&(Te(t,e),L.length&&me(t.querySelectorAll(L),e))}}function pe(e){var t=le.call(e,"is"),n=e.nodeName.toUpperCase(),r=v.call(D,t?Y+t.toUpperCase():x+n);return t&&-1<r&&!De(n,t)?-1:r}function De(e,t){return-1<L.indexOf(e+'[is="'+t+'"]')}function Ie(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[W]||2,a=e[He]||3;!ce||o&&o!==t||!t[y]||r==="style"||e.prevValue===e.newValue&&(e.newValue!==""||n!==l&&n!==a)||t[y](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function Fe(e){var t=fe(e);return function(n){K.push(t,n.target),ie&&clearTimeout(ie),ie=setTimeout(rt,1)}}function de(e){nt&&(nt=!1,e.currentTarget.removeEventListener(Ze,de)),L.length&&me((e.target||u).querySelectorAll(L),e.detail===E?E:b),R&&at()}function lt(e,t){var n=this;Ye.call(n,e,t),Me.call(n,{target:n})}function Se(e,t,n){var r=t.apply(e,n),o=pe(r);return-1<o&&U(r,q[o]),n.pop()&&L.length&&ot(r.querySelectorAll(L)),r}function he(e,t){Tt(e,t),$?$.observe(e,gt):(ue&&(e.setAttribute=lt,e[H]=Ee(e),e[g](st,Me)),e[g](N,Ie)),e[k]&&ce&&(e.created=!0,e[k](),e.created=!1)}function at(){for(var e,t=0,n=G.length;t<n;t++)e=G[t],V.contains(e)||(n--,G.splice(t--,1),Te(e,E))}function Ve(e){throw new Error("A "+e+" type is already registered")}function Te(e,t){var n,r,o=pe(e);-1<o&&!Mt.call(e,"TEMPLATE")&&(Q(e,q[o]),o=0,t!==b||e[b]?t!==E||e[E]||(e[b]=!1,e[E]=!0,r="disconnected",o=1):(e[E]=!1,e[b]=!0,r="connected",o=1,R&&v.call(G,e)<0&&G.push(e)),o&&(n=e[t+O]||e[r+O])&&n.call(e))}function z(){}function Pe(e,t,n){var r=n&&n[_]||"",o=t.prototype,l=Ce(o),a=t.observedAttributes||ye,s={prototype:l};oe(l,k,{value:function(){if(te)te=!1;else if(!this[B]){this[B]=!0,new t(this),o[k]&&o[k].call(this);var i=j[ne.get(t)];(!Z||i.create.length>1)&&_e(this)}}}),oe(l,y,{value:function(i){-1<v.call(a,i)&&o[y]&&o[y].apply(this,arguments)}}),o[qe]&&oe(l,ut,{value:o[qe]}),o[Be]&&oe(l,ct,{value:o[Be]}),r&&(s[_]=r),e=e.toUpperCase(),j[e]={constructor:t,create:r?[r,re(e)]:[e]},ne.set(t,e),u[S](e.toLowerCase(),s),Le(e),P[e].r()}function Re(e){var t=j[e.toUpperCase()];return t&&t.constructor}function Ue(e){return typeof e=="string"?e:e&&e.is||""}function _e(e){for(var t,n=e[y],r=n?e.attributes:ye,o=r.length;o--;)t=r[o],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function Le(e){return e=e.toUpperCase(),e in P||(P[e]={},P[e].p=new Xe(function(t){P[e].r=t})),P[e].p}function ke(){C&&delete m.customElements,I(m,"customElements",{configurable:!0,value:new z}),I(m,"CustomElementRegistry",{configurable:!0,value:z});for(var e=it.get(/^HTML[A-Z]*[a-z]/),t=e.length;t--;function(n){var r=m[n];if(r){m[n]=function(o){var l,a;return o||(o=this),o[B]||(te=!0,l=j[ne.get(o.constructor)],a=Z&&l.create.length===1,o=a?Reflect.construct(r,ye,l.constructor):u.createElement.apply(u,l.create),o[B]=!0,te=!1,a||_e(o)),o},m[n].prototype=r.prototype;try{r.prototype.constructor=m[n]}catch{dt=!0,I(r,B,{value:m[n]})}}}(e[t]));u.createElement=function(n,r){var o=Ue(r);return o?Ae.call(this,n,re(o)):Ae.call(this,n)},et||(Oe=!0,u[S](""))}var u=m.document,T=m.Object,it=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(p){var f,h=[];for(f in i)p.test(f)&&h.push(f);return h},s=function(p,f){(f=f.toLowerCase())in i||(i[p]=(i[p]||[]).concat(f),i[f]=i[f.toUpperCase()]=p)},i=(T.create||T)(null),c={};for(n in e)for(o in e[n])for(r=e[n][o],i[o]=r,t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return c.get=function(p){return typeof p=="string"?i[p]||(l.test(p)?[]:""):a(p)},c.set=function(p,f){return l.test(p)?s(p,f):s(f,p),c},c}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});typeof w!="object"&&(w={type:w||"auto"});var K,Me,X,Ee,$,ve,Q,U,A,S="registerElement",xe=1e5*m.Math.random()>>0,H="__"+S+xe,g="addEventListener",b="attached",O="Callback",E="detached",_="extends",y="attributeChanged"+O,ut=b+O,qe="connected"+O,Be="disconnected"+O,k="created"+O,ct=E+O,W="ADDITION",He="REMOVAL",N="DOMAttrModified",Ze="DOMContentLoaded",st="DOMSubtreeModified",x="<",Y="=",mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ft=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],D=[],q=[],L="",V=u.documentElement,v=D.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ge=T.prototype,be=ge.hasOwnProperty,J=ge.isPrototypeOf,I=T.defineProperty,ye=[],ee=T.getOwnPropertyDescriptor,je=T.getOwnPropertyNames,pt=T.getPrototypeOf,Ge=T.setPrototypeOf,ze=!!T.__proto__,dt=!1,B="__dreCEv1",C=m.customElements,Z=!/^force/.test(w.type)&&!!(C&&C.define&&C.get&&C.whenDefined),Ke=T.create||T,ht=m.Map||function(){var e,t=[],n=[];return{get:function(r){return n[v.call(t,r)]},set:function(r,o){e=v.call(t,r),e<0?n[t.push(r)-1]=o:n[e]=o}}},Xe=m.Promise||function(e){function t(l){for(r=!0;n.length;)n.shift()(l)}var n=[],r=!1,o={catch:function(){return o},then:function(l){return n.push(l),r&&setTimeout(t,1),o}};return e(t),o},te=!1,j=Ke(null),P=Ke(null),ne=new ht,re=function(e){return e.toLowerCase()},Ce=T.create||function e(t){return t?(e.prototype=t,new e):this},Tt=Ge||(ze?function(e,t){return e.__proto__=t,e}:je&&ee?function(){function e(t,n){for(var r,o=je(n),l=0,a=o.length;l<a;l++)r=o[l],be.call(t,r)||I(t,r,ee(n,r))}return function(t,n){do e(t,n);while((n=pt(n))&&!J.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),F=m.MutationObserver||m.WebKitMutationObserver,$e=m.HTMLAnchorElement,d=(m.HTMLElement||m.Element||m.Node).prototype,R=!J.call(d,V),oe=R?function(e,t,n){return e[t]=n.value,e}:I,Lt=R?function(e){return e.nodeType===1}:function(e){return J.call(d,e)},G=R&&[],Qe=d.attachShadow,We=d.cloneNode,Mt=d.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},we=d.dispatchEvent,le=d.getAttribute,Et=d.hasAttribute,vt=d.removeAttribute,Ye=d.setAttribute,ae=u.createElement,Ht=u.importNode,Ae=ae,gt=F&&{attributes:!0,characterData:!0,attributeOldValue:!0},Je=F||function(e){ue=!1,V.removeEventListener(N,Je)},ie=0,et=S in u&&!/^force-all/.test(w.type),tt=!0,Oe=!1,ue=!0,nt=!0,ce=!0;if(F&&(A=u.createElement("div"),A.innerHTML="<div><div></div></div>",new F(function(e,t){if(e[0]&&e[0].type=="childList"&&!e[0].removedNodes[0].childNodes.length){A=ee(d,"innerHTML");var n=A&&A.set;n&&I(d,"innerHTML",{set:function(r){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,r)}})}t.disconnect(),A=null}).observe(A,{childList:!0,subtree:!0}),A.innerHTML=""),et||(Ge||ze?(Q=function(e,t){J.call(t,e)||he(e,t)},U=he):(Q=function(e,t){e[H]||(e[H]=T(!0),he(e,t))},U=Q),R?(ue=!1,function(){var e=ee(d,g),t=e.value,n=function(l){var a=new CustomEvent(N,{bubbles:!0});a.attrName=l,a.prevValue=le.call(this,l),a.newValue=null,a[He]=a.attrChange=2,vt.call(this,l),we.call(this,a)},r=function(l,a){var s=Et.call(this,l),i=s&&le.call(this,l),c=new CustomEvent(N,{bubbles:!0});Ye.call(this,l,a),c.attrName=l,c.prevValue=s?i:null,c.newValue=a,s?c.MODIFICATION=c.attrChange=1:c[W]=c.attrChange=0,we.call(this,c)},o=function(l){var a,s=l.currentTarget,i=s[H],c=l.propertyName;i.hasOwnProperty(c)&&(i=i[c],a=new CustomEvent(N,{bubbles:!0}),a.attrName=i.name,a.prevValue=i.value||null,a.newValue=i.value=s[c]||null,a.prevValue==null?a[W]=a.attrChange=0:a.MODIFICATION=a.attrChange=1,we.call(s,a))};e.value=function(l,a,s){l===N&&this[y]&&this.setAttribute!==r&&(this[H]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",o)),t.call(this,l,a,s)},I(d,g,e)}()):F||(V[g](N,Je),V.setAttribute(H,1),V.removeAttribute(H),ue&&(Me=function(e){var t,n,r,o=this;if(o===e.target){t=o[H],o[H]=n=Ee(o);for(r in n){if(!(r in t))return X(0,o,r,t[r],n[r],W);if(n[r]!==t[r])return X(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return X(2,o,r,t[r],n[r],He)}},X=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,Ie(a)},Ee=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)t=o[l],(n=t.name)!=="setAttribute"&&(r[n]=t.value);return r})),u[S]=function(e,t){if(n=e.toUpperCase(),tt&&(tt=!1,F?($=function(i,c){function p(f,h){for(var M=0,se=f.length;M<se;h(f[M++]));}return new F(function(f){for(var h,M,se,Ne=0,bt=f.length;Ne<bt;Ne++)h=f[Ne],h.type==="childList"?(p(h.addedNodes,i),p(h.removedNodes,c)):(M=h.target,ce&&M[y]&&h.attributeName!=="style"&&(se=le.call(M,h.attributeName))!==h.oldValue&&M[y](h.attributeName,h.oldValue,se))})}(fe(b),fe(E)),ve=function(i){return $.observe(i,{childList:!0,subtree:!0}),i},ve(u),Qe&&(d.attachShadow=function(){return ve(Qe.apply(this,arguments))})):(K=[],u[g]("DOMNodeInserted",Fe(b)),u[g]("DOMNodeRemoved",Fe(E))),u[g](Ze,de),u[g]("readystatechange",de),u.importNode=function(i,c){switch(i.nodeType){case 1:return Se(u,Ht,[i,!!c]);case 11:for(var p=u.createDocumentFragment(),f=i.childNodes,h=f.length,M=0;M<h;M++)p.appendChild(u.importNode(f[M],!!c));return p;default:return We.call(i,!!c)}},d.cloneNode=function(i){return Se(this,We,[!!i])}),Oe)return Oe=!1;if(-2<v.call(D,Y+n)+v.call(D,x+n)&&Ve(e),!mt.test(n)||-1<v.call(ft,n))throw new Error("The type "+e+" is invalid");var n,r,o=function(){return a?u.createElement(s,n):u.createElement(s)},l=t||ge,a=be.call(l,_),s=a?t[_].toUpperCase():n;return a&&-1<v.call(D,x+s)&&Ve(s),r=D.push((a?Y:x)+n)-1,L=L.concat(L.length?",":"",a?s+'[is="'+e.toLowerCase()+'"]':s),o.prototype=q[r]=be.call(l,"prototype")?l.prototype:Ce(d),L.length&&me(u.querySelectorAll(L),b),o},u.createElement=Ae=function(e,t){var n=Ue(t),r=n?ae.call(u,e,re(n)):ae.call(u,e),o=""+e,l=v.call(D,(n?Y:x)+(n||o).toUpperCase()),a=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=De(o.toUpperCase(),n))),ce=!u.createElement.innerHTMLHelper,a&&U(r,q[l]),r}),addEventListener("beforeunload",function(){delete u.createElement,delete u.importNode,delete u[S]},!1),z.prototype={constructor:z,define:Z?function(e,t,n){if(n)Pe(e,t,n);else{var r=e.toUpperCase();j[r]={constructor:t,create:[r]},ne.set(t,r),C.define(e,t)}}:Pe,get:Z?function(e){return C.get(e)||Re(e)}:Re,whenDefined:Z?function(e){return Xe.race([C.whenDefined(e),Le(e)])}:Le},!C||/^force/.test(w.type))ke();else if(!w.noBuiltIn)try{(function(e,t,n){var r=new RegExp(`^<a\\s+is=('|")`+n+"\\1></a>$");if(t[_]="a",e.prototype=Ce($e.prototype),e.prototype.constructor=e,m.customElements.define(n,e,t),!r.test(u.createElement("a",{is:n}).outerHTML)||!r.test(new e().outerHTML))throw t})(function e(){return Reflect.construct($e,[],e)},{},"document-register-element-a"+xe)}catch{ke()}if(!w.noBuiltIn)try{if(ae.call(u,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{re=function(t){return{is:t.toLowerCase()}}}})(window);
3
3
 
4
4
  var B_e=Object.create;var DO=Object.defineProperty,V_e=Object.defineProperties,U_e=Object.getOwnPropertyDescriptor,j_e=Object.getOwnPropertyDescriptors,$_e=Object.getOwnPropertyNames,TO=Object.getOwnPropertySymbols,RW=Object.getPrototypeOf,V7=Object.prototype.hasOwnProperty,NW=Object.prototype.propertyIsEnumerable,H_e=Reflect.get;var kW=(i,o,n)=>o in i?DO(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,I=(i,o)=>{for(var n in o||={})V7.call(o,n)&&kW(i,n,o[n]);if(TO)for(var n of TO(o))NW.call(o,n)&&kW(i,n,o[n]);return i},T=(i,o)=>V_e(i,j_e(o));var U7=(i,o)=>{var n={};for(var e in i)V7.call(i,e)&&o.indexOf(e)<0&&(n[e]=i[e]);if(i!=null&&TO)for(var e of TO(i))o.indexOf(e)<0&&NW.call(i,e)&&(n[e]=i[e]);return n};var z_e=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),wO=(i,o)=>{for(var n in o)DO(i,n,{get:o[n],enumerable:!0})},G_e=(i,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of $_e(o))!V7.call(i,t)&&t!==n&&DO(i,t,{get:()=>o[t],enumerable:!(e=U_e(o,t))||e.enumerable});return i};var FW=(i,o,n)=>(n=i!=null?B_e(RW(i)):{},G_e(o||!i||!i.__esModule?DO(n,"default",{value:i,enumerable:!0}):n,i));var ap=(i,o,n)=>H_e(RW(i),n,o);var Q=(i,o,n)=>new Promise((e,t)=>{var r=c=>{try{s(n.next(c))}catch(p){t(p)}},a=c=>{try{s(n.throw(c))}catch(p){t(p)}},s=c=>c.done?e(c.value):Promise.resolve(c.value).then(r,a);s((n=n.apply(i,o)).next())});var QG=z_e((L0o,XG)=>{"use strict";var Et={};Et.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};Et.localCName=Et.generateIdentifier();Et.splitLines=function(i){return i.trim().split(`
@@ -67,7 +67,7 @@ Content-Type: `+p.contentType+`\r
67
67
  `],encapsulation:2})}return i})(),PS=class{overlayRef;config;componentInstance;componentRef;containerInstance;disableClose;closed=new tt;backdropClick;keydownEvents;outsidePointerEvents;id;_detachSubscription;constructor(o,n){this.overlayRef=o,this.config=n,this.disableClose=n.disableClose,this.backdropClick=o.backdropClick(),this.keydownEvents=o.keydownEvents(),this.outsidePointerEvents=o.outsidePointerEvents(),this.id=n.id,this.keydownEvents.subscribe(e=>{e.keyCode===27&&!this.disableClose&&!Zr(e)&&(e.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=o.detachments().subscribe(()=>{n.closeOnOverlayDetachments!==!1&&this.close()})}close(o,n){if(this.containerInstance){let e=this.closed;this.containerInstance._closeInteractionType=n?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),e.next(o),e.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(o="",n=""){return this.overlayRef.updateSize({width:o,height:n}),this}addPanelClass(o){return this.overlayRef.addPanelClass(o),this}removePanelClass(o){return this.overlayRef.removePanelClass(o),this}},UMe=new mt("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.block()}}),jMe=new mt("DialogData"),$Me=new mt("DefaultDialogConfig");var kS=(()=>{class i{_overlay=be(Ri);_injector=be(Ot);_defaultOptions=be($Me,{optional:!0});_parentDialog=be(i,{optional:!0,skipSelf:!0});_overlayContainer=be(_5);_idGenerator=be(xs);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new tt;_afterOpenedAtThisLevel=new tt;_ariaHiddenElements=new Map;_scrollStrategy=be(UMe);get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}afterAllClosed=fm(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Qi(void 0)));constructor(){}open(n,e){let t=this._defaultOptions||new zp;e=I(I({},t),e),e.id=e.id||this._idGenerator.getId("cdk-dialog-"),e.id&&this.getDialogById(e.id);let r=this._getOverlayConfig(e),a=this._overlay.create(r),s=new PS(a,e),c=this._attachContainer(a,s,e);return s.containerInstance=c,this._attachDialogContent(n,s,c,e),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(s),s.closed.subscribe(()=>this._removeOpenDialog(s,!0)),this.afterOpened.next(s),s}closeAll(){FU(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(e=>e.id===n)}ngOnDestroy(){FU(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),FU(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let e=new vc({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(e.backdropClass=n.backdropClass),e}_attachContainer(n,e,t){let r=t.injector||t.viewContainerRef?.injector,a=[{provide:zp,useValue:t},{provide:PS,useValue:e},{provide:yu,useValue:n}],s;t.container?typeof t.container=="function"?s=t.container:(s=t.container.type,a.push(...t.container.providers(t))):s=MS;let c=new $o(s,t.viewContainerRef,Ot.create({parent:r||this._injector,providers:a}));return n.attach(c).instance}_attachDialogContent(n,e,t,r){if(n instanceof xo){let a=this._createInjector(r,e,t,void 0),s={$implicit:r.data,dialogRef:e};r.templateContext&&(s=I(I({},s),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),t.attachTemplatePortal(new ga(n,null,s,a))}else{let a=this._createInjector(r,e,t,this._injector),s=t.attachComponentPortal(new $o(n,r.viewContainerRef,a));e.componentRef=s,e.componentInstance=s.instance}}_createInjector(n,e,t,r){let a=n.injector||n.viewContainerRef?.injector,s=[{provide:jMe,useValue:n.data},{provide:PS,useValue:e}];return n.providers&&(typeof n.providers=="function"?s.push(...n.providers(e,n,t)):s.push(...n.providers)),n.direction&&(!a||!a.get($r,null,{optional:!0}))&&s.push({provide:$r,useValue:{value:n.direction,change:se()}}),Ot.create({parent:a||r,providers:s})}_removeOpenDialog(n,e){let t=this.openDialogs.indexOf(n);t>-1&&(this.openDialogs.splice(t,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,a)=>{r?a.setAttribute("aria-hidden",r):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),e&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let e=n.parentElement.children;for(let t=e.length-1;t>-1;t--){let r=e[t];r!==n&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function FU(i,o){let n=i.length;for(;n--;)o(i[n])}var CP=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[kS],imports:[Zs,El,IS,El]})}return i})();function HMe(i,o){}var Moe="_mat-bottom-sheet-enter",koe="_mat-bottom-sheet-exit",zMe=(()=>{class i extends MS{_breakpointSubscription;_animationsDisabled=be(mr,{optional:!0})==="NoopAnimations";_animationState="void";_animationStateChanged=new Me;_destroyed;constructor(){super();let n=be(vo);this._breakpointSubscription=n.observe([Li.Medium,Li.Large,Li.XLarge]).subscribe(()=>{let e=this._elementRef.nativeElement.classList;e.toggle("mat-bottom-sheet-container-medium",n.isMatched(Li.Medium)),e.toggle("mat-bottom-sheet-container-large",n.isMatched(Li.Large)),e.toggle("mat-bottom-sheet-container-xlarge",n.isMatched(Li.XLarge))})}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._animationsDisabled&&this._simulateAnimation(Moe))}exit(){this._destroyed||(this._elementRef.nativeElement.setAttribute("mat-exit",""),this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._animationsDisabled&&this._simulateAnimation(koe))}ngOnDestroy(){super.ngOnDestroy(),this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_simulateAnimation(n){this._ngZone.run(()=>{this._handleAnimationEvent(!0,n),setTimeout(()=>this._handleAnimationEvent(!1,n))})}_trapFocus(){super._trapFocus({preventScroll:!0})}_handleAnimationEvent(n,e){let t=e===Moe;(t||e===koe)&&this._animationStateChanged.emit({toState:t?"visible":"hidden",phase:n?"start":"done"})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-bottom-sheet-container"]],hostAttrs:["tabindex","-1",1,"mat-bottom-sheet-container"],hostVars:9,hostBindings:function(e,t){e&1&&G("animationstart",function(a){return t._handleAnimationEvent(!0,a.animationName)})("animationend",function(a){return t._handleAnimationEvent(!1,a.animationName)})("animationcancel",function(a){return t._handleAnimationEvent(!1,a.animationName)}),e&2&&(x("role",t._config.role)("aria-modal",t._config.ariaModal)("aria-label",t._config.ariaLabel),ue("mat-bottom-sheet-container-animations-enabled",!t._animationsDisabled)("mat-bottom-sheet-container-enter",t._animationState==="visible")("mat-bottom-sheet-container-exit",t._animationState==="hidden"))},features:[B],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,t){e&1&&u(0,HMe,0,0,"ng-template",0)},dependencies:[bp],styles:[`@keyframes _mat-bottom-sheet-enter{from{transform:translateY(100%)}to{transform:none}}@keyframes _mat-bottom-sheet-exit{from{transform:none}to{transform:translateY(100%)}}.mat-bottom-sheet-container{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2), 0px 16px 24px 2px rgba(0, 0, 0, 0.14), 0px 6px 30px 5px rgba(0, 0, 0, 0.12);padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto;position:relative;background:var(--mat-bottom-sheet-container-background-color, var(--mat-sys-surface-container-low));color:var(--mat-bottom-sheet-container-text-color, var(--mat-sys-on-surface));font-family:var(--mat-bottom-sheet-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-bottom-sheet-container-text-size, var(--mat-sys-body-large-size));line-height:var(--mat-bottom-sheet-container-text-line-height, var(--mat-sys-body-large-line-height));font-weight:var(--mat-bottom-sheet-container-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-bottom-sheet-container-text-tracking, var(--mat-sys-body-large-tracking))}@media(forced-colors: active){.mat-bottom-sheet-container{outline:1px solid}}.mat-bottom-sheet-container-animations-enabled{transform:translateY(100%)}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-enter{animation:_mat-bottom-sheet-enter 195ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-bottom-sheet-container-animations-enabled.mat-bottom-sheet-container-exit{animation:_mat-bottom-sheet-exit 375ms cubic-bezier(0.4, 0, 1, 1) backwards}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:var(--mat-bottom-sheet-container-shape, 28px);border-top-right-radius:var(--mat-bottom-sheet-container-shape, 28px)}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}
68
68
  `],encapsulation:2})}return i})(),Tc=new mt("MatBottomSheetData"),LU=class{viewContainerRef;panelClass;direction;data=null;hasBackdrop=!0;backdropClass;disableClose=!1;ariaLabel=null;ariaModal=!1;closeOnNavigation=!0;autoFocus="first-tabbable";restoreFocus=!0;scrollStrategy;height="";minHeight;maxHeight},wd=class{_ref;get instance(){return this._ref.componentInstance}get componentRef(){return this._ref.componentRef}containerInstance;disableClose;_afterOpened=new tt;_result;_closeFallbackTimeout;constructor(o,n,e){this._ref=o,this.containerInstance=e,this.disableClose=n.disableClose,e._animationStateChanged.pipe(Le(t=>t.phase==="done"&&t.toState==="visible"),rt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(Le(t=>t.phase==="done"&&t.toState==="hidden"),rt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._ref.close(this._result)}),o.overlayRef.detachments().subscribe(()=>{this._ref.close(this._result)}),mo(this.backdropClick(),this.keydownEvents().pipe(Le(t=>t.keyCode===27))).subscribe(t=>{!this.disableClose&&(t.type!=="keydown"||!Zr(t))&&(t.preventDefault(),this.dismiss())})}dismiss(o){this.containerInstance&&(this.containerInstance._animationStateChanged.pipe(Le(n=>n.phase==="start"),rt(1)).subscribe(()=>{this._closeFallbackTimeout=setTimeout(()=>this._ref.close(this._result),500),this._ref.overlayRef.detachBackdrop()}),this._result=o,this.containerInstance.exit(),this.containerInstance=null)}afterDismissed(){return this._ref.closed}afterOpened(){return this._afterOpened}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}},GMe=new mt("mat-bottom-sheet-default-options"),Dc=(()=>{class i{_overlay=be(Ri);_parentBottomSheet=be(i,{optional:!0,skipSelf:!0});_defaultOptions=be(GMe,{optional:!0});_bottomSheetRefAtThisLevel=null;_dialog=be(kS);get _openedBottomSheetRef(){let n=this._parentBottomSheet;return n?n._openedBottomSheetRef:this._bottomSheetRefAtThisLevel}set _openedBottomSheetRef(n){this._parentBottomSheet?this._parentBottomSheet._openedBottomSheetRef=n:this._bottomSheetRefAtThisLevel=n}constructor(){}open(n,e){let t=I(I({},this._defaultOptions||new LU),e),r;return this._dialog.open(n,T(I({},t),{disableClose:!0,closeOnOverlayDetachments:!1,maxWidth:"100%",container:zMe,scrollStrategy:t.scrollStrategy||this._overlay.scrollStrategies.block(),positionStrategy:this._overlay.position().global().centerHorizontally().bottom("0"),templateContext:()=>({bottomSheetRef:r}),providers:(a,s,c)=>(r=new wd(a,t,c),[{provide:wd,useValue:r},{provide:Tc,useValue:t.data}])})),r.afterDismissed().subscribe(()=>{this._openedBottomSheetRef===r&&(this._openedBottomSheetRef=null)}),this._openedBottomSheetRef?(this._openedBottomSheetRef.afterDismissed().subscribe(()=>r.containerInstance?.enter()),this._openedBottomSheetRef.dismiss()):r.containerInstance.enter(),this._openedBottomSheetRef=r,r}dismiss(n){this._openedBottomSheetRef&&this._openedBottomSheetRef.dismiss(n)}ngOnDestroy(){this._bottomSheetRefAtThisLevel&&this._bottomSheetRefAtThisLevel.dismiss()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Roe=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[Dc],imports:[CP,Lo,El,Lo]})}return i})();function WMe(i,o){}var NS=class{viewContainerRef;injector;id;role="dialog";panelClass="";hasBackdrop=!0;backdropClass="";disableClose=!1;width="";height="";minWidth;minHeight;maxWidth;maxHeight;position;data=null;direction;ariaDescribedBy=null;ariaLabelledBy=null;ariaLabel=null;ariaModal=!1;autoFocus="first-tabbable";restoreFocus=!0;delayFocusTrap=!0;scrollStrategy;closeOnNavigation=!0;componentFactoryResolver;enterAnimationDuration;exitAnimationDuration},BU="mdc-dialog--open",Noe="mdc-dialog--opening",Foe="mdc-dialog--closing",qMe=150,YMe=75,Voe=(()=>{class i extends MS{_animationMode=be(mr,{optional:!0});_animationStateChanged=new Me;_animationsEnabled=this._animationMode!=="NoopAnimations";_actionSectionCount=0;_hostElement=this._elementRef.nativeElement;_enterAnimationDuration=this._animationsEnabled?Boe(this._config.enterAnimationDuration)??qMe:0;_exitAnimationDuration=this._animationsEnabled?Boe(this._config.exitAnimationDuration)??YMe:0;_animationTimer=null;_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Loe,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Noe,BU)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(BU),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(BU),this._animationsEnabled?(this._hostElement.style.setProperty(Loe,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Foe)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(n){this._actionSectionCount+=n,this._changeDetectorRef.markForCheck()}_finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)};_finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})};_clearAnimationClasses(){this._hostElement.classList.remove(Noe,Foe)}_waitForAnimationToComplete(n,e){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(e,n)}_requestAnimationFrame(n){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(n):n()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(n){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(n){let e=super.attachComponentPortal(n);return e.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),e}static \u0275fac=(()=>{let n;return function(t){return(n||(n=Qa(i)))(t||i)}})();static \u0275cmp=O({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(e,t){e&2&&(ka("id",t._config.id),x("aria-modal",t._config.ariaModal)("role",t._config.role)("aria-labelledby",t._config.ariaLabel?null:t._ariaLabelledByQueue[0])("aria-label",t._config.ariaLabel)("aria-describedby",t._config.ariaDescribedBy||null),ue("_mat-animation-noopable",!t._animationsEnabled)("mat-mdc-dialog-container-with-actions",t._actionSectionCount>0))},features:[B],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,t){e&1&&(_(0,"div",0)(1,"div",1),u(2,WMe,0,0,"ng-template",2),b()())},dependencies:[bp],styles:[`.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}
69
69
  `],encapsulation:2})}return i})(),Loe="--mat-dialog-transition-duration";function Boe(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?Es(i.substring(0,i.length-2)):i.endsWith("s")?Es(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var RS=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(RS||{}),nr=class{_ref;_containerInstance;componentInstance;componentRef;disableClose;id;_afterOpened=new tt;_beforeClosed=new tt;_result;_closeFallbackTimeout;_state=RS.OPEN;_closeInteractionType;constructor(o,n,e){this._ref=o,this._containerInstance=e,this.disableClose=n.disableClose,this.id=o.id,o.addPanelClass("mat-mdc-dialog-panel"),e._animationStateChanged.pipe(Le(t=>t.state==="opened"),rt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(Le(t=>t.state==="closed"),rt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),o.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),mo(this.backdropClick(),this.keydownEvents().pipe(Le(t=>t.keyCode===27&&!this.disableClose&&!Zr(t)))).subscribe(t=>{this.disableClose||(t.preventDefault(),VU(this,t.type==="keydown"?"keyboard":"mouse"))})}close(o){this._result=o,this._containerInstance._animationStateChanged.pipe(Le(n=>n.state==="closing"),rt(1)).subscribe(n=>{this._beforeClosed.next(o),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),n.totalTime+100)}),this._state=RS.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(o){let n=this._ref.config.positionStrategy;return o&&(o.left||o.right)?o.left?n.left(o.left):n.right(o.right):n.centerHorizontally(),o&&(o.top||o.bottom)?o.top?n.top(o.top):n.bottom(o.bottom):n.centerVertically(),this._ref.updatePosition(),this}updateSize(o="",n=""){return this._ref.updateSize(o,n),this}addPanelClass(o){return this._ref.addPanelClass(o),this}removePanelClass(o){return this._ref.removePanelClass(o),this}getState(){return this._state}_finishDialogClose(){this._state=RS.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function VU(i,o,n){return i._closeInteractionType=o,i.close(n)}var Ml=new mt("MatMdcDialogData"),Uoe=new mt("mat-mdc-dialog-default-options"),joe=new mt("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.block()}});var io=(()=>{class i{_overlay=be(Ri);_defaultOptions=be(Uoe,{optional:!0});_scrollStrategy=be(joe);_parentDialog=be(i,{optional:!0,skipSelf:!0});_idGenerator=be(xs);_dialog=be(kS);_openDialogsAtThisLevel=[];_afterAllClosedAtThisLevel=new tt;_afterOpenedAtThisLevel=new tt;dialogConfigClass=NS;_dialogRefConstructor;_dialogContainerType;_dialogDataToken;get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}afterAllClosed=fm(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Qi(void 0)));constructor(){this._dialogRefConstructor=nr,this._dialogContainerType=Voe,this._dialogDataToken=Ml}open(n,e){let t;e=I(I({},this._defaultOptions||new NS),e),e.id=e.id||this._idGenerator.getId("mat-mdc-dialog-"),e.scrollStrategy=e.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(n,T(I({},e),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:e},{provide:zp,useValue:e}]},templateContext:()=>({dialogRef:t}),providers:(a,s,c)=>(t=new this._dialogRefConstructor(a,e,c),t.updatePosition(e?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:s.data},{provide:this._dialogRefConstructor,useValue:t}])}));return t.componentRef=r.componentRef,t.componentInstance=r.componentInstance,this.openDialogs.push(t),this.afterOpened.next(t),t.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(t);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),t}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(n){return this.openDialogs.find(e=>e.id===n)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(n){let e=n.length;for(;e--;)n[e].close()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),UU=(()=>{class i{dialogRef=be(nr,{optional:!0});_elementRef=be(R);_dialog=be(io);ariaLabel;type="button";dialogResult;_matDialogClose;constructor(){}ngOnInit(){this.dialogRef||(this.dialogRef=Hoe(this._elementRef,this._dialog.openDialogs))}ngOnChanges(n){let e=n._matDialogClose||n._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(n){VU(this.dialogRef,n.screenX===0&&n.screenY===0?"keyboard":"mouse",this.dialogResult)}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,t){e&1&&G("click",function(a){return t._onButtonClick(a)}),e&2&&x("aria-label",t.ariaLabel||null)("type",t.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Ze]})}return i})(),$oe=(()=>{class i{_dialogRef=be(nr,{optional:!0});_elementRef=be(R);_dialog=be(io);constructor(){}ngOnInit(){this._dialogRef||(this._dialogRef=Hoe(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i})}return i})(),jU=(()=>{class i extends $oe{id=be(xs).getId("mat-mdc-dialog-title-");_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static \u0275fac=(()=>{let n;return function(t){return(n||(n=Qa(i)))(t||i)}})();static \u0275dir=Ht({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,t){e&2&&ka("id",t.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],features:[B]})}return i})(),$U=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],features:[xZ([oy])]})}return i})(),HU=(()=>{class i extends $oe{align;_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static \u0275fac=(()=>{let n;return function(t){return(n||(n=Qa(i)))(t||i)}})();static \u0275dir=Ht({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(e,t){e&2&&ue("mat-mdc-dialog-actions-align-start",t.align==="start")("mat-mdc-dialog-actions-align-center",t.align==="center")("mat-mdc-dialog-actions-align-end",t.align==="end")},inputs:{align:"align"},features:[B]})}return i})();function Hoe(i,o){let n=i.nativeElement.parentElement;for(;n&&!n.classList.contains("mat-mdc-dialog-container");)n=n.parentElement;return n?o.find(e=>e.id===n.id):null}var zU=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[io],imports:[CP,Zs,El,Lo,Lo]})}return i})();var KMe=["mat-menu-item",""],ZMe=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],XMe=["mat-icon, [matMenuItemIcon]","*"];function QMe(i,o){i&1&&(le(),_(0,"svg",2),w(1,"polygon",3),b())}var JMe=["*"];function eke(i,o){if(i&1){let n=Y();_(0,"div",0),G("click",function(){N(n);let t=l();return F(t.closed.emit("click"))})("animationstart",function(t){N(n);let r=l();return F(r._onAnimationStart(t.animationName))})("animationend",function(t){N(n);let r=l();return F(r._onAnimationDone(t.animationName))})("animationcancel",function(t){N(n);let r=l();return F(r._onAnimationDone(t.animationName))}),_(1,"div",1),Lt(2),b()()}if(i&2){let n=l();tr(n._classList),ue("mat-menu-panel-animations-disabled",n._animationsDisabled)("mat-menu-panel-exit-animation",n._panelAnimationState==="void")("mat-menu-panel-animating",n._isAnimating),d("id",n.panelId),x("aria-label",n.ariaLabel||null)("aria-labelledby",n.ariaLabelledby||null)("aria-describedby",n.ariaDescribedby||null)}}var WU=new mt("MAT_MENU_PANEL"),il=(()=>{class i{_elementRef=be(R);_document=be(Un);_focusMonitor=be(zu);_parentMenu=be(WU,{optional:!0});_changeDetectorRef=be(tn);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new tt;_focused=new tt;_highlighted=!1;_triggersSubmenu=!1;constructor(){be(Na).load(_v),this._parentMenu?.addItem?.(this)}focus(n,e){this._focusMonitor&&n?this._focusMonitor.focusVia(this._getHostElement(),n,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let n=this._elementRef.nativeElement.cloneNode(!0),e=n.querySelectorAll("mat-icon, .material-icons");for(let t=0;t<e.length;t++)e[t].remove();return n.textContent?.trim()||""}_setHighlighted(n){this._highlighted=n,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(n){this._triggersSubmenu=n,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(e,t){e&1&&G("click",function(a){return t._checkDisabled(a)})("mouseenter",function(){return t._handleMouseEnter()}),e&2&&(x("role",t.role)("tabindex",t._getTabIndex())("aria-disabled",t.disabled)("disabled",t.disabled||null),ue("mat-mdc-menu-item-highlighted",t._highlighted)("mat-mdc-menu-item-submenu-trigger",t._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",ci],disableRipple:[2,"disableRipple","disableRipple",ci]},exportAs:["matMenuItem"],attrs:KMe,ngContentSelectors:XMe,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(e,t){e&1&&(jt(ZMe),Lt(0),_(1,"span",0),Lt(2,1),b(),w(3,"div",1),u(4,QMe,2,0,":svg:svg",2)),e&2&&(m(3),d("matRippleDisabled",t.disableRipple||t.disabled)("matRippleTrigger",t._getHostElement()),m(),pc(t._triggersSubmenu?4:-1))},dependencies:[Wu],encapsulation:2,changeDetection:0})}return i})();var zoe=new mt("MatMenuContent"),Goe=(()=>{class i{_template=be(xo);_appRef=be(yi);_injector=be(Ot);_viewContainerRef=be(Si);_document=be(Un);_changeDetectorRef=be(tn);_portal;_outlet;_attached=new tt;constructor(){}attach(n={}){this._portal||(this._portal=new ga(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new Ho(this._document.createElement("div"),null,this._appRef,this._injector));let e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,n),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i,selectors:[["ng-template","matMenuContent",""]],features:[V([{provide:zoe,useExisting:i}])]})}return i})(),tke=new mt("mat-menu-default-options",{providedIn:"root",factory:nke});function nke(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var GU="_mat-menu-enter",_P="_mat-menu-exit",kl=(()=>{class i{_elementRef=be(R);_changeDetectorRef=be(tn);_injector=be(Ot);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled;_allItems;_directDescendantItems=new gp;_classList={};_panelAnimationState="void";_animationDone=new tt;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(n){this._xPosition=n,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(n){this._yPosition=n,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(n){let e=this._previousPanelClass,t=I({},this._classList);e&&e.length&&e.split(" ").forEach(r=>{t[r]=!1}),this._previousPanelClass=n,n&&n.length&&(n.split(" ").forEach(r=>{t[r]=!0}),this._elementRef.nativeElement.className=""),this._classList=t}_previousPanelClass;get classList(){return this.panelClass}set classList(n){this.panelClass=n}closed=new Me;close=this.closed;panelId=be(xs).getId("mat-menu-panel-");constructor(){let n=be(tke);this.overlayPanelClass=n.overlayPanelClass||"",this._xPosition=n.xPosition,this._yPosition=n.yPosition,this.backdropClass=n.backdropClass,this.overlapTrigger=n.overlapTrigger,this.hasBackdrop=n.hasBackdrop,this._animationsDisabled=be(mr,{optional:!0})==="NoopAnimations"}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new TS(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Qi(this._directDescendantItems),he(n=>mo(...n.map(e=>e._focused)))).subscribe(n=>this._keyManager.updateActiveItem(n)),this._directDescendantItems.changes.subscribe(n=>{let e=this._keyManager;if(this._panelAnimationState==="enter"&&e.activeItem?._hasFocus()){let t=n.toArray(),r=Math.max(0,Math.min(t.length-1,e.activeItemIndex||0));t[r]&&!t[r].disabled?e.setActiveItem(r):e.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(Qi(this._directDescendantItems),he(e=>mo(...e.map(t=>t._hovered))))}addItem(n){}removeItem(n){}_handleKeydown(n){let e=n.keyCode,t=this._keyManager;switch(e){case 27:Zr(n)||(n.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(e===38||e===40)&&t.setFocusOrigin("keyboard"),t.onKeydown(n);return}}focusFirstItem(n="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Pa(()=>{let e=this._resolvePanel();if(!e||!e.contains(document.activeElement)){let t=this._keyManager;t.setFocusOrigin(n).setFirstItemActive(),!t.activeItem&&e&&e.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(n){}setPositionClasses(n=this.xPosition,e=this.yPosition){this._classList=T(I({},this._classList),{"mat-menu-before":n==="before","mat-menu-after":n==="after","mat-menu-above":e==="above","mat-menu-below":e==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(n){let e=n===_P;(e||n===GU)&&(e&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(e?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(n){(n===GU||n===_P)&&(this._isAnimating=!0)}_setIsOpen(n){if(this._panelAnimationState=n?"enter":"void",n){if(this._keyManager.activeItemIndex===0){let e=this._resolvePanel();e&&(e.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(_P),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(n?GU:_P)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(Qi(this._allItems)).subscribe(n=>{this._directDescendantItems.reset(n.filter(e=>e._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let n=null;return this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),n}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-menu"]],contentQueries:function(e,t,r){if(e&1&&(Gs(r,zoe,5),Gs(r,il,5),Gs(r,il,4)),e&2){let a;Xe(a=Qe())&&(t.lazyContent=a.first),Xe(a=Qe())&&(t._allItems=a),Xe(a=Qe())&&(t.items=a)}},viewQuery:function(e,t){if(e&1&&nt(xo,5),e&2){let r;Xe(r=Qe())&&(t.templateRef=r.first)}},hostVars:3,hostBindings:function(e,t){e&2&&x("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",ci],hasBackdrop:[2,"hasBackdrop","hasBackdrop",n=>n==null?null:ci(n)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[V([{provide:WU,useExisting:i}])],ngContentSelectors:JMe,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(e,t){e&1&&(jt(),u(0,eke,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
70
- `],encapsulation:2,changeDetection:0})}return i})(),Woe=new mt("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.reposition()}});function ike(i){return()=>i.scrollStrategies.reposition()}var oke={provide:Woe,deps:[Ri],useFactory:ike},rke={passive:!0};var FS=new WeakMap,Wp=(()=>{class i{_overlay=be(Ri);_element=be(R);_viewContainerRef=be(Si);_menuItemInstance=be(il,{optional:!0,self:!0});_dir=be($r,{optional:!0});_focusMonitor=be(zu);_ngZone=be(Vt);_scrollStrategy=be(Woe);_changeDetectorRef=be(tn);_cleanupTouchstart;_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=bn.EMPTY;_hoverSubscription=bn.EMPTY;_menuCloseSubscription=bn.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(n){this.menu=n}get menu(){return this._menu}set menu(n){n!==this._menu&&(this._menu=n,this._menuCloseSubscription.unsubscribe(),n&&(this._parentMaterialMenu,this._menuCloseSubscription=n.close.subscribe(e=>{this._destroyMenu(e),(e==="click"||e==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(e)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}_menu;menuData;restoreFocus=!0;menuOpened=new Me;onMenuOpen=this.menuOpened;menuClosed=new Me;onMenuClose=this.menuClosed;constructor(){let n=be(WU,{optional:!0}),e=be(eo);this._parentMaterialMenu=n instanceof kl?n:void 0,this._cleanupTouchstart=yr(e,this._element.nativeElement,"touchstart",t=>{Mm(t)||(this._openedBy="touch")},rke)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this.menu&&this._ownsMenu(this.menu)&&FS.delete(this.menu),this._cleanupTouchstart(),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let n=this.menu;if(this._menuOpen||!n)return;this._pendingRemoval?.unsubscribe();let e=FS.get(n);FS.set(n,this),e&&e!==this&&e.closeMenu();let t=this._createOverlay(n),r=t.getConfig(),a=r.positionStrategy;this._setPosition(n,a),r.hasBackdrop=n.hasBackdrop==null?!this.triggersSubmenu():n.hasBackdrop,t.hasAttached()||(t.attach(this._getPortal(n)),n.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),n.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),n instanceof kl&&(n._setIsOpen(!0),n._directDescendantItems.changes.pipe(po(n.close)).subscribe(()=>{a.withLockedPosition(!1).reapplyLastPosition(),a.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(n,e){this._focusMonitor&&n?this._focusMonitor.focusVia(this._element,n,e):this._element.nativeElement.focus(e)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(n){let e=this._overlayRef,t=this._menu;!e||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),t instanceof kl&&this._ownsMenu(t)?(this._pendingRemoval=t._animationDone.pipe(rt(1)).subscribe(()=>{e.detach(),t.lazyContent?.detach()}),t._setIsOpen(!1)):(e.detach(),t?.lazyContent?.detach()),t&&this._ownsMenu(t)&&FS.delete(t),this.restoreFocus&&(n==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(n){n!==this._menuOpen&&(this._menuOpen=n,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(n),this._changeDetectorRef.markForCheck())}_createOverlay(n){if(!this._overlayRef){let e=this._getOverlayConfig(n);this._subscribeToPositions(n,e.positionStrategy),this._overlayRef=this._overlay.create(e),this._overlayRef.keydownEvents().subscribe(t=>{this.menu instanceof kl&&this.menu._handleKeydown(t)})}return this._overlayRef}_getOverlayConfig(n){return new vc({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:n.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:n.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr"})}_subscribeToPositions(n,e){n.setPositionClasses&&e.positionChanges.subscribe(t=>{this._ngZone.run(()=>{let r=t.connectionPair.overlayX==="start"?"after":"before",a=t.connectionPair.overlayY==="top"?"below":"above";n.setPositionClasses(r,a)})})}_setPosition(n,e){let[t,r]=n.xPosition==="before"?["end","start"]:["start","end"],[a,s]=n.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,p]=[a,s],[g,C]=[t,r],E=0;if(this.triggersSubmenu()){if(C=t=n.xPosition==="before"?"start":"end",r=g=t==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let D=this._parentMaterialMenu.items.first;this._parentInnerPadding=D?D._getHostElement().offsetTop:0}E=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else n.overlapTrigger||(c=a==="top"?"bottom":"top",p=s==="top"?"bottom":"top");e.withPositions([{originX:t,originY:c,overlayX:g,overlayY:a,offsetY:E},{originX:r,originY:c,overlayX:C,overlayY:a,offsetY:E},{originX:t,originY:p,overlayX:g,overlayY:s,offsetY:-E},{originX:r,originY:p,overlayX:C,overlayY:s,offsetY:-E}])}_menuClosingActions(){let n=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),t=this._parentMaterialMenu?this._parentMaterialMenu.closed:se(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Le(a=>this._menuOpen&&a!==this._menuItemInstance)):se();return mo(n,t,r,e)}_handleMousedown(n){Pm(n)||(this._openedBy=n.button===0?"mouse":void 0,this.triggersSubmenu()&&n.preventDefault())}_handleKeydown(n){let e=n.keyCode;(e===13||e===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===39&&this.dir==="ltr"||e===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(n){this.triggersSubmenu()?(n.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(n=>{n===this._menuItemInstance&&!n.disabled&&(this._openedBy="mouse",this.openMenu())}))}_getPortal(n){return(!this._portal||this._portal.templateRef!==n.templateRef)&&(this._portal=new ga(n.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(n){return FS.get(n)===this}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(e,t){e&1&&G("click",function(a){return t._handleClick(a)})("mousedown",function(a){return t._handleMousedown(a)})("keydown",function(a){return t._handleKeydown(a)}),e&2&&x("aria-haspopup",t.menu?"menu":null)("aria-expanded",t.menuOpen)("aria-controls",t.menuOpen?t.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]})}return i})(),qoe=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[oke],imports:[yv,Lo,Zs,fc,Lo]})}return i})(),Yoe={transformMenu:{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.8)"},offset:null}},{type:1,expr:"void => enter",animation:{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1)"},offset:null},timings:"120ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}},fadeInItems:{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null}},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}},jTn=Yoe.fadeInItems,$Tn=Yoe.transformMenu;var qU=20;var Koe=new mt("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.reposition({scrollThrottle:qU})}});function Zoe(i){return()=>i.scrollStrategies.reposition({scrollThrottle:qU})}var Xoe={provide:Koe,deps:[Ri],useFactory:Zoe};var YU=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[Xoe],imports:[IS,Zs,Lo,Lo,fc]})}return i})();var Hn=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(Hn||{}),Rl="*";function KU(i,o){return{type:Hn.Trigger,name:i,definitions:o,options:{}}}function yP(i,o=null){return{type:Hn.Animate,styles:o,timings:i}}function Qoe(i,o=null){return{type:Hn.Sequence,steps:i,options:o}}function Ad(i){return{type:Hn.Style,styles:i,offset:null}}function SP(i,o,n){return{type:Hn.State,name:i,styles:o,options:n}}function bP(i,o,n=null){return{type:Hn.Transition,expr:i,animation:o,options:n}}var Od=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(o=0,n=0){this.totalTime=o+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(o=>o()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(o){this._position=this.totalTime?o*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(o){let n=o=="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},qu=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(o){this.players=o;let n=0,e=0,t=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++n==r&&this._onFinish()}),a.onDestroy(()=>{++e==r&&this._onDestroy()}),a.onStart(()=>{++t==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,s)=>Math.max(a,s.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this.players.forEach(o=>o.init())}onStart(o){this._onStartFns.push(o)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(o=>o()),this._onStartFns=[])}onDone(o){this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(o=>o.play())}pause(){this.players.forEach(o=>o.pause())}restart(){this.players.forEach(o=>o.restart())}finish(){this._onFinish(),this.players.forEach(o=>o.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(o=>o.destroy()),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this.players.forEach(o=>o.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(o){let n=o*this.totalTime;this.players.forEach(e=>{let t=e.totalTime?Math.min(1,n/e.totalTime):1;e.setPosition(t)})}getPosition(){let o=this.players.reduce((n,e)=>n===null||e.totalTime>n.totalTime?e:n,null);return o!=null?o.getPosition():0}beforeDestroy(){this.players.forEach(o=>{o.beforeDestroy&&o.beforeDestroy()})}triggerCallback(o){let n=o=="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},Sv="!";function Joe(i){return new Tt(3e3,!1)}function ake(){return new Tt(3100,!1)}function ske(){return new Tt(3101,!1)}function lke(i){return new Tt(3001,!1)}function cke(i){return new Tt(3003,!1)}function dke(i){return new Tt(3004,!1)}function tre(i,o){return new Tt(3005,!1)}function nre(){return new Tt(3006,!1)}function ire(){return new Tt(3007,!1)}function ore(i,o){return new Tt(3008,!1)}function rre(i){return new Tt(3002,!1)}function are(i,o,n,e,t){return new Tt(3010,!1)}function sre(){return new Tt(3011,!1)}function lre(){return new Tt(3012,!1)}function cre(){return new Tt(3200,!1)}function dre(){return new Tt(3202,!1)}function mre(){return new Tt(3013,!1)}function pre(i){return new Tt(3014,!1)}function gre(i){return new Tt(3015,!1)}function ure(i){return new Tt(3016,!1)}function hre(i,o){return new Tt(3404,!1)}function mke(i){return new Tt(3502,!1)}function fre(i){return new Tt(3503,!1)}function vre(){return new Tt(3300,!1)}function Cre(i){return new Tt(3504,!1)}function _re(i){return new Tt(3301,!1)}function yre(i,o){return new Tt(3302,!1)}function Sre(i){return new Tt(3303,!1)}function bre(i,o){return new Tt(3400,!1)}function Ire(i){return new Tt(3401,!1)}function Ere(i){return new Tt(3402,!1)}function xre(i,o){return new Tt(3505,!1)}function Gm(i){switch(i.length){case 0:return new Od;case 1:return i[0];default:return new qu(i)}}function JU(i,o,n=new Map,e=new Map){let t=[],r=[],a=-1,s=null;if(o.forEach(c=>{let p=c.get("offset"),g=p==a,C=g&&s||new Map;c.forEach((E,D)=>{let L=D,z=E;if(D!=="offset")switch(L=i.normalizePropertyName(L,t),z){case Sv:z=n.get(D);break;case Rl:z=e.get(D);break;default:z=i.normalizeStyleValue(D,L,z,t);break}C.set(L,z)}),g||r.push(C),s=C,a=p}),t.length)throw mke(t);return r}function IP(i,o,n,e){switch(o){case"start":i.onStart(()=>e(n&&ZU(n,"start",i)));break;case"done":i.onDone(()=>e(n&&ZU(n,"done",i)));break;case"destroy":i.onDestroy(()=>e(n&&ZU(n,"destroy",i)));break}}function ZU(i,o,n){let e=n.totalTime,t=!!n.disabled,r=EP(i.element,i.triggerName,i.fromState,i.toState,o||i.phaseName,e??i.totalTime,t),a=i._data;return a!=null&&(r._data=a),r}function EP(i,o,n,e,t="",r=0,a){return{element:i,triggerName:o,fromState:n,toState:e,phaseName:t,totalTime:r,disabled:!!a}}function Os(i,o,n){let e=i.get(o);return e||i.set(o,e=n),e}function ej(i){let o=i.indexOf(":"),n=i.substring(1,o),e=i.slice(o+1);return[n,e]}var pke=typeof document>"u"?null:document.documentElement;function xP(i){let o=i.parentNode||i.host||null;return o===pke?null:o}function gke(i){return i.substring(1,6)=="ebkit"}var Yu=null,ere=!1;function Tre(i){Yu||(Yu=uke()||{},ere=Yu.style?"WebkitAppearance"in Yu.style:!1);let o=!0;return Yu.style&&!gke(i)&&(o=i in Yu.style,!o&&ere&&(o="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Yu.style)),o}function uke(){return typeof document<"u"?document.body:null}function tj(i,o){for(;o;){if(o===i)return!0;o=xP(o)}return!1}function nj(i,o,n){if(n)return Array.from(i.querySelectorAll(o));let e=i.querySelector(o);return e?[e]:[]}var hke=1e3,ij="{{",fke="}}",oj="ng-enter",TP="ng-leave",BS="ng-trigger",VS=".ng-trigger",rj="ng-animating",DP=".ng-animating";function Pd(i){if(typeof i=="number")return i;let o=i.match(/^(-?[\.\d]+)(m?s)/);return!o||o.length<2?0:XU(parseFloat(o[1]),o[2])}function XU(i,o){switch(o){case"s":return i*hke;default:return i}}function US(i,o,n){return i.hasOwnProperty("duration")?i:vke(i,o,n)}function vke(i,o,n){let e=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,t,r=0,a="";if(typeof i=="string"){let s=i.match(e);if(s===null)return o.push(Joe(i)),{duration:0,delay:0,easing:""};t=XU(parseFloat(s[1]),s[2]);let c=s[3];c!=null&&(r=XU(parseFloat(c),s[4]));let p=s[5];p&&(a=p)}else t=i;if(!n){let s=!1,c=o.length;t<0&&(o.push(ake()),s=!0),r<0&&(o.push(ske()),s=!0),s&&o.splice(c,0,Joe(i))}return{duration:t,delay:r,easing:a}}function Dre(i){return i.length?i[0]instanceof Map?i:i.map(o=>new Map(Object.entries(o))):[]}function wc(i,o,n){o.forEach((e,t)=>{let r=wP(t);n&&!n.has(t)&&n.set(t,i.style[r]),i.style[r]=e})}function qp(i,o){o.forEach((n,e)=>{let t=wP(e);i.style[t]=""})}function bv(i){return Array.isArray(i)?i.length==1?i[0]:Qoe(i):i}function wre(i,o,n){let e=o.params||{},t=aj(i);t.length&&t.forEach(r=>{e.hasOwnProperty(r)||n.push(lke(r))})}var QU=new RegExp(`${ij}\\s*(.+?)\\s*${fke}`,"g");function aj(i){let o=[];if(typeof i=="string"){let n;for(;n=QU.exec(i);)o.push(n[1]);QU.lastIndex=0}return o}function Iv(i,o,n){let e=`${i}`,t=e.replace(QU,(r,a)=>{let s=o[a];return s==null&&(n.push(cke(a)),s=""),s.toString()});return t==e?i:t}var Cke=/-+([a-z0-9])/g;function wP(i){return i.replace(Cke,(...o)=>o[1].toUpperCase())}function Ore(i,o){return i===0||o===0}function Are(i,o,n){if(n.size&&o.length){let e=o[0],t=[];if(n.forEach((r,a)=>{e.has(a)||t.push(a),e.set(a,r)}),t.length)for(let r=1;r<o.length;r++){let a=o[r];t.forEach(s=>a.set(s,OP(i,s)))}}return o}function As(i,o,n){switch(o.type){case Hn.Trigger:return i.visitTrigger(o,n);case Hn.State:return i.visitState(o,n);case Hn.Transition:return i.visitTransition(o,n);case Hn.Sequence:return i.visitSequence(o,n);case Hn.Group:return i.visitGroup(o,n);case Hn.Animate:return i.visitAnimate(o,n);case Hn.Keyframes:return i.visitKeyframes(o,n);case Hn.Style:return i.visitStyle(o,n);case Hn.Reference:return i.visitReference(o,n);case Hn.AnimateChild:return i.visitAnimateChild(o,n);case Hn.AnimateRef:return i.visitAnimateRef(o,n);case Hn.Query:return i.visitQuery(o,n);case Hn.Stagger:return i.visitStagger(o,n);default:throw dke(o.type)}}function OP(i,o){return window.getComputedStyle(i)[o]}var Ij=(()=>{class i{validateStyleProperty(n){return Tre(n)}containsElement(n,e){return tj(n,e)}getParentElement(n){return xP(n)}query(n,e,t){return nj(n,e,t)}computeStyle(n,e,t){return t||""}animate(n,e,t,r,a,s=[],c){return new Od(t,r)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac})}return i})(),Zu=class{static NOOP=new Ij},Xu=class{};var _ke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),RP=class extends Xu{normalizePropertyName(o,n){return wP(o)}normalizeStyleValue(o,n,e,t){let r="",a=e.toString().trim();if(_ke.has(n)&&e!==0&&e!=="0")if(typeof e=="number")r="px";else{let s=e.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&t.push(tre(o,e))}return a+r}};var NP="*";function yke(i,o){let n=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(e=>Ske(e,n,o)):n.push(i),n}function Ske(i,o,n){if(i[0]==":"){let c=bke(i,n);if(typeof c=="function"){o.push(c);return}i=c}let e=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(e==null||e.length<4)return n.push(gre(i)),o;let t=e[1],r=e[2],a=e[3];o.push(Pre(t,a));let s=t==NP&&a==NP;r[0]=="<"&&!s&&o.push(Pre(a,t))}function bke(i,o){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,e)=>parseFloat(e)>parseFloat(n);case":decrement":return(n,e)=>parseFloat(e)<parseFloat(n);default:return o.push(ure(i)),"* => *"}}var AP=new Set(["true","1"]),PP=new Set(["false","0"]);function Pre(i,o){let n=AP.has(i)||PP.has(i),e=AP.has(o)||PP.has(o);return(t,r)=>{let a=i==NP||i==t,s=o==NP||o==r;return!a&&n&&typeof t=="boolean"&&(a=t?AP.has(i):PP.has(i)),!s&&e&&typeof r=="boolean"&&(s=r?AP.has(o):PP.has(o)),a&&s}}var jre=":self",Ike=new RegExp(`s*${jre}s*,?`,"g");function $re(i,o,n,e){return new pj(i).build(o,n,e)}var Mre="",pj=class{_driver;constructor(o){this._driver=o}build(o,n,e){let t=new gj(n);return this._resetContextStyleTimingState(t),As(this,bv(o),t)}_resetContextStyleTimingState(o){o.currentQuerySelector=Mre,o.collectedStyles=new Map,o.collectedStyles.set(Mre,new Map),o.currentTime=0}visitTrigger(o,n){let e=n.queryCount=0,t=n.depCount=0,r=[],a=[];return o.name.charAt(0)=="@"&&n.errors.push(nre()),o.definitions.forEach(s=>{if(this._resetContextStyleTimingState(n),s.type==Hn.State){let c=s,p=c.name;p.toString().split(/\s*,\s*/).forEach(g=>{c.name=g,r.push(this.visitState(c,n))}),c.name=p}else if(s.type==Hn.Transition){let c=this.visitTransition(s,n);e+=c.queryCount,t+=c.depCount,a.push(c)}else n.errors.push(ire())}),{type:Hn.Trigger,name:o.name,states:r,transitions:a,queryCount:e,depCount:t,options:null}}visitState(o,n){let e=this.visitStyle(o.styles,n),t=o.options&&o.options.params||null;if(e.containsDynamicStyles){let r=new Set,a=t||{};e.styles.forEach(s=>{s instanceof Map&&s.forEach(c=>{aj(c).forEach(p=>{a.hasOwnProperty(p)||r.add(p)})})}),r.size&&n.errors.push(ore(o.name,[...r.values()]))}return{type:Hn.State,name:o.name,style:e,options:t?{params:t}:null}}visitTransition(o,n){n.queryCount=0,n.depCount=0;let e=As(this,bv(o.animation),n),t=yke(o.expr,n.errors);return{type:Hn.Transition,matchers:t,animation:e,queryCount:n.queryCount,depCount:n.depCount,options:Ku(o.options)}}visitSequence(o,n){return{type:Hn.Sequence,steps:o.steps.map(e=>As(this,e,n)),options:Ku(o.options)}}visitGroup(o,n){let e=n.currentTime,t=0,r=o.steps.map(a=>{n.currentTime=e;let s=As(this,a,n);return t=Math.max(t,n.currentTime),s});return n.currentTime=t,{type:Hn.Group,steps:r,options:Ku(o.options)}}visitAnimate(o,n){let e=Dke(o.timings,n.errors);n.currentAnimateTimings=e;let t,r=o.styles?o.styles:Ad({});if(r.type==Hn.Keyframes)t=this.visitKeyframes(r,n);else{let a=o.styles,s=!1;if(!a){s=!0;let p={};e.easing&&(p.easing=e.easing),a=Ad(p)}n.currentTime+=e.duration+e.delay;let c=this.visitStyle(a,n);c.isEmptyStep=s,t=c}return n.currentAnimateTimings=null,{type:Hn.Animate,timings:e,style:t,options:null}}visitStyle(o,n){let e=this._makeStyleAst(o,n);return this._validateStyleAst(e,n),e}_makeStyleAst(o,n){let e=[],t=Array.isArray(o.styles)?o.styles:[o.styles];for(let s of t)typeof s=="string"?s===Rl?e.push(s):n.errors.push(rre(s)):e.push(new Map(Object.entries(s)));let r=!1,a=null;return e.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!r)){for(let c of s.values())if(c.toString().indexOf(ij)>=0){r=!0;break}}}),{type:Hn.Style,styles:e,easing:a,offset:o.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(o,n){let e=n.currentAnimateTimings,t=n.currentTime,r=n.currentTime;e&&r>0&&(r-=e.duration+e.delay),o.styles.forEach(a=>{typeof a!="string"&&a.forEach((s,c)=>{let p=n.collectedStyles.get(n.currentQuerySelector),g=p.get(c),C=!0;g&&(r!=t&&r>=g.startTime&&t<=g.endTime&&(n.errors.push(are(c,g.startTime,g.endTime,r,t)),C=!1),r=g.startTime),C&&p.set(c,{startTime:r,endTime:t}),n.options&&wre(s,n.options,n.errors)})})}visitKeyframes(o,n){let e={type:Hn.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(sre()),e;let t=1,r=0,a=[],s=!1,c=!1,p=0,g=o.steps.map(ee=>{let me=this._makeStyleAst(ee,n),Ce=me.offset!=null?me.offset:Tke(me.styles),Ae=0;return Ce!=null&&(r++,Ae=me.offset=Ce),c=c||Ae<0||Ae>1,s=s||Ae<p,p=Ae,a.push(Ae),me});c&&n.errors.push(lre()),s&&n.errors.push(cre());let C=o.steps.length,E=0;r>0&&r<C?n.errors.push(dre()):r==0&&(E=t/(C-1));let D=C-1,L=n.currentTime,z=n.currentAnimateTimings,W=z.duration;return g.forEach((ee,me)=>{let Ce=E>0?me==D?1:E*me:a[me],Ae=Ce*W;n.currentTime=L+z.delay+Ae,z.duration=Ae,this._validateStyleAst(ee,n),ee.offset=Ce,e.styles.push(ee)}),e}visitReference(o,n){return{type:Hn.Reference,animation:As(this,bv(o.animation),n),options:Ku(o.options)}}visitAnimateChild(o,n){return n.depCount++,{type:Hn.AnimateChild,options:Ku(o.options)}}visitAnimateRef(o,n){return{type:Hn.AnimateRef,animation:this.visitReference(o.animation,n),options:Ku(o.options)}}visitQuery(o,n){let e=n.currentQuerySelector,t=o.options||{};n.queryCount++,n.currentQuery=o;let[r,a]=Eke(o.selector);n.currentQuerySelector=e.length?e+" "+r:r,Os(n.collectedStyles,n.currentQuerySelector,new Map);let s=As(this,bv(o.animation),n);return n.currentQuery=null,n.currentQuerySelector=e,{type:Hn.Query,selector:r,limit:t.limit||0,optional:!!t.optional,includeSelf:a,animation:s,originalSelector:o.selector,options:Ku(o.options)}}visitStagger(o,n){n.currentQuery||n.errors.push(mre());let e=o.timings==="full"?{duration:0,delay:0,easing:"full"}:US(o.timings,n.errors,!0);return{type:Hn.Stagger,animation:As(this,bv(o.animation),n),timings:e,options:null}}};function Eke(i){let o=!!i.split(/\s*,\s*/).find(n=>n==jre);return o&&(i=i.replace(Ike,"")),i=i.replace(/@\*/g,VS).replace(/@\w+/g,n=>VS+"-"+n.slice(1)).replace(/:animating/g,DP),[i,o]}function xke(i){return i?I({},i):null}var gj=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(o){this.errors=o}};function Tke(i){if(typeof i=="string")return null;let o=null;if(Array.isArray(i))i.forEach(n=>{if(n instanceof Map&&n.has("offset")){let e=n;o=parseFloat(e.get("offset")),e.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let n=i;o=parseFloat(n.get("offset")),n.delete("offset")}return o}function Dke(i,o){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let r=US(i,o).duration;return sj(r,0,"")}let n=i;if(n.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=sj(0,0,"");return r.dynamic=!0,r.strValue=n,r}let t=US(n,o);return sj(t.duration,t.delay,t.easing)}function Ku(i){return i?(i=I({},i),i.params&&(i.params=xke(i.params))):i={},i}function sj(i,o,n){return{duration:i,delay:o,easing:n}}function Ej(i,o,n,e,t,r,a=null,s=!1){return{type:1,element:i,keyframes:o,preStyleProps:n,postStyleProps:e,duration:t,delay:r,totalTime:t+r,easing:a,subTimeline:s}}var $S=class{_map=new Map;get(o){return this._map.get(o)||[]}append(o,n){let e=this._map.get(o);e||this._map.set(o,e=[]),e.push(...n)}has(o){return this._map.has(o)}clear(){this._map.clear()}},wke=1,Oke=":enter",Ake=new RegExp(Oke,"g"),Pke=":leave",Mke=new RegExp(Pke,"g");function Hre(i,o,n,e,t,r=new Map,a=new Map,s,c,p=[]){return new uj().buildKeyframes(i,o,n,e,t,r,a,s,c,p)}var uj=class{buildKeyframes(o,n,e,t,r,a,s,c,p,g=[]){p=p||new $S;let C=new hj(o,n,p,t,r,g,[]);C.options=c;let E=c.delay?Pd(c.delay):0;C.currentTimeline.delayNextStep(E),C.currentTimeline.setStyles([a],null,C.errors,c),As(this,e,C);let D=C.timelines.filter(L=>L.containsAnimation());if(D.length&&s.size){let L;for(let z=D.length-1;z>=0;z--){let W=D[z];if(W.element===n){L=W;break}}L&&!L.allowOnlyTimelineStyles()&&L.setStyles([s],null,C.errors,c)}return D.length?D.map(L=>L.buildKeyframes()):[Ej(n,[],[],[],0,E,"",!1)]}visitTrigger(o,n){}visitState(o,n){}visitTransition(o,n){}visitAnimateChild(o,n){let e=n.subInstructions.get(n.element);if(e){let t=n.createSubContext(o.options),r=n.currentTimeline.currentTime,a=this._visitSubInstructions(e,t,t.options);r!=a&&n.transformIntoNewTimeline(a)}n.previousNode=o}visitAnimateRef(o,n){let e=n.createSubContext(o.options);e.transformIntoNewTimeline(),this._applyAnimationRefDelays([o.options,o.animation.options],n,e),this.visitReference(o.animation,e),n.transformIntoNewTimeline(e.currentTimeline.currentTime),n.previousNode=o}_applyAnimationRefDelays(o,n,e){for(let t of o){let r=t?.delay;if(r){let a=typeof r=="number"?r:Pd(Iv(r,t?.params??{},n.errors));e.delayNextStep(a)}}}_visitSubInstructions(o,n,e){let r=n.currentTimeline.currentTime,a=e.duration!=null?Pd(e.duration):null,s=e.delay!=null?Pd(e.delay):null;return a!==0&&o.forEach(c=>{let p=n.appendInstructionToTimeline(c,a,s);r=Math.max(r,p.duration+p.delay)}),r}visitReference(o,n){n.updateOptions(o.options,!0),As(this,o.animation,n),n.previousNode=o}visitSequence(o,n){let e=n.subContextCount,t=n,r=o.options;if(r&&(r.params||r.delay)&&(t=n.createSubContext(r),t.transformIntoNewTimeline(),r.delay!=null)){t.previousNode.type==Hn.Style&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=FP);let a=Pd(r.delay);t.delayNextStep(a)}o.steps.length&&(o.steps.forEach(a=>As(this,a,t)),t.currentTimeline.applyStylesToKeyframe(),t.subContextCount>e&&t.transformIntoNewTimeline()),n.previousNode=o}visitGroup(o,n){let e=[],t=n.currentTimeline.currentTime,r=o.options&&o.options.delay?Pd(o.options.delay):0;o.steps.forEach(a=>{let s=n.createSubContext(o.options);r&&s.delayNextStep(r),As(this,a,s),t=Math.max(t,s.currentTimeline.currentTime),e.push(s.currentTimeline)}),e.forEach(a=>n.currentTimeline.mergeTimelineCollectedStyles(a)),n.transformIntoNewTimeline(t),n.previousNode=o}_visitTiming(o,n){if(o.dynamic){let e=o.strValue,t=n.params?Iv(e,n.params,n.errors):e;return US(t,n.errors)}else return{duration:o.duration,delay:o.delay,easing:o.easing}}visitAnimate(o,n){let e=n.currentAnimateTimings=this._visitTiming(o.timings,n),t=n.currentTimeline;e.delay&&(n.incrementTime(e.delay),t.snapshotCurrentStyles());let r=o.style;r.type==Hn.Keyframes?this.visitKeyframes(r,n):(n.incrementTime(e.duration),this.visitStyle(r,n),t.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=o}visitStyle(o,n){let e=n.currentTimeline,t=n.currentAnimateTimings;!t&&e.hasCurrentStyleProperties()&&e.forwardFrame();let r=t&&t.easing||o.easing;o.isEmptyStep?e.applyEmptyStep(r):e.setStyles(o.styles,r,n.errors,n.options),n.previousNode=o}visitKeyframes(o,n){let e=n.currentAnimateTimings,t=n.currentTimeline.duration,r=e.duration,s=n.createSubContext().currentTimeline;s.easing=e.easing,o.styles.forEach(c=>{let p=c.offset||0;s.forwardTime(p*r),s.setStyles(c.styles,c.easing,n.errors,n.options),s.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(s),n.transformIntoNewTimeline(t+r),n.previousNode=o}visitQuery(o,n){let e=n.currentTimeline.currentTime,t=o.options||{},r=t.delay?Pd(t.delay):0;r&&(n.previousNode.type===Hn.Style||e==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=FP);let a=e,s=n.invokeQuery(o.selector,o.originalSelector,o.limit,o.includeSelf,!!t.optional,n.errors);n.currentQueryTotal=s.length;let c=null;s.forEach((p,g)=>{n.currentQueryIndex=g;let C=n.createSubContext(o.options,p);r&&C.delayNextStep(r),p===n.element&&(c=C.currentTimeline),As(this,o.animation,C),C.currentTimeline.applyStylesToKeyframe();let E=C.currentTimeline.currentTime;a=Math.max(a,E)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(a),c&&(n.currentTimeline.mergeTimelineCollectedStyles(c),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=o}visitStagger(o,n){let e=n.parentContext,t=n.currentTimeline,r=o.timings,a=Math.abs(r.duration),s=a*(n.currentQueryTotal-1),c=a*n.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":c=s-c;break;case"full":c=e.currentStaggerTime;break}let g=n.currentTimeline;c&&g.delayNextStep(c);let C=g.currentTime;As(this,o.animation,n),n.previousNode=o,e.currentStaggerTime=t.currentTime-C+(t.startTime-e.currentTimeline.startTime)}},FP={},hj=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=FP;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(o,n,e,t,r,a,s,c){this._driver=o,this.element=n,this.subInstructions=e,this._enterClassName=t,this._leaveClassName=r,this.errors=a,this.timelines=s,this.currentTimeline=c||new LP(this._driver,n,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(o,n){if(!o)return;let e=o,t=this.options;e.duration!=null&&(t.duration=Pd(e.duration)),e.delay!=null&&(t.delay=Pd(e.delay));let r=e.params;if(r){let a=t.params;a||(a=this.options.params={}),Object.keys(r).forEach(s=>{(!n||!a.hasOwnProperty(s))&&(a[s]=Iv(r[s],a,this.errors))})}}_copyOptions(){let o={};if(this.options){let n=this.options.params;if(n){let e=o.params={};Object.keys(n).forEach(t=>{e[t]=n[t]})}}return o}createSubContext(o=null,n,e){let t=n||this.element,r=new i(this._driver,t,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(t,e||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(o),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(o){return this.previousNode=FP,this.currentTimeline=this.currentTimeline.fork(this.element,o),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(o,n,e){let t={duration:n??o.duration,delay:this.currentTimeline.currentTime+(e??0)+o.delay,easing:""},r=new fj(this._driver,o.element,o.keyframes,o.preStyleProps,o.postStyleProps,t,o.stretchStartingKeyframe);return this.timelines.push(r),t}incrementTime(o){this.currentTimeline.forwardTime(this.currentTimeline.duration+o)}delayNextStep(o){o>0&&this.currentTimeline.delayNextStep(o)}invokeQuery(o,n,e,t,r,a){let s=[];if(t&&s.push(this.element),o.length>0){o=o.replace(Ake,"."+this._enterClassName),o=o.replace(Mke,"."+this._leaveClassName);let c=e!=1,p=this._driver.query(this.element,o,c);e!==0&&(p=e<0?p.slice(p.length+e,p.length):p.slice(0,e)),s.push(...p)}return!r&&s.length==0&&a.push(pre(n)),s}},LP=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(o,n,e,t){this._driver=o,this.element=n,this.startTime=e,this._elementTimelineStylesLookup=t,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(o){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+o),n&&this.snapshotCurrentStyles()):this.startTime+=o}fork(o,n){return this.applyStylesToKeyframe(),new i(this._driver,o,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=wke,this._loadKeyframe()}forwardTime(o){this.applyStylesToKeyframe(),this.duration=o,this._loadKeyframe()}_updateStyle(o,n){this._localTimelineStyles.set(o,n),this._globalTimelineStyles.set(o,n),this._styleSummary.set(o,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(o){o&&this._previousKeyframe.set("easing",o);for(let[n,e]of this._globalTimelineStyles)this._backFill.set(n,e||Rl),this._currentKeyframe.set(n,Rl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(o,n,e,t){n&&this._previousKeyframe.set("easing",n);let r=t&&t.params||{},a=kke(o,this._globalTimelineStyles);for(let[s,c]of a){let p=Iv(c,r,e);this._pendingStyles.set(s,p),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??Rl),this._updateStyle(s,p)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((o,n)=>{this._currentKeyframe.set(n,o)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((o,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,o)}))}snapshotCurrentStyles(){for(let[o,n]of this._localTimelineStyles)this._pendingStyles.set(o,n),this._updateStyle(o,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let o=[];for(let n in this._currentKeyframe)o.push(n);return o}mergeTimelineCollectedStyles(o){o._styleSummary.forEach((n,e)=>{let t=this._styleSummary.get(e);(!t||n.time>t.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let o=new Set,n=new Set,e=this._keyframes.size===1&&this.duration===0,t=[];this._keyframes.forEach((s,c)=>{let p=new Map([...this._backFill,...s]);p.forEach((g,C)=>{g===Sv?o.add(C):g===Rl&&n.add(C)}),e||p.set("offset",c/this.duration),t.push(p)});let r=[...o.values()],a=[...n.values()];if(e){let s=t[0],c=new Map(s);s.set("offset",0),c.set("offset",1),t=[s,c]}return Ej(this.element,t,r,a,this.duration,this.startTime,this.easing,!1)}},fj=class extends LP{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(o,n,e,t,r,a,s=!1){super(o,n,a.delay),this.keyframes=e,this.preStyleProps=t,this.postStyleProps=r,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let o=this.keyframes,{delay:n,duration:e,easing:t}=this.timings;if(this._stretchStartingKeyframe&&n){let r=[],a=e+n,s=n/a,c=new Map(o[0]);c.set("offset",0),r.push(c);let p=new Map(o[0]);p.set("offset",kre(s)),r.push(p);let g=o.length-1;for(let C=1;C<=g;C++){let E=new Map(o[C]),D=E.get("offset"),L=n+D*e;E.set("offset",kre(L/a)),r.push(E)}e=a,n=0,t="",o=r}return Ej(this.element,o,this.preStyleProps,this.postStyleProps,e,n,t,!0)}};function kre(i,o=3){let n=Math.pow(10,o-1);return Math.round(i*n)/n}function kke(i,o){let n=new Map,e;return i.forEach(t=>{if(t==="*"){e??=o.keys();for(let r of e)n.set(r,Rl)}else for(let[r,a]of t)n.set(r,a)}),n}function Rre(i,o,n,e,t,r,a,s,c,p,g,C,E){return{type:0,element:i,triggerName:o,isRemovalTransition:t,fromState:n,fromStyles:r,toState:e,toStyles:a,timelines:s,queriedElements:c,preStyleProps:p,postStyleProps:g,totalTime:C,errors:E}}var lj={},BP=class{_triggerName;ast;_stateStyles;constructor(o,n,e){this._triggerName=o,this.ast=n,this._stateStyles=e}match(o,n,e,t){return Rke(this.ast.matchers,o,n,e,t)}buildStyles(o,n,e){let t=this._stateStyles.get("*");return o!==void 0&&(t=this._stateStyles.get(o?.toString())||t),t?t.buildStyles(n,e):new Map}build(o,n,e,t,r,a,s,c,p,g){let C=[],E=this.ast.options&&this.ast.options.params||lj,D=s&&s.params||lj,L=this.buildStyles(e,D,C),z=c&&c.params||lj,W=this.buildStyles(t,z,C),ee=new Set,me=new Map,Ce=new Map,Ae=t==="void",Ge={params:zre(z,E),delay:this.ast.options?.delay},Ne=g?[]:Hre(o,n,this.ast.animation,r,a,L,W,Ge,p,C),Ie=0;return Ne.forEach(Se=>{Ie=Math.max(Se.duration+Se.delay,Ie)}),C.length?Rre(n,this._triggerName,e,t,Ae,L,W,[],[],me,Ce,Ie,C):(Ne.forEach(Se=>{let we=Se.element,ye=Os(me,we,new Set);Se.preStyleProps.forEach(Oe=>ye.add(Oe));let fe=Os(Ce,we,new Set);Se.postStyleProps.forEach(Oe=>fe.add(Oe)),we!==n&&ee.add(we)}),Rre(n,this._triggerName,e,t,Ae,L,W,Ne,[...ee.values()],me,Ce,Ie))}};function Rke(i,o,n,e,t){return i.some(r=>r(o,n,e,t))}function zre(i,o){let n=I({},o);return Object.entries(i).forEach(([e,t])=>{t!=null&&(n[e]=t)}),n}var vj=class{styles;defaultParams;normalizer;constructor(o,n,e){this.styles=o,this.defaultParams=n,this.normalizer=e}buildStyles(o,n){let e=new Map,t=zre(o,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,s)=>{a&&(a=Iv(a,t,n));let c=this.normalizer.normalizePropertyName(s,n);a=this.normalizer.normalizeStyleValue(s,c,a,n),e.set(s,a)})}),e}};function Nke(i,o,n){return new Cj(i,o,n)}var Cj=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(o,n,e){this.name=o,this.ast=n,this._normalizer=e,n.states.forEach(t=>{let r=t.options&&t.options.params||{};this.states.set(t.name,new vj(t.style,r,e))}),Nre(this.states,"true","1"),Nre(this.states,"false","0"),n.transitions.forEach(t=>{this.transitionFactories.push(new BP(o,t,this.states))}),this.fallbackTransition=Fke(o,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(o,n,e,t){return this.transitionFactories.find(a=>a.match(o,n,e,t))||null}matchStyles(o,n,e){return this.fallbackTransition.buildStyles(o,n,e)}};function Fke(i,o,n){let e=[(a,s)=>!0],t={type:Hn.Sequence,steps:[],options:null},r={type:Hn.Transition,animation:t,matchers:e,options:null,queryCount:0,depCount:0};return new BP(i,r,o)}function Nre(i,o,n){i.has(o)?i.has(n)||i.set(n,i.get(o)):i.has(n)&&i.set(o,i.get(n))}var Lke=new $S,_j=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(o,n,e){this.bodyNode=o,this._driver=n,this._normalizer=e}register(o,n){let e=[],t=[],r=$re(this._driver,n,e,t);if(e.length)throw fre(e);this._animations.set(o,r)}_buildPlayer(o,n,e){let t=o.element,r=JU(this._normalizer,o.keyframes,n,e);return this._driver.animate(t,r,o.duration,o.delay,o.easing,[],!0)}create(o,n,e={}){let t=[],r=this._animations.get(o),a,s=new Map;if(r?(a=Hre(this._driver,n,r,oj,TP,new Map,new Map,e,Lke,t),a.forEach(g=>{let C=Os(s,g.element,new Map);g.postStyleProps.forEach(E=>C.set(E,null))})):(t.push(vre()),a=[]),t.length)throw Cre(t);s.forEach((g,C)=>{g.forEach((E,D)=>{g.set(D,this._driver.computeStyle(C,D,Rl))})});let c=a.map(g=>{let C=s.get(g.element);return this._buildPlayer(g,new Map,C)}),p=Gm(c);return this._playersById.set(o,p),p.onDestroy(()=>this.destroy(o)),this.players.push(p),p}destroy(o){let n=this._getPlayer(o);n.destroy(),this._playersById.delete(o);let e=this.players.indexOf(n);e>=0&&this.players.splice(e,1)}_getPlayer(o){let n=this._playersById.get(o);if(!n)throw _re(o);return n}listen(o,n,e,t){let r=EP(n,"","","");return IP(this._getPlayer(o),e,r,t),()=>{}}command(o,n,e,t){if(e=="register"){this.register(o,t[0]);return}if(e=="create"){let a=t[0]||{};this.create(o,n,a);return}let r=this._getPlayer(o);switch(e){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(t[0]));break;case"destroy":this.destroy(o);break}}},Fre="ng-animate-queued",Bke=".ng-animate-queued",cj="ng-animate-disabled",Vke=".ng-animate-disabled",Uke="ng-star-inserted",jke=".ng-star-inserted",$ke=[],Gre={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hke={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Oc="__ng_removed",HS=class{namespaceId;value;options;get params(){return this.options.params}constructor(o,n=""){this.namespaceId=n;let e=o&&o.hasOwnProperty("value"),t=e?o.value:o;if(this.value=Gke(t),e){let r=o,{value:a}=r,s=U7(r,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(o){let n=o.params;if(n){let e=this.options.params;Object.keys(n).forEach(t=>{e[t]==null&&(e[t]=n[t])})}}},jS="void",dj=new HS(jS),yj=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(o,n,e){this.id=o,this.hostElement=n,this._engine=e,this._hostClassName="ng-tns-"+o,Nl(n,this._hostClassName)}listen(o,n,e,t){if(!this._triggers.has(n))throw yre(e,n);if(e==null||e.length==0)throw Sre(n);if(!Wke(e))throw bre(e,n);let r=Os(this._elementListeners,o,[]),a={name:n,phase:e,callback:t};r.push(a);let s=Os(this._engine.statesByElement,o,new Map);return s.has(n)||(Nl(o,BS),Nl(o,BS+"-"+n),s.set(n,dj)),()=>{this._engine.afterFlush(()=>{let c=r.indexOf(a);c>=0&&r.splice(c,1),this._triggers.has(n)||s.delete(n)})}}register(o,n){return this._triggers.has(o)?!1:(this._triggers.set(o,n),!0)}_getTrigger(o){let n=this._triggers.get(o);if(!n)throw Ire(o);return n}trigger(o,n,e,t=!0){let r=this._getTrigger(n),a=new zS(this.id,n,o),s=this._engine.statesByElement.get(o);s||(Nl(o,BS),Nl(o,BS+"-"+n),this._engine.statesByElement.set(o,s=new Map));let c=s.get(n),p=new HS(e,this.id);if(!(e&&e.hasOwnProperty("value"))&&c&&p.absorbOptions(c.options),s.set(n,p),c||(c=dj),!(p.value===jS)&&c.value===p.value){if(!Kke(c.params,p.params)){let z=[],W=r.matchStyles(c.value,c.params,z),ee=r.matchStyles(p.value,p.params,z);z.length?this._engine.reportError(z):this._engine.afterFlush(()=>{qp(o,W),wc(o,ee)})}return}let E=Os(this._engine.playersByElement,o,[]);E.forEach(z=>{z.namespaceId==this.id&&z.triggerName==n&&z.queued&&z.destroy()});let D=r.matchTransition(c.value,p.value,o,p.params),L=!1;if(!D){if(!t)return;D=r.fallbackTransition,L=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:n,transition:D,fromState:c,toState:p,player:a,isFallbackTransition:L}),L||(Nl(o,Fre),a.onStart(()=>{Ev(o,Fre)})),a.onDone(()=>{let z=this.players.indexOf(a);z>=0&&this.players.splice(z,1);let W=this._engine.playersByElement.get(o);if(W){let ee=W.indexOf(a);ee>=0&&W.splice(ee,1)}}),this.players.push(a),E.push(a),a}deregister(o){this._triggers.delete(o),this._engine.statesByElement.forEach(n=>n.delete(o)),this._elementListeners.forEach((n,e)=>{this._elementListeners.set(e,n.filter(t=>t.name!=o))})}clearElementCache(o){this._engine.statesByElement.delete(o),this._elementListeners.delete(o);let n=this._engine.playersByElement.get(o);n&&(n.forEach(e=>e.destroy()),this._engine.playersByElement.delete(o))}_signalRemovalForInnerTriggers(o,n){let e=this._engine.driver.query(o,VS,!0);e.forEach(t=>{if(t[Oc])return;let r=this._engine.fetchNamespacesByElement(t);r.size?r.forEach(a=>a.triggerLeaveAnimation(t,n,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>e.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(o,n,e,t){let r=this._engine.statesByElement.get(o),a=new Map;if(r){let s=[];if(r.forEach((c,p)=>{if(a.set(p,c.value),this._triggers.has(p)){let g=this.trigger(o,p,jS,t);g&&s.push(g)}}),s.length)return this._engine.markElementAsRemoved(this.id,o,!0,n,a),e&&Gm(s).onDone(()=>this._engine.processLeaveNode(o)),!0}return!1}prepareLeaveAnimationListeners(o){let n=this._elementListeners.get(o),e=this._engine.statesByElement.get(o);if(n&&e){let t=new Set;n.forEach(r=>{let a=r.name;if(t.has(a))return;t.add(a);let c=this._triggers.get(a).fallbackTransition,p=e.get(a)||dj,g=new HS(jS),C=new zS(this.id,a,o);this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:a,transition:c,fromState:p,toState:g,player:C,isFallbackTransition:!0})})}}removeNode(o,n){let e=this._engine;if(o.childElementCount&&this._signalRemovalForInnerTriggers(o,n),this.triggerLeaveAnimation(o,n,!0))return;let t=!1;if(e.totalAnimations){let r=e.players.length?e.playersByQueriedElement.get(o):[];if(r&&r.length)t=!0;else{let a=o;for(;a=a.parentNode;)if(e.statesByElement.get(a)){t=!0;break}}}if(this.prepareLeaveAnimationListeners(o),t)e.markElementAsRemoved(this.id,o,!1,n);else{let r=o[Oc];(!r||r===Gre)&&(e.afterFlush(()=>this.clearElementCache(o)),e.destroyInnerAnimations(o),e._onRemovalComplete(o,n))}}insertNode(o,n){Nl(o,this._hostClassName)}drainQueuedTransitions(o){let n=[];return this._queue.forEach(e=>{let t=e.player;if(t.destroyed)return;let r=e.element,a=this._elementListeners.get(r);a&&a.forEach(s=>{if(s.name==e.triggerName){let c=EP(r,e.triggerName,e.fromState.value,e.toState.value);c._data=o,IP(e.player,s.phase,c,s.callback)}}),t.markedForDestroy?this._engine.afterFlush(()=>{t.destroy()}):n.push(e)}),this._queue=[],n.sort((e,t)=>{let r=e.transition.ast.depCount,a=t.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(e.element,t.element)?1:-1})}destroy(o){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,o)}},Sj=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(o,n)=>{};_onRemovalComplete(o,n){this.onRemovalComplete(o,n)}constructor(o,n,e){this.bodyNode=o,this.driver=n,this._normalizer=e}get queuedPlayers(){let o=[];return this._namespaceList.forEach(n=>{n.players.forEach(e=>{e.queued&&o.push(e)})}),o}createNamespace(o,n){let e=new yj(o,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(e,n):(this.newHostElements.set(n,e),this.collectEnterElement(n)),this._namespaceLookup[o]=e}_balanceNamespaceList(o,n){let e=this._namespaceList,t=this.namespacesByHostElement;if(e.length-1>=0){let a=!1,s=this.driver.getParentElement(n);for(;s;){let c=t.get(s);if(c){let p=e.indexOf(c);e.splice(p+1,0,o),a=!0;break}s=this.driver.getParentElement(s)}a||e.unshift(o)}else e.push(o);return t.set(n,o),o}register(o,n){let e=this._namespaceLookup[o];return e||(e=this.createNamespace(o,n)),e}registerTrigger(o,n,e){let t=this._namespaceLookup[o];t&&t.register(n,e)&&this.totalAnimations++}destroy(o,n){o&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let e=this._fetchNamespace(o);this.namespacesByHostElement.delete(e.hostElement);let t=this._namespaceList.indexOf(e);t>=0&&this._namespaceList.splice(t,1),e.destroy(n),delete this._namespaceLookup[o]}))}_fetchNamespace(o){return this._namespaceLookup[o]}fetchNamespacesByElement(o){let n=new Set,e=this.statesByElement.get(o);if(e){for(let t of e.values())if(t.namespaceId){let r=this._fetchNamespace(t.namespaceId);r&&n.add(r)}}return n}trigger(o,n,e,t){if(MP(n)){let r=this._fetchNamespace(o);if(r)return r.trigger(n,e,t),!0}return!1}insertNode(o,n,e,t){if(!MP(n))return;let r=n[Oc];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(n);a>=0&&this.collectedLeaveElements.splice(a,1)}if(o){let a=this._fetchNamespace(o);a&&a.insertNode(n,e)}t&&this.collectEnterElement(n)}collectEnterElement(o){this.collectedEnterElements.push(o)}markElementAsDisabled(o,n){n?this.disabledNodes.has(o)||(this.disabledNodes.add(o),Nl(o,cj)):this.disabledNodes.has(o)&&(this.disabledNodes.delete(o),Ev(o,cj))}removeNode(o,n,e){if(MP(n)){let t=o?this._fetchNamespace(o):null;t?t.removeNode(n,e):this.markElementAsRemoved(o,n,!1,e);let r=this.namespacesByHostElement.get(n);r&&r.id!==o&&r.removeNode(n,e)}else this._onRemovalComplete(n,e)}markElementAsRemoved(o,n,e,t,r){this.collectedLeaveElements.push(n),n[Oc]={namespaceId:o,setForRemoval:t,hasAnimation:e,removedBeforeQueried:!1,previousTriggersValues:r}}listen(o,n,e,t,r){return MP(n)?this._fetchNamespace(o).listen(n,e,t,r):()=>{}}_buildInstruction(o,n,e,t,r){return o.transition.build(this.driver,o.element,o.fromState.value,o.toState.value,e,t,o.fromState.options,o.toState.options,n,r)}destroyInnerAnimations(o){let n=this.driver.query(o,VS,!0);n.forEach(e=>this.destroyActiveAnimationsForElement(e)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(o,DP,!0),n.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(o){let n=this.playersByElement.get(o);n&&n.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(o){let n=this.playersByQueriedElement.get(o);n&&n.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(o=>{if(this.players.length)return Gm(this.players).onDone(()=>o());o()})}processLeaveNode(o){let n=o[Oc];if(n&&n.setForRemoval){if(o[Oc]=Gre,n.namespaceId){this.destroyInnerAnimations(o);let e=this._fetchNamespace(n.namespaceId);e&&e.clearElementCache(o)}this._onRemovalComplete(o,n.setForRemoval)}o.classList?.contains(cj)&&this.markElementAsDisabled(o,!1),this.driver.query(o,Vke,!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(o=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,t)=>this._balanceNamespaceList(e,t)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let e=0;e<this.collectedEnterElements.length;e++){let t=this.collectedEnterElements[e];Nl(t,Uke)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let e=[];try{n=this._flushAnimations(e,o)}finally{for(let t=0;t<e.length;t++)e[t]()}}else for(let e=0;e<this.collectedLeaveElements.length;e++){let t=this.collectedLeaveElements[e];this.processLeaveNode(t)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){let e=this._whenQuietFns;this._whenQuietFns=[],n.length?Gm(n).onDone(()=>{e.forEach(t=>t())}):e.forEach(t=>t())}}reportError(o){throw Ere(o)}_flushAnimations(o,n){let e=new $S,t=[],r=new Map,a=[],s=new Map,c=new Map,p=new Map,g=new Set;this.disabledNodes.forEach(bt=>{g.add(bt);let Nt=this.driver.query(bt,Bke,!0);for(let Bt=0;Bt<Nt.length;Bt++)g.add(Nt[Bt])});let C=this.bodyNode,E=Array.from(this.statesByElement.keys()),D=Vre(E,this.collectedEnterElements),L=new Map,z=0;D.forEach((bt,Nt)=>{let Bt=oj+z++;L.set(Nt,Bt),bt.forEach(En=>Nl(En,Bt))});let W=[],ee=new Set,me=new Set;for(let bt=0;bt<this.collectedLeaveElements.length;bt++){let Nt=this.collectedLeaveElements[bt],Bt=Nt[Oc];Bt&&Bt.setForRemoval&&(W.push(Nt),ee.add(Nt),Bt.hasAnimation?this.driver.query(Nt,jke,!0).forEach(En=>ee.add(En)):me.add(Nt))}let Ce=new Map,Ae=Vre(E,Array.from(ee));Ae.forEach((bt,Nt)=>{let Bt=TP+z++;Ce.set(Nt,Bt),bt.forEach(En=>Nl(En,Bt))}),o.push(()=>{D.forEach((bt,Nt)=>{let Bt=L.get(Nt);bt.forEach(En=>Ev(En,Bt))}),Ae.forEach((bt,Nt)=>{let Bt=Ce.get(Nt);bt.forEach(En=>Ev(En,Bt))}),W.forEach(bt=>{this.processLeaveNode(bt)})});let Ge=[],Ne=[];for(let bt=this._namespaceList.length-1;bt>=0;bt--)this._namespaceList[bt].drainQueuedTransitions(n).forEach(Bt=>{let En=Bt.player,Qt=Bt.element;if(Ge.push(En),this.collectedEnterElements.length){let bo=Qt[Oc];if(bo&&bo.setForMove){if(bo.previousTriggersValues&&bo.previousTriggersValues.has(Bt.triggerName)){let ul=bo.previousTriggersValues.get(Bt.triggerName),zr=this.statesByElement.get(Bt.element);if(zr&&zr.has(Bt.triggerName)){let hl=zr.get(Bt.triggerName);hl.value=ul,zr.set(Bt.triggerName,hl)}}En.destroy();return}}let Yt=!C||!this.driver.containsElement(C,Qt),Mi=Ce.get(Qt),Jt=L.get(Qt),Qn=this._buildInstruction(Bt,e,Jt,Mi,Yt);if(Qn.errors&&Qn.errors.length){Ne.push(Qn);return}if(Yt){En.onStart(()=>qp(Qt,Qn.fromStyles)),En.onDestroy(()=>wc(Qt,Qn.toStyles)),t.push(En);return}if(Bt.isFallbackTransition){En.onStart(()=>qp(Qt,Qn.fromStyles)),En.onDestroy(()=>wc(Qt,Qn.toStyles)),t.push(En);return}let Gi=[];Qn.timelines.forEach(bo=>{bo.stretchStartingKeyframe=!0,this.disabledNodes.has(bo.element)||Gi.push(bo)}),Qn.timelines=Gi,e.append(Qt,Qn.timelines);let im={instruction:Qn,player:En,element:Qt};a.push(im),Qn.queriedElements.forEach(bo=>Os(s,bo,[]).push(En)),Qn.preStyleProps.forEach((bo,ul)=>{if(bo.size){let zr=c.get(ul);zr||c.set(ul,zr=new Set),bo.forEach((hl,Xl)=>zr.add(Xl))}}),Qn.postStyleProps.forEach((bo,ul)=>{let zr=p.get(ul);zr||p.set(ul,zr=new Set),bo.forEach((hl,Xl)=>zr.add(Xl))})});if(Ne.length){let bt=[];Ne.forEach(Nt=>{bt.push(xre(Nt.triggerName,Nt.errors))}),Ge.forEach(Nt=>Nt.destroy()),this.reportError(bt)}let Ie=new Map,Se=new Map;a.forEach(bt=>{let Nt=bt.element;e.has(Nt)&&(Se.set(Nt,Nt),this._beforeAnimationBuild(bt.player.namespaceId,bt.instruction,Ie))}),t.forEach(bt=>{let Nt=bt.element;this._getPreviousPlayers(Nt,!1,bt.namespaceId,bt.triggerName,null).forEach(En=>{Os(Ie,Nt,[]).push(En),En.destroy()})});let we=W.filter(bt=>Ure(bt,c,p)),ye=new Map;Bre(ye,this.driver,me,p,Rl).forEach(bt=>{Ure(bt,c,p)&&we.push(bt)});let Oe=new Map;D.forEach((bt,Nt)=>{Bre(Oe,this.driver,new Set(bt),c,Sv)}),we.forEach(bt=>{let Nt=ye.get(bt),Bt=Oe.get(bt);ye.set(bt,new Map([...Nt?.entries()??[],...Bt?.entries()??[]]))});let Fe=[],yt=[],An={};a.forEach(bt=>{let{element:Nt,player:Bt,instruction:En}=bt;if(e.has(Nt)){if(g.has(Nt)){Bt.onDestroy(()=>wc(Nt,En.toStyles)),Bt.disabled=!0,Bt.overrideTotalTime(En.totalTime),t.push(Bt);return}let Qt=An;if(Se.size>1){let Mi=Nt,Jt=[];for(;Mi=Mi.parentNode;){let Qn=Se.get(Mi);if(Qn){Qt=Qn;break}Jt.push(Mi)}Jt.forEach(Qn=>Se.set(Qn,Qt))}let Yt=this._buildAnimation(Bt.namespaceId,En,Ie,r,Oe,ye);if(Bt.setRealPlayer(Yt),Qt===An)Fe.push(Bt);else{let Mi=this.playersByElement.get(Qt);Mi&&Mi.length&&(Bt.parentPlayer=Gm(Mi)),t.push(Bt)}}else qp(Nt,En.fromStyles),Bt.onDestroy(()=>wc(Nt,En.toStyles)),yt.push(Bt),g.has(Nt)&&t.push(Bt)}),yt.forEach(bt=>{let Nt=r.get(bt.element);if(Nt&&Nt.length){let Bt=Gm(Nt);bt.setRealPlayer(Bt)}}),t.forEach(bt=>{bt.parentPlayer?bt.syncPlayerEvents(bt.parentPlayer):bt.destroy()});for(let bt=0;bt<W.length;bt++){let Nt=W[bt],Bt=Nt[Oc];if(Ev(Nt,TP),Bt&&Bt.hasAnimation)continue;let En=[];if(s.size){let Yt=s.get(Nt);Yt&&Yt.length&&En.push(...Yt);let Mi=this.driver.query(Nt,DP,!0);for(let Jt=0;Jt<Mi.length;Jt++){let Qn=s.get(Mi[Jt]);Qn&&Qn.length&&En.push(...Qn)}}let Qt=En.filter(Yt=>!Yt.destroyed);Qt.length?qke(this,Nt,Qt):this.processLeaveNode(Nt)}return W.length=0,Fe.forEach(bt=>{this.players.push(bt),bt.onDone(()=>{bt.destroy();let Nt=this.players.indexOf(bt);this.players.splice(Nt,1)}),bt.play()}),Fe}afterFlush(o){this._flushFns.push(o)}afterFlushAnimationsDone(o){this._whenQuietFns.push(o)}_getPreviousPlayers(o,n,e,t,r){let a=[];if(n){let s=this.playersByQueriedElement.get(o);s&&(a=s)}else{let s=this.playersByElement.get(o);if(s){let c=!r||r==jS;s.forEach(p=>{p.queued||!c&&p.triggerName!=t||a.push(p)})}}return(e||t)&&(a=a.filter(s=>!(e&&e!=s.namespaceId||t&&t!=s.triggerName))),a}_beforeAnimationBuild(o,n,e){let t=n.triggerName,r=n.element,a=n.isRemovalTransition?void 0:o,s=n.isRemovalTransition?void 0:t;for(let c of n.timelines){let p=c.element,g=p!==r,C=Os(e,p,[]);this._getPreviousPlayers(p,g,a,s,n.toState).forEach(D=>{let L=D.getRealPlayer();L.beforeDestroy&&L.beforeDestroy(),D.destroy(),C.push(D)})}qp(r,n.fromStyles)}_buildAnimation(o,n,e,t,r,a){let s=n.triggerName,c=n.element,p=[],g=new Set,C=new Set,E=n.timelines.map(L=>{let z=L.element;g.add(z);let W=z[Oc];if(W&&W.removedBeforeQueried)return new Od(L.duration,L.delay);let ee=z!==c,me=Yke((e.get(z)||$ke).map(Ie=>Ie.getRealPlayer())).filter(Ie=>{let Se=Ie;return Se.element?Se.element===z:!1}),Ce=r.get(z),Ae=a.get(z),Ge=JU(this._normalizer,L.keyframes,Ce,Ae),Ne=this._buildPlayer(L,Ge,me);if(L.subTimeline&&t&&C.add(z),ee){let Ie=new zS(o,s,z);Ie.setRealPlayer(Ne),p.push(Ie)}return Ne});p.forEach(L=>{Os(this.playersByQueriedElement,L.element,[]).push(L),L.onDone(()=>zke(this.playersByQueriedElement,L.element,L))}),g.forEach(L=>Nl(L,rj));let D=Gm(E);return D.onDestroy(()=>{g.forEach(L=>Ev(L,rj)),wc(c,n.toStyles)}),C.forEach(L=>{Os(t,L,[]).push(D)}),D}_buildPlayer(o,n,e){return n.length>0?this.driver.animate(o.element,n,o.duration,o.delay,o.easing,e):new Od(o.duration,o.delay)}},zS=class{namespaceId;triggerName;element;_player=new Od;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(o,n,e){this.namespaceId=o,this.triggerName=n,this.element=e}setRealPlayer(o){this._containsRealPlayer||(this._player=o,this._queuedCallbacks.forEach((n,e)=>{n.forEach(t=>IP(o,e,void 0,t))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(o.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(o){this.totalTime=o}syncPlayerEvents(o){let n=this._player;n.triggerCallback&&o.onStart(()=>n.triggerCallback("start")),o.onDone(()=>this.finish()),o.onDestroy(()=>this.destroy())}_queueEvent(o,n){Os(this._queuedCallbacks,o,[]).push(n)}onDone(o){this.queued&&this._queueEvent("done",o),this._player.onDone(o)}onStart(o){this.queued&&this._queueEvent("start",o),this._player.onStart(o)}onDestroy(o){this.queued&&this._queueEvent("destroy",o),this._player.onDestroy(o)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(o){this.queued||this._player.setPosition(o)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(o){let n=this._player;n.triggerCallback&&n.triggerCallback(o)}};function zke(i,o,n){let e=i.get(o);if(e){if(e.length){let t=e.indexOf(n);e.splice(t,1)}e.length==0&&i.delete(o)}return e}function Gke(i){return i??null}function MP(i){return i&&i.nodeType===1}function Wke(i){return i=="start"||i=="done"}function Lre(i,o){let n=i.style.display;return i.style.display=o??"none",n}function Bre(i,o,n,e,t){let r=[];n.forEach(c=>r.push(Lre(c)));let a=[];e.forEach((c,p)=>{let g=new Map;c.forEach(C=>{let E=o.computeStyle(p,C,t);g.set(C,E),(!E||E.length==0)&&(p[Oc]=Hke,a.push(p))}),i.set(p,g)});let s=0;return n.forEach(c=>Lre(c,r[s++])),a}function Vre(i,o){let n=new Map;if(i.forEach(s=>n.set(s,[])),o.length==0)return n;let e=1,t=new Set(o),r=new Map;function a(s){if(!s)return e;let c=r.get(s);if(c)return c;let p=s.parentNode;return n.has(p)?c=p:t.has(p)?c=e:c=a(p),r.set(s,c),c}return o.forEach(s=>{let c=a(s);c!==e&&n.get(c).push(s)}),n}function Nl(i,o){i.classList?.add(o)}function Ev(i,o){i.classList?.remove(o)}function qke(i,o,n){Gm(n).onDone(()=>i.processLeaveNode(o))}function Yke(i){let o=[];return Wre(i,o),o}function Wre(i,o){for(let n=0;n<i.length;n++){let e=i[n];e instanceof qu?Wre(e.players,o):o.push(e)}}function Kke(i,o){let n=Object.keys(i),e=Object.keys(o);if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(!o.hasOwnProperty(r)||i[r]!==o[r])return!1}return!0}function Ure(i,o,n){let e=n.get(i);if(!e)return!1;let t=o.get(i);return t?e.forEach(r=>t.add(r)):o.set(i,e),n.delete(i),!0}var xv=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(o,n)=>{};constructor(o,n,e){this._driver=n,this._normalizer=e,this._transitionEngine=new Sj(o.body,n,e),this._timelineEngine=new _j(o.body,n,e),this._transitionEngine.onRemovalComplete=(t,r)=>this.onRemovalComplete(t,r)}registerTrigger(o,n,e,t,r){let a=o+"-"+t,s=this._triggerCache[a];if(!s){let c=[],p=[],g=$re(this._driver,r,c,p);if(c.length)throw hre(t,c);s=Nke(t,g,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(n,t,s)}register(o,n){this._transitionEngine.register(o,n)}destroy(o,n){this._transitionEngine.destroy(o,n)}onInsert(o,n,e,t){this._transitionEngine.insertNode(o,n,e,t)}onRemove(o,n,e){this._transitionEngine.removeNode(o,n,e)}disableAnimations(o,n){this._transitionEngine.markElementAsDisabled(o,n)}process(o,n,e,t){if(e.charAt(0)=="@"){let[r,a]=ej(e),s=t;this._timelineEngine.command(r,n,a,s)}else this._transitionEngine.trigger(o,n,e,t)}listen(o,n,e,t,r){if(e.charAt(0)=="@"){let[a,s]=ej(e);return this._timelineEngine.listen(a,n,s,r)}return this._transitionEngine.listen(o,n,e,t,r)}flush(o=-1){this._transitionEngine.flush(o)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(o){this._transitionEngine.afterFlushAnimationsDone(o)}};function Zke(i,o){let n=null,e=null;return Array.isArray(o)&&o.length?(n=mj(o[0]),o.length>1&&(e=mj(o[o.length-1]))):o instanceof Map&&(n=mj(o)),n||e?new Xke(i,n,e):null}var Xke=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(n,e,t){this._element=n,this._startStyles=e,this._endStyles=t;let r=i.initialStylesByElement.get(n);r||i.initialStylesByElement.set(n,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&wc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(wc(this._element,this._initialStyles),this._endStyles&&(wc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(qp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(qp(this._element,this._endStyles),this._endStyles=null),wc(this._element,this._initialStyles),this._state=3)}}return i})();function mj(i){let o=null;return i.forEach((n,e)=>{Qke(e)&&(o=o||new Map,o.set(e,n))}),o}function Qke(i){return i==="display"||i==="position"}var VP=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(o,n,e,t){this.element=o,this.keyframes=n,this.options=e,this._specialStyles=t,this._duration=e.duration,this._delay=e.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let o=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,o,this.options),this._finalKeyframe=o.length?o[o.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(o){let n=[];return o.forEach(e=>{n.push(Object.fromEntries(e))}),n}_triggerWebAnimation(o,n,e){return o.animate(this._convertKeyframesToObject(n),e)}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(o=>o()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}setPosition(o){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=o*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let o=new Map;this.hasStarted()&&this._finalKeyframe.forEach((e,t)=>{t!=="offset"&&o.set(t,this._finished?e:OP(this.element,t))}),this.currentSnapshot=o}triggerCallback(o){let n=o==="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},UP=class{validateStyleProperty(o){return!0}validateAnimatableStyleProperty(o){return!0}containsElement(o,n){return tj(o,n)}getParentElement(o){return xP(o)}query(o,n,e){return nj(o,n,e)}computeStyle(o,n,e){return OP(o,n)}animate(o,n,e,t,r,a=[]){let s=t==0?"both":"forwards",c={duration:e,delay:t,fill:s};r&&(c.easing=r);let p=new Map,g=a.filter(D=>D instanceof VP);Ore(e,t)&&g.forEach(D=>{D.currentSnapshot.forEach((L,z)=>p.set(z,L))});let C=Dre(n).map(D=>new Map(D));C=Are(o,C,p);let E=Zke(o,C);return new VP(o,C,c,E)}};var kP="@",qre="@.disabled",jP=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(o,n,e,t){this.namespaceId=o,this.delegate=n,this.engine=e,this._onDestroy=t}get data(){return this.delegate.data}destroyNode(o){this.delegate.destroyNode?.(o)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(o,n){return this.delegate.createElement(o,n)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}appendChild(o,n){this.delegate.appendChild(o,n),this.engine.onInsert(this.namespaceId,n,o,!1)}insertBefore(o,n,e,t=!0){this.delegate.insertBefore(o,n,e),this.engine.onInsert(this.namespaceId,n,o,t)}removeChild(o,n,e){this.parentNode(n)&&this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(o,n){return this.delegate.selectRootElement(o,n)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,n,e,t){this.delegate.setAttribute(o,n,e,t)}removeAttribute(o,n,e){this.delegate.removeAttribute(o,n,e)}addClass(o,n){this.delegate.addClass(o,n)}removeClass(o,n){this.delegate.removeClass(o,n)}setStyle(o,n,e,t){this.delegate.setStyle(o,n,e,t)}removeStyle(o,n,e){this.delegate.removeStyle(o,n,e)}setProperty(o,n,e){n.charAt(0)==kP&&n==qre?this.disableAnimations(o,!!e):this.delegate.setProperty(o,n,e)}setValue(o,n){this.delegate.setValue(o,n)}listen(o,n,e,t){return this.delegate.listen(o,n,e,t)}disableAnimations(o,n){this.engine.disableAnimations(o,n)}},bj=class extends jP{factory;constructor(o,n,e,t,r){super(n,e,t,r),this.factory=o,this.namespaceId=n}setProperty(o,n,e){n.charAt(0)==kP?n.charAt(1)=="."&&n==qre?(e=e===void 0?!0:!!e,this.disableAnimations(o,e)):this.engine.process(this.namespaceId,o,n.slice(1),e):this.delegate.setProperty(o,n,e)}listen(o,n,e,t){if(n.charAt(0)==kP){let r=Jke(o),a=n.slice(1),s="";return a.charAt(0)!=kP&&([a,s]=e9e(a)),this.engine.listen(this.namespaceId,r,a,s,c=>{let p=c._data||-1;this.factory.scheduleListenerCallback(p,e,c)})}return this.delegate.listen(o,n,e,t)}};function Jke(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function e9e(i){let o=i.indexOf("."),n=i.substring(0,o),e=i.slice(o+1);return[n,e]}var $P=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(o,n,e){this.delegate=o,this.engine=n,this._zone=e,n.onRemovalComplete=(t,r)=>{r?.removeChild(null,t)}}createRenderer(o,n){let e="",t=this.delegate.createRenderer(o,n);if(!o||!n?.data?.animation){let p=this._rendererCache,g=p.get(t);if(!g){let C=()=>p.delete(t);g=new jP(e,t,this.engine,C),p.set(t,g)}return g}let r=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,o);let s=p=>{Array.isArray(p)?p.forEach(s):this.engine.registerTrigger(r,a,o,p.name,p)};return n.data.animation.forEach(s),new bj(this,a,t,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(o,n,e){if(o>=0&&o<this._microtaskId){this._zone.run(()=>n(e));return}let t=this._animationCallbacksBuffer;t.length==0&&queueMicrotask(()=>{this._zone.run(()=>{t.forEach(r=>{let[a,s]=r;a(s)}),this._animationCallbacksBuffer=[]})}),t.push([n,e])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(o){this.engine.flush(),this.delegate.componentReplaced?.(o)}};var n9e=(()=>{class i extends xv{constructor(n,e,t){super(n,e,t)}ngOnDestroy(){this.flush()}static \u0275fac=function(e){return new(e||i)(J(Un),J(Zu),J(Xu))};static \u0275prov=Pe({token:i,factory:i.\u0275fac})}return i})();function i9e(){return new RP}function o9e(i,o,n){return new $P(i,o,n)}var Kre=[{provide:Xu,useFactory:i9e},{provide:xv,useClass:n9e},{provide:er,useFactory:o9e,deps:[Z1,xv,Vt]}],r9e=[{provide:Zu,useClass:Ij},{provide:mr,useValue:"NoopAnimations"},...Kre],Yre=[{provide:Zu,useFactory:()=>new UP},{provide:mr,useFactory:()=>"BrowserAnimations"},...Kre],Zre=(()=>{class i{static withConfig(n){return{ngModule:i,providers:n.disableAnimations?r9e:Yre}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:Yre,imports:[Q1]})}return i})();var oi={production:!1,staging:!0,firebaseLogLevel:"error",firebaseConfig:{apiKey:"AIzaSyAzcW2n1JhY_zhkXmuFcwe550AkwmYeJ0w",authDomain:"snipply-sdk-staging.firebaseapp.com",projectId:"snipply-sdk-staging",storageBucket:"snipply-sdk-staging.appspot.com",messagingSenderId:"877538579326",appId:"1:877538579326:web:f793f73f2b7dc770c4992f"},firebaseNotificationsDatabaseURL:"https://snipply-sdk-staging-notifications.firebaseio.com",segmentAnalyticsWriteKey:"ndJ0KZs5LkL6jny5a43FXXQkTF5bgPFt",useEmulators:!1,debugMode:!1,cloudFunction:{sa:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/sa",getIceServers:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/geticeservers",validateClient:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/validateclient",convertRecording:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/convertrecordingv2",chatgptCompletion:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/chatgptcompletion",whisperTranscription:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/whispertranscription",getPlanDetails:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getplandetails",getAllowedDocuments:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getalloweddocuments",getNotificationsForDocuments:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getnotificationsfordocuments",videoBackend:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/videobackend",processRecording:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/processrecording",usCentral1:{setEncryptedData:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/setencrypteddata"},asiaSouthEast1:{setEncryptedData:"https://asia-southeast1-snipply-sdk-staging.cloudfunctions.net/setencrypteddataau"},europeWest1:{setEncryptedData:"https://europe-west1-snipply-sdk-staging.cloudfunctions.net/setencrypteddataeu"},asiaNorthEast1:{setEncryptedData:"https://asia-northeast1-snipply-sdk-staging.cloudfunctions.net/setencrypteddatajp"}}};var Z=(()=>{let o=class o{};o.Events={Core:{IDENTIFY:"identify",SDK_VALIDATE_CLIENT_TRIGGERED:"sdkValidateClientTriggered",SDK_VALIDATE_CLIENT_SUCCESS:"sdkValidateClientSuccess",SDK_VALIDATE_CLIENT_FAILED:"sdkValidateClientFailed",SDK_USER_AUTH_SUCCESS:"sdkUserAuthSuccess",SDK_USER_AUTH_FAILED:"sdkUserAuthFailed",SDK_USER_SIGN_OUT:"sdkUserSignOut",SDK_PLAN_EXPIRED:"sdkPlanExpired",SDK_ERROR:"error",SDK_UNCAUGHT_ERROR:"uncaughtError",SDK_SESSION_RE_LOGIN_TRIGGERED:"sdkSessionReLoginTriggered",SDK_SESSION_TOKEN_EXPIRED:"sdkSessionTokenExpired",SDK_SESSION_RE_LOGIN_COUNT_EXCEEDED:"sdkSessionReLoginCountExceeded",SDK_JWT_EXPIRED_RETRY_EXCEEDED:"sdkJwtExpiredRetryExceeded",SDK_EVENT_RATE_LIMIT_EXCEEDED:"sdkEventRateLimitExceeded",SIGN_OUT_USER_TRIGGERED:"signOutUserTriggered",SET_DOCUMENTS_TRIGGERED:"setDocumentsTriggered",SET_ROOT_LOCATION_TRIGGERED:"setRootLocationTriggered",SET_ROOT_DOCUMENT_TRIGGERED:"setRootDocumentTriggered",UNSET_DOCUMENTS_TRIGGERED:"unsetDocumentsTriggered",FETCH_DOCUMENTS_TRIGGERED:"fetchDocumentsTriggered",UPDATE_DOCUMENTS_TRIGGERED:"updateDocumentsTriggered",UPDATE_LOCATIONS_TRIGGERED:"updateLocationsTriggered",FETCH_FOLDERS_TRIGGERED:"fetchFoldersTriggered",SET_USER_DATA_PROVIDER_TRIGGERED:"setUserDataProviderTriggered",SET_DATA_PROVIDERS_TRIGGERED:"setDataProvidersTriggered",SET_ENCRYPTION_PROVIDER_TRIGGERED:"setEncryptionProviderTriggered",SET_VELT_AUTH_PROVIDER_TRIGGERED:"setVeltAuthProviderTriggered",GET_DOCUMENT_ID_TRIGGERED:"getDocumentIdTriggered",SET_LOCATIONS_TRIGGERED:"setLocationsTriggered",SET_SCROLLABLE_ELEMENTS_IDS_TRIGGERED:"setScrollableElementsIdsTriggered",REMOVE_LOCATIONS_TRIGGERED:"removeLocationsTriggered",UNSET_LOCATIONS_TRIGGERED:"unsetLocationsTriggered",EXCLUDE_LOCATION_IDS_TRIGGERED:"excludeLocationIdsTriggered",UPDATE_CONTACT_LIST_TRIGGERED:"updateContactListTriggered",REMOVE_SCROLLABLE_ELEMENTS_IDS_TRIGGERED:"removeScrollableElementsIdsTriggered",GET_PRESENCE_ELEMENT_TRIGGERED:"getPresenceElementTriggered",GET_CURSOR_ELEMENT_TRIGGERED:"getCursorElementTriggered",GET_COMMENT_ELEMENT_TRIGGERED:"getCommentElementTriggered",GET_TAG_ELEMENT_TRIGGERED:"getTagElementTriggered",GET_SELECTION_ELEMENT_TRIGGERED:"getSelectionElementTriggered",GET_RECORDER_ELEMENT_TRIGGERED:"getRecorderElementTriggered",GET_CONTACT_ELEMENT_TRIGGERED:"getContactElementTriggered",GET_REWRITER_ELEMENT_TRIGGERED:"getRewriterElementTriggered",GET_HUDDLE_ELEMENT_TRIGGERED:"getHuddleElementTriggered",GET_LIVE_STATE_SYNC_ELEMENT_TRIGGERED:"getLiveStateSyncElementTriggered",GET_ARROW_ELEMENT_TRIGGERED:"getArrowElementTriggered",GET_VIEWS_ELEMENT_TRIGGERED:"getViewsElementTriggered",GET_NOTIFICATION_ELEMENT_TRIGGERED:"getNotificationElementTriggered",GET_AUTOCOMPLETE_ELEMENT_TRIGGERED:"getAutocompleteElementTriggered",GET_DOC_ELEMENT_TRIGGERED:"getDocElementTriggered",GET_AREA_ELEMENT_TRIGGERED:"getAreaElementTriggered",GET_REACTION_ELEMENT_TRIGGERED:"getReactionElementTriggered",GET_METADATA_TRIGGERED:"getMetadataTriggered",DISABLE_FEATURES_TRIGGERED:"disableFeaturesTriggered",SET_DARK_MODE_TRIGGERED:"setDarkModeTriggered",ENABLE_LOGS_TRIGGERED:"enableLogsTriggered",DISABLE_LOGS_TRIGGERED:"disableLogsTriggered",IS_USER_ALLOWED_TRIGGERED:"isUserAllowedTriggered",GET_USER_TRIGGERED:"getUserTriggered",GET_USER_ROLE_TRIGGERED:"getUserRoleTriggered",GET_USER_PERMISSIONS_TRIGGERED:"getUserPermissionsTriggered",GET_FEATURES_ACCESS_LEVEL_IAM_TRIGGERED:"getFeaturesAccessLevelIamTriggered",IS_PLAN_EXPIRED_TRIGGERED:"isPlanExpiredTriggered",GET_VELT_INIT_STATE_TRIGGERED:"getVeltInitStateTriggered",GET_CUSTOMER_METADATA_TRIGGERED:"getCustomerMetadataTriggered",GET_DOCUMENT_METADATA_TRIGGERED:"getDocumentMetadataTriggered",REMOVE_VELT_CONTENT_TRIGGERED:"removeVeltContentTriggered",INJECT_CUSTOM_CSS_TRIGGERED:"injectCustomCssTriggered",SET_LANGUAGE_TRIGGERED:"setLanguageTriggered",SET_TRANSLATIONS_TRIGGERED:"setTranslationsTriggered",ENABLE_AUTO_TRANSLATION_TRIGGERED:"enableAutoTranslationTriggered",DISABLE_AUTO_TRANSLATION_TRIGGERED:"disableAutoTranslationTriggered",SF_TRIGGERED:"sfTriggered",ST_TRIGGERED:"stTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",SET_UI_STATE_TRIGGERED:"setUiStateTriggered",GET_UI_STATE_TRIGGERED:"getUiStateTriggered",ENABLE_SAFE_EVAL_TRIGGERED:"enableSafeEvalTriggered",DISABLE_SAFE_EVAL_TRIGGERED:"disableSafeEvalTriggered",RESET_VELT_BUTTON_STATE_TRIGGERED:"resetVeltButtonStateTriggered"},Resolver:{COMMENT_RESOLVER_GET:"comment_resolver_get",COMMENT_RESOLVER_SAVE:"comment_resolver_save",COMMENT_RESOLVER_DELETE:"comment_resolver_delete",REACTION_RESOLVER_GET:"reaction_resolver_get",REACTION_RESOLVER_SAVE:"reaction_resolver_save",REACTION_RESOLVER_DELETE:"reaction_resolver_delete",USER_RESOLVER_GET:"user_resolver_get",ATTACHMENT_RESOLVER_SAVE:"attachment_resolver_save",ATTACHMENT_RESOLVER_DELETE:"attachment_resolver_delete"},Autocomplete:{CREATE_TRIGGERED:"createTriggered",ON_AUTOCOMPLETE_CHIP_CLICK_TRIGGERED:"onAutocompleteChipClickTriggered"},Comments:{COMMENT_TOOL_CLICKED:"commentToolClicked",COMMENT_DRAFT_ADDED:"commentDraftAdded",COMMENT_ADD_CONTEXT_TRIGGERED:"commentAddContextTriggered",COMMENT_UPDATE_CONTEXT_TRIGGERED:"commentUpdateContextTriggered",COMMENT_UPDATE_CONTEXT_SUCCESS:"commentUpdateContextSuccess",COMMENT_UPDATE_CONTEXT_FAILED:"commentUpdateContextFailed",COMMENT_ADDED:"commentAdded",COMMENT_PUBLISHED:"commentPublished",COMMENT_READ:"commentRead",COMMENT_STATUS_CHANGED:"commentStatusChanged",COMMENT_PRIORITY_CHANGED:"commentPriorityChanged",COMMENT_CUSTOM_CHIPS_CHANGED:"commentCustomChipsChanged",COMMENT_APPROVED:"commentApproved",COMMENT_ACCEPTED:"commentAccepted",COMMENT_REJECTED:"commentRejected",COMMENT_ASSIGNED:"commentAssigned",COMMENT_DELETE_TRIGGERED:"commentDeleteTriggered",COMMENT_DELETED:"commentDeleted",COMMENT_THREAD_DELETED:"commentThreadDeleted",COMMENT_LINK_COPIED:"commentLinkCopied",COMMENT_EDIT_BUTTON_CLICKED:"commentEditButtonClicked",COMMENT_EDITED:"commentEdited",COMMENT_SIDEBAR_OPENED:"commentSidebarOpened",COMMENT_SIDEBAR_CLOSED:"commentSidebarClosed",COMMENT_SIDEBAR_TOGGLED:"commentSidebarToggled",COMMENT_TAG_BUTTON_CLICKED:"commentTagButtonClicked",COMMENT_TAG_ADDED:"commentTagAdded",COMMENT_PIN_DRAGGED:"commentPinDragged",COMMENT_ADD_MODE_ENABLED:"commentAddModeEnabled",COMMENT_ADD_MODE_DISABLED:"commentAddModeDisabled",COMMENT_TEXT_MODE_ENABLED:"commentTextModeEnabled",COMMENT_TEXT_MODE_DISABLED:"commentTextModeDisabled",COMMENT_POPOVER_MODE_ENABLED:"commentPopoverModeEnabled",COMMENT_POPOVER_MODE_DISABLED:"commentPopoverModeDisabled",COMMENT_STREAM_MODE_ENABLED:"commentStreamModeEnabled",COMMENT_STREAM_MODE_DISABLED:"commentStreamModeDisabled",COMMENT_SIDEBAR_EMBED_MODE_ENABLED:"commentSidebarEmbedModeEnabled",COMMENT_SIDEBAR_FLOATING_MODE_ENABLED:"commentSidebarFloatingModeEnabled",COMMENT_ATTACHMENT_BUTTON_CLICKED:"commentAttachmentButtonClicked",COMMENT_ATTACHMENT_ADDED:"commentAttachmentAdded",COMMENT_ATTACHMENT_DOWNLOADED:"commentAttachmentDownloaded",COMMENT_ATTACHMENT_DELETED:"commentAttachmentDeleted",COMMENT_ATTACHMENT_SIZE_EXCEEDED:"commentAttachmentSizeExceeded",COMMENT_SUBMIT_TRIGGERED:"commentSubmitTriggered",COMMENT_APPROVE_BUTTON_CLICKED:"commentApproveButtonClicked",COMMENT_ACCEPT_BUTTON_CLICKED:"commentAcceptButtonClicked",COMMENT_REJECT_BUTTON_CLICKED:"commentRejectButtonClicked",COMMENT_SIGN_IN_BUTTON_CLICKED:"commentSignInButtonClicked",COMMENT_UPGRADE_BUTTON_CLICKED:"commentUpgradeButtonClicked",COMMENT_RECORDING_TOOL_CLICKED:"commentRecordingToolClicked",COMMENT_RECORDING_ADDED:"commentRecordingAdded",COMMENT_RECORDING_DELETED:"commentRecordingDeleted",COMMENT_MORE_REPLY_OPTION_CLICKED:"commentMoreReplyOptionClicked",COMMENT_PRIVATE_COMMENT_MODE_ENABLED:"commentPrivateCommentModeEnabled",COMMENT_PRIVATE_COMMENT_MODE_DISABLED:"commentPrivateCommentModeDisabled",COMMENT_ACCESS_MODE_CHANGED:"commentAccessModeChanged",GET_ALL_COMMENT_ANNOTATIONS_TRIGGERED_INTERNAL:"getAllCommentAnnotationsTriggered_internal",GET_ALL_COMMENT_ANNOTATIONS_TRIGGERED:"getAllCommentAnnotationsTriggered",DELETE_SELECTED_COMMENT_TRIGGERED:"deleteSelectedCommentTriggered",ENABLE_TEXT_COMMENTS_TRIGGERED:"enableTextCommentsTriggered",DISABLE_TEXT_COMMENTS_TRIGGERED:"disableTextCommentsTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered",ALLOWED_ELEMENT_CLASS_NAMES_TRIGGERED:"allowedElementClassNamesTriggered",ALLOWED_ELEMENT_QUERY_SELECTORS_TRIGGERED:"allowedElementQuerySelectorsTriggered",ENABLE_FLOATING_COMMENT_DIALOG_TRIGGERED:"enableFloatingCommentDialogTriggered",DISABLE_FLOATING_COMMENT_DIALOG_TRIGGERED:"disableFloatingCommentDialogTriggered",ATTACH_COMMENT_TRIGGERED:"attachCommentTriggered",OPEN_COMMENT_SIDEBAR_TRIGGERED:"openCommentSidebarTriggered",CLOSE_COMMENT_SIDEBAR_TRIGGERED:"closeCommentSidebarTriggered",TOGGLE_COMMENT_SIDEBAR_TRIGGERED:"toggleCommentSidebarTriggered",ENABLE_MODERATOR_MODE_TRIGGERED:"enableModeratorModeTriggered",DISABLE_MODERATOR_MODE_TRIGGERED:"disableModeratorModeTriggered",ENABLE_STREAM_MODE_TRIGGERED:"enableStreamModeTriggered",DISABLE_STREAM_MODE_TRIGGERED:"disableStreamModeTriggered",ENABLE_SIGN_IN_BUTTON_TRIGGERED:"enableSignInButtonTriggered",DISABLE_SIGN_IN_BUTTON_TRIGGERED:"disableSignInButtonTriggered",ENABLE_UPGRADE_BUTTON_TRIGGERED:"enableUpgradeButtonTriggered",DISABLE_UPGRADE_BUTTON_TRIGGERED:"disableUpgradeButtonTriggered",ON_COMMENT_MODE_CHANGE_TRIGGERED:"onCommentModeChangeTriggered",ENABLE_ATTACHMENTS_TRIGGERED:"enableAttachmentsTriggered",DISABLE_ATTACHMENTS_TRIGGERED:"disableAttachmentsTriggered",IS_USER_GLOBAL_CONTACT_TRIGGERED:"isUserGlobalContactTriggered",ENABLE_DEVICE_INFO_TRIGGERED:"enableDeviceInfoTriggered",DISABLE_DEVICE_INFO_TRIGGERED:"disableDeviceInfoTriggered",ENABLE_COMMENT_MODE_TRIGGERED:"enableCommentModeTriggered",DISABLE_COMMENT_MODE_TRIGGERED:"disableCommentModeTriggered",ENABLE_PERSISTENT_COMMENT_MODE_TRIGGERED:"enablePersistentCommentModeTriggered",DISABLE_PERSISTENT_COMMENT_MODE_TRIGGERED:"disablePersistentCommentModeTriggered",ENABLE_COMMENT_INDEX_TRIGGERED:"enableCommentIndexTriggered",DISABLE_COMMENT_INDEX_TRIGGERED:"disableCommentIndexTriggered",ENABLE_POPOVER_MODE_TRIGGERED:"enablePopoverModeTriggered",DISABLE_POPOVER_MODE_TRIGGERED:"disablePopoverModeTriggered",ENABLE_POPOVER_TRIANGLE_COMPONENT_TRIGGERED:"enablePopoverTriangleComponentTriggered",DISABLE_POPOVER_TRIANGLE_COMPONENT_TRIGGERED:"disablePopoverTriangleComponentTriggered",ENABLE_DIALOG_ON_HOVER_TRIGGERED:"enableDialogOnHoverTriggered",DISABLE_DIALOG_ON_HOVER_TRIGGERED:"disableDialogOnHoverTriggered",ENABLE_DIALOG_ON_TARGET_ELEMENT_CLICK_TRIGGERED:"enableDialogOnTargetElementClickTriggered",DISABLE_DIALOG_ON_TARGET_ELEMENT_CLICK_TRIGGERED:"disableDialogOnTargetElementClickTriggered",ENABLE_PRIORITY_TRIGGERED:"enablePriorityTriggered",DISABLE_PRIORITY_TRIGGERED:"disablePriorityTriggered",ENABLE_STATUS_TRIGGERED:"enableStatusTriggered",DISABLE_STATUS_TRIGGERED:"disableStatusTriggered",ENABLE_RESOLVE_BUTTON_TRIGGERED:"enableResolveButtonTriggered",DISABLE_RESOLVE_BUTTON_TRIGGERED:"disableResolveButtonTriggered",ENABLE_GHOST_COMMENTS_TRIGGERED:"enableGhostCommentsTriggered",DISABLE_GHOST_COMMENTS_TRIGGERED:"disableGhostCommentsTriggered",ENABLE_GHOST_COMMENTS_INDICATOR_TRIGGERED:"enableGhostCommentsIndicatorTriggered",DISABLE_GHOST_COMMENTS_INDICATOR_TRIGGERED:"disableGhostCommentsIndicatorTriggered",SET_CUSTOM_STATUS_TRIGGERED:"setCustomStatusTriggered",SET_CUSTOM_PRIORITY_TRIGGERED:"setCustomPriorityTriggered",SET_CUSTOM_CATEGORY_TRIGGERED:"setCustomCategoryTriggered",ENABLE_INBOX_MODE_TRIGGERED:"enableInboxModeTriggered",DISABLE_INBOX_MODE_TRIGGERED:"disableInboxModeTriggered",ENABLE_AUTO_CATEGORIZE_TRIGGERED:"enableAutoCategorizeTriggered",DISABLE_AUTO_CATEGORIZE_TRIGGERED:"disableAutoCategorizeTriggered",ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",SET_CONTEXT_PROVIDER_TRIGGERED:"setContextProviderTriggered",ENABLE_SUGGESTION_MODE_TRIGGERED:"enableSuggestionModeTriggered",DISABLE_SUGGESTION_MODE_TRIGGERED:"disableSuggestionModeTriggered",ENABLE_MOBILE_MODE_TRIGGERED:"enableMobileModeTriggered",DISABLE_MOBILE_MODE_TRIGGERED:"disableMobileModeTriggered",ENABLE_INLINE_COMMENT_MODE_TRIGGERED:"enableInlineCommentModeTriggered",DISABLE_INLINE_COMMENT_MODE_TRIGGERED:"disableInlineCommentModeTriggered",ENABLE_MINIMAP_TRIGGERED:"enableMinimapTriggered",DISABLE_MINIMAP_TRIGGERED:"disableMinimapTriggered",SHOW_COMMENTS_ON_DOM_TRIGGERED:"showCommentsOnDomTriggered",HIDE_COMMENTS_ON_DOM_TRIGGERED:"hideCommentsOnDomTriggered",ENABLE_COMMENT_TOOL_TRIGGERED:"enableCommentToolTriggered",DISABLE_COMMENT_TOOL_TRIGGERED:"disableCommentToolTriggered",SET_TOTAL_MEDIA_LENGTH_TRIGGERED:"setTotalMediaLengthTriggered",ON_COMMENT_ADD_TRIGGERED:"onCommentAddTriggered",ON_COMMENT_UPDATE_TRIGGERED:"onCommentUpdateTriggered",ADD_COMMENT_ON_SELECTED_TEXT_TRIGGERED:"addCommentOnSelectedTextTriggered",ENABLE_SIDEBAR_URL_NAVIGATION_TRIGGERED:"enableSidebarUrlNavigationTriggered",DISABLE_SIDEBAR_URL_NAVIGATION_TRIGGERED:"disableSidebarUrlNavigationTriggered",SET_D_STRATEGY_TRIGGERED:"setDStrategyTriggered",ENABLE_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_TRIGGERED:"enableSidebarButtonOnCommentDialogTriggered",DISABLE_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_TRIGGERED:"disableSidebarButtonOnCommentDialogTriggered",ON_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_CLICK_TRIGGERED:"onSidebarButtonOnCommentDialogClickTriggered",ENABLE_REACTIONS_TRIGGERED:"enableReactionsTriggered",DISABLE_REACTIONS_TRIGGERED:"disableReactionsTriggered",SET_RECORDINGS_TRIGGERED:"setRecordingsTriggered",ADD_COMMENT_ON_ELEMENT_TRIGGERED:"addCommentOnElementTriggered",ENABLE_PRIVATE_COMMENT_MODE_TRIGGERED:"enablePrivateCommentModeTriggered",DISABLE_PRIVATE_COMMENT_MODE_TRIGGERED:"disablePrivateCommentModeTriggered",ENABLE_SCROLL_TO_COMMENT_TRIGGERED:"enableScrollToCommentTriggered",DISABLE_SCROLL_TO_COMMENT_TRIGGERED:"disableScrollToCommentTriggered",ENABLE_USER_MENTIONS_TRIGGERED:"enableUserMentionsTriggered",DISABLE_USER_MENTIONS_TRIGGERED:"disableUserMentionsTriggered",SET_COMMENT_SIDEBAR_FILTERS_TRIGGERED:"setCommentSidebarFiltersTriggered",SET_SYSTEM_FILTERS_OPERATOR_TRIGGERED:"setSystemFiltersOperatorTriggered",ENABLE_COMMENT_PIN_HIGHLIGHTER_TRIGGERED:"enableCommentPinHighlighterTriggered",DISABLE_COMMENT_PIN_HIGHLIGHTER_TRIGGERED:"disableCommentPinHighlighterTriggered",ENABLE_DELETE_ON_BACKSPACE_TRIGGERED:"enableDeleteOnBackspaceTriggered",DISABLE_DELETE_ON_BACKSPACE_TRIGGERED:"disableDeleteOnBackspaceTriggered",ENABLE_HOTKEY_TRIGGERED:"enableHotkeyTriggered",DISABLE_HOTKEY_TRIGGERED:"disableHotkeyTriggered",ENABLE_DEVICE_INDICATOR_ON_COMMENT_PINS_TRIGGERED:"enableDeviceIndicatorOnCommentPinsTriggered",DISABLE_DEVICE_INDICATOR_ON_COMMENT_PINS_TRIGGERED:"disableDeviceIndicatorOnCommentPinsTriggered",GET_ELEMENT_REF_BY_ANNOTATION_ID_TRIGGERED:"getElementRefByAnnotationIdTriggered",SCROLL_TO_COMMENT_BY_ANNOTATION_ID_TRIGGERED:"scrollToCommentByAnnotationIdTriggered",SELECT_COMMENT_BY_ANNOTATION_ID_TRIGGERED:"selectCommentByAnnotationIdTriggered",ENABLE_RECORDING_SUMMARY_TRIGGERED:"enableRecordingSummaryTriggered",DISABLE_RECORDING_SUMMARY_TRIGGERED:"disableRecordingSummaryTriggered",ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"enableRecordingTranscriptionTriggered",DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"disableRecordingTranscriptionTriggered",ENABLE_RECORDING_COUNTDOWN_TRIGGERED:"enableRecordingCountdownTriggered",DISABLE_RECORDING_COUNTDOWN_TRIGGERED:"disableRecordingCountdownTriggered",SET_UNREAD_INDICATOR_MODE_TRIGGERED:"setUnreadIndicatorModeTriggered",ENABLE_ENTER_KEY_TO_SUBMIT_TRIGGERED:"enableEnterKeyToSubmitTriggered",DISABLE_ENTER_KEY_TO_SUBMIT_TRIGGERED:"disableEnterKeyToSubmitTriggered",ENABLE_PIN_SHADOW_DOM_TRIGGERED:"enablePinShadowDOMTriggered",DISABLE_PIN_SHADOW_DOM_TRIGGERED:"disablePinShadowDOMTriggered",ENABLE_DIALOG_SHADOW_DOM_TRIGGERED:"enableDialogShadowDOMTriggered",DISABLE_DIALOG_SHADOW_DOM_TRIGGERED:"disableDialogShadowDOMTriggered",ENABLE_SIDEBAR_SHADOW_DOM_TRIGGERED:"enableSidebarShadowDOMTriggered",DISABLE_SIDEBAR_SHADOW_DOM_TRIGGERED:"disableSidebarShadowDOMTriggered",ENABLE_CHANGE_DETECTION_IN_COMMENT_MODE_TRIGGERED:"enableChangeDetectionInCommentModeTriggered",DISABLE_CHANGE_DETECTION_IN_COMMENT_MODE_TRIGGERED:"disableChangeDetectionInCommentModeTriggered",SHOW_RESOLVED_COMMENTS_ON_DOM_TRIGGERED:"showResolvedCommentsOnDomTriggered",HIDE_RESOLVED_COMMENTS_ON_DOM_TRIGGERED:"hideResolvedCommentsOnDomTriggered",SET_CUSTOM_REACTIONS_TRIGGERED:"setCustomReactionsTriggered",ON_COMMENT_SELECTION_CHANGE_TRIGGERED:"onCommentSelectionChangeTriggered",GET_UNREAD_COMMENT_COUNT_BY_ANNOTATION_ID_TRIGGERED:"getUnreadCommentCountByAnnotationIdTriggered",GET_UNREAD_COMMENT_ANNOTATION_COUNT_ON_CURRENT_DOCUMENT_TRIGGERED:"getUnreadCommentAnnotationCountOnCurrentDocumentTriggered",GET_UNREAD_COMMENT_COUNT_ON_CURRENT_DOCUMENT_TRIGGERED:"getUnreadCommentCountOnCurrentDocumentTriggered",GET_UNREAD_COMMENT_ANNOTATION_COUNT_BY_LOCATION_ID_TRIGGERED:"getUnreadCommentAnnotationCountByLocationIdTriggered",GET_UNREAD_COMMENT_COUNT_BY_LOCATION_ID_TRIGGERED:"getUnreadCommentCountByLocationIdTriggered",UPDATE_COMMENT_DIALOG_POSITION_TRIGGERED:"updateCommentDialogPositionTriggered",ENABLE_AREA_COMMENT_TRIGGERED:"enableAreaCommentTriggered",DISABLE_AREA_COMMENT_TRIGGERED:"disableAreaCommentTriggered",SET_PIN_CURSOR_IMAGE_TRIGGERED:"setPinCursorImageTriggered",ADD_MANUAL_COMMENT_TRIGGERED:"addManualCommentTriggered",CREATE_CUSTOM_LIST_DATA_ON_ANNOTATION_TRIGGERED:"createCustomListDataOnAnnotationTriggered",CREATE_CUSTOM_LIST_DATA_ON_COMMENT_TRIGGERED:"createCustomListDataOnCommentTriggered",EXCLUDE_LOCATION_IDS_FROM_SIDEBAR_TRIGGERED:"excludeLocationIdsFromSidebarTriggered",ENABLE_BUBBLE_ON_PIN_TRIGGERED:"enableBubbleOnPinTriggered",DISABLE_BUBBLE_ON_PIN_TRIGGERED:"disableBubbleOnPinTriggered",ENABLE_BUBBLE_ON_PIN_HOVER_TRIGGERED:"enableBubbleOnPinHoverTriggered",DISABLE_BUBBLE_ON_PIN_HOVER_TRIGGERED:"disableBubbleOnPinHoverTriggered",ENABLE_MULTI_THREAD_MODE_TRIGGERED:"enableMultiThreadModeTriggered",DISABLE_MULTI_THREAD_MODE_TRIGGERED:"disableMultiThreadModeTriggered",ENABLE_MULTI_THREAD_TRIGGERED:"enableMultiThreadTriggered",DISABLE_MULTI_THREAD_TRIGGERED:"disableMultiThreadTriggered",ENABLE_GROUP_MATCHED_COMMENTS_TRIGGERED:"enableGroupMatchedCommentsTriggered",DISABLE_GROUP_MATCHED_COMMENTS_TRIGGERED:"disableGroupMatchedCommentsTriggered",UPDATE_CONTEXT_TRIGGERED:"updateContextTriggered",GET_SELECTED_COMMENTS_TRIGGERED:"getSelectedCommentsTriggered",ENABLE_DELETE_REPLY_CONFIRMATION_TRIGGERED:"enableDeleteReplyConfirmationTriggered",DISABLE_DELETE_REPLY_CONFIRMATION_TRIGGERED:"disableDeleteReplyConfirmationTriggered",ON_COPY_LINK_TRIGGERED:"onCopyLinkTriggered",GET_COMMENT_ANNOTATION_BY_ID_TRIGGERED:"getCommentAnnotationByIdTriggered",ENABLE_COLLAPSED_COMMENTS_TRIGGERED:"enableCollapsedCommentsTriggered",DISABLE_COLLAPSED_COMMENTS_TRIGGERED:"disableCollapsedCommentsTriggered",ON_COMMENT_SIDEBAR_ACTION_BUTTON_CLICK_TRIGGERED:"onCommentSidebarActionButtonClickTriggered",SET_COMMENT_SIDEBAR_DATA_TRIGGERED:"setCommentSidebarDataTriggered",ON_COMMENT_SIDEBAR_INIT_TRIGGERED:"onCommentSidebarInitTriggered",ON_COMMENT_SIDEBAR_DATA_TRIGGERED:"onCommentSidebarDataTriggered",SET_COMMENT_SIDEBAR_DEFAULT_CUSTOM_ACTIONS_TRIGGERED:"setCommentSidebarDefaultCustomActionsTriggered",ENABLE_SIDEBAR_CUSTOM_ACTIONS_TRIGGERED:"enableSidebarCustomActionsTriggered",DISABLE_SIDEBAR_CUSTOM_ACTIONS_TRIGGERED:"disableSidebarCustomActionsTriggered",ENABLE_QUERY_PARAMS_COMMENTS_TRIGGERED:"enableQueryParamsCommentsTriggered",DISABLE_QUERY_PARAMS_COMMENTS_TRIGGERED:"disableQueryParamsCommentsTriggered",ENABLE_RESOLVE_STATUS_ACCESS_ADMIN_ONLY_TRIGGERED:"enableResolveStatusAccessAdminOnlyTriggered",DISABLE_RESOLVE_STATUS_ACCESS_ADMIN_ONLY_TRIGGERED:"disableResolveStatusAccessAdminOnlyTriggered",ENABLE_LINK_CALLBACK_TRIGGERED:"enableLinkCallbackTriggered",DISABLE_LINK_CALLBACK_TRIGGERED:"disableLinkCallbackTriggered",ENABLE_SEEN_BY_USERS_TRIGGERED:"enableSeenByUsersTriggered",DISABLE_SEEN_BY_USERS_TRIGGERED:"disableSeenByUsersTriggered",ENABLE_SHORT_USER_NAME_TRIGGERED:"enableShortUserNameTriggered",DISABLE_SHORT_USER_NAME_TRIGGERED:"disableShortUserNameTriggered",ENABLE_READ_ONLY_TRIGGERED:"enableReadOnlyTriggered",DISABLE_READ_ONLY_TRIGGERED:"disableReadOnlyTriggered",ADD_COMMENT_ANNOTATION_TRIGGERED:"addCommentAnnotationTriggered",PUBLISH_COMMENT_ANNOTATION_TRIGGERED:"publishCommentAnnotationTriggered",APPROVE_COMMENT_ANNOTATION_TRIGGERED:"approveCommentAnnotationTriggered",ACCEPT_COMMENT_ANNOTATION_TRIGGERED:"acceptCommentAnnotationTriggered",REJECT_COMMENT_ANNOTATION_TRIGGERED:"rejectCommentAnnotationTriggered",SUBSCRIBE_COMMENT_ANNOTATION_TRIGGERED:"subscribeCommentAnnotationTriggered",UNSUBSCRIBE_COMMENT_ANNOTATION_TRIGGERED:"unsubscribeCommentAnnotationTriggered",DELETE_COMMENT_ANNOTATION_TRIGGERED:"deleteCommentAnnotationTriggered",GET_COMMENT_ANNOTATIONS_TRIGGERED:"getCommentAnnotationsTriggered",GET_COMMENT_ANNOTATIONS_COUNT_TRIGGERED:"getCommentAnnotationsCountTriggered",ASSIGN_USER_TRIGGERED:"assignUserTriggered",UPDATE_PRIORITY_TRIGGERED:"updatePriorityTriggered",UPDATE_STATUS_TRIGGERED:"updateStatusTriggered",UPDATE_ACCESS_TRIGGERED:"updateAccessTriggered",RESOLVE_COMMENT_ANNOTATION_TRIGGERED:"resolveCommentAnnotationTriggered",GET_LINK_TRIGGERED:"getLinkTriggered",COPY_LINK_TRIGGERED:"copyLinkTriggered",ADD_COMMENT_TRIGGERED:"addCommentTriggered",UPDATE_COMMENT_TRIGGERED:"updateCommentTriggered",DELETE_COMMENT_TRIGGERED:"deleteCommentTriggered",GET_COMMENT_TRIGGERED:"getCommentTriggered",ADD_ATTACHMENT_TRIGGERED:"addAttachmentTriggered",DELETE_ATTACHMENT_TRIGGERED:"deleteAttachmentTriggered",GET_ATTACHMENT_TRIGGERED:"getAttachmentTriggered",DELETE_RECORDING_TRIGGERED:"deleteRecordingTriggered",GET_RECORDING_TRIGGERED:"getRecordingTriggered",ADD_REACTION_TRIGGERED:"addReactionTriggered",DELETE_REACTION_TRIGGERED:"deleteReactionTriggered",TOGGLE_REACTION_TRIGGERED:"toggleReactionTriggered",ENABLE_CUSTOM_AUTOCOMPLETE_SEARCH_TRIGGERED:"enableCustomAutocompleteSearchTriggered",DISABLE_CUSTOM_AUTOCOMPLETE_SEARCH_TRIGGERED:"disableCustomAutocompleteSearchTriggered",FETCH_COMMENT_ANNOTATIONS_TRIGGERED:"fetchCommentAnnotationsTriggered",SET_TRANSFORM_CONTEXT_TRIGGERED:"setTransformContextTriggered",ENABLE_SVG_AS_IMG_TRIGGERED:"enableSvgAsImgTriggered",DISABLE_SVG_AS_IMG_TRIGGERED:"disableSvgAsImgTriggered",ENABLE_FULL_EXPANDED_TRIGGERED:"enableFullExpandedTriggered",DISABLE_FULL_EXPANDED_TRIGGERED:"disableFullExpandedTriggered",ENABLE_COMMENT_TO_NEAREST_ALLOWED_ELEMENT_TRIGGERED:"enableCommentToNearestAllowedElementTriggered",DISABLE_COMMENT_TO_NEAREST_ALLOWED_ELEMENT_TRIGGERED:"disableCommentToNearestAllowedElementTriggered",ENABLE_DRAFT_MODE_TRIGGERED:"enableDraftModeTriggered",DISABLE_DRAFT_MODE_TRIGGERED:"disableDraftModeTriggered",ENABLE_FILTER_COMMENTS_ON_DOM_TRIGGERED:"enableFilterCommentsOnDomTriggered",DISABLE_FILTER_COMMENTS_ON_DOM_TRIGGERED:"disableFilterCommentsOnDomTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",ENABLE_REPLY_AVATARS_TRIGGERED:"enableReplyAvatarsTriggered",DISABLE_REPLY_AVATARS_TRIGGERED:"disableReplyAvatarsTriggered",SET_MAX_REPLY_AVATARS_TRIGGERED:"setMaxReplyAvatarsTriggered",SET_SIDEBAR_BUTTON_COUNT_TYPE_TRIGGERED:"setSidebarButtonCountTypeTriggered",ENABLE_FILTER_GHOST_COMMENTS_IN_SIDEBAR_TRIGGERED:"enableFilterGhostCommentsInSidebarTriggered",DISABLE_FILTER_GHOST_COMMENTS_IN_SIDEBAR_TRIGGERED:"disableFilterGhostCommentsInSidebarTriggered"},Recording:{RECORDING_TOOL_CLICKED:"recordingToolClicked",RECORDING_ADDED:"recordingAdded",RECORDING_PANEL_SAVE_BUTTON_CLICKED:"recordingPanelSaveButtonClicked",RECORDING_PANEL_CANCEL_BUTTON_CLICKED:"recordingPanelCancelButtonClicked",RECORDING_PANEL_PAUSE_BUTTON_CLICKED:"recordingPanelPauseButtonClicked",RECORDING_PANEL_RESUME_BUTTON_CLICKED:"recordingPanelResumeButtonClicked",RECORDING_PANEL_VIDEO_ON_BUTTON_CLICKED:"recordingPanelVideoOnButtonClicked",RECORDING_PANEL_VIDEO_OFF_BUTTON_CLICKED:"recordingPanelVideoOffButtonClicked",RECORDING_PANEL_AUDIO_ON_BUTTON_CLICKED:"recordingPanelAudioOnButtonClicked",RECORDING_PANEL_AUDIO_OFF_BUTTON_CLICKED:"recordingPanelAudioOffButtonClicked",RECORDING_PANEL_START_BUTTON_CLICKED:"recordingPanelStartButtonClicked",RECORDING_PANEL_PIP_BUTTON_CLICKED:"recordingPanelPipButtonClicked",RECORDING_PLAYED:"recordingPlayed",RECORDING_PAUSED:"recordingPaused",RECORDING_DELETE_TRIGGERED:"recordingDeleteTriggered",RECORDING_DELETED:"recordingDeleted",RECORDING_DRAGGED:"recordingDragged",RECORDING_DRAFT_DRAGGED:"recordingDraftDragged",TRANSCRIPTION_CLICKED:"transcriptionClicked",SUBTITLES_CLICKED:"subtitlesClicked",VIEW_TRANSCRIPTION_SUMMARY_CLICKED:"viewTranscriptionSummaryClicked",TRANSCRIPTION_SUMMARY_COPIED:"transcriptionSummaryCopied",TRANSCRIPTION_TIMESTAMP_CLICKED:"transcriptionTimestampClicked",TRANSCRIPTION_PANEL_DRAGGED:"transcriptionPanelDragged",SUBTITLES_PANEL_DRAGGED:"subtitlesPanelDragged",REQUEST_SCREEN_PERMISSION_TRIGGERED:"requestScreenPermissionTriggered",INIT_RECORDING_TRIGGERED:"initRecordingTriggered",ON_RECORDED_DATA_TRIGGERED:"onRecordedDataTriggered",ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",ENABLE_RECORDING_COUNTDOWN_TRIGGERED:"enableRecordingCountdownTriggered",DISABLE_RECORDING_COUNTDOWN_TRIGGERED:"disableRecordingCountdownTriggered",GET_RECORDING_DATA_BY_RECORDER_ID_TRIGGERED:"getRecordingDataByRecorderIdTriggered",GET_RECORDINGS_TRIGGERED:"getRecordingsTriggered",ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"enableRecordingTranscriptionTriggered",DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"disableRecordingTranscriptionTriggered",GET_RECORDING_DATA_TRIGGERED:"getRecordingDataTriggered",FETCH_RECORDINGS_TRIGGERED:"fetchRecordingsTriggered",DELETE_RECORDING_TRIGGERED:"deleteRecordingTriggered",ENABLE_VIDEO_EDITOR_TRIGGERED:"enableVideoEditorTriggered",DISABLE_VIDEO_EDITOR_TRIGGERED:"disableVideoEditorTriggered",SET_RECORDING_QUALITY_CONSTRAINTS_TRIGGERED:"setRecordingQualityConstraintsTriggered",SET_RECORDING_ENCODING_OPTIONS_TRIGGERED:"setRecordingEncodingOptionsTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",DOWNLOAD_LATEST_VIDEO_TRIGGERED:"downloadLatestVideoTriggered",ENABLE_RECORDING_MIC_TRIGGERED:"enableRecordingMicTriggered",DISABLE_RECORDING_MIC_TRIGGERED:"disableRecordingMicTriggered",ENABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED:"enableRetakeOnVideoEditorTriggered",DISABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED:"disableRetakeOnVideoEditorTriggered",ASK_DEVICE_PERMISSION_TRIGGERED:"askDevicePermissionTriggered",ENABLE_ONBOARDING_TOOLTIP_TRIGGERED:"enableOnboardingTooltipTriggered",DISABLE_ONBOARDING_TOOLTIP_TRIGGERED:"disableOnboardingTooltipTriggered",SET_MAX_LENGTH_TRIGGERED:"setMaxLengthTriggered",OPEN_PICTURE_IN_PICTURE_TRIGGERED:"openPictureInPictureTriggered",EXIT_PICTURE_IN_PICTURE_TRIGGERED:"exitPictureInPictureTriggered",ENABLE_PICTURE_IN_PICTURE_TRIGGERED:"enablePictureInPictureTriggered",DISABLE_PICTURE_IN_PICTURE_TRIGGERED:"disablePictureInPictureTriggered"},Huddle:{HUDDLE_TOOL_CLICKED:"huddleToolClicked",HUDDLE_CREATED:"huddleCreated",HUDDLE_JOIN_BUTTON_CLICKED:"huddleJoinButtonClicked",HUDDLE_JOINED:"huddleJoined",HUDDLE_LEFT:"huddleLeft",HUDDLE_AUDIO_BUTTON_CLICKED:"huddleAudioButtonClicked",HUDDLE_AUDIO_MUTED:"huddleAudioMuted",HUDDLE_AUDIO_UNMUTED:"huddleAudioUnmuted",HUDDLE_VIDEO_BUTTON_CLICKED:"huddleVideoButtonClicked",HUDDLE_VIDEO_TURNED_ON:"huddleVideoTurnedOn",HUDDLE_VIDEO_TURNED_OFF:"huddleVideoTurnedOff",HUDDLE_SCREENSHARING_BUTTON_CLICKED:"huddleScreensharingButtonClicked",HUDDLE_SCREENSHARING_STARTED:"huddleScreensharingStarted",HUDDLE_SCREENSHARING_STOPPED:"huddleScreensharingStopped",ENABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED:"enableHuddleOnCursorModeTriggered",DISABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED:"disableHuddleOnCursorModeTriggered",ENABLE_CHAT_TRIGGERED:"enableChatTriggered",DISABLE_CHAT_TRIGGERED:"disableChatTriggered",ENABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED:"enableFlockModeOnAvatarClickTriggered",DISABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED:"disableFlockModeOnAvatarClickTriggered"},Presence:{PRESENCE_MULTIPLE_USERS_DETECTED:"presenceMultipleUsersDetected",PRESENCE_USER_STATUS_CHANGED:"presenceUserStatusChanged",PRESENCE_USER_CLICKED:"presenceUserClicked",PRESENCE_SET_CUSTOM_INACTIVITY_TIMER:"presenceSetCustomInactivityTimer",PRESENCE_SET_CUSTOM_OFFLINE_INACTIVITY_TIMER:"presenceSetCustomOfflineInactivityTimer",PRESENCE_SET_CUSTOM_MAX_USERS:"presenceSetCustomMaxUsers",MULTIPLE_USERS_ONLINE:"multipleUsersOnline",ON_USER_STATE_CHANGE:"onUserStateChange",GET_PRESENCE_DATA_TRIGGERED:"getPresenceDataTriggered",GET_ONLINE_USERS_ON_CURRENT_DOCUMENT_TRIGGERED:"getOnlineUsersOnCurrentDocumentTriggered",SET_INACTIVITY_TIME_TRIGGERED:"setInactivityTimeTriggered",ENABLE_FLOCK_MODE_TRIGGERED:"enableFlockModeTriggered",DISABLE_FLOCK_MODE_TRIGGERED:"disableFlockModeTriggered",START_FOLLOWING_USER_TRIGGERED:"startFollowingUserTriggered",STOP_FOLLOWING_USER_TRIGGERED:"stopFollowingUserTriggered",ENABLE_SELF_TRIGGERED:"enableSelfTriggered",DISABLE_SELF_TRIGGERED:"disableSelfTriggered",ON_ACTION_TRIGGERED:"onActionTriggered"},Cursor:{CURSOR_MULTIPLE_USERS_DETECTED:"cursorMultipleUsersDetected",CURSOR_SET_CUSTOM_INACTIVITY_TIMER:"cursorSetCustomInactivityTimer",GET_LIVE_CURSORS_ON_CURRENT_DOCUMENT_TRIGGERED:"getLiveCursorsOnCurrentDocumentTriggered",SET_INACTIVITY_TIME_TRIGGERED:"setInactivityTimeTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered"},Selection:{SELECTION_CREATED_WHEN_MULTIPLE_USERS_DETECTED:"selectionCreatedWhenMultipleUsersDetected",ENABLE_LIVE_SELECTION_TRIGGERED:"enableLiveSelectionTriggered",DISABLE_LIVE_SELECTION_TRIGGERED:"disableLiveSelectionTriggered",ENABLE_USER_INDICATOR_TRIGGERED:"enableUserIndicatorTriggered",DISABLE_USER_INDICATOR_TRIGGERED:"disableUserIndicatorTriggered",SET_USER_INDICATOR_POSITION_TRIGGERED:"setUserIndicatorPositionTriggered",SET_USER_INDICATOR_TYPE_TRIGGERED:"setUserIndicatorTypeTriggered",ENABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED:"enableDefaultElementsTrackingTriggered",DISABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED:"disableDefaultElementsTrackingTriggered",ENABLE_DEFAULT_STYLING_TRIGGERED:"enableDefaultStylingTriggered",DISABLE_DEFAULT_STYLING_TRIGGERED:"disableDefaultStylingTriggered",GET_LIVE_SELECTION_DATA_TRIGGERED:"getLiveSelectionDataTriggered"},LiveStateSync:{SET_USER_AS_EDITOR_TRIGGERED:"setUserAsEditorTriggered",SET_USER_AS_EDITOR_ERROR:"setUserAsEditorError",REQUEST_EDITOR_ACCESS_TRIGGERED:"requestEditorAccessTriggered",ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED:"acceptEditorAccessRequestTriggered",REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED:"rejectEditorAccessRequestTriggered",CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED:"cancelEditorAccessRequestTriggered",EDIT_CURRENT_TAB_TRIGGERED:"editCurrentTabTriggered",SEM_ACCESS_REQUESTED:"semAccessRequested",SEM_ACCESS_REQUEST_CANCELED:"semAccessRequestCanceled",SEM_ACCESS_ACCEPTED:"semAccessAccepted",SEM_ACCESS_REJECTED:"semAccessRejected",SEM_EDITOR_ASSIGNED:"semEditorAssigned",SEM_VIEWER_ASSIGNED:"semViewerAssigned",SEM_EDITOR_ON_DIFFERENT_TAB_DETECTED:"semEditorOnDifferentTabDetected",SEM_MAKE_EDITOR_TRIGGERED:"semMakeEditorTriggered",SEM_MAKE_READER_TRIGGERED:"semMakeReaderTriggered",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS:"semSingleEditorLiveStateDataStats",SEM_SINGLE_EDITOR_LIVE_STATE_EMPTY_DATA_STATS:"semSingleEditorLiveStateEmptyDataStats",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_MISMATCH:"semSingleEditorLiveStateDataMismatch",SEM_SINGLE_EDITOR_DATA_MISMATCH_WITH_EXTERNAL:"semSingleEditorLiveStateDataMismatchWithExternal",SEM_USER_EDITOR_STATS:"semUserEditorStats",REMOVE_EDITOR_ACCESS:"removeEditorAccess",REMOVE_EDITOR_ACCESS_ERROR:"removeEditorAccessError",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_EDITOR:"semSingleEditorLiveStateDataOnMakeEditor",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_READER:"semSingleEditorLiveStateDataOnMakeReader",GET_LIVE_STATE_DATA_TRIGGERED:"getLiveStateDataTriggered",SET_LIVE_STATE_DATA_TRIGGERED:"setLiveStateDataTriggered",ENABLE_SINGLE_EDITOR_MODE_TRIGGERED:"enableSingleEditorModeTriggered",DISABLE_SINGLE_EDITOR_MODE_TRIGGERED:"disableSingleEditorModeTriggered",IS_USER_EDITOR_TRIGGERED:"isUserEditorTriggered",GET_EDITOR_TRIGGERED:"getEditorTriggered",RESET_USER_ACCESS_TRIGGERED:"resetUserAccessTriggered",SINGLE_EDITOR_MODE_CONTAINER_IDS_TRIGGERED:"singleEditorModeContainerIdsTriggered",ENABLE_AUTO_SYNC_STATE_TRIGGERED:"enableAutoSyncStateTriggered",DISABLE_AUTO_SYNC_STATE_TRIGGERED:"disableAutoSyncStateTriggered",IS_EDITOR_ACCESS_REQUESTED_TRIGGERED:"isEditorAccessRequestedTriggered",EDITOR_ACCESS_REQUESTED_BY_TRIGGERED:"editorAccessRequestedByTriggered",EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"editorAccessTransferOnTimeoutTriggered",SET_EDITOR_ACCESS_TIMEOUT_TRIGGERED:"setEditorAccessTimeoutTriggered",ENABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"enableEditorAccessTransferOnTimeoutTriggered",DISABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"disableEditorAccessTransferOnTimeoutTriggered",ENABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED:"enableDefaultSingleEditorUiTriggered",DISABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED:"disableDefaultSingleEditorUiTriggered",GET_EDITOR_ACCESS_TIMER_TRIGGERED:"getEditorAccessTimerTriggered",ON_SERVER_CONNECTION_STATE_CHANGE_TRIGGERED:"onServerConnectionStateChangeTriggered",UPDATE_USER_PRESENCE_TRIGGERED:"updateUserPresenceTriggered",ON_ACTION_TRIGGERED:"onActionTriggered"},Tag:{TAG_TOOL_CLICKED:"tagToolClicked",TAG_DRAFT_ADDED:"tagDraftAdded",TAG_ADDED:"tagAdded",TAG_READ:"tagRead",TAG_RESOLVED:"tagResolved",TAG_DRAGGED:"tagDragged",TAG_LINK_COPIED:"tagLinkCopied",TAG_ADD_MODE_ENABLED:"tagAddModeEnabled",TAG_ADD_MODE_DISABLED:"tagAddModeDisabled",TAG_DELETE_TRIGGERED:"tagDeleteTriggered",TAG_DELETED:"tagDeleted",GET_ALL_TAG_ANNOTATIONS_TRIGGERED:"getAllTagAnnotationsTriggered",DELETE_TAG_TRIGGERED:"deleteTagTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered",ATTACH_TAG_TRIGGERED:"attachTagTriggered",ADD_TAG_MODE_CHANGE_TRIGGERED:"addTagModeChangeTriggered"},Rewriter:{REWRITER_ENABLED:"rewriterEnabled",REWRITER_MIN_CHARACTER_NOT_MET:"rewriterMinCharacterNotMet",REWRITER_MAX_CHARACTER_NOT_MET:"rewriterMaxCharacterNotMet",REWRITE_BUTTON_CLICKED:"rewriteButtonClicked",REWRITE_PROMPT_BUTTON_CLICKED:"rewritePromptButtonClicked",REWRITE_REFRESH_BUTTON_CLICKED:"rewriteRefreshButtonClicked",REWRITE_OPTION_SELECTED:"rewriteOptionSelected",REWRITE_TASK_CREATED:"rewriteTaskCreated",REWRITE_DIALOG_DRAGGED:"rewriteDialogDragged",REWRITE_SHOW_ORIGINAL_TEXT_CLICKED:"rewriteShowOriginalTextClicked",REWRITE_CLOSE_BUTTON_CLICKED:"rewriteCloseButtonClicked",REWRITE_PROMPT_SUBMITTED:"rewritePromptSubmitted",ENABLE_REWRITER_TRIGGERED:"enableRewriterTriggered",DISABLE_REWRITER_TRIGGERED:"disableRewriterTriggered"},Feedback:{FEEDBACK_BUTTON_CLICKED:"feedbackButtonClicked",FEEDBACK_SUBMITTED:"feedbackSubmitted"},Contact:{UPDATE_CONTACT_LIST_TRIGGERED:"updateContactListTriggered",IS_USER_GLOBAL_CONTACT_TRIGGERED:"isUserGlobalContactTriggered",ON_CONTACT_SELECTED_TRIGGERED:"onContactSelectedTriggered",ENABLE_AT_HERE_TRIGGERED:"enableAtHereTriggered",DISABLE_AT_HERE_TRIGGERED:"disableAtHereTriggered",SET_AT_HERE_LABEL_TRIGGERED:"setAtHereLabelTriggered",SET_AT_HERE_DESCRIPTION_TRIGGERED:"setAtHereDescriptionTriggered",UPDATE_CONTACT_LIST_SCOPE_FOR_ORGANIZATION_USERS_TRIGGERED:"updateContactListScopeForOrganizationUsersTriggered",GET_CONTACT_LIST_TRIGGERED:"getContactListTriggered"},ContactUs:{CONTACT_BUTTON_CLICKED:"contactButtonClicked",CONTACT_SUBMITTED:"contactSubmitted"},Bug:{BUG_BUTTON_CLICKED:"bugButtonClicked",BUG_SUBMITTED:"bugSubmitted"},ShareDialog:{SHARE_BUTTON_CLICKED:"shareButtonClicked",DOCUMENT_ACCESS_CHANGED:"documentAccessChanged",DOCUMENT_USER_ACCESS_ADDED:"documentUserAccessAdded",DOCUMENT_USER_ACCESS_REMOVED:"documentUserAccessRemoved",SHARE_LINK_COPIED:"shareLinkCopied"},InviteDialog:{USER_INVITED:"userInvited",INVITE_LINK_COPIED:"inviteLinkCopied"},Iam:{USER_ACCESS_DENIED:"userAccessDenied"},Arrow:{ARROW_TOOL_CLICKED:"arrowToolClicked",ARROW_DRAFT_ADDED:"arrowDraftAdded",ARROW_ADDED:"arrowAdded",ARROW_READ:"arrowRead",ARROW_RESOLVED:"arrowResolved",ARROW_DRAGGED:"arrowDragged",ARROW_LINK_COPIED:"arrowLinkCopied",ARROW_ADD_MODE_ENABLED:"arrowAddModeEnabled",ARROW_ADD_MODE_DISABLED:"arrowAddModeDisabled",ARROW_DELETE_TRIGGERED:"arrowDeleteTriggered",ARROW_DELETED:"arrowDeleted",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered"},Area:{AREA_TOOL_CLICKED:"areaToolClicked",AREA_ADDED:"areaAdded",AREA_DRAGGED:"areaDragged",AREA_LINK_COPIED:"areaLinkCopied",AREA_ADD_MODE_ENABLED:"areaAddModeEnabled",AREA_ADD_MODE_DISABLED:"areaAddModeDisabled",AREA_DELETE_TRIGGERED:"areaDeleteTriggered",AREA_DELETED:"areaDeleted",ENABLE_AREA_COMMENT_TRIGGERED:"enableAreaCommentTriggered",DISABLE_AREA_COMMENT_TRIGGERED:"disableAreaCommentTriggered"},Doc:{DOCUMENT_ID_SET_TRIGGERED:"documentIdSetTriggered",SET_DOCUMENTS_SUCCESS:"setDocumentsSuccess",SET_LOCATIONS_SUCCESS:"setLocationsSuccess",REMOVE_LOCATIONS_SUCCESS:"removeLocationsSuccess",UNSET_LOCATIONS_SUCCESS:"unsetLocationsSuccess",DOCUMENT_SET_TRIGGERED:"documentSetTriggered",UNSET_DOCUMENTS_TRIGGERED:"unsetDocumentsTriggered",UNSET_DOCUMENTS_SUCCESS:"unsetDocumentsSuccess",DOCUMENTS_SET_TRIGGERED:"documentsSetTriggered",GET_DOCUMENT_METADATA_TRIGGERED:"getDocumentMetadataTriggered"},Reactions:{ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",SET_CUSTOM_REACTIONS_TRIGGERED:"setCustomReactionsTriggered"},Views:{GET_UNIQUE_VIEWS_BY_USER_TRIGGERED:"getUniqueViewsByUserTriggered",GET_UNIQUE_VIEWS_BY_DATE_TRIGGERED:"getUniqueViewsByDateTriggered"},Notifications:{NOTIFICATION_HISTORY_PANEL_OPENED:"notificationHistoryPanelOpened",NOTIFICATION_HISTORY_PANEL_CLOSED:"notificationHistoryPanelClosed",NOTIFICATION_HISTORY_PANEL_TOGGLED:"notificationHistoryPanelToggled",NOTIFICATION_MARK_ALL_AS_READ_CLICKED:"notificationMarkAllAsReadClicked",NOTIFICATION_CLICKED:"notificationClicked",NOTIFICATION_TAB_CLICKED:"notificationTabClicked",NOTIFICATION_READ:"notificationRead",GET_NOTIFICATIONS_FOR_YOU$_TRIGGERED_INTERNAL:"getNotificationsForYou$Triggered_internal",GET_NOTIFICATIONS_BY_DOCUMENT_ID$_TRIGGERED_INTERNAL:"getNotificationsByDocumentId$Triggered_internal",GET_ALL_NOTIFICATIONS$_TRIGGERED_INTERNAL:"getAllNotifications$Triggered_internal",GET_NOTIFICATIONS$_TRIGGERED_INTERNAL:"getNotifications$Triggered_internal",OPEN_HISTORY_PANEL_TRIGGERED:"openHistoryPanelTriggered",CLOSE_HISTORY_PANEL_TRIGGERED:"closeHistoryPanelTriggered",TOGGLE_HISTORY_PANEL_TRIGGERED:"toggleHistoryPanelTriggered",GET_NOTIFICATIONS_DATA_TRIGGERED:"getNotificationsDataTriggered",SET_MAX_DAYS_TRIGGERED:"setMaxDaysTriggered",SET_TAB_CONFIG_TRIGGERED:"setTabConfigTriggered",ENABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED:"enableReadNotificationsOnForYouTabTriggered",DISABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED:"disableReadNotificationsOnForYouTabTriggered",SET_ALL_NOTIFICATIONS_AS_READ_TRIGGERED:"setAllNotificationsAsReadTriggered",GET_UNREAD_NOTIFICATIONS_COUNT_TRIGGERED:"getUnreadNotificationsCountTriggered",MARK_NOTIFICATION_AS_READ_BY_ID_TRIGGERED:"markNotificationAsReadByIdTriggered",SET_SETTINGS_TRIGGERED:"setSettingsTriggered",GET_SETTINGS_TRIGGERED:"getSettingsTriggered",MUTE_ALL_NOTIFICATIONS_TRIGGERED:"muteAllNotificationsTriggered",ENABLE_SETTINGS_TRIGGERED:"enableSettingsTriggered",ENABLE_SELF_NOTIFICATIONS_TRIGGERED:"enableSelfNotificationsTriggered",DISABLE_SELF_NOTIFICATIONS_TRIGGERED:"disableSelfNotificationsTriggered",DISABLE_SETTINGS_TRIGGERED:"disableSettingsTriggered",SET_SETTINGS_INITIAL_CONFIG_TRIGGERED:"setSettingsInitialConfigTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",OPEN_NOTIFICATIONS_PANEL_TRIGGERED:"openNotificationsPanelTriggered",CLOSE_NOTIFICATIONS_PANEL_TRIGGERED:"closeNotificationsPanelTriggered"}};let i=o;return i})(),Xre=[Z.Events.Rewriter.REWRITER_ENABLED];var La=class i{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(o,n=!1){return this.onePassHasher.start().appendStr(o).end(n)}static hashAsciiStr(o,n=!1){return this.onePassHasher.start().appendAsciiStr(o).end(n)}static _hex(o){let n=i.hexChars,e=i.hexOut,t,r,a,s;for(s=0;s<4;s+=1)for(r=s*8,t=o[s],a=0;a<8;a+=2)e[r+1+a]=n.charAt(t&15),t>>>=4,e[r+0+a]=n.charAt(t&15),t>>>=4;return e.join("")}static _md5cycle(o,n){let e=o[0],t=o[1],r=o[2],a=o[3];e+=(t&r|~t&a)+n[0]-680876936|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[1]-389564586|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[2]+606105819|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[3]-1044525330|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[4]-176418897|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[5]+1200080426|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[6]-1473231341|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[7]-45705983|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[8]+1770035416|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[9]-1958414417|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[10]-42063|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[11]-1990404162|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[12]+1804603682|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[13]-40341101|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[14]-1502002290|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[15]+1236535329|0,t=(t<<22|t>>>10)+r|0,e+=(t&a|r&~a)+n[1]-165796510|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[6]-1069501632|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[11]+643717713|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[0]-373897302|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[5]-701558691|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[10]+38016083|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[15]-660478335|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[4]-405537848|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[9]+568446438|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[14]-1019803690|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[3]-187363961|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[8]+1163531501|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[13]-1444681467|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[2]-51403784|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[7]+1735328473|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[12]-1926607734|0,t=(t<<20|t>>>12)+r|0,e+=(t^r^a)+n[5]-378558|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[8]-2022574463|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[11]+1839030562|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[14]-35309556|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[1]-1530992060|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[4]+1272893353|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[7]-155497632|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[10]-1094730640|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[13]+681279174|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[0]-358537222|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[3]-722521979|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[6]+76029189|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[9]-640364487|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[12]-421815835|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[15]+530742520|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[2]-995338651|0,t=(t<<23|t>>>9)+r|0,e+=(r^(t|~a))+n[0]-198630844|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[7]+1126891415|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[14]-1416354905|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[5]-57434055|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[12]+1700485571|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[3]-1894986606|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[10]-1051523|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[1]-2054922799|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[8]+1873313359|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[15]-30611744|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[6]-1560198380|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[13]+1309151649|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[4]-145523070|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[11]-1120210379|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[2]+718787259|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[9]-343485551|0,t=(t<<21|t>>>11)+r|0,o[0]=e+o[0]|0,o[1]=t+o[1]|0,o[2]=r+o[2]|0,o[3]=a+o[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(i.stateIdentity),this}appendStr(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a;for(a=0;a<o.length;a+=1){if(r=o.charCodeAt(a),r<128)n[t++]=r;else if(r<2048)n[t++]=(r>>>6)+192,n[t++]=r&63|128;else if(r<55296||r>56319)n[t++]=(r>>>12)+224,n[t++]=r>>>6&63|128,n[t++]=r&63|128;else{if(r=(r-55296)*1024+(o.charCodeAt(++a)-56320)+65536,r>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[t++]=(r>>>18)+240,n[t++]=r>>>12&63|128,n[t++]=r>>>6&63|128,n[t++]=r&63|128}t>=64&&(this._dataLength+=64,i._md5cycle(this._state,e),t-=64,e[0]=e[16])}return this._bufferLength=t,this}appendAsciiStr(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a=0;for(;;){for(r=Math.min(o.length-a,64-t);r--;)n[t++]=o.charCodeAt(a++);if(t<64)break;this._dataLength+=64,i._md5cycle(this._state,e),t=0}return this._bufferLength=t,this}appendByteArray(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a=0;for(;;){for(r=Math.min(o.length-a,64-t);r--;)n[t++]=o[a++];if(t<64)break;this._dataLength+=64,i._md5cycle(this._state,e),t=0}return this._bufferLength=t,this}getState(){let o=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[o[0],o[1],o[2],o[3]]}}setState(o){let n=o.buffer,e=o.state,t=this._state,r;for(this._dataLength=o.length,this._bufferLength=o.buflen,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],r=0;r<n.length;r+=1)this._buffer8[r]=n.charCodeAt(r)}end(o=!1){let n=this._bufferLength,e=this._buffer8,t=this._buffer32,r=(n>>2)+1;this._dataLength+=n;let a=this._dataLength*8;if(e[n]=128,e[n+1]=e[n+2]=e[n+3]=0,t.set(i.buffer32Identity.subarray(r),r),n>55&&(i._md5cycle(this._state,t),t.set(i.buffer32Identity)),a<=4294967295)t[14]=a;else{let s=a.toString(16).match(/(.*?)(.{0,8})$/);if(s===null)return;let c=parseInt(s[2],16),p=parseInt(s[1],16)||0;t[14]=c,t[15]=p}return i._md5cycle(this._state,t),o?this._state:i._hex(this._state)}};La.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]);La.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);La.hexChars="0123456789abcdef";La.hexOut=[];La.onePassHasher=new La;if(La.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");var $t=function(i){return i.NEWLY_ADDED="newlyAdded",i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.ASSIGNED="assigned",i.STATUS_CHANGED="statusChanged",i.PRIORITY_CHANGED="priorityChanged",i.ACCESS_MODE_CHANGED="accessModeChanged",i.CUSTOM_LIST_CHANGED="customListChanged",i.ACCEPTED="accepted",i.REJECTED="rejected",i.REACTION_ADDED="reactionAdded",i.REACTION_DELETED="reactionDeleted",i.SUBSCRIBED="subscribed",i.UNSUBSCRIBED="unsubscribed",i.PUBLISHED="published",i}($t||{}),ss=function(i){return i.COMMENT_ANNOTATION_ADD="comment_annotation.add",i.COMMENT_ANNOTATION_DELETE="comment_annotation.delete",i.COMMENT_ADD="comment.add",i.COMMENT_DELETE="comment.delete",i.COMMENT_UPDATE="comment.update",i.REACTION_ADD="reaction.add",i.REACTION_DELETE="reaction.delete",i.ATTACHMENT_ADD="attachment.add",i.ATTACHMENT_DELETE="attachment.delete",i}(ss||{}),$i={ADD_COMMENT_ANNOTATION:"addCommentAnnotation",PUBLISH_COMMENT_ANNOTATION:"publishCommentAnnotation",DELETE_COMMENT_ANNOTATION:"deleteCommentAnnotation",APPROVE_COMMENT_ANNOTATION:"approveCommentAnnotation",ACCEPT_COMMENT_ANNOTATION:"acceptCommentAnnotation",REJECT_COMMENT_ANNOTATION:"rejectCommentAnnotation",SUBSCRIBE_COMMENT_ANNOTATION:"subscribeCommentAnnotation",UNSUBSCRIBE_COMMENT_ANNOTATION:"unsubscribeCommentAnnotation",ASSIGN_USER:"assignUser",UPDATE_STATUS:"updateStatus",UPDATE_PRIORITY:"updatePriority",UPDATE_ACCESS:"updateAccess",RESOLVE_COMMENT:"resolveComment",ADD_COMMENT:"addComment",UPDATE_COMMENT:"updateComment",DELETE_COMMENT:"deleteComment",ADD_ATTACHMENT:"addAttachment",DELETE_ATTACHMENT:"deleteAttachment",DELETE_RECORDING:"deleteRecording",COPY_LINK:"copyLink",ADD_REACTION:"addReaction",DELETE_REACTION:"deleteReaction",TOGGLE_REACTION:"toggleReaction",COMMENT_SIDEBAR_DATA_INIT:"commentSidebarDataInit",COMMENT_SIDEBAR_DATA_UPDATE:"commentSidebarDataUpdate",AUTOCOMPLETE_SEARCH:"autocompleteSearch",COMPOSER_CLICKED:"composerClicked",LINK_CLICKED:"linkClicked"},Fl={TRANSCRIPTION_DONE:"transcriptionDone",RECORDING_DONE:"recordingDone",RECORDING_EDIT_DONE:"recordingEditDone",DELETE_RECORDING:"deleteRecording",ERROR:"error",RECORDING_SAVE_INITIATED:"recordingSaveInitiated",RECORDING_STARTED:"recordingStarted",RECORDING_PAUSED:"recordingPaused",RECORDING_RESUMED:"recordingResumed",RECORDING_CANCELLED:"recordingCancelled",RECORDING_STOPPED:"recordingStopped"},Hi={VELT_BUTTON_CLICK:"veltButtonClick",USER_UPDATE:"userUpdate",INIT_UPDATE:"initUpdate",DOCUMENT_INIT:"documentInit",ERROR:"error"},Yp={ACCESS_REQUESTED:"accessRequested",ACCESS_REQUEST_CANCELED:"accessRequestCanceled",ACCESS_ACCEPTED:"accessAccepted",ACCESS_REJECTED:"accessRejected",EDITOR_ASSIGNED:"editorAssigned",VIEWER_ASSIGNED:"viewerAssigned",EDITOR_ON_DIFFERENT_TAB_DETECTED:"editorOnDifferentTabDetected"},xj={MULTIPLE_USERS_ONLINE:"multipleUsersOnline",USER_STATE_CHANGE:"userStateChange"},Qre={SETTINGS_UPDATED:"settingsUpdated"},GS=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.RESOLVED="resolved",i}(GS||{}),Tj=function(i){return i.INVITE="invite",i.REMOVE="remove",i}(Tj||{}),HP=function(i){return i.CREATED="created",i.JOINED="joined",i}(HP||{}),Tv=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.RESOLVED="resolved",i}(Tv||{}),zP=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i}(zP||{}),GP=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i}(GP||{}),Dj=function(i){return i.FIRST_VIEWED="firstViewed",i}(Dj||{}),Re=function(i){return i.AREA="area",i.ARROW="arrow",i.AUDIO_HUDDLE="audioHuddle",i.COMMENT="comment",i.MULTI_THREAD="multiThread",i.CURSOR="cursor",i.HUDDLE="huddle",i.LIVE_STATE_SYNC="liveStateSync",i.PRESENCE="presence",i.TAG="tag",i.RECORDER="recorder",i.REWRITER="rewriter",i.LIVE_SELECTION="liveSelection",i.NOTIFICATION="notification",i.REACTION="reaction",i}(Re||{}),Qu=function(i){return i.AREA="area",i.ARROW="arrow",i.AUDIO_HUDDLE="audioHuddle",i.COMMENT="comment",i.MULTI_THREAD="multiThread",i.CURSOR="cursor",i.HUDDLE="huddle",i.LIVE_STATE_SYNC="liveStateSync",i.PRESENCE="presence",i.TAG="tag",i.RECORDER="recorder",i.REWRITER="rewriter",i.LIVE_SELECTION="liveSelection",i.NOTIFICATION="notification",i.REACTION="reaction",i.AREA_COMMENT="areaComment",i.INLINE_COMMENT="inlineComment",i.COMMENT_SIDEBAR="commentSidebar",i}(Qu||{}),ir=function(i){return i.DESKTOP="Desktop",i.MOBILE="Mobile",i.TABLET="Tablet",i.MONITOR="Monitor",i.UNKNOWN="Unknown",i}(ir||{}),Dv=function(i){return i.PORTRAIT="portrait",i.LANDSCAPE="landscape",i.UNKNOWN="unknown",i}(Dv||{}),wv=function(i){return i.Portrait="(orientation: portrait)",i.Landscape="(orientation: landscape)",i}(wv||{}),ol=function(i){return i.DIFFERENT_DEVICE="differentDevice",i.ELEMENT_DELETED="elementDeleted",i}(ol||{}),Co=function(i){return i.ADMIN="Admin",i.COMMENTER="Commenter",i}(Co||{}),bi=function(i){return i.PUBLIC="public",i.RESTRICTED="restricted",i.ORGANIZATION_PRIVATE="organizationPrivate",i}(bi||{}),WP=function(i){return i.DEFAULT="default",i.DYNAMIC_ID="dynamicId",i}(WP||{}),oo=function(i){return i.PUBLIC="public",i.PRIVATE="private",i}(oo||{}),Ju=function(i){return i.MINIMAL="minimal",i.VERBOSE="verbose",i}(Ju||{}),eh=function(i){return i.DEFAULT="default",i.EXPANDED="expanded",i}(eh||{}),wj=function(i){return i.TOTAL="total",i.UNREAD="unread",i}(wj||{}),rl=function(i){return i.ONLINE="online",i.OFFLINE="offline",i.PENDING_INIT="pendingInit",i.PENDING_DATA="pendingData",i}(rl||{}),zi=function(i){return i.ALL="all",i.ORGANIZATION="organization",i.ORGANIZATION_USER_GROUP="organizationUserGroup",i.DOCUMENT="document",i.FOLDER="folder",i}(zi||{}),Ac=function(i){return i.AND="and",i.OR="or",i}(Ac||{});var zn=(()=>{let o=class o{constructor(){try{this.userAgent=navigator.userAgent,this.browserName=this.getBrowserName(),this.browserVersion=this.getBrowserVersion(),this.deviceType=this.getDeviceType(),this.orientation=this.getOrientation(),this.osName=this.getOSName(),this.osVersion=this.getOSVersion(),this.screenWidth=this.getScreenWidth(),this.screenHeight=this.getScreenHeight()}catch{}}getBrowserName(){try{return(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?"Opera":navigator.userAgent.indexOf("Chrome")!=-1?"Chrome":navigator.userAgent.indexOf("Safari")!=-1?"Safari":navigator.userAgent.indexOf("Firefox")!=-1?"Firefox":navigator.userAgent.indexOf("MSIE")!=-1||document?.documentMode?"IE":"Unknown"}catch{return"Unknown"}}getDeviceType(){try{return o.Breakpoints[Li.Handset]?ir.MOBILE:o.Breakpoints[Li.Tablet]?ir.TABLET:o.Breakpoints[Li.XLarge]?ir.MONITOR:o.Breakpoints[Li.Web]?ir.DESKTOP:ir.UNKNOWN}catch{return ir.UNKNOWN}}getOrientation(){try{return o.Orientations[wv.Portrait]?Dv.PORTRAIT:o.Orientations[wv.Landscape]?Dv.LANDSCAPE:Dv.UNKNOWN}catch{return Dv.UNKNOWN}}getOSName(){try{return navigator.userAgent.indexOf("Windows")!=-1?"Windows":navigator.userAgent.indexOf("Macintosh")!=-1?"Macintosh":navigator.userAgent.indexOf("Linux")!=-1?"Linux":"Unknown"}catch{return"Unknown"}}getOSVersion(){try{let a=navigator?.userAgent,s="Unknown";if(a.indexOf("Windows")!==-1)a.indexOf("Windows NT 5.1")!==-1?s="Windows XP":a.indexOf("Windows NT 6.0")!==-1?s="Windows Vista":a.indexOf("Windows NT 6.1")!==-1?s="Windows 7":a.indexOf("Windows NT 6.2")!==-1?s="Windows 8":a.indexOf("Windows NT 6.3")!==-1?s="Windows 8.1":a.indexOf("Windows NT 10.0")!==-1&&(s="Windows 10");else if(a.indexOf("Mac OS X")!==-1)s=a.match(/Mac OS X ([0-9_.]+)/)[1],s=s.replace(/_/g,".");else if(a.indexOf("iOS")!==-1)s=a.match(/OS ([0-9_.]+) like Mac OS X/)[1],s=s.replace(/_/g,".");else if(a.indexOf("Firefox")!==-1){var e=/\(([^)]+)\)/,t=e.exec(a)[1],r=t.split("; ");s=r[2]}return s||"Unknown"}catch{return"Unknown"}}getBrowserVersion(){try{return this.browserName=="Opera"?this.getOperaVersion():this.browserName=="Chrome"?this.getChromeVersion():this.browserName=="Safari"?this.getSafariVersion():this.browserName=="Firefox"?this.getFirefoxVersion():this.browserName=="IE"?this.getIEVersion():"Unknown"}catch{return"Unknown"}}getOperaVersion(){try{var e=navigator.userAgent.match(/(?:Opera|OPR)\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getChromeVersion(){try{var e=navigator.userAgent.match(/(?:Chrome|Chromium)\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getSafariVersion(){try{var e=navigator.userAgent.match(/Version\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getFirefoxVersion(){try{var e=navigator.userAgent.match(/Firefox\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getIEVersion(){try{var e=navigator.userAgent.match(/MSIE (\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getScreenWidth(){try{return window.screen.width}catch{return 0}}getScreenHeight(){try{return window.screen.height}catch{return 0}}getDeviceInfo(){try{return this.userAgent=navigator.userAgent,this.browserName=this.getBrowserName(),this.browserVersion=this.getBrowserVersion(),this.deviceType=this.getDeviceType(),this.orientation=this.getOrientation(),this.osName=this.getOSName(),this.osVersion=this.getOSVersion(),this.screenWidth=this.getScreenWidth(),this.screenHeight=this.getScreenHeight(),JSON.parse(JSON.stringify(this))}catch{return{browserName:"Unknown",browserVersion:"Unknown",deviceType:"Unknown",osName:"Unknown",osVersion:"Unknown",screenWidth:0,screenHeight:0,userAgent:"Unknown"}}}};o.Breakpoints={},o.Orientations={};let i=o;return i})();var ro=class{constructor(){this.deviceInfo=new zn().getDeviceInfo()}};var Ba=class Ba{static showLogs(){try{return oi.debugMode||!!sessionStorage.getItem("debugMode")||!!sessionStorage.getItem("forceDebugMode")}catch(o){return Ba.catch("Error in showLogs: ",o),!1}}};Ba.log=Ba.showLogs()?console.log:()=>{},Ba.warn=Ba.showLogs()?console.warn:()=>{},Ba.error=Ba.showLogs()?console.error:()=>{},Ba.debug=Ba.showLogs()?console.debug:()=>{},Ba.info=Ba.showLogs()?console.info:()=>{},Ba.logsEnabled=!0,Ba.catch=(o,n)=>{try{Ba.logsEnabled&&(n!==void 0?console.warn("Velt: ",o,n):console.warn("Velt: ",o))}catch{}};var at=Ba;var ut=class ut{};ut.SNIPPYLY_HOST_URL_PROD="https://snippyly.com",ut.SNIPPYLY_HOST_URL_STAGING="https://snippyly-staging.web.app",ut.USER_TYPE_ANONYMOUS="anonymous",ut.USER_TYPE_SIGNED_IN="signedIn",ut.LOCALSTORAGE_DATA_ID="snippylytempdata",ut.NO_ORGANIZATION_ID="veltNoOrganization",ut.DEFAULT_QUERY_HASH="default",ut.LISTENER_BATCH_SIZE=5,ut.FIREBASE_PARTIAL_PATH_ORGANIZATIONS="organizations",ut.FIREBASE_PARTIAL_PATH_FOLDERS="folders",ut.FIREBASE_PARTIAL_PATH_DOCS="docs",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_CONFIGURATIONS="documentConfigurations",ut.FIREBASE_PARTIAL_PATH_PRESENCE="presence",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_USERS="orgIamUsers",ut.FIREBASE_PARTIAL_PATH_CENTRAL_USERS="users",ut.FIREBASE_PARTIAL_PATH_FOLDER_USERS="folderIamUsers",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_USERS="docIamUsers",ut.FIREBASE_PARTIAL_PATH_CURSOR="cursor",ut.FIREBASE_PARTIAL_PATH_ARROW="arrow",ut.FIREBASE_PARTIAL_PATH_AREA="area",ut.FIREBASE_PARTIAL_PATH_COMMENT="comment",ut.FIREBASE_PARTIAL_PATH_LOCATION="location",ut.FIREBASE_PARTIAL_PATH_MULTI_THREAD="multiThread",ut.FIREBASE_PARTIAL_PATH_TAG="tag",ut.FIREBASE_PARTIAL_PATH_SELECTION="selection",ut.FIREBASE_PARTIAL_PATH_AUDIO_HUDDLE="audioHuddle",ut.FIREBASE_PARTIAL_PATH_HUDDLE="huddle",ut.FIREBASE_PARTIAL_PATH_CONTACTS="contacts",ut.FIREBASE_PARTIAL_PATH_GROUPS="groups",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_DOCS="notificationsDocs",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_USERS="notificationsUsers",ut.FIREBASE_PARTIAL_PATH_DOC_NOTIFICATION="notificationsDocs__notification",ut.FIREBASE_PARTIAL_PATH_USER_NOTIFICATION="notificationsUsers__notification",ut.FIREBASE_PARTIAL_PATH_GLOBAL="global",ut.FIREBASE_PARTIAL_PATH_LOGINS="logins",ut.FIREBASE_PARTIAL_PATH_METADATA="metadata",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_METADATA="metadata",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_GROUPS="groups",ut.FIREBASE_PARTIAL_PATH_LOCATIONS="locations",ut.FIREBASE_PARTIAL_PATH_RECORDER="recorder",ut.FIREBASE_PARTIAL_PATH_FOLLOW_ALONG="flock",ut.FIREBASE_PARTIAL_PATH_SYNC_VIDEO_PLAYER="syncVideoPlayer",ut.FIREBASE_PARTIAL_PATH_LIVE_STATE="liveState",ut.FIREBASE_PARTIAL_PATH_IAM="iam",ut.FIREBASE_PARTIAL_PATH_REACTION="reaction",ut.FIREBASE_PARTIAL_PATH_CRDT="crdt",ut.FIREBASE_PARTIAL_PATH_VIEWS="views",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_VIEWS="notificationViews",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_VIEWS="documentViews",ut.FIREBASE_PARTIAL_PATH_LOCATION_VIEWS="locationViews",ut.FIREBASE_PARTIAL_PATH_NOTIFICATIONS="notifications",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_NOTIFICATIONS="notifications",ut.FIREBASE_PARTIAL_PATH_LAST_NOTIFICATION_TIMESTAMP="lastNotificationTimestamp",ut.FIREBASE_PARTIAL_PATH_HEARTBEAT="heartbeat",ut.FIREBASE_PARTIAL_PATH_HEARTBEAT_BY_DOCUMENT="heartbeatByDocument",ut.FIREBASE_PARTIAL_PATH_USERS="users",ut.FIREBASE_PARTIAL_PATH_PERMISSIONS_USERS="permissions",ut.FIREBASE_PARTIAL_PATH_USER_REQUESTS="userRequests",ut.FIREBASE_PARTIAL_PATH_FEEDBACK="feedback",ut.FIREBASE_PARTIAL_PATH_BUGS="bugs",ut.FIREBASE_PARTIAL_PATH_CONTACT_US="contactUs",ut.FIREBASE_PARTIAL_PATH_CUSTOMER_METADATA="metadata",ut.PRESENCE_STATUS_ONLINE="online",ut.PRESENCE_STATUS_OFFLINE="offline",ut.PRESENCE_STATUS_AWAY="away",ut.IMG_URL_NOT_FOUND="https://snippyly.com/assets/icons/anon-user.svg",ut.IMG_CLASS_NOT_FOUND="presence-avatar-image-small",ut.AVATAR_COLOR_LIST=["#a259fe","#9746ff","#19bcfe","#FE8947","#2c83fc","#0dcf82","#ffcb00","#ff7162","#FFD600","#A5A7FE","#67DBF4","#FDA192"],ut.TEXT_COLOR_MAP={"#a259fe":"#ffffff","#9746ff":"#ffffff","#19bcfe":"#ffffff","#FE8947":"#ffffff","#2c83fc":"#ffffff","#0dcf82":"#141416","#ffcb00":"#141416","#ff7162":"#ffffff","#FFD600":"#141416","#A5A7FE":"#141416","#67DBF4":"#141416","#FDA192":"#141416"},ut.UNREAD_COMMENTS_CHECK_FROM_DATE="2024-02-05",ut.DEFAULT_ANNOTATION_COLOR="#a259fe",ut.REGEX_EMAIL=/(\+|@)+([a-zA-Z0-9._+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi,ut.REGEX_URL=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)(?::[0-9]+)?((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_0-9]*)#?(?:[\.\!\/\\\w0-9=]*))?)/gi,ut.REGEX_SPECIAL_CHARS=/[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/,ut.SNIPPYLY_HIGHLIGHT="snippyly-highlight",ut.SNIPPYLY_HIGHLIGHT_PREVIEW="snippyly-highlight-preview",ut.SNIPPYLY_HIGHLIGHT_USER="snippyly-highlight-user",ut.SNIPPYLY_HIGHLIGHT_USER_NAME="snippyly-highlight-user-name",ut.SNIPPYLY_HIGHLIGHT_USER_TEXT="snippyly-highlight-user-text",ut.VELT_LIVE_SELECTION_ON_ELEMENT="velt-live-selection-on-element",ut.VELT_LIVE_SELECTION_ON_ELEMENT_DEFAULT="velt-live-selection-on-element-default",ut.VELT_LIVE_SELECTION_ON_TEXT="velt-live-selection-on-text",ut.VELT_LIVE_SELECTION_ON_TEXT_DEFAULT="velt-live-selection-on-text-default",ut.VELT_IGNORE_CHANGE_DETECTION="velt-ignore-change-detection",ut.VELT_CUSTOM_CSS="velt-custom-css",ut.TAGS={SNIPPYLY_ROOT:"snippyly-root",SNIPPYLY_PRESENCE:"snippyly-presence",SNIPPYLY_CURSOR:"snippyly-cursor",SNIPPYLY_COMMENT_TOOL:"snippyly-comment-tool",SNIPPYLY_COMMENTS:"snippyly-comments",SNIPPYLY_TAG_TOOL:"snippyly-tag-tool",SNIPPYLY_TAGS:"snippyly-tags",SNIPPYLY_RECORDER_NOTES:"snippyly-recorder-notes",SNIPPYLY_RECORDER_CONTROL_PANEL:"snippyly-recorder-control-panel",SNIPPYLY_RECORDER_CONTROL_PANEL_INTERNAL:"snippyly-recorder-control-panel-internal",SNIPPYLY_RECORDER_PLAYER:"snippyly-recorder-player",SNIPPYLY_TEXT_HIGHLIGHT:"snippyly-text-highlight",SNIPPYLY_COMMENT_TEXT_PORTAL:"snippyly-comment-text-portal",SNIPPYLY_COMMENT_TEXT:"snippyly-comment-text",SNIPPYLY_COMMENTS_SIDEBAR:"snippyly-comments-sidebar",SNIPPYLY_COMMENT_BUBBLE:"snippyly-comment-bubble",SNIPPYLY_HIGHLIGHT_USER_TEXT:"snippyly-highlight-user-text",SNIPPYLY_AUDIO_HUDDLE:"snippyly-audio-huddle",SNIPPYLY_VIDEO_HUDDLE:"snippyly-video-huddle",SNIPPYLY_HUDDLE:"snippyly-huddle",SNIPPYLY_HUDDLE_TOOL:"snippyly-huddle-tool",SNIPPYLY_RECORDER_TOOL:"snippyly-recorder-tool",SNIPPYLY_PLUGIN:"snippyly-plugin",SNIPPYLY_MENU:"snippyly-menu",SNIPPYLY_COMMENT_DIALOG:"snippyly-comment-dialog",SNIPPYLY_SIDEBAR_BUTTON:"snippyly-sidebar-button",SNIPPYLY_REWRITER:"snippyly-rewriter",SNIPPYLY_USER_INVITE_TOOL:"snippyly-user-invite-tool",SNIPPYLY_USER_REQUEST_TOOL:"snippyly-user-request-tool",SNIPPYLY_USER_AVATAR:"snippyly-user-avatar",SNIPPYLY_ARROW_TOOL:"snippyly-arrow-tool",SNIPPYLY_ARROWS:"snippyly-arrows",SNIPPYLY_AREA_TOOL:"snippyly-area-tool",SNIPPYLY_AREAS:"snippyly-areas",VELT_ROOT:"velt-root",VELT_PRESENCE:"velt-presence",VELT_CURSOR:"velt-cursor",VELT_COMMENT_TOOL:"velt-comment-tool",VELT_COMMENTS:"velt-comments",VELT_TAG_TOOL:"velt-tag-tool",VELT_TAGS:"velt-tags",VELT_RECORDER_NOTES:"velt-recorder-notes",VELT_RECORDER_CONTROL_PANEL:"velt-recorder-control-panel",VELT_RECORDER_CONTROL_PANEL_INTERNAL:"velt-recorder-control-panel-internal",VELT_RECORDER_PLAYER:"velt-recorder-player",VELT_VIDEO_EDITOR:"velt-video-editor",VELT_TEXT_HIGHLIGHT:"velt-text-highlight",VELT_COMMENT_TEXT_PORTAL:"velt-comment-text-portal",VELT_COMMENTS_SIDEBAR:"velt-comments-sidebar",VELT_COMMENT_BUBBLE:"velt-comment-bubble",VELT_COMMENT_THREAD:"velt-comment-thread",VELT_COMMENT_PIN:"velt-comment-pin",VELT_COMMENT_TEXT:"velt-comment-text",VELT_CHART_COMMENT:"velt-chart-comment",VELT_CANVAS_COMMENT:"velt-canvas-comment",VELT_INLINE_COMMENTS_SECTION:"velt-inline-comments-section",VELT_COMMENTS_MINIMAP:"velt-comments-minimap",VELT_HIGHLIGHT_USER_TEXT:"velt-highlight-user-text",VELT_AUDIO_HUDDLE:"velt-audio-huddle",VELT_VIDEO_HUDDLE:"velt-video-huddle",VELT_HUDDLE:"velt-huddle",VELT_HUDDLE_TOOL:"velt-huddle-tool",VELT_RECORDER_TOOL:"velt-recorder-tool",SUPERFLOW_TOOLBAR:"superflow-toolbar",VELT_MENU:"velt-menu",VELT_COMMENT_DIALOG:"velt-comment-dialog",VELT_SIDEBAR_BUTTON:"velt-sidebar-button",VELT_COMMENTS_SIDEBAR_BUTTON:"velt-comments-sidebar-button",VELT_REWRITER:"velt-rewriter",VELT_USER_INVITE_TOOL:"velt-user-invite-tool",VELT_USER_REQUEST_TOOL:"velt-user-request-tool",VELT_USER_AVATAR:"velt-user-avatar",VELT_ARROW_TOOL:"velt-arrow-tool",VELT_ARROWS:"velt-arrows",VELT_AREA_TOOL:"velt-area-tool",VELT_AREAS:"velt-areas",VELT_INLINE_COMMENT:"velt-inline-comment",VELT_VIDEO_PLAYER:"velt-video-player",VELT_VIDEO_COMMENTS_TIMELINE:"velt-comment-player-timeline",VELT_REACTION_TOOL:"velt-reaction-tool",VELT_INLINE_REACTIONS_SECTION:"velt-inline-reactions-section",VELT_VIEW_ANALYTICS:"velt-view-analytics",VELT_NOTIFICATIONS_TOOL:"velt-notifications-tool",VELT_NOTIFICATIONS_PANEL:"velt-notifications-panel",VELT_NOTIFICATIONS_HISTORY_PANEL:"velt-notifications-history-panel",VELT_WIREFRAME:"velt-wireframe",VELT_AUTOCOMPLETE:"velt-autocomplete",VELT_AUTOCOMPLETE_CHIP:"velt-autocomplete-chip",VELT_COMMENT_DIALOG_HEADER:"velt-comment-dialog-header",VELT_COMMENT_DIALOG_BODY:"velt-comment-dialog-body",VELT_COMMENT_DIALOG_FOOTER:"velt-comment-dialog-footer",VELT_COMMENT_DIALOG_PRIORITY:"velt-comment-dialog-priority",VELT_COMMENT_DIALOG_STATUS:"velt-comment-dialog-status",VELT_COMMENT_DIALOG_COPY_LINK:"velt-comment-dialog-copy-link",VELT_COMMENT_DIALOG_RESOLVE_BUTTON:"velt-comment-dialog-resolve-button",VELT_COMMENT_DIALOG_OPTIONS:"velt-comment-dialog-options",VELT_COMMENT_DIALOG_BODY_THREAD_CARD:"velt-comment-dialog-thread-card",VELT_COMMENT_DIALOG_PRIVATE_BANNER:"velt-comment-dialog-private-banner",VELT_COMMENT_COMPOSER:"velt-comment-composer",VELT_SKELETON_LOADER:"velt-skeleton-loader",VELT_SHADOW_DOM_INTERNAL:"velt-shadow-dom-internal",VELT_SINGLE_EDITOR_MODE_PANEL:"velt-single-editor-mode-panel"},ut.ATTRIBUTES={VELT_COMMENT_CONTAINER:"data-velt-comment-container",VELT_TARGET_COMMENT_ELEMENT_ID:"data-velt-target-comment-element-id",VELT_COMMENT_TYPE:"data-velt-comment-type",TARGET_INLINE_COMMENT_ELEMENT_ID:"target-inline-comment-element-id",TARGET_COMMENT_ELEMENT_ID:"target-comment-element-id",TARGET_ELEMENT_ID:"target-element-id",VELT_ID:"data-velt-id",VELT_ELEMENT:"data-velt-element",VELT_SCREEN_RECORDER_PANEL:"data-velt-screen-recorder-panel",VELT_SOURCE_ID:"data-velt-source-id",VELT_ANNOTATION_ID:"data-velt-annotation-id",VELT_ANNOTATION_IDS:"data-velt-annotation-ids",VELT_COMMENT_PIN_HOST:"data-velt-comment-pin-host",VELT_COMMENT_PIN_HOST_STATIC:"data-velt-comment-pin-host-static",VELT_COMMENT_DISABLED:"data-velt-comment-disabled",VELT_MANUAL_COMMENT_CONTAINER:"data-velt-manual-comment-container",VELT_COMMENT_PIN_ACTIVE:"data-velt-comment-pin-active",VELT_INLINE_COMMENT_SECTION_CONFIG:"data-velt-inline-comment-section-config",VELT_TARGET_INLINE_COMMENT_ELEMENT_ID:"data-velt-target-inline-comment-element-id",VELT_TAG_PIN_HOST:"data-velt-tag-pin-host",VELT_TAG_PIN_HOST_STATIC:"data-velt-tag-pin-host-static",VELT_TAG_DISABLED:"data-velt-tag-disabled",VELT_RECORDER_PIN_HOST:"data-velt-recorder-pin-host",VELT_RECORDER_PIN_HOST_STATIC:"data-velt-recorder-pin-host-static",VELT_RECORDER_DISABLED:"data-velt-recorder-disabled",VELT_ANNOTATION_DRAFT:"data-velt-annotation-draft",VELT_ANNOTATION_EDIT_COMMENT:"data-velt-annotation-edit-comment",VELT_DOCUMENT_ID:"data-velt-document-id",VELT_LOCATION:"data-velt-location",VELT_LOCATION_ID:"data-velt-location-id",VELT_THEME:"data-velt-theme",VELT_IGNORE:"data-velt-ignore",EMBED_MODE:"embed-mode",DEFAULT_CURSOR:"default-cursor",VELT_HUDDLE_ON_CURSOR_MODE:"data-velt-huddle-on-cursor-mode",VELT_SELECTION_ENABLED:"data-live-selection-enabled",VELT_LIVE_SELECTION_ENABLED:"data-velt-live-selection-enabled",VELT_LIVE_SELECTION_USER_INDICATOR_POSITION:"data-velt-live-selection-user-indicator-position",VELT_LIVE_SELECTION_USER_INDICATOR_TYPE:"data-velt-live-selection-user-indicator-type",VELT_SELECTION_CONFIG:"data-live-selection-config",VELT_POPOVER_MODE:"data-velt-popover-mode",VELT_ELEMENT_CACHE_ID:"data-velt-cache-id",VELT_ARROW_PIN_HOST:"data-velt-arrow-pin-host",VELT_ARROW_PIN_HOST_STATIC:"data-velt-arrow-pin-host-static",VELT_ARROW_DISABLED:"data-velt-arrow-disabled",VELT_AREA_PIN_HOST:"data-velt-area-pin-host",VELT_AREA_PIN_HOST_STATIC:"data-velt-area-pin-host-static",VELT_AREA_DISABLED:"data-velt-area-disabled",VELT_AREA_PIN_ACTIVE:"data-velt-area-pin-active",VELT_ONGOING_RECORDING:"data-velt-ongoing-recording",VELT_COMMENT_RECORDING:"data-velt-comment-recording",SYNC_VIDEO_PLAYER_ID:"data-sync-video-player-id",SYNC_VIDEO_PLAYER:"data-sync-video-player",VELT_INLINE_COMMENT_ID:"inline-comment-id",VELT_PDF_VIEWER:"data-velt-pdf-viewer",VELT_SYNC_STATE:"data-velt-sync-state",VELT_SYNC_ACCESS:"data-velt-sync-access",VELT_SYNC_ACCESS_AUTO:"data-velt-sync-access-auto",VELT_SYNC_ACCESS_DISABLED:"data-velt-sync-access-disabled",VELT_SINGLE_EDITOR_MODE_CONTAINER:"data-velt-single-editor-mode-container",VELT_IFRAME_CONTAINER:"data-velt-iframe-container",VELT_IFRAME_CONTAINER_STATIC:"data-velt-iframe-container-static",VELT_IS_FIRST_COMPONENT:"data-velt-is-first-component",VELT_DOWNLOAD_BUTTON:"velt-download-button",VELT_COMMENT_DIALOG_PORTAL_INTERNAL:"velt-comment-dialog-portal-internal",ANNOTATION_ID:"annotation-id",MULTI_THREAD_ANNOTATION_ID:"multi-thread-annotation-id",SLATE_EDITOR:"data-slate-editor"},ut.INJECTION_STYLE_PROPS={VELT_AVATAR_COLOR:"data-velt-avatar-color",VELT_COMMENT_PRIORITY_COLOR:"data-velt-priority-color"},ut.INJECTION_ATTRIBUTES={VELT_AVATAR_IMG:"data-velt-avatar-img",VELT_COMMENT_LENGTH:"data-velt-comment-thread-length"},ut.SESSION_STORAGE={SNIPPYLY_AUTO_SELECT_ANNOTATION_ID:"snippylyAutoSelectAnnotationId",SNIPPYLY_SELECTED_ANNOTATION_ID:"snippylySelectedAnnotationId",SNIPPYLY_COMMENT_SIDEBAR_FILTERS:"snippylyCommentSidebarFilters",SNIPPYLY_COMMENT_SIDEBAR_GROUP_BY:"snippylyCommentSidebarGroupBy",SNIPPYLY_COMMENT_DIALOG_AUTO_POPULATE_TEXT:"snippylyCommentDialogAutoPopulateText",SNIPPYLY_HUDDLE_DATA:"snippylyHuddleData",VELT_TAB_ID:"veltTabId",VELT_COMMENT_SIDEBAR_FILTERS_RESET:"veltCommentSidebarFiltersReset",VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE:"veltCommentSidebarCustomActionsState",VELT_CURSOR_MULTIPLE_USERS_DETECTED:"veltCursorMultipleUsersDetected",VELT_PRESENCE_MULTIPLE_USERS_DETECTED:"veltPresenceMultipleUsersDetected",VELT_CUSTOM_PRIORITY_MAP:"veltCustomPriorityMap",VELT_CUSTOM_STATUS_MAP:"veltCustomStatusMap",VELT_CUSTOM_CATEGORY_MAP:"veltCustomCategoryMap"},ut.LOCAL_STORAGE={SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS:"snippylyDefaultMediaSourceOptions",SNIPPYLY_QUEUED_COMMENT:"snippylyQueuedComment",VELT_USER:"_vu",VELT_USER_FORCE_RE_LOGGED_IN:"_vurli",VELT_VERSION:"_vv",VELT_ADVANCED_QUERIES:"_vadq",VELT_COMMENT_VIEWS_MIGRATED:"_vcvm"},ut.NON_NESTABLE_ELEMENTS={img:!0,video:!0,audio:!0,input:!0,meter:!0,progress:!0,select:!0,textarea:!0,svg:!0,"lottie-player":!0,"ng-lottie":!0,canvas:!0,hr:!0},ut.INGNORE_MUTATION_OBSERVER_CHANGE_TAGS={svg:!0},ut.SELECTION_ENABLED_ELEMENTS={input:!0,textarea:!0,select:!0,button:!0},ut.URL_PARAMS={REVIEW_MODE:"review",REVIEW_DOC_ID:"sreviewId",SNIPPYLY_USER:"snippyly-user",COMMENT_ID:"scommentId",TAG_ID:"stagId",RECORDER_ID:"srecorderId",PROJECT_INSTALL:"sprojectInstall"},ut.VELT_BASE_REM_UNIT="--velt-base-rem-unit",ut.VELT_VIEWPORT_WIDTH="--legacy-velt-viewport-width",ut.VELT_VIEWPORT_HEIGHT="--legacy-velt-viewport-height",ut.VELT_SELECTION_COLOR="--velt-selection-color",ut.VELT_MIN_ARROW_LENGTH=100,ut.VELT_ARROW_VIEWPORT_PADDING=20,ut.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME=5,ut.CURSOR={COMMENT_PIN:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0iIzYyNURGNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9InBhdGgtMS1pbnNpZGUtMV8yMDMyXzIzNjgxIiBmaWxsPSJ3aGl0ZSI+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiLz4KPC9tYXNrPgo8cGF0aCBkPSJNMC4zNTI5NDEgMThDMC4xNTgwMTcgMTggLTYuOTA3MTVlLTA5IDE3Ljg0MiAtMS41NDI3NWUtMDggMTcuNjQ3MUwtMy45MzQwMmUtMDcgOUMtNi4xMDY3M2UtMDcgNC4wMjk0NCA0LjAyOTQ0IC0xLjc2MTMyZS0wNyA5IC0zLjkzNDAyZS0wN1YtMy45MzQwMmUtMDdDMTMuOTcwNiAtNi4xMDY3M2UtMDcgMTggNC4wMjk0NCAxOCA5VjlDMTggMTMuOTcwNiAxMy45NzA2IDE4IDkgMThMMC4zNTI5NDEgMThaIiBmaWxsPSIjMTQxNDE2Ii8+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgbWFzaz0idXJsKCNwYXRoLTEtaW5zaWRlLTFfMjAzMl8yMzY4MSkiLz4KPC9zdmc+Cg==') 0 31, auto",TAG_PIN:"url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczpieD0iaHR0cHM6Ly9ib3h5LXN2Zy5jb20iPgogIDxlbGxpcHNlIHN0eWxlPSJzdHJva2U6IHJnYigwLCAwLCAwKTsgZmlsbDogcmdiKDE2MiwgODksIDI1NCk7IHBhaW50LW9yZGVyOiBmaWxsOyBzdHJva2Utd2lkdGg6IDBweDsiIGN4PSIxNiIgY3k9IjE2IiByeD0iMTYiIHJ5PSIxNiIvPgogIDxwYXRoIGQ9Ik0gOS4zMzMgMjIgQyA5LjMzMyAyMiA4IDIyIDggMjAuNjY3IEMgOCAxOS4zMzMgOS4zMzMgMTUuMzMzIDE2IDE1LjMzMyBDIDIyLjY2NyAxNS4zMzMgMjQgMTkuMzMzIDI0IDIwLjY2NyBDIDI0IDIyIDIyLjY2NyAyMiAyMi42NjcgMjIgTCA5LjMzMyAyMiBaIE0gMTYgMTQgQyAxOS4wNzkgMTQgMjEuMDA0IDEwLjY2NyAxOS40NjQgOCBDIDE4Ljc1IDYuNzYyIDE3LjQyOSA2IDE2IDYgQyAxMi45MjEgNiAxMC45OTYgOS4zMzMgMTIuNTM2IDEyIEMgMTMuMjUgMTMuMjM3IDE0LjU3MSAxNCAxNiAxNCBaIiBzdHlsZT0iZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyIgYng6b3JpZ2luPSIwLjUgMC41Ii8+Cjwvc3ZnPg==') 16 16, auto",ARROW_PIN:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNiAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy44MDU0IDEwLjAyMDdDMTQuNTQxMiA5Ljk5MTMxIDE1LjExMzggOS4zNzA5OCAxNS4wODQzIDguNjM1MThMMTQuODMwNiAyLjI4OTM5QzE0LjgwMjggMS41OTQ4NiAxNC4yNDYxIDEuMDM4MTkgMTMuNTUxNiAxLjAxMDQxTDcuMjA1NzEgMC43NTY1MzdDNi40Njk5MiAwLjcyNzEwMiA1Ljg0OTU4IDEuMjk5NzIgNS44MjAxNSAyLjAzNTUxQzUuNzkwNzEgMi43NzEzIDYuMzYzMzMgMy4zOTE2NCA3LjA5OTEyIDMuNDIxMDdMMTAuNDAyMSAzLjU1MzIxTDEuMjQxNzcgMTIuNzEzNkMwLjcyMTA2NyAxMy4yMzQzIDAuNzIxMDY3IDE0LjA3ODUgMS4yNDE3NyAxNC41OTkyQzEuNzYyNDYgMTUuMTE5OSAyLjYwNjY4IDE1LjExOTkgMy4xMjczOCAxNC41OTkyTDEyLjI4NzcgNS40Mzg4NkwxMi40MTk4IDguNzQxNzVDMTIuNDQ5MiA5LjQ3NzU0IDEzLjA2OTYgMTAuMDUwMiAxMy44MDU0IDEwLjAyMDdaIiBmaWxsPSIjOEY5NUIyIi8+Cjwvc3ZnPgo=) 15 0, auto",AREA_PIN:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNiAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy44MDU0IDEwLjAyMDdDMTQuNTQxMiA5Ljk5MTMxIDE1LjExMzggOS4zNzA5OCAxNS4wODQzIDguNjM1MThMMTQuODMwNiAyLjI4OTM5QzE0LjgwMjggMS41OTQ4NiAxNC4yNDYxIDEuMDM4MTkgMTMuNTUxNiAxLjAxMDQxTDcuMjA1NzEgMC43NTY1MzdDNi40Njk5MiAwLjcyNzEwMiA1Ljg0OTU4IDEuMjk5NzIgNS44MjAxNSAyLjAzNTUxQzUuNzkwNzEgMi43NzEzIDYuMzYzMzMgMy4zOTE2NCA3LjA5OTEyIDMuNDIxMDdMMTAuNDAyMSAzLjU1MzIxTDEuMjQxNzcgMTIuNzEzNkMwLjcyMTA2NyAxMy4yMzQzIDAuNzIxMDY3IDE0LjA3ODUgMS4yNDE3NyAxNC41OTkyQzEuNzYyNDYgMTUuMTE5OSAyLjYwNjY4IDE1LjExOTkgMy4xMjczOCAxNC41OTkyTDEyLjI4NzcgNS40Mzg4NkwxMi40MTk4IDguNzQxNzVDMTIuNDQ5MiA5LjQ3NzU0IDEzLjA2OTYgMTAuMDUwMiAxMy44MDU0IDEwLjAyMDdaIiBmaWxsPSIjOEY5NUIyIi8+Cjwvc3ZnPgo=) 16 0, auto"},ut.VIDEO_POSTER_DEFAULT_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAADIAQMAAABoEU4WAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAGUExURQAAAAEAAKSl0/gAAAAxSURBVFjD7dBBDQAgCABARjKjGZUofi0Ac+4uwkUAAAAAAMCIpYD/bQVNSsEtFfCaA8vLAaMbkVUtAAAAAElFTkSuQmCC",ut.HUDDLE_TYPE_CONFIGS={audio:{audio:!0,video:!1,presentation:!1},video:{audio:!0,video:!0,presentation:!1},presentation:{audio:!1,video:!1,presentation:!0}},ut.RecorderModes={VIDEO:"video",AUDIO:"audio",SCREEN:"screen",ALL:"all"},ut.CommentAnnotationStatusMap={OPEN:{id:"OPEN",name:"Open",color:"var(--velt-accent, #625DF5)",lightColor:"var(--velt-accent-light, #E7E8FA)",type:"default",svg:`
70
+ `],encapsulation:2,changeDetection:0})}return i})(),Woe=new mt("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.reposition()}});function ike(i){return()=>i.scrollStrategies.reposition()}var oke={provide:Woe,deps:[Ri],useFactory:ike},rke={passive:!0};var FS=new WeakMap,Wp=(()=>{class i{_overlay=be(Ri);_element=be(R);_viewContainerRef=be(Si);_menuItemInstance=be(il,{optional:!0,self:!0});_dir=be($r,{optional:!0});_focusMonitor=be(zu);_ngZone=be(Vt);_scrollStrategy=be(Woe);_changeDetectorRef=be(tn);_cleanupTouchstart;_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=bn.EMPTY;_hoverSubscription=bn.EMPTY;_menuCloseSubscription=bn.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(n){this.menu=n}get menu(){return this._menu}set menu(n){n!==this._menu&&(this._menu=n,this._menuCloseSubscription.unsubscribe(),n&&(this._parentMaterialMenu,this._menuCloseSubscription=n.close.subscribe(e=>{this._destroyMenu(e),(e==="click"||e==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(e)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}_menu;menuData;restoreFocus=!0;menuOpened=new Me;onMenuOpen=this.menuOpened;menuClosed=new Me;onMenuClose=this.menuClosed;constructor(){let n=be(WU,{optional:!0}),e=be(eo);this._parentMaterialMenu=n instanceof kl?n:void 0,this._cleanupTouchstart=yr(e,this._element.nativeElement,"touchstart",t=>{Mm(t)||(this._openedBy="touch")},rke)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this.menu&&this._ownsMenu(this.menu)&&FS.delete(this.menu),this._cleanupTouchstart(),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let n=this.menu;if(this._menuOpen||!n)return;this._pendingRemoval?.unsubscribe();let e=FS.get(n);FS.set(n,this),e&&e!==this&&e.closeMenu();let t=this._createOverlay(n),r=t.getConfig(),a=r.positionStrategy;this._setPosition(n,a),r.hasBackdrop=n.hasBackdrop==null?!this.triggersSubmenu():n.hasBackdrop,t.hasAttached()||(t.attach(this._getPortal(n)),n.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),n.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),n instanceof kl&&(n._setIsOpen(!0),n._directDescendantItems.changes.pipe(po(n.close)).subscribe(()=>{a.withLockedPosition(!1).reapplyLastPosition(),a.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(n,e){this._focusMonitor&&n?this._focusMonitor.focusVia(this._element,n,e):this._element.nativeElement.focus(e)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(n){let e=this._overlayRef,t=this._menu;!e||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),t instanceof kl&&this._ownsMenu(t)?(this._pendingRemoval=t._animationDone.pipe(rt(1)).subscribe(()=>{e.detach(),t.lazyContent?.detach()}),t._setIsOpen(!1)):(e.detach(),t?.lazyContent?.detach()),t&&this._ownsMenu(t)&&FS.delete(t),this.restoreFocus&&(n==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(n){n!==this._menuOpen&&(this._menuOpen=n,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(n),this._changeDetectorRef.markForCheck())}_createOverlay(n){if(!this._overlayRef){let e=this._getOverlayConfig(n);this._subscribeToPositions(n,e.positionStrategy),this._overlayRef=this._overlay.create(e),this._overlayRef.keydownEvents().subscribe(t=>{this.menu instanceof kl&&this.menu._handleKeydown(t)})}return this._overlayRef}_getOverlayConfig(n){return new vc({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:n.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:n.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr"})}_subscribeToPositions(n,e){n.setPositionClasses&&e.positionChanges.subscribe(t=>{this._ngZone.run(()=>{let r=t.connectionPair.overlayX==="start"?"after":"before",a=t.connectionPair.overlayY==="top"?"below":"above";n.setPositionClasses(r,a)})})}_setPosition(n,e){let[t,r]=n.xPosition==="before"?["end","start"]:["start","end"],[a,s]=n.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,p]=[a,s],[g,C]=[t,r],E=0;if(this.triggersSubmenu()){if(C=t=n.xPosition==="before"?"start":"end",r=g=t==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let D=this._parentMaterialMenu.items.first;this._parentInnerPadding=D?D._getHostElement().offsetTop:0}E=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else n.overlapTrigger||(c=a==="top"?"bottom":"top",p=s==="top"?"bottom":"top");e.withPositions([{originX:t,originY:c,overlayX:g,overlayY:a,offsetY:E},{originX:r,originY:c,overlayX:C,overlayY:a,offsetY:E},{originX:t,originY:p,overlayX:g,overlayY:s,offsetY:-E},{originX:r,originY:p,overlayX:C,overlayY:s,offsetY:-E}])}_menuClosingActions(){let n=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),t=this._parentMaterialMenu?this._parentMaterialMenu.closed:se(),r=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Le(a=>this._menuOpen&&a!==this._menuItemInstance)):se();return mo(n,t,r,e)}_handleMousedown(n){Pm(n)||(this._openedBy=n.button===0?"mouse":void 0,this.triggersSubmenu()&&n.preventDefault())}_handleKeydown(n){let e=n.keyCode;(e===13||e===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===39&&this.dir==="ltr"||e===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(n){this.triggersSubmenu()?(n.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(n=>{n===this._menuItemInstance&&!n.disabled&&(this._openedBy="mouse",this.openMenu())}))}_getPortal(n){return(!this._portal||this._portal.templateRef!==n.templateRef)&&(this._portal=new ga(n.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(n){return FS.get(n)===this}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Ht({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(e,t){e&1&&G("click",function(a){return t._handleClick(a)})("mousedown",function(a){return t._handleMousedown(a)})("keydown",function(a){return t._handleKeydown(a)}),e&2&&x("aria-haspopup",t.menu?"menu":null)("aria-expanded",t.menuOpen)("aria-controls",t.menuOpen?t.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]})}return i})(),qoe=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[oke],imports:[yv,Lo,Zs,fc,Lo]})}return i})(),Yoe={transformMenu:{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.8)"},offset:null}},{type:1,expr:"void => enter",animation:{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1)"},offset:null},timings:"120ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}},fadeInItems:{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null}},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}},jTn=Yoe.fadeInItems,$Tn=Yoe.transformMenu;var qU=20;var Koe=new mt("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=be(Ri);return()=>i.scrollStrategies.reposition({scrollThrottle:qU})}});function Zoe(i){return()=>i.scrollStrategies.reposition({scrollThrottle:qU})}var Xoe={provide:Koe,deps:[Ri],useFactory:Zoe};var YU=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:[Xoe],imports:[IS,Zs,Lo,Lo,fc]})}return i})();var Hn=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(Hn||{}),Rl="*";function KU(i,o){return{type:Hn.Trigger,name:i,definitions:o,options:{}}}function yP(i,o=null){return{type:Hn.Animate,styles:o,timings:i}}function Qoe(i,o=null){return{type:Hn.Sequence,steps:i,options:o}}function Ad(i){return{type:Hn.Style,styles:i,offset:null}}function SP(i,o,n){return{type:Hn.State,name:i,styles:o,options:n}}function bP(i,o,n=null){return{type:Hn.Transition,expr:i,animation:o,options:n}}var Od=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(o=0,n=0){this.totalTime=o+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(o=>o()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(o){this._position=this.totalTime?o*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(o){let n=o=="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},qu=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(o){this.players=o;let n=0,e=0,t=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(a=>{a.onDone(()=>{++n==r&&this._onFinish()}),a.onDestroy(()=>{++e==r&&this._onDestroy()}),a.onStart(()=>{++t==r&&this._onStart()})}),this.totalTime=this.players.reduce((a,s)=>Math.max(a,s.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this.players.forEach(o=>o.init())}onStart(o){this._onStartFns.push(o)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(o=>o()),this._onStartFns=[])}onDone(o){this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(o=>o.play())}pause(){this.players.forEach(o=>o.pause())}restart(){this.players.forEach(o=>o.restart())}finish(){this._onFinish(),this.players.forEach(o=>o.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(o=>o.destroy()),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}reset(){this.players.forEach(o=>o.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(o){let n=o*this.totalTime;this.players.forEach(e=>{let t=e.totalTime?Math.min(1,n/e.totalTime):1;e.setPosition(t)})}getPosition(){let o=this.players.reduce((n,e)=>n===null||e.totalTime>n.totalTime?e:n,null);return o!=null?o.getPosition():0}beforeDestroy(){this.players.forEach(o=>{o.beforeDestroy&&o.beforeDestroy()})}triggerCallback(o){let n=o=="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},Sv="!";function Joe(i){return new Tt(3e3,!1)}function ake(){return new Tt(3100,!1)}function ske(){return new Tt(3101,!1)}function lke(i){return new Tt(3001,!1)}function cke(i){return new Tt(3003,!1)}function dke(i){return new Tt(3004,!1)}function tre(i,o){return new Tt(3005,!1)}function nre(){return new Tt(3006,!1)}function ire(){return new Tt(3007,!1)}function ore(i,o){return new Tt(3008,!1)}function rre(i){return new Tt(3002,!1)}function are(i,o,n,e,t){return new Tt(3010,!1)}function sre(){return new Tt(3011,!1)}function lre(){return new Tt(3012,!1)}function cre(){return new Tt(3200,!1)}function dre(){return new Tt(3202,!1)}function mre(){return new Tt(3013,!1)}function pre(i){return new Tt(3014,!1)}function gre(i){return new Tt(3015,!1)}function ure(i){return new Tt(3016,!1)}function hre(i,o){return new Tt(3404,!1)}function mke(i){return new Tt(3502,!1)}function fre(i){return new Tt(3503,!1)}function vre(){return new Tt(3300,!1)}function Cre(i){return new Tt(3504,!1)}function _re(i){return new Tt(3301,!1)}function yre(i,o){return new Tt(3302,!1)}function Sre(i){return new Tt(3303,!1)}function bre(i,o){return new Tt(3400,!1)}function Ire(i){return new Tt(3401,!1)}function Ere(i){return new Tt(3402,!1)}function xre(i,o){return new Tt(3505,!1)}function Gm(i){switch(i.length){case 0:return new Od;case 1:return i[0];default:return new qu(i)}}function JU(i,o,n=new Map,e=new Map){let t=[],r=[],a=-1,s=null;if(o.forEach(c=>{let p=c.get("offset"),g=p==a,C=g&&s||new Map;c.forEach((E,D)=>{let L=D,z=E;if(D!=="offset")switch(L=i.normalizePropertyName(L,t),z){case Sv:z=n.get(D);break;case Rl:z=e.get(D);break;default:z=i.normalizeStyleValue(D,L,z,t);break}C.set(L,z)}),g||r.push(C),s=C,a=p}),t.length)throw mke(t);return r}function IP(i,o,n,e){switch(o){case"start":i.onStart(()=>e(n&&ZU(n,"start",i)));break;case"done":i.onDone(()=>e(n&&ZU(n,"done",i)));break;case"destroy":i.onDestroy(()=>e(n&&ZU(n,"destroy",i)));break}}function ZU(i,o,n){let e=n.totalTime,t=!!n.disabled,r=EP(i.element,i.triggerName,i.fromState,i.toState,o||i.phaseName,e??i.totalTime,t),a=i._data;return a!=null&&(r._data=a),r}function EP(i,o,n,e,t="",r=0,a){return{element:i,triggerName:o,fromState:n,toState:e,phaseName:t,totalTime:r,disabled:!!a}}function Os(i,o,n){let e=i.get(o);return e||i.set(o,e=n),e}function ej(i){let o=i.indexOf(":"),n=i.substring(1,o),e=i.slice(o+1);return[n,e]}var pke=typeof document>"u"?null:document.documentElement;function xP(i){let o=i.parentNode||i.host||null;return o===pke?null:o}function gke(i){return i.substring(1,6)=="ebkit"}var Yu=null,ere=!1;function Tre(i){Yu||(Yu=uke()||{},ere=Yu.style?"WebkitAppearance"in Yu.style:!1);let o=!0;return Yu.style&&!gke(i)&&(o=i in Yu.style,!o&&ere&&(o="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Yu.style)),o}function uke(){return typeof document<"u"?document.body:null}function tj(i,o){for(;o;){if(o===i)return!0;o=xP(o)}return!1}function nj(i,o,n){if(n)return Array.from(i.querySelectorAll(o));let e=i.querySelector(o);return e?[e]:[]}var hke=1e3,ij="{{",fke="}}",oj="ng-enter",TP="ng-leave",BS="ng-trigger",VS=".ng-trigger",rj="ng-animating",DP=".ng-animating";function Pd(i){if(typeof i=="number")return i;let o=i.match(/^(-?[\.\d]+)(m?s)/);return!o||o.length<2?0:XU(parseFloat(o[1]),o[2])}function XU(i,o){switch(o){case"s":return i*hke;default:return i}}function US(i,o,n){return i.hasOwnProperty("duration")?i:vke(i,o,n)}function vke(i,o,n){let e=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,t,r=0,a="";if(typeof i=="string"){let s=i.match(e);if(s===null)return o.push(Joe(i)),{duration:0,delay:0,easing:""};t=XU(parseFloat(s[1]),s[2]);let c=s[3];c!=null&&(r=XU(parseFloat(c),s[4]));let p=s[5];p&&(a=p)}else t=i;if(!n){let s=!1,c=o.length;t<0&&(o.push(ake()),s=!0),r<0&&(o.push(ske()),s=!0),s&&o.splice(c,0,Joe(i))}return{duration:t,delay:r,easing:a}}function Dre(i){return i.length?i[0]instanceof Map?i:i.map(o=>new Map(Object.entries(o))):[]}function wc(i,o,n){o.forEach((e,t)=>{let r=wP(t);n&&!n.has(t)&&n.set(t,i.style[r]),i.style[r]=e})}function qp(i,o){o.forEach((n,e)=>{let t=wP(e);i.style[t]=""})}function bv(i){return Array.isArray(i)?i.length==1?i[0]:Qoe(i):i}function wre(i,o,n){let e=o.params||{},t=aj(i);t.length&&t.forEach(r=>{e.hasOwnProperty(r)||n.push(lke(r))})}var QU=new RegExp(`${ij}\\s*(.+?)\\s*${fke}`,"g");function aj(i){let o=[];if(typeof i=="string"){let n;for(;n=QU.exec(i);)o.push(n[1]);QU.lastIndex=0}return o}function Iv(i,o,n){let e=`${i}`,t=e.replace(QU,(r,a)=>{let s=o[a];return s==null&&(n.push(cke(a)),s=""),s.toString()});return t==e?i:t}var Cke=/-+([a-z0-9])/g;function wP(i){return i.replace(Cke,(...o)=>o[1].toUpperCase())}function Ore(i,o){return i===0||o===0}function Are(i,o,n){if(n.size&&o.length){let e=o[0],t=[];if(n.forEach((r,a)=>{e.has(a)||t.push(a),e.set(a,r)}),t.length)for(let r=1;r<o.length;r++){let a=o[r];t.forEach(s=>a.set(s,OP(i,s)))}}return o}function As(i,o,n){switch(o.type){case Hn.Trigger:return i.visitTrigger(o,n);case Hn.State:return i.visitState(o,n);case Hn.Transition:return i.visitTransition(o,n);case Hn.Sequence:return i.visitSequence(o,n);case Hn.Group:return i.visitGroup(o,n);case Hn.Animate:return i.visitAnimate(o,n);case Hn.Keyframes:return i.visitKeyframes(o,n);case Hn.Style:return i.visitStyle(o,n);case Hn.Reference:return i.visitReference(o,n);case Hn.AnimateChild:return i.visitAnimateChild(o,n);case Hn.AnimateRef:return i.visitAnimateRef(o,n);case Hn.Query:return i.visitQuery(o,n);case Hn.Stagger:return i.visitStagger(o,n);default:throw dke(o.type)}}function OP(i,o){return window.getComputedStyle(i)[o]}var Ij=(()=>{class i{validateStyleProperty(n){return Tre(n)}containsElement(n,e){return tj(n,e)}getParentElement(n){return xP(n)}query(n,e,t){return nj(n,e,t)}computeStyle(n,e,t){return t||""}animate(n,e,t,r,a,s=[],c){return new Od(t,r)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac})}return i})(),Zu=class{static NOOP=new Ij},Xu=class{};var _ke=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),RP=class extends Xu{normalizePropertyName(o,n){return wP(o)}normalizeStyleValue(o,n,e,t){let r="",a=e.toString().trim();if(_ke.has(n)&&e!==0&&e!=="0")if(typeof e=="number")r="px";else{let s=e.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&t.push(tre(o,e))}return a+r}};var NP="*";function yke(i,o){let n=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(e=>Ske(e,n,o)):n.push(i),n}function Ske(i,o,n){if(i[0]==":"){let c=bke(i,n);if(typeof c=="function"){o.push(c);return}i=c}let e=i.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(e==null||e.length<4)return n.push(gre(i)),o;let t=e[1],r=e[2],a=e[3];o.push(Pre(t,a));let s=t==NP&&a==NP;r[0]=="<"&&!s&&o.push(Pre(a,t))}function bke(i,o){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,e)=>parseFloat(e)>parseFloat(n);case":decrement":return(n,e)=>parseFloat(e)<parseFloat(n);default:return o.push(ure(i)),"* => *"}}var AP=new Set(["true","1"]),PP=new Set(["false","0"]);function Pre(i,o){let n=AP.has(i)||PP.has(i),e=AP.has(o)||PP.has(o);return(t,r)=>{let a=i==NP||i==t,s=o==NP||o==r;return!a&&n&&typeof t=="boolean"&&(a=t?AP.has(i):PP.has(i)),!s&&e&&typeof r=="boolean"&&(s=r?AP.has(o):PP.has(o)),a&&s}}var jre=":self",Ike=new RegExp(`s*${jre}s*,?`,"g");function $re(i,o,n,e){return new pj(i).build(o,n,e)}var Mre="",pj=class{_driver;constructor(o){this._driver=o}build(o,n,e){let t=new gj(n);return this._resetContextStyleTimingState(t),As(this,bv(o),t)}_resetContextStyleTimingState(o){o.currentQuerySelector=Mre,o.collectedStyles=new Map,o.collectedStyles.set(Mre,new Map),o.currentTime=0}visitTrigger(o,n){let e=n.queryCount=0,t=n.depCount=0,r=[],a=[];return o.name.charAt(0)=="@"&&n.errors.push(nre()),o.definitions.forEach(s=>{if(this._resetContextStyleTimingState(n),s.type==Hn.State){let c=s,p=c.name;p.toString().split(/\s*,\s*/).forEach(g=>{c.name=g,r.push(this.visitState(c,n))}),c.name=p}else if(s.type==Hn.Transition){let c=this.visitTransition(s,n);e+=c.queryCount,t+=c.depCount,a.push(c)}else n.errors.push(ire())}),{type:Hn.Trigger,name:o.name,states:r,transitions:a,queryCount:e,depCount:t,options:null}}visitState(o,n){let e=this.visitStyle(o.styles,n),t=o.options&&o.options.params||null;if(e.containsDynamicStyles){let r=new Set,a=t||{};e.styles.forEach(s=>{s instanceof Map&&s.forEach(c=>{aj(c).forEach(p=>{a.hasOwnProperty(p)||r.add(p)})})}),r.size&&n.errors.push(ore(o.name,[...r.values()]))}return{type:Hn.State,name:o.name,style:e,options:t?{params:t}:null}}visitTransition(o,n){n.queryCount=0,n.depCount=0;let e=As(this,bv(o.animation),n),t=yke(o.expr,n.errors);return{type:Hn.Transition,matchers:t,animation:e,queryCount:n.queryCount,depCount:n.depCount,options:Ku(o.options)}}visitSequence(o,n){return{type:Hn.Sequence,steps:o.steps.map(e=>As(this,e,n)),options:Ku(o.options)}}visitGroup(o,n){let e=n.currentTime,t=0,r=o.steps.map(a=>{n.currentTime=e;let s=As(this,a,n);return t=Math.max(t,n.currentTime),s});return n.currentTime=t,{type:Hn.Group,steps:r,options:Ku(o.options)}}visitAnimate(o,n){let e=Dke(o.timings,n.errors);n.currentAnimateTimings=e;let t,r=o.styles?o.styles:Ad({});if(r.type==Hn.Keyframes)t=this.visitKeyframes(r,n);else{let a=o.styles,s=!1;if(!a){s=!0;let p={};e.easing&&(p.easing=e.easing),a=Ad(p)}n.currentTime+=e.duration+e.delay;let c=this.visitStyle(a,n);c.isEmptyStep=s,t=c}return n.currentAnimateTimings=null,{type:Hn.Animate,timings:e,style:t,options:null}}visitStyle(o,n){let e=this._makeStyleAst(o,n);return this._validateStyleAst(e,n),e}_makeStyleAst(o,n){let e=[],t=Array.isArray(o.styles)?o.styles:[o.styles];for(let s of t)typeof s=="string"?s===Rl?e.push(s):n.errors.push(rre(s)):e.push(new Map(Object.entries(s)));let r=!1,a=null;return e.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(a=s.get("easing"),s.delete("easing")),!r)){for(let c of s.values())if(c.toString().indexOf(ij)>=0){r=!0;break}}}),{type:Hn.Style,styles:e,easing:a,offset:o.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(o,n){let e=n.currentAnimateTimings,t=n.currentTime,r=n.currentTime;e&&r>0&&(r-=e.duration+e.delay),o.styles.forEach(a=>{typeof a!="string"&&a.forEach((s,c)=>{let p=n.collectedStyles.get(n.currentQuerySelector),g=p.get(c),C=!0;g&&(r!=t&&r>=g.startTime&&t<=g.endTime&&(n.errors.push(are(c,g.startTime,g.endTime,r,t)),C=!1),r=g.startTime),C&&p.set(c,{startTime:r,endTime:t}),n.options&&wre(s,n.options,n.errors)})})}visitKeyframes(o,n){let e={type:Hn.Keyframes,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(sre()),e;let t=1,r=0,a=[],s=!1,c=!1,p=0,g=o.steps.map(ee=>{let me=this._makeStyleAst(ee,n),Ce=me.offset!=null?me.offset:Tke(me.styles),Ae=0;return Ce!=null&&(r++,Ae=me.offset=Ce),c=c||Ae<0||Ae>1,s=s||Ae<p,p=Ae,a.push(Ae),me});c&&n.errors.push(lre()),s&&n.errors.push(cre());let C=o.steps.length,E=0;r>0&&r<C?n.errors.push(dre()):r==0&&(E=t/(C-1));let D=C-1,L=n.currentTime,z=n.currentAnimateTimings,W=z.duration;return g.forEach((ee,me)=>{let Ce=E>0?me==D?1:E*me:a[me],Ae=Ce*W;n.currentTime=L+z.delay+Ae,z.duration=Ae,this._validateStyleAst(ee,n),ee.offset=Ce,e.styles.push(ee)}),e}visitReference(o,n){return{type:Hn.Reference,animation:As(this,bv(o.animation),n),options:Ku(o.options)}}visitAnimateChild(o,n){return n.depCount++,{type:Hn.AnimateChild,options:Ku(o.options)}}visitAnimateRef(o,n){return{type:Hn.AnimateRef,animation:this.visitReference(o.animation,n),options:Ku(o.options)}}visitQuery(o,n){let e=n.currentQuerySelector,t=o.options||{};n.queryCount++,n.currentQuery=o;let[r,a]=Eke(o.selector);n.currentQuerySelector=e.length?e+" "+r:r,Os(n.collectedStyles,n.currentQuerySelector,new Map);let s=As(this,bv(o.animation),n);return n.currentQuery=null,n.currentQuerySelector=e,{type:Hn.Query,selector:r,limit:t.limit||0,optional:!!t.optional,includeSelf:a,animation:s,originalSelector:o.selector,options:Ku(o.options)}}visitStagger(o,n){n.currentQuery||n.errors.push(mre());let e=o.timings==="full"?{duration:0,delay:0,easing:"full"}:US(o.timings,n.errors,!0);return{type:Hn.Stagger,animation:As(this,bv(o.animation),n),timings:e,options:null}}};function Eke(i){let o=!!i.split(/\s*,\s*/).find(n=>n==jre);return o&&(i=i.replace(Ike,"")),i=i.replace(/@\*/g,VS).replace(/@\w+/g,n=>VS+"-"+n.slice(1)).replace(/:animating/g,DP),[i,o]}function xke(i){return i?I({},i):null}var gj=class{errors;queryCount=0;depCount=0;currentTransition=null;currentQuery=null;currentQuerySelector=null;currentAnimateTimings=null;currentTime=0;collectedStyles=new Map;options=null;unsupportedCSSPropertiesFound=new Set;constructor(o){this.errors=o}};function Tke(i){if(typeof i=="string")return null;let o=null;if(Array.isArray(i))i.forEach(n=>{if(n instanceof Map&&n.has("offset")){let e=n;o=parseFloat(e.get("offset")),e.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let n=i;o=parseFloat(n.get("offset")),n.delete("offset")}return o}function Dke(i,o){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let r=US(i,o).duration;return sj(r,0,"")}let n=i;if(n.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=sj(0,0,"");return r.dynamic=!0,r.strValue=n,r}let t=US(n,o);return sj(t.duration,t.delay,t.easing)}function Ku(i){return i?(i=I({},i),i.params&&(i.params=xke(i.params))):i={},i}function sj(i,o,n){return{duration:i,delay:o,easing:n}}function Ej(i,o,n,e,t,r,a=null,s=!1){return{type:1,element:i,keyframes:o,preStyleProps:n,postStyleProps:e,duration:t,delay:r,totalTime:t+r,easing:a,subTimeline:s}}var $S=class{_map=new Map;get(o){return this._map.get(o)||[]}append(o,n){let e=this._map.get(o);e||this._map.set(o,e=[]),e.push(...n)}has(o){return this._map.has(o)}clear(){this._map.clear()}},wke=1,Oke=":enter",Ake=new RegExp(Oke,"g"),Pke=":leave",Mke=new RegExp(Pke,"g");function Hre(i,o,n,e,t,r=new Map,a=new Map,s,c,p=[]){return new uj().buildKeyframes(i,o,n,e,t,r,a,s,c,p)}var uj=class{buildKeyframes(o,n,e,t,r,a,s,c,p,g=[]){p=p||new $S;let C=new hj(o,n,p,t,r,g,[]);C.options=c;let E=c.delay?Pd(c.delay):0;C.currentTimeline.delayNextStep(E),C.currentTimeline.setStyles([a],null,C.errors,c),As(this,e,C);let D=C.timelines.filter(L=>L.containsAnimation());if(D.length&&s.size){let L;for(let z=D.length-1;z>=0;z--){let W=D[z];if(W.element===n){L=W;break}}L&&!L.allowOnlyTimelineStyles()&&L.setStyles([s],null,C.errors,c)}return D.length?D.map(L=>L.buildKeyframes()):[Ej(n,[],[],[],0,E,"",!1)]}visitTrigger(o,n){}visitState(o,n){}visitTransition(o,n){}visitAnimateChild(o,n){let e=n.subInstructions.get(n.element);if(e){let t=n.createSubContext(o.options),r=n.currentTimeline.currentTime,a=this._visitSubInstructions(e,t,t.options);r!=a&&n.transformIntoNewTimeline(a)}n.previousNode=o}visitAnimateRef(o,n){let e=n.createSubContext(o.options);e.transformIntoNewTimeline(),this._applyAnimationRefDelays([o.options,o.animation.options],n,e),this.visitReference(o.animation,e),n.transformIntoNewTimeline(e.currentTimeline.currentTime),n.previousNode=o}_applyAnimationRefDelays(o,n,e){for(let t of o){let r=t?.delay;if(r){let a=typeof r=="number"?r:Pd(Iv(r,t?.params??{},n.errors));e.delayNextStep(a)}}}_visitSubInstructions(o,n,e){let r=n.currentTimeline.currentTime,a=e.duration!=null?Pd(e.duration):null,s=e.delay!=null?Pd(e.delay):null;return a!==0&&o.forEach(c=>{let p=n.appendInstructionToTimeline(c,a,s);r=Math.max(r,p.duration+p.delay)}),r}visitReference(o,n){n.updateOptions(o.options,!0),As(this,o.animation,n),n.previousNode=o}visitSequence(o,n){let e=n.subContextCount,t=n,r=o.options;if(r&&(r.params||r.delay)&&(t=n.createSubContext(r),t.transformIntoNewTimeline(),r.delay!=null)){t.previousNode.type==Hn.Style&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=FP);let a=Pd(r.delay);t.delayNextStep(a)}o.steps.length&&(o.steps.forEach(a=>As(this,a,t)),t.currentTimeline.applyStylesToKeyframe(),t.subContextCount>e&&t.transformIntoNewTimeline()),n.previousNode=o}visitGroup(o,n){let e=[],t=n.currentTimeline.currentTime,r=o.options&&o.options.delay?Pd(o.options.delay):0;o.steps.forEach(a=>{let s=n.createSubContext(o.options);r&&s.delayNextStep(r),As(this,a,s),t=Math.max(t,s.currentTimeline.currentTime),e.push(s.currentTimeline)}),e.forEach(a=>n.currentTimeline.mergeTimelineCollectedStyles(a)),n.transformIntoNewTimeline(t),n.previousNode=o}_visitTiming(o,n){if(o.dynamic){let e=o.strValue,t=n.params?Iv(e,n.params,n.errors):e;return US(t,n.errors)}else return{duration:o.duration,delay:o.delay,easing:o.easing}}visitAnimate(o,n){let e=n.currentAnimateTimings=this._visitTiming(o.timings,n),t=n.currentTimeline;e.delay&&(n.incrementTime(e.delay),t.snapshotCurrentStyles());let r=o.style;r.type==Hn.Keyframes?this.visitKeyframes(r,n):(n.incrementTime(e.duration),this.visitStyle(r,n),t.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=o}visitStyle(o,n){let e=n.currentTimeline,t=n.currentAnimateTimings;!t&&e.hasCurrentStyleProperties()&&e.forwardFrame();let r=t&&t.easing||o.easing;o.isEmptyStep?e.applyEmptyStep(r):e.setStyles(o.styles,r,n.errors,n.options),n.previousNode=o}visitKeyframes(o,n){let e=n.currentAnimateTimings,t=n.currentTimeline.duration,r=e.duration,s=n.createSubContext().currentTimeline;s.easing=e.easing,o.styles.forEach(c=>{let p=c.offset||0;s.forwardTime(p*r),s.setStyles(c.styles,c.easing,n.errors,n.options),s.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(s),n.transformIntoNewTimeline(t+r),n.previousNode=o}visitQuery(o,n){let e=n.currentTimeline.currentTime,t=o.options||{},r=t.delay?Pd(t.delay):0;r&&(n.previousNode.type===Hn.Style||e==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=FP);let a=e,s=n.invokeQuery(o.selector,o.originalSelector,o.limit,o.includeSelf,!!t.optional,n.errors);n.currentQueryTotal=s.length;let c=null;s.forEach((p,g)=>{n.currentQueryIndex=g;let C=n.createSubContext(o.options,p);r&&C.delayNextStep(r),p===n.element&&(c=C.currentTimeline),As(this,o.animation,C),C.currentTimeline.applyStylesToKeyframe();let E=C.currentTimeline.currentTime;a=Math.max(a,E)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(a),c&&(n.currentTimeline.mergeTimelineCollectedStyles(c),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=o}visitStagger(o,n){let e=n.parentContext,t=n.currentTimeline,r=o.timings,a=Math.abs(r.duration),s=a*(n.currentQueryTotal-1),c=a*n.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":c=s-c;break;case"full":c=e.currentStaggerTime;break}let g=n.currentTimeline;c&&g.delayNextStep(c);let C=g.currentTime;As(this,o.animation,n),n.previousNode=o,e.currentStaggerTime=t.currentTime-C+(t.startTime-e.currentTimeline.startTime)}},FP={},hj=class i{_driver;element;subInstructions;_enterClassName;_leaveClassName;errors;timelines;parentContext=null;currentTimeline;currentAnimateTimings=null;previousNode=FP;subContextCount=0;options={};currentQueryIndex=0;currentQueryTotal=0;currentStaggerTime=0;constructor(o,n,e,t,r,a,s,c){this._driver=o,this.element=n,this.subInstructions=e,this._enterClassName=t,this._leaveClassName=r,this.errors=a,this.timelines=s,this.currentTimeline=c||new LP(this._driver,n,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(o,n){if(!o)return;let e=o,t=this.options;e.duration!=null&&(t.duration=Pd(e.duration)),e.delay!=null&&(t.delay=Pd(e.delay));let r=e.params;if(r){let a=t.params;a||(a=this.options.params={}),Object.keys(r).forEach(s=>{(!n||!a.hasOwnProperty(s))&&(a[s]=Iv(r[s],a,this.errors))})}}_copyOptions(){let o={};if(this.options){let n=this.options.params;if(n){let e=o.params={};Object.keys(n).forEach(t=>{e[t]=n[t]})}}return o}createSubContext(o=null,n,e){let t=n||this.element,r=new i(this._driver,t,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(t,e||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(o),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(o){return this.previousNode=FP,this.currentTimeline=this.currentTimeline.fork(this.element,o),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(o,n,e){let t={duration:n??o.duration,delay:this.currentTimeline.currentTime+(e??0)+o.delay,easing:""},r=new fj(this._driver,o.element,o.keyframes,o.preStyleProps,o.postStyleProps,t,o.stretchStartingKeyframe);return this.timelines.push(r),t}incrementTime(o){this.currentTimeline.forwardTime(this.currentTimeline.duration+o)}delayNextStep(o){o>0&&this.currentTimeline.delayNextStep(o)}invokeQuery(o,n,e,t,r,a){let s=[];if(t&&s.push(this.element),o.length>0){o=o.replace(Ake,"."+this._enterClassName),o=o.replace(Mke,"."+this._leaveClassName);let c=e!=1,p=this._driver.query(this.element,o,c);e!==0&&(p=e<0?p.slice(p.length+e,p.length):p.slice(0,e)),s.push(...p)}return!r&&s.length==0&&a.push(pre(n)),s}},LP=class i{_driver;element;startTime;_elementTimelineStylesLookup;duration=0;easing=null;_previousKeyframe=new Map;_currentKeyframe=new Map;_keyframes=new Map;_styleSummary=new Map;_localTimelineStyles=new Map;_globalTimelineStyles;_pendingStyles=new Map;_backFill=new Map;_currentEmptyStepKeyframe=null;constructor(o,n,e,t){this._driver=o,this.element=n,this.startTime=e,this._elementTimelineStylesLookup=t,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(o){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+o),n&&this.snapshotCurrentStyles()):this.startTime+=o}fork(o,n){return this.applyStylesToKeyframe(),new i(this._driver,o,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=wke,this._loadKeyframe()}forwardTime(o){this.applyStylesToKeyframe(),this.duration=o,this._loadKeyframe()}_updateStyle(o,n){this._localTimelineStyles.set(o,n),this._globalTimelineStyles.set(o,n),this._styleSummary.set(o,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(o){o&&this._previousKeyframe.set("easing",o);for(let[n,e]of this._globalTimelineStyles)this._backFill.set(n,e||Rl),this._currentKeyframe.set(n,Rl);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(o,n,e,t){n&&this._previousKeyframe.set("easing",n);let r=t&&t.params||{},a=kke(o,this._globalTimelineStyles);for(let[s,c]of a){let p=Iv(c,r,e);this._pendingStyles.set(s,p),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??Rl),this._updateStyle(s,p)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((o,n)=>{this._currentKeyframe.set(n,o)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((o,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,o)}))}snapshotCurrentStyles(){for(let[o,n]of this._localTimelineStyles)this._pendingStyles.set(o,n),this._updateStyle(o,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let o=[];for(let n in this._currentKeyframe)o.push(n);return o}mergeTimelineCollectedStyles(o){o._styleSummary.forEach((n,e)=>{let t=this._styleSummary.get(e);(!t||n.time>t.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let o=new Set,n=new Set,e=this._keyframes.size===1&&this.duration===0,t=[];this._keyframes.forEach((s,c)=>{let p=new Map([...this._backFill,...s]);p.forEach((g,C)=>{g===Sv?o.add(C):g===Rl&&n.add(C)}),e||p.set("offset",c/this.duration),t.push(p)});let r=[...o.values()],a=[...n.values()];if(e){let s=t[0],c=new Map(s);s.set("offset",0),c.set("offset",1),t=[s,c]}return Ej(this.element,t,r,a,this.duration,this.startTime,this.easing,!1)}},fj=class extends LP{keyframes;preStyleProps;postStyleProps;_stretchStartingKeyframe;timings;constructor(o,n,e,t,r,a,s=!1){super(o,n,a.delay),this.keyframes=e,this.preStyleProps=t,this.postStyleProps=r,this._stretchStartingKeyframe=s,this.timings={duration:a.duration,delay:a.delay,easing:a.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let o=this.keyframes,{delay:n,duration:e,easing:t}=this.timings;if(this._stretchStartingKeyframe&&n){let r=[],a=e+n,s=n/a,c=new Map(o[0]);c.set("offset",0),r.push(c);let p=new Map(o[0]);p.set("offset",kre(s)),r.push(p);let g=o.length-1;for(let C=1;C<=g;C++){let E=new Map(o[C]),D=E.get("offset"),L=n+D*e;E.set("offset",kre(L/a)),r.push(E)}e=a,n=0,t="",o=r}return Ej(this.element,o,this.preStyleProps,this.postStyleProps,e,n,t,!0)}};function kre(i,o=3){let n=Math.pow(10,o-1);return Math.round(i*n)/n}function kke(i,o){let n=new Map,e;return i.forEach(t=>{if(t==="*"){e??=o.keys();for(let r of e)n.set(r,Rl)}else for(let[r,a]of t)n.set(r,a)}),n}function Rre(i,o,n,e,t,r,a,s,c,p,g,C,E){return{type:0,element:i,triggerName:o,isRemovalTransition:t,fromState:n,fromStyles:r,toState:e,toStyles:a,timelines:s,queriedElements:c,preStyleProps:p,postStyleProps:g,totalTime:C,errors:E}}var lj={},BP=class{_triggerName;ast;_stateStyles;constructor(o,n,e){this._triggerName=o,this.ast=n,this._stateStyles=e}match(o,n,e,t){return Rke(this.ast.matchers,o,n,e,t)}buildStyles(o,n,e){let t=this._stateStyles.get("*");return o!==void 0&&(t=this._stateStyles.get(o?.toString())||t),t?t.buildStyles(n,e):new Map}build(o,n,e,t,r,a,s,c,p,g){let C=[],E=this.ast.options&&this.ast.options.params||lj,D=s&&s.params||lj,L=this.buildStyles(e,D,C),z=c&&c.params||lj,W=this.buildStyles(t,z,C),ee=new Set,me=new Map,Ce=new Map,Ae=t==="void",Ge={params:zre(z,E),delay:this.ast.options?.delay},Ne=g?[]:Hre(o,n,this.ast.animation,r,a,L,W,Ge,p,C),Ie=0;return Ne.forEach(Se=>{Ie=Math.max(Se.duration+Se.delay,Ie)}),C.length?Rre(n,this._triggerName,e,t,Ae,L,W,[],[],me,Ce,Ie,C):(Ne.forEach(Se=>{let we=Se.element,ye=Os(me,we,new Set);Se.preStyleProps.forEach(Oe=>ye.add(Oe));let fe=Os(Ce,we,new Set);Se.postStyleProps.forEach(Oe=>fe.add(Oe)),we!==n&&ee.add(we)}),Rre(n,this._triggerName,e,t,Ae,L,W,Ne,[...ee.values()],me,Ce,Ie))}};function Rke(i,o,n,e,t){return i.some(r=>r(o,n,e,t))}function zre(i,o){let n=I({},o);return Object.entries(i).forEach(([e,t])=>{t!=null&&(n[e]=t)}),n}var vj=class{styles;defaultParams;normalizer;constructor(o,n,e){this.styles=o,this.defaultParams=n,this.normalizer=e}buildStyles(o,n){let e=new Map,t=zre(o,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((a,s)=>{a&&(a=Iv(a,t,n));let c=this.normalizer.normalizePropertyName(s,n);a=this.normalizer.normalizeStyleValue(s,c,a,n),e.set(s,a)})}),e}};function Nke(i,o,n){return new Cj(i,o,n)}var Cj=class{name;ast;_normalizer;transitionFactories=[];fallbackTransition;states=new Map;constructor(o,n,e){this.name=o,this.ast=n,this._normalizer=e,n.states.forEach(t=>{let r=t.options&&t.options.params||{};this.states.set(t.name,new vj(t.style,r,e))}),Nre(this.states,"true","1"),Nre(this.states,"false","0"),n.transitions.forEach(t=>{this.transitionFactories.push(new BP(o,t,this.states))}),this.fallbackTransition=Fke(o,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(o,n,e,t){return this.transitionFactories.find(a=>a.match(o,n,e,t))||null}matchStyles(o,n,e){return this.fallbackTransition.buildStyles(o,n,e)}};function Fke(i,o,n){let e=[(a,s)=>!0],t={type:Hn.Sequence,steps:[],options:null},r={type:Hn.Transition,animation:t,matchers:e,options:null,queryCount:0,depCount:0};return new BP(i,r,o)}function Nre(i,o,n){i.has(o)?i.has(n)||i.set(n,i.get(o)):i.has(n)&&i.set(o,i.get(n))}var Lke=new $S,_j=class{bodyNode;_driver;_normalizer;_animations=new Map;_playersById=new Map;players=[];constructor(o,n,e){this.bodyNode=o,this._driver=n,this._normalizer=e}register(o,n){let e=[],t=[],r=$re(this._driver,n,e,t);if(e.length)throw fre(e);this._animations.set(o,r)}_buildPlayer(o,n,e){let t=o.element,r=JU(this._normalizer,o.keyframes,n,e);return this._driver.animate(t,r,o.duration,o.delay,o.easing,[],!0)}create(o,n,e={}){let t=[],r=this._animations.get(o),a,s=new Map;if(r?(a=Hre(this._driver,n,r,oj,TP,new Map,new Map,e,Lke,t),a.forEach(g=>{let C=Os(s,g.element,new Map);g.postStyleProps.forEach(E=>C.set(E,null))})):(t.push(vre()),a=[]),t.length)throw Cre(t);s.forEach((g,C)=>{g.forEach((E,D)=>{g.set(D,this._driver.computeStyle(C,D,Rl))})});let c=a.map(g=>{let C=s.get(g.element);return this._buildPlayer(g,new Map,C)}),p=Gm(c);return this._playersById.set(o,p),p.onDestroy(()=>this.destroy(o)),this.players.push(p),p}destroy(o){let n=this._getPlayer(o);n.destroy(),this._playersById.delete(o);let e=this.players.indexOf(n);e>=0&&this.players.splice(e,1)}_getPlayer(o){let n=this._playersById.get(o);if(!n)throw _re(o);return n}listen(o,n,e,t){let r=EP(n,"","","");return IP(this._getPlayer(o),e,r,t),()=>{}}command(o,n,e,t){if(e=="register"){this.register(o,t[0]);return}if(e=="create"){let a=t[0]||{};this.create(o,n,a);return}let r=this._getPlayer(o);switch(e){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(t[0]));break;case"destroy":this.destroy(o);break}}},Fre="ng-animate-queued",Bke=".ng-animate-queued",cj="ng-animate-disabled",Vke=".ng-animate-disabled",Uke="ng-star-inserted",jke=".ng-star-inserted",$ke=[],Gre={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Hke={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Oc="__ng_removed",HS=class{namespaceId;value;options;get params(){return this.options.params}constructor(o,n=""){this.namespaceId=n;let e=o&&o.hasOwnProperty("value"),t=e?o.value:o;if(this.value=Gke(t),e){let r=o,{value:a}=r,s=U7(r,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(o){let n=o.params;if(n){let e=this.options.params;Object.keys(n).forEach(t=>{e[t]==null&&(e[t]=n[t])})}}},jS="void",dj=new HS(jS),yj=class{id;hostElement;_engine;players=[];_triggers=new Map;_queue=[];_elementListeners=new Map;_hostClassName;constructor(o,n,e){this.id=o,this.hostElement=n,this._engine=e,this._hostClassName="ng-tns-"+o,Nl(n,this._hostClassName)}listen(o,n,e,t){if(!this._triggers.has(n))throw yre(e,n);if(e==null||e.length==0)throw Sre(n);if(!Wke(e))throw bre(e,n);let r=Os(this._elementListeners,o,[]),a={name:n,phase:e,callback:t};r.push(a);let s=Os(this._engine.statesByElement,o,new Map);return s.has(n)||(Nl(o,BS),Nl(o,BS+"-"+n),s.set(n,dj)),()=>{this._engine.afterFlush(()=>{let c=r.indexOf(a);c>=0&&r.splice(c,1),this._triggers.has(n)||s.delete(n)})}}register(o,n){return this._triggers.has(o)?!1:(this._triggers.set(o,n),!0)}_getTrigger(o){let n=this._triggers.get(o);if(!n)throw Ire(o);return n}trigger(o,n,e,t=!0){let r=this._getTrigger(n),a=new zS(this.id,n,o),s=this._engine.statesByElement.get(o);s||(Nl(o,BS),Nl(o,BS+"-"+n),this._engine.statesByElement.set(o,s=new Map));let c=s.get(n),p=new HS(e,this.id);if(!(e&&e.hasOwnProperty("value"))&&c&&p.absorbOptions(c.options),s.set(n,p),c||(c=dj),!(p.value===jS)&&c.value===p.value){if(!Kke(c.params,p.params)){let z=[],W=r.matchStyles(c.value,c.params,z),ee=r.matchStyles(p.value,p.params,z);z.length?this._engine.reportError(z):this._engine.afterFlush(()=>{qp(o,W),wc(o,ee)})}return}let E=Os(this._engine.playersByElement,o,[]);E.forEach(z=>{z.namespaceId==this.id&&z.triggerName==n&&z.queued&&z.destroy()});let D=r.matchTransition(c.value,p.value,o,p.params),L=!1;if(!D){if(!t)return;D=r.fallbackTransition,L=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:n,transition:D,fromState:c,toState:p,player:a,isFallbackTransition:L}),L||(Nl(o,Fre),a.onStart(()=>{Ev(o,Fre)})),a.onDone(()=>{let z=this.players.indexOf(a);z>=0&&this.players.splice(z,1);let W=this._engine.playersByElement.get(o);if(W){let ee=W.indexOf(a);ee>=0&&W.splice(ee,1)}}),this.players.push(a),E.push(a),a}deregister(o){this._triggers.delete(o),this._engine.statesByElement.forEach(n=>n.delete(o)),this._elementListeners.forEach((n,e)=>{this._elementListeners.set(e,n.filter(t=>t.name!=o))})}clearElementCache(o){this._engine.statesByElement.delete(o),this._elementListeners.delete(o);let n=this._engine.playersByElement.get(o);n&&(n.forEach(e=>e.destroy()),this._engine.playersByElement.delete(o))}_signalRemovalForInnerTriggers(o,n){let e=this._engine.driver.query(o,VS,!0);e.forEach(t=>{if(t[Oc])return;let r=this._engine.fetchNamespacesByElement(t);r.size?r.forEach(a=>a.triggerLeaveAnimation(t,n,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>e.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(o,n,e,t){let r=this._engine.statesByElement.get(o),a=new Map;if(r){let s=[];if(r.forEach((c,p)=>{if(a.set(p,c.value),this._triggers.has(p)){let g=this.trigger(o,p,jS,t);g&&s.push(g)}}),s.length)return this._engine.markElementAsRemoved(this.id,o,!0,n,a),e&&Gm(s).onDone(()=>this._engine.processLeaveNode(o)),!0}return!1}prepareLeaveAnimationListeners(o){let n=this._elementListeners.get(o),e=this._engine.statesByElement.get(o);if(n&&e){let t=new Set;n.forEach(r=>{let a=r.name;if(t.has(a))return;t.add(a);let c=this._triggers.get(a).fallbackTransition,p=e.get(a)||dj,g=new HS(jS),C=new zS(this.id,a,o);this._engine.totalQueuedPlayers++,this._queue.push({element:o,triggerName:a,transition:c,fromState:p,toState:g,player:C,isFallbackTransition:!0})})}}removeNode(o,n){let e=this._engine;if(o.childElementCount&&this._signalRemovalForInnerTriggers(o,n),this.triggerLeaveAnimation(o,n,!0))return;let t=!1;if(e.totalAnimations){let r=e.players.length?e.playersByQueriedElement.get(o):[];if(r&&r.length)t=!0;else{let a=o;for(;a=a.parentNode;)if(e.statesByElement.get(a)){t=!0;break}}}if(this.prepareLeaveAnimationListeners(o),t)e.markElementAsRemoved(this.id,o,!1,n);else{let r=o[Oc];(!r||r===Gre)&&(e.afterFlush(()=>this.clearElementCache(o)),e.destroyInnerAnimations(o),e._onRemovalComplete(o,n))}}insertNode(o,n){Nl(o,this._hostClassName)}drainQueuedTransitions(o){let n=[];return this._queue.forEach(e=>{let t=e.player;if(t.destroyed)return;let r=e.element,a=this._elementListeners.get(r);a&&a.forEach(s=>{if(s.name==e.triggerName){let c=EP(r,e.triggerName,e.fromState.value,e.toState.value);c._data=o,IP(e.player,s.phase,c,s.callback)}}),t.markedForDestroy?this._engine.afterFlush(()=>{t.destroy()}):n.push(e)}),this._queue=[],n.sort((e,t)=>{let r=e.transition.ast.depCount,a=t.transition.ast.depCount;return r==0||a==0?r-a:this._engine.driver.containsElement(e.element,t.element)?1:-1})}destroy(o){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,o)}},Sj=class{bodyNode;driver;_normalizer;players=[];newHostElements=new Map;playersByElement=new Map;playersByQueriedElement=new Map;statesByElement=new Map;disabledNodes=new Set;totalAnimations=0;totalQueuedPlayers=0;_namespaceLookup={};_namespaceList=[];_flushFns=[];_whenQuietFns=[];namespacesByHostElement=new Map;collectedEnterElements=[];collectedLeaveElements=[];onRemovalComplete=(o,n)=>{};_onRemovalComplete(o,n){this.onRemovalComplete(o,n)}constructor(o,n,e){this.bodyNode=o,this.driver=n,this._normalizer=e}get queuedPlayers(){let o=[];return this._namespaceList.forEach(n=>{n.players.forEach(e=>{e.queued&&o.push(e)})}),o}createNamespace(o,n){let e=new yj(o,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(e,n):(this.newHostElements.set(n,e),this.collectEnterElement(n)),this._namespaceLookup[o]=e}_balanceNamespaceList(o,n){let e=this._namespaceList,t=this.namespacesByHostElement;if(e.length-1>=0){let a=!1,s=this.driver.getParentElement(n);for(;s;){let c=t.get(s);if(c){let p=e.indexOf(c);e.splice(p+1,0,o),a=!0;break}s=this.driver.getParentElement(s)}a||e.unshift(o)}else e.push(o);return t.set(n,o),o}register(o,n){let e=this._namespaceLookup[o];return e||(e=this.createNamespace(o,n)),e}registerTrigger(o,n,e){let t=this._namespaceLookup[o];t&&t.register(n,e)&&this.totalAnimations++}destroy(o,n){o&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let e=this._fetchNamespace(o);this.namespacesByHostElement.delete(e.hostElement);let t=this._namespaceList.indexOf(e);t>=0&&this._namespaceList.splice(t,1),e.destroy(n),delete this._namespaceLookup[o]}))}_fetchNamespace(o){return this._namespaceLookup[o]}fetchNamespacesByElement(o){let n=new Set,e=this.statesByElement.get(o);if(e){for(let t of e.values())if(t.namespaceId){let r=this._fetchNamespace(t.namespaceId);r&&n.add(r)}}return n}trigger(o,n,e,t){if(MP(n)){let r=this._fetchNamespace(o);if(r)return r.trigger(n,e,t),!0}return!1}insertNode(o,n,e,t){if(!MP(n))return;let r=n[Oc];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let a=this.collectedLeaveElements.indexOf(n);a>=0&&this.collectedLeaveElements.splice(a,1)}if(o){let a=this._fetchNamespace(o);a&&a.insertNode(n,e)}t&&this.collectEnterElement(n)}collectEnterElement(o){this.collectedEnterElements.push(o)}markElementAsDisabled(o,n){n?this.disabledNodes.has(o)||(this.disabledNodes.add(o),Nl(o,cj)):this.disabledNodes.has(o)&&(this.disabledNodes.delete(o),Ev(o,cj))}removeNode(o,n,e){if(MP(n)){let t=o?this._fetchNamespace(o):null;t?t.removeNode(n,e):this.markElementAsRemoved(o,n,!1,e);let r=this.namespacesByHostElement.get(n);r&&r.id!==o&&r.removeNode(n,e)}else this._onRemovalComplete(n,e)}markElementAsRemoved(o,n,e,t,r){this.collectedLeaveElements.push(n),n[Oc]={namespaceId:o,setForRemoval:t,hasAnimation:e,removedBeforeQueried:!1,previousTriggersValues:r}}listen(o,n,e,t,r){return MP(n)?this._fetchNamespace(o).listen(n,e,t,r):()=>{}}_buildInstruction(o,n,e,t,r){return o.transition.build(this.driver,o.element,o.fromState.value,o.toState.value,e,t,o.fromState.options,o.toState.options,n,r)}destroyInnerAnimations(o){let n=this.driver.query(o,VS,!0);n.forEach(e=>this.destroyActiveAnimationsForElement(e)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(o,DP,!0),n.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(o){let n=this.playersByElement.get(o);n&&n.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(o){let n=this.playersByQueriedElement.get(o);n&&n.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(o=>{if(this.players.length)return Gm(this.players).onDone(()=>o());o()})}processLeaveNode(o){let n=o[Oc];if(n&&n.setForRemoval){if(o[Oc]=Gre,n.namespaceId){this.destroyInnerAnimations(o);let e=this._fetchNamespace(n.namespaceId);e&&e.clearElementCache(o)}this._onRemovalComplete(o,n.setForRemoval)}o.classList?.contains(cj)&&this.markElementAsDisabled(o,!1),this.driver.query(o,Vke,!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(o=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,t)=>this._balanceNamespaceList(e,t)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let e=0;e<this.collectedEnterElements.length;e++){let t=this.collectedEnterElements[e];Nl(t,Uke)}if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let e=[];try{n=this._flushAnimations(e,o)}finally{for(let t=0;t<e.length;t++)e[t]()}}else for(let e=0;e<this.collectedLeaveElements.length;e++){let t=this.collectedLeaveElements[e];this.processLeaveNode(t)}if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){let e=this._whenQuietFns;this._whenQuietFns=[],n.length?Gm(n).onDone(()=>{e.forEach(t=>t())}):e.forEach(t=>t())}}reportError(o){throw Ere(o)}_flushAnimations(o,n){let e=new $S,t=[],r=new Map,a=[],s=new Map,c=new Map,p=new Map,g=new Set;this.disabledNodes.forEach(bt=>{g.add(bt);let Nt=this.driver.query(bt,Bke,!0);for(let Bt=0;Bt<Nt.length;Bt++)g.add(Nt[Bt])});let C=this.bodyNode,E=Array.from(this.statesByElement.keys()),D=Vre(E,this.collectedEnterElements),L=new Map,z=0;D.forEach((bt,Nt)=>{let Bt=oj+z++;L.set(Nt,Bt),bt.forEach(En=>Nl(En,Bt))});let W=[],ee=new Set,me=new Set;for(let bt=0;bt<this.collectedLeaveElements.length;bt++){let Nt=this.collectedLeaveElements[bt],Bt=Nt[Oc];Bt&&Bt.setForRemoval&&(W.push(Nt),ee.add(Nt),Bt.hasAnimation?this.driver.query(Nt,jke,!0).forEach(En=>ee.add(En)):me.add(Nt))}let Ce=new Map,Ae=Vre(E,Array.from(ee));Ae.forEach((bt,Nt)=>{let Bt=TP+z++;Ce.set(Nt,Bt),bt.forEach(En=>Nl(En,Bt))}),o.push(()=>{D.forEach((bt,Nt)=>{let Bt=L.get(Nt);bt.forEach(En=>Ev(En,Bt))}),Ae.forEach((bt,Nt)=>{let Bt=Ce.get(Nt);bt.forEach(En=>Ev(En,Bt))}),W.forEach(bt=>{this.processLeaveNode(bt)})});let Ge=[],Ne=[];for(let bt=this._namespaceList.length-1;bt>=0;bt--)this._namespaceList[bt].drainQueuedTransitions(n).forEach(Bt=>{let En=Bt.player,Qt=Bt.element;if(Ge.push(En),this.collectedEnterElements.length){let bo=Qt[Oc];if(bo&&bo.setForMove){if(bo.previousTriggersValues&&bo.previousTriggersValues.has(Bt.triggerName)){let ul=bo.previousTriggersValues.get(Bt.triggerName),zr=this.statesByElement.get(Bt.element);if(zr&&zr.has(Bt.triggerName)){let hl=zr.get(Bt.triggerName);hl.value=ul,zr.set(Bt.triggerName,hl)}}En.destroy();return}}let Yt=!C||!this.driver.containsElement(C,Qt),Mi=Ce.get(Qt),Jt=L.get(Qt),Qn=this._buildInstruction(Bt,e,Jt,Mi,Yt);if(Qn.errors&&Qn.errors.length){Ne.push(Qn);return}if(Yt){En.onStart(()=>qp(Qt,Qn.fromStyles)),En.onDestroy(()=>wc(Qt,Qn.toStyles)),t.push(En);return}if(Bt.isFallbackTransition){En.onStart(()=>qp(Qt,Qn.fromStyles)),En.onDestroy(()=>wc(Qt,Qn.toStyles)),t.push(En);return}let Gi=[];Qn.timelines.forEach(bo=>{bo.stretchStartingKeyframe=!0,this.disabledNodes.has(bo.element)||Gi.push(bo)}),Qn.timelines=Gi,e.append(Qt,Qn.timelines);let im={instruction:Qn,player:En,element:Qt};a.push(im),Qn.queriedElements.forEach(bo=>Os(s,bo,[]).push(En)),Qn.preStyleProps.forEach((bo,ul)=>{if(bo.size){let zr=c.get(ul);zr||c.set(ul,zr=new Set),bo.forEach((hl,Xl)=>zr.add(Xl))}}),Qn.postStyleProps.forEach((bo,ul)=>{let zr=p.get(ul);zr||p.set(ul,zr=new Set),bo.forEach((hl,Xl)=>zr.add(Xl))})});if(Ne.length){let bt=[];Ne.forEach(Nt=>{bt.push(xre(Nt.triggerName,Nt.errors))}),Ge.forEach(Nt=>Nt.destroy()),this.reportError(bt)}let Ie=new Map,Se=new Map;a.forEach(bt=>{let Nt=bt.element;e.has(Nt)&&(Se.set(Nt,Nt),this._beforeAnimationBuild(bt.player.namespaceId,bt.instruction,Ie))}),t.forEach(bt=>{let Nt=bt.element;this._getPreviousPlayers(Nt,!1,bt.namespaceId,bt.triggerName,null).forEach(En=>{Os(Ie,Nt,[]).push(En),En.destroy()})});let we=W.filter(bt=>Ure(bt,c,p)),ye=new Map;Bre(ye,this.driver,me,p,Rl).forEach(bt=>{Ure(bt,c,p)&&we.push(bt)});let Oe=new Map;D.forEach((bt,Nt)=>{Bre(Oe,this.driver,new Set(bt),c,Sv)}),we.forEach(bt=>{let Nt=ye.get(bt),Bt=Oe.get(bt);ye.set(bt,new Map([...Nt?.entries()??[],...Bt?.entries()??[]]))});let Fe=[],yt=[],An={};a.forEach(bt=>{let{element:Nt,player:Bt,instruction:En}=bt;if(e.has(Nt)){if(g.has(Nt)){Bt.onDestroy(()=>wc(Nt,En.toStyles)),Bt.disabled=!0,Bt.overrideTotalTime(En.totalTime),t.push(Bt);return}let Qt=An;if(Se.size>1){let Mi=Nt,Jt=[];for(;Mi=Mi.parentNode;){let Qn=Se.get(Mi);if(Qn){Qt=Qn;break}Jt.push(Mi)}Jt.forEach(Qn=>Se.set(Qn,Qt))}let Yt=this._buildAnimation(Bt.namespaceId,En,Ie,r,Oe,ye);if(Bt.setRealPlayer(Yt),Qt===An)Fe.push(Bt);else{let Mi=this.playersByElement.get(Qt);Mi&&Mi.length&&(Bt.parentPlayer=Gm(Mi)),t.push(Bt)}}else qp(Nt,En.fromStyles),Bt.onDestroy(()=>wc(Nt,En.toStyles)),yt.push(Bt),g.has(Nt)&&t.push(Bt)}),yt.forEach(bt=>{let Nt=r.get(bt.element);if(Nt&&Nt.length){let Bt=Gm(Nt);bt.setRealPlayer(Bt)}}),t.forEach(bt=>{bt.parentPlayer?bt.syncPlayerEvents(bt.parentPlayer):bt.destroy()});for(let bt=0;bt<W.length;bt++){let Nt=W[bt],Bt=Nt[Oc];if(Ev(Nt,TP),Bt&&Bt.hasAnimation)continue;let En=[];if(s.size){let Yt=s.get(Nt);Yt&&Yt.length&&En.push(...Yt);let Mi=this.driver.query(Nt,DP,!0);for(let Jt=0;Jt<Mi.length;Jt++){let Qn=s.get(Mi[Jt]);Qn&&Qn.length&&En.push(...Qn)}}let Qt=En.filter(Yt=>!Yt.destroyed);Qt.length?qke(this,Nt,Qt):this.processLeaveNode(Nt)}return W.length=0,Fe.forEach(bt=>{this.players.push(bt),bt.onDone(()=>{bt.destroy();let Nt=this.players.indexOf(bt);this.players.splice(Nt,1)}),bt.play()}),Fe}afterFlush(o){this._flushFns.push(o)}afterFlushAnimationsDone(o){this._whenQuietFns.push(o)}_getPreviousPlayers(o,n,e,t,r){let a=[];if(n){let s=this.playersByQueriedElement.get(o);s&&(a=s)}else{let s=this.playersByElement.get(o);if(s){let c=!r||r==jS;s.forEach(p=>{p.queued||!c&&p.triggerName!=t||a.push(p)})}}return(e||t)&&(a=a.filter(s=>!(e&&e!=s.namespaceId||t&&t!=s.triggerName))),a}_beforeAnimationBuild(o,n,e){let t=n.triggerName,r=n.element,a=n.isRemovalTransition?void 0:o,s=n.isRemovalTransition?void 0:t;for(let c of n.timelines){let p=c.element,g=p!==r,C=Os(e,p,[]);this._getPreviousPlayers(p,g,a,s,n.toState).forEach(D=>{let L=D.getRealPlayer();L.beforeDestroy&&L.beforeDestroy(),D.destroy(),C.push(D)})}qp(r,n.fromStyles)}_buildAnimation(o,n,e,t,r,a){let s=n.triggerName,c=n.element,p=[],g=new Set,C=new Set,E=n.timelines.map(L=>{let z=L.element;g.add(z);let W=z[Oc];if(W&&W.removedBeforeQueried)return new Od(L.duration,L.delay);let ee=z!==c,me=Yke((e.get(z)||$ke).map(Ie=>Ie.getRealPlayer())).filter(Ie=>{let Se=Ie;return Se.element?Se.element===z:!1}),Ce=r.get(z),Ae=a.get(z),Ge=JU(this._normalizer,L.keyframes,Ce,Ae),Ne=this._buildPlayer(L,Ge,me);if(L.subTimeline&&t&&C.add(z),ee){let Ie=new zS(o,s,z);Ie.setRealPlayer(Ne),p.push(Ie)}return Ne});p.forEach(L=>{Os(this.playersByQueriedElement,L.element,[]).push(L),L.onDone(()=>zke(this.playersByQueriedElement,L.element,L))}),g.forEach(L=>Nl(L,rj));let D=Gm(E);return D.onDestroy(()=>{g.forEach(L=>Ev(L,rj)),wc(c,n.toStyles)}),C.forEach(L=>{Os(t,L,[]).push(D)}),D}_buildPlayer(o,n,e){return n.length>0?this.driver.animate(o.element,n,o.duration,o.delay,o.easing,e):new Od(o.duration,o.delay)}},zS=class{namespaceId;triggerName;element;_player=new Od;_containsRealPlayer=!1;_queuedCallbacks=new Map;destroyed=!1;parentPlayer=null;markedForDestroy=!1;disabled=!1;queued=!0;totalTime=0;constructor(o,n,e){this.namespaceId=o,this.triggerName=n,this.element=e}setRealPlayer(o){this._containsRealPlayer||(this._player=o,this._queuedCallbacks.forEach((n,e)=>{n.forEach(t=>IP(o,e,void 0,t))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(o.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(o){this.totalTime=o}syncPlayerEvents(o){let n=this._player;n.triggerCallback&&o.onStart(()=>n.triggerCallback("start")),o.onDone(()=>this.finish()),o.onDestroy(()=>this.destroy())}_queueEvent(o,n){Os(this._queuedCallbacks,o,[]).push(n)}onDone(o){this.queued&&this._queueEvent("done",o),this._player.onDone(o)}onStart(o){this.queued&&this._queueEvent("start",o),this._player.onStart(o)}onDestroy(o){this.queued&&this._queueEvent("destroy",o),this._player.onDestroy(o)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(o){this.queued||this._player.setPosition(o)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(o){let n=this._player;n.triggerCallback&&n.triggerCallback(o)}};function zke(i,o,n){let e=i.get(o);if(e){if(e.length){let t=e.indexOf(n);e.splice(t,1)}e.length==0&&i.delete(o)}return e}function Gke(i){return i??null}function MP(i){return i&&i.nodeType===1}function Wke(i){return i=="start"||i=="done"}function Lre(i,o){let n=i.style.display;return i.style.display=o??"none",n}function Bre(i,o,n,e,t){let r=[];n.forEach(c=>r.push(Lre(c)));let a=[];e.forEach((c,p)=>{let g=new Map;c.forEach(C=>{let E=o.computeStyle(p,C,t);g.set(C,E),(!E||E.length==0)&&(p[Oc]=Hke,a.push(p))}),i.set(p,g)});let s=0;return n.forEach(c=>Lre(c,r[s++])),a}function Vre(i,o){let n=new Map;if(i.forEach(s=>n.set(s,[])),o.length==0)return n;let e=1,t=new Set(o),r=new Map;function a(s){if(!s)return e;let c=r.get(s);if(c)return c;let p=s.parentNode;return n.has(p)?c=p:t.has(p)?c=e:c=a(p),r.set(s,c),c}return o.forEach(s=>{let c=a(s);c!==e&&n.get(c).push(s)}),n}function Nl(i,o){i.classList?.add(o)}function Ev(i,o){i.classList?.remove(o)}function qke(i,o,n){Gm(n).onDone(()=>i.processLeaveNode(o))}function Yke(i){let o=[];return Wre(i,o),o}function Wre(i,o){for(let n=0;n<i.length;n++){let e=i[n];e instanceof qu?Wre(e.players,o):o.push(e)}}function Kke(i,o){let n=Object.keys(i),e=Object.keys(o);if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t];if(!o.hasOwnProperty(r)||i[r]!==o[r])return!1}return!0}function Ure(i,o,n){let e=n.get(i);if(!e)return!1;let t=o.get(i);return t?e.forEach(r=>t.add(r)):o.set(i,e),n.delete(i),!0}var xv=class{_driver;_normalizer;_transitionEngine;_timelineEngine;_triggerCache={};onRemovalComplete=(o,n)=>{};constructor(o,n,e){this._driver=n,this._normalizer=e,this._transitionEngine=new Sj(o.body,n,e),this._timelineEngine=new _j(o.body,n,e),this._transitionEngine.onRemovalComplete=(t,r)=>this.onRemovalComplete(t,r)}registerTrigger(o,n,e,t,r){let a=o+"-"+t,s=this._triggerCache[a];if(!s){let c=[],p=[],g=$re(this._driver,r,c,p);if(c.length)throw hre(t,c);s=Nke(t,g,this._normalizer),this._triggerCache[a]=s}this._transitionEngine.registerTrigger(n,t,s)}register(o,n){this._transitionEngine.register(o,n)}destroy(o,n){this._transitionEngine.destroy(o,n)}onInsert(o,n,e,t){this._transitionEngine.insertNode(o,n,e,t)}onRemove(o,n,e){this._transitionEngine.removeNode(o,n,e)}disableAnimations(o,n){this._transitionEngine.markElementAsDisabled(o,n)}process(o,n,e,t){if(e.charAt(0)=="@"){let[r,a]=ej(e),s=t;this._timelineEngine.command(r,n,a,s)}else this._transitionEngine.trigger(o,n,e,t)}listen(o,n,e,t,r){if(e.charAt(0)=="@"){let[a,s]=ej(e);return this._timelineEngine.listen(a,n,s,r)}return this._transitionEngine.listen(o,n,e,t,r)}flush(o=-1){this._transitionEngine.flush(o)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(o){this._transitionEngine.afterFlushAnimationsDone(o)}};function Zke(i,o){let n=null,e=null;return Array.isArray(o)&&o.length?(n=mj(o[0]),o.length>1&&(e=mj(o[o.length-1]))):o instanceof Map&&(n=mj(o)),n||e?new Xke(i,n,e):null}var Xke=(()=>{class i{_element;_startStyles;_endStyles;static initialStylesByElement=new WeakMap;_state=0;_initialStyles;constructor(n,e,t){this._element=n,this._startStyles=e,this._endStyles=t;let r=i.initialStylesByElement.get(n);r||i.initialStylesByElement.set(n,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&wc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(wc(this._element,this._initialStyles),this._endStyles&&(wc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(qp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(qp(this._element,this._endStyles),this._endStyles=null),wc(this._element,this._initialStyles),this._state=3)}}return i})();function mj(i){let o=null;return i.forEach((n,e)=>{Qke(e)&&(o=o||new Map,o.set(e,n))}),o}function Qke(i){return i==="display"||i==="position"}var VP=class{element;keyframes;options;_specialStyles;_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_duration;_delay;_initialized=!1;_finished=!1;_started=!1;_destroyed=!1;_finalKeyframe;_originalOnDoneFns=[];_originalOnStartFns=[];domPlayer;time=0;parentPlayer=null;currentSnapshot=new Map;constructor(o,n,e,t){this.element=o,this.keyframes=n,this.options=e,this._specialStyles=t,this._duration=e.duration,this._delay=e.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(o=>o()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let o=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,o,this.options),this._finalKeyframe=o.length?o[o.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(o){let n=[];return o.forEach(e=>{n.push(Object.fromEntries(e))}),n}_triggerWebAnimation(o,n,e){return o.animate(this._convertKeyframesToObject(n),e)}onStart(o){this._originalOnStartFns.push(o),this._onStartFns.push(o)}onDone(o){this._originalOnDoneFns.push(o),this._onDoneFns.push(o)}onDestroy(o){this._onDestroyFns.push(o)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(o=>o()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(o=>o()),this._onDestroyFns=[])}setPosition(o){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=o*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let o=new Map;this.hasStarted()&&this._finalKeyframe.forEach((e,t)=>{t!=="offset"&&o.set(t,this._finished?e:OP(this.element,t))}),this.currentSnapshot=o}triggerCallback(o){let n=o==="start"?this._onStartFns:this._onDoneFns;n.forEach(e=>e()),n.length=0}},UP=class{validateStyleProperty(o){return!0}validateAnimatableStyleProperty(o){return!0}containsElement(o,n){return tj(o,n)}getParentElement(o){return xP(o)}query(o,n,e){return nj(o,n,e)}computeStyle(o,n,e){return OP(o,n)}animate(o,n,e,t,r,a=[]){let s=t==0?"both":"forwards",c={duration:e,delay:t,fill:s};r&&(c.easing=r);let p=new Map,g=a.filter(D=>D instanceof VP);Ore(e,t)&&g.forEach(D=>{D.currentSnapshot.forEach((L,z)=>p.set(z,L))});let C=Dre(n).map(D=>new Map(D));C=Are(o,C,p);let E=Zke(o,C);return new VP(o,C,c,E)}};var kP="@",qre="@.disabled",jP=class{namespaceId;delegate;engine;_onDestroy;\u0275type=0;constructor(o,n,e,t){this.namespaceId=o,this.delegate=n,this.engine=e,this._onDestroy=t}get data(){return this.delegate.data}destroyNode(o){this.delegate.destroyNode?.(o)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(o,n){return this.delegate.createElement(o,n)}createComment(o){return this.delegate.createComment(o)}createText(o){return this.delegate.createText(o)}appendChild(o,n){this.delegate.appendChild(o,n),this.engine.onInsert(this.namespaceId,n,o,!1)}insertBefore(o,n,e,t=!0){this.delegate.insertBefore(o,n,e),this.engine.onInsert(this.namespaceId,n,o,t)}removeChild(o,n,e){this.parentNode(n)&&this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(o,n){return this.delegate.selectRootElement(o,n)}parentNode(o){return this.delegate.parentNode(o)}nextSibling(o){return this.delegate.nextSibling(o)}setAttribute(o,n,e,t){this.delegate.setAttribute(o,n,e,t)}removeAttribute(o,n,e){this.delegate.removeAttribute(o,n,e)}addClass(o,n){this.delegate.addClass(o,n)}removeClass(o,n){this.delegate.removeClass(o,n)}setStyle(o,n,e,t){this.delegate.setStyle(o,n,e,t)}removeStyle(o,n,e){this.delegate.removeStyle(o,n,e)}setProperty(o,n,e){n.charAt(0)==kP&&n==qre?this.disableAnimations(o,!!e):this.delegate.setProperty(o,n,e)}setValue(o,n){this.delegate.setValue(o,n)}listen(o,n,e,t){return this.delegate.listen(o,n,e,t)}disableAnimations(o,n){this.engine.disableAnimations(o,n)}},bj=class extends jP{factory;constructor(o,n,e,t,r){super(n,e,t,r),this.factory=o,this.namespaceId=n}setProperty(o,n,e){n.charAt(0)==kP?n.charAt(1)=="."&&n==qre?(e=e===void 0?!0:!!e,this.disableAnimations(o,e)):this.engine.process(this.namespaceId,o,n.slice(1),e):this.delegate.setProperty(o,n,e)}listen(o,n,e,t){if(n.charAt(0)==kP){let r=Jke(o),a=n.slice(1),s="";return a.charAt(0)!=kP&&([a,s]=e9e(a)),this.engine.listen(this.namespaceId,r,a,s,c=>{let p=c._data||-1;this.factory.scheduleListenerCallback(p,e,c)})}return this.delegate.listen(o,n,e,t)}};function Jke(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function e9e(i){let o=i.indexOf("."),n=i.substring(0,o),e=i.slice(o+1);return[n,e]}var $P=class{delegate;engine;_zone;_currentId=0;_microtaskId=1;_animationCallbacksBuffer=[];_rendererCache=new Map;_cdRecurDepth=0;constructor(o,n,e){this.delegate=o,this.engine=n,this._zone=e,n.onRemovalComplete=(t,r)=>{r?.removeChild(null,t)}}createRenderer(o,n){let e="",t=this.delegate.createRenderer(o,n);if(!o||!n?.data?.animation){let p=this._rendererCache,g=p.get(t);if(!g){let C=()=>p.delete(t);g=new jP(e,t,this.engine,C),p.set(t,g)}return g}let r=n.id,a=n.id+"-"+this._currentId;this._currentId++,this.engine.register(a,o);let s=p=>{Array.isArray(p)?p.forEach(s):this.engine.registerTrigger(r,a,o,p.name,p)};return n.data.animation.forEach(s),new bj(this,a,t,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(o,n,e){if(o>=0&&o<this._microtaskId){this._zone.run(()=>n(e));return}let t=this._animationCallbacksBuffer;t.length==0&&queueMicrotask(()=>{this._zone.run(()=>{t.forEach(r=>{let[a,s]=r;a(s)}),this._animationCallbacksBuffer=[]})}),t.push([n,e])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}componentReplaced(o){this.engine.flush(),this.delegate.componentReplaced?.(o)}};var n9e=(()=>{class i extends xv{constructor(n,e,t){super(n,e,t)}ngOnDestroy(){this.flush()}static \u0275fac=function(e){return new(e||i)(J(Un),J(Zu),J(Xu))};static \u0275prov=Pe({token:i,factory:i.\u0275fac})}return i})();function i9e(){return new RP}function o9e(i,o,n){return new $P(i,o,n)}var Kre=[{provide:Xu,useFactory:i9e},{provide:xv,useClass:n9e},{provide:er,useFactory:o9e,deps:[Z1,xv,Vt]}],r9e=[{provide:Zu,useClass:Ij},{provide:mr,useValue:"NoopAnimations"},...Kre],Yre=[{provide:Zu,useFactory:()=>new UP},{provide:mr,useFactory:()=>"BrowserAnimations"},...Kre],Zre=(()=>{class i{static withConfig(n){return{ngModule:i,providers:n.disableAnimations?r9e:Yre}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=cn({type:i});static \u0275inj=ln({providers:Yre,imports:[Q1]})}return i})();var oi={production:!1,staging:!0,firebaseLogLevel:"error",firebaseConfig:{apiKey:"AIzaSyAzcW2n1JhY_zhkXmuFcwe550AkwmYeJ0w",authDomain:"snipply-sdk-staging.firebaseapp.com",projectId:"snipply-sdk-staging",storageBucket:"snipply-sdk-staging.appspot.com",messagingSenderId:"877538579326",appId:"1:877538579326:web:f793f73f2b7dc770c4992f"},firebaseNotificationsDatabaseURL:"https://snipply-sdk-staging-notifications.firebaseio.com",segmentAnalyticsWriteKey:"ndJ0KZs5LkL6jny5a43FXXQkTF5bgPFt",useEmulators:!1,debugMode:!1,cloudFunction:{sa:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/sa",getIceServers:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/geticeservers",validateClient:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/validateclient",convertRecording:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/convertrecordingv2",chatgptCompletion:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/chatgptcompletion",whisperTranscription:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/whispertranscription",getPlanDetails:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getplandetails",getAllowedDocuments:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getalloweddocuments",getNotificationsForDocuments:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/getnotificationsfordocuments",videoBackend:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/videobackend",processRecording:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/processrecording",usCentral1:{setEncryptedData:"https://us-central1-snipply-sdk-staging.cloudfunctions.net/setencrypteddata"},asiaSouthEast1:{setEncryptedData:"https://asia-southeast1-snipply-sdk-staging.cloudfunctions.net/setencrypteddataau"},europeWest1:{setEncryptedData:"https://europe-west1-snipply-sdk-staging.cloudfunctions.net/setencrypteddataeu"},asiaNorthEast1:{setEncryptedData:"https://asia-northeast1-snipply-sdk-staging.cloudfunctions.net/setencrypteddatajp"}}};var Z=(()=>{let o=class o{};o.Events={Core:{IDENTIFY:"identify",SDK_VALIDATE_CLIENT_TRIGGERED:"sdkValidateClientTriggered",SDK_VALIDATE_CLIENT_SUCCESS:"sdkValidateClientSuccess",SDK_VALIDATE_CLIENT_FAILED:"sdkValidateClientFailed",SDK_USER_AUTH_SUCCESS:"sdkUserAuthSuccess",SDK_USER_AUTH_FAILED:"sdkUserAuthFailed",SDK_USER_SIGN_OUT:"sdkUserSignOut",SDK_PLAN_EXPIRED:"sdkPlanExpired",SDK_ERROR:"error",SDK_UNCAUGHT_ERROR:"uncaughtError",SDK_SESSION_RE_LOGIN_TRIGGERED:"sdkSessionReLoginTriggered",SDK_SESSION_TOKEN_EXPIRED:"sdkSessionTokenExpired",SDK_SESSION_RE_LOGIN_COUNT_EXCEEDED:"sdkSessionReLoginCountExceeded",SDK_JWT_EXPIRED_RETRY_EXCEEDED:"sdkJwtExpiredRetryExceeded",SDK_EVENT_RATE_LIMIT_EXCEEDED:"sdkEventRateLimitExceeded",SIGN_OUT_USER_TRIGGERED:"signOutUserTriggered",SET_DOCUMENTS_TRIGGERED:"setDocumentsTriggered",SET_ROOT_LOCATION_TRIGGERED:"setRootLocationTriggered",SET_ROOT_DOCUMENT_TRIGGERED:"setRootDocumentTriggered",UNSET_DOCUMENTS_TRIGGERED:"unsetDocumentsTriggered",FETCH_DOCUMENTS_TRIGGERED:"fetchDocumentsTriggered",UPDATE_DOCUMENTS_TRIGGERED:"updateDocumentsTriggered",UPDATE_LOCATIONS_TRIGGERED:"updateLocationsTriggered",FETCH_FOLDERS_TRIGGERED:"fetchFoldersTriggered",SET_USER_DATA_PROVIDER_TRIGGERED:"setUserDataProviderTriggered",SET_DATA_PROVIDERS_TRIGGERED:"setDataProvidersTriggered",SET_ENCRYPTION_PROVIDER_TRIGGERED:"setEncryptionProviderTriggered",SET_VELT_AUTH_PROVIDER_TRIGGERED:"setVeltAuthProviderTriggered",GET_DOCUMENT_ID_TRIGGERED:"getDocumentIdTriggered",SET_LOCATIONS_TRIGGERED:"setLocationsTriggered",SET_SCROLLABLE_ELEMENTS_IDS_TRIGGERED:"setScrollableElementsIdsTriggered",REMOVE_LOCATIONS_TRIGGERED:"removeLocationsTriggered",UNSET_LOCATIONS_TRIGGERED:"unsetLocationsTriggered",EXCLUDE_LOCATION_IDS_TRIGGERED:"excludeLocationIdsTriggered",UPDATE_CONTACT_LIST_TRIGGERED:"updateContactListTriggered",REMOVE_SCROLLABLE_ELEMENTS_IDS_TRIGGERED:"removeScrollableElementsIdsTriggered",GET_PRESENCE_ELEMENT_TRIGGERED:"getPresenceElementTriggered",GET_CURSOR_ELEMENT_TRIGGERED:"getCursorElementTriggered",GET_COMMENT_ELEMENT_TRIGGERED:"getCommentElementTriggered",GET_TAG_ELEMENT_TRIGGERED:"getTagElementTriggered",GET_SELECTION_ELEMENT_TRIGGERED:"getSelectionElementTriggered",GET_RECORDER_ELEMENT_TRIGGERED:"getRecorderElementTriggered",GET_CONTACT_ELEMENT_TRIGGERED:"getContactElementTriggered",GET_REWRITER_ELEMENT_TRIGGERED:"getRewriterElementTriggered",GET_HUDDLE_ELEMENT_TRIGGERED:"getHuddleElementTriggered",GET_LIVE_STATE_SYNC_ELEMENT_TRIGGERED:"getLiveStateSyncElementTriggered",GET_ARROW_ELEMENT_TRIGGERED:"getArrowElementTriggered",GET_VIEWS_ELEMENT_TRIGGERED:"getViewsElementTriggered",GET_NOTIFICATION_ELEMENT_TRIGGERED:"getNotificationElementTriggered",GET_AUTOCOMPLETE_ELEMENT_TRIGGERED:"getAutocompleteElementTriggered",GET_DOC_ELEMENT_TRIGGERED:"getDocElementTriggered",GET_AREA_ELEMENT_TRIGGERED:"getAreaElementTriggered",GET_REACTION_ELEMENT_TRIGGERED:"getReactionElementTriggered",GET_METADATA_TRIGGERED:"getMetadataTriggered",DISABLE_FEATURES_TRIGGERED:"disableFeaturesTriggered",SET_DARK_MODE_TRIGGERED:"setDarkModeTriggered",ENABLE_LOGS_TRIGGERED:"enableLogsTriggered",DISABLE_LOGS_TRIGGERED:"disableLogsTriggered",IS_USER_ALLOWED_TRIGGERED:"isUserAllowedTriggered",GET_USER_TRIGGERED:"getUserTriggered",GET_USER_ROLE_TRIGGERED:"getUserRoleTriggered",GET_USER_PERMISSIONS_TRIGGERED:"getUserPermissionsTriggered",GET_FEATURES_ACCESS_LEVEL_IAM_TRIGGERED:"getFeaturesAccessLevelIamTriggered",IS_PLAN_EXPIRED_TRIGGERED:"isPlanExpiredTriggered",GET_VELT_INIT_STATE_TRIGGERED:"getVeltInitStateTriggered",GET_CUSTOMER_METADATA_TRIGGERED:"getCustomerMetadataTriggered",GET_DOCUMENT_METADATA_TRIGGERED:"getDocumentMetadataTriggered",REMOVE_VELT_CONTENT_TRIGGERED:"removeVeltContentTriggered",INJECT_CUSTOM_CSS_TRIGGERED:"injectCustomCssTriggered",SET_LANGUAGE_TRIGGERED:"setLanguageTriggered",SET_TRANSLATIONS_TRIGGERED:"setTranslationsTriggered",ENABLE_AUTO_TRANSLATION_TRIGGERED:"enableAutoTranslationTriggered",DISABLE_AUTO_TRANSLATION_TRIGGERED:"disableAutoTranslationTriggered",SF_TRIGGERED:"sfTriggered",ST_TRIGGERED:"stTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",SET_UI_STATE_TRIGGERED:"setUiStateTriggered",GET_UI_STATE_TRIGGERED:"getUiStateTriggered",ENABLE_SAFE_EVAL_TRIGGERED:"enableSafeEvalTriggered",DISABLE_SAFE_EVAL_TRIGGERED:"disableSafeEvalTriggered",RESET_VELT_BUTTON_STATE_TRIGGERED:"resetVeltButtonStateTriggered"},Resolver:{COMMENT_RESOLVER_GET:"comment_resolver_get",COMMENT_RESOLVER_SAVE:"comment_resolver_save",COMMENT_RESOLVER_DELETE:"comment_resolver_delete",REACTION_RESOLVER_GET:"reaction_resolver_get",REACTION_RESOLVER_SAVE:"reaction_resolver_save",REACTION_RESOLVER_DELETE:"reaction_resolver_delete",USER_RESOLVER_GET:"user_resolver_get",ATTACHMENT_RESOLVER_SAVE:"attachment_resolver_save",ATTACHMENT_RESOLVER_DELETE:"attachment_resolver_delete"},Autocomplete:{CREATE_TRIGGERED:"createTriggered",ON_AUTOCOMPLETE_CHIP_CLICK_TRIGGERED:"onAutocompleteChipClickTriggered"},Comments:{COMMENT_TOOL_CLICKED:"commentToolClicked",COMMENT_DRAFT_ADDED:"commentDraftAdded",COMMENT_ADD_CONTEXT_TRIGGERED:"commentAddContextTriggered",COMMENT_UPDATE_CONTEXT_TRIGGERED:"commentUpdateContextTriggered",COMMENT_UPDATE_CONTEXT_SUCCESS:"commentUpdateContextSuccess",COMMENT_UPDATE_CONTEXT_FAILED:"commentUpdateContextFailed",COMMENT_ADDED:"commentAdded",COMMENT_PUBLISHED:"commentPublished",COMMENT_READ:"commentRead",COMMENT_STATUS_CHANGED:"commentStatusChanged",COMMENT_PRIORITY_CHANGED:"commentPriorityChanged",COMMENT_CUSTOM_CHIPS_CHANGED:"commentCustomChipsChanged",COMMENT_APPROVED:"commentApproved",COMMENT_ACCEPTED:"commentAccepted",COMMENT_REJECTED:"commentRejected",COMMENT_ASSIGNED:"commentAssigned",COMMENT_DELETE_TRIGGERED:"commentDeleteTriggered",COMMENT_DELETED:"commentDeleted",COMMENT_THREAD_DELETED:"commentThreadDeleted",COMMENT_LINK_COPIED:"commentLinkCopied",COMMENT_EDIT_BUTTON_CLICKED:"commentEditButtonClicked",COMMENT_EDITED:"commentEdited",COMMENT_SIDEBAR_OPENED:"commentSidebarOpened",COMMENT_SIDEBAR_CLOSED:"commentSidebarClosed",COMMENT_SIDEBAR_TOGGLED:"commentSidebarToggled",COMMENT_TAG_BUTTON_CLICKED:"commentTagButtonClicked",COMMENT_TAG_ADDED:"commentTagAdded",COMMENT_PIN_DRAGGED:"commentPinDragged",COMMENT_ADD_MODE_ENABLED:"commentAddModeEnabled",COMMENT_ADD_MODE_DISABLED:"commentAddModeDisabled",COMMENT_TEXT_MODE_ENABLED:"commentTextModeEnabled",COMMENT_TEXT_MODE_DISABLED:"commentTextModeDisabled",COMMENT_POPOVER_MODE_ENABLED:"commentPopoverModeEnabled",COMMENT_POPOVER_MODE_DISABLED:"commentPopoverModeDisabled",COMMENT_STREAM_MODE_ENABLED:"commentStreamModeEnabled",COMMENT_STREAM_MODE_DISABLED:"commentStreamModeDisabled",COMMENT_SIDEBAR_EMBED_MODE_ENABLED:"commentSidebarEmbedModeEnabled",COMMENT_SIDEBAR_FLOATING_MODE_ENABLED:"commentSidebarFloatingModeEnabled",COMMENT_ATTACHMENT_BUTTON_CLICKED:"commentAttachmentButtonClicked",COMMENT_ATTACHMENT_ADDED:"commentAttachmentAdded",COMMENT_ATTACHMENT_DOWNLOADED:"commentAttachmentDownloaded",COMMENT_ATTACHMENT_DELETED:"commentAttachmentDeleted",COMMENT_ATTACHMENT_SIZE_EXCEEDED:"commentAttachmentSizeExceeded",COMMENT_SUBMIT_TRIGGERED:"commentSubmitTriggered",COMMENT_APPROVE_BUTTON_CLICKED:"commentApproveButtonClicked",COMMENT_ACCEPT_BUTTON_CLICKED:"commentAcceptButtonClicked",COMMENT_REJECT_BUTTON_CLICKED:"commentRejectButtonClicked",COMMENT_SIGN_IN_BUTTON_CLICKED:"commentSignInButtonClicked",COMMENT_UPGRADE_BUTTON_CLICKED:"commentUpgradeButtonClicked",COMMENT_RECORDING_TOOL_CLICKED:"commentRecordingToolClicked",COMMENT_RECORDING_ADDED:"commentRecordingAdded",COMMENT_RECORDING_DELETED:"commentRecordingDeleted",COMMENT_MORE_REPLY_OPTION_CLICKED:"commentMoreReplyOptionClicked",COMMENT_PRIVATE_COMMENT_MODE_ENABLED:"commentPrivateCommentModeEnabled",COMMENT_PRIVATE_COMMENT_MODE_DISABLED:"commentPrivateCommentModeDisabled",COMMENT_ACCESS_MODE_CHANGED:"commentAccessModeChanged",GET_ALL_COMMENT_ANNOTATIONS_TRIGGERED_INTERNAL:"getAllCommentAnnotationsTriggered_internal",GET_ALL_COMMENT_ANNOTATIONS_TRIGGERED:"getAllCommentAnnotationsTriggered",DELETE_SELECTED_COMMENT_TRIGGERED:"deleteSelectedCommentTriggered",ENABLE_TEXT_COMMENTS_TRIGGERED:"enableTextCommentsTriggered",DISABLE_TEXT_COMMENTS_TRIGGERED:"disableTextCommentsTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered",ALLOWED_ELEMENT_CLASS_NAMES_TRIGGERED:"allowedElementClassNamesTriggered",ALLOWED_ELEMENT_QUERY_SELECTORS_TRIGGERED:"allowedElementQuerySelectorsTriggered",ENABLE_FLOATING_COMMENT_DIALOG_TRIGGERED:"enableFloatingCommentDialogTriggered",DISABLE_FLOATING_COMMENT_DIALOG_TRIGGERED:"disableFloatingCommentDialogTriggered",ATTACH_COMMENT_TRIGGERED:"attachCommentTriggered",OPEN_COMMENT_SIDEBAR_TRIGGERED:"openCommentSidebarTriggered",CLOSE_COMMENT_SIDEBAR_TRIGGERED:"closeCommentSidebarTriggered",TOGGLE_COMMENT_SIDEBAR_TRIGGERED:"toggleCommentSidebarTriggered",ENABLE_MODERATOR_MODE_TRIGGERED:"enableModeratorModeTriggered",DISABLE_MODERATOR_MODE_TRIGGERED:"disableModeratorModeTriggered",ENABLE_STREAM_MODE_TRIGGERED:"enableStreamModeTriggered",DISABLE_STREAM_MODE_TRIGGERED:"disableStreamModeTriggered",ENABLE_SIGN_IN_BUTTON_TRIGGERED:"enableSignInButtonTriggered",DISABLE_SIGN_IN_BUTTON_TRIGGERED:"disableSignInButtonTriggered",ENABLE_UPGRADE_BUTTON_TRIGGERED:"enableUpgradeButtonTriggered",DISABLE_UPGRADE_BUTTON_TRIGGERED:"disableUpgradeButtonTriggered",ON_COMMENT_MODE_CHANGE_TRIGGERED:"onCommentModeChangeTriggered",ENABLE_ATTACHMENTS_TRIGGERED:"enableAttachmentsTriggered",DISABLE_ATTACHMENTS_TRIGGERED:"disableAttachmentsTriggered",IS_USER_GLOBAL_CONTACT_TRIGGERED:"isUserGlobalContactTriggered",ENABLE_DEVICE_INFO_TRIGGERED:"enableDeviceInfoTriggered",DISABLE_DEVICE_INFO_TRIGGERED:"disableDeviceInfoTriggered",ENABLE_COMMENT_MODE_TRIGGERED:"enableCommentModeTriggered",DISABLE_COMMENT_MODE_TRIGGERED:"disableCommentModeTriggered",ENABLE_PERSISTENT_COMMENT_MODE_TRIGGERED:"enablePersistentCommentModeTriggered",DISABLE_PERSISTENT_COMMENT_MODE_TRIGGERED:"disablePersistentCommentModeTriggered",ENABLE_COMMENT_INDEX_TRIGGERED:"enableCommentIndexTriggered",DISABLE_COMMENT_INDEX_TRIGGERED:"disableCommentIndexTriggered",ENABLE_POPOVER_MODE_TRIGGERED:"enablePopoverModeTriggered",DISABLE_POPOVER_MODE_TRIGGERED:"disablePopoverModeTriggered",ENABLE_POPOVER_TRIANGLE_COMPONENT_TRIGGERED:"enablePopoverTriangleComponentTriggered",DISABLE_POPOVER_TRIANGLE_COMPONENT_TRIGGERED:"disablePopoverTriangleComponentTriggered",ENABLE_DIALOG_ON_HOVER_TRIGGERED:"enableDialogOnHoverTriggered",DISABLE_DIALOG_ON_HOVER_TRIGGERED:"disableDialogOnHoverTriggered",ENABLE_DIALOG_ON_TARGET_ELEMENT_CLICK_TRIGGERED:"enableDialogOnTargetElementClickTriggered",DISABLE_DIALOG_ON_TARGET_ELEMENT_CLICK_TRIGGERED:"disableDialogOnTargetElementClickTriggered",ENABLE_PRIORITY_TRIGGERED:"enablePriorityTriggered",DISABLE_PRIORITY_TRIGGERED:"disablePriorityTriggered",ENABLE_STATUS_TRIGGERED:"enableStatusTriggered",DISABLE_STATUS_TRIGGERED:"disableStatusTriggered",ENABLE_RESOLVE_BUTTON_TRIGGERED:"enableResolveButtonTriggered",DISABLE_RESOLVE_BUTTON_TRIGGERED:"disableResolveButtonTriggered",ENABLE_GHOST_COMMENTS_TRIGGERED:"enableGhostCommentsTriggered",DISABLE_GHOST_COMMENTS_TRIGGERED:"disableGhostCommentsTriggered",ENABLE_GHOST_COMMENTS_INDICATOR_TRIGGERED:"enableGhostCommentsIndicatorTriggered",DISABLE_GHOST_COMMENTS_INDICATOR_TRIGGERED:"disableGhostCommentsIndicatorTriggered",SET_CUSTOM_STATUS_TRIGGERED:"setCustomStatusTriggered",SET_CUSTOM_PRIORITY_TRIGGERED:"setCustomPriorityTriggered",SET_CUSTOM_CATEGORY_TRIGGERED:"setCustomCategoryTriggered",ENABLE_INBOX_MODE_TRIGGERED:"enableInboxModeTriggered",DISABLE_INBOX_MODE_TRIGGERED:"disableInboxModeTriggered",ENABLE_AUTO_CATEGORIZE_TRIGGERED:"enableAutoCategorizeTriggered",DISABLE_AUTO_CATEGORIZE_TRIGGERED:"disableAutoCategorizeTriggered",ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",SET_CONTEXT_PROVIDER_TRIGGERED:"setContextProviderTriggered",ENABLE_SUGGESTION_MODE_TRIGGERED:"enableSuggestionModeTriggered",DISABLE_SUGGESTION_MODE_TRIGGERED:"disableSuggestionModeTriggered",ENABLE_MOBILE_MODE_TRIGGERED:"enableMobileModeTriggered",DISABLE_MOBILE_MODE_TRIGGERED:"disableMobileModeTriggered",ENABLE_INLINE_COMMENT_MODE_TRIGGERED:"enableInlineCommentModeTriggered",DISABLE_INLINE_COMMENT_MODE_TRIGGERED:"disableInlineCommentModeTriggered",ENABLE_MINIMAP_TRIGGERED:"enableMinimapTriggered",DISABLE_MINIMAP_TRIGGERED:"disableMinimapTriggered",SHOW_COMMENTS_ON_DOM_TRIGGERED:"showCommentsOnDomTriggered",HIDE_COMMENTS_ON_DOM_TRIGGERED:"hideCommentsOnDomTriggered",ENABLE_COMMENT_TOOL_TRIGGERED:"enableCommentToolTriggered",DISABLE_COMMENT_TOOL_TRIGGERED:"disableCommentToolTriggered",SET_TOTAL_MEDIA_LENGTH_TRIGGERED:"setTotalMediaLengthTriggered",ON_COMMENT_ADD_TRIGGERED:"onCommentAddTriggered",ON_COMMENT_UPDATE_TRIGGERED:"onCommentUpdateTriggered",ADD_COMMENT_ON_SELECTED_TEXT_TRIGGERED:"addCommentOnSelectedTextTriggered",ENABLE_SIDEBAR_URL_NAVIGATION_TRIGGERED:"enableSidebarUrlNavigationTriggered",DISABLE_SIDEBAR_URL_NAVIGATION_TRIGGERED:"disableSidebarUrlNavigationTriggered",SET_D_STRATEGY_TRIGGERED:"setDStrategyTriggered",ENABLE_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_TRIGGERED:"enableSidebarButtonOnCommentDialogTriggered",DISABLE_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_TRIGGERED:"disableSidebarButtonOnCommentDialogTriggered",ON_SIDEBAR_BUTTON_ON_COMMENT_DIALOG_CLICK_TRIGGERED:"onSidebarButtonOnCommentDialogClickTriggered",ENABLE_REACTIONS_TRIGGERED:"enableReactionsTriggered",DISABLE_REACTIONS_TRIGGERED:"disableReactionsTriggered",SET_RECORDINGS_TRIGGERED:"setRecordingsTriggered",ADD_COMMENT_ON_ELEMENT_TRIGGERED:"addCommentOnElementTriggered",ENABLE_PRIVATE_COMMENT_MODE_TRIGGERED:"enablePrivateCommentModeTriggered",DISABLE_PRIVATE_COMMENT_MODE_TRIGGERED:"disablePrivateCommentModeTriggered",ENABLE_SCROLL_TO_COMMENT_TRIGGERED:"enableScrollToCommentTriggered",DISABLE_SCROLL_TO_COMMENT_TRIGGERED:"disableScrollToCommentTriggered",ENABLE_USER_MENTIONS_TRIGGERED:"enableUserMentionsTriggered",DISABLE_USER_MENTIONS_TRIGGERED:"disableUserMentionsTriggered",SET_COMMENT_SIDEBAR_FILTERS_TRIGGERED:"setCommentSidebarFiltersTriggered",SET_SYSTEM_FILTERS_OPERATOR_TRIGGERED:"setSystemFiltersOperatorTriggered",ENABLE_COMMENT_PIN_HIGHLIGHTER_TRIGGERED:"enableCommentPinHighlighterTriggered",DISABLE_COMMENT_PIN_HIGHLIGHTER_TRIGGERED:"disableCommentPinHighlighterTriggered",ENABLE_DELETE_ON_BACKSPACE_TRIGGERED:"enableDeleteOnBackspaceTriggered",DISABLE_DELETE_ON_BACKSPACE_TRIGGERED:"disableDeleteOnBackspaceTriggered",ENABLE_HOTKEY_TRIGGERED:"enableHotkeyTriggered",DISABLE_HOTKEY_TRIGGERED:"disableHotkeyTriggered",ENABLE_DEVICE_INDICATOR_ON_COMMENT_PINS_TRIGGERED:"enableDeviceIndicatorOnCommentPinsTriggered",DISABLE_DEVICE_INDICATOR_ON_COMMENT_PINS_TRIGGERED:"disableDeviceIndicatorOnCommentPinsTriggered",GET_ELEMENT_REF_BY_ANNOTATION_ID_TRIGGERED:"getElementRefByAnnotationIdTriggered",SCROLL_TO_COMMENT_BY_ANNOTATION_ID_TRIGGERED:"scrollToCommentByAnnotationIdTriggered",SELECT_COMMENT_BY_ANNOTATION_ID_TRIGGERED:"selectCommentByAnnotationIdTriggered",ENABLE_RECORDING_SUMMARY_TRIGGERED:"enableRecordingSummaryTriggered",DISABLE_RECORDING_SUMMARY_TRIGGERED:"disableRecordingSummaryTriggered",ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"enableRecordingTranscriptionTriggered",DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"disableRecordingTranscriptionTriggered",ENABLE_RECORDING_COUNTDOWN_TRIGGERED:"enableRecordingCountdownTriggered",DISABLE_RECORDING_COUNTDOWN_TRIGGERED:"disableRecordingCountdownTriggered",SET_UNREAD_INDICATOR_MODE_TRIGGERED:"setUnreadIndicatorModeTriggered",ENABLE_ENTER_KEY_TO_SUBMIT_TRIGGERED:"enableEnterKeyToSubmitTriggered",DISABLE_ENTER_KEY_TO_SUBMIT_TRIGGERED:"disableEnterKeyToSubmitTriggered",ENABLE_PIN_SHADOW_DOM_TRIGGERED:"enablePinShadowDOMTriggered",DISABLE_PIN_SHADOW_DOM_TRIGGERED:"disablePinShadowDOMTriggered",ENABLE_DIALOG_SHADOW_DOM_TRIGGERED:"enableDialogShadowDOMTriggered",DISABLE_DIALOG_SHADOW_DOM_TRIGGERED:"disableDialogShadowDOMTriggered",ENABLE_SIDEBAR_SHADOW_DOM_TRIGGERED:"enableSidebarShadowDOMTriggered",DISABLE_SIDEBAR_SHADOW_DOM_TRIGGERED:"disableSidebarShadowDOMTriggered",ENABLE_CHANGE_DETECTION_IN_COMMENT_MODE_TRIGGERED:"enableChangeDetectionInCommentModeTriggered",DISABLE_CHANGE_DETECTION_IN_COMMENT_MODE_TRIGGERED:"disableChangeDetectionInCommentModeTriggered",SHOW_RESOLVED_COMMENTS_ON_DOM_TRIGGERED:"showResolvedCommentsOnDomTriggered",HIDE_RESOLVED_COMMENTS_ON_DOM_TRIGGERED:"hideResolvedCommentsOnDomTriggered",SET_CUSTOM_REACTIONS_TRIGGERED:"setCustomReactionsTriggered",ON_COMMENT_SELECTION_CHANGE_TRIGGERED:"onCommentSelectionChangeTriggered",GET_UNREAD_COMMENT_COUNT_BY_ANNOTATION_ID_TRIGGERED:"getUnreadCommentCountByAnnotationIdTriggered",GET_UNREAD_COMMENT_ANNOTATION_COUNT_ON_CURRENT_DOCUMENT_TRIGGERED:"getUnreadCommentAnnotationCountOnCurrentDocumentTriggered",GET_UNREAD_COMMENT_COUNT_ON_CURRENT_DOCUMENT_TRIGGERED:"getUnreadCommentCountOnCurrentDocumentTriggered",GET_UNREAD_COMMENT_ANNOTATION_COUNT_BY_LOCATION_ID_TRIGGERED:"getUnreadCommentAnnotationCountByLocationIdTriggered",GET_UNREAD_COMMENT_COUNT_BY_LOCATION_ID_TRIGGERED:"getUnreadCommentCountByLocationIdTriggered",UPDATE_COMMENT_DIALOG_POSITION_TRIGGERED:"updateCommentDialogPositionTriggered",ENABLE_AREA_COMMENT_TRIGGERED:"enableAreaCommentTriggered",DISABLE_AREA_COMMENT_TRIGGERED:"disableAreaCommentTriggered",SET_PIN_CURSOR_IMAGE_TRIGGERED:"setPinCursorImageTriggered",ADD_MANUAL_COMMENT_TRIGGERED:"addManualCommentTriggered",CREATE_CUSTOM_LIST_DATA_ON_ANNOTATION_TRIGGERED:"createCustomListDataOnAnnotationTriggered",CREATE_CUSTOM_LIST_DATA_ON_COMMENT_TRIGGERED:"createCustomListDataOnCommentTriggered",EXCLUDE_LOCATION_IDS_FROM_SIDEBAR_TRIGGERED:"excludeLocationIdsFromSidebarTriggered",ENABLE_BUBBLE_ON_PIN_TRIGGERED:"enableBubbleOnPinTriggered",DISABLE_BUBBLE_ON_PIN_TRIGGERED:"disableBubbleOnPinTriggered",ENABLE_BUBBLE_ON_PIN_HOVER_TRIGGERED:"enableBubbleOnPinHoverTriggered",DISABLE_BUBBLE_ON_PIN_HOVER_TRIGGERED:"disableBubbleOnPinHoverTriggered",ENABLE_MULTI_THREAD_MODE_TRIGGERED:"enableMultiThreadModeTriggered",DISABLE_MULTI_THREAD_MODE_TRIGGERED:"disableMultiThreadModeTriggered",ENABLE_MULTI_THREAD_TRIGGERED:"enableMultiThreadTriggered",DISABLE_MULTI_THREAD_TRIGGERED:"disableMultiThreadTriggered",ENABLE_GROUP_MATCHED_COMMENTS_TRIGGERED:"enableGroupMatchedCommentsTriggered",DISABLE_GROUP_MATCHED_COMMENTS_TRIGGERED:"disableGroupMatchedCommentsTriggered",UPDATE_CONTEXT_TRIGGERED:"updateContextTriggered",GET_SELECTED_COMMENTS_TRIGGERED:"getSelectedCommentsTriggered",ENABLE_DELETE_REPLY_CONFIRMATION_TRIGGERED:"enableDeleteReplyConfirmationTriggered",DISABLE_DELETE_REPLY_CONFIRMATION_TRIGGERED:"disableDeleteReplyConfirmationTriggered",ON_COPY_LINK_TRIGGERED:"onCopyLinkTriggered",GET_COMMENT_ANNOTATION_BY_ID_TRIGGERED:"getCommentAnnotationByIdTriggered",ENABLE_COLLAPSED_COMMENTS_TRIGGERED:"enableCollapsedCommentsTriggered",DISABLE_COLLAPSED_COMMENTS_TRIGGERED:"disableCollapsedCommentsTriggered",ON_COMMENT_SIDEBAR_ACTION_BUTTON_CLICK_TRIGGERED:"onCommentSidebarActionButtonClickTriggered",SET_COMMENT_SIDEBAR_DATA_TRIGGERED:"setCommentSidebarDataTriggered",ON_COMMENT_SIDEBAR_INIT_TRIGGERED:"onCommentSidebarInitTriggered",ON_COMMENT_SIDEBAR_DATA_TRIGGERED:"onCommentSidebarDataTriggered",SET_COMMENT_SIDEBAR_DEFAULT_CUSTOM_ACTIONS_TRIGGERED:"setCommentSidebarDefaultCustomActionsTriggered",ENABLE_SIDEBAR_CUSTOM_ACTIONS_TRIGGERED:"enableSidebarCustomActionsTriggered",DISABLE_SIDEBAR_CUSTOM_ACTIONS_TRIGGERED:"disableSidebarCustomActionsTriggered",ENABLE_QUERY_PARAMS_COMMENTS_TRIGGERED:"enableQueryParamsCommentsTriggered",DISABLE_QUERY_PARAMS_COMMENTS_TRIGGERED:"disableQueryParamsCommentsTriggered",ENABLE_RESOLVE_STATUS_ACCESS_ADMIN_ONLY_TRIGGERED:"enableResolveStatusAccessAdminOnlyTriggered",DISABLE_RESOLVE_STATUS_ACCESS_ADMIN_ONLY_TRIGGERED:"disableResolveStatusAccessAdminOnlyTriggered",ENABLE_LINK_CALLBACK_TRIGGERED:"enableLinkCallbackTriggered",DISABLE_LINK_CALLBACK_TRIGGERED:"disableLinkCallbackTriggered",ENABLE_SEEN_BY_USERS_TRIGGERED:"enableSeenByUsersTriggered",DISABLE_SEEN_BY_USERS_TRIGGERED:"disableSeenByUsersTriggered",ENABLE_SHORT_USER_NAME_TRIGGERED:"enableShortUserNameTriggered",DISABLE_SHORT_USER_NAME_TRIGGERED:"disableShortUserNameTriggered",ENABLE_READ_ONLY_TRIGGERED:"enableReadOnlyTriggered",DISABLE_READ_ONLY_TRIGGERED:"disableReadOnlyTriggered",ADD_COMMENT_ANNOTATION_TRIGGERED:"addCommentAnnotationTriggered",PUBLISH_COMMENT_ANNOTATION_TRIGGERED:"publishCommentAnnotationTriggered",APPROVE_COMMENT_ANNOTATION_TRIGGERED:"approveCommentAnnotationTriggered",ACCEPT_COMMENT_ANNOTATION_TRIGGERED:"acceptCommentAnnotationTriggered",REJECT_COMMENT_ANNOTATION_TRIGGERED:"rejectCommentAnnotationTriggered",SUBSCRIBE_COMMENT_ANNOTATION_TRIGGERED:"subscribeCommentAnnotationTriggered",UNSUBSCRIBE_COMMENT_ANNOTATION_TRIGGERED:"unsubscribeCommentAnnotationTriggered",DELETE_COMMENT_ANNOTATION_TRIGGERED:"deleteCommentAnnotationTriggered",GET_COMMENT_ANNOTATIONS_TRIGGERED:"getCommentAnnotationsTriggered",GET_COMMENT_ANNOTATIONS_COUNT_TRIGGERED:"getCommentAnnotationsCountTriggered",ASSIGN_USER_TRIGGERED:"assignUserTriggered",UPDATE_PRIORITY_TRIGGERED:"updatePriorityTriggered",UPDATE_STATUS_TRIGGERED:"updateStatusTriggered",UPDATE_ACCESS_TRIGGERED:"updateAccessTriggered",RESOLVE_COMMENT_ANNOTATION_TRIGGERED:"resolveCommentAnnotationTriggered",GET_LINK_TRIGGERED:"getLinkTriggered",COPY_LINK_TRIGGERED:"copyLinkTriggered",ADD_COMMENT_TRIGGERED:"addCommentTriggered",UPDATE_COMMENT_TRIGGERED:"updateCommentTriggered",DELETE_COMMENT_TRIGGERED:"deleteCommentTriggered",GET_COMMENT_TRIGGERED:"getCommentTriggered",ADD_ATTACHMENT_TRIGGERED:"addAttachmentTriggered",DELETE_ATTACHMENT_TRIGGERED:"deleteAttachmentTriggered",GET_ATTACHMENT_TRIGGERED:"getAttachmentTriggered",DELETE_RECORDING_TRIGGERED:"deleteRecordingTriggered",GET_RECORDING_TRIGGERED:"getRecordingTriggered",ADD_REACTION_TRIGGERED:"addReactionTriggered",DELETE_REACTION_TRIGGERED:"deleteReactionTriggered",TOGGLE_REACTION_TRIGGERED:"toggleReactionTriggered",ENABLE_CUSTOM_AUTOCOMPLETE_SEARCH_TRIGGERED:"enableCustomAutocompleteSearchTriggered",DISABLE_CUSTOM_AUTOCOMPLETE_SEARCH_TRIGGERED:"disableCustomAutocompleteSearchTriggered",FETCH_COMMENT_ANNOTATIONS_TRIGGERED:"fetchCommentAnnotationsTriggered",SET_TRANSFORM_CONTEXT_TRIGGERED:"setTransformContextTriggered",ENABLE_SVG_AS_IMG_TRIGGERED:"enableSvgAsImgTriggered",DISABLE_SVG_AS_IMG_TRIGGERED:"disableSvgAsImgTriggered",ENABLE_FULL_EXPANDED_TRIGGERED:"enableFullExpandedTriggered",DISABLE_FULL_EXPANDED_TRIGGERED:"disableFullExpandedTriggered",ENABLE_COMMENT_TO_NEAREST_ALLOWED_ELEMENT_TRIGGERED:"enableCommentToNearestAllowedElementTriggered",DISABLE_COMMENT_TO_NEAREST_ALLOWED_ELEMENT_TRIGGERED:"disableCommentToNearestAllowedElementTriggered",ENABLE_DRAFT_MODE_TRIGGERED:"enableDraftModeTriggered",DISABLE_DRAFT_MODE_TRIGGERED:"disableDraftModeTriggered",ENABLE_FILTER_COMMENTS_ON_DOM_TRIGGERED:"enableFilterCommentsOnDomTriggered",DISABLE_FILTER_COMMENTS_ON_DOM_TRIGGERED:"disableFilterCommentsOnDomTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",ENABLE_REPLY_AVATARS_TRIGGERED:"enableReplyAvatarsTriggered",DISABLE_REPLY_AVATARS_TRIGGERED:"disableReplyAvatarsTriggered",SET_MAX_REPLY_AVATARS_TRIGGERED:"setMaxReplyAvatarsTriggered",SET_SIDEBAR_BUTTON_COUNT_TYPE_TRIGGERED:"setSidebarButtonCountTypeTriggered",ENABLE_FILTER_GHOST_COMMENTS_IN_SIDEBAR_TRIGGERED:"enableFilterGhostCommentsInSidebarTriggered",DISABLE_FILTER_GHOST_COMMENTS_IN_SIDEBAR_TRIGGERED:"disableFilterGhostCommentsInSidebarTriggered"},Recording:{RECORDING_TOOL_CLICKED:"recordingToolClicked",RECORDING_ADDED:"recordingAdded",RECORDING_PANEL_SAVE_BUTTON_CLICKED:"recordingPanelSaveButtonClicked",RECORDING_PANEL_CANCEL_BUTTON_CLICKED:"recordingPanelCancelButtonClicked",RECORDING_PANEL_PAUSE_BUTTON_CLICKED:"recordingPanelPauseButtonClicked",RECORDING_PANEL_RESUME_BUTTON_CLICKED:"recordingPanelResumeButtonClicked",RECORDING_PANEL_VIDEO_ON_BUTTON_CLICKED:"recordingPanelVideoOnButtonClicked",RECORDING_PANEL_VIDEO_OFF_BUTTON_CLICKED:"recordingPanelVideoOffButtonClicked",RECORDING_PANEL_AUDIO_ON_BUTTON_CLICKED:"recordingPanelAudioOnButtonClicked",RECORDING_PANEL_AUDIO_OFF_BUTTON_CLICKED:"recordingPanelAudioOffButtonClicked",RECORDING_PANEL_START_BUTTON_CLICKED:"recordingPanelStartButtonClicked",RECORDING_PANEL_PIP_BUTTON_CLICKED:"recordingPanelPipButtonClicked",RECORDING_PLAYED:"recordingPlayed",RECORDING_PAUSED:"recordingPaused",RECORDING_DELETE_TRIGGERED:"recordingDeleteTriggered",RECORDING_DELETED:"recordingDeleted",RECORDING_DRAGGED:"recordingDragged",RECORDING_DRAFT_DRAGGED:"recordingDraftDragged",TRANSCRIPTION_CLICKED:"transcriptionClicked",SUBTITLES_CLICKED:"subtitlesClicked",VIEW_TRANSCRIPTION_SUMMARY_CLICKED:"viewTranscriptionSummaryClicked",TRANSCRIPTION_SUMMARY_COPIED:"transcriptionSummaryCopied",TRANSCRIPTION_TIMESTAMP_CLICKED:"transcriptionTimestampClicked",TRANSCRIPTION_PANEL_DRAGGED:"transcriptionPanelDragged",SUBTITLES_PANEL_DRAGGED:"subtitlesPanelDragged",REQUEST_SCREEN_PERMISSION_TRIGGERED:"requestScreenPermissionTriggered",INIT_RECORDING_TRIGGERED:"initRecordingTriggered",ON_RECORDED_DATA_TRIGGERED:"onRecordedDataTriggered",ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",ENABLE_RECORDING_COUNTDOWN_TRIGGERED:"enableRecordingCountdownTriggered",DISABLE_RECORDING_COUNTDOWN_TRIGGERED:"disableRecordingCountdownTriggered",GET_RECORDING_DATA_BY_RECORDER_ID_TRIGGERED:"getRecordingDataByRecorderIdTriggered",GET_RECORDINGS_TRIGGERED:"getRecordingsTriggered",ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"enableRecordingTranscriptionTriggered",DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED:"disableRecordingTranscriptionTriggered",GET_RECORDING_DATA_TRIGGERED:"getRecordingDataTriggered",FETCH_RECORDINGS_TRIGGERED:"fetchRecordingsTriggered",DELETE_RECORDING_TRIGGERED:"deleteRecordingTriggered",ENABLE_VIDEO_EDITOR_TRIGGERED:"enableVideoEditorTriggered",DISABLE_VIDEO_EDITOR_TRIGGERED:"disableVideoEditorTriggered",SET_RECORDING_QUALITY_CONSTRAINTS_TRIGGERED:"setRecordingQualityConstraintsTriggered",SET_RECORDING_ENCODING_OPTIONS_TRIGGERED:"setRecordingEncodingOptionsTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",DOWNLOAD_LATEST_VIDEO_TRIGGERED:"downloadLatestVideoTriggered",ENABLE_RECORDING_MIC_TRIGGERED:"enableRecordingMicTriggered",DISABLE_RECORDING_MIC_TRIGGERED:"disableRecordingMicTriggered",ENABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED:"enableRetakeOnVideoEditorTriggered",DISABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED:"disableRetakeOnVideoEditorTriggered",ASK_DEVICE_PERMISSION_TRIGGERED:"askDevicePermissionTriggered",ENABLE_ONBOARDING_TOOLTIP_TRIGGERED:"enableOnboardingTooltipTriggered",DISABLE_ONBOARDING_TOOLTIP_TRIGGERED:"disableOnboardingTooltipTriggered",SET_MAX_LENGTH_TRIGGERED:"setMaxLengthTriggered",OPEN_PICTURE_IN_PICTURE_TRIGGERED:"openPictureInPictureTriggered",EXIT_PICTURE_IN_PICTURE_TRIGGERED:"exitPictureInPictureTriggered",ENABLE_PICTURE_IN_PICTURE_TRIGGERED:"enablePictureInPictureTriggered",DISABLE_PICTURE_IN_PICTURE_TRIGGERED:"disablePictureInPictureTriggered"},Huddle:{HUDDLE_TOOL_CLICKED:"huddleToolClicked",HUDDLE_CREATED:"huddleCreated",HUDDLE_JOIN_BUTTON_CLICKED:"huddleJoinButtonClicked",HUDDLE_JOINED:"huddleJoined",HUDDLE_LEFT:"huddleLeft",HUDDLE_AUDIO_BUTTON_CLICKED:"huddleAudioButtonClicked",HUDDLE_AUDIO_MUTED:"huddleAudioMuted",HUDDLE_AUDIO_UNMUTED:"huddleAudioUnmuted",HUDDLE_VIDEO_BUTTON_CLICKED:"huddleVideoButtonClicked",HUDDLE_VIDEO_TURNED_ON:"huddleVideoTurnedOn",HUDDLE_VIDEO_TURNED_OFF:"huddleVideoTurnedOff",HUDDLE_SCREENSHARING_BUTTON_CLICKED:"huddleScreensharingButtonClicked",HUDDLE_SCREENSHARING_STARTED:"huddleScreensharingStarted",HUDDLE_SCREENSHARING_STOPPED:"huddleScreensharingStopped",ENABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED:"enableHuddleOnCursorModeTriggered",DISABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED:"disableHuddleOnCursorModeTriggered",ENABLE_CHAT_TRIGGERED:"enableChatTriggered",DISABLE_CHAT_TRIGGERED:"disableChatTriggered",ENABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED:"enableFlockModeOnAvatarClickTriggered",DISABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED:"disableFlockModeOnAvatarClickTriggered"},Presence:{PRESENCE_MULTIPLE_USERS_DETECTED:"presenceMultipleUsersDetected",PRESENCE_USER_STATUS_CHANGED:"presenceUserStatusChanged",PRESENCE_USER_CLICKED:"presenceUserClicked",PRESENCE_SET_CUSTOM_INACTIVITY_TIMER:"presenceSetCustomInactivityTimer",PRESENCE_SET_CUSTOM_OFFLINE_INACTIVITY_TIMER:"presenceSetCustomOfflineInactivityTimer",PRESENCE_SET_CUSTOM_MAX_USERS:"presenceSetCustomMaxUsers",MULTIPLE_USERS_ONLINE:"multipleUsersOnline",ON_USER_STATE_CHANGE:"onUserStateChange",GET_PRESENCE_DATA_TRIGGERED:"getPresenceDataTriggered",GET_ONLINE_USERS_ON_CURRENT_DOCUMENT_TRIGGERED:"getOnlineUsersOnCurrentDocumentTriggered",SET_INACTIVITY_TIME_TRIGGERED:"setInactivityTimeTriggered",ENABLE_FLOCK_MODE_TRIGGERED:"enableFlockModeTriggered",DISABLE_FLOCK_MODE_TRIGGERED:"disableFlockModeTriggered",START_FOLLOWING_USER_TRIGGERED:"startFollowingUserTriggered",STOP_FOLLOWING_USER_TRIGGERED:"stopFollowingUserTriggered",ENABLE_SELF_TRIGGERED:"enableSelfTriggered",DISABLE_SELF_TRIGGERED:"disableSelfTriggered",ON_ACTION_TRIGGERED:"onActionTriggered"},Cursor:{CURSOR_MULTIPLE_USERS_DETECTED:"cursorMultipleUsersDetected",CURSOR_SET_CUSTOM_INACTIVITY_TIMER:"cursorSetCustomInactivityTimer",GET_LIVE_CURSORS_ON_CURRENT_DOCUMENT_TRIGGERED:"getLiveCursorsOnCurrentDocumentTriggered",SET_INACTIVITY_TIME_TRIGGERED:"setInactivityTimeTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered"},Selection:{SELECTION_CREATED_WHEN_MULTIPLE_USERS_DETECTED:"selectionCreatedWhenMultipleUsersDetected",ENABLE_LIVE_SELECTION_TRIGGERED:"enableLiveSelectionTriggered",DISABLE_LIVE_SELECTION_TRIGGERED:"disableLiveSelectionTriggered",ENABLE_USER_INDICATOR_TRIGGERED:"enableUserIndicatorTriggered",DISABLE_USER_INDICATOR_TRIGGERED:"disableUserIndicatorTriggered",SET_USER_INDICATOR_POSITION_TRIGGERED:"setUserIndicatorPositionTriggered",SET_USER_INDICATOR_TYPE_TRIGGERED:"setUserIndicatorTypeTriggered",ENABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED:"enableDefaultElementsTrackingTriggered",DISABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED:"disableDefaultElementsTrackingTriggered",ENABLE_DEFAULT_STYLING_TRIGGERED:"enableDefaultStylingTriggered",DISABLE_DEFAULT_STYLING_TRIGGERED:"disableDefaultStylingTriggered",GET_LIVE_SELECTION_DATA_TRIGGERED:"getLiveSelectionDataTriggered"},LiveStateSync:{SET_USER_AS_EDITOR_TRIGGERED:"setUserAsEditorTriggered",SET_USER_AS_EDITOR_ERROR:"setUserAsEditorError",REQUEST_EDITOR_ACCESS_TRIGGERED:"requestEditorAccessTriggered",ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED:"acceptEditorAccessRequestTriggered",REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED:"rejectEditorAccessRequestTriggered",CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED:"cancelEditorAccessRequestTriggered",EDIT_CURRENT_TAB_TRIGGERED:"editCurrentTabTriggered",SEM_ACCESS_REQUESTED:"semAccessRequested",SEM_ACCESS_REQUEST_CANCELED:"semAccessRequestCanceled",SEM_ACCESS_ACCEPTED:"semAccessAccepted",SEM_ACCESS_REJECTED:"semAccessRejected",SEM_EDITOR_ASSIGNED:"semEditorAssigned",SEM_VIEWER_ASSIGNED:"semViewerAssigned",SEM_EDITOR_ON_DIFFERENT_TAB_DETECTED:"semEditorOnDifferentTabDetected",SEM_MAKE_EDITOR_TRIGGERED:"semMakeEditorTriggered",SEM_MAKE_READER_TRIGGERED:"semMakeReaderTriggered",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS:"semSingleEditorLiveStateDataStats",SEM_SINGLE_EDITOR_LIVE_STATE_EMPTY_DATA_STATS:"semSingleEditorLiveStateEmptyDataStats",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_MISMATCH:"semSingleEditorLiveStateDataMismatch",SEM_SINGLE_EDITOR_DATA_MISMATCH_WITH_EXTERNAL:"semSingleEditorLiveStateDataMismatchWithExternal",SEM_USER_EDITOR_STATS:"semUserEditorStats",REMOVE_EDITOR_ACCESS:"removeEditorAccess",REMOVE_EDITOR_ACCESS_ERROR:"removeEditorAccessError",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_EDITOR:"semSingleEditorLiveStateDataOnMakeEditor",SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_READER:"semSingleEditorLiveStateDataOnMakeReader",GET_LIVE_STATE_DATA_TRIGGERED:"getLiveStateDataTriggered",ENABLE_SINGLE_EDITOR_MODE_TRIGGERED:"enableSingleEditorModeTriggered",DISABLE_SINGLE_EDITOR_MODE_TRIGGERED:"disableSingleEditorModeTriggered",IS_USER_EDITOR_TRIGGERED:"isUserEditorTriggered",GET_EDITOR_TRIGGERED:"getEditorTriggered",RESET_USER_ACCESS_TRIGGERED:"resetUserAccessTriggered",SINGLE_EDITOR_MODE_CONTAINER_IDS_TRIGGERED:"singleEditorModeContainerIdsTriggered",ENABLE_AUTO_SYNC_STATE_TRIGGERED:"enableAutoSyncStateTriggered",DISABLE_AUTO_SYNC_STATE_TRIGGERED:"disableAutoSyncStateTriggered",IS_EDITOR_ACCESS_REQUESTED_TRIGGERED:"isEditorAccessRequestedTriggered",EDITOR_ACCESS_REQUESTED_BY_TRIGGERED:"editorAccessRequestedByTriggered",EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"editorAccessTransferOnTimeoutTriggered",SET_EDITOR_ACCESS_TIMEOUT_TRIGGERED:"setEditorAccessTimeoutTriggered",ENABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"enableEditorAccessTransferOnTimeoutTriggered",DISABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED:"disableEditorAccessTransferOnTimeoutTriggered",ENABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED:"enableDefaultSingleEditorUiTriggered",DISABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED:"disableDefaultSingleEditorUiTriggered",GET_EDITOR_ACCESS_TIMER_TRIGGERED:"getEditorAccessTimerTriggered",ON_SERVER_CONNECTION_STATE_CHANGE_TRIGGERED:"onServerConnectionStateChangeTriggered",UPDATE_USER_PRESENCE_TRIGGERED:"updateUserPresenceTriggered",ON_ACTION_TRIGGERED:"onActionTriggered"},Tag:{TAG_TOOL_CLICKED:"tagToolClicked",TAG_DRAFT_ADDED:"tagDraftAdded",TAG_ADDED:"tagAdded",TAG_READ:"tagRead",TAG_RESOLVED:"tagResolved",TAG_DRAGGED:"tagDragged",TAG_LINK_COPIED:"tagLinkCopied",TAG_ADD_MODE_ENABLED:"tagAddModeEnabled",TAG_ADD_MODE_DISABLED:"tagAddModeDisabled",TAG_DELETE_TRIGGERED:"tagDeleteTriggered",TAG_DELETED:"tagDeleted",GET_ALL_TAG_ANNOTATIONS_TRIGGERED:"getAllTagAnnotationsTriggered",DELETE_TAG_TRIGGERED:"deleteTagTriggered",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered",ATTACH_TAG_TRIGGERED:"attachTagTriggered",ADD_TAG_MODE_CHANGE_TRIGGERED:"addTagModeChangeTriggered"},Rewriter:{REWRITER_ENABLED:"rewriterEnabled",REWRITER_MIN_CHARACTER_NOT_MET:"rewriterMinCharacterNotMet",REWRITER_MAX_CHARACTER_NOT_MET:"rewriterMaxCharacterNotMet",REWRITE_BUTTON_CLICKED:"rewriteButtonClicked",REWRITE_PROMPT_BUTTON_CLICKED:"rewritePromptButtonClicked",REWRITE_REFRESH_BUTTON_CLICKED:"rewriteRefreshButtonClicked",REWRITE_OPTION_SELECTED:"rewriteOptionSelected",REWRITE_TASK_CREATED:"rewriteTaskCreated",REWRITE_DIALOG_DRAGGED:"rewriteDialogDragged",REWRITE_SHOW_ORIGINAL_TEXT_CLICKED:"rewriteShowOriginalTextClicked",REWRITE_CLOSE_BUTTON_CLICKED:"rewriteCloseButtonClicked",REWRITE_PROMPT_SUBMITTED:"rewritePromptSubmitted",ENABLE_REWRITER_TRIGGERED:"enableRewriterTriggered",DISABLE_REWRITER_TRIGGERED:"disableRewriterTriggered"},Feedback:{FEEDBACK_BUTTON_CLICKED:"feedbackButtonClicked",FEEDBACK_SUBMITTED:"feedbackSubmitted"},Contact:{UPDATE_CONTACT_LIST_TRIGGERED:"updateContactListTriggered",IS_USER_GLOBAL_CONTACT_TRIGGERED:"isUserGlobalContactTriggered",ON_CONTACT_SELECTED_TRIGGERED:"onContactSelectedTriggered",ENABLE_AT_HERE_TRIGGERED:"enableAtHereTriggered",DISABLE_AT_HERE_TRIGGERED:"disableAtHereTriggered",SET_AT_HERE_LABEL_TRIGGERED:"setAtHereLabelTriggered",SET_AT_HERE_DESCRIPTION_TRIGGERED:"setAtHereDescriptionTriggered",UPDATE_CONTACT_LIST_SCOPE_FOR_ORGANIZATION_USERS_TRIGGERED:"updateContactListScopeForOrganizationUsersTriggered",GET_CONTACT_LIST_TRIGGERED:"getContactListTriggered"},ContactUs:{CONTACT_BUTTON_CLICKED:"contactButtonClicked",CONTACT_SUBMITTED:"contactSubmitted"},Bug:{BUG_BUTTON_CLICKED:"bugButtonClicked",BUG_SUBMITTED:"bugSubmitted"},ShareDialog:{SHARE_BUTTON_CLICKED:"shareButtonClicked",DOCUMENT_ACCESS_CHANGED:"documentAccessChanged",DOCUMENT_USER_ACCESS_ADDED:"documentUserAccessAdded",DOCUMENT_USER_ACCESS_REMOVED:"documentUserAccessRemoved",SHARE_LINK_COPIED:"shareLinkCopied"},InviteDialog:{USER_INVITED:"userInvited",INVITE_LINK_COPIED:"inviteLinkCopied"},Iam:{USER_ACCESS_DENIED:"userAccessDenied"},Arrow:{ARROW_TOOL_CLICKED:"arrowToolClicked",ARROW_DRAFT_ADDED:"arrowDraftAdded",ARROW_ADDED:"arrowAdded",ARROW_READ:"arrowRead",ARROW_RESOLVED:"arrowResolved",ARROW_DRAGGED:"arrowDragged",ARROW_LINK_COPIED:"arrowLinkCopied",ARROW_ADD_MODE_ENABLED:"arrowAddModeEnabled",ARROW_ADD_MODE_DISABLED:"arrowAddModeDisabled",ARROW_DELETE_TRIGGERED:"arrowDeleteTriggered",ARROW_DELETED:"arrowDeleted",ALLOWED_ELEMENT_IDS_TRIGGERED:"allowedElementIdsTriggered"},Area:{AREA_TOOL_CLICKED:"areaToolClicked",AREA_ADDED:"areaAdded",AREA_DRAGGED:"areaDragged",AREA_LINK_COPIED:"areaLinkCopied",AREA_ADD_MODE_ENABLED:"areaAddModeEnabled",AREA_ADD_MODE_DISABLED:"areaAddModeDisabled",AREA_DELETE_TRIGGERED:"areaDeleteTriggered",AREA_DELETED:"areaDeleted",ENABLE_AREA_COMMENT_TRIGGERED:"enableAreaCommentTriggered",DISABLE_AREA_COMMENT_TRIGGERED:"disableAreaCommentTriggered"},Doc:{DOCUMENT_ID_SET_TRIGGERED:"documentIdSetTriggered",SET_DOCUMENTS_SUCCESS:"setDocumentsSuccess",SET_LOCATIONS_SUCCESS:"setLocationsSuccess",REMOVE_LOCATIONS_SUCCESS:"removeLocationsSuccess",UNSET_LOCATIONS_SUCCESS:"unsetLocationsSuccess",DOCUMENT_SET_TRIGGERED:"documentSetTriggered",UNSET_DOCUMENTS_TRIGGERED:"unsetDocumentsTriggered",UNSET_DOCUMENTS_SUCCESS:"unsetDocumentsSuccess",DOCUMENTS_SET_TRIGGERED:"documentsSetTriggered",GET_DOCUMENT_METADATA_TRIGGERED:"getDocumentMetadataTriggered"},Reactions:{ENABLE_DARK_MODE_TRIGGERED:"enableDarkModeTriggered",DISABLE_DARK_MODE_TRIGGERED:"disableDarkModeTriggered",SET_CUSTOM_REACTIONS_TRIGGERED:"setCustomReactionsTriggered"},Views:{GET_UNIQUE_VIEWS_BY_USER_TRIGGERED:"getUniqueViewsByUserTriggered",GET_UNIQUE_VIEWS_BY_DATE_TRIGGERED:"getUniqueViewsByDateTriggered"},Notifications:{NOTIFICATION_HISTORY_PANEL_OPENED:"notificationHistoryPanelOpened",NOTIFICATION_HISTORY_PANEL_CLOSED:"notificationHistoryPanelClosed",NOTIFICATION_HISTORY_PANEL_TOGGLED:"notificationHistoryPanelToggled",NOTIFICATION_MARK_ALL_AS_READ_CLICKED:"notificationMarkAllAsReadClicked",NOTIFICATION_CLICKED:"notificationClicked",NOTIFICATION_TAB_CLICKED:"notificationTabClicked",NOTIFICATION_READ:"notificationRead",GET_NOTIFICATIONS_FOR_YOU$_TRIGGERED_INTERNAL:"getNotificationsForYou$Triggered_internal",GET_NOTIFICATIONS_BY_DOCUMENT_ID$_TRIGGERED_INTERNAL:"getNotificationsByDocumentId$Triggered_internal",GET_ALL_NOTIFICATIONS$_TRIGGERED_INTERNAL:"getAllNotifications$Triggered_internal",GET_NOTIFICATIONS$_TRIGGERED_INTERNAL:"getNotifications$Triggered_internal",OPEN_HISTORY_PANEL_TRIGGERED:"openHistoryPanelTriggered",CLOSE_HISTORY_PANEL_TRIGGERED:"closeHistoryPanelTriggered",TOGGLE_HISTORY_PANEL_TRIGGERED:"toggleHistoryPanelTriggered",GET_NOTIFICATIONS_DATA_TRIGGERED:"getNotificationsDataTriggered",SET_MAX_DAYS_TRIGGERED:"setMaxDaysTriggered",SET_TAB_CONFIG_TRIGGERED:"setTabConfigTriggered",ENABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED:"enableReadNotificationsOnForYouTabTriggered",DISABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED:"disableReadNotificationsOnForYouTabTriggered",SET_ALL_NOTIFICATIONS_AS_READ_TRIGGERED:"setAllNotificationsAsReadTriggered",GET_UNREAD_NOTIFICATIONS_COUNT_TRIGGERED:"getUnreadNotificationsCountTriggered",MARK_NOTIFICATION_AS_READ_BY_ID_TRIGGERED:"markNotificationAsReadByIdTriggered",SET_SETTINGS_TRIGGERED:"setSettingsTriggered",GET_SETTINGS_TRIGGERED:"getSettingsTriggered",MUTE_ALL_NOTIFICATIONS_TRIGGERED:"muteAllNotificationsTriggered",ENABLE_SETTINGS_TRIGGERED:"enableSettingsTriggered",ENABLE_SELF_NOTIFICATIONS_TRIGGERED:"enableSelfNotificationsTriggered",DISABLE_SELF_NOTIFICATIONS_TRIGGERED:"disableSelfNotificationsTriggered",DISABLE_SETTINGS_TRIGGERED:"disableSettingsTriggered",SET_SETTINGS_INITIAL_CONFIG_TRIGGERED:"setSettingsInitialConfigTriggered",ON_ACTION_TRIGGERED:"onActionTriggered",OPEN_NOTIFICATIONS_PANEL_TRIGGERED:"openNotificationsPanelTriggered",CLOSE_NOTIFICATIONS_PANEL_TRIGGERED:"closeNotificationsPanelTriggered"}};let i=o;return i})(),Xre=[Z.Events.Rewriter.REWRITER_ENABLED];var La=class i{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(o,n=!1){return this.onePassHasher.start().appendStr(o).end(n)}static hashAsciiStr(o,n=!1){return this.onePassHasher.start().appendAsciiStr(o).end(n)}static _hex(o){let n=i.hexChars,e=i.hexOut,t,r,a,s;for(s=0;s<4;s+=1)for(r=s*8,t=o[s],a=0;a<8;a+=2)e[r+1+a]=n.charAt(t&15),t>>>=4,e[r+0+a]=n.charAt(t&15),t>>>=4;return e.join("")}static _md5cycle(o,n){let e=o[0],t=o[1],r=o[2],a=o[3];e+=(t&r|~t&a)+n[0]-680876936|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[1]-389564586|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[2]+606105819|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[3]-1044525330|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[4]-176418897|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[5]+1200080426|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[6]-1473231341|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[7]-45705983|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[8]+1770035416|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[9]-1958414417|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[10]-42063|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[11]-1990404162|0,t=(t<<22|t>>>10)+r|0,e+=(t&r|~t&a)+n[12]+1804603682|0,e=(e<<7|e>>>25)+t|0,a+=(e&t|~e&r)+n[13]-40341101|0,a=(a<<12|a>>>20)+e|0,r+=(a&e|~a&t)+n[14]-1502002290|0,r=(r<<17|r>>>15)+a|0,t+=(r&a|~r&e)+n[15]+1236535329|0,t=(t<<22|t>>>10)+r|0,e+=(t&a|r&~a)+n[1]-165796510|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[6]-1069501632|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[11]+643717713|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[0]-373897302|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[5]-701558691|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[10]+38016083|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[15]-660478335|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[4]-405537848|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[9]+568446438|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[14]-1019803690|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[3]-187363961|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[8]+1163531501|0,t=(t<<20|t>>>12)+r|0,e+=(t&a|r&~a)+n[13]-1444681467|0,e=(e<<5|e>>>27)+t|0,a+=(e&r|t&~r)+n[2]-51403784|0,a=(a<<9|a>>>23)+e|0,r+=(a&t|e&~t)+n[7]+1735328473|0,r=(r<<14|r>>>18)+a|0,t+=(r&e|a&~e)+n[12]-1926607734|0,t=(t<<20|t>>>12)+r|0,e+=(t^r^a)+n[5]-378558|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[8]-2022574463|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[11]+1839030562|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[14]-35309556|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[1]-1530992060|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[4]+1272893353|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[7]-155497632|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[10]-1094730640|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[13]+681279174|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[0]-358537222|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[3]-722521979|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[6]+76029189|0,t=(t<<23|t>>>9)+r|0,e+=(t^r^a)+n[9]-640364487|0,e=(e<<4|e>>>28)+t|0,a+=(e^t^r)+n[12]-421815835|0,a=(a<<11|a>>>21)+e|0,r+=(a^e^t)+n[15]+530742520|0,r=(r<<16|r>>>16)+a|0,t+=(r^a^e)+n[2]-995338651|0,t=(t<<23|t>>>9)+r|0,e+=(r^(t|~a))+n[0]-198630844|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[7]+1126891415|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[14]-1416354905|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[5]-57434055|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[12]+1700485571|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[3]-1894986606|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[10]-1051523|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[1]-2054922799|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[8]+1873313359|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[15]-30611744|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[6]-1560198380|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[13]+1309151649|0,t=(t<<21|t>>>11)+r|0,e+=(r^(t|~a))+n[4]-145523070|0,e=(e<<6|e>>>26)+t|0,a+=(t^(e|~r))+n[11]-1120210379|0,a=(a<<10|a>>>22)+e|0,r+=(e^(a|~t))+n[2]+718787259|0,r=(r<<15|r>>>17)+a|0,t+=(a^(r|~e))+n[9]-343485551|0,t=(t<<21|t>>>11)+r|0,o[0]=e+o[0]|0,o[1]=t+o[1]|0,o[2]=r+o[2]|0,o[3]=a+o[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(i.stateIdentity),this}appendStr(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a;for(a=0;a<o.length;a+=1){if(r=o.charCodeAt(a),r<128)n[t++]=r;else if(r<2048)n[t++]=(r>>>6)+192,n[t++]=r&63|128;else if(r<55296||r>56319)n[t++]=(r>>>12)+224,n[t++]=r>>>6&63|128,n[t++]=r&63|128;else{if(r=(r-55296)*1024+(o.charCodeAt(++a)-56320)+65536,r>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");n[t++]=(r>>>18)+240,n[t++]=r>>>12&63|128,n[t++]=r>>>6&63|128,n[t++]=r&63|128}t>=64&&(this._dataLength+=64,i._md5cycle(this._state,e),t-=64,e[0]=e[16])}return this._bufferLength=t,this}appendAsciiStr(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a=0;for(;;){for(r=Math.min(o.length-a,64-t);r--;)n[t++]=o.charCodeAt(a++);if(t<64)break;this._dataLength+=64,i._md5cycle(this._state,e),t=0}return this._bufferLength=t,this}appendByteArray(o){let n=this._buffer8,e=this._buffer32,t=this._bufferLength,r,a=0;for(;;){for(r=Math.min(o.length-a,64-t);r--;)n[t++]=o[a++];if(t<64)break;this._dataLength+=64,i._md5cycle(this._state,e),t=0}return this._bufferLength=t,this}getState(){let o=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[o[0],o[1],o[2],o[3]]}}setState(o){let n=o.buffer,e=o.state,t=this._state,r;for(this._dataLength=o.length,this._bufferLength=o.buflen,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],r=0;r<n.length;r+=1)this._buffer8[r]=n.charCodeAt(r)}end(o=!1){let n=this._bufferLength,e=this._buffer8,t=this._buffer32,r=(n>>2)+1;this._dataLength+=n;let a=this._dataLength*8;if(e[n]=128,e[n+1]=e[n+2]=e[n+3]=0,t.set(i.buffer32Identity.subarray(r),r),n>55&&(i._md5cycle(this._state,t),t.set(i.buffer32Identity)),a<=4294967295)t[14]=a;else{let s=a.toString(16).match(/(.*?)(.{0,8})$/);if(s===null)return;let c=parseInt(s[2],16),p=parseInt(s[1],16)||0;t[14]=c,t[15]=p}return i._md5cycle(this._state,t),o?this._state:i._hex(this._state)}};La.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]);La.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);La.hexChars="0123456789abcdef";La.hexOut=[];La.onePassHasher=new La;if(La.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592")throw new Error("Md5 self test failed.");var $t=function(i){return i.NEWLY_ADDED="newlyAdded",i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.ASSIGNED="assigned",i.STATUS_CHANGED="statusChanged",i.PRIORITY_CHANGED="priorityChanged",i.ACCESS_MODE_CHANGED="accessModeChanged",i.CUSTOM_LIST_CHANGED="customListChanged",i.ACCEPTED="accepted",i.REJECTED="rejected",i.REACTION_ADDED="reactionAdded",i.REACTION_DELETED="reactionDeleted",i.SUBSCRIBED="subscribed",i.UNSUBSCRIBED="unsubscribed",i.PUBLISHED="published",i}($t||{}),ss=function(i){return i.COMMENT_ANNOTATION_ADD="comment_annotation.add",i.COMMENT_ANNOTATION_DELETE="comment_annotation.delete",i.COMMENT_ADD="comment.add",i.COMMENT_DELETE="comment.delete",i.COMMENT_UPDATE="comment.update",i.REACTION_ADD="reaction.add",i.REACTION_DELETE="reaction.delete",i.ATTACHMENT_ADD="attachment.add",i.ATTACHMENT_DELETE="attachment.delete",i}(ss||{}),$i={ADD_COMMENT_ANNOTATION:"addCommentAnnotation",PUBLISH_COMMENT_ANNOTATION:"publishCommentAnnotation",DELETE_COMMENT_ANNOTATION:"deleteCommentAnnotation",APPROVE_COMMENT_ANNOTATION:"approveCommentAnnotation",ACCEPT_COMMENT_ANNOTATION:"acceptCommentAnnotation",REJECT_COMMENT_ANNOTATION:"rejectCommentAnnotation",SUBSCRIBE_COMMENT_ANNOTATION:"subscribeCommentAnnotation",UNSUBSCRIBE_COMMENT_ANNOTATION:"unsubscribeCommentAnnotation",ASSIGN_USER:"assignUser",UPDATE_STATUS:"updateStatus",UPDATE_PRIORITY:"updatePriority",UPDATE_ACCESS:"updateAccess",RESOLVE_COMMENT:"resolveComment",ADD_COMMENT:"addComment",UPDATE_COMMENT:"updateComment",DELETE_COMMENT:"deleteComment",ADD_ATTACHMENT:"addAttachment",DELETE_ATTACHMENT:"deleteAttachment",DELETE_RECORDING:"deleteRecording",COPY_LINK:"copyLink",ADD_REACTION:"addReaction",DELETE_REACTION:"deleteReaction",TOGGLE_REACTION:"toggleReaction",COMMENT_SIDEBAR_DATA_INIT:"commentSidebarDataInit",COMMENT_SIDEBAR_DATA_UPDATE:"commentSidebarDataUpdate",AUTOCOMPLETE_SEARCH:"autocompleteSearch",COMPOSER_CLICKED:"composerClicked",LINK_CLICKED:"linkClicked"},Fl={TRANSCRIPTION_DONE:"transcriptionDone",RECORDING_DONE:"recordingDone",RECORDING_EDIT_DONE:"recordingEditDone",DELETE_RECORDING:"deleteRecording",ERROR:"error",RECORDING_SAVE_INITIATED:"recordingSaveInitiated",RECORDING_STARTED:"recordingStarted",RECORDING_PAUSED:"recordingPaused",RECORDING_RESUMED:"recordingResumed",RECORDING_CANCELLED:"recordingCancelled",RECORDING_STOPPED:"recordingStopped"},Hi={VELT_BUTTON_CLICK:"veltButtonClick",USER_UPDATE:"userUpdate",INIT_UPDATE:"initUpdate",DOCUMENT_INIT:"documentInit",ERROR:"error"},Yp={ACCESS_REQUESTED:"accessRequested",ACCESS_REQUEST_CANCELED:"accessRequestCanceled",ACCESS_ACCEPTED:"accessAccepted",ACCESS_REJECTED:"accessRejected",EDITOR_ASSIGNED:"editorAssigned",VIEWER_ASSIGNED:"viewerAssigned",EDITOR_ON_DIFFERENT_TAB_DETECTED:"editorOnDifferentTabDetected"},xj={MULTIPLE_USERS_ONLINE:"multipleUsersOnline",USER_STATE_CHANGE:"userStateChange"},Qre={SETTINGS_UPDATED:"settingsUpdated"},GS=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.RESOLVED="resolved",i}(GS||{}),Tj=function(i){return i.INVITE="invite",i.REMOVE="remove",i}(Tj||{}),HP=function(i){return i.CREATED="created",i.JOINED="joined",i}(HP||{}),Tv=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i.APPROVED="approved",i.RESOLVED="resolved",i}(Tv||{}),zP=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i}(zP||{}),GP=function(i){return i.ADDED="added",i.UPDATED="updated",i.DELETED="deleted",i}(GP||{}),Dj=function(i){return i.FIRST_VIEWED="firstViewed",i}(Dj||{}),Re=function(i){return i.AREA="area",i.ARROW="arrow",i.AUDIO_HUDDLE="audioHuddle",i.COMMENT="comment",i.MULTI_THREAD="multiThread",i.CURSOR="cursor",i.HUDDLE="huddle",i.LIVE_STATE_SYNC="liveStateSync",i.PRESENCE="presence",i.TAG="tag",i.RECORDER="recorder",i.REWRITER="rewriter",i.LIVE_SELECTION="liveSelection",i.NOTIFICATION="notification",i.REACTION="reaction",i}(Re||{}),Qu=function(i){return i.AREA="area",i.ARROW="arrow",i.AUDIO_HUDDLE="audioHuddle",i.COMMENT="comment",i.MULTI_THREAD="multiThread",i.CURSOR="cursor",i.HUDDLE="huddle",i.LIVE_STATE_SYNC="liveStateSync",i.PRESENCE="presence",i.TAG="tag",i.RECORDER="recorder",i.REWRITER="rewriter",i.LIVE_SELECTION="liveSelection",i.NOTIFICATION="notification",i.REACTION="reaction",i.AREA_COMMENT="areaComment",i.INLINE_COMMENT="inlineComment",i.COMMENT_SIDEBAR="commentSidebar",i}(Qu||{}),ir=function(i){return i.DESKTOP="Desktop",i.MOBILE="Mobile",i.TABLET="Tablet",i.MONITOR="Monitor",i.UNKNOWN="Unknown",i}(ir||{}),Dv=function(i){return i.PORTRAIT="portrait",i.LANDSCAPE="landscape",i.UNKNOWN="unknown",i}(Dv||{}),wv=function(i){return i.Portrait="(orientation: portrait)",i.Landscape="(orientation: landscape)",i}(wv||{}),ol=function(i){return i.DIFFERENT_DEVICE="differentDevice",i.ELEMENT_DELETED="elementDeleted",i}(ol||{}),Co=function(i){return i.ADMIN="Admin",i.COMMENTER="Commenter",i}(Co||{}),bi=function(i){return i.PUBLIC="public",i.RESTRICTED="restricted",i.ORGANIZATION_PRIVATE="organizationPrivate",i}(bi||{}),WP=function(i){return i.DEFAULT="default",i.DYNAMIC_ID="dynamicId",i}(WP||{}),oo=function(i){return i.PUBLIC="public",i.PRIVATE="private",i}(oo||{}),Ju=function(i){return i.MINIMAL="minimal",i.VERBOSE="verbose",i}(Ju||{}),eh=function(i){return i.DEFAULT="default",i.EXPANDED="expanded",i}(eh||{}),wj=function(i){return i.TOTAL="total",i.UNREAD="unread",i}(wj||{}),rl=function(i){return i.ONLINE="online",i.OFFLINE="offline",i.PENDING_INIT="pendingInit",i.PENDING_DATA="pendingData",i}(rl||{}),zi=function(i){return i.ALL="all",i.ORGANIZATION="organization",i.ORGANIZATION_USER_GROUP="organizationUserGroup",i.DOCUMENT="document",i.FOLDER="folder",i}(zi||{}),Ac=function(i){return i.AND="and",i.OR="or",i}(Ac||{});var zn=(()=>{let o=class o{constructor(){try{this.userAgent=navigator.userAgent,this.browserName=this.getBrowserName(),this.browserVersion=this.getBrowserVersion(),this.deviceType=this.getDeviceType(),this.orientation=this.getOrientation(),this.osName=this.getOSName(),this.osVersion=this.getOSVersion(),this.screenWidth=this.getScreenWidth(),this.screenHeight=this.getScreenHeight()}catch{}}getBrowserName(){try{return(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))!=-1?"Opera":navigator.userAgent.indexOf("Chrome")!=-1?"Chrome":navigator.userAgent.indexOf("Safari")!=-1?"Safari":navigator.userAgent.indexOf("Firefox")!=-1?"Firefox":navigator.userAgent.indexOf("MSIE")!=-1||document?.documentMode?"IE":"Unknown"}catch{return"Unknown"}}getDeviceType(){try{return o.Breakpoints[Li.Handset]?ir.MOBILE:o.Breakpoints[Li.Tablet]?ir.TABLET:o.Breakpoints[Li.XLarge]?ir.MONITOR:o.Breakpoints[Li.Web]?ir.DESKTOP:ir.UNKNOWN}catch{return ir.UNKNOWN}}getOrientation(){try{return o.Orientations[wv.Portrait]?Dv.PORTRAIT:o.Orientations[wv.Landscape]?Dv.LANDSCAPE:Dv.UNKNOWN}catch{return Dv.UNKNOWN}}getOSName(){try{return navigator.userAgent.indexOf("Windows")!=-1?"Windows":navigator.userAgent.indexOf("Macintosh")!=-1?"Macintosh":navigator.userAgent.indexOf("Linux")!=-1?"Linux":"Unknown"}catch{return"Unknown"}}getOSVersion(){try{let a=navigator?.userAgent,s="Unknown";if(a.indexOf("Windows")!==-1)a.indexOf("Windows NT 5.1")!==-1?s="Windows XP":a.indexOf("Windows NT 6.0")!==-1?s="Windows Vista":a.indexOf("Windows NT 6.1")!==-1?s="Windows 7":a.indexOf("Windows NT 6.2")!==-1?s="Windows 8":a.indexOf("Windows NT 6.3")!==-1?s="Windows 8.1":a.indexOf("Windows NT 10.0")!==-1&&(s="Windows 10");else if(a.indexOf("Mac OS X")!==-1)s=a.match(/Mac OS X ([0-9_.]+)/)[1],s=s.replace(/_/g,".");else if(a.indexOf("iOS")!==-1)s=a.match(/OS ([0-9_.]+) like Mac OS X/)[1],s=s.replace(/_/g,".");else if(a.indexOf("Firefox")!==-1){var e=/\(([^)]+)\)/,t=e.exec(a)[1],r=t.split("; ");s=r[2]}return s||"Unknown"}catch{return"Unknown"}}getBrowserVersion(){try{return this.browserName=="Opera"?this.getOperaVersion():this.browserName=="Chrome"?this.getChromeVersion():this.browserName=="Safari"?this.getSafariVersion():this.browserName=="Firefox"?this.getFirefoxVersion():this.browserName=="IE"?this.getIEVersion():"Unknown"}catch{return"Unknown"}}getOperaVersion(){try{var e=navigator.userAgent.match(/(?:Opera|OPR)\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getChromeVersion(){try{var e=navigator.userAgent.match(/(?:Chrome|Chromium)\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getSafariVersion(){try{var e=navigator.userAgent.match(/Version\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getFirefoxVersion(){try{var e=navigator.userAgent.match(/Firefox\/(\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getIEVersion(){try{var e=navigator.userAgent.match(/MSIE (\d+)/);return e?e[1]:"Unknown"}catch{return"Unknown"}}getScreenWidth(){try{return window.screen.width}catch{return 0}}getScreenHeight(){try{return window.screen.height}catch{return 0}}getDeviceInfo(){try{return this.userAgent=navigator.userAgent,this.browserName=this.getBrowserName(),this.browserVersion=this.getBrowserVersion(),this.deviceType=this.getDeviceType(),this.orientation=this.getOrientation(),this.osName=this.getOSName(),this.osVersion=this.getOSVersion(),this.screenWidth=this.getScreenWidth(),this.screenHeight=this.getScreenHeight(),JSON.parse(JSON.stringify(this))}catch{return{browserName:"Unknown",browserVersion:"Unknown",deviceType:"Unknown",osName:"Unknown",osVersion:"Unknown",screenWidth:0,screenHeight:0,userAgent:"Unknown"}}}};o.Breakpoints={},o.Orientations={};let i=o;return i})();var ro=class{constructor(){this.deviceInfo=new zn().getDeviceInfo()}};var Ba=class Ba{static showLogs(){try{return oi.debugMode||!!sessionStorage.getItem("debugMode")||!!sessionStorage.getItem("forceDebugMode")}catch(o){return Ba.catch("Error in showLogs: ",o),!1}}};Ba.log=Ba.showLogs()?console.log:()=>{},Ba.warn=Ba.showLogs()?console.warn:()=>{},Ba.error=Ba.showLogs()?console.error:()=>{},Ba.debug=Ba.showLogs()?console.debug:()=>{},Ba.info=Ba.showLogs()?console.info:()=>{},Ba.logsEnabled=!0,Ba.catch=(o,n)=>{try{Ba.logsEnabled&&(n!==void 0?console.warn("Velt: ",o,n):console.warn("Velt: ",o))}catch{}};var at=Ba;var ut=class ut{};ut.SNIPPYLY_HOST_URL_PROD="https://snippyly.com",ut.SNIPPYLY_HOST_URL_STAGING="https://snippyly-staging.web.app",ut.USER_TYPE_ANONYMOUS="anonymous",ut.USER_TYPE_SIGNED_IN="signedIn",ut.LOCALSTORAGE_DATA_ID="snippylytempdata",ut.NO_ORGANIZATION_ID="veltNoOrganization",ut.DEFAULT_QUERY_HASH="default",ut.LISTENER_BATCH_SIZE=5,ut.FIREBASE_PARTIAL_PATH_ORGANIZATIONS="organizations",ut.FIREBASE_PARTIAL_PATH_FOLDERS="folders",ut.FIREBASE_PARTIAL_PATH_DOCS="docs",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_CONFIGURATIONS="documentConfigurations",ut.FIREBASE_PARTIAL_PATH_PRESENCE="presence",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_USERS="orgIamUsers",ut.FIREBASE_PARTIAL_PATH_CENTRAL_USERS="users",ut.FIREBASE_PARTIAL_PATH_FOLDER_USERS="folderIamUsers",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_USERS="docIamUsers",ut.FIREBASE_PARTIAL_PATH_CURSOR="cursor",ut.FIREBASE_PARTIAL_PATH_ARROW="arrow",ut.FIREBASE_PARTIAL_PATH_AREA="area",ut.FIREBASE_PARTIAL_PATH_COMMENT="comment",ut.FIREBASE_PARTIAL_PATH_LOCATION="location",ut.FIREBASE_PARTIAL_PATH_MULTI_THREAD="multiThread",ut.FIREBASE_PARTIAL_PATH_TAG="tag",ut.FIREBASE_PARTIAL_PATH_SELECTION="selection",ut.FIREBASE_PARTIAL_PATH_AUDIO_HUDDLE="audioHuddle",ut.FIREBASE_PARTIAL_PATH_HUDDLE="huddle",ut.FIREBASE_PARTIAL_PATH_CONTACTS="contacts",ut.FIREBASE_PARTIAL_PATH_GROUPS="groups",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_DOCS="notificationsDocs",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_USERS="notificationsUsers",ut.FIREBASE_PARTIAL_PATH_DOC_NOTIFICATION="notificationsDocs__notification",ut.FIREBASE_PARTIAL_PATH_USER_NOTIFICATION="notificationsUsers__notification",ut.FIREBASE_PARTIAL_PATH_GLOBAL="global",ut.FIREBASE_PARTIAL_PATH_LOGINS="logins",ut.FIREBASE_PARTIAL_PATH_METADATA="metadata",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_METADATA="metadata",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_GROUPS="groups",ut.FIREBASE_PARTIAL_PATH_LOCATIONS="locations",ut.FIREBASE_PARTIAL_PATH_RECORDER="recorder",ut.FIREBASE_PARTIAL_PATH_FOLLOW_ALONG="flock",ut.FIREBASE_PARTIAL_PATH_SYNC_VIDEO_PLAYER="syncVideoPlayer",ut.FIREBASE_PARTIAL_PATH_LIVE_STATE="liveState",ut.FIREBASE_PARTIAL_PATH_IAM="iam",ut.FIREBASE_PARTIAL_PATH_REACTION="reaction",ut.FIREBASE_PARTIAL_PATH_CRDT="crdt",ut.FIREBASE_PARTIAL_PATH_VIEWS="views",ut.FIREBASE_PARTIAL_PATH_NOTIFICATION_VIEWS="notificationViews",ut.FIREBASE_PARTIAL_PATH_DOCUMENT_VIEWS="documentViews",ut.FIREBASE_PARTIAL_PATH_LOCATION_VIEWS="locationViews",ut.FIREBASE_PARTIAL_PATH_NOTIFICATIONS="notifications",ut.FIREBASE_PARTIAL_PATH_ORGANIZATION_NOTIFICATIONS="notifications",ut.FIREBASE_PARTIAL_PATH_LAST_NOTIFICATION_TIMESTAMP="lastNotificationTimestamp",ut.FIREBASE_PARTIAL_PATH_HEARTBEAT="heartbeat",ut.FIREBASE_PARTIAL_PATH_HEARTBEAT_BY_DOCUMENT="heartbeatByDocument",ut.FIREBASE_PARTIAL_PATH_USERS="users",ut.FIREBASE_PARTIAL_PATH_PERMISSIONS_USERS="permissions",ut.FIREBASE_PARTIAL_PATH_USER_REQUESTS="userRequests",ut.FIREBASE_PARTIAL_PATH_FEEDBACK="feedback",ut.FIREBASE_PARTIAL_PATH_BUGS="bugs",ut.FIREBASE_PARTIAL_PATH_CONTACT_US="contactUs",ut.FIREBASE_PARTIAL_PATH_CUSTOMER_METADATA="metadata",ut.PRESENCE_STATUS_ONLINE="online",ut.PRESENCE_STATUS_OFFLINE="offline",ut.PRESENCE_STATUS_AWAY="away",ut.IMG_URL_NOT_FOUND="https://snippyly.com/assets/icons/anon-user.svg",ut.IMG_CLASS_NOT_FOUND="presence-avatar-image-small",ut.AVATAR_COLOR_LIST=["#a259fe","#9746ff","#19bcfe","#FE8947","#2c83fc","#0dcf82","#ffcb00","#ff7162","#FFD600","#A5A7FE","#67DBF4","#FDA192"],ut.TEXT_COLOR_MAP={"#a259fe":"#ffffff","#9746ff":"#ffffff","#19bcfe":"#ffffff","#FE8947":"#ffffff","#2c83fc":"#ffffff","#0dcf82":"#141416","#ffcb00":"#141416","#ff7162":"#ffffff","#FFD600":"#141416","#A5A7FE":"#141416","#67DBF4":"#141416","#FDA192":"#141416"},ut.UNREAD_COMMENTS_CHECK_FROM_DATE="2024-02-05",ut.DEFAULT_ANNOTATION_COLOR="#a259fe",ut.REGEX_EMAIL=/(\+|@)+([a-zA-Z0-9._+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi,ut.REGEX_URL=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)(?::[0-9]+)?((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_0-9]*)#?(?:[\.\!\/\\\w0-9=]*))?)/gi,ut.REGEX_URL_FOR_USER_NAME=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi,ut.REGEX_SPECIAL_CHARS=/[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/,ut.SNIPPYLY_HIGHLIGHT="snippyly-highlight",ut.SNIPPYLY_HIGHLIGHT_PREVIEW="snippyly-highlight-preview",ut.SNIPPYLY_HIGHLIGHT_USER="snippyly-highlight-user",ut.SNIPPYLY_HIGHLIGHT_USER_NAME="snippyly-highlight-user-name",ut.SNIPPYLY_HIGHLIGHT_USER_TEXT="snippyly-highlight-user-text",ut.VELT_LIVE_SELECTION_ON_ELEMENT="velt-live-selection-on-element",ut.VELT_LIVE_SELECTION_ON_ELEMENT_DEFAULT="velt-live-selection-on-element-default",ut.VELT_LIVE_SELECTION_ON_TEXT="velt-live-selection-on-text",ut.VELT_LIVE_SELECTION_ON_TEXT_DEFAULT="velt-live-selection-on-text-default",ut.VELT_IGNORE_CHANGE_DETECTION="velt-ignore-change-detection",ut.VELT_CUSTOM_CSS="velt-custom-css",ut.TAGS={SNIPPYLY_ROOT:"snippyly-root",SNIPPYLY_PRESENCE:"snippyly-presence",SNIPPYLY_CURSOR:"snippyly-cursor",SNIPPYLY_COMMENT_TOOL:"snippyly-comment-tool",SNIPPYLY_COMMENTS:"snippyly-comments",SNIPPYLY_TAG_TOOL:"snippyly-tag-tool",SNIPPYLY_TAGS:"snippyly-tags",SNIPPYLY_RECORDER_NOTES:"snippyly-recorder-notes",SNIPPYLY_RECORDER_CONTROL_PANEL:"snippyly-recorder-control-panel",SNIPPYLY_RECORDER_CONTROL_PANEL_INTERNAL:"snippyly-recorder-control-panel-internal",SNIPPYLY_RECORDER_PLAYER:"snippyly-recorder-player",SNIPPYLY_TEXT_HIGHLIGHT:"snippyly-text-highlight",SNIPPYLY_COMMENT_TEXT_PORTAL:"snippyly-comment-text-portal",SNIPPYLY_COMMENT_TEXT:"snippyly-comment-text",SNIPPYLY_COMMENTS_SIDEBAR:"snippyly-comments-sidebar",SNIPPYLY_COMMENT_BUBBLE:"snippyly-comment-bubble",SNIPPYLY_HIGHLIGHT_USER_TEXT:"snippyly-highlight-user-text",SNIPPYLY_AUDIO_HUDDLE:"snippyly-audio-huddle",SNIPPYLY_VIDEO_HUDDLE:"snippyly-video-huddle",SNIPPYLY_HUDDLE:"snippyly-huddle",SNIPPYLY_HUDDLE_TOOL:"snippyly-huddle-tool",SNIPPYLY_RECORDER_TOOL:"snippyly-recorder-tool",SNIPPYLY_PLUGIN:"snippyly-plugin",SNIPPYLY_MENU:"snippyly-menu",SNIPPYLY_COMMENT_DIALOG:"snippyly-comment-dialog",SNIPPYLY_SIDEBAR_BUTTON:"snippyly-sidebar-button",SNIPPYLY_REWRITER:"snippyly-rewriter",SNIPPYLY_USER_INVITE_TOOL:"snippyly-user-invite-tool",SNIPPYLY_USER_REQUEST_TOOL:"snippyly-user-request-tool",SNIPPYLY_USER_AVATAR:"snippyly-user-avatar",SNIPPYLY_ARROW_TOOL:"snippyly-arrow-tool",SNIPPYLY_ARROWS:"snippyly-arrows",SNIPPYLY_AREA_TOOL:"snippyly-area-tool",SNIPPYLY_AREAS:"snippyly-areas",VELT_ROOT:"velt-root",VELT_PRESENCE:"velt-presence",VELT_CURSOR:"velt-cursor",VELT_COMMENT_TOOL:"velt-comment-tool",VELT_COMMENTS:"velt-comments",VELT_TAG_TOOL:"velt-tag-tool",VELT_TAGS:"velt-tags",VELT_RECORDER_NOTES:"velt-recorder-notes",VELT_RECORDER_CONTROL_PANEL:"velt-recorder-control-panel",VELT_RECORDER_CONTROL_PANEL_INTERNAL:"velt-recorder-control-panel-internal",VELT_RECORDER_PLAYER:"velt-recorder-player",VELT_VIDEO_EDITOR:"velt-video-editor",VELT_TEXT_HIGHLIGHT:"velt-text-highlight",VELT_COMMENT_TEXT_PORTAL:"velt-comment-text-portal",VELT_COMMENTS_SIDEBAR:"velt-comments-sidebar",VELT_COMMENT_BUBBLE:"velt-comment-bubble",VELT_COMMENT_THREAD:"velt-comment-thread",VELT_COMMENT_PIN:"velt-comment-pin",VELT_COMMENT_TEXT:"velt-comment-text",VELT_CHART_COMMENT:"velt-chart-comment",VELT_CANVAS_COMMENT:"velt-canvas-comment",VELT_INLINE_COMMENTS_SECTION:"velt-inline-comments-section",VELT_COMMENTS_MINIMAP:"velt-comments-minimap",VELT_HIGHLIGHT_USER_TEXT:"velt-highlight-user-text",VELT_AUDIO_HUDDLE:"velt-audio-huddle",VELT_VIDEO_HUDDLE:"velt-video-huddle",VELT_HUDDLE:"velt-huddle",VELT_HUDDLE_TOOL:"velt-huddle-tool",VELT_RECORDER_TOOL:"velt-recorder-tool",SUPERFLOW_TOOLBAR:"superflow-toolbar",VELT_MENU:"velt-menu",VELT_COMMENT_DIALOG:"velt-comment-dialog",VELT_SIDEBAR_BUTTON:"velt-sidebar-button",VELT_COMMENTS_SIDEBAR_BUTTON:"velt-comments-sidebar-button",VELT_REWRITER:"velt-rewriter",VELT_USER_INVITE_TOOL:"velt-user-invite-tool",VELT_USER_REQUEST_TOOL:"velt-user-request-tool",VELT_USER_AVATAR:"velt-user-avatar",VELT_ARROW_TOOL:"velt-arrow-tool",VELT_ARROWS:"velt-arrows",VELT_AREA_TOOL:"velt-area-tool",VELT_AREAS:"velt-areas",VELT_INLINE_COMMENT:"velt-inline-comment",VELT_VIDEO_PLAYER:"velt-video-player",VELT_VIDEO_COMMENTS_TIMELINE:"velt-comment-player-timeline",VELT_REACTION_TOOL:"velt-reaction-tool",VELT_INLINE_REACTIONS_SECTION:"velt-inline-reactions-section",VELT_VIEW_ANALYTICS:"velt-view-analytics",VELT_NOTIFICATIONS_TOOL:"velt-notifications-tool",VELT_NOTIFICATIONS_PANEL:"velt-notifications-panel",VELT_NOTIFICATIONS_HISTORY_PANEL:"velt-notifications-history-panel",VELT_WIREFRAME:"velt-wireframe",VELT_AUTOCOMPLETE:"velt-autocomplete",VELT_AUTOCOMPLETE_CHIP:"velt-autocomplete-chip",VELT_COMMENT_DIALOG_HEADER:"velt-comment-dialog-header",VELT_COMMENT_DIALOG_BODY:"velt-comment-dialog-body",VELT_COMMENT_DIALOG_FOOTER:"velt-comment-dialog-footer",VELT_COMMENT_DIALOG_PRIORITY:"velt-comment-dialog-priority",VELT_COMMENT_DIALOG_STATUS:"velt-comment-dialog-status",VELT_COMMENT_DIALOG_COPY_LINK:"velt-comment-dialog-copy-link",VELT_COMMENT_DIALOG_RESOLVE_BUTTON:"velt-comment-dialog-resolve-button",VELT_COMMENT_DIALOG_OPTIONS:"velt-comment-dialog-options",VELT_COMMENT_DIALOG_BODY_THREAD_CARD:"velt-comment-dialog-thread-card",VELT_COMMENT_DIALOG_PRIVATE_BANNER:"velt-comment-dialog-private-banner",VELT_COMMENT_COMPOSER:"velt-comment-composer",VELT_SKELETON_LOADER:"velt-skeleton-loader",VELT_SHADOW_DOM_INTERNAL:"velt-shadow-dom-internal",VELT_SINGLE_EDITOR_MODE_PANEL:"velt-single-editor-mode-panel"},ut.ATTRIBUTES={VELT_COMMENT_CONTAINER:"data-velt-comment-container",VELT_TARGET_COMMENT_ELEMENT_ID:"data-velt-target-comment-element-id",VELT_COMMENT_TYPE:"data-velt-comment-type",TARGET_INLINE_COMMENT_ELEMENT_ID:"target-inline-comment-element-id",TARGET_COMMENT_ELEMENT_ID:"target-comment-element-id",TARGET_ELEMENT_ID:"target-element-id",VELT_ID:"data-velt-id",VELT_ELEMENT:"data-velt-element",VELT_SCREEN_RECORDER_PANEL:"data-velt-screen-recorder-panel",VELT_SOURCE_ID:"data-velt-source-id",VELT_ANNOTATION_ID:"data-velt-annotation-id",VELT_ANNOTATION_IDS:"data-velt-annotation-ids",VELT_COMMENT_PIN_HOST:"data-velt-comment-pin-host",VELT_COMMENT_PIN_HOST_STATIC:"data-velt-comment-pin-host-static",VELT_COMMENT_DISABLED:"data-velt-comment-disabled",VELT_MANUAL_COMMENT_CONTAINER:"data-velt-manual-comment-container",VELT_COMMENT_PIN_ACTIVE:"data-velt-comment-pin-active",VELT_INLINE_COMMENT_SECTION_CONFIG:"data-velt-inline-comment-section-config",VELT_TARGET_INLINE_COMMENT_ELEMENT_ID:"data-velt-target-inline-comment-element-id",VELT_TAG_PIN_HOST:"data-velt-tag-pin-host",VELT_TAG_PIN_HOST_STATIC:"data-velt-tag-pin-host-static",VELT_TAG_DISABLED:"data-velt-tag-disabled",VELT_RECORDER_PIN_HOST:"data-velt-recorder-pin-host",VELT_RECORDER_PIN_HOST_STATIC:"data-velt-recorder-pin-host-static",VELT_RECORDER_DISABLED:"data-velt-recorder-disabled",VELT_ANNOTATION_DRAFT:"data-velt-annotation-draft",VELT_ANNOTATION_EDIT_COMMENT:"data-velt-annotation-edit-comment",VELT_DOCUMENT_ID:"data-velt-document-id",VELT_LOCATION:"data-velt-location",VELT_LOCATION_ID:"data-velt-location-id",VELT_THEME:"data-velt-theme",VELT_IGNORE:"data-velt-ignore",EMBED_MODE:"embed-mode",DEFAULT_CURSOR:"default-cursor",VELT_HUDDLE_ON_CURSOR_MODE:"data-velt-huddle-on-cursor-mode",VELT_SELECTION_ENABLED:"data-live-selection-enabled",VELT_LIVE_SELECTION_ENABLED:"data-velt-live-selection-enabled",VELT_LIVE_SELECTION_USER_INDICATOR_POSITION:"data-velt-live-selection-user-indicator-position",VELT_LIVE_SELECTION_USER_INDICATOR_TYPE:"data-velt-live-selection-user-indicator-type",VELT_SELECTION_CONFIG:"data-live-selection-config",VELT_POPOVER_MODE:"data-velt-popover-mode",VELT_ELEMENT_CACHE_ID:"data-velt-cache-id",VELT_ARROW_PIN_HOST:"data-velt-arrow-pin-host",VELT_ARROW_PIN_HOST_STATIC:"data-velt-arrow-pin-host-static",VELT_ARROW_DISABLED:"data-velt-arrow-disabled",VELT_AREA_PIN_HOST:"data-velt-area-pin-host",VELT_AREA_PIN_HOST_STATIC:"data-velt-area-pin-host-static",VELT_AREA_DISABLED:"data-velt-area-disabled",VELT_AREA_PIN_ACTIVE:"data-velt-area-pin-active",VELT_ONGOING_RECORDING:"data-velt-ongoing-recording",VELT_COMMENT_RECORDING:"data-velt-comment-recording",SYNC_VIDEO_PLAYER_ID:"data-sync-video-player-id",SYNC_VIDEO_PLAYER:"data-sync-video-player",VELT_INLINE_COMMENT_ID:"inline-comment-id",VELT_PDF_VIEWER:"data-velt-pdf-viewer",VELT_SYNC_STATE:"data-velt-sync-state",VELT_SYNC_ACCESS:"data-velt-sync-access",VELT_SYNC_ACCESS_AUTO:"data-velt-sync-access-auto",VELT_SYNC_ACCESS_DISABLED:"data-velt-sync-access-disabled",VELT_SINGLE_EDITOR_MODE_CONTAINER:"data-velt-single-editor-mode-container",VELT_IFRAME_CONTAINER:"data-velt-iframe-container",VELT_IFRAME_CONTAINER_STATIC:"data-velt-iframe-container-static",VELT_IS_FIRST_COMPONENT:"data-velt-is-first-component",VELT_DOWNLOAD_BUTTON:"velt-download-button",VELT_COMMENT_DIALOG_PORTAL_INTERNAL:"velt-comment-dialog-portal-internal",ANNOTATION_ID:"annotation-id",MULTI_THREAD_ANNOTATION_ID:"multi-thread-annotation-id",SLATE_EDITOR:"data-slate-editor"},ut.INJECTION_STYLE_PROPS={VELT_AVATAR_COLOR:"data-velt-avatar-color",VELT_COMMENT_PRIORITY_COLOR:"data-velt-priority-color"},ut.INJECTION_ATTRIBUTES={VELT_AVATAR_IMG:"data-velt-avatar-img",VELT_COMMENT_LENGTH:"data-velt-comment-thread-length"},ut.SESSION_STORAGE={SNIPPYLY_AUTO_SELECT_ANNOTATION_ID:"snippylyAutoSelectAnnotationId",SNIPPYLY_SELECTED_ANNOTATION_ID:"snippylySelectedAnnotationId",SNIPPYLY_COMMENT_SIDEBAR_FILTERS:"snippylyCommentSidebarFilters",SNIPPYLY_COMMENT_SIDEBAR_GROUP_BY:"snippylyCommentSidebarGroupBy",SNIPPYLY_COMMENT_DIALOG_AUTO_POPULATE_TEXT:"snippylyCommentDialogAutoPopulateText",SNIPPYLY_HUDDLE_DATA:"snippylyHuddleData",VELT_TAB_ID:"veltTabId",VELT_COMMENT_SIDEBAR_FILTERS_RESET:"veltCommentSidebarFiltersReset",VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE:"veltCommentSidebarCustomActionsState",VELT_CURSOR_MULTIPLE_USERS_DETECTED:"veltCursorMultipleUsersDetected",VELT_PRESENCE_MULTIPLE_USERS_DETECTED:"veltPresenceMultipleUsersDetected",VELT_CUSTOM_PRIORITY_MAP:"veltCustomPriorityMap",VELT_CUSTOM_STATUS_MAP:"veltCustomStatusMap",VELT_CUSTOM_CATEGORY_MAP:"veltCustomCategoryMap"},ut.LOCAL_STORAGE={SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS:"snippylyDefaultMediaSourceOptions",SNIPPYLY_QUEUED_COMMENT:"snippylyQueuedComment",VELT_USER:"_vu",VELT_USER_FORCE_RE_LOGGED_IN:"_vurli",VELT_VERSION:"_vv",VELT_ADVANCED_QUERIES:"_vadq",VELT_COMMENT_VIEWS_MIGRATED:"_vcvm"},ut.NON_NESTABLE_ELEMENTS={img:!0,video:!0,audio:!0,input:!0,meter:!0,progress:!0,select:!0,textarea:!0,svg:!0,"lottie-player":!0,"ng-lottie":!0,canvas:!0,hr:!0},ut.INGNORE_MUTATION_OBSERVER_CHANGE_TAGS={svg:!0},ut.SELECTION_ENABLED_ELEMENTS={input:!0,textarea:!0,select:!0,button:!0},ut.URL_PARAMS={REVIEW_MODE:"review",REVIEW_DOC_ID:"sreviewId",SNIPPYLY_USER:"snippyly-user",COMMENT_ID:"scommentId",TAG_ID:"stagId",RECORDER_ID:"srecorderId",PROJECT_INSTALL:"sprojectInstall"},ut.VELT_BASE_REM_UNIT="--velt-base-rem-unit",ut.VELT_VIEWPORT_WIDTH="--legacy-velt-viewport-width",ut.VELT_VIEWPORT_HEIGHT="--legacy-velt-viewport-height",ut.VELT_SELECTION_COLOR="--velt-selection-color",ut.VELT_MIN_ARROW_LENGTH=100,ut.VELT_ARROW_VIEWPORT_PADDING=20,ut.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME=5,ut.CURSOR={COMMENT_PIN:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0iIzYyNURGNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9InBhdGgtMS1pbnNpZGUtMV8yMDMyXzIzNjgxIiBmaWxsPSJ3aGl0ZSI+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiLz4KPC9tYXNrPgo8cGF0aCBkPSJNMC4zNTI5NDEgMThDMC4xNTgwMTcgMTggLTYuOTA3MTVlLTA5IDE3Ljg0MiAtMS41NDI3NWUtMDggMTcuNjQ3MUwtMy45MzQwMmUtMDcgOUMtNi4xMDY3M2UtMDcgNC4wMjk0NCA0LjAyOTQ0IC0xLjc2MTMyZS0wNyA5IC0zLjkzNDAyZS0wN1YtMy45MzQwMmUtMDdDMTMuOTcwNiAtNi4xMDY3M2UtMDcgMTggNC4wMjk0NCAxOCA5VjlDMTggMTMuOTcwNiAxMy45NzA2IDE4IDkgMThMMC4zNTI5NDEgMThaIiBmaWxsPSIjMTQxNDE2Ii8+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgbWFzaz0idXJsKCNwYXRoLTEtaW5zaWRlLTFfMjAzMl8yMzY4MSkiLz4KPC9zdmc+Cg==') 0 31, auto",TAG_PIN:"url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczpieD0iaHR0cHM6Ly9ib3h5LXN2Zy5jb20iPgogIDxlbGxpcHNlIHN0eWxlPSJzdHJva2U6IHJnYigwLCAwLCAwKTsgZmlsbDogcmdiKDE2MiwgODksIDI1NCk7IHBhaW50LW9yZGVyOiBmaWxsOyBzdHJva2Utd2lkdGg6IDBweDsiIGN4PSIxNiIgY3k9IjE2IiByeD0iMTYiIHJ5PSIxNiIvPgogIDxwYXRoIGQ9Ik0gOS4zMzMgMjIgQyA5LjMzMyAyMiA4IDIyIDggMjAuNjY3IEMgOCAxOS4zMzMgOS4zMzMgMTUuMzMzIDE2IDE1LjMzMyBDIDIyLjY2NyAxNS4zMzMgMjQgMTkuMzMzIDI0IDIwLjY2NyBDIDI0IDIyIDIyLjY2NyAyMiAyMi42NjcgMjIgTCA5LjMzMyAyMiBaIE0gMTYgMTQgQyAxOS4wNzkgMTQgMjEuMDA0IDEwLjY2NyAxOS40NjQgOCBDIDE4Ljc1IDYuNzYyIDE3LjQyOSA2IDE2IDYgQyAxMi45MjEgNiAxMC45OTYgOS4zMzMgMTIuNTM2IDEyIEMgMTMuMjUgMTMuMjM3IDE0LjU3MSAxNCAxNiAxNCBaIiBzdHlsZT0iZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyIgYng6b3JpZ2luPSIwLjUgMC41Ii8+Cjwvc3ZnPg==') 16 16, auto",ARROW_PIN:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNiAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy44MDU0IDEwLjAyMDdDMTQuNTQxMiA5Ljk5MTMxIDE1LjExMzggOS4zNzA5OCAxNS4wODQzIDguNjM1MThMMTQuODMwNiAyLjI4OTM5QzE0LjgwMjggMS41OTQ4NiAxNC4yNDYxIDEuMDM4MTkgMTMuNTUxNiAxLjAxMDQxTDcuMjA1NzEgMC43NTY1MzdDNi40Njk5MiAwLjcyNzEwMiA1Ljg0OTU4IDEuMjk5NzIgNS44MjAxNSAyLjAzNTUxQzUuNzkwNzEgMi43NzEzIDYuMzYzMzMgMy4zOTE2NCA3LjA5OTEyIDMuNDIxMDdMMTAuNDAyMSAzLjU1MzIxTDEuMjQxNzcgMTIuNzEzNkMwLjcyMTA2NyAxMy4yMzQzIDAuNzIxMDY3IDE0LjA3ODUgMS4yNDE3NyAxNC41OTkyQzEuNzYyNDYgMTUuMTE5OSAyLjYwNjY4IDE1LjExOTkgMy4xMjczOCAxNC41OTkyTDEyLjI4NzcgNS40Mzg4NkwxMi40MTk4IDguNzQxNzVDMTIuNDQ5MiA5LjQ3NzU0IDEzLjA2OTYgMTAuMDUwMiAxMy44MDU0IDEwLjAyMDdaIiBmaWxsPSIjOEY5NUIyIi8+Cjwvc3ZnPgo=) 15 0, auto",AREA_PIN:"url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNiAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy44MDU0IDEwLjAyMDdDMTQuNTQxMiA5Ljk5MTMxIDE1LjExMzggOS4zNzA5OCAxNS4wODQzIDguNjM1MThMMTQuODMwNiAyLjI4OTM5QzE0LjgwMjggMS41OTQ4NiAxNC4yNDYxIDEuMDM4MTkgMTMuNTUxNiAxLjAxMDQxTDcuMjA1NzEgMC43NTY1MzdDNi40Njk5MiAwLjcyNzEwMiA1Ljg0OTU4IDEuMjk5NzIgNS44MjAxNSAyLjAzNTUxQzUuNzkwNzEgMi43NzEzIDYuMzYzMzMgMy4zOTE2NCA3LjA5OTEyIDMuNDIxMDdMMTAuNDAyMSAzLjU1MzIxTDEuMjQxNzcgMTIuNzEzNkMwLjcyMTA2NyAxMy4yMzQzIDAuNzIxMDY3IDE0LjA3ODUgMS4yNDE3NyAxNC41OTkyQzEuNzYyNDYgMTUuMTE5OSAyLjYwNjY4IDE1LjExOTkgMy4xMjczOCAxNC41OTkyTDEyLjI4NzcgNS40Mzg4NkwxMi40MTk4IDguNzQxNzVDMTIuNDQ5MiA5LjQ3NzU0IDEzLjA2OTYgMTAuMDUwMiAxMy44MDU0IDEwLjAyMDdaIiBmaWxsPSIjOEY5NUIyIi8+Cjwvc3ZnPgo=) 16 0, auto"},ut.VIDEO_POSTER_DEFAULT_IMAGE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAADIAQMAAABoEU4WAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAGUExURQAAAAEAAKSl0/gAAAAxSURBVFjD7dBBDQAgCABARjKjGZUofi0Ac+4uwkUAAAAAAMCIpYD/bQVNSsEtFfCaA8vLAaMbkVUtAAAAAElFTkSuQmCC",ut.HUDDLE_TYPE_CONFIGS={audio:{audio:!0,video:!1,presentation:!1},video:{audio:!0,video:!0,presentation:!1},presentation:{audio:!1,video:!1,presentation:!0}},ut.RecorderModes={VIDEO:"video",AUDIO:"audio",SCREEN:"screen",ALL:"all"},ut.CommentAnnotationStatusMap={OPEN:{id:"OPEN",name:"Open",color:"var(--velt-accent, #625DF5)",lightColor:"var(--velt-accent-light, #E7E8FA)",type:"default",svg:`
71
71
  <svg
72
72
  width="16"
73
73
  height="16"
@@ -484,7 +484,7 @@ This typically indicates that your device does not have a healthy Internet conne
484
484
  if (intervalId) clearInterval(intervalId);
485
485
  }
486
486
  });
487
- `;if(typeof Worker<"u"){let r=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(r))}return}catch(t){this.loggingService.catch("Error in HeartbeatService setupWebWorker: ",t);return}}setupHeartbeat(){try{if(this.loggingService.log("%c[WB] Creating CLASS: HeartbeatService","color: blue;"),this.worker=this.setupWebWorker(this.HEARTBEAT_DURATION),this.worker){this.worker.onmessage=()=>{this.authService.getUser()&&this.sendHeartbeat()};let t=this.authService.getUser$().subscribe(r=>{r?(this.worker?.postMessage("start"),this.sendHeartbeat()):this.worker?.postMessage("stop")});this.subscriptions.push(t)}else{let t=this.authService.getUser$().pipe(he(r=>r?vm(5e3).pipe(Qi(0)):hm)).subscribe(()=>this.sendHeartbeat());this.subscriptions.push(t)}this.docService.getDocumentPaths$().pipe(Le(t=>!!t),on(()=>this.sendHeartbeat())).subscribe();let e=fn([this.databaseService.getDb().pipe(Le(t=>!!t)),this.authService.getUser$(),this.docService.getDocumentPaths$()]).pipe(wi(),on(([[t,r,a],[s,c,p]])=>{if(c&&p){let g=this.domService.getTabId();if(g){let C=this.generateHeartbeatId(c.userId,g),E={id:C,organizationId:p.organizationId},D=this.commonDbUtils.getDocumentPath({feature:"heartbeat",properties:E,defaultDocumentPaths:p,apiKey:this.configService.getApiKey(),useFirestore:!1});if(D&&s&&nl(Ai(s,D)).set(null),p.documentId){let L={id:C,documentId:p.documentId,organizationId:p.organizationId},z=this.commonDbUtils.getDocumentPath({feature:"heartbeatByDocument",properties:L,defaultDocumentPaths:p,apiKey:this.configService.getApiKey(),useFirestore:!1});z&&s&&nl(Ai(s,z)).set(null)}if(a&&a.documentId&&a.documentId!==p.documentId){let L={id:C,documentId:a.documentId,organizationId:a.organizationId,skipFirestore:!0};this.commonDbService.deleteData({feature:"heartbeatByDocument",properties:L})}}}})).subscribe();this.subscriptions.push(e)}catch(e){this.loggingService.catch("Error in HeartbeatService setupHeartbeat: ",e)}}teardownHeartbeat(){try{this.worker&&(this.worker.postMessage("stop"),this.worker.terminate(),this.worker=void 0),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in HeartbeatService teardownHeartbeat: ",e)}}sendHeartbeat(){try{if(this.loggingService.log("%c[WB] Calling HeartbeatService FUNCTION: sendHeartbeat","color: green;"),sessionStorage.getItem("veltSkipHeartbeat"))return;let e=this.authService.getUser(),t=this.docService.getDocumentPaths(),r=this.domService.getTabId();if(e&&t&&r){let a=new _k,s=Date.now();a.createdTimestamp=s,a.lastUpdatedTimestamp=s,a.userId=e.userId,a.veltUserId=_t(e.userId),a.tabId=r,a.id=this.generateHeartbeatId(e.userId,r),a.metadata=this.docService.getBaseMetadata();let p=a.metadata.documentId;this.commonDbService.updateData({feature:"heartbeat",properties:{id:a.id,skipFirestore:!0,rtdbTransaction:!0,rtdbTransactionCallback:(g,C)=>(g?.createdTimestamp&&(C.createdTimestamp=g.createdTimestamp),C)},data:a}),p&&this.commonDbService.updateData({feature:"heartbeatByDocument",properties:{id:a.id,skipFirestore:!0,rtdbTransaction:!0,documentId:p,rtdbTransactionCallback:(g,C)=>(g?.createdTimestamp&&(C.createdTimestamp=g.createdTimestamp),C)},data:a})}}catch(e){this.loggingService.catch("Error in HeartbeatService sendHeartbeat: ",e)}}generateHeartbeatId(e,t){return _t(e+"_"+t)}getHeartbeatData(e){try{let t=this.docService.getDocumentPaths(),r=e?.organizationId||t?.organizationId,a=e?.documentId,s,c={organizationId:r,skipFirestore:!0,useQuery:!0};a?(s="allHeartbeatsByDocument",c.documentId=a):s="allHeartbeats";let p=e?.orderBy??"lastUpdatedTimestamp",g=e?.lastUpdatedTimestamp?.$gte??Date.now()-15e3,C=e?.limit??50;return c.rtdbQuery=[Vm(p),Um(g),aS(C)],this.commonDbService.dbListener({feature:s,properties:c}).pipe(on(E=>{console.log("[DEBUG_VELT_SDK] HeartbeatService getHeartbeatData",E)}),Le(E=>!!E?.data),ce(E=>E?.data),ce(E=>E?Object.values(E??{}).map(D=>D):null))}catch(t){return this.loggingService.catch("Error in HeartbeatService getHeartbeatData: ",t),se(null)}}getSpecificHeartbeat(e,t){try{let r=this.generateHeartbeatId(e,t),s=this.docService.getDocumentPaths()?.organizationId;return s?this.commonDbService.dbListener({feature:"heartbeat",properties:{id:r,organizationId:s,skipFirestore:!0}}).pipe(Le(c=>!!c?.data),ce(c=>c?.data),Ct((c,p)=>c?.lastUpdatedTimestamp===p?.lastUpdatedTimestamp)):se(null)}catch(r){return this.loggingService.catch("Error in HeartbeatService getSpecificHeartbeat: ",r),se(null)}}enableHeartbeat(){try{if(this.heartbeatEnabled$.value===!0)return;this.heartbeatEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HeartbeatService enableHeartbeat: ",e)}}disableHeartbeat(){try{if(this.heartbeatEnabled$.value===!1)return;this.heartbeatEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HeartbeatService disableHeartbeat: ",e)}}getHeartbeatEnabled$(){try{return this.heartbeatEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HeartbeatService getHeartbeatEnabled$: ",e),se(!1)}}getHeartbeatEnabled(){try{return this.heartbeatEnabled$.value}catch(e){return this.loggingService.catch("Error in HeartbeatService getHeartbeatEnabled: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(Ve),J(dn),J(Cn),J(ot),J(Be),J(y),J($l),J(Gd),J(kt))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var n9=(()=>{let o=class o{constructor(e,t){this.analyticsService=e,this.loggingService=t,this.actionSubjects=new Map,this.subscriptions=[]}onAccessRequested(e){try{this.triggerAction(Yp.ACCESS_REQUESTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REQUESTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRequested: ",t)}}onAccessRequestCanceled(e){try{this.triggerAction(Yp.ACCESS_REQUEST_CANCELED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REQUEST_CANCELED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRequestCanceled: ",t)}}onAccessAccepted(e){try{this.triggerAction(Yp.ACCESS_ACCEPTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_ACCEPTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessAccepted: ",t)}}onAccessRejected(e){try{this.triggerAction(Yp.ACCESS_REJECTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REJECTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRejected: ",t)}}onEditorAssigned(e){try{this.triggerAction(Yp.EDITOR_ASSIGNED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_EDITOR_ASSIGNED,{editorUserId:e?.editor?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onEditorAssigned: ",t)}}onEditorOnDifferentTabDetected(e){try{this.triggerAction(Yp.EDITOR_ON_DIFFERENT_TAB_DETECTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_EDITOR_ON_DIFFERENT_TAB_DETECTED,{editorUserId:e?.editor?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onEditorOnDifferentTabDetected: ",t)}}onViewerAssigned(e){try{this.triggerAction(Yp.VIEWER_ASSIGNED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_VIEWER_ASSIGNED,{viewerUserId:e?.viewer?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onViewerAssigned: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in LiveStateActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in LiveStateActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(et),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var lde=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.authService=t,this.usersService=r}getRecentHeartbeats(e,t=30){try{if(!e||e.length===0)return[];let r=Date.now()-t*1e3;return e.filter(a=>a.lastUpdatedTimestamp&&a.lastUpdatedTimestamp>r)}catch(r){return this.loggingService.catch("Error in getRecentHeartbeats: ",r),[]}}getOldestHeartbeat(e,t=10){try{if(!e||e.length===0)return null;let r=Date.now()-t*1e3,a=e.filter(s=>s?.lastUpdatedTimestamp>r);return a.length===0?null:a.reduce((s,c)=>!s||c.createdTimestamp<s.createdTimestamp?c:s,a[0])}catch(r){return this.loggingService.catch("Error in getOldestHeartbeat: ",r),null}}getMostRecentHeartbeat(e){try{return!e||e.length===0?null:e.reduce((t,r)=>!t||r.lastUpdatedTimestamp>t.lastUpdatedTimestamp?r:t,e[0])}catch(t){return this.loggingService.catch("Error in getMostRecentHeartbeat: ",t),null}}hasRecentHeartbeat(e,t,r=30){try{return this.getRecentHeartbeats(e,r).some(s=>s.userId===t)}catch(a){return this.loggingService.catch("Error in hasRecentHeartbeat: ",a),!1}}hasRecentHeartbeatOnTab(e,t,r,a=30){try{return this.getRecentHeartbeats(e,a).some(c=>c.userId===t&&c.tabId===r)}catch(s){return this.loggingService.catch("Error in hasRecentHeartbeatOnTab: ",s),!1}}getHeartbeatCountByUser(e){try{let t=new Map;return!e||e.length===0||e.forEach(r=>{if(r.userId){let a=t.get(r.userId)||0;t.set(r.userId,a+1)}}),t}catch(t){return this.loggingService.catch("Error in getHeartbeatCountByUser: ",t),new Map}}isEditorActiveByHeartbeat(e,t,r,a,s=30){try{if(!e||e.length===0||!t||!r||!a)return!1;let p=this.getRecentHeartbeats(e,s).find(g=>g.userId===t&&g.tabId===r);return!!(p&&p.lastUpdatedTimestamp>a)}catch(c){return this.loggingService.catch("Error in isEditorActiveByHeartbeat: ",c),!1}}determineEditorStatusNew(e){return Q(this,null,function*(){try{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3] determineEditorStatusNew start **************"),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3.1] SD determineEditorStatusNew context",e&&typeof e=="object"?JSON.parse(JSON.stringify(e)):e);let{singleEditorModeData:r,heartbeatData:a,userPresence:s,currentUser:c,currentTabId:p}=e,g=JSON.parse(JSON.stringify(r||{})),C=()=>Q(this,null,function*(){let z=s?.userIds?.[0],W;z&&(yield this.usersService.resolveUsers({userIds:[z],forceResolve:!0}),W=this.usersService.getUserById(z)),W?(g.editor=W,g.tabId=`differentUserPresentOnTab_${p}`):(g.editor={userId:`anonymous_${c?.userId}`,name:"Anonymous"},g.tabId=`differentUserPresentOnTab_${p}`)}),E=()=>{g.editor=c,g.tabId=`sameUserPresentOnTab_${p}`},D=!1;if(r?.editor){if(a?.length){let z=a?.find(W=>W.userId===r?.editor?.userId&&W.tabId===r?.tabId);if(z&&z.lastUpdatedTimestamp>Date.now()-1e4)this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.9] Server data present, editor heartbeat recent: keep current editor","color: blue;");else{this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.10] Server data present, editor heartbeat not recent","color: red;");let W=this.getOldestHeartbeat(a,20);this.semDebuggerMode()&&console.log(`%c[DEBUG_VELT_SDK] [3.11] Server data present, computed oldest: user ${W?.userId} tab ${W?.tabId}, created ${W?.createdTimestamp}, my user ${c.userId} my tab ${p}`,"color: yellow;"),W&&W.userId===c.userId&&W.tabId===p?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.12] Server data present, not recent editor, I am oldest: set undefined","color: green;"),D=!0):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.13] Server data present, not recent editor, I am not oldest: keep current","color: red;")}}else s&&(s.differentUserPresentOnTab?(yield C(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.14] Server data present, different user present: set as viewer","color: blue;"),D=!1):s.sameUserPresentOnTab?(E(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.15] Server data present, same user on different tab: set as viewer (editor on diff tab)","color: blue;"),D=!1):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.16] Server data present, no external presence: keep as is","color: darkgrey;"));!a?.length&&!s&&this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.17] Server data present, no heartbeat, no user presence: keep as is","color: darkgrey;")}else{if(a?.length){let z=this.getOldestHeartbeat(a,20);this.semDebuggerMode()&&console.log(`%c[DEBUG_VELT_SDK] [3.2] [No server data], computed oldest: user ${z?.userId} tab ${z?.tabId}, created ${z?.createdTimestamp}, my user ${c.userId} my tab ${p}`,"color: purple;"),z&&z.userId===c.userId&&z.tabId===p?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.3] [No server data], heartbeat check: I am the oldest, setting undefined","color: green;"),D=!0):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.4] [No server data], heartbeat check: I am not the oldest","color: red;")}else s&&(s.differentUserPresentOnTab?(yield C(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.5] [No server data], different user present: set as viewer","color: blue;"),D=!1):s.sameUserPresentOnTab?(E(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.6] [No server data], same user on different tab: set as viewer (editor on diff tab)","color: blue;"),D=!1):(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.7] [No server data], no external presence: eligible for editor","color: green;"),D=!0));!a?.length&&!s&&(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.8] [No server data], no heartbeat, no user presence: default to undefined","color: darkgrey;"),D=!0)}let L;return D?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.18] Final decision: shouldSetUndefined true","color: green;"),L={shouldSetUndefined:!0}):(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.19] Final decision: return data","color: blue;"),L={data:g}),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3.20] determineEditorStatusNew returnValue",L),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3] determineEditorStatusNew end **************"),L}catch(t){return this.loggingService.catch("Error in determineEditorStatusNew: ",t),{data:void 0,shouldSetUndefined:void 0}}})}semDebuggerMode(){try{return localStorage.getItem("vSemDebuggerMode")==="true"}catch(e){return this.loggingService.catch("Error in semDebuggerMode: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(y),J(Ve),J(Mn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Vi=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z,W,ee){this.afAuth=e,this.analyticsService=t,this.authService=r,this.configService=a,this.databaseService=s,this.docService=c,this.domService=p,this.heartbeatService=g,this.iamService=C,this.loggingService=E,this.commonDbService=D,this.liveStateActionsService=L,this.liveStateUtilsService=z,this.usersService=W,this.singleEditorDecisionEngine=ee,this.db=os(),this.liveStateDataMap$=new ve({}),this.liveStateDataMapDraft={},this.singleEditorMode$=new ve(!1),this.singleEditorModeConfig$=new ve(null),this.singleEditorLiveStateData$=new ve(null),this.singleEditorLiveStateData={},this.editorAccessTimeout$=new ve(j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME),this.editorAccessTransferOnTimeOut$=new ve(!0),this.defaultSingleEditorUIEnabled$=new ve(!0),this.editorAccessTimer$=new ve(new g0),this.autoSyncState$=new ve(!1),this.serverConnectionState$=new ve(rl.PENDING_INIT),this.userPresence$=new ve(null),this.user=null,this.keydownSubscription=null,this.isEditor$=new ve(null),this.preventEventsOnElementMap={},this.PREVENT_EVENTS=["click","mouseup","mousedown"],this.autoSyncStateHistory=null,this.singleEditorModeContainerIds$=new ve([]),this.inputChangeSubscriptionMap={},this.childListMutationSubscription=null,this.tabId=this.domService.getTabId();try{this.loggingService.log("%c[WB] Creating CLASS: LiveStateService","color: blue;"),this.analyticsService.setLiveStateService(this),this.getSingleEditorMode$().subscribe(me=>{me?this.heartbeatService.enableHeartbeat():this.heartbeatService.disableHeartbeat()}),this.databaseService.getDb().pipe(Le(me=>!!me),rt(1)).subscribe(me=>{me&&(this.db=me,this.getUser(),this.getDocumentPaths(),this.subscribeLiveStateData().subscribe(),this.singleEditorMode$.subscribe(Ce=>{Ce&&this.detectKeydownOnInput()}),this.autoSyncState$.subscribe(Ce=>{Ce?(this.detectLiveSyncInputs(),this.observeElementAddedOnDom()):(this.unsubscribeInputChanges(),this.childListMutationSubscription?.unsubscribe(),this.childListMutationSubscription=null)}),this.updateOnDatabaseDisconnect().subscribe(()=>{},Ce=>{this.loggingService.catch("Error in LiveStateService constructor updateOnDatabaseDisconnect: ",Ce)}),this.updateServerStateOnDatabaseDisconnect().subscribe(()=>{},Ce=>{this.loggingService.catch("Error in LiveStateService constructor updateServerStateOnDatabaseDisconnect: ",Ce)}))},me=>{this.loggingService.catch("Error in LiveStateService getDb subscription: ",me)}),this.liveStateDataMap$.pipe(Le(me=>!!me?.default?.autoSyncState),ce(me=>me.default?.autoSyncState),Ct((me,Ce)=>JSON.stringify(me||{})===JSON.stringify(Ce||{}))).subscribe(me=>{me&&(this.getAutoSyncState()&&(!this.autoSyncStateHistory&&me?.history&&this.updateLiveStateSyncInputDataLocally(me.history),me?.current&&this.updateLiveStateSyncInputDataLocally({[me.current.liveStateDataId]:me.current})),!this.autoSyncStateHistory&&me?.history&&(this.autoSyncStateHistory=me.history))}),this.docService.addPreDocumentIdChangeFunction("live-state-service",me=>(this.updateUserPresence(null),this.isUserEditor()?.isEditor&&(!this.getSingleEditorModeConfig()?.singleTabEditor||this.isUserEditor()?.isEditorOnCurrentTab)?this.removeEditorAccess({metadata:{from:"addPreDocumentIdChangeFunction-liveStateService",reason:"Document id changed"}}):Promise.resolve())),this.singleEditorLiveStateData$.pipe(wi()).subscribe(([me,Ce])=>{try{let Ae=Ce?.requestEditorAccess?.status,Ge=me?.requestEditorAccess?.status,Ne=this.authService.getUser();if(Ae==="pending"){if(Ne?.userId===Ce?.editor?.userId){let Ie={viewer:_a(Ce?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"requested"};this.liveStateActionsService?.onAccessRequested(Ie)}return}if(Ae==="cancelled"){if(Ne?.userId===Ce?.editor?.userId){let Ie={viewer:_a(Ce?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"canceled"};this.liveStateActionsService?.onAccessRequestCanceled(Ie)}return}if(Ge==="pending"&&!Ae){if(me?.requestEditorAccess?.user?.userId===Ce?.editor?.userId){if(me?.requestEditorAccess?.user?.userId===Ne?.userId){let Ie={viewer:_a(me?.editor)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"accepted"};this.liveStateActionsService?.onAccessAccepted(Ie)}return}if(me?.requestEditorAccess?.user?.userId!==Ce?.editor?.userId){if(me?.requestEditorAccess?.user?.userId===Ne?.userId){let Ie={viewer:_a(me?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"rejected"};this.liveStateActionsService?.onAccessRejected(Ie)}return}}}catch(Ae){this.loggingService.catch("Error in LiveStateService singleEditorLiveStateData$ subscription: ",Ae)}}),this.isUserEditor$().pipe(Ct(pn)).subscribe(me=>{try{if(me){this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_USER_EDITOR_STATS,{isEditor:me?.isEditor,isEditorOnCurrentTab:me?.isEditorOnCurrentTab});let Ce=this.singleEditorLiveStateData$.value;if(me?.isEditor)if(me?.isEditorOnCurrentTab){let Ae={editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),role:"editor"};this.liveStateActionsService?.onEditorAssigned(Ae)}else{let Ae={editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),role:"editorOnDifferentTab"};this.liveStateActionsService?.onEditorOnDifferentTabDetected(Ae)}else{let Ae={viewer:_a(this.authService.getUser())??void 0,timestamp:new Date().getTime(),role:"viewer"};this.liveStateActionsService?.onViewerAssigned(Ae)}}}catch(Ce){this.loggingService.catch("Error in LiveStateService isUserEditor$ subscription: ",Ce)}})}catch(me){this.loggingService.catch("Error in LiveStateService constructor: ",me)}}observeElementAddedOnDom(){try{this.loggingService.log("%c[WB] Calling FUNCTION: observeElementAddedOnDom","color: green;"),this.childListMutationSubscription&&(this.childListMutationSubscription.unsubscribe(),this.childListMutationSubscription=null),this.childListMutationSubscription=this.domService.getChildListMutation$().subscribe(e=>{e?.length&&e.forEach(t=>{let r=Array.from(t.addedNodes||[]).filter(a=>a instanceof HTMLElement);r?.forEach(a=>{jj(a,!0)?.forEach(p=>{typeof p?.getAttribute=="function"&&p?.getAttribute(j.ATTRIBUTES.VELT_SYNC_STATE)&&this.subscribeInputChanges(p)})}),r?.length&&this.isEditor$?.value?.isEditor===!1&&(this.disableInputElements(),this.disableElementEvents())})},e=>{this.loggingService.catch("Error in LiveStateService domService getChildListMutation$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in LiveStateService observeElementAddedOnDom: ",e)}}detectKeydownOnInput(){try{this.loggingService.log("%c[WB] Calling FUNCTION: detectKeydownOnInput","color: green;"),this.unsubscribeKeydownSubscription(),this.keydownSubscription=this.domService.onWindowKeydown$().pipe(Le(e=>e?.target instanceof HTMLInputElement||e?.target instanceof HTMLTextAreaElement||e?.target instanceof HTMLSelectElement),Le(e=>!!this.isElementInsideSingleEditorModeContainerElements(e?.target)),rt(1)).subscribe(e=>{this.unsubscribeKeydownSubscription(),this.getSingleEditorModeConfig()?.customMode||this.setUserAsEditor({skipEditorCheck:!0})},e=>{this.loggingService.catch("Error in LiveStateService detectKeydownOnInput subscription: ",e)})}catch(e){this.loggingService.catch("Error in LiveStateService detectKeydownOnInput: ",e)}}unsubscribeKeydownSubscription(){try{this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribeKeydownSubscription","color: green;"),this.keydownSubscription&&(this.keydownSubscription.unsubscribe(),this.keydownSubscription=null)}catch(e){this.loggingService.catch("Error in LiveStateService unsubscribeKeydownSubscription: ",e)}}getDocumentPaths(){try{this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().subscribe(e=>{this.documentPaths=e,this.updateLiveStateDataFromDraft()})}catch(e){this.loggingService.catch("Error in LiveStateService getDocumentPaths: ",e)}}getUser(){try{this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().subscribe(e=>{this.user=e,this.updateLiveStateDataFromDraft()})}catch(e){this.loggingService.catch("Error in LiveStateService getUser: ",e)}}updateLiveStateDataFromDraft(){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateLiveStateDataFromDraft","color: green;"),this.liveStateDataMapDraft?.custom&&this.user&&this.documentPaths&&(Object.keys(this.liveStateDataMapDraft.custom).forEach(e=>{this.setLiveStateData(e,this.liveStateDataMapDraft.custom[e])}),this.liveStateDataMapDraft={})}catch(e){this.loggingService.catch("Error in LiveStateService updateLiveStateDataFromDraft: ",e)}}subscribeLiveStateData(){return this.loggingService.log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed({firebaseUser:e,liveStateData:{}})),he(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(t=>(e.featureAllowed=t,e))):se(e)),he(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(ce(t=>(e.featureAllowed=!t,e))):se(e)),he(e=>e.featureAllowed?se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(Le(r=>!!r),ce(r=>(this.documentPaths=r,t.documentPaths=r,t)))),on(t=>{this.serverConnectionState$?.value===rl.PENDING_INIT&&t?.documentPaths?.liveState&&this.serverConnectionState$.next(rl.PENDING_DATA)}),he(t=>this.domService.onNetworkStatusChange$().pipe(Le(r=>r),ce(()=>t))),he(t=>this.getDataFromDocumentId().pipe(ce(r=>(t.liveStateData=r,I({},t))))),he(t=>this.getSingleEditorMode$().pipe(ce(()=>t))),ce(t=>{if([rl.ONLINE,rl.OFFLINE].includes(this.serverConnectionState$?.value)||this.serverConnectionState$.next(rl.ONLINE),t.liveStateData)this.liveStateDataMap$.next(t.liveStateData);else{let r=this.liveStateDataMap$.value;r&&Object.keys(r).length>0&&this.liveStateDataMap$.next({})}return t}),he(t=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] \u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}"),t?.liveStateData?.default?.singleEditorMode?.editor?this.listenToEditorAndAllHeartbeat$(t?.liveStateData?.default?.singleEditorMode?.editor?.userId,t?.liveStateData?.default?.singleEditorMode?.tabId).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0] editor or all heartbeatData"),T(I({},t),{heartbeatData:r?.data,heartbeatStatus:r?.status})))):this.heartbeatService.getHeartbeatData({documentId:this.documentPaths?.documentId,lastUpdatedTimestamp:{$gte:Date.now()-2e4}}).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0] all heartbeatData"),T(I({},t),{heartbeatData:r})))))),on(t=>{let r=t?.heartbeatData;if(!r)this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][1] heartbeatData is null");else{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][1] heartbeatData length:",r?.length);let a=s=>(Date.now()-s)/1e3+" ago";console.table(r?.map(s=>({userId:s?.userId,tabId:s?.tabId,lastUpdatedTimestamp:a(s?.lastUpdatedTimestamp),createdTimestamp:a(s?.createdTimestamp),isCurrentTab:s?.tabId===this.tabId,currentTabId:this.tabId})))}}),he(t=>this.getSingleEditorMode()?this.getUserPresence$().pipe(ce(r=>{if(!t?.liveStateData?.default?.singleEditorMode){let a=this.singleEditorLiveStateData$.value&&typeof this.singleEditorLiveStateData$.value=="object"?JSON.parse(JSON.stringify(this.singleEditorLiveStateData$.value)):this.singleEditorLiveStateData$.value;this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_EMPTY_DATA_STATS,{previousSingleEditorModeData:a,currentSingleEditorModeData:t?.liveStateData?.default?.singleEditorMode,currentSingleEditorModeDataParentStats:{liveStateDataAvailable:!!t?.liveStateData,defaultAvailable:!!t?.liveStateData?.default,singleEditorModeAvailable:!!t?.liveStateData?.default?.singleEditorMode}})}this.updateSingleEditorLiveSyncDataNew(t?.liveStateData?.default?.singleEditorMode||{},r,t?.heartbeatData??null)})):se(t))):se({})))}listenToEditorHeartbeat$(e,t){return this.heartbeatService.getSpecificHeartbeat(e,t).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.005] listenToEditorHeartbeat$ heartbeatData",r),r)))}listenToAllHeartbeat$(){return this.heartbeatService.getHeartbeatData({documentId:this.documentPaths?.documentId,lastUpdatedTimestamp:{$gte:Date.now()-2e4}}).pipe(rt(1),ce(e=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.004] listenToAllHeartbeat$ heartbeatData",e),e)))}listenToEditorAndAllHeartbeat$(e,t){let a=this.listenToEditorHeartbeat$(e,t).pipe(ce(p=>p?.id?[p]:null),rd()),s=this.listenToAllHeartbeat$().pipe(ce(p=>({status:"ALL_USERS_FALLBACK",data:p})));return a.pipe(rt(1),he(p=>{let g=Date.now(),C=p?.[0];if(!C||g-C.lastUpdatedTimestamp>1e4)return s;{let D=se({status:"SINGLE_EDITOR_ACTIVE",data:p}),L=a.pipe(Ka(1),ce(z=>({status:"SINGLE_EDITOR_ACTIVE",data:z})),l4({each:1e4,with:()=>s}));return rc(D,L)}})).pipe(Ct((p,g)=>this.areHeartbeatStatesEqual(p,g)))}listenToEditorAndAllHeartbeat$OldWorking(e,t){try{let r=this.listenToEditorHeartbeat$(e,t).pipe(rd()).pipe(ce(c=>c?[c]:null)),a=1e4;return r.pipe(rt(1),he(c=>{let p=Date.now(),g=c?.[0];if(!g?.lastUpdatedTimestamp||p-g?.lastUpdatedTimestamp>a)return this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.002] Initial heartbeat is stale. Switching to allHeartbeats..."),this.listenToAllHeartbeat$();{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.003] Initial heartbeat is fresh. Monitoring for inactivity...");let E=se(c),D=r.pipe(Ka(1),l4({each:a,with:()=>this.listenToAllHeartbeat$()}));return rc(E,D)}}))}catch{return se(null)}}areHeartbeatStatesEqual(e,t){if(e.status!==t.status)return!1;switch(t.status){case"SINGLE_EDITOR_ACTIVE":let r=e.data,a=t.data;return!r?.[0]||!a?.[0]?!1:r[0].userId===a[0].userId&&r[0].tabId===a[0].tabId;case"ALL_USERS_FALLBACK":let s=!e.data||e.data.length===0,c=!t.data||t.data.length===0;if(s&&c)return!0;if(s||c||e.data?.length!==t.data?.length)return!1;let p=new Set(e.data?.map(C=>C.userId)),g=new Set(t.data?.map(C=>C.userId));for(let C of p)if(!g.has(C))return!1;return!0;case"NO_DATA":return!0;default:return!1}}updateSingleEditorLiveSyncDataNew(e,t,r){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateSingleEditorLiveSyncData","color: green;"),Ii(e,{})&&!this.keydownSubscription&&this.detectKeydownOnInput();let a=JSON.parse(JSON.stringify(e)),s=yield this.singleEditorDecisionEngine.determineEditorStatusNew({singleEditorModeData:a,userPresence:t,heartbeatData:r,currentUser:this.authService.getUser(),currentTabId:this.tabId});this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [10] LiveStateService updateSingleEditorLiveSyncDataNew newData",s?.shouldSetUndefined,s?.data,"heartbeatData length:",r?.length),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] \u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B");let c;if(this.domService.getNetworkStatus()||(c=null),e=s?.data??{},s?.shouldSetUndefined||(c=null),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [11] LiveStateService updateSingleEditorLiveSyncDataNew editorEmptyStateValue",e,c,this.isEditor$?.value),e&&!e?.editor&&this.isEditor$?.value!==c&&this.isEditor$.next(c),Ii(this.singleEditorLiveStateData,e))return;{this.singleEditorLiveStateData=e,this.singleEditorLiveStateData$.next(e);let p;if(this.singleEditorLiveStateData&&typeof this.singleEditorLiveStateData=="object"&&(p=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS,{singleEditorLiveStateData:p}),this.singleEditorLiveStateData?.editor){let g=this.authService.getUser();this.singleEditorLiveStateData?.editor?.userId!==g?.userId?this.makeReader():this.makeEditor()}else this.isEditor$?.value!==c&&this.isEditor$.next(c),this.enableInputElements(),this.enableElementEvents();this.editorAccessTimerInterval&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"&&this.clearEditorAccessTimerInterval(),this.requestAccessTimer&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"?this.clearRequestAccessTimer():this.singleEditorLiveStateData?.requestEditorAccess?.status==="pending"&&this.isUserEditor()?.isEditor&&this.isUserEditor()?.isEditorOnCurrentTab&&this.setRequestAccessTimer(this.singleEditorLiveStateData?.requestEditorAccess?.editorAccessTimeout||j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME)}}catch{}})}updateSingleEditorLiveSyncData(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: updateSingleEditorLiveSyncData","color: green;"),Ii(e,{})){let a=yield this.fetchSingleEditorLiveStateDataFromDatabase();if(!Ii(a,e)&&(this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_MISMATCH,{serverData:a,localData:e}),a&&typeof a=="object")){let s=yield this.liveStateUtilsService.resolveAndMergeSingleEditorLiveStateDataWithUser(JSON.parse(JSON.stringify(a)));e=JSON.parse(JSON.stringify(s))}}if(Ii(e,{})&&!this.keydownSubscription&&this.detectKeydownOnInput(),t&&(this.compareServerAndExternalData(e,t),e&&typeof e=="object"&&(e=JSON.parse(JSON.stringify(e))),!e?.editor)){let a=this.authService.getUser();if(t?.sameUserPresentOnTab)e.editor=a,e.tabId=`sameUserPresentOnTab_${this.tabId}`;else if(t?.differentUserPresentOnTab){let s=t?.userIds?.[0],c;s&&(yield this.usersService.resolveUsers({userIds:[s],forceResolve:!0}),c=this.usersService.getUserById(s)),c?(e.editor=c,e.tabId=`differentUserPresentOnTab_${this.tabId}`):(e.editor={userId:`anonymous_${a?.userId}`,name:"Anonymous"},e.tabId=`differentUserPresentOnTab_${this.tabId}`)}}let r;if(this.domService.getNetworkStatus()||(r=null),e&&!e?.editor&&this.isEditor$?.value!==r&&!t?.sameUserPresentOnTab&&!t?.differentUserPresentOnTab&&this.isEditor$.next(r),Ii(this.singleEditorLiveStateData,e))return;{this.singleEditorLiveStateData=e,this.singleEditorLiveStateData$.next(e);let a;if(this.singleEditorLiveStateData&&typeof this.singleEditorLiveStateData=="object"&&(a=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS,{singleEditorLiveStateData:a}),this.singleEditorLiveStateData?.editor){let s=this.authService.getUser();this.singleEditorLiveStateData?.editor?.userId!==s?.userId?this.makeReader():this.makeEditor()}else this.isEditor$?.value!==r&&this.isEditor$.next(r),this.enableInputElements(),this.enableElementEvents();this.editorAccessTimerInterval&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"&&this.clearEditorAccessTimerInterval(),this.requestAccessTimer&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"?this.clearRequestAccessTimer():this.singleEditorLiveStateData?.requestEditorAccess?.status==="pending"&&this.isUserEditor()?.isEditor&&this.isUserEditor()?.isEditorOnCurrentTab&&this.setRequestAccessTimer(this.singleEditorLiveStateData?.requestEditorAccess?.editorAccessTimeout||j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME)}}catch{}})}compareServerAndExternalData(e,t){try{if(t){let r=this.authService.getUser(),a={isEditor:e?.editor?.userId===r?.userId,isEditorOnCurrentTab:e?.editor?.userId===r?.userId&&e?.tabId===this.tabId},s={isEditor:t?.sameUserPresentOnTab&&!t?.differentUserPresentOnTab,isEditorOnCurrentTab:!1};Ii(a,s)||this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_DATA_MISMATCH_WITH_EXTERNAL,{serverUserEditorAccess:a,externalUserEditorAccess:s,serverData:e,externalData:t})}}catch(r){this.loggingService.catch("Error in LiveStateService compareServerAndExternalData: ",r)}}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.LIVE_STATE_SYNC)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Live state sync feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>(this.db=t,this.configService?.getApiKey()&&this.documentPaths?.liveState?this.commonDbService.dbListener({feature:"allLiveStates",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(Le(r=>!!r?.data),ce(r=>r?.data&&typeof r?.data=="object"?JSON.parse(JSON.stringify(r?.data)):r?.data),Nn(r=>(this.loggingService.catch("Error in LiveStateService getDataFromDocumentId: ",r),se({})))):se({}))),Ct(pn))}getLiveStateData$(e,t){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveStateData$","color: green;"),ei(this.afAuth).pipe(Le(r=>!!r),he(r=>this.isFeatureAllowed({firebaseUser:r,liveStateData:{}})),he(r=>r.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(a=>(r.featureAllowed=a,r))):se(r)),he(r=>r.featureAllowed?this.authService.isPlanExpired$().pipe(ce(a=>(r.featureAllowed=!a,r))):se(r)),he(r=>r.featureAllowed?se(r).pipe(he(a=>this.docService.getDocumentPaths$().pipe(ce(s=>(this.documentPaths=s,a.documentPaths=s,a)))),he(a=>{let s=t?.listenToNewChangesOnly?1:0;return this.getLiveStateDataFromDatabase$(e).pipe(Ka(s))}),ce(a=>{if(a)if(e){let s=_t(e+""),c=a?.[s];if(c){let p=c?.data;if(c?.tabId&&this.tabId&&c?.tabId===this.tabId)return;if(c?.isDataStringified&&typeof p=="string")try{p=JSON.parse(p)}catch{}return p}else return}else{let s={};return Object.keys(a||{}).forEach(c=>{if(a[c]?.liveStateDataId){let p=a[c],g=p?.data;if(p?.isDataStringified&&typeof g=="string")try{g=JSON.parse(g)}catch{}s[p.liveStateDataId]=g}}),s}return a})):se(void 0).pipe(Le(Boolean))),Ct((r,a)=>JSON.stringify(r||{})===JSON.stringify(a||{})),Le(r=>r!==void 0),ce(r=>r))}catch(r){return this.loggingService.catch("Error in LiveStateService getLiveStateData$: ",r),se(null)}}getLiveStateDataFromDatabase$(e){try{return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{this.db=t;let r=e?_t(e+""):void 0;return this.configService?.getApiKey()&&this.documentPaths?.liveState?this.commonDbService.dbListener({feature:r?"liveStateCustom":"allLiveStateCustoms",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:r,skipFirestore:!0}}).pipe(ce(a=>a?.data),ce(a=>{if(a)return r?{[r]:a}:a}),Nn(a=>(this.loggingService.catch("Error in LiveStateService getLiveStateDataFromDatabase$: ",a),se(null)))):se(void 0)}))}catch(t){return this.loggingService.catch("Error in LiveStateService getLiveStateDataFromDatabase$: ",t),se(void 0)}}setLiveStateData(e,t,r){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: setLiveStateData","color: green;");try{let a=this.authService.getUser();if(e&&this.documentPaths?.liveState&&a){let s=_t(e+""),c=!1;try{if(r?.merge&&typeof t=="object"){let g=yield this.commonDbService.getData({feature:"liveStateCustom",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:s,skipFirestore:!0}});if(g?.isDataStringified){let C=JSON.parse(g?.data);typeof t=="object"&&(t=I(I({},C),t))}}}catch{}try{typeof t=="object"&&(t=JSON.stringify(t),c=!0)}catch{}let p={id:s,lastUpdated:this.timestamp,liveStateDataId:e,data:t,updatedBy:a,tabId:this.tabId,isDataStringified:c};yield this.commonDbService.setData({feature:"liveStateCustom",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:s,skipFirestore:!0},data:JSON.parse(JSON.stringify(p))})}else this.loggingService.warn("liveStateDataId or documentPaths or user is null"),this.liveStateDataMapDraft?.custom||(this.liveStateDataMapDraft.custom={}),e&&(this.liveStateDataMapDraft.custom[e]=t)}catch(a){this.loggingService.catch("Error in LiveStateService _setLiveStateData: ",a)}})}getFormElements(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getInputElements","color: green;"),document.querySelectorAll("input, textarea, select, button, [contenteditable]")}catch(e){return this.loggingService.catch("Error in LiveStateService getInputElements: ",e),null}}disableInputElements(){try{this.loggingService.log("%c[WB] Calling FUNCTION: disableInputElements","color: green;"),this.getFormElements()?.forEach(t=>{if(this.isElementInsideSingleEditorModeContainerElements(t)&&!this.isSingleEditorModeDisabledForElement(t)&&!Xi(t)){let r=t?.hasAttribute("disabled");t?.hasAttribute("contenteditable")&&(r=t?.getAttribute("contenteditable")==="false"),r||(t.setAttribute("disabled","true"),t.setAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO,"true"),t?.hasAttribute("contenteditable")&&t.setAttribute("contenteditable","false"))}})}catch(e){this.loggingService.catch("Error in LiveStateService disableInputElements: ",e)}}enableInputElements(){try{this.loggingService.log("%c[WB] Calling FUNCTION: enableInputElements","color: green;"),this.getFormElements()?.forEach(t=>{t?.hasAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO)&&(t.removeAttribute("disabled"),t.removeAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO),t?.getAttribute("contenteditable")&&t.setAttribute("contenteditable","true"))})}catch(e){this.loggingService.catch("Error in LiveStateService enableInputElements: ",e)}}disableElementEvents(){try{this.loggingService.log("%c[WB] Calling FUNCTION: disableElementEvents","color: green;"),document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SYNC_ACCESS}]`)?.forEach(t=>{let r=this.domService.getXPath(t);r&&!this.preventEventsOnElementMap[r]&&(this.preventEventsOnElementMap[r]={element:t,events:{}},this.PREVENT_EVENTS.forEach(a=>{let s=pi(t,a,{capture:!0}).subscribe(c=>{try{c.preventDefault(),c.stopPropagation()}catch(p){this.loggingService.catch("Error in LiveStateService disableElementEvents subscription: ",p)}});this.preventEventsOnElementMap[r]?.events[a]?.unsubscribe(),this.preventEventsOnElementMap[r].events[a]=s}))})}catch(e){this.loggingService.catch("Error in LiveStateService disableElementClicks: ",e)}}enableElementEvents(){try{this.loggingService.log("%c[WB] Calling FUNCTION: enableElementEvents","color: green;"),Object.keys(this.preventEventsOnElementMap).forEach(e=>{let t=this.preventEventsOnElementMap[e];Object.keys(t.events||{}).forEach(r=>{t?.events[r]?.unsubscribe()})}),this.preventEventsOnElementMap={}}catch(e){this.loggingService.catch("Error in LiveStateService enableElementClicks: ",e)}}setUserAsEditor(e){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: setUserAsEditor","color: green;"),this.user&&this.documentPaths?.liveStateSingleEditorMode){if(this.analyticsService.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_TRIGGERED,{editorUserId:this.user?.userSnippylyId,tabId:this.tabId}),!e?.skipEditorCheck){let r=yield this.fetchSingleEditorLiveStateDataFromDatabase();if(r?.editor){let a=this.authService.getUser(),s=null;a?.userId===r?.editor?.userId?r?.tabId===this.tabId?s={code:"same_user_editor_current_tab",message:"Same user is already editor in current tab.",source:"setUserAsEditor"}:s={code:"same_user_editor_different_tab",message:"Same user is already editor in different tab.",source:"setUserAsEditor"}:s={code:"another_user_editor",message:"Another user is already editor.",source:"setUserAsEditor"};let c;return r&&typeof r=="object"&&(c=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(r)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_ERROR,{error:s,singleEditorLiveStateData:c}),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [12] LiveStateService setUserAsEditor errorEvent",s),{error:s}}}let t={editor:this.user,tabId:this.tabId,editorAt:this.timestamp};this.commonDbService.setData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(t))})}}catch(t){this.loggingService.catch("Error in LiveStateService setUserAsEditor: ",t)}})}fetchSingleEditorLiveStateDataFromDatabase(){return Q(this,null,function*(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: fetchSingleEditorLiveStateDataFromDatabase","color: green;"),yield this.commonDbService.getData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}})}catch(e){return this.loggingService.catch("Error in LiveStateService fetchSingleEditorLiveStateDataFromDatabase: ",e),null}})}setRequestAccessTimer(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setRequestAccessTimer","color: green;"),this.requestAccessTimer||(this.requestAccessTimer=setTimeout(()=>{this.getEditorAccessTransferOnTimeOut()&&this.acceptEditorAccessRequest(),this.clearRequestAccessTimer()},e*1e3),this.setEditorAccessTimerInterval(e))}catch(t){this.loggingService.catch("Error in LiveStateService setRequestAccessTimer: ",t)}}clearRequestAccessTimer(){try{this.loggingService.log("%c[WB] Calling FUNCTION: clearRequestAccessTimer","color: green;"),this.requestAccessTimer&&(clearTimeout(this.requestAccessTimer),this.requestAccessTimer=null)}catch(e){this.loggingService.catch("Error in LiveStateService clearRequestAccessTimer: ",e)}}requestEditorAccess(){this.loggingService.log("%c[WB] Calling FUNCTION: requestEditorAccess","color: green;");try{return this.analyticsService.trackEvent(Z.Events.LiveStateSync.REQUEST_EDITOR_ACCESS_TRIGGERED),new Ut(e=>{let t=null;try{if(this.user&&this.documentPaths?.liveStateSingleEditorMode){let r=this.getEditorAccessTimeout(),a=Ai(this.db,`${this.documentPaths?.liveStateSingleEditorMode}`),s={requestEditorAccess:{user:this.user,requestedAt:this.timestamp,status:"pending",editorAccessTimeout:r,tabId:this.tabId}};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},errorCallback:c=>{this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",c),e.next(null),e.complete()},callback:()=>{r&&(this.requestAccessTimer=setTimeout(()=>{this.getEditorAccessTransferOnTimeOut()&&this.setUserAsEditor({skipEditorCheck:!0})},(r+3)*1e3),this.setEditorAccessTimerInterval(r+3)),t=this.getSingleEditorLiveStateData$().subscribe(c=>{c&&(c?.requestEditorAccess?c?.requestEditorAccess?.status==="cancelled"&&(e.next(null),e.complete()):c?.editor?.userId===this.user?.userId?(e.next(!0),e.complete()):(e.next(!1),e.complete()))})},data:JSON.parse(JSON.stringify(s))})}else e.next(!1),e.complete()}catch(r){this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",r),e.next(null),e.complete()}return()=>{t&&t?.unsubscribe()}})}catch(e){return this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",e),se(null)}}makeEditor(){try{this.loggingService.log("%c[WB] Calling FUNCTION: makeEditor","color: green;");let e=this.singleEditorLiveStateData?.tabId===this.tabId;this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_MAKE_EDITOR_TRIGGERED,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!0,isEditorOnCurrentTab:e}),this.isEditor$.next({isEditor:!0,isEditorOnCurrentTab:e}),this.getSingleEditorModeConfig()?.customMode||(!this.getSingleEditorModeConfig()?.singleTabEditor||e?(this.enableInputElements(),this.enableElementEvents()):(this.disableInputElements(),this.disableElementEvents())),this.fetchSingleEditorLiveStateDataFromDatabase().then(t=>{this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_EDITOR,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!0,isEditorOnCurrentTab:e,singleEditorLiveStateDataOnServer:t})}).catch(t=>{})}catch(e){this.loggingService.catch("Error in LiveStateService makeEditor: ",e)}}makeReader(){try{this.loggingService.log("%c[WB] Calling FUNCTION: makeReader","color: green;"),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_MAKE_READER_TRIGGERED,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!1,isEditorOnCurrentTab:!1}),this.isEditor$.next({isEditor:!1,isEditorOnCurrentTab:!1}),this.getSingleEditorModeConfig()?.customMode||(this.disableInputElements(),this.disableElementEvents()),this.fetchSingleEditorLiveStateDataFromDatabase().then(e=>{this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_READER,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!1,isEditorOnCurrentTab:!1,singleEditorLiveStateDataOnServer:e})}).catch(e=>{})}catch(e){this.loggingService.catch("Error in makeReader: ",e)}}acceptEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: acceptEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.isUserEditor()?.isEditor&&this.documentPaths?.liveStateSingleEditorMode){let e=this.singleEditorLiveStateData?.requestEditorAccess?.user,t=this.singleEditorLiveStateData?.requestEditorAccess?.tabId;if(e&&t){let r={editor:e,requestEditorAccess:null,tabId:t,editorAt:this.timestamp};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(r))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED,{editorUserId:e?.userSnippylyId,tabId:t})}}}catch(e){this.loggingService.catch("Error in acceptEditorAccessRequest: ",e)}})}rejectEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: rejectEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.isUserEditor()?.isEditor&&this.documentPaths?.liveStateSingleEditorMode){let e={requestEditorAccess:null};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED)}}catch(e){this.loggingService.catch("Error in LiveStateService rejectEditorAccessRequest: ",e)}})}cancelEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: cancelEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.documentPaths?.liveStateSingleEditorMode){let e={requestEditorAccess:T(I({},this.singleEditorLiveStateData?.requestEditorAccess),{status:"cancelled"})};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),e={requestEditorAccess:null},this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED)}}catch(e){this.loggingService.catch("Error in LiveStateService cancelEditorAccessRequest: ",e)}})}editCurrentTab(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: editCurrentTab","color: green;"),this.user&&this.isUserEditor()?.isEditor&&!this.isUserEditor()?.isEditorOnCurrentTab&&this.documentPaths?.liveStateSingleEditorMode){let e={tabId:this.tabId,editor:this.user,editorAt:this.timestamp};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.EDIT_CURRENT_TAB_TRIGGERED,{tabId:this.tabId})}}catch(e){this.loggingService.catch("Error in LiveStateService editCurrentTab: ",e)}})}isUserEditor$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isUserEditor$","color: green;"),this.isEditor$.asObservable().pipe(Ct(pn))}catch(e){return this.loggingService.catch("Error in LiveStateService isUserEditor$: ",e),se(null)}}isUserEditor(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isUserEditor","color: green;"),this.isEditor$.value}catch(e){return this.loggingService.catch("Error in LiveStateService isUserEditor: ",e),null}}getEditor$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getEditor$","color: green;"),this.getSingleEditorLiveStateData$().pipe(ce(e=>e?.editor||null),Ct())}catch(e){return this.loggingService.catch("Error in LiveStateService getEditor$: ",e),se(null)}}isEditorAccessRequested$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isEditorAccessRequested$","color: green;"),this.isUserEditor$().pipe(he(e=>e?.isEditor?this.singleEditorLiveStateData$.pipe(ce(t=>t?.requestEditorAccess?{requestStatus:"requested",requestedBy:t?.requestEditorAccess?.user}:null)):se(null)),Ct((e,t)=>JSON.stringify(e||{})===JSON.stringify(t||{})))}catch(e){return this.loggingService.catch("Error in LiveStateService isEditorAccessRequested$: ",e),se(null)}}removeEditorAccess(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: removeEditorAccess","color: green;"),this.analyticsService.trackEvent(Z.Events.LiveStateSync.REMOVE_EDITOR_ACCESS,{removeEditorAccessMetadata:e?.metadata}),(this.user||this.authService.getAuthUser())&&this.documentPaths?.liveStateSingleEditorMode&&(yield this.commonDbService.deleteData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}}))}catch(t){this.loggingService.catch("Error in LiveStateService removeEditorAccess: ",t)}})}getSingleEditorLiveStateData$(){return this.singleEditorLiveStateData$.asObservable().pipe(Ct(pn))}enableSingleEditorMode(e){try{if(this.singleEditorMode$.value===!0)return;this.singleEditorMode$.next(!0),e?this.singleEditorModeConfig$.next(e):this.singleEditorModeConfig$.next(new Sk)}catch(t){this.loggingService.catch("Error in LiveStateService enableSingleEditorMode: ",t)}}disableSingleEditorMode(){try{if(this.singleEditorMode$.value===!1)return;this.singleEditorMode$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableSingleEditorMode: ",e)}}getSingleEditorMode$(){return this.singleEditorMode$.asObservable()}getSingleEditorMode(){return this.singleEditorMode$.value}getSingleEditorModeConfig$(){return this.singleEditorModeConfig$.asObservable()}getSingleEditorModeConfig(){return this.singleEditorModeConfig$.value}enableAutoSyncState(){try{if(this.autoSyncState$.value===!0)return;this.autoSyncState$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableAutoSyncState: ",e)}}disableAutoSyncState(){try{if(this.autoSyncState$.value===!1)return;this.autoSyncState$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableAutoSyncState: ",e)}}getAutoSyncState$(){return this.autoSyncState$.asObservable()}getAutoSyncState(){return this.autoSyncState$.value}setEditorAccessTimeout(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setEditorAccessTimeout","color: green;"),e&&this.editorAccessTimeout$.next(e)}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimeout: ",t)}}getEditorAccessTimeout$(){return this.editorAccessTimeout$.asObservable()}getEditorAccessTimeout(){return this.editorAccessTimeout$.value}enableEditorAccessTransferOnTimeOut(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableEditorAccessTransferOnTimeOut","color: green;"),this.editorAccessTransferOnTimeOut$.value===!0)return;this.editorAccessTransferOnTimeOut$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableEditorAccessTransferOnTimeOut: ",e)}}disableEditorAccessTransferOnTimeOut(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableEditorAccessTransferOnTimeOut","color: green;"),this.editorAccessTransferOnTimeOut$.value===!1)return;this.editorAccessTransferOnTimeOut$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableEditorAccessTransferOnTimeOut: ",e)}}getEditorAccessTransferOnTimeOut$(){return this.editorAccessTransferOnTimeOut$.asObservable()}getEditorAccessTransferOnTimeOut(){return this.editorAccessTransferOnTimeOut$.value}enableDefaultSingleEditorUI(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableDefaultSingleEditorUI","color: green;"),this.defaultSingleEditorUIEnabled$.value===!0)return;this.defaultSingleEditorUIEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableDefaultSingleEditorUI: ",e)}}disableDefaultSingleEditorUI(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableDefaultSingleEditorUI","color: green;"),this.defaultSingleEditorUIEnabled$.value===!1)return;this.defaultSingleEditorUIEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableDefaultSingleEditorUI: ",e)}}getDefaultSingleEditorUIEnabled$(){return this.defaultSingleEditorUIEnabled$.asObservable()}getDefaultSingleEditorUIEnabled(){return this.defaultSingleEditorUIEnabled$.value}setEditorAccessTimerInterval(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setEditorAccessTimerInterval","color: green;"),this.clearEditorAccessTimerInterval(),e>0&&(this.editorAccessTimer$.next({state:"inProgress",durationLeft:e}),this.editorAccessTimerInterval=setInterval(()=>{try{e-=1,e<0?this.clearEditorAccessTimerInterval():e?this.editorAccessTimer$.next({state:"inProgress",durationLeft:e}):this.editorAccessTimer$.next({state:"completed"})}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimerCountdown interval: ",t),this.clearEditorAccessTimerInterval()}},1e3))}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimerCountdown: ",t),this.clearEditorAccessTimerInterval()}}clearEditorAccessTimerInterval(){try{this.loggingService.log("%c[WB] Calling FUNCTION: clearEditorAccessTimerInterval","color: green;"),this.editorAccessTimerInterval&&(clearInterval(this.editorAccessTimerInterval),this.editorAccessTimerInterval=null,this.editorAccessTimer$.next({state:"idle"}))}catch(e){this.loggingService.catch("Error in LiveStateService clearEditorAccessTimerInterval: ",e)}}getEditorAccessTimer$(){return this.editorAccessTimer$.asObservable()}onServerConnectionStateChange$(){return this.serverConnectionState$.asObservable()}updateUserPresence(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateUserPresence","color: green;"),this.userPresence$.next(e)}catch(t){this.loggingService.catch("Error in LiveStateService updateUserPresence: ",t)}}getUserPresence$(){return this.userPresence$.asObservable().pipe(Ct(pn))}getUserPresence(){return this.userPresence$.value}detectLiveSyncInputs(){try{document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SYNC_STATE}]`)?.forEach(t=>{this.subscribeInputChanges(t)})}catch(e){this.loggingService.catch("Error in LiveStateService detectLiveSyncInputs: ",e)}}subscribeInputChanges(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: subscribeInputChanges","color: green;"),e){let t=e.tagName,r=this.domService.getXPath(e),a=_t(r);if(this.inputChangeSubscriptionMap[a])this.loggingService.warn("subscription already exists",a,e);else{this.inputChangeSubscriptionMap[a]={id:a,element:e};let s;switch(t?.toLowerCase()){case"input":s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={value:p?.target?.value,tagName:p?.target?.tagName,type:p?.target?.type};this.setLiveStateSyncInputData(p?.target,g)});break;case"textarea":s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={value:p?.target?.value,tagName:p?.target?.tagName};this.setLiveStateSyncInputData(p?.target,g)});break;default:e.getAttribute("contenteditable")&&(s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={innerText:p?.target?.innerText,innerHTML:this.domService.sanitizeHtml(p?.target?.innerHTML),tagName:p?.target?.tagName,isContentEditable:!0};this.setLiveStateSyncInputData(p?.target,g)}));break}s&&(this.inputChangeSubscriptionMap[a]?.subscriptions||(this.inputChangeSubscriptionMap[a]={subscriptions:[]}),this.inputChangeSubscriptionMap[a].subscriptions?.push(s))}}}catch(t){this.loggingService.catch("Error in LiveStateService subscribeInputChanges: ",t)}}unsubscribeInputChanges(){try{this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribeInputChanges","color: green;"),Object.keys(this.inputChangeSubscriptionMap).forEach(e=>{this.inputChangeSubscriptionMap[e]?.subscriptions?.forEach(r=>{r.unsubscribe()})}),this.inputChangeSubscriptionMap={}}catch(e){this.loggingService.catch("Error in LiveStateService unsubscribeInputChanges: ",e)}}setLiveStateSyncInputData(e,t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: setLiveStateSyncInputData","color: green;"),this.user&&this.documentPaths?.liveState){let r=this.domService.getXPath(e),a=_t(r),s={id:a,lastUpdated:this.timestamp,liveStateDataId:r,data:t,updatedBy:this.user,tabId:this.tabId};this.commonDbService.updateData({feature:"liveStateAutoSyncStateCurrent",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0},data:JSON.parse(JSON.stringify(s))}),this.commonDbService.updateData({feature:"liveStateAutoSyncStateHistoryId",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:a,skipFirestore:!0},data:JSON.parse(JSON.stringify(s))})}}catch(r){this.loggingService.catch("Error in LiveStateService setLiveStateSyncInputData: ",r)}}updateLiveStateSyncInputDataLocally(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateLiveStateSyncInputDataLocally","color: green;"),this.user&&Object.keys(e).forEach(t=>{let r=e[t],a=this.domService.getElementFromXPath(r?.liveStateDataId),s=!1;if(r?.updatedBy?.userSnippylyId!==this.user?.userSnippylyId)s=!0;else{let c=r?.tabId&&this.tabId&&r?.tabId!==this.tabId,p=a?.contains(document.activeElement);c&&!bae()&&!p&&(s=!0)}if(s&&a)switch(a.value=r?.data?.value,a.tagName?.toLowerCase()){case"input":a.value=r?.data?.value;break;case"textarea":a.value=r?.data?.value;break;default:a.getAttribute("contenteditable")&&(a.innerHTML=this.domService.sanitizeHtml(r?.data?.innerHTML))}})}catch(t){this.loggingService.catch("Error in LiveStateService updateLiveStateSyncInputDataLocally: ",t)}}setSingleEditorModeContainerIds(e){this.singleEditorModeContainerIds$.next(e||[])}getSingleEditorModeContainerIds(){return this.singleEditorModeContainerIds$.asObservable()}isElementInsideSingleEditorModeContainerElements(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: isElementInsideSingleEditorModeContainerElements","color: green;");let t=this.singleEditorModeContainerIds$.value,r=document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SINGLE_EDITOR_MODE_CONTAINER}]`);if(!t?.length&&!r?.length)return!0;if(t?.length)for(let a=0;a<t.length;a++){let s=document.getElementById(t[a]);if(s&&s.contains(e))return!0}if(r?.length)for(let a=0;a<r.length;a++){let s=r[a];if(s&&s.contains(e))return!0}return!1}catch(t){return this.loggingService.catch("Error in LiveStateService isElementInsideSingleEditorModeContainerElements: ",t),!1}}isSingleEditorModeDisabledForElement(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: isSingleEditorModeDisabledForElement","color: green;"),e){if(e.getAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_DISABLED))return!0;{let r=e?.parentElement;if(r)return this.isSingleEditorModeDisabledForElement(r)}}return!1}catch(t){return this.loggingService.catch("Error in LiveStateService isSingleEditorModeDisabledForElement: ",t),!1}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),this.isUserEditor$().pipe(on(e=>{try{if(this.documentPaths?.liveStateSingleEditorMode){let t=Ai(this.db,`${this.documentPaths?.liveStateSingleEditorMode}`);e?.isEditor&&(!this.getSingleEditorModeConfig()?.singleTabEditor||e?.isEditorOnCurrentTab)?nl(t).remove():nl(t).cancel()}}catch(t){this.loggingService.catch("Error in LiveStateService updateOnDatabaseDisconnect tap: ",t)}}))}updateServerStateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateServerStateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.docService.getDocumentPaths()?.liveState&&e){let r=Ai(this.db,".info/connected"),a=!0;jp(r,s=>{let c=s.val();if(a&&c===!1){a=!1;return}a=!1,c===!1?this.serverConnectionState$.next(rl.OFFLINE):this.serverConnectionState$.value===rl.OFFLINE&&this.serverConnectionState$.next(rl.ONLINE)})}}catch(t){this.loggingService.catch("Error in updateServerStateOnDatabaseDisconnect:",t)}})))}getSemStats(){try{let e=!!this.authService?.getUser(),t=!!this.docService?.getDocumentPaths(),r=this.singleEditorMode$.value,a=!!this.singleEditorModeConfig$.value,s=this.isUserEditor(),c;this.singleEditorLiveStateData$.value&&typeof this.singleEditorLiveStateData$.value=="object"&&(c=this.liveStateUtilsService?.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData$.value))));let p=this.getUserPresence();return{userAvailable:e,documentPathsAvailable:t,singleEditorModeEnabled:r,singleEditorModeConfig:a,isEditor:s,singleEditorLiveStateData:c,userPresence:p}}catch(e){this.loggingService.catch("Error in LiveStateService getSemStats: ",e)}}get timestamp(){return this.commonDbService.getServerTimestamp()}semDebuggerMode(){try{return localStorage.getItem("vSemDebuggerMode")==="true"}catch(e){return this.loggingService.catch("Error in LiveStateService semDebuggerMode: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(et),J(Ve),J(kt),J(Cn),J(ot),J(Be),J(sde),J(_n),J(y),J(dn),J(n9),J(Bk),J(Mn),J(lde))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Hl=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z){this.analyticsService=e,this.docService=t,this.domService=r,this.authService=a,this.afAuth=s,this.iamService=c,this.databaseService=p,this.configService=g,this.avatarService=C,this.loggingService=E,this.flockService=D,this.liveStateService=L,this.commonDbService=z,this.db=os(),this.presenceUser$=new ve(new Ik),this.documentPaths=null,this.inactivityTime=5*60*1e3,this.offlineInactivityTime=10*60*1e3,this.presenceUsers$=new ve([]),this.presenceUsersSubscription=null,this.includeSelf$=new ve(!0),this.userIdleStateDetectionSubscription=null,this.userOfflineStateDetectionSubscription=null;try{this.loggingService.log("%c[WB] Creating CLASS: PresenceService","color: blue;"),this.databaseService.getDb().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{W&&(this.db=W,this.getUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnUserDbConnectionStateChange().subscribe(()=>{},ee=>{this.loggingService.catch("Error in PresenceService constructor updateOnUserDbConnectionStateChange: ",ee)}),this.updateOnDatabaseDisconnect().subscribe(()=>{},ee=>{this.loggingService.catch("Error in PresenceService constructor updateOnDatabaseDisconnect: ",ee)}),this.updateOnDocumentFocusChange(),this.updateOnAllowedFeatureListChange())},W=>{this.loggingService.catch("Error in PresenceService constructor: ",W)}),this.authService.addPreSignOutFuction("presence-signout",this.signOutUser.bind(this)),this.presenceUsers$.pipe(wi()).subscribe(([W,ee])=>{try{ee?.length>=0&&this.analyticsService.updateDefaultProperties({presenceUsersCount:ee?.length}),sessionStorage.getItem(j.SESSION_STORAGE.VELT_PRESENCE_MULTIPLE_USERS_DETECTED)||ee?.length>1&&W.length!==ee.length&&(this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_MULTIPLE_USERS_DETECTED,{totalUsers:ee.length,presenceSnippylyUserIds:ee.map(Ce=>Ce.userSnippylyId),presenceClientUserIds:ee.map(Ce=>Ce.userId)}),sessionStorage.setItem(j.SESSION_STORAGE.VELT_PRESENCE_MULTIPLE_USERS_DETECTED,"true"));let me=this.authService.getUser();me&&!W?.some(Ce=>Ce.userId===me.userId)&&ee?.some(Ce=>Ce.userId===me.userId)&&this.presenceActionsService?.onMultipleUsersOnline({users:ee})}catch(me){this.loggingService.catch("Error in presenceUsers$ pairwise subscription: ",me)}}),this.authService.getUser$().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{W?(this.detectUserIdleState(),this.detectUserOfflineState()):(this.unsubscribeUserIdleStateDetectionSubscription(),this.unsubscribeUserOfflineStateDetectionSubscription())}),this.presenceUser$.subscribe(W=>{try{W?.onlineStatus&&this.presenceActionsService?.onUserStateChange({user:JSON.parse(JSON.stringify(W)),state:W?.onlineStatus})}catch(ee){this.loggingService.catch("Error in presenceUser$ subscription: ",ee)}},W=>{this.loggingService.catch("Error in presenceUser$ subscribe: ",W)}),this.domService.onNetworkStatusChange$().subscribe(W=>{try{!W&&this.presenceUser$?.value?.onlineStatus&&this.presenceActionsService?.onUserStateChange({user:T(I({},JSON.parse(JSON.stringify(this.presenceUser$.value))),{onlineStatus:j.PRESENCE_STATUS_OFFLINE}),state:j.PRESENCE_STATUS_OFFLINE})}catch(ee){this.loggingService.catch("Error in domService.onNetworkStatusChange$ subscription: ",ee)}},W=>{this.loggingService.catch("Error in domService.onNetworkStatusChange$ subscribe: ",W)})}catch(W){this.loggingService.catch("Error in PresenceService constructor: ",W)}}setPresenceActionsService(e){try{this.presenceActionsService=e}catch(t){this.loggingService.catch("Error in setPresenceActionsService: ",t)}}detectUserIdleState(){try{this.unsubscribeUserIdleStateDetectionSubscription();let e=!1;this.userIdleStateDetectionSubscription=this.domService.onWindowPointerMove$().pipe(Zh(2e3),on(()=>{this.presenceUser$.value&&e&&(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),e=!1)}),cr(this.inactivityTime),on(()=>{this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isUserIdle:!0}),e=!0})).subscribe()}catch(e){this.loggingService.catch("Error in detectUserIdleState: ",e)}}detectUserOfflineState(){try{this.unsubscribeUserOfflineStateDetectionSubscription();let e=!1;this.userOfflineStateDetectionSubscription=this.domService.onWindowPointerMove$().pipe(Zh(2e3),cr(this.offlineInactivityTime),on(()=>{this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_OFFLINE,{isUserIdle:!0}),e=!0})).subscribe()}catch(e){this.loggingService.catch("Error in detectUserOfflineState: ",e)}}unsubscribeUserIdleStateDetectionSubscription(){try{this.userIdleStateDetectionSubscription&&(this.userIdleStateDetectionSubscription.unsubscribe(),this.userIdleStateDetectionSubscription=null)}catch(e){this.loggingService.catch("Error in unsubscribeUserIdleStateDetectionSubscription: ",e)}}unsubscribeUserOfflineStateDetectionSubscription(){try{this.userOfflineStateDetectionSubscription&&(this.userOfflineStateDetectionSubscription.unsubscribe(),this.userOfflineStateDetectionSubscription=null)}catch(e){this.loggingService.catch("Error in unsubscribeUserOfflineStateDetectionSubscription: ",e)}}getUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&this.setPresenceUser(e)},e=>{this.loggingService.catch("Error in getUser: ",e)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e}),wi(),on(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths: ",e)})}getLocation(){this.docService.getLocation$().pipe(on(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation: ",e)})}getPresenceUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.presenceUser$.asObservable()}getPresenceUserValue(){return this.presenceUser$.value}getOnlineUsersOnCurrentDocument(e){return this.loggingService.log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(t=>!!t),he(t=>this.isFeatureAllowed({firebaseUser:t,users:[],filteredUsers:[]})),he(t=>t.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(r=>(t.featureAllowed=r,t))):se(t)),he(t=>t.featureAllowed?this.authService.isPlanExpired$().pipe(ce(r=>(t.featureAllowed=!r,t))):se(t)),he(t=>t.featureAllowed?se(t).pipe(he(r=>this.docService.getDocumentPaths$().pipe(ce(a=>(this.documentPaths=a,r.documentPaths=a,r)))),he(r=>this.getDataFromDocumentId(e).pipe(ce(a=>(r.users=a||[],I({},r))))),ce(r=>(e?e?.statuses?.length?r.filteredUsers=r?.users?.filter(a=>e?.statuses?.includes(a?.onlineStatus)):r.filteredUsers=r?.users?.slice():r.filteredUsers=this.filterOnlineUsers(r.users,r.firebaseUser),r)),he(r=>this.getIncludeSelf$().pipe(ce(a=>(a||(r.filteredUsers=r?.filteredUsers?.filter(s=>s?.userSnippylyId!==r.user?.userSnippylyId)),r)))),he(r=>r?.filteredUsers?se(r?.filteredUsers||[]):se([]))):se([])),Ct(pn))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.PRESENCE)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Presence feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{if(this.db=t,this.loggingService.log(this.db),this.configService?.getApiKey()&&this.documentPaths?.presence){let r=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allPresence",properties:{documentId:e?.documentId??this.documentPaths?.documentId,organizationId:e?.organizationId??this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[Vm("timestamp"),Um(r)]}}).pipe(Nn(a=>(this.loggingService.catch("Error in PresenceService getDataFromDocumentId: ",a),se(null))),ce(a=>a?.data),ce(a=>{let s=[];return a&&(s=Object.values(a).filter(c=>typeof c=="object")),s}))}else return se([])}))}filterOnlineUsers(e,t){this.loggingService.log("%c[WB] Calling FUNCTION: filterOnlineUsers","color: green;");try{let a=e.slice().filter(s=>{let c=Zp(s.timestamp);return s.userSnippylyId&&(s.onlineStatus===j.PRESENCE_STATUS_ONLINE||s.onlineStatus===j.PRESENCE_STATUS_AWAY)&&c<this.offlineInactivityTime});return this.presenceUsers$.next(a),a}catch(r){return this.loggingService.catch("Error in filterOnlineUsers:",r),[]}}enableIncludeSelf(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableIncludeSelf","color: green;"),this.includeSelf$.value===!0)return;this.includeSelf$.next(!0)}catch(e){this.loggingService.catch("Error in PresenceService enableIncludeSelf: ",e)}}disableIncludeSelf(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableIncludeSelf","color: green;"),this.includeSelf$.value===!1)return;this.includeSelf$.next(!1)}catch(e){this.loggingService.catch("Error in PresenceService disableIncludeSelf: ",e)}}getIncludeSelf$(){return this.includeSelf$.asObservable()}getIncludeSelf(){return this.includeSelf$.value}getPresenceUserFromExternalId(e){try{if(this.presenceUsers$.value&&this.presenceUsers$.value.length>0){let t=this.presenceUsers$.value.find(r=>r.userId===e);if(t)return t}return null}catch(t){return this.loggingService.catch("Error in getNameFromSnippylyId:",t),null}}getAnonymousAvatarImage(){return this.loggingService.log("%c[WB] Calling FUNCTION: getAnonymousAvatarImage","color: green;"),this.avatarService.generateUserImage()}updateCurrentPresenceUser(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateCurrentPresenceUser","color: green;");try{if(this.documentPaths?.presence&&e&&e.userId&&this.authService.isFeatureAllowed(Re.PRESENCE)){if(!e.isAnonymous){e.pageInfo=new ro,e?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(e.isTabAway=!1,e.isUserIdle=!1);let t=JSON.parse(JSON.stringify(e));this.authService.getUser()&&this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},t),{timestamp:this.timestamp})))})}this.presenceUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentPresenceUser:",t)}})}setCurrentPresenceUserStatus(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: setCurrentPresenceUserStatus","color: green;");try{this.loggingService.log(e);let r=this.presenceUser$.value;if(r.onlineStatus!==e){this.presenceUsersSubscription&&this.presenceUsersSubscription?.unsubscribe();let a=r.onlineStatus,s=e;this.presenceUsersSubscription=this.getPresenceUsers$().pipe(Le(c=>!!c?.length),rt(1)).subscribe(c=>{c?.length>1&&this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_USER_STATUS_CHANGED,{oldStatus:a,newStatus:s,totalUsers:c?.length,presenceSnippylyUserIds:c?.map(p=>p.userSnippylyId),presenceClientUserIds:c?.map(p=>p.userId)})})}r.onlineStatus=e,t&&(r.isTabAway=t?.isTabAway,r.isUserIdle=t?.isUserIdle),e===j.PRESENCE_STATUS_ONLINE&&(r.isTabAway=!1,r.isUserIdle=!1),e===j.PRESENCE_STATUS_OFFLINE&&this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession(),this.updateCurrentPresenceUser(r)}catch(r){this.loggingService.catch("Error in setCurrentPresenceUserStatus:",r)}})}updateUserStatusOnDocumentChange(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let r=this.presenceUser$.value;if(r.onlineStatus=e,t?.presence&&r&&r.userId&&!r.isAnonymous&&this.authService.isFeatureAllowed(Re.PRESENCE)){let a=JSON.parse(JSON.stringify(r));this.commonDbService.updateData({feature:"presence",properties:{documentId:t?.documentId,organizationId:t?.organizationId,userId:r.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(a))})}}catch(r){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",r)}})}updateUserOnLocationChange(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.presenceUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths?.presence&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(Re.PRESENCE)){let r=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(r))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnUserDbConnectionStateChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnUserDbConnectionStateChange","color: green;");let e=Ai(this.db,".info/connected"),t=z6(e).pipe(ce(r=>r?j.PRESENCE_STATUS_ONLINE:j.PRESENCE_STATUS_OFFLINE));return ei(this.afAuth).pipe(Ka(1),he(r=>r?t:se(j.PRESENCE_STATUS_OFFLINE)),on(r=>this.setCurrentPresenceUserStatus(r)))}updateOnDocumentFocusChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDocumentFocusChange","color: green;");try{document&&document.addEventListener("visibilitychange",e=>{this.authService.getUser()&&(document.visibilityState==="hidden"?(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isTabAway:!0}),this.flockService.getFlockMode()&&this.flockService.setTabFocused(!1)):(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),this.flockService.getFlockMode()&&this.flockService.setTabFocused(!0)))}),window&&(window.addEventListener("focus",()=>{this.authService.getUser()&&(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),this.flockService.getFlockMode()&&this.flockService.setWindowFocused(!0))}),window.addEventListener("blur",()=>{this.authService.getUser()&&(document.visibilityState!=="hidden"&&this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isTabAway:!0}),this.flockService.getFlockMode()&&this.flockService.setWindowFocused(!1))}))}catch(e){this.loggingService.catch("Error in updateOnDocumentFocusChange:",e)}}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.presenceUser$.value,r=!1;if(e.featureAllowList.includes(Re.PRESENCE)?t?.onlineStatus!==j.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=j.PRESENCE_STATUS_ONLINE,r=!0):t?.onlineStatus!==j.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=j.PRESENCE_STATUS_OFFLINE,r=!0),r&&this.authService.getUser()&&this.documentPaths?.presence&&t&&t.userId&&!t.isAnonymous){let a=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(a))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.documentPaths?.presence&&e){let t=yield Lm(e,!0).catch(a=>null);if(!t)return;let{user:r}=t.claims;if(!r?.isAnonymous&&this.documentPaths?.presence){this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession();let a=`${this.documentPaths.presence}/${e.uid}`;this.commonDbService.setupOnDisconnect(a,{onlineStatus:j.PRESENCE_STATUS_OFFLINE,timestamp:this.timestamp}).catch(s=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",s)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}setPresenceUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setPresenceUser","color: green;");try{let t=this.presenceUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let r=e?.name?.split(" ");if(r&&r.length>0){let a=r[0],s=r.length>1?r[r.length-1]:null,c=s?s[0]:null;a&&(t.name=`${a} ${c?c+".":""}`)}this.updateCurrentPresenceUser(t)}catch(t){this.loggingService.catch("Error in setPresenceUser:",t)}}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths?.presence&&e?this.commonDbService.getData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0}}).then(a=>{a&&(this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession(),this.commonDbService.updateData({feature:"presence",errorCallback:s=>{r(s)},callback:()=>{t(null)},properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a?.data??{}),{timestamp:this.timestamp,onlineStatus:j.PRESENCE_STATUS_OFFLINE})))})),t(null)}).catch(a=>{this.loggingService.catch("Error in signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in signOutUser:",a),r(a)}})}setInactivityTime(e){try{this.inactivityTime=e,this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime}),this.detectUserIdleState()}catch(t){this.loggingService.catch("Error in setInactivityTime: ",t)}}getInactivityTime(){return this.inactivityTime}setOfflineInactivityTime(e){try{e>=this.inactivityTime?(this.offlineInactivityTime=e,this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_SET_CUSTOM_OFFLINE_INACTIVITY_TIMER,{offlineInactivityTime:this.offlineInactivityTime}),this.detectUserOfflineState()):this.loggingService.catch("Error in setOfflineInactivityTime: ","offline-inactivity-time value is less than inactivity-time.")}catch(t){this.loggingService.catch("Error in setOfflineInactivityTime: ",t)}}getOfflineInactivityTime(){return this.offlineInactivityTime}getPresenceUsers$(){return this.presenceUsers$.asObservable()}getPresenceUsers(){return this.presenceUsers$.value}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(J(et),J(ot),J(Be),J(Ve),J(Oi),J(_n),J(Cn),J(kt),J(jd),J(y),J(zc),J(Vi),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var x0=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D){this.analyticsService=e,this.configService=t,this.presenceService=r,this.docService=a,this.afAuth=s,this.iamService=c,this.domService=p,this.databaseService=g,this.authService=C,this.loggingService=E,this.commonDbService=D,this.cursorUser$=new ve(new p0),this.documentPaths=null,this.inactivityTime=2*60*1e3,this.allowedElementIds$=new ve([]),this.cursorTagAvailable$=new ve(!1),this.cursorTagAvailable=!1,this.cursorUsers$=new ve([]),this.loggingService.log("%c[WB] Creating CLASS: CursorService","color: blue;");try{this.checkCursorTagAvailable(),this.databaseService.getDb().pipe(Le(L=>!!L),he(L=>this.cursorTagAvailable$.pipe(Le(z=>!!z),rt(1),ce(()=>L))),rt(1)).subscribe(L=>{L&&this.cursorTagAvailable&&(this.getPresenceUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnDatabaseDisconnect().subscribe(()=>{},z=>{this.loggingService.catch("Error in CursorService constructor updateOnDatabaseDisconnect: ",z)}),this.addMouseMoveListener(),this.addScreenSizeChangeListener(),this.updateOnAllowedFeatureListChange())},L=>{this.loggingService.catch("Error in CursorService constructor getDb: ",L)}),this.cursorUsers$.pipe(wi()).subscribe(([L,z])=>{sessionStorage.getItem(j.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED)||z?.length>1&&L.length!==z.length&&(this.analyticsService.trackEvent(Z.Events.Cursor.CURSOR_MULTIPLE_USERS_DETECTED,{totalUsers:z.length,cursorSnippylyUserIds:z.map(W=>W.userSnippylyId),cursorClientUserIds:z.map(W=>W.userId)}),sessionStorage.setItem(j.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED,"true"))}),this.authService.addPreSignOutFuction("cursor-signout",this.signOutUser.bind(this))}catch(L){this.loggingService.catch("Error in CursorService constructor: ",L)}}checkCursorTagAvailable(){this.loggingService.log("%c[WB] Calling FUNCTION: checkCursorTagAvailable","color: green;");try{this.cursorTagAvailable=!!document.querySelector(j.TAGS.VELT_CURSOR)||!!document.querySelector(j.TAGS.SNIPPYLY_CURSOR),this.cursorTagAvailable$.next(this.cursorTagAvailable)}catch(e){this.loggingService.catch("Error in CursorService checkCursorTagAvailable: ",e)}}addScreenSizeChangeListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addScreenSizeChangeListener","color: green;");try{this.docService.getDocumentPaths$().pipe(Le(e=>!!e),he(e=>this.domService.getCurrentWindowSize$("CursorService addScreenSizeChangeListener").pipe(Le(t=>!!t)))).subscribe(e=>{this.setCurrentCursorUserScreenSize(e)},e=>{this.loggingService.catch("Error in addScreenSizeChangeListener getCurrentWindowSize: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addScreenSizeChangeListener: ",e)}}addMouseMoveListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addMouseMoveListener","color: green;");try{this.domService.onWindowPointerMove$().pipe(Zh(50)).subscribe(e=>{e&&this.setCurrentCursorUserPosition(e.pageX,e.pageY,this.domService.getTargetElementForCursorPosition(e,!0,!1,!1))},e=>{this.loggingService.catch("Error in addMouseMoveListener getCurrentMousePosition: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addMouseMoveListener: ",e)}}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;");try{this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e}),wi(),on(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getDocumentPaths: ",e)}}getLocation(){try{this.docService.getLocation$().pipe(on(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getLocation: ",e)}}getCursorUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getCursorUser","color: green;"),this.cursorUser$.asObservable()}getPresenceUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.presenceService.getPresenceUser().pipe(Le(e=>!!e),Nn(e=>se(e.code))).subscribe(e=>{this.setCursorUser(e)},e=>{this.loggingService.catch("Error in getPresenceUser: ",e)})}getLiveCursorsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveCursorsOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed({firebaseUser:e,users:[],filteredUsers:[]})),he(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(t=>(e.featureAllowed=t,e))):se(e)),he(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(ce(t=>(e.featureAllowed=!t,e))):se(e)),he(e=>!e.featureAllowed||e?.user?.isAnonymous?se([]):se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(ce(r=>(this.documentPaths=r,t.documentPaths=r,t)))),he(t=>this.getDataFromDocumentId().pipe(ce(r=>(t.users=r||[],I({},t))))),ce(t=>(t.filteredUsers=this.filterOnlineUsers(t.users,t.firebaseUser),t)),he(t=>t?.filteredUsers?.length?this.domService.getCurrentWindowSize$("CursorService getLiveCursorsOnCurrentDocument").pipe(ce(()=>t)):se(t)),ce(t=>(t?.filteredUsers?.forEach(r=>{this.calculateCursorUserPosition(r)}),t)),he(t=>t?.filteredUsers?se(t?.filteredUsers||[]):se([])))))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.CURSOR)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Cursor feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{if(this.configService?.getApiKey()&&this.documentPaths?.cursor){let r=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allCursors",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[Vm("timestamp"),Um(r)]}}).pipe(Nn(a=>(this.loggingService.catch("Error in CursorService getDataFromDocumentId: ",a),se(null))),ce(a=>a?.data),ce(a=>{let s=[];return a&&(s=Object.values(a).filter(c=>typeof c=="object")),s}))}else return se([])}))}calculateCursorUserPosition(e){try{if(e?.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r&&this.isElementInsideAllowedElements(r)){let a=r.getBoundingClientRect();a&&a.width&&a.height&&(e.position={top:a.top+a.height*e.targetElement.topPercentage/100,left:a.left+a.width*e.targetElement.leftPercentage/100})}}}}catch(t){this.loggingService.catch("Error in calculateCursorUserPosition:",t)}}filterOnlineUsers(e,t){try{let a=e.slice().filter(c=>{let p=Zp(c.timestamp);return c.userSnippylyId&&c.onlineStatus===j.PRESENCE_STATUS_ONLINE&&p<this.inactivityTime});this.cursorUsers$.next(a),a=a.filter(c=>c?.userSnippylyId!==t?.uid);let s=this.docService.getLocation();return s&&s.locationId?a=a.filter(c=>c.locationId===s.locationId):a=a.filter(c=>!c.locationId),a}catch(r){return this.loggingService.catch("Error in filterOnlineUsers:",r),[]}}setCursorUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorUser","color: green;");try{let t=this.cursorUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.comment="",this.authService.isFeatureAllowed(Re.PRESENCE)&&(t.onlineStatus=e?.onlineStatus),t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let r=this.domService.getCurrentWindowSizeValue();t.screenWidth=r?.screenWidth,t.screenHeight=r?.screenHeight,t.screenScrollHeight=r?.screenScrollHeight,this.updateCurrentCursorUser(t)}catch(t){this.loggingService.catch("Error in setCursorUser:",t)}}setCurrentCursorUserPosition(e,t,r){try{let a=this.cursorUser$.value;a?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(a.positionX=e,a.positionY=t,r?a.targetElement=r:a.targetElement=null,this.updateCurrentCursorUser(a))}catch(a){this.loggingService.catch("Error in setCurrentCursorUserPosition:",a)}}setCurrentCursorUserScreenSize(e){try{if(e.screenWidth!==0&&e.screenHeight!==0){let t=this.cursorUser$.value;t?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.screenScrollHeight=e.screenScrollHeight,this.updateCurrentCursorUser(t))}}catch(t){this.loggingService.catch("Error in setCurrentCursorUserScreenSize:",t)}}updateCurrentCursorUser(e){return Q(this,null,function*(){try{if(this.documentPaths&&e&&e.userId&&this.authService.isFeatureAllowed(Re.CURSOR)){if(!e.isAnonymous){e.pageInfo=new ro;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},t),{timestamp:this.timestamp})))})}this.cursorUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentCursorUser:",t)}})}updateUserStatusOnDocumentChange(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let r=this.cursorUser$.value;if(r.onlineStatus=e,t&&r&&r.userId&&!r.isAnonymous&&this.authService.isFeatureAllowed(Re.CURSOR)){let a=JSON.parse(JSON.stringify(r));this.commonDbService.updateData({feature:"cursor",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:r.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a),{timestamp:this.timestamp})))})}}catch(r){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",r)}})}updateUserOnLocationChange(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.cursorUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(Re.CURSOR)){let r=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},r),{timestamp:this.timestamp})))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.cursorUser$.value,r=!1;if(e.featureAllowList.includes(Re.CURSOR)?t?.onlineStatus!==j.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=j.PRESENCE_STATUS_ONLINE,r=!0):t?.onlineStatus!==j.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=j.PRESENCE_STATUS_OFFLINE,r=!0),r&&this.documentPaths&&t&&t.userId&&!t.isAnonymous){let a=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a),{timestamp:this.timestamp})))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.documentPaths&&e){let t=yield Lm(e,!0).catch(a=>null);if(!t)return;let{user:r}=t.claims;if(!r?.isAnonymous&&this.documentPaths?.cursor){let a=`${this.documentPaths.cursor}/${e.uid}`;this.commonDbService.setupOnDisconnect(a,{onlineStatus:j.PRESENCE_STATUS_OFFLINE,comment:"",timestamp:this.timestamp}).catch(s=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",s)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths&&e?this.commonDbService.getData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e.uid,skipFirestore:!0}}).then(a=>{a&&this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.uid,skipFirestore:!0},callback:()=>{t(null)},data:JSON.parse(JSON.stringify(T(I({},a?.data??{}),{timestamp:this.timestamp,onlineStatus:j.PRESENCE_STATUS_OFFLINE})))}),t(null)}).catch(a=>{this.loggingService.catch("Error in signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in signOutUser:",a),r(a)}})}setInactivityTime(e){this.inactivityTime=e,this.analyticsService.trackEvent(Z.Events.Cursor.CURSOR_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime})}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in CursorService isElementInsideAllowedElements: ",t),!1}}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(J(et),J(kt),J(Hl),J(ot),J(Oi),J(_n),J(Be),J(Cn),J(Ve),J(y),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var i9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: CursorElement","color: blue;"),this.getLiveCursorsOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.getOnlineUsersOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.setInactivityTime=this._setInactivityTime,this.allowedElementIds=this._allowedElementIds}_getOnlineUsersOnCurrentDocument(){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;");try{return this.trackEvent(Z.Events.Cursor.GET_LIVE_CURSORS_ON_CURRENT_DOCUMENT_TRIGGERED),this.getService(x0).getLiveCursorsOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getOnlineUsersOnCurrentDocument: ",o),se(null)}}_setInactivityTime(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setInactivityTime","color: green;");try{this.trackEvent(Z.Events.Cursor.SET_INACTIVITY_TIME_TRIGGERED,{payload:{time:o}}),isNaN(o)?this.getService(y).catch("Error in setInactivityTime: ","Provided value is not a number."):this.getService(x0).setInactivityTime(o)}catch(n){this.getService(y).catch("Error in setInactivityTime: ",n)}}_allowedElementIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: allowedElementIds","color: green;");try{this.trackEvent(Z.Events.Cursor.ALLOWED_ELEMENT_IDS_TRIGGERED,{payload:{elementIds:o}}),this.getService(x0).setAllowedElementIds(o)}catch(n){this.getService(y).catch("Error in allowedElementIds: ",n)}}};var o9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: DocElement","color: blue;"),this.getDocumentMetadata=this._getDocumentMetadata}_getDocumentMetadata(){this.getService(y).log("%c[WB] Calling FUNCTION: getDocumentMetadata","color: green;");try{return this.trackEvent(Z.Events.Doc.GET_DOCUMENT_METADATA_TRIGGERED),this.getService(ot).getDocumentMetadata$()}catch(o){return this.getService(y).catch("Error in getDocumentMetadata: ",o),se(null)}}};var fr=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z){this.afAuth=e,this.analyticsService=t,this.authService=r,this.databaseService=a,this.docService=s,this.configService=c,this.domService=p,this.huddleUtilsService=g,this.functions=C,this.loggingService=E,this.notificationService=D,this.commonDbService=L,this.usersService=z,this.documentPaths=null,this.localStream$=new ve(null),this.peerConnectionMap={},this.localStream=new MediaStream,this.screenSharingStream=new MediaStream,this.screenSharingStream$=new ve(null),this.remoteStreamMap={},this.remoteStreamMap$=new ve(null),this.localStreamState$=new ve({}),this.peerConnectionStateMap={},this.peerConnectionStateMap$=new ve({}),this.hudleToolComponentId$=new ve(null),this.attendees$=new ve([]),this.invitees$=new ve([]),this.huddleJoined$=new ve(!1),this.userHuddleStartTime$=new ve(null),this.messages$=new ve([]),this.messagesPanelVisible$=new ve(!1),this.huddleOnCursorMode$=new ve(!1),this.flockModeOnAvatarClickEnabled$=new ve(!1),this.chatEnabled$=new ve(!0),this.serverFallback$=new ve(!0),this.huddleOnCursorModeByAttendeeId$=new ve({}),this.huddleCursorAvailableByAttendeeId$=new ve({}),this.remoteStreamsByUserId$=new ve({}),this.messagesSubscription=null,this.huddleJoined=!1,this.onAnswerConnectionIdHistory={},this.onOfferUidHistory={},this.senders={},this.db=os(),this.dbRefsRemoveOnDropCall=[],this.servers={iceServers:[{urls:["stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302"]}]},this.databaseService.getDb().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{try{W&&(this.db=W,this.isHuddleTagInstalled()&&this.getServerFallback()&&this.getTwilioIceServers(),this.getUser(),this.getDocumentPaths())}catch(ee){this.loggingService.catch("Error in HuddleService getDb:",ee)}},W=>{this.loggingService.catch("Error in HuddleService getDb subscription: ",W)}),this.docService.addPreDocumentIdChangeFunction("huddle-service",W=>Q(this,null,function*(){this.huddleJoined$.value&&(yield this.dropCall(),yield this.removeLocalStream(),yield this.removeAttendee(),this.attendees$.next([]))})),this.getAttendees().subscribe(),this.getInvitees().subscribe(),this.localStream$.subscribe(W=>{W&&(this.localStream=W)}),this.screenSharingStream$.subscribe(W=>{W&&(this.screenSharingStream=W)}),this.configService.getConfig$().subscribe(W=>{try{!W?.featureAllowList?.find(me=>me===Re.CURSOR)&&this.huddleOnCursorMode$.next(!1)}catch(ee){this.loggingService.catch("Error in HuddleService configService.getConfig$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService configService.getConfig$ subscription: ",W)}),this.attendees$.subscribe(W=>{try{if(W?.length){if(this.huddleOnCursorMode$?.value){let ee=this.huddleOnCursorModeByAttendeeId$.getValue()||{};W.forEach(me=>{ee[me.userSnippylyId]=!0}),this.huddleOnCursorModeByAttendeeId$.next(ee)}this.huddleJoined$?.value&&(W?.find(ee=>ee?.huddleOnCursorMode)?this.addCursorTag():this.removeCursorTag())}}catch(ee){this.loggingService.catch("Error in HuddleService attendees$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService attendees$ subscription: ",W)}),fn([this.huddleJoined$,this.huddleOnCursorMode$]).subscribe(([W,ee])=>{try{if(W){if(ee){let me=this.attendees$.getValue()||[],Ce=this.huddleOnCursorModeByAttendeeId$.getValue()||{};me.forEach(Ae=>{Ce[Ae.userSnippylyId]=!0}),document?.body?.setAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE,"true")}else this.huddleOnCursorModeByAttendeeId$.next({}),document?.body?.removeAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE);this.updateHuddleOnCursorMode()}else this.removeCursorTag(),document?.body?.removeAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE)}catch(me){this.loggingService.catch("Error in HuddleService huddleJoined$:",me)}},W=>{this.loggingService.catch("Error in HuddleService huddleJoined$ subscription: ",W)}),this.huddleOnCursorModeByAttendeeId$.subscribe(W=>{try{this.huddleJoined&&(Object.keys(W).length?this.addCursorTag():this.removeCursorTag())}catch(ee){this.loggingService.catch("Error in HuddleService huddleOnCursorModeByAttendeeId$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService huddleOnCursorModeByAttendeeId$ subscription: ",W)}),this.authService.addPreSignOutFuction("huddle-signout",this.signOutUser.bind(this))}isHuddleTagInstalled(){try{return!!document?.querySelector(`${j.TAGS.VELT_HUDDLE}`)||!!document?.querySelector(`${j.TAGS.SNIPPYLY_HUDDLE}`)}catch(e){return this.loggingService.catch("Error in HuddleService isHuddleTagInstalled:",e),!1}}getTwilioIceServers(){return Q(this,null,function*(){try{let t=(yield br(this.functions,Er({url:oi.cloudFunction.getIceServers,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:12e5})())?.data;t&&t?.iceServers&&(this.servers.iceServers=t.iceServers)}catch(e){this.loggingService.catch("Error in HuddleService getTwilioIceServers:",e)}})}getRemoteStream(){return this.loggingService.log("%c[WB] Calling FUNCTION: getRemoteStream","color: green;"),this.remoteStreamMap$.asObservable()}getPeerConnectionStateMap(){return this.loggingService.log("%c[WB] Calling FUNCTION: getPeerConnectionStateMap","color: green;"),this.peerConnectionStateMap$.asObservable()}getLocalStreamState(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLocalStreamState","color: green;"),this.localStreamState$.asObservable()}getScreenSharingStream(){return this.loggingService.log("%c[WB] Calling FUNCTION: getScreenSharingStream","color: green;"),this.screenSharingStream$.asObservable()}getAttendees(){return ei(this.afAuth).pipe(Le(e=>!!e),ce(e=>({firebaseUser:e})),he(e=>this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})))),he(e=>this.authService.getUser$().pipe(ce(t=>T(I({},e),{user:t})))),he(e=>ao(e.config,e.user,Re.HUDDLE)?se(T(I({},e),{allowed:!0})):(this.loggingService.warn("Huddle feature is not allowed."),se(T(I({},e),{allowed:!1})))),Ct((e,t)=>e?.allowed===t?.allowed),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>(this.documentPaths=t,e)))),he(e=>e?.allowed?e?.user?.isAnonymous?se(null):this.documentPaths?.huddle?this.commonDbService.dbListener({feature:"allHuddleAttendees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(t=>t?.data),ce(t=>t?(this.attendees$.next(Object.values(t)),Object.values(t)):(this.attendees$.next([]),null))):se(null):se([])))}getInvitees(){try{return ei(this.afAuth).pipe(Le(e=>!!e),ce(e=>({firebaseUser:e})),he(e=>this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})))),he(e=>this.authService.getUser$().pipe(ce(t=>T(I({},e),{user:t})))),he(e=>ao(e.config,e.user,Re.HUDDLE)?se(T(I({},e),{allowed:!0})):(this.loggingService.warn("Huddle feature is not allowed."),se(T(I({},e),{allowed:!1})))),Ct((e,t)=>e?.allowed===t?.allowed),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>(this.documentPaths=t,e)))),he(e=>e?.allowed?e?.user?.isAnonymous?se(null):this.documentPaths?.huddle?this.commonDbService.dbListener({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(t=>t?.data),ce(t=>t?(this.invitees$.next(Object.values(t)),Object.values(t)):(this.invitees$.next([]),null))):se(null):se([])))}catch(e){return this.loggingService.catch("Error in HuddleService getInvitees:",e),se([])}}clearHuddleInvitees(){try{this.documentPaths?.huddle&&this.commonDbService.deleteData({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in HuddleService clearHuddleInvitees:",e)}}getUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&(this.user=e)},e=>{this.loggingService.catch("Error in getUser: ",e)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths: ",e)})}setHuddleToolComponentId(e){this.hudleToolComponentId$.next(e||null)}getHuddleToolComponentId(){return this.hudleToolComponentId$.asObservable()}joinHuddle(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: joinHuddle","color: green;"),this.documentPaths?.huddle?(this.initialHuddleType=e,this.huddleJoined=!0,this.huddleJoined$.next(!0),this.initLocalStreams(),this.huddle=Ai(this.db,this.documentPaths?.huddle),this.iceCandidates=Ai(this.db,`${this.documentPaths?.huddle}/iceCandidates`),this.connections=Ai(this.db,`${this.documentPaths?.huddle}/connections`),this.attendees=Ai(this.db,`${this.documentPaths?.huddle}/attendees`),this.messages=Ai(this.db,`${this.documentPaths?.huddle}/messages`),this.setHuddleListener(),this.addAttendee(),this.callExistingAttendees(),this.userHuddleStartTime$.next(new Date().getTime())):this.loggingService.catch("Error in joinHuddle: documentPaths not found")}catch(t){this.loggingService.catch("Error in HuddleService joinHuddle:",t)}})}initLocalStreams(){try{if(!this.localStream$?.value?.getTracks()?.length){let e=new MediaStream([this.silence(),this.black()]);this.localStream$.next(e)}if(!this.screenSharingStream$?.value?.getTracks()?.length){let e=new MediaStream([this.black()]);this.screenSharingStream$.next(e)}}catch(e){this.loggingService.catch("Error in HuddleService initLocalStreams:",e)}}setHuddleListener(){this.loggingService.log("%c[WB] Calling FUNCTION: setHuddleListener","color: green;"),jp(this.connections,e=>{try{if(e.exists()){let t=e.val();Object.values(t).forEach(a=>{let s=Object.values(a);if(s&&s.length>0){let p=s[0]?.connectionId;this.onHuddleSnapshot(p,a)}}),Object.keys(this.remoteStreamMap).forEach(a=>Q(this,null,function*(){t[a]||(this.remoteStreamMap[a]&&Object.values(this.remoteStreamMap[a]).forEach(s=>{s.getTracks().forEach(c=>{c.stop()})}),delete this.remoteStreamMap[a],yield this.removeIceCandidates(a))})),this.remoteStreamMap$.next(this.remoteStreamMap)}else Object.keys(this.remoteStreamMap).forEach(t=>Q(this,null,function*(){Object.values(this.remoteStreamMap[t]).forEach(r=>{r.getTracks().forEach(a=>{a.stop()})}),yield this.removeIceCandidates(t)})),this.remoteStreamMap={},this.remoteStreamMap$.next(this.remoteStreamMap)}catch(t){this.loggingService.catch("Error in HuddleService setHuddleLister onValue:",t)}}),BV(this.iceCandidates).subscribe(e=>{try{e.event==="child_added"&&this.onIceCandidateSnapshot(e.snapshot)}catch(t){this.loggingService.catch("Error in HuddleService iceCandidates stateChanges:",t)}}),BV(this.attendees).subscribe(e=>{try{if(e.event==="child_removed"){let t=e?.snapshot?.val();if(t){delete this.onOfferUidHistory[t?.userSnippylyId];let r=this.getCombinedId(this.user.userSnippylyId,t?.userSnippylyId);delete this.onAnswerConnectionIdHistory[r],this.closeConnection(r)}}}catch(t){this.loggingService.catch("Error in HuddleService iceCandidates stateChanges:",t)}}),this.messagesSubscription&&this.messagesSubscription.unsubscribe(),this.messagesSubscription=new Ut(e=>{let t=jp(this.messages,r=>e.next(r),r=>e.error(r));return()=>t()}).pipe(he(e=>this.usersService.getUserById$().pipe(ce(()=>e))),he(e=>{if(e.exists()){let t=e.val();return Zi(this.huddleUtilsService.resolveUsersFromHuddleMessages(Object.values(t||{})))}return se([])}),Nn(e=>(this.loggingService.catch("Error in HuddleService messages onValue:",e),se([])))).subscribe(e=>{this.messages$.next(e)})}onHuddleSnapshot(e,t){try{this.loggingService.log("%c[WB] Calling FUNCTION: onHuddleSnapshot","color: green;"),t.offerData&&!t.answerData&&t.offerData.from!==this.user.userSnippylyId&&t.offerData.to===this.user.userSnippylyId&&!(e in this.peerConnectionMap)&&!this.onOfferUidHistory[t.offerData.from]?(this.loggingService.log("offer received"),this.loggingService.log(t),this.onOfferUidHistory[t.offerData.from]=!0,this.onOffer(e,t.offerData)):t.answerData&&t.answerData.from!==this.user.userSnippylyId&&t.answerData.to===this.user.userSnippylyId&&this.peerConnectionMap[e]&&this.peerConnectionMap[e]?.connectionState!=="connected"&&!this.onAnswerConnectionIdHistory[e]&&(this.loggingService.log("answer received"),this.loggingService.log(t),this.onAnswerConnectionIdHistory[e]=!0,this.onAnswer(e,t.answerData))}catch(r){this.loggingService.catch("Error in HuddleService onHuddleSnapshot:",r)}}onIceCandidateSnapshot(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: onIceCandidateSnapshot","color: green;"),this.loggingService.log("ice candidate received");let t=e.val(),r=t.connectionId;t?.from!==this.user.userSnippylyId&&r in this.peerConnectionMap&&this.onIceCandidateChange(r,t)}catch(t){this.loggingService.catch("Error in HuddleService onIceCandidateSnapshot:",t)}}onOffer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: onOffer","color: green;"),this.createPeerConnection(e,t.from)){this.addLocalStreamToPeerConnection(e,!0);let a=t.offer;yield this.setRemoteDescription(e,a),yield this.sendAnswer(e,t.from)}}catch(r){this.loggingService.catch("Error in HuddleService onOffer:",r)}})}sendAnswer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendAnswer","color: green;"),this.loggingService.log(e),this.documentPaths?.huddle&&e){let r=yield this.peerConnectionMap[e].createAnswer();yield this.setLocalDescription(e,r);let s={answer:{type:r.type,sdp:r.sdp},from:this.user.userSnippylyId,connectionId:e,to:t},c=Ai(this.db,`${this.documentPaths?.huddle}/connections/${e}`);this.dbRefsRemoveOnDropCall.push({type:"connection",dbRef:c}),yield q6(c,{answerData:s}),nl(c).remove()}else this.loggingService.catch("Error in sendAnswer: documentPaths not found")}catch(r){this.loggingService.catch("Error in HuddleService onHuddleSnapshot:",r)}})}onAnswer(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onAnswer","color: green;");let r=t.answer;yield this.setRemoteDescription(e,r)}catch(r){this.loggingService.catch("Error in HuddleService onAnswer:",r)}})}onIceCandidateChange(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onIceCandidateChange","color: green;");let r=t.candidate;this.loggingService.log("onIceCandidateChange",r),yield this.peerConnectionMap[e].addIceCandidate(new RTCIceCandidate(r))}catch(r){this.loggingService.catch("Error in HuddleService onIceCandidateChange:",r)}})}setRemoteDescription(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setRemoteDescription","color: green;"),yield this.peerConnectionMap[e].setRemoteDescription(new RTCSessionDescription(t))}catch(r){this.loggingService.catch("Error in HuddleService setRemoteDescription:",r)}})}addAttendee(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: addAttendee","color: green;"),this.documentPaths?.huddle&&this.user?.userSnippylyId){let e=T(I({},this.user),{timestamp:this.timestamp,streamMetadata:{webcam:this.localStream?.id,screen:this.screenSharingStream?.id},initialHuddleType:this.initialHuddleType,huddleOnCursorMode:this.huddleOnCursorMode$?.value});e=this.huddleUtilsService.formatHuddleAttendeeData(e);let t=Ai(this.db,`${this.documentPaths?.huddle}/attendees/${this.user.userSnippylyId}`);yield iv(t,JSON.parse(JSON.stringify(e))),this.dbRefsRemoveOnDropCall.push({type:"attendee",dbRef:t}),nl(t).remove(),yield this.updateUserHuddleState()}else this.loggingService.catch("Error in addAttendee: documentPaths not found")}catch(e){this.loggingService.catch("Error in HuddleService addAttendee:",e)}})}callExistingAttendees(){try{this.loggingService.log("%c[WB] Calling FUNCTION: callExistingAttendees","color: green;"),kne(this.attendees).pipe(rt(1)).subscribe(e=>{e&&e.length>1?(e.forEach(t=>{t.userSnippylyId!==this.user.userSnippylyId&&!this.onOfferUidHistory[t.userSnippylyId]&&(this.loggingService.log("calling"),this.loggingService.log(t),this.initOffer(t.userSnippylyId))}),this.addLocalStreamToAllPeerConnections()):this.deleteMessages()})}catch(e){this.loggingService.catch("Error in HuddleService callExistingAttendees:",e)}}addLocalStreamToAllPeerConnections(){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: addLocalStreamToAllPeerConnections","color: green;"),Object.keys(this.senders).forEach(e=>{this.loggingService.log(this.senders[e]),this.localStream.getTracks().forEach(t=>{this.loggingService.log(t),this.senders[e].replaceTrack(t)})})}catch(e){this.loggingService.catch("Error in HuddleService addLocalStreamToAllPeerConnections:",e)}})}initOffer(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: initOffer","color: green;");let t=this.createPeerConnection(null,e);t&&(this.addLocalStreamToPeerConnection(t,!1),yield this.sendOffer(t,e))}catch(t){this.loggingService.catch("Error in HuddleService initOffer:",t)}})}createPeerConnection(e,t){try{return this.loggingService.log("%c[WB] Calling FUNCTION: createPeerConnection","color: green;"),e||(e=this.getCombinedId(this.user?.userSnippylyId,t)),e in this.peerConnectionMap?null:(this.loggingService.log("creating pc"),this.peerConnectionMap[e]=new RTCPeerConnection(this.servers),this.peerConnectionMap[e].onicecandidateerror=r=>{this.loggingService.log("Huddle: onicecandidateerror",r)},this.peerConnectionMap[e].onicecandidate=r=>{if(this.loggingService.log("pc onicecandidate"),r.candidate){let a={candidate:r.candidate.toJSON(),from:this.user.userSnippylyId,connectionId:e},s=Lne(this.iceCandidates,a);this.dbRefsRemoveOnDropCall.push({type:"iceCandidate",dbRef:s}),nl(s).remove()}},this.peerConnectionMap[e].ontrack=r=>{this.loggingService.log("pc ontrack"),this.onTrack(e,r)},this.peerConnectionMap[e].onconnectionstatechange=r=>Q(this,null,function*(){this.logStatuses("onconnectionstatechange",e,r),this.peerConnectionMap[e].connectionState==="failed"&&(this.removeConnection(e),this.closeConnection(e),this.checkForRemovingAttendee())}),this.peerConnectionMap[e].onicegatheringstatechange=r=>Q(this,null,function*(){this.logStatuses("onicegatheringstatechange",e,r)}),this.peerConnectionMap[e].onsignalingstatechange=r=>Q(this,null,function*(){this.logStatuses("onsignalingstatechange",e,r)}),this.peerConnectionMap[e].oniceconnectionstatechange=r=>Q(this,null,function*(){this.loggingService.log("pc oniceconnectionstatechange"),this.logStatuses("oniceconnectionstatechange",e,r);try{this.peerConnectionStateMap[e]=this.peerConnectionMap[e].iceConnectionState,this.peerConnectionStateMap$.next(this.peerConnectionStateMap),this.peerConnectionMap[e]?.iceConnectionState==="connected"?(this.loggingService.log("connected"),this.updateTransceiverDirection(e)):this.peerConnectionMap[e]?.iceConnectionState==="disconnected"?this.loggingService.log("Disconnected"):this.peerConnectionMap[e].iceConnectionState==="closed"&&(this.loggingService.log("Closed"),this.closeConnection(e))}catch(a){this.loggingService.catch("Error in HuddleService oniceconnectionstatechange:",a)}}),this.peerConnectionMap[e].onnegotiationneeded=()=>{this.loggingService.log("pc onnegotiationneeded"),this.logStatuses("onnegotiationneeded",e)},e)}catch(r){return this.loggingService.catch("Error in HuddleService createPeerConnection:",r),""}}logStatuses(e,t,r){let a={};["connectionState","iceConnectionState","iceGatheringState","signalingState"].forEach(c=>{a[c]=this.peerConnectionMap[t][c]}),this.loggingService.log("Huddle: logStatues: ",t,e,a,r,this.peerConnectionMap[t])}checkForRemovingAttendee(){return Q(this,null,function*(){try{this.documentPaths?.huddle&&this.user?.userSnippylyId&&(Object.keys(this.peerConnectionMap)?.length||(this.commonDbService.deleteData({feature:"huddleAttendee",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0}}),this.joinHuddle(this.initialHuddleType)))}catch(e){this.loggingService.catch("Error in HuddleService checkForRemovingAttendee:",e)}})}closeConnection(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: closeConnection","color: green;"),this.peerConnectionMap[e]){let t=this.peerConnectionMap[e];t.getTransceivers()?.forEach(a=>{a.stop()}),t.getReceivers()?.forEach(a=>{a.track?.stop()}),t.close(),delete this.peerConnectionMap[e],delete this.onAnswerConnectionIdHistory[e],delete this.senders[e];let r=e.split("__").find(a=>a!==this.user?.userSnippylyId);r&&delete this.onOfferUidHistory[r]}}catch(t){this.loggingService.catch("Error in HuddleService closeConnection:",t)}}removeConnection(e){return Q(this,null,function*(){try{this.documentPaths?.huddle&&e&&this.commonDbService.deleteData({feature:"huddleConnection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e,skipFirestore:!0}})}catch(t){this.loggingService.catch("Error in HuddleService removeConnection:",t)}})}addLocalStreamToPeerConnection(e,t){try{this.loggingService.log("%c[WB] Calling FUNCTION: addLocalStreamToPeerConnection","color: green;"),t?(this.localStream.getTracks().forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.localStream)}),this.screenSharingStream?.getVideoTracks()?.forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.screenSharingStream)})):(this.localStream.getTracks().forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.localStream)}),this.screenSharingStream?.getVideoTracks()?.forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.screenSharingStream)}))}catch(r){this.loggingService.catch("Error in HuddleService addLocalStreamToPeerConnection:",r)}}updateTransceiverDirection(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateTransceiverDirection","color: green;");let t=this.peerConnectionMap[e].getTransceivers();this.loggingService.log(t),t.map(r=>{this.loggingService.log(r.currentDirection),r.currentDirection!=="sendrecv"&&(r.direction="sendrecv"),this.senders[e]=r.sender})}catch(t){this.loggingService.catch("Error in HuddleService updateTransceiverDirection:",t)}}generateKey(){this.loggingService.log("%c[WB] Calling FUNCTION: generateKey","color: green;");let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";for(let r=0;r<20;r++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}getCombinedId(e,t){try{return e.localeCompare(t)===-1?`${e}__${t}`:`${t}__${e}`}catch(r){return this.loggingService.catch("Error in HuddleService getCombinedId:",r),""}}sendOffer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendOffer","color: green;"),this.documentPaths?.huddle&&e){this.onOfferUidHistory[t]=!0;let r=yield this.peerConnectionMap[e].createOffer();yield this.setLocalDescription(e,r);let a={sdp:r.sdp,type:r.type};t||(t="all");let s={offer:a,from:this.user.userSnippylyId,connectionId:e,to:t},c=Ai(this.db,`${this.documentPaths?.huddle}/connections/${e}`);yield iv(c,{offerData:s}),this.dbRefsRemoveOnDropCall.push({type:"connection",dbRef:c}),nl(c).remove()}}catch(r){this.loggingService.catch("Error in HuddleService sendOffer:",r)}})}setLocalDescription(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setLocalDescription","color: green;"),yield this.peerConnectionMap[e].setLocalDescription(t)}catch(r){this.loggingService.catch("Error in HuddleService setLocalDescription:",r)}})}onTrack(e,t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: onTrack","color: green;"),this.remoteStreamMap[e]||(this.remoteStreamMap[e]={}),this.loggingService.log(t.receiver.track),t?.streams?.length){this.remoteStreamMap[e][t.streams[0].id]=t.streams[0];let r=e.split("__").find(s=>s!==this.user?.userSnippylyId),a=this.attendees$.value?.find(s=>s?.userSnippylyId===r);a&&(a?.streamMetadata?.webcam===t.streams[0].id&&(this.remoteStreamMap[e].webcam=t.streams[0]),a?.streamMetadata?.screen===t.streams[0].id&&(this.remoteStreamMap[e].screen=t.streams[0])),this.remoteStreamMap$.next(this.remoteStreamMap)}}catch(r){this.loggingService.catch("Error in HuddleService onTrack:",r)}}toggleScreenSharing(e){return Q(this,null,function*(){try{if(e)this.screenSharingStream=yield navigator.mediaDevices?.getDisplayMedia({video:!0}),Object.keys(this.peerConnectionMap).forEach(t=>{this.peerConnectionMap[t].getSenders().find(s=>s?.track?.kind==this.screenSharingStream?.getVideoTracks()[0].kind)?.replaceTrack(this.screenSharingStream?.getVideoTracks()[0])});else{let t=this.localStream;Object.keys(this.peerConnectionMap).forEach(r=>{this.peerConnectionMap[r].getSenders().find(c=>c?.track?.kind==t.getVideoTracks()[0].kind)?.replaceTrack(t.getVideoTracks()[0])}),this.screenSharingStream?.getTracks().forEach(r=>r.stop())}}catch(t){this.loggingService.catch("Error in HuddleService toggleScreenSharing:",t)}})}setLocalStream(e){return Q(this,null,function*(){try{if(this.localStream=new MediaStream([this.silence(),this.black()]),e?.audio||e?.video){let t=e,r=kc();e?.audio&&(e?.audio instanceof Object?t.audio=T(I({},e?.audio),{deviceId:r?.selectedAudioDevice?.deviceId}):t.audio={deviceId:r?.selectedAudioDevice?.deviceId}),e?.video&&(e?.video instanceof Object?t.video=T(I({},e?.video),{deviceId:r?.selectedVideoDevice?.deviceId}):t.video={deviceId:r?.selectedVideoDevice?.deviceId});let a=yield navigator.mediaDevices.getUserMedia(t);a?.getAudioTracks()?.length&&(this.localStream.getAudioTracks().forEach(s=>this.localStream.removeTrack(s)),a.getAudioTracks().forEach(s=>this.localStream.addTrack(s))),a?.getVideoTracks()?.length&&(this.localStream.getVideoTracks().forEach(s=>this.localStream.removeTrack(s)),a.getVideoTracks().forEach(s=>this.localStream.addTrack(s)))}this.localStream$.next(this.localStream)}catch(t){this.loggingService.catch("Error in HuddleService setLocalStream:",t)}})}setScreenSharingStream(){return Q(this,null,function*(){try{let e=yield navigator.mediaDevices?.getDisplayMedia({video:!0});e&&this.screenSharingStream$.next(e)}catch(e){this.loggingService.catch("Error in HuddleService setScreenSharingStream:",e)}})}removeLocalStream(){return Q(this,null,function*(){try{this.localStream$?.value&&(this.localStream$.value.getTracks().forEach(t=>{t.stop()}),this.localStream$.next(null))}catch(e){this.loggingService.catch("Error in HuddleService removeLocalStream:",e)}})}toggleLocalStreamAudio(e){return Q(this,null,function*(){try{let t=this.localStream$.value;if(t){let r=t.getAudioTracks()[0];if(r.enabled&&!e)r.stop(),t.getAudioTracks()?.forEach(a=>{t.removeTrack(a)}),t.addTrack(this.silence()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_AUDIO_MUTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)});else{let a=kc(),s=yield navigator.mediaDevices.getUserMedia({audio:{deviceId:a?.selectAudioDevice?.deviceId}});s&&(t.getAudioTracks()?.forEach(c=>{t.removeTrack(c)}),s.getAudioTracks()?.forEach(c=>{t.addTrack(c)}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_AUDIO_UNMUTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(c=>c?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(c=>c?.userId)}))}Object.keys(this.peerConnectionMap).forEach(a=>{this.peerConnectionMap[a].getSenders().find(p=>p?.track?.kind==t?.getAudioTracks()[0].kind)?.replaceTrack(t?.getAudioTracks()[0])}),this.updateUserHuddleState()}}catch(t){this.loggingService.catch("Error in HuddleService toggleLocalStreamAudio:",t)}})}toggleLocalStreamVideo(e){return Q(this,null,function*(){try{let t=this.localStream$.value;if(t){let r=t.getVideoTracks()[0];if(r.enabled&&!e)r.stop(),t.getVideoTracks()?.forEach(a=>{t.removeTrack(a)}),t.addTrack(this.black()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_VIDEO_TURNED_OFF,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)});else{let a=kc(),s=yield navigator.mediaDevices.getUserMedia({video:{deviceId:a?.selectedVideoDevice?.deviceId}});s&&(t.getVideoTracks()?.forEach(c=>{t.removeTrack(c)}),s.getVideoTracks()?.forEach(c=>{t.addTrack(c)}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_VIDEO_TURNED_ON,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(c=>c?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(c=>c?.userId)}))}Object.keys(this.peerConnectionMap).forEach(a=>{this.peerConnectionMap[a].getSenders().find(p=>p?.track?.kind==t?.getVideoTracks()[0].kind)?.replaceTrack(t?.getVideoTracks()[0])}),this.updateUserHuddleState()}}catch(t){this.loggingService.catch("Error in HuddleService toggleLocalStreamVideo:",t)}})}toggleLocalScreenSharing(){return Q(this,null,function*(){try{let e=this.screenSharingStream;if(e){if(e.getVideoTracks()[0].enabled)this.stopScreenSharingStream();else{let r=yield navigator.mediaDevices?.getDisplayMedia({video:!0});r&&(e.getVideoTracks()?.forEach(a=>{e.removeTrack(a)}),r.getVideoTracks()?.forEach(a=>{e.addTrack(a),a.onended=()=>{this.stopScreenSharingStream(),this.updateScreenSharingTracksToPeers(),this.updateUserHuddleState()}})),this.screenSharingStream$.next(e),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_SCREENSHARING_STARTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)})}this.updateScreenSharingTracksToPeers(),this.updateUserHuddleState()}}catch(e){this.loggingService.catch("Error in HuddleService toggleLocalScreenSharing:",e)}})}stopScreenSharingStream(){return Q(this,null,function*(){let e=this.screenSharingStream;if(e){let t=e.getVideoTracks()[0];t.enabled&&(t.stop(),e.getVideoTracks()?.forEach(r=>{e.removeTrack(r)}),e.addTrack(this.black()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_SCREENSHARING_STOPPED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(r=>r?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(r=>r?.userId)}))}})}updateScreenSharingTracksToPeers(){return Q(this,null,function*(){Object.keys(this.peerConnectionMap).forEach(e=>{let r=this.peerConnectionMap[e].getSenders().filter(a=>a?.track?.kind==this.screenSharingStream?.getVideoTracks()[0].kind);r?.length>1&&r[1]?.replaceTrack(this.screenSharingStream?.getVideoTracks()[0])})})}dropCall(){return Q(this,null,function*(){try{this.messagesSubscription&&this.messagesSubscription.unsubscribe(),this.removeHuddleSessionData(),this.huddleJoined=!1,this.huddleJoined$.next(!1),this.peerConnectionMap&&Object.keys(this.peerConnectionMap).forEach(e=>{let t=this.peerConnectionMap[e];t.getTransceivers()?.forEach(r=>{r.stop()}),t.getSenders()?.forEach(r=>{r.track?.stop()}),t.getReceivers()?.forEach(r=>{r.track?.stop()}),t.close()}),this.peerConnectionMap={},this.dbRefsRemoveOnDropCall.forEach(e=>Q(this,null,function*(){yield W6(e.dbRef)})),this.onOfferUidHistory={},this.onAnswerConnectionIdHistory={},this.senders={},this.peerConnectionStateMap={},this.peerConnectionStateMap$.next(this.peerConnectionStateMap),this.localStream.getTracks().forEach(e=>{e.stop()}),this.screenSharingStream.getTracks().forEach(e=>{e.stop()}),this.localStream=new MediaStream([this.silence(),this.black()]),this.screenSharingStream=new MediaStream([this.black()]),this.localStream$.next(this.localStream),this.screenSharingStream$.next(this.screenSharingStream),this.localStreamState$.next({audioState:!1,videoState:!1,screenSharingState:!1}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_LEFT,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(e=>e?.userId)})}catch(e){this.loggingService.catch("Error in HuddleService dropCall:",e)}})}updateHuddleSessionData(e,t,r){try{let a=JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)||"{}");r?sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA,JSON.stringify(r)):(a[e]=t,sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA,JSON.stringify(a)))}catch(a){this.loggingService.catch("Error in HuddleService updateHuddleSessionData:",a)}}getHuddleSessionData(){try{return sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)?JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)):null}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleSessionData:",e),null}}removeHuddleSessionData(){try{sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)}catch(e){this.loggingService.catch("Error in HuddleService removeHuddleSessionData:",e)}}removeAttendee(){return Q(this,null,function*(){try{if(this.documentPaths?.huddle&&this.user.userSnippylyId){yield this.commonDbService.deleteData({feature:"huddleAttendee",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0}});return}else return}catch(e){return this.loggingService.catch("Error in HuddleService removeAttendee:",e),Promise.resolve(null)}})}updateUserHuddleState(){return Q(this,null,function*(){try{if(this.attendees&&this.user&&this.documentPaths?.huddle){let e=this.getAudioState(),t=this.getVideoState(),r=this.getScreenSharingState();this.localStreamState$.next({audioState:e,videoState:t,screenSharingState:r});let a={audioState:e,videoState:t,screenSharingState:r};yield this.commonDbService.setData({feature:"huddleAttendeeState",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0},data:a})}}catch(e){this.loggingService.catch("Error in HuddleService updateUserHuddleState:",e)}})}updateHuddleOnCursorMode(){return Q(this,null,function*(){try{if(this.attendees&&this.user&&this.documentPaths?.huddle){let e=Ai(this.db,`${this.documentPaths?.huddle}/attendees/${this.user.userSnippylyId}/huddleOnCursorMode`);yield iv(e,!!this.huddleOnCursorMode$.value)}}catch(e){this.loggingService.catch("Error in HuddleService updateHuddleOnCursorMode:",e)}})}getAudioState(){try{let e=this.localStream$.value;if(e){let t=e?.getAudioTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getAudioState:",e),!1}}getVideoState(){try{let e=this.localStream$.value;if(e){let t=e?.getVideoTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getVideoState:",e),!1}}getScreenSharingState(){try{let e=this.screenSharingStream;if(e){let t=e?.getVideoTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getVideoState:",e),!1}}removeIceCandidates(e){return Q(this,null,function*(){try{if(this.documentPaths?.huddle&&e){let t=yield this.commonDbService?.getData({feature:"allHuddleIceCandidates",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}});Object.keys(t).length>0&&Object.keys(t).forEach(r=>Q(this,null,function*(){t[r].connectionId===e&&this.commonDbService.deleteData({feature:"huddleIceCandidate",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:r,skipFirestore:!0}})}))}}catch(t){this.loggingService.catch("Error in HuddleService dropCall:",t)}})}get timestamp(){return this.commonDbService.getServerTimestamp()}silence(){try{let e=new AudioContext,t=e.createOscillator(),r=t.connect(e.createMediaStreamDestination());return t.start(),Object.assign(r.stream.getAudioTracks()[0],{enabled:!1})}catch(e){this.loggingService.catch("Error in HuddleService silence:",e)}}black({width:e=640,height:t=480}={}){try{let r=Object.assign(document.createElement("canvas"),{width:e,height:t});r.getContext("2d")?.fillRect(0,0,e,t);let a=r.captureStream();return Object.assign(a.getVideoTracks()[0],{enabled:!1})}catch(r){this.loggingService.catch("Error in HuddleService black:",r)}}getInitialHuddleType(){try{return this.initialHuddleType}catch(e){return this.loggingService.catch("Error in HuddleService getInitialHuddleType:",e),null}}getHuddleAttendees$(){try{return this.attendees$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleAttendees$:",e),se([])}}getHuddleAttendees(){try{return this.attendees$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleAttendees:",e),null}}getHuddleInvitees$(){try{return this.invitees$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleInvitees$:",e),se([])}}getHuddleInvitees(){try{return this.invitees$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleInvitees:",e),null}}getHuddleStartTime(){try{return this.userHuddleStartTime$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleStartTime:",e),null}}getTotalUserHuddleDuration(){try{return this.userHuddleStartTime$.value?new Date().getTime()-this.userHuddleStartTime$.value:null}catch(e){return this.loggingService.catch("Error in HuddleService gettotalUserHuddleDuration:",e),null}}inviteUsers(e){try{this.updateInvitees(e);let t={};t.notificationSource="huddleInvite",t.huddleInvitees=e,t.huddleType=this.getInitialHuddleType(),this.updateNotificationsDatabase(t)}catch(t){this.loggingService.catch("Error in HuddleService inviteUsers:",t)}}updateInvitees(e){try{if(this.documentPaths?.huddle){let t={};e.forEach(r=>{if(r?.email){let a=_t(r.email);t[a]=r}}),this.commonDbService.setData({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in HuddleService updateInvitees:",t)}}updateNotificationsDatabase(e={}){try{let t=I({notificationSource:"huddle"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in HuddleService updateNotificationsDatabase: ",t)}}getHuddleJoined$(){try{return this.huddleJoined$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleJoined$:",e),se(!1)}}getHuddleCursorAvailableByAttendeeId(){try{return this.huddleCursorAvailableByAttendeeId$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleCursorAvailableByAttendeeId:",e),null}}getHuddleCursorAvailableByAttendeeId$(){try{return this.huddleCursorAvailableByAttendeeId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleCursorAvailableByAttendeeId$:",e),se({})}}updateHuddleCursorAvailableByAttendeeId(e,t){try{let r=this.huddleCursorAvailableByAttendeeId$.value;r[e]=t,this.huddleCursorAvailableByAttendeeId$.next(r)}catch(r){this.loggingService.catch("Error in HuddleService updateCursorUserAvailableByUserId:",r)}}setRemoteStreamsByUserId(e){try{this.remoteStreamsByUserId$.next(e)}catch(t){this.loggingService.catch("Error in HuddleService setRemoteStreamsByUserId:",t)}}getRemoteStreamsByUserId$(){try{return this.remoteStreamsByUserId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getRemoteStreamsByUserId$:",e),se({})}}enableHuddleOnCursorMode(){try{this.huddleOnCursorMode$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableHuddleOnCursorMode:",e)}}disableHuddleOnCursorMode(){try{this.huddleOnCursorMode$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableHuddleOnCursorMode:",e)}}getHuddleOnCursorMode$(){try{return this.huddleOnCursorMode$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleOnCursorMode$:",e),se(!1)}}enableFlockModeOnAvatarClick(){try{this.flockModeOnAvatarClickEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableFlockModeOnAvatarClick:",e)}}disableFlockModeOnAvatarClick(){try{this.flockModeOnAvatarClickEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableFlockModeOnAvatarClick:",e)}}getFlockModeOnAvatarClick$(){try{return this.flockModeOnAvatarClickEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getFlockModeOnAvatarClick$:",e),se(!1)}}getFlockModeOnAvatarClick(){try{return this.flockModeOnAvatarClickEnabled$.value}catch(e){return this.loggingService.catch("Error in HuddleService getFlockModeOnAvatarClick:",e),!1}}enableChat(){try{this.chatEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableChat:",e)}}disableChat(){try{this.chatEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableChat:",e)}}getChatEnabled$(){try{return this.chatEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getChatEnabled$:",e),se(!1)}}getChatEnabled(){try{return this.chatEnabled$.value}catch(e){return this.loggingService.catch("Error in HuddleService getChatEnabled:",e),!1}}enableServerFallback(){try{if(this.serverFallback$.value===!0)return;this.serverFallback$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableServerFallback:",e)}}disableServerFallback(){try{if(this.serverFallback$.value===!1)return;this.serverFallback$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableServerFallback:",e)}}getServerFallback$(){try{return this.serverFallback$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getServerFallback$:",e),se(!1)}}getServerFallback(){try{return this.serverFallback$.value}catch(e){return this.loggingService.catch("Error in HuddleService getServerFallback:",e),!1}}getHuddleOnCursorModeByAttendeeId$(){try{return this.huddleOnCursorModeByAttendeeId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleOnCursorModeByAttendeeId$:",e),se({})}}toggleHuddleOnCursorModeByAttendeeId(e){try{let t=this.huddleOnCursorModeByAttendeeId$.value;t[e]?delete t[e]:t[e]=!0,this.huddleOnCursorModeByAttendeeId$.next(t)}catch(t){this.loggingService.catch("Error in HuddleService toggleHuddleOnCursorModeByAttendeeId:",t)}}addCursorTag(){try{if(!document.querySelector(`${j.TAGS.SNIPPYLY_CURSOR}`)){let e=document.createElement(j.TAGS.SNIPPYLY_CURSOR);e.setAttribute("snippyly-temporary","true"),document.body.appendChild(e)}}catch(e){this.loggingService.catch("Error in HuddleService addCursorTag:",e)}}removeCursorTag(){try{let e=document.querySelector(`${j.TAGS.SNIPPYLY_CURSOR}`);e?.hasAttribute("snippyly-temporary")&&e.remove()}catch(e){this.loggingService.catch("Error in HuddleService removeCursorTag:",e)}}sendMessage(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendMessage","color: green;"),this.documentPaths?.huddle&&this.user){let t=new yk;t.message=e,t.from=this.user,t.timestamp=this.timestamp,this.commonDbService.setData({feature:"huddleMessage",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:t.id,skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in HuddleService sendMessage:",t)}}getMessages$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessages$","color: green;"),this.messages$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getMessages$:",e),se([])}}deleteMessages(){try{this.loggingService.log("%c[WB] Calling FUNCTION: deleteMessages","color: green;"),this.documentPaths?.huddle&&this.commonDbService.deleteData({feature:"allHuddleMessages",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in HuddleService deleteMessages:",e)}}showMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: showMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService showMessagesPanel:",e)}}hideMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: hideMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService hideMessagesPanel:",e)}}toggleMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: toggleMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!this.messagesPanelVisible$.value)}catch(e){this.loggingService.catch("Error in HuddleService toggleMessagesPanel:",e)}}getMessagesPanelVisible$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessagesPanelVisible$","color: green;"),this.messagesPanelVisible$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getMessagesPanelVisible$:",e),se(!1)}}getMessagesPanelVisible(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessagesPanelVisible","color: green;"),this.messagesPanelVisible$.value}catch(e){return this.loggingService.catch("Error in HuddleService getMessagesPanelVisible:",e),!1}}signOutUser(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: signOutUser","color: green;"),this.huddleJoined$.value&&(yield this.dropCall(),yield this.removeLocalStream(),yield this.removeAttendee())}catch(t){this.loggingService.catch("Error in HuddleService signOutUser:",t)}})}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(et),J(Ve),J(Cn),J(ot),J(kt),J(Be),J(Lk),J(Wo),J(y),J(gn),J(dn),J(Mn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var r9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: HuddleElement","color: blue;"),this.enableCursorMode=this._enableCursorMode,this.disableCursorMode=this._disableCursorMode,this.enableChat=this._enableChat,this.disableChat=this._disableChat,this.enableFlockModeOnAvatarClick=this._enableFlockModeOnAvatarClick,this.disableFlockModeOnAvatarClick=this._disableFlockModeOnAvatarClick}_enableCursorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableCursorMode","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED),this.getService(fr).enableHuddleOnCursorMode()}catch(o){this.getService(y).catch("Error in enableCursorMode: ",o)}}_disableCursorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableCursorMode","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED),this.getService(fr).disableHuddleOnCursorMode()}catch(o){this.getService(y).catch("Error in disableCursorMode: ",o)}}_enableChat(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableChat","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_CHAT_TRIGGERED),this.getService(fr).enableChat()}catch(o){this.getService(y).catch("Error in enableChat: ",o)}}_disableChat(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableChat","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_CHAT_TRIGGERED),this.getService(fr).disableChat()}catch(o){this.getService(y).catch("Error in disableChat: ",o)}}_enableFlockModeOnAvatarClick(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableFlockModeOnAvatarClick","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED),this.getService(fr).enableFlockModeOnAvatarClick()}catch(o){this.getService(y).catch("Error in enableFlockModeOnAvatarClick: ",o)}}_disableFlockModeOnAvatarClick(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableFlockModeOnAvatarClick","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED),this.getService(fr).disableFlockModeOnAvatarClick()}catch(o){this.getService(y).catch("Error in disableFlockModeOnAvatarClick: ",o)}}};var a9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: LiveStateElement","color: blue;"),this.getLiveStateData$=this._getLiveStateData,this.getLiveStateData=this._getLiveStateData,this.setLiveStateData=this._setLiveStateData,this.enableSingleEditorMode=this._enableSingleEditorMode,this.disableSingleEditorMode=this._disableSingleEditorMode,this.isUserEditor$=this._isUserEditor,this.isUserEditor=this._isUserEditor,this.getEditor=this._getEditor,this.setUserAsEditor=this._setUserAsEditor,this.resetUserAccess=this._resetUserAccess,this.singleEditorModeContainerIds=this._singleEditorModeContainerIds,this.enableAutoSyncState=this._enableAutoSyncState,this.disableAutoSyncState=this._disableAutoSyncState,this.requestEditorAccess=this._requestEditorAccess,this.isEditorAccessRequested=this._isEditorAccessRequested,this.acceptEditorAccessRequest=this._acceptEditorAccessRequest,this.rejectEditorAccessRequest=this._rejectEditorAccessRequest,this.cancelEditorAccessRequest=this._cancelEditorAccessRequest,this.editCurrentTab=this._editCurrentTab,this.setEditorAccessTimeout=this._setEditorAccessTimeout,this.enableEditorAccessTransferOnTimeOut=this._enableEditorAccessTransferOnTimeOut,this.disableEditorAccessTransferOnTimeOut=this._disableEditorAccessTransferOnTimeOut,this.enableDefaultSingleEditorUI=this._enableDefaultSingleEditorUI,this.disableDefaultSingleEditorUI=this._disableDefaultSingleEditorUI,this.getEditorAccessTimer=this._getEditorAccessTimer,this.onServerConnectionStateChange=this._onServerConnectionStateChange,this.updateUserPresence=this._updateUserPresence,this.on=this._on}_getLiveStateData(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: getLiveStateData","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_LIVE_STATE_DATA_TRIGGERED),this.getService(Vi).getLiveStateData$(o,n)}catch(e){return this.getService(y).catch("Error in _getLiveStateData: ",e),se(null)}}_setLiveStateData(o,n,e){this.getService(y).log("%c[WB] Calling FUNCTION: setLiveStateData","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.SET_LIVE_STATE_DATA_TRIGGERED),this.getService(Vi).setLiveStateData(o,n,e)}catch(t){return this.getService(y).catch("Error in _setLiveStateData: ",t),Promise.resolve()}}_enableSingleEditorMode(o){this.getService(y).log("%c[WB] Calling FUNCTION: enableSingleEditorMode","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_SINGLE_EDITOR_MODE_TRIGGERED),this.getService(Vi).enableSingleEditorMode(o)}catch(n){this.getService(y).catch("Error in _enableSingleEditorMode: ",n)}}_disableSingleEditorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableSingleEditorMode","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_SINGLE_EDITOR_MODE_TRIGGERED),this.getService(Vi).disableSingleEditorMode()}catch(o){this.getService(y).catch("Error in _disableSingleEditorMode: ",o)}}_isUserEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: isUserEditor$","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.IS_USER_EDITOR_TRIGGERED),this.getService(Vi).isUserEditor$()}catch(o){return this.getService(y).catch("Error in _isUserEditor$: ",o),se(null)}}_getEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: getEditor","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_EDITOR_TRIGGERED),this.getService(Vi).getEditor$()}catch(o){return this.getService(y).catch("Error in _getEditor: ",o),se(null)}}_setUserAsEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: setUserAsEditor","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_TRIGGERED),this.getService(Vi).setUserAsEditor()}catch(o){return this.getService(y).catch("Error in _setUserAsEditor: ",o),Promise.resolve()}}_resetUserAccess(){this.getService(y).log("%c[WB] Calling FUNCTION: resetUserAccess","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.RESET_USER_ACCESS_TRIGGERED),this.getService(Vi).removeEditorAccess({metadata:{from:"resetUserAccess-liveStateSyncElement",reason:"Client called"}})}catch(o){this.getService(y).catch("Error in _resetUserAccess: ",o)}}_singleEditorModeContainerIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: singleEditorModeContainerIds","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.SINGLE_EDITOR_MODE_CONTAINER_IDS_TRIGGERED),this.getService(Vi).setSingleEditorModeContainerIds(o)}catch(n){this.getService(y).catch("Error in _singleEditorModeContainerIds: ",n)}}_enableAutoSyncState(){this.getService(y).log("%c[WB] Calling FUNCTION: enableAutoSyncState","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_AUTO_SYNC_STATE_TRIGGERED),this.getService(Vi).enableAutoSyncState()}catch(o){this.getService(y).catch("Error in _enableAutoSyncState: ",o)}}_disableAutoSyncState(){this.getService(y).log("%c[WB] Calling FUNCTION: disableAutoSyncState","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_AUTO_SYNC_STATE_TRIGGERED),this.getService(Vi).disableAutoSyncState()}catch(o){this.getService(y).catch("Error in _disableAutoSyncState: ",o)}}_requestEditorAccess(){this.getService(y).log("%c[WB] Calling FUNCTION: requestEditorAccess","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.REQUEST_EDITOR_ACCESS_TRIGGERED),this.getService(Vi).requestEditorAccess()}catch(o){return this.getService(y).catch("Error in _requestEditorAccess: ",o),se(null)}}_isEditorAccessRequested(){this.getService(y).log("%c[WB] Calling FUNCTION: isEditorAccessRequested","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.IS_EDITOR_ACCESS_REQUESTED_TRIGGERED),this.getService(Vi).isEditorAccessRequested$()}catch(o){return this.getService(y).catch("Error in _isEditorAccessRequested: ",o),se(null)}}_acceptEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: acceptEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).acceptEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _acceptEditorAccessRequest: ",o)}}_rejectEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: rejectEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).rejectEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _rejectEditorAccessRequest: ",o)}}_cancelEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: cancelEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).cancelEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _cancelEditorAccessRequest: ",o)}}_editCurrentTab(){this.getService(y).log("%c[WB] Calling FUNCTION: editCurrentTab","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.EDIT_CURRENT_TAB_TRIGGERED),this.getService(Vi).editCurrentTab()}catch(o){this.getService(y).catch("Error in _editCurrentTab: ",o)}}_setEditorAccessTimeout(o){this.getService(y).log("%c[WB] Calling FUNCTION: setEditorAccessTimeout","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.SET_EDITOR_ACCESS_TIMEOUT_TRIGGERED),this.getService(Vi).setEditorAccessTimeout(o)}catch(n){this.getService(y).catch("Error in _setEditorAccessTimeout: ",n)}}_enableEditorAccessTransferOnTimeOut(){this.getService(y).log("%c[WB] Calling FUNCTION: enableEditorAccessTransferOnTimeOut","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED),this.getService(Vi).enableEditorAccessTransferOnTimeOut()}catch(o){this.getService(y).catch("Error in _enableEditorAccessTransferOnTimeOut: ",o)}}_disableEditorAccessTransferOnTimeOut(){this.getService(y).log("%c[WB] Calling FUNCTION: disableEditorAccessTransferOnTimeOut","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED),this.getService(Vi).disableEditorAccessTransferOnTimeOut()}catch(o){this.getService(y).catch("Error in _disableEditorAccessTransferOnTimeOut: ",o)}}_enableDefaultSingleEditorUI(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultSingleEditorUI","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED),this.getService(Vi).enableDefaultSingleEditorUI()}catch(o){this.getService(y).catch("Error in _enableDefaultSingleEditorUI: ",o)}}_disableDefaultSingleEditorUI(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultSingleEditorUI","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED),this.getService(Vi).disableDefaultSingleEditorUI()}catch(o){this.getService(y).catch("Error in _disableDefaultSingleEditorUI: ",o)}}_getEditorAccessTimer(){this.getService(y).log("%c[WB] Calling FUNCTION: getEditorAccessTimer","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_EDITOR_ACCESS_TIMER_TRIGGERED),this.getService(Vi).getEditorAccessTimer$()}catch(o){return this.getService(y).catch("Error in _getEditorAccessTimer: ",o),se(new g0)}}_onServerConnectionStateChange(){this.getService(y).log("%c[WB] Calling FUNCTION: onServerConnectionStateChange","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.ON_SERVER_CONNECTION_STATE_CHANGE_TRIGGERED),this.getService(Vi).onServerConnectionStateChange$()}catch(o){return this.getService(y).catch("Error in _onServerConnectionStateChange: ",o),se(rl.PENDING_INIT)}}_updateUserPresence(o){this.getService(y).log("%c[WB] Calling FUNCTION: updateUserPresence","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.UPDATE_USER_PRESENCE_TRIGGERED,{payload:{userPresence:o}}),this.getService(Vi).updateUserPresence(o)}catch(n){this.getService(y).catch("Error in _updateUserPresence: ",n)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(n9).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}};var s9=(()=>{let o=class o{constructor(e){this.loggingService=e,this.actionSubjects=new Map,this.defaultSource="internal",this.isUserAdmin=!1,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: CommentActionsService","color: blue;")}triggerSettingsUpdatedEvent(e){try{this.triggerAction(Qre.SETTINGS_UPDATED,e)}catch(t){this.loggingService.catch("Error in NotificationsActionsService triggerAddCommentAnnotationEvent: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in NotificationsActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in NotificationsActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var l9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ViewsElement","color: blue;"),this.openHistoryPanel=this._openHistoryPanel,this.closeHistoryPanel=this._closeHistoryPanel,this.toggleHistoryPanel=this._toggleHistoryPanel,this.getNotificationsData=this._getNotificationsData,this.setMaxDays=this._setMaxDays,this.setTabConfig=this._setTabConfig,this.enableReadNotificationsOnForYouTab=this._enableReadNotificationsOnForYouTab,this.disableReadNotificationsOnForYouTab=this._disableReadNotificationsOnForYouTab,this.setAllNotificationsAsRead=this._setAllNotificationsAsRead,this.getUnreadNotificationsCount=this._getUnreadNotificationsCount,this.markNotificationAsReadById=this._markNotificationAsReadById,this.setSettings=this._setSettings,this.getSettings=this._getSettings,this.muteAllNotifications=this._muteAllNotifications,this.enableSettings=this._enableSettings,this.enableSelfNotifications=this._enableSelfNotifications,this.disableSelfNotifications=this._disableSelfNotifications,this.disableSettings=this._disableSettings,this.setSettingsInitialConfig=this._setSettingsInitialConfig,this.openNotificationsPanel=this._openNotificationsPanel,this.closeNotificationsPanel=this._closeNotificationsPanel,this.on=this._on}_openHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _openHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.OPEN_HISTORY_PANEL_TRIGGERED),this.getService(gn).setHistoryPanelVisibility(!0,!0)}catch(o){this.getService(y).catch("Error in openHistoryPanel: ",o)}}_closeHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _closeHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.CLOSE_HISTORY_PANEL_TRIGGERED),this.getService(gn).setHistoryPanelVisibility(!1,!0)}catch(o){this.getService(y).catch("Error in closeHistoryPanel: ",o)}}_toggleHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _toggleHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.TOGGLE_HISTORY_PANEL_TRIGGERED),this.getService(gn).toggleHistoryPanelVisibility(!0)}catch(o){this.getService(y).catch("Error in toggleHistoryPanel: ",o)}}_getNotificationsData(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getNotificationsData","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_NOTIFICATIONS_DATA_TRIGGERED),this.getService(gn).getNotifications$(o)}catch(n){return this.getService(y).catch("Error in getNotificationsData: ",n),se([])}}_setMaxDays(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setMaxDays","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_MAX_DAYS_TRIGGERED,{payload:{days:o}}),this.getService(gn).setMaxDays(o)}catch(n){this.getService(y).catch("Error in setMaxDays: ",n)}}_setTabConfig(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setTabConfig","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_TAB_CONFIG_TRIGGERED,{payload:{tabConfig:o}}),this.getService(gn).setTabConfig(o)}catch(n){this.getService(y).catch("Error in setTabConfig: ",n)}}_enableReadNotificationsOnForYouTab(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableReadNotificationsOnForYouTab","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED),this.getService(gn).enableReadNotificationsOnForYouTab()}catch(o){this.getService(y).catch("Error in enableReadNotificationsOnForYouTab: ",o)}}_disableReadNotificationsOnForYouTab(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableReadNotificationsOnForYouTab","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED),this.getService(gn).disableReadNotificationsOnForYouTab()}catch(o){this.getService(y).catch("Error in disableReadNotificationsOnForYouTab: ",o)}}_setAllNotificationsAsRead(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setAllNotificationsAsRead","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_ALL_NOTIFICATIONS_AS_READ_TRIGGERED,{payload:{config:o}}),this.getService(gn).setAllNotificationsAsRead(o)}catch(n){this.getService(y).catch("Error in setAllNotificationsAsRead: ",n)}}_getUnreadNotificationsCount(){this.getService(y).log("%c[WB] Calling FUNCTION: _getUnreadNotificationsCount","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_UNREAD_NOTIFICATIONS_COUNT_TRIGGERED),this.getService(gn).getUnreadNotificationsCount$()}catch(o){return this.getService(y).catch("Error in getUnreadNotificationsCount: ",o),se({forYou:null,all:null})}}_markNotificationAsReadById(o){this.getService(y).log("%c[WB] Calling FUNCTION: _markNotificationAsReadById","color: green;");try{this.trackEvent(Z.Events.Notifications.MARK_NOTIFICATION_AS_READ_BY_ID_TRIGGERED,{payload:{notificationId:o}}),this.getService(gn).markNotificationAsReadById(o)}catch(n){this.getService(y).catch("Error in markNotificationAsReadById: ",n)}}_setSettings(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_SETTINGS_TRIGGERED,{payload:{config:o}}),this.getService(gn).setSettingsConfigWithDB(o)}catch(n){this.getService(y).catch("Error in setSettings: ",n)}}_getSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _getSettings","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_SETTINGS_TRIGGERED),this.getService(gn).getSettingsConfig$()}catch(o){return this.getService(y).catch("Error in getSettings: ",o),se(null)}}_muteAllNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _muteAllNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.MUTE_ALL_NOTIFICATIONS_TRIGGERED),this.getService(gn).setMuteAllNotifications()}catch(o){this.getService(y).catch("Error in muteAllNotifications: ",o)}}_enableSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_SETTINGS_TRIGGERED),this.getService(gn).enableSettings()}catch(o){this.getService(y).catch("Error in enableSettings: ",o)}}_enableSelfNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableSelfNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_SELF_NOTIFICATIONS_TRIGGERED),this.getService(gn).enableSelfNotifications()}catch(o){this.getService(y).catch("Error in enableSelfNotifications: ",o)}}_disableSelfNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableSelfNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_SELF_NOTIFICATIONS_TRIGGERED),this.getService(gn).disableSelfNotifications()}catch(o){this.getService(y).catch("Error in disableSelfNotifications: ",o)}}_disableSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_SETTINGS_TRIGGERED),this.getService(gn).disableSettings()}catch(o){this.getService(y).catch("Error in disableSettings: ",o)}}_setSettingsInitialConfig(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setSettingsInitialConfig","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_SETTINGS_INITIAL_CONFIG_TRIGGERED,{payload:{settings:o}}),this.getService(gn).setSettingsInitialConfig(o)}catch(n){this.getService(y).catch("Error in setSettingsInitialConfig: ",n)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Notifications.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(s9).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}_openNotificationsPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _openNotificationsPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.OPEN_NOTIFICATIONS_PANEL_TRIGGERED),this.getService(gn).openNotificationsPanel()}catch(o){this.getService(y).catch("Error in openNotificationsPanel: ",o)}}_closeNotificationsPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _closeNotificationsPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.CLOSE_NOTIFICATIONS_PANEL_TRIGGERED),this.getService(gn).closeNotificationsPanel()}catch(o){this.getService(y).catch("Error in closeNotificationsPanel: ",o)}}};var Fz=(()=>{let o=class o{constructor(e,t,r){this.analyticsService=e,this.loggingService=t,this.presenceService=r,this.actionSubjects=new Map,this.subscriptions=[];try{this.presenceService.setPresenceActionsService(this)}catch(a){this.loggingService.catch("Error in PresenceActionsService constructor: ",a)}}onMultipleUsersOnline(e){try{this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: onMultipleUsersOnline","color: green;"),this.triggerAction(xj.MULTIPLE_USERS_ONLINE,e),this.analyticsService.trackEvent(Z.Events.Presence.MULTIPLE_USERS_ONLINE,{totalUsers:e?.users?.length,presenceSnippylyUserIds:e?.users?.map(t=>t.userSnippylyId),presenceClientUserIds:e?.users?.map(t=>t.userId)})}catch(t){this.loggingService.catch("Error in PresenceActionsService onMultipleUsersOnline: ",t)}}onUserStateChange(e){try{this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: onUserStateChange","color: green;"),this.triggerAction(xj.USER_STATE_CHANGE,e),this.analyticsService.trackEvent(Z.Events.Presence.ON_USER_STATE_CHANGE,{userSnippylyId:e?.user?.userSnippylyId,userId:e?.user?.userId,state:e?.state})}catch(t){this.loggingService.catch("Error in PresenceActionsService onUserStateChange: ",t)}}getData(e){try{return this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: getData","color: green;"),this.presenceService.getOnlineUsersOnCurrentDocument(e).pipe(ce(t=>({data:t})))}catch(t){return this.loggingService.catch("Error in PresenceActionsService getData: ",t),se({data:null})}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in PresenceActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in PresenceActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(et),J(y),J(Hl))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var c9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: PresenceElement","color: blue;"),this.getOnlineUsersOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.setInactivityTime=this._setInactivityTime,this.enableFlockMode=this._enableFlockMode,this.disableFlockMode=this._disableFlockMode,this.startFollowingUser=this._startFollowingUser,this.stopFollowingUser=this._stopFollowingUser,this.enableSelf=this._enableSelf,this.disableSelf=this._disableSelf,this.getData=this._getData,this.on=this._on}_getOnlineUsersOnCurrentDocument(){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsers","color: green;");try{return this.trackEvent(Z.Events.Presence.GET_ONLINE_USERS_ON_CURRENT_DOCUMENT_TRIGGERED),this.getService(Hl).getOnlineUsersOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getOnlineUsersOnCurrentDocument: ",o),se(null)}}_setInactivityTime(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setInactivityTime","color: green;");try{this.trackEvent(Z.Events.Presence.SET_INACTIVITY_TIME_TRIGGERED,{payload:{time:o}}),isNaN(o)?this.getService(y).catch("Error in setInactivityTime: ","Provided value is not a number."):this.getService(Hl).setInactivityTime(o)}catch(n){this.getService(y).catch("Error in setInactivityTime: ",n)}}_disableFlockMode(){try{this.trackEvent(Z.Events.Presence.DISABLE_FLOCK_MODE_TRIGGERED),this.getService(zc).disableFlockMode()}catch(o){this.getService(y).catch("Error in _disableFlockMode: ",o)}}_enableFlockMode(o){try{this.trackEvent(Z.Events.Presence.ENABLE_FLOCK_MODE_TRIGGERED,{payload:{options:o}}),this.getService(zc).enableFlockMode(o)}catch(n){this.getService(y).catch("Error in _enableFlockMode: ",n)}}_stopFollowingUser(){try{this.trackEvent(Z.Events.Presence.STOP_FOLLOWING_USER_TRIGGERED),this.getService(zc).stopFollowingUser()}catch(o){this.getService(y).catch("Error in _stopFollowingUser: ",o)}}_startFollowingUser(o){try{this.trackEvent(Z.Events.Presence.START_FOLLOWING_USER_TRIGGERED,{payload:{externalId:o}});let n=this.getService(Hl).getPresenceUserFromExternalId(o);return n&&n.userSnippylyId&&n.name!==void 0?(this.getService(zc).startFollowingUser(n.userSnippylyId,n.name),{success:!0,msg:"Joined flock session."}):{success:!1,msg:"User could not be found."}}catch(n){return this.getService(y).catch("Error in _startFollowingUser: ",n),{success:!1,msg:"Unknown error.",raw:n}}}_enableSelf(){try{this.trackEvent(Z.Events.Presence.ENABLE_SELF_TRIGGERED),this.getService(Hl).enableIncludeSelf()}catch(o){this.getService(y).catch("Error in _enableSelf: ",o)}}_disableSelf(){try{this.trackEvent(Z.Events.Presence.DISABLE_SELF_TRIGGERED),this.getService(Hl).disableIncludeSelf()}catch(o){this.getService(y).catch("Error in _disableSelf: ",o)}}_getData(o){this.getService(y).log("%c[WB] Calling FUNCTION: getData","color: green;");try{return this.trackEvent(Z.Events.Presence.GET_PRESENCE_DATA_TRIGGERED,{payload:{query:o}}),o&&typeof o=="object"&&(o=I({},o),o?.documentId&&(o.documentId=na(o.documentId)),o?.organizationId&&(o.organizationId=Va(o.organizationId))),this.getService(Fz).getData(o)}catch(n){return this.getService(y).catch("Error in _getData: ",n),se({data:null})}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Presence.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(Fz).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}};var d9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ReactionElement","color: blue;"),this.enableDarkMode=this._enableDarkMode,this.disableDarkMode=this._disableDarkMode,this.setCustomReactions=this._setCustomReactions}_enableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDarkMode","color: green;");try{this.trackEvent(Z.Events.Reactions.ENABLE_DARK_MODE_TRIGGERED),this.getService(ar).enableDarkMode()}catch(o){this.getService(y).catch("Error in _enableDarkMode: ",o)}}_disableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDarkMode","color: green;");try{this.trackEvent(Z.Events.Reactions.DISABLE_DARK_MODE_TRIGGERED),this.getService(ar).disableDarkMode()}catch(o){this.getService(y).catch("Error in _disableDarkMode: ",o)}}_setCustomReactions(o){this.getService(y).log("%c[WB] Calling FUNCTION: setCustomReactions","color: green;");try{this.trackEvent(Z.Events.Reactions.SET_CUSTOM_REACTIONS_TRIGGERED,{payload:{reactions:o}}),this.getService(ar).setCustomReactions(o)}catch(n){this.getService(y).catch("Error in _setCustomReactions: ",n)}}};var hg=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.recorderAnnotationService=t,this.recorderService=r,this.actionSubjects=new Map,this.subscriptions=[];try{this.recorderAnnotationService.setRecorderActionsService(this),this.recorderService.setRecorderActionsService(this)}catch(a){this.loggingService.catch("Error in RecorderActionsService constructor: ",a)}}onTranscriptionDone(e){try{this.triggerAction(Fl.TRANSCRIPTION_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onTranscriptionDone: ",t)}}onRecordingDone(e){try{this.triggerAction(Fl.RECORDING_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingDone: ",t)}}onRecordingEditDone(e){try{this.triggerAction(Fl.RECORDING_EDIT_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingEditDone: ",t)}}onRecordingStarted(e){try{this.triggerAction(Fl.RECORDING_STARTED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingStarted: ",t)}}onRecordingPaused(e){try{this.triggerAction(Fl.RECORDING_PAUSED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingPaused: ",t)}}onRecordingCancelled(e){try{this.triggerAction(Fl.RECORDING_CANCELLED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingCancelled: ",t)}}onRecordingStopped(e){try{this.triggerAction(Fl.RECORDING_STOPPED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingStopped: ",t)}}onRecordingResumed(e){try{this.triggerAction(Fl.RECORDING_RESUMED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingResumed: ",t)}}onDeleteRecording(e){try{this.triggerAction(Fl.DELETE_RECORDING,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onDeleteRecording: ",t)}}onError(e){try{this.triggerAction(Fl.ERROR,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onError: ",t)}}onRecordingSaveInitiated(e){try{this.triggerAction(Fl.RECORDING_SAVE_INITIATED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingSaveInitiated: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in RecorderActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in RecorderActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(y),J(Yi),J(In))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var m9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: RecorderElement","color: blue;"),this.initRecording=this._initRecording,this.onRecordedData=this._onRecordedData,this.enableDarkMode=this._enableDarkMode,this.disableDarkMode=this._disableDarkMode,this.enableRecordingCountdown=this._enableRecordingCountdown,this.disableRecordingCountdown=this._disableRecordingCountdown,this.getRecordingDataByRecorderId=this._getRecordingDataByRecorderId,this.enableRecordingTranscription=this._enableRecordingTranscription,this.disableRecordingTranscription=this._disableRecordingTranscription,this.getRecordingData=this._getRecordingData,this.enableVideoEditor=this._enableVideoEditor,this.disableVideoEditor=this._disableVideoEditor,this.getRecordings=this._getRecordings,this.fetchRecordings=this._fetchRecordings,this.deleteRecordings=this._deleteRecordings,this.setRecordingQualityConstraints=this._setRecordingQualityConstraints,this.setRecordingEncodingOptions=this._setRecordingEncodingOptions,this.downloadLatestVideo=this._downloadLatestVideo,this.enableRecordingMic=this._enableRecordingMic,this.disableRecordingMic=this._disableRecordingMic,this.enableOnboardingTooltip=this._enableOnboardingTooltip,this.disableOnboardingTooltip=this._disableOnboardingTooltip,this.enableRetakeOnVideoEditor=this._enableRetakeOnVideoEditor,this.disableRetakeOnVideoEditor=this._disableRetakeOnVideoEditor,this.askDevicePermission=this._askDevicePermission,this.setMaxLength=this._setMaxLength,this.openPictureInPicture=this._openPictureInPicture,this.exitPictureInPicture=this._exitPictureInPicture,this.requestScreenPermission=this._requestScreenPermission,this.enablePictureInPicture=this._enablePictureInPicture,this.disablePictureInPicture=this._disablePictureInPicture,this.on=this._on}_initRecording(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: initRecording","color: green;");try{return this.trackEvent(Z.Events.Recording.INIT_RECORDING_TRIGGERED,{payload:{type:o,panelId:n}}),this.getService(In).initRecording(o,n)}catch(e){return this.getService(y).catch("Error in _initRecording: ",e),se(null)}}_onRecordedData(){this.getService(y).log("%c[WB] Calling FUNCTION: onRecordedData","color: green;");try{return this.trackEvent(Z.Events.Recording.ON_RECORDED_DATA_TRIGGERED),this.getService(In).onRecordedData()}catch(o){return this.getService(y).catch("Error in _onRecordedData: ",o),se(null)}}_enableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDarkMode","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_DARK_MODE_TRIGGERED),this.getService(Yi).setRecorderContainerDarkMode(!0)}catch(o){this.getService(y).catch("Error in _enableDarkMode: ",o)}}_disableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDarkMode","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_DARK_MODE_TRIGGERED),this.getService(Yi).setRecorderContainerDarkMode(!1)}catch(o){this.getService(y).catch("Error in _disableDarkMode: ",o)}}_enableRecordingCountdown(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingCountdown","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_COUNTDOWN_TRIGGERED),this.getService(In).enableRecordingCountdown()}catch(o){this.getService(y).catch("Error in _enableRecordingCountdown: ",o)}}_disableRecordingCountdown(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingCountdown","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_COUNTDOWN_TRIGGERED),this.getService(In).disableRecordingCountdown()}catch(o){this.getService(y).catch("Error in _disableRecordingCountdown: ",o)}}_getRecordingDataByRecorderId(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordingDataByRecorderId","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDING_DATA_BY_RECORDER_ID_TRIGGERED,{payload:{recorderId:o}}),this.getService(Yi).getRecorderDataByRecorderId(o)}catch(n){return this.getService(y).catch("Error in _getRecordingDataByRecorderId: ",n),se(null)}}_getRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordings","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDINGS_TRIGGERED,{payload:{query:o}}),this.getService(Yi).getRecordings(o)}catch(n){return this.getService(y).catch("Error in _getRecordings: ",n),se([])}}_getRecordingData(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordingData","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDING_DATA_TRIGGERED,{payload:{query:o}}),this.getService(Yi).getRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _getRecordingData: ",n),Promise.resolve({data:null})}}_fetchRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: fetchRecordings","color: green;");try{return this.trackEvent(Z.Events.Recording.FETCH_RECORDINGS_TRIGGERED,{payload:{query:o}}),this.getService(Yi).fetchRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _fetchRecordings: ",n),Promise.resolve([])}}_deleteRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: deleteRecording","color: green;");try{return this.trackEvent(Z.Events.Recording.DELETE_RECORDING_TRIGGERED,{payload:{query:o}}),this.getService(Yi).deleteRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _deleteRecording: ",n),Promise.resolve([])}}_enableRecordingTranscription(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingTranscription","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED),this.getService(Yi).enableRecordingTranscription()}catch(o){this.getService(y).catch("Error in _enableRecordingTranscription: ",o)}}_disableRecordingTranscription(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingTranscription","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED),this.getService(Yi).disableRecordingTranscription()}catch(o){this.getService(y).catch("Error in _disableRecordingTranscription: ",o)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Recording.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(hg).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}_enableVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: enableVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_VIDEO_EDITOR_TRIGGERED),this.getService(In).enableVideoEditor()}catch(o){this.getService(y).catch("Error in _enableVideoEditor: ",o)}}_disableVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: disableVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_VIDEO_EDITOR_TRIGGERED),this.getService(In).disableVideoEditor()}catch(o){this.getService(y).catch("Error in _disableVideoEditor: ",o)}}_setRecordingQualityConstraints(o){this.getService(y).log("%c[WB] Calling FUNCTION: setRecordingQualityConstraints","color: green;");try{this.trackEvent(Z.Events.Recording.SET_RECORDING_QUALITY_CONSTRAINTS_TRIGGERED,{payload:{constraints:o}}),this.getService(In).setRecordingQualityConstraints(o)}catch(n){this.getService(y).catch("Error in _setRecordingQualityConstraints: ",n)}}_setRecordingEncodingOptions(o){this.getService(y).log("%c[WB] Calling FUNCTION: setRecordingEncodingOptions","color: green;");try{this.trackEvent(Z.Events.Recording.SET_RECORDING_ENCODING_OPTIONS_TRIGGERED,{payload:{options:o}}),this.getService(In).setRecordingEncodingOptions(o)}catch(n){this.getService(y).catch("Error in _setRecordingEncodingOptions: ",n)}}_downloadLatestVideo(o){this.getService(y).log("%c[WB] Calling FUNCTION: downloadLatestVideo","color: green;");try{return this.trackEvent(Z.Events.Recording.DOWNLOAD_LATEST_VIDEO_TRIGGERED,{payload:{recorderId:o}}),this.getService(Yi).downloadLatestVideo(o)}catch(n){return this.getService(y).catch("Error in _downloadLatestVideo: ",n),Promise.resolve(!1)}}_enableRecordingMic(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingMic","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_MIC_TRIGGERED),this.getService(In).enableRecordingMic()}catch(o){this.getService(y).catch("Error in _enableRecordingMic: ",o)}}_disableRecordingMic(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingMic","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_MIC_TRIGGERED),this.getService(In).disableRecordingMic()}catch(o){this.getService(y).catch("Error in _disableRecordingMic: ",o)}}_enableOnboardingTooltip(){this.getService(y).log("%c[WB] Calling FUNCTION: enableOnboardingTooltip","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_ONBOARDING_TOOLTIP_TRIGGERED),this.getService(In).enableOnboardingTooltip()}catch(o){this.getService(y).catch("Error in _enableOnboardingTooltip: ",o);return}}_disableOnboardingTooltip(){this.getService(y).log("%c[WB] Calling FUNCTION: disableOnboardingTooltip","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_ONBOARDING_TOOLTIP_TRIGGERED),this.getService(In).disableOnboardingTooltip()}catch(o){this.getService(y).catch("Error in _disableOnboardingTooltip: ",o);return}}_enableRetakeOnVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRetakeOnVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED),this.getService(In).enableRetakeOnVideoEditor()}catch(o){this.getService(y).catch("Error in _enableRetakeOnVideoEditor: ",o)}}_disableRetakeOnVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRetakeOnVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED),this.getService(In).disableRetakeOnVideoEditor()}catch(o){this.getService(y).catch("Error in _disableRetakeOnVideoEditor: ",o)}}_askDevicePermission(o){this.getService(y).log("%c[WB] Calling FUNCTION: askDevicePermission","color: green;");try{this.trackEvent(Z.Events.Recording.ASK_DEVICE_PERMISSION_TRIGGERED),this.getService(In).askDevicePermission(o)}catch(n){this.getService(y).catch("Error in _askDevicePermission: ",n)}}_setMaxLength(o){this.getService(y).log("%c[WB] Calling FUNCTION: setMaxLength","color: green;");try{this.trackEvent(Z.Events.Recording.SET_MAX_LENGTH_TRIGGERED,{payload:{seconds:o}}),this.getService(In).setMaxRecordingLength(o)}catch(n){this.getService(y).catch("Error in _setMaxLength: ",n)}}_openPictureInPicture(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: openPictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.OPEN_PICTURE_IN_PICTURE_TRIGGERED),yield this.getService(In).openPictureInPicture()}catch(o){this.getService(y).catch("Error in _openPictureInPicture: ",o)}})}_exitPictureInPicture(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: exitPictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.EXIT_PICTURE_IN_PICTURE_TRIGGERED),yield this.getService(za).exitPictureInPicture()}catch(o){this.getService(y).catch("Error in _exitPictureInPicture: ",o)}})}_requestScreenPermission(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: requestScreenPermission","color: green;");try{return this.trackEvent(Z.Events.Recording.REQUEST_SCREEN_PERMISSION_TRIGGERED),this.getService(In).requestScreenPermission()}catch(o){return this.getService(y).catch("Error in _requestScreenPermission: ",o),null}})}_enablePictureInPicture(){this.getService(y).log("%c[WB] Calling FUNCTION: enablePictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_PICTURE_IN_PICTURE_TRIGGERED),this.getService(za).enablePictureInPicture()}catch(o){this.getService(y).catch("Error in _enablePictureInPicture: ",o)}}_disablePictureInPicture(){this.getService(y).log("%c[WB] Calling FUNCTION: disablePictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_PICTURE_IN_PICTURE_TRIGGERED),this.getService(za).disablePictureInPicture()}catch(o){this.getService(y).catch("Error in _disablePictureInPicture: ",o)}}};var Gc=(()=>{let o=class o{constructor(e,t,r,a,s,c){this.analyticsService=e,this.authService=t,this.configService=r,this.domService=a,this.loggingService=s,this.functions=c,this.rewriterAnnotations$=new ve([]),this.rewriterOptions$=new ve({}),this.rewriterEnabled$=new ve(!1),this.lastOpenAIPromptCalledAt=0,this.getRewriterEnabled$().subscribe(p=>{try{if(p){let g=document.querySelectorAll(j.TAGS.SNIPPYLY_REWRITER);if(!document.querySelectorAll(j.TAGS.VELT_REWRITER)?.length&&!g?.length){let E=document.createElement(j.TAGS.VELT_REWRITER);document.body.appendChild(E),this.authService.getUser$().pipe(Le(D=>!!D),rt(1)).subscribe(D=>{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITER_ENABLED,{isMobileDevice:this.domService.isMobileDevice()})})}}else{let g=document.querySelectorAll(j.TAGS.SNIPPYLY_REWRITER);g?.length&&g.forEach(E=>{E.remove()});let C=document.querySelectorAll(j.TAGS.VELT_REWRITER);C?.length&&C.forEach(E=>{E.remove()})}}catch(g){this.loggingService.catch("Error in rewriterEnabled$: ",g)}},p=>{this.loggingService.catch("Error in rewriterEnabled$ subscription: ",p)})}getRewriterAnnotations$(){try{return this.rewriterAnnotations$.asObservable()}catch(e){return this.loggingService.catch("Error in getRewriterAnnotations$(): ",e),se([])}}addRewriter(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: addRewriter","color: green;");try{let a=this.authService.getUser();if(a)if(a.isReadOnly||a.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add rewriters.");else{let s=new Tk;s.from=a,s.color=j.DEFAULT_ANNOTATION_COLOR,t&&(s.targetTextRange=t),r&&(s.rewriterType=r),this.saveRewriterToDb(s)}}catch(a){this.loggingService.catch("Error in RewriterService addRewriter: ",a)}}saveRewriterToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: saveRewriterToDb","color: green;");try{e?.annotationId||(e.annotationId=Math.random().toString(36).substring(2)+Date.now().toString(36));let t=this.rewriterAnnotations$.getValue();t.push(e),this.rewriterAnnotations$.next(t),this.domService.toggleAnnotationSelection(e)}catch(t){this.loggingService.catch("Error in RewriterService saveRewriterToDb: ",t)}}removeRewriter(e){try{let t=this.rewriterAnnotations$.getValue(),r=t.findIndex(a=>a.annotationId===e.annotationId);r>-1&&(t.splice(r,1),this.rewriterAnnotations$.next(t))}catch(t){this.loggingService.catch("Error in RewriterService removeRewriter: ",t)}}getRewriterOptions(e,t,r){try{if(this.lastOpenAIPromptCalledAt&&Date.now()-this.lastOpenAIPromptCalledAt<1e3)return this.lastOpenAIPromptCalledAt=Date.now(),se([]);this.lastOpenAIPromptCalledAt=Date.now();let a=br(this.functions,Er({url:oi.cloudFunction.chatgptCompletion,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:20*60*1e3}),s=t?.[0]?.role==="system"?t?.[0]?.content:null;return this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_PROMPT_SUBMITTED,{isMobileDevice:this.domService.isMobileDevice(),prompt:s,type:e}),Zi(a({messages:t,type:e,apiKey:this.configService.getApiKey(),sdkVersion:ia(),sdkType:this.configService.getSdkType()})).pipe(ce(c=>c?.data?c.data:[]))}catch(a){return this.loggingService.catch("Error in RewriterService getRewriterOptions: ",a),se([])}}enableRewriter(){try{this.rewriterEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in RewriterService enableRewriter: ",e)}}disableRewriter(){try{this.rewriterEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in RewriterService disableRewriter: ",e)}}getRewriterEnabled$(){try{return this.rewriterEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in RewriterService getRewriterEnabled$: ",e),se(!1)}}resetRewriter(){try{this.domService.resetSelectedAnnotationsMap(!1,"rewriter"),this.rewriterAnnotations$.next([])}catch(e){this.loggingService.catch("Error in RewriterService resetRewriter: ",e)}}getChatGPTInput(e,t,r=[]){try{let a="";return e&&(a=`
487
+ `;if(typeof Worker<"u"){let r=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(r))}return}catch(t){this.loggingService.catch("Error in HeartbeatService setupWebWorker: ",t);return}}setupHeartbeat(){try{if(this.loggingService.log("%c[WB] Creating CLASS: HeartbeatService","color: blue;"),this.worker=this.setupWebWorker(this.HEARTBEAT_DURATION),this.worker){this.worker.onmessage=()=>{this.authService.getUser()&&this.sendHeartbeat()};let t=this.authService.getUser$().subscribe(r=>{r?(this.worker?.postMessage("start"),this.sendHeartbeat()):this.worker?.postMessage("stop")});this.subscriptions.push(t)}else{let t=this.authService.getUser$().pipe(he(r=>r?vm(5e3).pipe(Qi(0)):hm)).subscribe(()=>this.sendHeartbeat());this.subscriptions.push(t)}this.docService.getDocumentPaths$().pipe(Le(t=>!!t),on(()=>this.sendHeartbeat())).subscribe();let e=fn([this.databaseService.getDb().pipe(Le(t=>!!t)),this.authService.getUser$(),this.docService.getDocumentPaths$()]).pipe(wi(),on(([[t,r,a],[s,c,p]])=>{if(c&&p){let g=this.domService.getTabId();if(g){let C=this.generateHeartbeatId(c.userId,g),E={id:C,organizationId:p.organizationId},D=this.commonDbUtils.getDocumentPath({feature:"heartbeat",properties:E,defaultDocumentPaths:p,apiKey:this.configService.getApiKey(),useFirestore:!1});if(D&&s&&nl(Ai(s,D)).set(null),p.documentId){let L={id:C,documentId:p.documentId,organizationId:p.organizationId},z=this.commonDbUtils.getDocumentPath({feature:"heartbeatByDocument",properties:L,defaultDocumentPaths:p,apiKey:this.configService.getApiKey(),useFirestore:!1});z&&s&&nl(Ai(s,z)).set(null)}if(a&&a.documentId&&a.documentId!==p.documentId){let L={id:C,documentId:a.documentId,organizationId:a.organizationId,skipFirestore:!0};this.commonDbService.deleteData({feature:"heartbeatByDocument",properties:L})}}}})).subscribe();this.subscriptions.push(e)}catch(e){this.loggingService.catch("Error in HeartbeatService setupHeartbeat: ",e)}}teardownHeartbeat(){try{this.worker&&(this.worker.postMessage("stop"),this.worker.terminate(),this.worker=void 0),this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in HeartbeatService teardownHeartbeat: ",e)}}sendHeartbeat(){try{if(this.loggingService.log("%c[WB] Calling HeartbeatService FUNCTION: sendHeartbeat","color: green;"),sessionStorage.getItem("veltSkipHeartbeat"))return;let e=this.authService.getUser(),t=this.docService.getDocumentPaths(),r=this.domService.getTabId();if(e&&t&&r){let a=new _k,s=Date.now();a.createdTimestamp=s,a.lastUpdatedTimestamp=s,a.userId=e.userId,a.veltUserId=_t(e.userId),a.tabId=r,a.id=this.generateHeartbeatId(e.userId,r),a.metadata=this.docService.getBaseMetadata();let p=a.metadata.documentId;this.commonDbService.updateData({feature:"heartbeat",properties:{id:a.id,skipFirestore:!0,rtdbTransaction:!0,rtdbTransactionCallback:(g,C)=>(g?.createdTimestamp&&(C.createdTimestamp=g.createdTimestamp),C)},data:a}),p&&this.commonDbService.updateData({feature:"heartbeatByDocument",properties:{id:a.id,skipFirestore:!0,rtdbTransaction:!0,documentId:p,rtdbTransactionCallback:(g,C)=>(g?.createdTimestamp&&(C.createdTimestamp=g.createdTimestamp),C)},data:a})}}catch(e){this.loggingService.catch("Error in HeartbeatService sendHeartbeat: ",e)}}generateHeartbeatId(e,t){return _t(e+"_"+t)}getHeartbeatData(e){try{let t=this.docService.getDocumentPaths(),r=e?.organizationId||t?.organizationId,a=e?.documentId,s,c={organizationId:r,skipFirestore:!0,useQuery:!0};a?(s="allHeartbeatsByDocument",c.documentId=a):s="allHeartbeats";let p=e?.orderBy??"lastUpdatedTimestamp",g=e?.lastUpdatedTimestamp?.$gte??Date.now()-15e3,C=e?.limit??50;return c.rtdbQuery=[Vm(p),Um(g),aS(C)],this.commonDbService.dbListener({feature:s,properties:c}).pipe(on(E=>{console.log("[DEBUG_VELT_SDK] HeartbeatService getHeartbeatData",E)}),Le(E=>!!E?.data),ce(E=>E?.data),ce(E=>E?Object.values(E??{}).map(D=>D):null))}catch(t){return this.loggingService.catch("Error in HeartbeatService getHeartbeatData: ",t),se(null)}}getSpecificHeartbeat(e,t){try{let r=this.generateHeartbeatId(e,t),s=this.docService.getDocumentPaths()?.organizationId;return s?this.commonDbService.dbListener({feature:"heartbeat",properties:{id:r,organizationId:s,skipFirestore:!0}}).pipe(Le(c=>!!c?.data),ce(c=>c?.data),Ct((c,p)=>c?.lastUpdatedTimestamp===p?.lastUpdatedTimestamp)):se(null)}catch(r){return this.loggingService.catch("Error in HeartbeatService getSpecificHeartbeat: ",r),se(null)}}enableHeartbeat(){try{if(this.heartbeatEnabled$.value===!0)return;this.heartbeatEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HeartbeatService enableHeartbeat: ",e)}}disableHeartbeat(){try{if(this.heartbeatEnabled$.value===!1)return;this.heartbeatEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HeartbeatService disableHeartbeat: ",e)}}getHeartbeatEnabled$(){try{return this.heartbeatEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HeartbeatService getHeartbeatEnabled$: ",e),se(!1)}}getHeartbeatEnabled(){try{return this.heartbeatEnabled$.value}catch(e){return this.loggingService.catch("Error in HeartbeatService getHeartbeatEnabled: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(Ve),J(dn),J(Cn),J(ot),J(Be),J(y),J($l),J(Gd),J(kt))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var n9=(()=>{let o=class o{constructor(e,t){this.analyticsService=e,this.loggingService=t,this.actionSubjects=new Map,this.subscriptions=[]}onAccessRequested(e){try{this.triggerAction(Yp.ACCESS_REQUESTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REQUESTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRequested: ",t)}}onAccessRequestCanceled(e){try{this.triggerAction(Yp.ACCESS_REQUEST_CANCELED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REQUEST_CANCELED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRequestCanceled: ",t)}}onAccessAccepted(e){try{this.triggerAction(Yp.ACCESS_ACCEPTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_ACCEPTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessAccepted: ",t)}}onAccessRejected(e){try{this.triggerAction(Yp.ACCESS_REJECTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_ACCESS_REJECTED,{viewerUserId:e?.viewer?.userId,editorUserId:e?.editor?.userId,timestamp:e?.timestamp,status:e?.status})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onAccessRejected: ",t)}}onEditorAssigned(e){try{this.triggerAction(Yp.EDITOR_ASSIGNED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_EDITOR_ASSIGNED,{editorUserId:e?.editor?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onEditorAssigned: ",t)}}onEditorOnDifferentTabDetected(e){try{this.triggerAction(Yp.EDITOR_ON_DIFFERENT_TAB_DETECTED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_EDITOR_ON_DIFFERENT_TAB_DETECTED,{editorUserId:e?.editor?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onEditorOnDifferentTabDetected: ",t)}}onViewerAssigned(e){try{this.triggerAction(Yp.VIEWER_ASSIGNED,e),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_VIEWER_ASSIGNED,{viewerUserId:e?.viewer?.userId,timestamp:e?.timestamp,role:e?.role})}catch(t){this.loggingService.catch("Error in LiveStateActionsService onViewerAssigned: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in LiveStateActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in LiveStateActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(et),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var lde=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.authService=t,this.usersService=r}getRecentHeartbeats(e,t=30){try{if(!e||e.length===0)return[];let r=Date.now()-t*1e3;return e.filter(a=>a.lastUpdatedTimestamp&&a.lastUpdatedTimestamp>r)}catch(r){return this.loggingService.catch("Error in getRecentHeartbeats: ",r),[]}}getOldestHeartbeat(e,t=10){try{if(!e||e.length===0)return null;let r=Date.now()-t*1e3,a=e.filter(s=>s?.lastUpdatedTimestamp>r);return a.length===0?null:a.reduce((s,c)=>!s||c.createdTimestamp<s.createdTimestamp?c:s,a[0])}catch(r){return this.loggingService.catch("Error in getOldestHeartbeat: ",r),null}}getMostRecentHeartbeat(e){try{return!e||e.length===0?null:e.reduce((t,r)=>!t||r.lastUpdatedTimestamp>t.lastUpdatedTimestamp?r:t,e[0])}catch(t){return this.loggingService.catch("Error in getMostRecentHeartbeat: ",t),null}}hasRecentHeartbeat(e,t,r=30){try{return this.getRecentHeartbeats(e,r).some(s=>s.userId===t)}catch(a){return this.loggingService.catch("Error in hasRecentHeartbeat: ",a),!1}}hasRecentHeartbeatOnTab(e,t,r,a=30){try{return this.getRecentHeartbeats(e,a).some(c=>c.userId===t&&c.tabId===r)}catch(s){return this.loggingService.catch("Error in hasRecentHeartbeatOnTab: ",s),!1}}getHeartbeatCountByUser(e){try{let t=new Map;return!e||e.length===0||e.forEach(r=>{if(r.userId){let a=t.get(r.userId)||0;t.set(r.userId,a+1)}}),t}catch(t){return this.loggingService.catch("Error in getHeartbeatCountByUser: ",t),new Map}}isEditorActiveByHeartbeat(e,t,r,a,s=30){try{if(!e||e.length===0||!t||!r||!a)return!1;let p=this.getRecentHeartbeats(e,s).find(g=>g.userId===t&&g.tabId===r);return!!(p&&p.lastUpdatedTimestamp>a)}catch(c){return this.loggingService.catch("Error in isEditorActiveByHeartbeat: ",c),!1}}determineEditorStatusNew(e){return Q(this,null,function*(){try{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3] determineEditorStatusNew start **************"),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3.1] SD determineEditorStatusNew context",e&&typeof e=="object"?JSON.parse(JSON.stringify(e)):e);let{singleEditorModeData:r,heartbeatData:a,userPresence:s,currentUser:c,currentTabId:p}=e,g=JSON.parse(JSON.stringify(r||{})),C=()=>Q(this,null,function*(){let z=s?.userIds?.[0],W;z&&(yield this.usersService.resolveUsers({userIds:[z],forceResolve:!0}),W=this.usersService.getUserById(z)),W?(g.editor=W,g.tabId=`differentUserPresentOnTab_${p}`):(g.editor={userId:`anonymous_${c?.userId}`,name:"Anonymous"},g.tabId=`differentUserPresentOnTab_${p}`)}),E=()=>{g.editor=c,g.tabId=`sameUserPresentOnTab_${p}`},D=!1;if(r?.editor){if(a?.length){let z=a?.find(W=>W.userId===r?.editor?.userId&&W.tabId===r?.tabId);if(z&&z.lastUpdatedTimestamp>Date.now()-1e4)this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.9] Server data present, editor heartbeat recent: keep current editor","color: blue;");else{this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.10] Server data present, editor heartbeat not recent","color: red;");let W=this.getOldestHeartbeat(a,20);this.semDebuggerMode()&&console.log(`%c[DEBUG_VELT_SDK] [3.11] Server data present, computed oldest: user ${W?.userId} tab ${W?.tabId}, created ${W?.createdTimestamp}, my user ${c.userId} my tab ${p}`,"color: yellow;"),W&&W.userId===c.userId&&W.tabId===p?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.12] Server data present, not recent editor, I am oldest: set undefined","color: green;"),D=!0):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.13] Server data present, not recent editor, I am not oldest: keep current","color: red;")}}else s&&(s.differentUserPresentOnTab?(yield C(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.14] Server data present, different user present: set as viewer","color: blue;"),D=!1):s.sameUserPresentOnTab?(E(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.15] Server data present, same user on different tab: set as viewer (editor on diff tab)","color: blue;"),D=!1):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.16] Server data present, no external presence: keep as is","color: darkgrey;"));!a?.length&&!s&&this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.17] Server data present, no heartbeat, no user presence: keep as is","color: darkgrey;")}else{if(a?.length){let z=this.getOldestHeartbeat(a,20);this.semDebuggerMode()&&console.log(`%c[DEBUG_VELT_SDK] [3.2] [No server data], computed oldest: user ${z?.userId} tab ${z?.tabId}, created ${z?.createdTimestamp}, my user ${c.userId} my tab ${p}`,"color: purple;"),z&&z.userId===c.userId&&z.tabId===p?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.3] [No server data], heartbeat check: I am the oldest, setting undefined","color: green;"),D=!0):this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.4] [No server data], heartbeat check: I am not the oldest","color: red;")}else s&&(s.differentUserPresentOnTab?(yield C(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.5] [No server data], different user present: set as viewer","color: blue;"),D=!1):s.sameUserPresentOnTab?(E(),this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.6] [No server data], same user on different tab: set as viewer (editor on diff tab)","color: blue;"),D=!1):(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.7] [No server data], no external presence: eligible for editor","color: green;"),D=!0));!a?.length&&!s&&(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.8] [No server data], no heartbeat, no user presence: default to undefined","color: darkgrey;"),D=!0)}let L;return D?(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.18] Final decision: shouldSetUndefined true","color: green;"),L={shouldSetUndefined:!0}):(this.semDebuggerMode()&&console.log("%c[DEBUG_VELT_SDK] [3.19] Final decision: return data","color: blue;"),L={data:g}),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3.20] determineEditorStatusNew returnValue",L),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [3] determineEditorStatusNew end **************"),L}catch(t){return this.loggingService.catch("Error in determineEditorStatusNew: ",t),{data:void 0,shouldSetUndefined:void 0}}})}semDebuggerMode(){try{return localStorage.getItem("vSemDebuggerMode")==="true"}catch(e){return this.loggingService.catch("Error in semDebuggerMode: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(y),J(Ve),J(Mn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Vi=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z,W,ee){this.afAuth=e,this.analyticsService=t,this.authService=r,this.configService=a,this.databaseService=s,this.docService=c,this.domService=p,this.heartbeatService=g,this.iamService=C,this.loggingService=E,this.commonDbService=D,this.liveStateActionsService=L,this.liveStateUtilsService=z,this.usersService=W,this.singleEditorDecisionEngine=ee,this.db=os(),this.liveStateDataMap$=new ve({}),this.liveStateDataMapDraft={},this.singleEditorMode$=new ve(!1),this.singleEditorModeConfig$=new ve(null),this.singleEditorLiveStateData$=new ve(null),this.singleEditorLiveStateData={},this.editorAccessTimeout$=new ve(j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME),this.editorAccessTransferOnTimeOut$=new ve(!0),this.defaultSingleEditorUIEnabled$=new ve(!0),this.editorAccessTimer$=new ve(new g0),this.autoSyncState$=new ve(!1),this.serverConnectionState$=new ve(rl.PENDING_INIT),this.userPresence$=new ve(null),this.user=null,this.keydownSubscription=null,this.isEditor$=new ve(null),this.preventEventsOnElementMap={},this.PREVENT_EVENTS=["click","mouseup","mousedown"],this.autoSyncStateHistory=null,this.singleEditorModeContainerIds$=new ve([]),this.inputChangeSubscriptionMap={},this.childListMutationSubscription=null,this.tabId=this.domService.getTabId();try{this.loggingService.log("%c[WB] Creating CLASS: LiveStateService","color: blue;"),this.analyticsService.setLiveStateService(this),this.getSingleEditorMode$().subscribe(me=>{me?this.heartbeatService.enableHeartbeat():this.heartbeatService.disableHeartbeat()}),this.databaseService.getDb().pipe(Le(me=>!!me),rt(1)).subscribe(me=>{me&&(this.db=me,this.getUser(),this.getDocumentPaths(),this.subscribeLiveStateData().subscribe(),this.singleEditorMode$.subscribe(Ce=>{Ce&&this.detectKeydownOnInput()}),this.autoSyncState$.subscribe(Ce=>{Ce?(this.detectLiveSyncInputs(),this.observeElementAddedOnDom()):(this.unsubscribeInputChanges(),this.childListMutationSubscription?.unsubscribe(),this.childListMutationSubscription=null)}),this.updateOnDatabaseDisconnect().subscribe(()=>{},Ce=>{this.loggingService.catch("Error in LiveStateService constructor updateOnDatabaseDisconnect: ",Ce)}),this.updateServerStateOnDatabaseDisconnect().subscribe(()=>{},Ce=>{this.loggingService.catch("Error in LiveStateService constructor updateServerStateOnDatabaseDisconnect: ",Ce)}))},me=>{this.loggingService.catch("Error in LiveStateService getDb subscription: ",me)}),this.liveStateDataMap$.pipe(Le(me=>!!me?.default?.autoSyncState),ce(me=>me.default?.autoSyncState),Ct((me,Ce)=>JSON.stringify(me||{})===JSON.stringify(Ce||{}))).subscribe(me=>{me&&(this.getAutoSyncState()&&(!this.autoSyncStateHistory&&me?.history&&this.updateLiveStateSyncInputDataLocally(me.history),me?.current&&this.updateLiveStateSyncInputDataLocally({[me.current.liveStateDataId]:me.current})),!this.autoSyncStateHistory&&me?.history&&(this.autoSyncStateHistory=me.history))}),this.docService.addPreDocumentIdChangeFunction("live-state-service",me=>(this.updateUserPresence(null),this.isUserEditor()?.isEditor&&(!this.getSingleEditorModeConfig()?.singleTabEditor||this.isUserEditor()?.isEditorOnCurrentTab)?this.removeEditorAccess({metadata:{from:"addPreDocumentIdChangeFunction-liveStateService",reason:"Document id changed"}}):Promise.resolve())),this.singleEditorLiveStateData$.pipe(wi()).subscribe(([me,Ce])=>{try{let Ae=Ce?.requestEditorAccess?.status,Ge=me?.requestEditorAccess?.status,Ne=this.authService.getUser();if(Ae==="pending"){if(Ne?.userId===Ce?.editor?.userId){let Ie={viewer:_a(Ce?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"requested"};this.liveStateActionsService?.onAccessRequested(Ie)}return}if(Ae==="cancelled"){if(Ne?.userId===Ce?.editor?.userId){let Ie={viewer:_a(Ce?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"canceled"};this.liveStateActionsService?.onAccessRequestCanceled(Ie)}return}if(Ge==="pending"&&!Ae){if(me?.requestEditorAccess?.user?.userId===Ce?.editor?.userId){if(me?.requestEditorAccess?.user?.userId===Ne?.userId){let Ie={viewer:_a(me?.editor)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"accepted"};this.liveStateActionsService?.onAccessAccepted(Ie)}return}if(me?.requestEditorAccess?.user?.userId!==Ce?.editor?.userId){if(me?.requestEditorAccess?.user?.userId===Ne?.userId){let Ie={viewer:_a(me?.requestEditorAccess?.user)??void 0,editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),status:"rejected"};this.liveStateActionsService?.onAccessRejected(Ie)}return}}}catch(Ae){this.loggingService.catch("Error in LiveStateService singleEditorLiveStateData$ subscription: ",Ae)}}),this.isUserEditor$().pipe(Ct(pn)).subscribe(me=>{try{if(me){this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_USER_EDITOR_STATS,{isEditor:me?.isEditor,isEditorOnCurrentTab:me?.isEditorOnCurrentTab});let Ce=this.singleEditorLiveStateData$.value;if(me?.isEditor)if(me?.isEditorOnCurrentTab){let Ae={editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),role:"editor"};this.liveStateActionsService?.onEditorAssigned(Ae)}else{let Ae={editor:_a(Ce?.editor)??void 0,timestamp:new Date().getTime(),role:"editorOnDifferentTab"};this.liveStateActionsService?.onEditorOnDifferentTabDetected(Ae)}else{let Ae={viewer:_a(this.authService.getUser())??void 0,timestamp:new Date().getTime(),role:"viewer"};this.liveStateActionsService?.onViewerAssigned(Ae)}}}catch(Ce){this.loggingService.catch("Error in LiveStateService isUserEditor$ subscription: ",Ce)}})}catch(me){this.loggingService.catch("Error in LiveStateService constructor: ",me)}}observeElementAddedOnDom(){try{this.loggingService.log("%c[WB] Calling FUNCTION: observeElementAddedOnDom","color: green;"),this.childListMutationSubscription&&(this.childListMutationSubscription.unsubscribe(),this.childListMutationSubscription=null),this.childListMutationSubscription=this.domService.getChildListMutation$().subscribe(e=>{e?.length&&e.forEach(t=>{let r=Array.from(t.addedNodes||[]).filter(a=>a instanceof HTMLElement);r?.forEach(a=>{jj(a,!0)?.forEach(p=>{typeof p?.getAttribute=="function"&&p?.getAttribute(j.ATTRIBUTES.VELT_SYNC_STATE)&&this.subscribeInputChanges(p)})}),r?.length&&this.isEditor$?.value?.isEditor===!1&&(this.disableInputElements(),this.disableElementEvents())})},e=>{this.loggingService.catch("Error in LiveStateService domService getChildListMutation$ subscription: ",e)})}catch(e){this.loggingService.catch("Error in LiveStateService observeElementAddedOnDom: ",e)}}detectKeydownOnInput(){try{this.loggingService.log("%c[WB] Calling FUNCTION: detectKeydownOnInput","color: green;"),this.unsubscribeKeydownSubscription(),this.keydownSubscription=this.domService.onWindowKeydown$().pipe(Le(e=>e?.target instanceof HTMLInputElement||e?.target instanceof HTMLTextAreaElement||e?.target instanceof HTMLSelectElement),Le(e=>!!this.isElementInsideSingleEditorModeContainerElements(e?.target)),rt(1)).subscribe(e=>{this.unsubscribeKeydownSubscription(),this.getSingleEditorModeConfig()?.customMode||this.setUserAsEditor({skipEditorCheck:!0})},e=>{this.loggingService.catch("Error in LiveStateService detectKeydownOnInput subscription: ",e)})}catch(e){this.loggingService.catch("Error in LiveStateService detectKeydownOnInput: ",e)}}unsubscribeKeydownSubscription(){try{this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribeKeydownSubscription","color: green;"),this.keydownSubscription&&(this.keydownSubscription.unsubscribe(),this.keydownSubscription=null)}catch(e){this.loggingService.catch("Error in LiveStateService unsubscribeKeydownSubscription: ",e)}}getDocumentPaths(){try{this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().subscribe(e=>{this.documentPaths=e,this.updateLiveStateDataFromDraft()})}catch(e){this.loggingService.catch("Error in LiveStateService getDocumentPaths: ",e)}}getUser(){try{this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().subscribe(e=>{this.user=e,this.updateLiveStateDataFromDraft()})}catch(e){this.loggingService.catch("Error in LiveStateService getUser: ",e)}}updateLiveStateDataFromDraft(){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateLiveStateDataFromDraft","color: green;"),this.liveStateDataMapDraft?.custom&&this.user&&this.documentPaths&&(Object.keys(this.liveStateDataMapDraft.custom).forEach(e=>{this.setLiveStateData(e,this.liveStateDataMapDraft.custom[e])}),this.liveStateDataMapDraft={})}catch(e){this.loggingService.catch("Error in LiveStateService updateLiveStateDataFromDraft: ",e)}}subscribeLiveStateData(){return this.loggingService.log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed({firebaseUser:e,liveStateData:{}})),he(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(t=>(e.featureAllowed=t,e))):se(e)),he(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(ce(t=>(e.featureAllowed=!t,e))):se(e)),he(e=>e.featureAllowed?se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(Le(r=>!!r),ce(r=>(this.documentPaths=r,t.documentPaths=r,t)))),on(t=>{this.serverConnectionState$?.value===rl.PENDING_INIT&&t?.documentPaths?.liveState&&this.serverConnectionState$.next(rl.PENDING_DATA)}),he(t=>this.domService.onNetworkStatusChange$().pipe(Le(r=>r),ce(()=>t))),he(t=>this.getDataFromDocumentId().pipe(ce(r=>(t.liveStateData=r,I({},t))))),he(t=>this.getSingleEditorMode$().pipe(ce(()=>t))),ce(t=>{if([rl.ONLINE,rl.OFFLINE].includes(this.serverConnectionState$?.value)||this.serverConnectionState$.next(rl.ONLINE),t.liveStateData)this.liveStateDataMap$.next(t.liveStateData);else{let r=this.liveStateDataMap$.value;r&&Object.keys(r).length>0&&this.liveStateDataMap$.next({})}return t}),he(t=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] \u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}\u{1F7E9}"),t?.liveStateData?.default?.singleEditorMode?.editor?this.listenToEditorAndAllHeartbeat$(t?.liveStateData?.default?.singleEditorMode?.editor?.userId,t?.liveStateData?.default?.singleEditorMode?.tabId).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0] editor or all heartbeatData"),T(I({},t),{heartbeatData:r?.data,heartbeatStatus:r?.status})))):this.heartbeatService.getHeartbeatData({documentId:this.documentPaths?.documentId,lastUpdatedTimestamp:{$gte:Date.now()-2e4}}).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0] all heartbeatData"),T(I({},t),{heartbeatData:r})))))),on(t=>{let r=t?.heartbeatData;if(!r)this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][1] heartbeatData is null");else{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][1] heartbeatData length:",r?.length);let a=s=>(Date.now()-s)/1e3+" ago";console.table(r?.map(s=>({userId:s?.userId,tabId:s?.tabId,lastUpdatedTimestamp:a(s?.lastUpdatedTimestamp),createdTimestamp:a(s?.createdTimestamp),isCurrentTab:s?.tabId===this.tabId,currentTabId:this.tabId})))}}),he(t=>this.getSingleEditorMode()?this.getUserPresence$().pipe(ce(r=>{let a=[];if(!t?.liveStateData?.default?.singleEditorMode){let s=this.singleEditorLiveStateData$.value&&typeof this.singleEditorLiveStateData$.value=="object"?JSON.parse(JSON.stringify(this.singleEditorLiveStateData$.value)):this.singleEditorLiveStateData$.value;a.push({eventName:Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_EMPTY_DATA_STATS,properties:{previousSingleEditorModeData:s,currentSingleEditorModeData:t?.liveStateData?.default?.singleEditorMode,currentSingleEditorModeDataParentStats:{liveStateDataAvailable:!!t?.liveStateData,defaultAvailable:!!t?.liveStateData?.default,singleEditorModeAvailable:!!t?.liveStateData?.default?.singleEditorMode}}})}this.updateSingleEditorLiveSyncDataNew(t?.liveStateData?.default?.singleEditorMode||{},r,t?.heartbeatData??null)})):se(t))):se({})))}listenToEditorHeartbeat$(e,t){return this.heartbeatService.getSpecificHeartbeat(e,t).pipe(ce(r=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.005] listenToEditorHeartbeat$ heartbeatData",r),r)))}listenToAllHeartbeat$(){return this.heartbeatService.getHeartbeatData({documentId:this.documentPaths?.documentId,lastUpdatedTimestamp:{$gte:Date.now()-2e4}}).pipe(rt(1),ce(e=>(this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.004] listenToAllHeartbeat$ heartbeatData",e),e)))}listenToEditorAndAllHeartbeat$(e,t){let a=this.listenToEditorHeartbeat$(e,t).pipe(ce(p=>p?.id?[p]:null),rd()),s=this.listenToAllHeartbeat$().pipe(ce(p=>({status:"ALL_USERS_FALLBACK",data:p})));return a.pipe(rt(1),he(p=>{let g=Date.now(),C=p?.[0];if(!C||g-C.lastUpdatedTimestamp>1e4)return s;{let D=se({status:"SINGLE_EDITOR_ACTIVE",data:p}),L=a.pipe(Ka(1),ce(z=>({status:"SINGLE_EDITOR_ACTIVE",data:z})),l4({each:1e4,with:()=>s}));return rc(D,L)}})).pipe(Ct((p,g)=>this.areHeartbeatStatesEqual(p,g)))}listenToEditorAndAllHeartbeat$OldWorking(e,t){try{let r=this.listenToEditorHeartbeat$(e,t).pipe(rd()).pipe(ce(c=>c?[c]:null)),a=1e4;return r.pipe(rt(1),he(c=>{let p=Date.now(),g=c?.[0];if(!g?.lastUpdatedTimestamp||p-g?.lastUpdatedTimestamp>a)return this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.002] Initial heartbeat is stale. Switching to allHeartbeats..."),this.listenToAllHeartbeat$();{this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK][0.003] Initial heartbeat is fresh. Monitoring for inactivity...");let E=se(c),D=r.pipe(Ka(1),l4({each:a,with:()=>this.listenToAllHeartbeat$()}));return rc(E,D)}}))}catch{return se(null)}}areHeartbeatStatesEqual(e,t){if(e.status!==t.status)return!1;switch(t.status){case"SINGLE_EDITOR_ACTIVE":let r=e.data,a=t.data;return!r?.[0]||!a?.[0]?!1:r[0].userId===a[0].userId&&r[0].tabId===a[0].tabId;case"ALL_USERS_FALLBACK":let s=!e.data||e.data.length===0,c=!t.data||t.data.length===0;if(s&&c)return!0;if(s||c||e.data?.length!==t.data?.length)return!1;let p=new Set(e.data?.map(C=>C.userId)),g=new Set(t.data?.map(C=>C.userId));for(let C of p)if(!g.has(C))return!1;return!0;case"NO_DATA":return!0;default:return!1}}updateSingleEditorLiveSyncDataNew(e,t,r){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateSingleEditorLiveSyncData","color: green;"),Ii(e,{})&&!this.keydownSubscription&&this.detectKeydownOnInput();let a=JSON.parse(JSON.stringify(e)),s=yield this.singleEditorDecisionEngine.determineEditorStatusNew({singleEditorModeData:a,userPresence:t,heartbeatData:r,currentUser:this.authService.getUser(),currentTabId:this.tabId});this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [10] LiveStateService updateSingleEditorLiveSyncDataNew newData",s?.shouldSetUndefined,s?.data,"heartbeatData length:",r?.length),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] \u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B\u2B1B");let c;if(this.domService.getNetworkStatus()||(c=null),e=s?.data??{},s?.shouldSetUndefined||(c=null),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [11] LiveStateService updateSingleEditorLiveSyncDataNew editorEmptyStateValue",e,c,this.isEditor$?.value),e&&!e?.editor&&this.isEditor$?.value!==c&&this.isEditor$.next(c),Ii(this.singleEditorLiveStateData,e))return;{this.singleEditorLiveStateData=e,this.singleEditorLiveStateData$.next(e);let p;if(this.singleEditorLiveStateData&&typeof this.singleEditorLiveStateData=="object"&&(p=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS,{singleEditorLiveStateData:p}),this.singleEditorLiveStateData?.editor){let g=this.authService.getUser();this.singleEditorLiveStateData?.editor?.userId!==g?.userId?this.makeReader():this.makeEditor()}else this.isEditor$?.value!==c&&this.isEditor$.next(c),this.enableInputElements(),this.enableElementEvents();this.editorAccessTimerInterval&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"&&this.clearEditorAccessTimerInterval(),this.requestAccessTimer&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"?this.clearRequestAccessTimer():this.singleEditorLiveStateData?.requestEditorAccess?.status==="pending"&&this.isUserEditor()?.isEditor&&this.isUserEditor()?.isEditorOnCurrentTab&&this.setRequestAccessTimer(this.singleEditorLiveStateData?.requestEditorAccess?.editorAccessTimeout||j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME)}}catch{}})}updateSingleEditorLiveSyncData(a,s){return Q(this,arguments,function*(e,t,r=[]){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: updateSingleEditorLiveSyncData","color: green;"),Ii(e,{})){let g=yield this.fetchSingleEditorLiveStateDataFromDatabase();if(!Ii(g,e)&&(r.push({eventName:Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_MISMATCH,properties:{serverData:g,localData:e}}),g&&typeof g=="object")){let C=yield this.liveStateUtilsService.resolveAndMergeSingleEditorLiveStateDataWithUser(JSON.parse(JSON.stringify(g)));e=JSON.parse(JSON.stringify(C))}}Ii(e,{})&&!this.keydownSubscription&&this.detectKeydownOnInput();let c=e&&typeof e=="object"?JSON.parse(JSON.stringify(e)):e;if(t&&(e&&typeof e=="object"&&(e=JSON.parse(JSON.stringify(e))),!e?.editor)){let g=this.authService.getUser();if(t?.sameUserPresentOnTab)e.editor=g,e.tabId=`sameUserPresentOnTab_${this.tabId}`;else if(t?.differentUserPresentOnTab){let C=t?.userIds?.[0],E;C&&(yield this.usersService.resolveUsers({userIds:[C],forceResolve:!0}),E=this.usersService.getUserById(C)),E?(e.editor=E,e.tabId=`differentUserPresentOnTab_${this.tabId}`):(e.editor={userId:`anonymous_${g?.userId}`,name:"Anonymous"},e.tabId=`differentUserPresentOnTab_${this.tabId}`)}}let p;if(this.domService.getNetworkStatus()||(p=null),e&&!e?.editor&&this.isEditor$?.value!==p&&!t?.sameUserPresentOnTab&&!t?.differentUserPresentOnTab&&this.isEditor$.next(p),Ii(this.singleEditorLiveStateData,e))return;{t&&this.compareServerAndExternalData(c,t),r?.length>0&&r.forEach(C=>{C?.eventName&&this.analyticsService.trackEvent(C.eventName,C.properties)}),this.singleEditorLiveStateData=e,this.singleEditorLiveStateData$.next(e);let g;if(this.singleEditorLiveStateData&&typeof this.singleEditorLiveStateData=="object"&&(g=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_STATS,{singleEditorLiveStateData:g}),this.singleEditorLiveStateData?.editor){let C=this.authService.getUser();this.singleEditorLiveStateData?.editor?.userId!==C?.userId?this.makeReader():this.makeEditor()}else this.isEditor$?.value!==p&&this.isEditor$.next(p),this.enableInputElements(),this.enableElementEvents();this.editorAccessTimerInterval&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"&&this.clearEditorAccessTimerInterval(),this.requestAccessTimer&&this.singleEditorLiveStateData?.requestEditorAccess?.status!=="pending"?this.clearRequestAccessTimer():this.singleEditorLiveStateData?.requestEditorAccess?.status==="pending"&&this.isUserEditor()?.isEditor&&this.isUserEditor()?.isEditorOnCurrentTab&&this.setRequestAccessTimer(this.singleEditorLiveStateData?.requestEditorAccess?.editorAccessTimeout||j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME)}}catch{}})}compareServerAndExternalData(e,t){try{if(t){let r=this.authService.getUser(),a={isEditor:e?.editor?.userId===r?.userId,isEditorOnCurrentTab:e?.editor?.userId===r?.userId&&e?.tabId===this.tabId},s={isEditor:t?.sameUserPresentOnTab&&!t?.differentUserPresentOnTab,isEditorOnCurrentTab:!1};Ii(a,s)||this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_DATA_MISMATCH_WITH_EXTERNAL,{serverUserEditorAccess:a,externalUserEditorAccess:s,serverData:e,externalData:t})}}catch(r){this.loggingService.catch("Error in LiveStateService compareServerAndExternalData: ",r)}}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.LIVE_STATE_SYNC)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Live state sync feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>(this.db=t,this.configService?.getApiKey()&&this.documentPaths?.liveState?this.commonDbService.dbListener({feature:"allLiveStates",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(Le(r=>!!r?.data),ce(r=>r?.data&&typeof r?.data=="object"?JSON.parse(JSON.stringify(r?.data)):r?.data),Nn(r=>(this.loggingService.catch("Error in LiveStateService getDataFromDocumentId: ",r),se({})))):se({}))),Ct(pn))}getLiveStateData$(e,t){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveStateData$","color: green;"),ei(this.afAuth).pipe(Le(r=>!!r),he(r=>this.isFeatureAllowed({firebaseUser:r,liveStateData:{}})),he(r=>r.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(a=>(r.featureAllowed=a,r))):se(r)),he(r=>r.featureAllowed?this.authService.isPlanExpired$().pipe(ce(a=>(r.featureAllowed=!a,r))):se(r)),he(r=>r.featureAllowed?se(r).pipe(he(a=>this.docService.getDocumentPaths$().pipe(ce(s=>(this.documentPaths=s,a.documentPaths=s,a)))),he(a=>{let s=t?.listenToNewChangesOnly?1:0;return this.getLiveStateDataFromDatabase$(e).pipe(Ka(s))}),ce(a=>{if(a)if(e){let s=_t(e+""),c=a?.[s];if(c){let p=c?.data;if(c?.tabId&&this.tabId&&c?.tabId===this.tabId)return;if(c?.isDataStringified&&typeof p=="string")try{p=JSON.parse(p)}catch{}return p}else return}else{let s={};return Object.keys(a||{}).forEach(c=>{if(a[c]?.liveStateDataId){let p=a[c],g=p?.data;if(p?.isDataStringified&&typeof g=="string")try{g=JSON.parse(g)}catch{}s[p.liveStateDataId]=g}}),s}return a})):se(void 0).pipe(Le(Boolean))),Ct((r,a)=>JSON.stringify(r||{})===JSON.stringify(a||{})),Le(r=>r!==void 0),ce(r=>r))}catch(r){return this.loggingService.catch("Error in LiveStateService getLiveStateData$: ",r),se(null)}}getLiveStateDataFromDatabase$(e){try{return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{this.db=t;let r=e?_t(e+""):void 0;return this.configService?.getApiKey()&&this.documentPaths?.liveState?this.commonDbService.dbListener({feature:r?"liveStateCustom":"allLiveStateCustoms",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:r,skipFirestore:!0}}).pipe(ce(a=>a?.data),ce(a=>{if(a)return r?{[r]:a}:a}),Nn(a=>(this.loggingService.catch("Error in LiveStateService getLiveStateDataFromDatabase$: ",a),se(null)))):se(void 0)}))}catch(t){return this.loggingService.catch("Error in LiveStateService getLiveStateDataFromDatabase$: ",t),se(void 0)}}setLiveStateData(e,t,r){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: setLiveStateData","color: green;");try{let a=this.authService.getUser();if(e&&this.documentPaths?.liveState&&a){let s=_t(e+""),c=!1;try{if(r?.merge&&typeof t=="object"){let g=yield this.commonDbService.getData({feature:"liveStateCustom",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:s,skipFirestore:!0}});if(g?.isDataStringified){let C=JSON.parse(g?.data);typeof t=="object"&&(t=I(I({},C),t))}}}catch{}try{typeof t=="object"&&(t=JSON.stringify(t),c=!0)}catch{}let p={id:s,lastUpdated:this.timestamp,liveStateDataId:e,data:t,updatedBy:a,tabId:this.tabId,isDataStringified:c};yield this.commonDbService.setData({feature:"liveStateCustom",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:s,skipFirestore:!0},data:JSON.parse(JSON.stringify(p))})}else this.loggingService.warn("liveStateDataId or documentPaths or user is null"),this.liveStateDataMapDraft?.custom||(this.liveStateDataMapDraft.custom={}),e&&(this.liveStateDataMapDraft.custom[e]=t)}catch(a){this.loggingService.catch("Error in LiveStateService _setLiveStateData: ",a)}})}getFormElements(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getInputElements","color: green;"),document.querySelectorAll("input, textarea, select, button, [contenteditable]")}catch(e){return this.loggingService.catch("Error in LiveStateService getInputElements: ",e),null}}disableInputElements(){try{this.loggingService.log("%c[WB] Calling FUNCTION: disableInputElements","color: green;"),this.getFormElements()?.forEach(t=>{if(this.isElementInsideSingleEditorModeContainerElements(t)&&!this.isSingleEditorModeDisabledForElement(t)&&!Xi(t)){let r=t?.hasAttribute("disabled");t?.hasAttribute("contenteditable")&&(r=t?.getAttribute("contenteditable")==="false"),r||(t.setAttribute("disabled","true"),t.setAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO,"true"),t?.hasAttribute("contenteditable")&&t.setAttribute("contenteditable","false"))}})}catch(e){this.loggingService.catch("Error in LiveStateService disableInputElements: ",e)}}enableInputElements(){try{this.loggingService.log("%c[WB] Calling FUNCTION: enableInputElements","color: green;"),this.getFormElements()?.forEach(t=>{t?.hasAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO)&&(t.removeAttribute("disabled"),t.removeAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_AUTO),t?.getAttribute("contenteditable")&&t.setAttribute("contenteditable","true"))})}catch(e){this.loggingService.catch("Error in LiveStateService enableInputElements: ",e)}}disableElementEvents(){try{this.loggingService.log("%c[WB] Calling FUNCTION: disableElementEvents","color: green;"),document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SYNC_ACCESS}]`)?.forEach(t=>{let r=this.domService.getXPath(t);r&&!this.preventEventsOnElementMap[r]&&(this.preventEventsOnElementMap[r]={element:t,events:{}},this.PREVENT_EVENTS.forEach(a=>{let s=pi(t,a,{capture:!0}).subscribe(c=>{try{c.preventDefault(),c.stopPropagation()}catch(p){this.loggingService.catch("Error in LiveStateService disableElementEvents subscription: ",p)}});this.preventEventsOnElementMap[r]?.events[a]?.unsubscribe(),this.preventEventsOnElementMap[r].events[a]=s}))})}catch(e){this.loggingService.catch("Error in LiveStateService disableElementClicks: ",e)}}enableElementEvents(){try{this.loggingService.log("%c[WB] Calling FUNCTION: enableElementEvents","color: green;"),Object.keys(this.preventEventsOnElementMap).forEach(e=>{let t=this.preventEventsOnElementMap[e];Object.keys(t.events||{}).forEach(r=>{t?.events[r]?.unsubscribe()})}),this.preventEventsOnElementMap={}}catch(e){this.loggingService.catch("Error in LiveStateService enableElementClicks: ",e)}}setUserAsEditor(e){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: setUserAsEditor","color: green;"),this.user&&this.documentPaths?.liveStateSingleEditorMode){if(this.analyticsService.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_TRIGGERED,{editorUserId:this.user?.userSnippylyId,tabId:this.tabId}),!e?.skipEditorCheck){let r=yield this.fetchSingleEditorLiveStateDataFromDatabase();if(r?.editor){let a=this.authService.getUser(),s=null;a?.userId===r?.editor?.userId?r?.tabId===this.tabId?s={code:"same_user_editor_current_tab",message:"Same user is already editor in current tab.",source:"setUserAsEditor"}:s={code:"same_user_editor_different_tab",message:"Same user is already editor in different tab.",source:"setUserAsEditor"}:s={code:"another_user_editor",message:"Another user is already editor.",source:"setUserAsEditor"};let c;return r&&typeof r=="object"&&(c=this.liveStateUtilsService.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(r)))),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_ERROR,{error:s,singleEditorLiveStateData:c}),this.semDebuggerMode()&&console.log("[DEBUG_VELT_SDK] [12] LiveStateService setUserAsEditor errorEvent",s),{error:s}}}let t={editor:this.user,tabId:this.tabId,editorAt:this.timestamp};this.commonDbService.setData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(t))})}}catch(t){this.loggingService.catch("Error in LiveStateService setUserAsEditor: ",t)}})}fetchSingleEditorLiveStateDataFromDatabase(){return Q(this,null,function*(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: fetchSingleEditorLiveStateDataFromDatabase","color: green;"),yield this.commonDbService.getData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}})}catch(e){return this.loggingService.catch("Error in LiveStateService fetchSingleEditorLiveStateDataFromDatabase: ",e),null}})}setRequestAccessTimer(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setRequestAccessTimer","color: green;"),this.requestAccessTimer||(this.requestAccessTimer=setTimeout(()=>{this.getEditorAccessTransferOnTimeOut()&&this.acceptEditorAccessRequest(),this.clearRequestAccessTimer()},e*1e3),this.setEditorAccessTimerInterval(e))}catch(t){this.loggingService.catch("Error in LiveStateService setRequestAccessTimer: ",t)}}clearRequestAccessTimer(){try{this.loggingService.log("%c[WB] Calling FUNCTION: clearRequestAccessTimer","color: green;"),this.requestAccessTimer&&(clearTimeout(this.requestAccessTimer),this.requestAccessTimer=null)}catch(e){this.loggingService.catch("Error in LiveStateService clearRequestAccessTimer: ",e)}}requestEditorAccess(){this.loggingService.log("%c[WB] Calling FUNCTION: requestEditorAccess","color: green;");try{return this.analyticsService.trackEvent(Z.Events.LiveStateSync.REQUEST_EDITOR_ACCESS_TRIGGERED),new Ut(e=>{let t=null;try{if(this.user&&this.documentPaths?.liveStateSingleEditorMode){let r=this.getEditorAccessTimeout(),a=Ai(this.db,`${this.documentPaths?.liveStateSingleEditorMode}`),s={requestEditorAccess:{user:this.user,requestedAt:this.timestamp,status:"pending",editorAccessTimeout:r,tabId:this.tabId}};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},errorCallback:c=>{this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",c),e.next(null),e.complete()},callback:()=>{r&&(this.requestAccessTimer=setTimeout(()=>{this.getEditorAccessTransferOnTimeOut()&&this.setUserAsEditor({skipEditorCheck:!0})},(r+3)*1e3),this.setEditorAccessTimerInterval(r+3)),t=this.getSingleEditorLiveStateData$().subscribe(c=>{c&&(c?.requestEditorAccess?c?.requestEditorAccess?.status==="cancelled"&&(e.next(null),e.complete()):c?.editor?.userId===this.user?.userId?(e.next(!0),e.complete()):(e.next(!1),e.complete()))})},data:JSON.parse(JSON.stringify(s))})}else e.next(!1),e.complete()}catch(r){this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",r),e.next(null),e.complete()}return()=>{t&&t?.unsubscribe()}})}catch(e){return this.loggingService.catch("Error in LiveStateService requestEditorAccess: ",e),se(null)}}makeEditor(){try{this.loggingService.log("%c[WB] Calling FUNCTION: makeEditor","color: green;");let e=this.singleEditorLiveStateData?.tabId===this.tabId;this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_MAKE_EDITOR_TRIGGERED,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!0,isEditorOnCurrentTab:e}),this.isEditor$.next({isEditor:!0,isEditorOnCurrentTab:e}),this.getSingleEditorModeConfig()?.customMode||(!this.getSingleEditorModeConfig()?.singleTabEditor||e?(this.enableInputElements(),this.enableElementEvents()):(this.disableInputElements(),this.disableElementEvents())),this.fetchSingleEditorLiveStateDataFromDatabase().then(t=>{this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_EDITOR,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!0,isEditorOnCurrentTab:e,singleEditorLiveStateDataOnServer:t})}).catch(t=>{})}catch(e){this.loggingService.catch("Error in LiveStateService makeEditor: ",e)}}makeReader(){try{this.loggingService.log("%c[WB] Calling FUNCTION: makeReader","color: green;"),this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_MAKE_READER_TRIGGERED,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!1,isEditorOnCurrentTab:!1}),this.isEditor$.next({isEditor:!1,isEditorOnCurrentTab:!1}),this.getSingleEditorModeConfig()?.customMode||(this.disableInputElements(),this.disableElementEvents()),this.fetchSingleEditorLiveStateDataFromDatabase().then(e=>{this.analyticsService.trackEvent(Z.Events.LiveStateSync.SEM_SINGLE_EDITOR_LIVE_STATE_DATA_ON_MAKE_READER,{editorUserId:this.singleEditorLiveStateData?.editor?.userId,tabId:this.tabId,editorTabId:this.singleEditorLiveStateData?.tabId,isEditor:!1,isEditorOnCurrentTab:!1,singleEditorLiveStateDataOnServer:e})}).catch(e=>{})}catch(e){this.loggingService.catch("Error in makeReader: ",e)}}acceptEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: acceptEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.isUserEditor()?.isEditor&&this.documentPaths?.liveStateSingleEditorMode){let e=this.singleEditorLiveStateData?.requestEditorAccess?.user,t=this.singleEditorLiveStateData?.requestEditorAccess?.tabId;if(e&&t){let r={editor:e,requestEditorAccess:null,tabId:t,editorAt:this.timestamp};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(r))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED,{editorUserId:e?.userSnippylyId,tabId:t})}}}catch(e){this.loggingService.catch("Error in acceptEditorAccessRequest: ",e)}})}rejectEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: rejectEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.isUserEditor()?.isEditor&&this.documentPaths?.liveStateSingleEditorMode){let e={requestEditorAccess:null};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED)}}catch(e){this.loggingService.catch("Error in LiveStateService rejectEditorAccessRequest: ",e)}})}cancelEditorAccessRequest(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: cancelEditorAccessRequest","color: green;"),this.user&&this.singleEditorLiveStateData?.requestEditorAccess&&this.documentPaths?.liveStateSingleEditorMode){let e={requestEditorAccess:T(I({},this.singleEditorLiveStateData?.requestEditorAccess),{status:"cancelled"})};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),e={requestEditorAccess:null},this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED)}}catch(e){this.loggingService.catch("Error in LiveStateService cancelEditorAccessRequest: ",e)}})}editCurrentTab(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: editCurrentTab","color: green;"),this.user&&this.isUserEditor()?.isEditor&&!this.isUserEditor()?.isEditorOnCurrentTab&&this.documentPaths?.liveStateSingleEditorMode){let e={tabId:this.tabId,editor:this.user,editorAt:this.timestamp};this.commonDbService.updateData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0,rtdbTransaction:!0},data:JSON.parse(JSON.stringify(e))}),this.analyticsService.trackEvent(Z.Events.LiveStateSync.EDIT_CURRENT_TAB_TRIGGERED,{tabId:this.tabId})}}catch(e){this.loggingService.catch("Error in LiveStateService editCurrentTab: ",e)}})}isUserEditor$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isUserEditor$","color: green;"),this.isEditor$.asObservable().pipe(Ct(pn))}catch(e){return this.loggingService.catch("Error in LiveStateService isUserEditor$: ",e),se(null)}}isUserEditor(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isUserEditor","color: green;"),this.isEditor$.value}catch(e){return this.loggingService.catch("Error in LiveStateService isUserEditor: ",e),null}}getEditor$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getEditor$","color: green;"),this.getSingleEditorLiveStateData$().pipe(ce(e=>e?.editor||null),Ct())}catch(e){return this.loggingService.catch("Error in LiveStateService getEditor$: ",e),se(null)}}isEditorAccessRequested$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: isEditorAccessRequested$","color: green;"),this.isUserEditor$().pipe(he(e=>e?.isEditor?this.singleEditorLiveStateData$.pipe(ce(t=>t?.requestEditorAccess?{requestStatus:"requested",requestedBy:t?.requestEditorAccess?.user}:null)):se(null)),Ct((e,t)=>JSON.stringify(e||{})===JSON.stringify(t||{})))}catch(e){return this.loggingService.catch("Error in LiveStateService isEditorAccessRequested$: ",e),se(null)}}removeEditorAccess(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: removeEditorAccess","color: green;"),this.analyticsService.trackEvent(Z.Events.LiveStateSync.REMOVE_EDITOR_ACCESS,{removeEditorAccessMetadata:e?.metadata}),(this.user||this.authService.getAuthUser())&&this.documentPaths?.liveStateSingleEditorMode&&(yield this.commonDbService.deleteData({feature:"liveStateSingleEditorMode",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}}))}catch(t){this.loggingService.catch("Error in LiveStateService removeEditorAccess: ",t)}})}getSingleEditorLiveStateData$(){return this.singleEditorLiveStateData$.asObservable().pipe(Ct(pn))}enableSingleEditorMode(e){try{if(this.singleEditorMode$.value===!0)return;this.singleEditorMode$.next(!0),e?this.singleEditorModeConfig$.next(e):this.singleEditorModeConfig$.next(new Sk)}catch(t){this.loggingService.catch("Error in LiveStateService enableSingleEditorMode: ",t)}}disableSingleEditorMode(){try{if(this.singleEditorMode$.value===!1)return;this.singleEditorMode$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableSingleEditorMode: ",e)}}getSingleEditorMode$(){return this.singleEditorMode$.asObservable()}getSingleEditorMode(){return this.singleEditorMode$.value}getSingleEditorModeConfig$(){return this.singleEditorModeConfig$.asObservable()}getSingleEditorModeConfig(){return this.singleEditorModeConfig$.value}enableAutoSyncState(){try{if(this.autoSyncState$.value===!0)return;this.autoSyncState$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableAutoSyncState: ",e)}}disableAutoSyncState(){try{if(this.autoSyncState$.value===!1)return;this.autoSyncState$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableAutoSyncState: ",e)}}getAutoSyncState$(){return this.autoSyncState$.asObservable()}getAutoSyncState(){return this.autoSyncState$.value}setEditorAccessTimeout(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setEditorAccessTimeout","color: green;"),e&&this.editorAccessTimeout$.next(e)}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimeout: ",t)}}getEditorAccessTimeout$(){return this.editorAccessTimeout$.asObservable()}getEditorAccessTimeout(){return this.editorAccessTimeout$.value}enableEditorAccessTransferOnTimeOut(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableEditorAccessTransferOnTimeOut","color: green;"),this.editorAccessTransferOnTimeOut$.value===!0)return;this.editorAccessTransferOnTimeOut$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableEditorAccessTransferOnTimeOut: ",e)}}disableEditorAccessTransferOnTimeOut(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableEditorAccessTransferOnTimeOut","color: green;"),this.editorAccessTransferOnTimeOut$.value===!1)return;this.editorAccessTransferOnTimeOut$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableEditorAccessTransferOnTimeOut: ",e)}}getEditorAccessTransferOnTimeOut$(){return this.editorAccessTransferOnTimeOut$.asObservable()}getEditorAccessTransferOnTimeOut(){return this.editorAccessTransferOnTimeOut$.value}enableDefaultSingleEditorUI(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableDefaultSingleEditorUI","color: green;"),this.defaultSingleEditorUIEnabled$.value===!0)return;this.defaultSingleEditorUIEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in LiveStateService enableDefaultSingleEditorUI: ",e)}}disableDefaultSingleEditorUI(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableDefaultSingleEditorUI","color: green;"),this.defaultSingleEditorUIEnabled$.value===!1)return;this.defaultSingleEditorUIEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in LiveStateService disableDefaultSingleEditorUI: ",e)}}getDefaultSingleEditorUIEnabled$(){return this.defaultSingleEditorUIEnabled$.asObservable()}getDefaultSingleEditorUIEnabled(){return this.defaultSingleEditorUIEnabled$.value}setEditorAccessTimerInterval(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: setEditorAccessTimerInterval","color: green;"),this.clearEditorAccessTimerInterval(),e>0&&(this.editorAccessTimer$.next({state:"inProgress",durationLeft:e}),this.editorAccessTimerInterval=setInterval(()=>{try{e-=1,e<0?this.clearEditorAccessTimerInterval():e?this.editorAccessTimer$.next({state:"inProgress",durationLeft:e}):this.editorAccessTimer$.next({state:"completed"})}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimerCountdown interval: ",t),this.clearEditorAccessTimerInterval()}},1e3))}catch(t){this.loggingService.catch("Error in LiveStateService setEditorAccessTimerCountdown: ",t),this.clearEditorAccessTimerInterval()}}clearEditorAccessTimerInterval(){try{this.loggingService.log("%c[WB] Calling FUNCTION: clearEditorAccessTimerInterval","color: green;"),this.editorAccessTimerInterval&&(clearInterval(this.editorAccessTimerInterval),this.editorAccessTimerInterval=null,this.editorAccessTimer$.next({state:"idle"}))}catch(e){this.loggingService.catch("Error in LiveStateService clearEditorAccessTimerInterval: ",e)}}getEditorAccessTimer$(){return this.editorAccessTimer$.asObservable()}onServerConnectionStateChange$(){return this.serverConnectionState$.asObservable()}updateUserPresence(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateUserPresence","color: green;"),this.userPresence$.next(e)}catch(t){this.loggingService.catch("Error in LiveStateService updateUserPresence: ",t)}}getUserPresence$(){return this.userPresence$.asObservable().pipe(Ct(pn))}getUserPresence(){return this.userPresence$.value}detectLiveSyncInputs(){try{document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SYNC_STATE}]`)?.forEach(t=>{this.subscribeInputChanges(t)})}catch(e){this.loggingService.catch("Error in LiveStateService detectLiveSyncInputs: ",e)}}subscribeInputChanges(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: subscribeInputChanges","color: green;"),e){let t=e.tagName,r=this.domService.getXPath(e),a=_t(r);if(this.inputChangeSubscriptionMap[a])this.loggingService.warn("subscription already exists",a,e);else{this.inputChangeSubscriptionMap[a]={id:a,element:e};let s;switch(t?.toLowerCase()){case"input":s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={value:p?.target?.value,tagName:p?.target?.tagName,type:p?.target?.type};this.setLiveStateSyncInputData(p?.target,g)});break;case"textarea":s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={value:p?.target?.value,tagName:p?.target?.tagName};this.setLiveStateSyncInputData(p?.target,g)});break;default:e.getAttribute("contenteditable")&&(s=pi(e,"input").pipe(cr(300)).subscribe(p=>{let g={innerText:p?.target?.innerText,innerHTML:this.domService.sanitizeHtml(p?.target?.innerHTML),tagName:p?.target?.tagName,isContentEditable:!0};this.setLiveStateSyncInputData(p?.target,g)}));break}s&&(this.inputChangeSubscriptionMap[a]?.subscriptions||(this.inputChangeSubscriptionMap[a]={subscriptions:[]}),this.inputChangeSubscriptionMap[a].subscriptions?.push(s))}}}catch(t){this.loggingService.catch("Error in LiveStateService subscribeInputChanges: ",t)}}unsubscribeInputChanges(){try{this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribeInputChanges","color: green;"),Object.keys(this.inputChangeSubscriptionMap).forEach(e=>{this.inputChangeSubscriptionMap[e]?.subscriptions?.forEach(r=>{r.unsubscribe()})}),this.inputChangeSubscriptionMap={}}catch(e){this.loggingService.catch("Error in LiveStateService unsubscribeInputChanges: ",e)}}setLiveStateSyncInputData(e,t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: setLiveStateSyncInputData","color: green;"),this.user&&this.documentPaths?.liveState){let r=this.domService.getXPath(e),a=_t(r),s={id:a,lastUpdated:this.timestamp,liveStateDataId:r,data:t,updatedBy:this.user,tabId:this.tabId};this.commonDbService.updateData({feature:"liveStateAutoSyncStateCurrent",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0},data:JSON.parse(JSON.stringify(s))}),this.commonDbService.updateData({feature:"liveStateAutoSyncStateHistoryId",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:a,skipFirestore:!0},data:JSON.parse(JSON.stringify(s))})}}catch(r){this.loggingService.catch("Error in LiveStateService setLiveStateSyncInputData: ",r)}}updateLiveStateSyncInputDataLocally(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateLiveStateSyncInputDataLocally","color: green;"),this.user&&Object.keys(e).forEach(t=>{let r=e[t],a=this.domService.getElementFromXPath(r?.liveStateDataId),s=!1;if(r?.updatedBy?.userSnippylyId!==this.user?.userSnippylyId)s=!0;else{let c=r?.tabId&&this.tabId&&r?.tabId!==this.tabId,p=a?.contains(document.activeElement);c&&!bae()&&!p&&(s=!0)}if(s&&a)switch(a.value=r?.data?.value,a.tagName?.toLowerCase()){case"input":a.value=r?.data?.value;break;case"textarea":a.value=r?.data?.value;break;default:a.getAttribute("contenteditable")&&(a.innerHTML=this.domService.sanitizeHtml(r?.data?.innerHTML))}})}catch(t){this.loggingService.catch("Error in LiveStateService updateLiveStateSyncInputDataLocally: ",t)}}setSingleEditorModeContainerIds(e){this.singleEditorModeContainerIds$.next(e||[])}getSingleEditorModeContainerIds(){return this.singleEditorModeContainerIds$.asObservable()}isElementInsideSingleEditorModeContainerElements(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: isElementInsideSingleEditorModeContainerElements","color: green;");let t=this.singleEditorModeContainerIds$.value,r=document.querySelectorAll(`[${j.ATTRIBUTES.VELT_SINGLE_EDITOR_MODE_CONTAINER}]`);if(!t?.length&&!r?.length)return!0;if(t?.length)for(let a=0;a<t.length;a++){let s=document.getElementById(t[a]);if(s&&s.contains(e))return!0}if(r?.length)for(let a=0;a<r.length;a++){let s=r[a];if(s&&s.contains(e))return!0}return!1}catch(t){return this.loggingService.catch("Error in LiveStateService isElementInsideSingleEditorModeContainerElements: ",t),!1}}isSingleEditorModeDisabledForElement(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: isSingleEditorModeDisabledForElement","color: green;"),e){if(e.getAttribute(j.ATTRIBUTES.VELT_SYNC_ACCESS_DISABLED))return!0;{let r=e?.parentElement;if(r)return this.isSingleEditorModeDisabledForElement(r)}}return!1}catch(t){return this.loggingService.catch("Error in LiveStateService isSingleEditorModeDisabledForElement: ",t),!1}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),this.isUserEditor$().pipe(on(e=>{try{if(this.documentPaths?.liveStateSingleEditorMode){let t=Ai(this.db,`${this.documentPaths?.liveStateSingleEditorMode}`);e?.isEditor&&(!this.getSingleEditorModeConfig()?.singleTabEditor||e?.isEditorOnCurrentTab)?nl(t).remove():nl(t).cancel()}}catch(t){this.loggingService.catch("Error in LiveStateService updateOnDatabaseDisconnect tap: ",t)}}))}updateServerStateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateServerStateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.docService.getDocumentPaths()?.liveState&&e){let r=Ai(this.db,".info/connected"),a=!0;jp(r,s=>{let c=s.val();if(a&&c===!1){a=!1;return}a=!1,c===!1?this.serverConnectionState$.next(rl.OFFLINE):this.serverConnectionState$.value===rl.OFFLINE&&this.serverConnectionState$.next(rl.ONLINE)})}}catch(t){this.loggingService.catch("Error in updateServerStateOnDatabaseDisconnect:",t)}})))}getSemStats(){try{let e=!!this.authService?.getUser(),t=!!this.docService?.getDocumentPaths(),r=this.singleEditorMode$.value,a=!!this.singleEditorModeConfig$.value,s=this.isUserEditor(),c;this.singleEditorLiveStateData$.value&&typeof this.singleEditorLiveStateData$.value=="object"&&(c=this.liveStateUtilsService?.formatLiveStateSingleEditorModeData(JSON.parse(JSON.stringify(this.singleEditorLiveStateData$.value))));let p=this.getUserPresence();return{userAvailable:e,documentPathsAvailable:t,singleEditorModeEnabled:r,singleEditorModeConfig:a,isEditor:s,singleEditorLiveStateData:c,userPresence:p}}catch(e){this.loggingService.catch("Error in LiveStateService getSemStats: ",e)}}get timestamp(){return this.commonDbService.getServerTimestamp()}semDebuggerMode(){try{return localStorage.getItem("vSemDebuggerMode")==="true"}catch(e){return this.loggingService.catch("Error in LiveStateService semDebuggerMode: ",e),!1}}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(et),J(Ve),J(kt),J(Cn),J(ot),J(Be),J(sde),J(_n),J(y),J(dn),J(n9),J(Bk),J(Mn),J(lde))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Hl=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z){this.analyticsService=e,this.docService=t,this.domService=r,this.authService=a,this.afAuth=s,this.iamService=c,this.databaseService=p,this.configService=g,this.avatarService=C,this.loggingService=E,this.flockService=D,this.liveStateService=L,this.commonDbService=z,this.db=os(),this.presenceUser$=new ve(new Ik),this.documentPaths=null,this.inactivityTime=5*60*1e3,this.offlineInactivityTime=10*60*1e3,this.presenceUsers$=new ve([]),this.presenceUsersSubscription=null,this.includeSelf$=new ve(!0),this.userIdleStateDetectionSubscription=null,this.userOfflineStateDetectionSubscription=null;try{this.loggingService.log("%c[WB] Creating CLASS: PresenceService","color: blue;"),this.databaseService.getDb().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{W&&(this.db=W,this.getUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnUserDbConnectionStateChange().subscribe(()=>{},ee=>{this.loggingService.catch("Error in PresenceService constructor updateOnUserDbConnectionStateChange: ",ee)}),this.updateOnDatabaseDisconnect().subscribe(()=>{},ee=>{this.loggingService.catch("Error in PresenceService constructor updateOnDatabaseDisconnect: ",ee)}),this.updateOnDocumentFocusChange(),this.updateOnAllowedFeatureListChange())},W=>{this.loggingService.catch("Error in PresenceService constructor: ",W)}),this.authService.addPreSignOutFuction("presence-signout",this.signOutUser.bind(this)),this.presenceUsers$.pipe(wi()).subscribe(([W,ee])=>{try{ee?.length>=0&&this.analyticsService.updateDefaultProperties({presenceUsersCount:ee?.length}),sessionStorage.getItem(j.SESSION_STORAGE.VELT_PRESENCE_MULTIPLE_USERS_DETECTED)||ee?.length>1&&W.length!==ee.length&&(this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_MULTIPLE_USERS_DETECTED,{totalUsers:ee.length,presenceSnippylyUserIds:ee.map(Ce=>Ce.userSnippylyId),presenceClientUserIds:ee.map(Ce=>Ce.userId)}),sessionStorage.setItem(j.SESSION_STORAGE.VELT_PRESENCE_MULTIPLE_USERS_DETECTED,"true"));let me=this.authService.getUser();me&&!W?.some(Ce=>Ce.userId===me.userId)&&ee?.some(Ce=>Ce.userId===me.userId)&&this.presenceActionsService?.onMultipleUsersOnline({users:ee})}catch(me){this.loggingService.catch("Error in presenceUsers$ pairwise subscription: ",me)}}),this.authService.getUser$().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{W?(this.detectUserIdleState(),this.detectUserOfflineState()):(this.unsubscribeUserIdleStateDetectionSubscription(),this.unsubscribeUserOfflineStateDetectionSubscription())}),this.presenceUser$.subscribe(W=>{try{W?.onlineStatus&&this.presenceActionsService?.onUserStateChange({user:JSON.parse(JSON.stringify(W)),state:W?.onlineStatus})}catch(ee){this.loggingService.catch("Error in presenceUser$ subscription: ",ee)}},W=>{this.loggingService.catch("Error in presenceUser$ subscribe: ",W)}),this.domService.onNetworkStatusChange$().subscribe(W=>{try{!W&&this.presenceUser$?.value?.onlineStatus&&this.presenceActionsService?.onUserStateChange({user:T(I({},JSON.parse(JSON.stringify(this.presenceUser$.value))),{onlineStatus:j.PRESENCE_STATUS_OFFLINE}),state:j.PRESENCE_STATUS_OFFLINE})}catch(ee){this.loggingService.catch("Error in domService.onNetworkStatusChange$ subscription: ",ee)}},W=>{this.loggingService.catch("Error in domService.onNetworkStatusChange$ subscribe: ",W)})}catch(W){this.loggingService.catch("Error in PresenceService constructor: ",W)}}setPresenceActionsService(e){try{this.presenceActionsService=e}catch(t){this.loggingService.catch("Error in setPresenceActionsService: ",t)}}detectUserIdleState(){try{this.unsubscribeUserIdleStateDetectionSubscription();let e=!1;this.userIdleStateDetectionSubscription=this.domService.onWindowPointerMove$().pipe(Zh(2e3),on(()=>{this.presenceUser$.value&&e&&(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),e=!1)}),cr(this.inactivityTime),on(()=>{this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isUserIdle:!0}),e=!0})).subscribe()}catch(e){this.loggingService.catch("Error in detectUserIdleState: ",e)}}detectUserOfflineState(){try{this.unsubscribeUserOfflineStateDetectionSubscription();let e=!1;this.userOfflineStateDetectionSubscription=this.domService.onWindowPointerMove$().pipe(Zh(2e3),cr(this.offlineInactivityTime),on(()=>{this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_OFFLINE,{isUserIdle:!0}),e=!0})).subscribe()}catch(e){this.loggingService.catch("Error in detectUserOfflineState: ",e)}}unsubscribeUserIdleStateDetectionSubscription(){try{this.userIdleStateDetectionSubscription&&(this.userIdleStateDetectionSubscription.unsubscribe(),this.userIdleStateDetectionSubscription=null)}catch(e){this.loggingService.catch("Error in unsubscribeUserIdleStateDetectionSubscription: ",e)}}unsubscribeUserOfflineStateDetectionSubscription(){try{this.userOfflineStateDetectionSubscription&&(this.userOfflineStateDetectionSubscription.unsubscribe(),this.userOfflineStateDetectionSubscription=null)}catch(e){this.loggingService.catch("Error in unsubscribeUserOfflineStateDetectionSubscription: ",e)}}getUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&this.setPresenceUser(e)},e=>{this.loggingService.catch("Error in getUser: ",e)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e}),wi(),on(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths: ",e)})}getLocation(){this.docService.getLocation$().pipe(on(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation: ",e)})}getPresenceUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.presenceUser$.asObservable()}getPresenceUserValue(){return this.presenceUser$.value}getOnlineUsersOnCurrentDocument(e){return this.loggingService.log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(t=>!!t),he(t=>this.isFeatureAllowed({firebaseUser:t,users:[],filteredUsers:[]})),he(t=>t.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(r=>(t.featureAllowed=r,t))):se(t)),he(t=>t.featureAllowed?this.authService.isPlanExpired$().pipe(ce(r=>(t.featureAllowed=!r,t))):se(t)),he(t=>t.featureAllowed?se(t).pipe(he(r=>this.docService.getDocumentPaths$().pipe(ce(a=>(this.documentPaths=a,r.documentPaths=a,r)))),he(r=>this.getDataFromDocumentId(e).pipe(ce(a=>(r.users=a||[],I({},r))))),ce(r=>(e?e?.statuses?.length?r.filteredUsers=r?.users?.filter(a=>e?.statuses?.includes(a?.onlineStatus)):r.filteredUsers=r?.users?.slice():r.filteredUsers=this.filterOnlineUsers(r.users,r.firebaseUser),r)),he(r=>this.getIncludeSelf$().pipe(ce(a=>(a||(r.filteredUsers=r?.filteredUsers?.filter(s=>s?.userSnippylyId!==r.user?.userSnippylyId)),r)))),he(r=>r?.filteredUsers?se(r?.filteredUsers||[]):se([]))):se([])),Ct(pn))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.PRESENCE)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Presence feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{if(this.db=t,this.loggingService.log(this.db),this.configService?.getApiKey()&&this.documentPaths?.presence){let r=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allPresence",properties:{documentId:e?.documentId??this.documentPaths?.documentId,organizationId:e?.organizationId??this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[Vm("timestamp"),Um(r)]}}).pipe(Nn(a=>(this.loggingService.catch("Error in PresenceService getDataFromDocumentId: ",a),se(null))),ce(a=>a?.data),ce(a=>{let s=[];return a&&(s=Object.values(a).filter(c=>typeof c=="object")),s}))}else return se([])}))}filterOnlineUsers(e,t){this.loggingService.log("%c[WB] Calling FUNCTION: filterOnlineUsers","color: green;");try{let a=e.slice().filter(s=>{let c=Zp(s.timestamp);return s.userSnippylyId&&(s.onlineStatus===j.PRESENCE_STATUS_ONLINE||s.onlineStatus===j.PRESENCE_STATUS_AWAY)&&c<this.offlineInactivityTime});return this.presenceUsers$.next(a),a}catch(r){return this.loggingService.catch("Error in filterOnlineUsers:",r),[]}}enableIncludeSelf(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: enableIncludeSelf","color: green;"),this.includeSelf$.value===!0)return;this.includeSelf$.next(!0)}catch(e){this.loggingService.catch("Error in PresenceService enableIncludeSelf: ",e)}}disableIncludeSelf(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: disableIncludeSelf","color: green;"),this.includeSelf$.value===!1)return;this.includeSelf$.next(!1)}catch(e){this.loggingService.catch("Error in PresenceService disableIncludeSelf: ",e)}}getIncludeSelf$(){return this.includeSelf$.asObservable()}getIncludeSelf(){return this.includeSelf$.value}getPresenceUserFromExternalId(e){try{if(this.presenceUsers$.value&&this.presenceUsers$.value.length>0){let t=this.presenceUsers$.value.find(r=>r.userId===e);if(t)return t}return null}catch(t){return this.loggingService.catch("Error in getNameFromSnippylyId:",t),null}}getAnonymousAvatarImage(){return this.loggingService.log("%c[WB] Calling FUNCTION: getAnonymousAvatarImage","color: green;"),this.avatarService.generateUserImage()}updateCurrentPresenceUser(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateCurrentPresenceUser","color: green;");try{if(this.documentPaths?.presence&&e&&e.userId&&this.authService.isFeatureAllowed(Re.PRESENCE)){if(!e.isAnonymous){e.pageInfo=new ro,e?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(e.isTabAway=!1,e.isUserIdle=!1);let t=JSON.parse(JSON.stringify(e));this.authService.getUser()&&this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},t),{timestamp:this.timestamp})))})}this.presenceUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentPresenceUser:",t)}})}setCurrentPresenceUserStatus(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: setCurrentPresenceUserStatus","color: green;");try{this.loggingService.log(e);let r=this.presenceUser$.value;if(r.onlineStatus!==e){this.presenceUsersSubscription&&this.presenceUsersSubscription?.unsubscribe();let a=r.onlineStatus,s=e;this.presenceUsersSubscription=this.getPresenceUsers$().pipe(Le(c=>!!c?.length),rt(1)).subscribe(c=>{c?.length>1&&this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_USER_STATUS_CHANGED,{oldStatus:a,newStatus:s,totalUsers:c?.length,presenceSnippylyUserIds:c?.map(p=>p.userSnippylyId),presenceClientUserIds:c?.map(p=>p.userId)})})}r.onlineStatus=e,t&&(r.isTabAway=t?.isTabAway,r.isUserIdle=t?.isUserIdle),e===j.PRESENCE_STATUS_ONLINE&&(r.isTabAway=!1,r.isUserIdle=!1),e===j.PRESENCE_STATUS_OFFLINE&&this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession(),this.updateCurrentPresenceUser(r)}catch(r){this.loggingService.catch("Error in setCurrentPresenceUserStatus:",r)}})}updateUserStatusOnDocumentChange(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let r=this.presenceUser$.value;if(r.onlineStatus=e,t?.presence&&r&&r.userId&&!r.isAnonymous&&this.authService.isFeatureAllowed(Re.PRESENCE)){let a=JSON.parse(JSON.stringify(r));this.commonDbService.updateData({feature:"presence",properties:{documentId:t?.documentId,organizationId:t?.organizationId,userId:r.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(a))})}}catch(r){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",r)}})}updateUserOnLocationChange(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.presenceUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths?.presence&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(Re.PRESENCE)){let r=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(r))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnUserDbConnectionStateChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnUserDbConnectionStateChange","color: green;");let e=Ai(this.db,".info/connected"),t=z6(e).pipe(ce(r=>r?j.PRESENCE_STATUS_ONLINE:j.PRESENCE_STATUS_OFFLINE));return ei(this.afAuth).pipe(Ka(1),he(r=>r?t:se(j.PRESENCE_STATUS_OFFLINE)),on(r=>this.setCurrentPresenceUserStatus(r)))}updateOnDocumentFocusChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDocumentFocusChange","color: green;");try{document&&document.addEventListener("visibilitychange",e=>{this.authService.getUser()&&(document.visibilityState==="hidden"?(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isTabAway:!0}),this.flockService.getFlockMode()&&this.flockService.setTabFocused(!1)):(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),this.flockService.getFlockMode()&&this.flockService.setTabFocused(!0)))}),window&&(window.addEventListener("focus",()=>{this.authService.getUser()&&(this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_ONLINE),this.flockService.getFlockMode()&&this.flockService.setWindowFocused(!0))}),window.addEventListener("blur",()=>{this.authService.getUser()&&(document.visibilityState!=="hidden"&&this.setCurrentPresenceUserStatus(j.PRESENCE_STATUS_AWAY,{isTabAway:!0}),this.flockService.getFlockMode()&&this.flockService.setWindowFocused(!1))}))}catch(e){this.loggingService.catch("Error in updateOnDocumentFocusChange:",e)}}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.presenceUser$.value,r=!1;if(e.featureAllowList.includes(Re.PRESENCE)?t?.onlineStatus!==j.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=j.PRESENCE_STATUS_ONLINE,r=!0):t?.onlineStatus!==j.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=j.PRESENCE_STATUS_OFFLINE,r=!0),r&&this.authService.getUser()&&this.documentPaths?.presence&&t&&t.userId&&!t.isAnonymous){let a=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(a))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.documentPaths?.presence&&e){let t=yield Lm(e,!0).catch(a=>null);if(!t)return;let{user:r}=t.claims;if(!r?.isAnonymous&&this.documentPaths?.presence){this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession();let a=`${this.documentPaths.presence}/${e.uid}`;this.commonDbService.setupOnDisconnect(a,{onlineStatus:j.PRESENCE_STATUS_OFFLINE,timestamp:this.timestamp}).catch(s=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",s)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}setPresenceUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setPresenceUser","color: green;");try{let t=this.presenceUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let r=e?.name?.split(" ");if(r&&r.length>0){let a=r[0],s=r.length>1?r[r.length-1]:null,c=s?s[0]:null;a&&(t.name=`${a} ${c?c+".":""}`)}this.updateCurrentPresenceUser(t)}catch(t){this.loggingService.catch("Error in setPresenceUser:",t)}}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths?.presence&&e?this.commonDbService.getData({feature:"presence",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0}}).then(a=>{a&&(this.flockService.isInSession()&&this.flockService.removeCurrentUserFromSession(),this.commonDbService.updateData({feature:"presence",errorCallback:s=>{r(s)},callback:()=>{t(null)},properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a?.data??{}),{timestamp:this.timestamp,onlineStatus:j.PRESENCE_STATUS_OFFLINE})))})),t(null)}).catch(a=>{this.loggingService.catch("Error in signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in signOutUser:",a),r(a)}})}setInactivityTime(e){try{this.inactivityTime=e,this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime}),this.detectUserIdleState()}catch(t){this.loggingService.catch("Error in setInactivityTime: ",t)}}getInactivityTime(){return this.inactivityTime}setOfflineInactivityTime(e){try{e>=this.inactivityTime?(this.offlineInactivityTime=e,this.analyticsService.trackEvent(Z.Events.Presence.PRESENCE_SET_CUSTOM_OFFLINE_INACTIVITY_TIMER,{offlineInactivityTime:this.offlineInactivityTime}),this.detectUserOfflineState()):this.loggingService.catch("Error in setOfflineInactivityTime: ","offline-inactivity-time value is less than inactivity-time.")}catch(t){this.loggingService.catch("Error in setOfflineInactivityTime: ",t)}}getOfflineInactivityTime(){return this.offlineInactivityTime}getPresenceUsers$(){return this.presenceUsers$.asObservable()}getPresenceUsers(){return this.presenceUsers$.value}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(J(et),J(ot),J(Be),J(Ve),J(Oi),J(_n),J(Cn),J(kt),J(jd),J(y),J(zc),J(Vi),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var x0=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D){this.analyticsService=e,this.configService=t,this.presenceService=r,this.docService=a,this.afAuth=s,this.iamService=c,this.domService=p,this.databaseService=g,this.authService=C,this.loggingService=E,this.commonDbService=D,this.cursorUser$=new ve(new p0),this.documentPaths=null,this.inactivityTime=2*60*1e3,this.allowedElementIds$=new ve([]),this.cursorTagAvailable$=new ve(!1),this.cursorTagAvailable=!1,this.cursorUsers$=new ve([]),this.loggingService.log("%c[WB] Creating CLASS: CursorService","color: blue;");try{this.checkCursorTagAvailable(),this.databaseService.getDb().pipe(Le(L=>!!L),he(L=>this.cursorTagAvailable$.pipe(Le(z=>!!z),rt(1),ce(()=>L))),rt(1)).subscribe(L=>{L&&this.cursorTagAvailable&&(this.getPresenceUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnDatabaseDisconnect().subscribe(()=>{},z=>{this.loggingService.catch("Error in CursorService constructor updateOnDatabaseDisconnect: ",z)}),this.addMouseMoveListener(),this.addScreenSizeChangeListener(),this.updateOnAllowedFeatureListChange())},L=>{this.loggingService.catch("Error in CursorService constructor getDb: ",L)}),this.cursorUsers$.pipe(wi()).subscribe(([L,z])=>{sessionStorage.getItem(j.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED)||z?.length>1&&L.length!==z.length&&(this.analyticsService.trackEvent(Z.Events.Cursor.CURSOR_MULTIPLE_USERS_DETECTED,{totalUsers:z.length,cursorSnippylyUserIds:z.map(W=>W.userSnippylyId),cursorClientUserIds:z.map(W=>W.userId)}),sessionStorage.setItem(j.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED,"true"))}),this.authService.addPreSignOutFuction("cursor-signout",this.signOutUser.bind(this))}catch(L){this.loggingService.catch("Error in CursorService constructor: ",L)}}checkCursorTagAvailable(){this.loggingService.log("%c[WB] Calling FUNCTION: checkCursorTagAvailable","color: green;");try{this.cursorTagAvailable=!!document.querySelector(j.TAGS.VELT_CURSOR)||!!document.querySelector(j.TAGS.SNIPPYLY_CURSOR),this.cursorTagAvailable$.next(this.cursorTagAvailable)}catch(e){this.loggingService.catch("Error in CursorService checkCursorTagAvailable: ",e)}}addScreenSizeChangeListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addScreenSizeChangeListener","color: green;");try{this.docService.getDocumentPaths$().pipe(Le(e=>!!e),he(e=>this.domService.getCurrentWindowSize$("CursorService addScreenSizeChangeListener").pipe(Le(t=>!!t)))).subscribe(e=>{this.setCurrentCursorUserScreenSize(e)},e=>{this.loggingService.catch("Error in addScreenSizeChangeListener getCurrentWindowSize: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addScreenSizeChangeListener: ",e)}}addMouseMoveListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addMouseMoveListener","color: green;");try{this.domService.onWindowPointerMove$().pipe(Zh(50)).subscribe(e=>{e&&this.setCurrentCursorUserPosition(e.pageX,e.pageY,this.domService.getTargetElementForCursorPosition(e,!0,!1,!1))},e=>{this.loggingService.catch("Error in addMouseMoveListener getCurrentMousePosition: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addMouseMoveListener: ",e)}}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;");try{this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e}),wi(),on(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(j.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getDocumentPaths: ",e)}}getLocation(){try{this.docService.getLocation$().pipe(on(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getLocation: ",e)}}getCursorUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getCursorUser","color: green;"),this.cursorUser$.asObservable()}getPresenceUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.presenceService.getPresenceUser().pipe(Le(e=>!!e),Nn(e=>se(e.code))).subscribe(e=>{this.setCursorUser(e)},e=>{this.loggingService.catch("Error in getPresenceUser: ",e)})}getLiveCursorsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveCursorsOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed({firebaseUser:e,users:[],filteredUsers:[]})),he(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(t=>(e.featureAllowed=t,e))):se(e)),he(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(ce(t=>(e.featureAllowed=!t,e))):se(e)),he(e=>!e.featureAllowed||e?.user?.isAnonymous?se([]):se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(ce(r=>(this.documentPaths=r,t.documentPaths=r,t)))),he(t=>this.getDataFromDocumentId().pipe(ce(r=>(t.users=r||[],I({},t))))),ce(t=>(t.filteredUsers=this.filterOnlineUsers(t.users,t.firebaseUser),t)),he(t=>t?.filteredUsers?.length?this.domService.getCurrentWindowSize$("CursorService getLiveCursorsOnCurrentDocument").pipe(ce(()=>t)):se(t)),ce(t=>(t?.filteredUsers?.forEach(r=>{this.calculateCursorUserPosition(r)}),t)),he(t=>t?.filteredUsers?se(t?.filteredUsers||[]):se([])))))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.CURSOR)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Cursor feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>{if(this.configService?.getApiKey()&&this.documentPaths?.cursor){let r=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allCursors",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[Vm("timestamp"),Um(r)]}}).pipe(Nn(a=>(this.loggingService.catch("Error in CursorService getDataFromDocumentId: ",a),se(null))),ce(a=>a?.data),ce(a=>{let s=[];return a&&(s=Object.values(a).filter(c=>typeof c=="object")),s}))}else return se([])}))}calculateCursorUserPosition(e){try{if(e?.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r&&this.isElementInsideAllowedElements(r)){let a=r.getBoundingClientRect();a&&a.width&&a.height&&(e.position={top:a.top+a.height*e.targetElement.topPercentage/100,left:a.left+a.width*e.targetElement.leftPercentage/100})}}}}catch(t){this.loggingService.catch("Error in calculateCursorUserPosition:",t)}}filterOnlineUsers(e,t){try{let a=e.slice().filter(c=>{let p=Zp(c.timestamp);return c.userSnippylyId&&c.onlineStatus===j.PRESENCE_STATUS_ONLINE&&p<this.inactivityTime});this.cursorUsers$.next(a),a=a.filter(c=>c?.userSnippylyId!==t?.uid);let s=this.docService.getLocation();return s&&s.locationId?a=a.filter(c=>c.locationId===s.locationId):a=a.filter(c=>!c.locationId),a}catch(r){return this.loggingService.catch("Error in filterOnlineUsers:",r),[]}}setCursorUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorUser","color: green;");try{let t=this.cursorUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.comment="",this.authService.isFeatureAllowed(Re.PRESENCE)&&(t.onlineStatus=e?.onlineStatus),t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let r=this.domService.getCurrentWindowSizeValue();t.screenWidth=r?.screenWidth,t.screenHeight=r?.screenHeight,t.screenScrollHeight=r?.screenScrollHeight,this.updateCurrentCursorUser(t)}catch(t){this.loggingService.catch("Error in setCursorUser:",t)}}setCurrentCursorUserPosition(e,t,r){try{let a=this.cursorUser$.value;a?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(a.positionX=e,a.positionY=t,r?a.targetElement=r:a.targetElement=null,this.updateCurrentCursorUser(a))}catch(a){this.loggingService.catch("Error in setCurrentCursorUserPosition:",a)}}setCurrentCursorUserScreenSize(e){try{if(e.screenWidth!==0&&e.screenHeight!==0){let t=this.cursorUser$.value;t?.onlineStatus===j.PRESENCE_STATUS_ONLINE&&(t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.screenScrollHeight=e.screenScrollHeight,this.updateCurrentCursorUser(t))}}catch(t){this.loggingService.catch("Error in setCurrentCursorUserScreenSize:",t)}}updateCurrentCursorUser(e){return Q(this,null,function*(){try{if(this.documentPaths&&e&&e.userId&&this.authService.isFeatureAllowed(Re.CURSOR)){if(!e.isAnonymous){e.pageInfo=new ro;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},t),{timestamp:this.timestamp})))})}this.cursorUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentCursorUser:",t)}})}updateUserStatusOnDocumentChange(e,t){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let r=this.cursorUser$.value;if(r.onlineStatus=e,t&&r&&r.userId&&!r.isAnonymous&&this.authService.isFeatureAllowed(Re.CURSOR)){let a=JSON.parse(JSON.stringify(r));this.commonDbService.updateData({feature:"cursor",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:r.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a),{timestamp:this.timestamp})))})}}catch(r){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",r)}})}updateUserOnLocationChange(e){return Q(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.cursorUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(Re.CURSOR)){let r=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},r),{timestamp:this.timestamp})))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.cursorUser$.value,r=!1;if(e.featureAllowList.includes(Re.CURSOR)?t?.onlineStatus!==j.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=j.PRESENCE_STATUS_ONLINE,r=!0):t?.onlineStatus!==j.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=j.PRESENCE_STATUS_OFFLINE,r=!0),r&&this.documentPaths&&t&&t.userId&&!t.isAnonymous){let a=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(T(I({},a),{timestamp:this.timestamp})))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>e))),on(e=>Q(this,null,function*(){try{if(this.documentPaths&&e){let t=yield Lm(e,!0).catch(a=>null);if(!t)return;let{user:r}=t.claims;if(!r?.isAnonymous&&this.documentPaths?.cursor){let a=`${this.documentPaths.cursor}/${e.uid}`;this.commonDbService.setupOnDisconnect(a,{onlineStatus:j.PRESENCE_STATUS_OFFLINE,comment:"",timestamp:this.timestamp}).catch(s=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",s)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths&&e?this.commonDbService.getData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e.uid,skipFirestore:!0}}).then(a=>{a&&this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.uid,skipFirestore:!0},callback:()=>{t(null)},data:JSON.parse(JSON.stringify(T(I({},a?.data??{}),{timestamp:this.timestamp,onlineStatus:j.PRESENCE_STATUS_OFFLINE})))}),t(null)}).catch(a=>{this.loggingService.catch("Error in signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in signOutUser:",a),r(a)}})}setInactivityTime(e){this.inactivityTime=e,this.analyticsService.trackEvent(Z.Events.Cursor.CURSOR_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime})}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in CursorService isElementInsideAllowedElements: ",t),!1}}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(J(et),J(kt),J(Hl),J(ot),J(Oi),J(_n),J(Be),J(Cn),J(Ve),J(y),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var i9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: CursorElement","color: blue;"),this.getLiveCursorsOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.getOnlineUsersOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.setInactivityTime=this._setInactivityTime,this.allowedElementIds=this._allowedElementIds}_getOnlineUsersOnCurrentDocument(){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;");try{return this.trackEvent(Z.Events.Cursor.GET_LIVE_CURSORS_ON_CURRENT_DOCUMENT_TRIGGERED),this.getService(x0).getLiveCursorsOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getOnlineUsersOnCurrentDocument: ",o),se(null)}}_setInactivityTime(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setInactivityTime","color: green;");try{this.trackEvent(Z.Events.Cursor.SET_INACTIVITY_TIME_TRIGGERED,{payload:{time:o}}),isNaN(o)?this.getService(y).catch("Error in setInactivityTime: ","Provided value is not a number."):this.getService(x0).setInactivityTime(o)}catch(n){this.getService(y).catch("Error in setInactivityTime: ",n)}}_allowedElementIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: allowedElementIds","color: green;");try{this.trackEvent(Z.Events.Cursor.ALLOWED_ELEMENT_IDS_TRIGGERED,{payload:{elementIds:o}}),this.getService(x0).setAllowedElementIds(o)}catch(n){this.getService(y).catch("Error in allowedElementIds: ",n)}}};var o9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: DocElement","color: blue;"),this.getDocumentMetadata=this._getDocumentMetadata}_getDocumentMetadata(){this.getService(y).log("%c[WB] Calling FUNCTION: getDocumentMetadata","color: green;");try{return this.trackEvent(Z.Events.Doc.GET_DOCUMENT_METADATA_TRIGGERED),this.getService(ot).getDocumentMetadata$()}catch(o){return this.getService(y).catch("Error in getDocumentMetadata: ",o),se(null)}}};var fr=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z){this.afAuth=e,this.analyticsService=t,this.authService=r,this.databaseService=a,this.docService=s,this.configService=c,this.domService=p,this.huddleUtilsService=g,this.functions=C,this.loggingService=E,this.notificationService=D,this.commonDbService=L,this.usersService=z,this.documentPaths=null,this.localStream$=new ve(null),this.peerConnectionMap={},this.localStream=new MediaStream,this.screenSharingStream=new MediaStream,this.screenSharingStream$=new ve(null),this.remoteStreamMap={},this.remoteStreamMap$=new ve(null),this.localStreamState$=new ve({}),this.peerConnectionStateMap={},this.peerConnectionStateMap$=new ve({}),this.hudleToolComponentId$=new ve(null),this.attendees$=new ve([]),this.invitees$=new ve([]),this.huddleJoined$=new ve(!1),this.userHuddleStartTime$=new ve(null),this.messages$=new ve([]),this.messagesPanelVisible$=new ve(!1),this.huddleOnCursorMode$=new ve(!1),this.flockModeOnAvatarClickEnabled$=new ve(!1),this.chatEnabled$=new ve(!0),this.serverFallback$=new ve(!0),this.huddleOnCursorModeByAttendeeId$=new ve({}),this.huddleCursorAvailableByAttendeeId$=new ve({}),this.remoteStreamsByUserId$=new ve({}),this.messagesSubscription=null,this.huddleJoined=!1,this.onAnswerConnectionIdHistory={},this.onOfferUidHistory={},this.senders={},this.db=os(),this.dbRefsRemoveOnDropCall=[],this.servers={iceServers:[{urls:["stun:stun1.l.google.com:19302","stun:stun2.l.google.com:19302"]}]},this.databaseService.getDb().pipe(Le(W=>!!W),rt(1)).subscribe(W=>{try{W&&(this.db=W,this.isHuddleTagInstalled()&&this.getServerFallback()&&this.getTwilioIceServers(),this.getUser(),this.getDocumentPaths())}catch(ee){this.loggingService.catch("Error in HuddleService getDb:",ee)}},W=>{this.loggingService.catch("Error in HuddleService getDb subscription: ",W)}),this.docService.addPreDocumentIdChangeFunction("huddle-service",W=>Q(this,null,function*(){this.huddleJoined$.value&&(yield this.dropCall(),yield this.removeLocalStream(),yield this.removeAttendee(),this.attendees$.next([]))})),this.getAttendees().subscribe(),this.getInvitees().subscribe(),this.localStream$.subscribe(W=>{W&&(this.localStream=W)}),this.screenSharingStream$.subscribe(W=>{W&&(this.screenSharingStream=W)}),this.configService.getConfig$().subscribe(W=>{try{!W?.featureAllowList?.find(me=>me===Re.CURSOR)&&this.huddleOnCursorMode$.next(!1)}catch(ee){this.loggingService.catch("Error in HuddleService configService.getConfig$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService configService.getConfig$ subscription: ",W)}),this.attendees$.subscribe(W=>{try{if(W?.length){if(this.huddleOnCursorMode$?.value){let ee=this.huddleOnCursorModeByAttendeeId$.getValue()||{};W.forEach(me=>{ee[me.userSnippylyId]=!0}),this.huddleOnCursorModeByAttendeeId$.next(ee)}this.huddleJoined$?.value&&(W?.find(ee=>ee?.huddleOnCursorMode)?this.addCursorTag():this.removeCursorTag())}}catch(ee){this.loggingService.catch("Error in HuddleService attendees$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService attendees$ subscription: ",W)}),fn([this.huddleJoined$,this.huddleOnCursorMode$]).subscribe(([W,ee])=>{try{if(W){if(ee){let me=this.attendees$.getValue()||[],Ce=this.huddleOnCursorModeByAttendeeId$.getValue()||{};me.forEach(Ae=>{Ce[Ae.userSnippylyId]=!0}),document?.body?.setAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE,"true")}else this.huddleOnCursorModeByAttendeeId$.next({}),document?.body?.removeAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE);this.updateHuddleOnCursorMode()}else this.removeCursorTag(),document?.body?.removeAttribute(j.ATTRIBUTES.VELT_HUDDLE_ON_CURSOR_MODE)}catch(me){this.loggingService.catch("Error in HuddleService huddleJoined$:",me)}},W=>{this.loggingService.catch("Error in HuddleService huddleJoined$ subscription: ",W)}),this.huddleOnCursorModeByAttendeeId$.subscribe(W=>{try{this.huddleJoined&&(Object.keys(W).length?this.addCursorTag():this.removeCursorTag())}catch(ee){this.loggingService.catch("Error in HuddleService huddleOnCursorModeByAttendeeId$:",ee)}},W=>{this.loggingService.catch("Error in HuddleService huddleOnCursorModeByAttendeeId$ subscription: ",W)}),this.authService.addPreSignOutFuction("huddle-signout",this.signOutUser.bind(this))}isHuddleTagInstalled(){try{return!!document?.querySelector(`${j.TAGS.VELT_HUDDLE}`)||!!document?.querySelector(`${j.TAGS.SNIPPYLY_HUDDLE}`)}catch(e){return this.loggingService.catch("Error in HuddleService isHuddleTagInstalled:",e),!1}}getTwilioIceServers(){return Q(this,null,function*(){try{let t=(yield br(this.functions,Er({url:oi.cloudFunction.getIceServers,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:12e5})())?.data;t&&t?.iceServers&&(this.servers.iceServers=t.iceServers)}catch(e){this.loggingService.catch("Error in HuddleService getTwilioIceServers:",e)}})}getRemoteStream(){return this.loggingService.log("%c[WB] Calling FUNCTION: getRemoteStream","color: green;"),this.remoteStreamMap$.asObservable()}getPeerConnectionStateMap(){return this.loggingService.log("%c[WB] Calling FUNCTION: getPeerConnectionStateMap","color: green;"),this.peerConnectionStateMap$.asObservable()}getLocalStreamState(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLocalStreamState","color: green;"),this.localStreamState$.asObservable()}getScreenSharingStream(){return this.loggingService.log("%c[WB] Calling FUNCTION: getScreenSharingStream","color: green;"),this.screenSharingStream$.asObservable()}getAttendees(){return ei(this.afAuth).pipe(Le(e=>!!e),ce(e=>({firebaseUser:e})),he(e=>this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})))),he(e=>this.authService.getUser$().pipe(ce(t=>T(I({},e),{user:t})))),he(e=>ao(e.config,e.user,Re.HUDDLE)?se(T(I({},e),{allowed:!0})):(this.loggingService.warn("Huddle feature is not allowed."),se(T(I({},e),{allowed:!1})))),Ct((e,t)=>e?.allowed===t?.allowed),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>(this.documentPaths=t,e)))),he(e=>e?.allowed?e?.user?.isAnonymous?se(null):this.documentPaths?.huddle?this.commonDbService.dbListener({feature:"allHuddleAttendees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(t=>t?.data),ce(t=>t?(this.attendees$.next(Object.values(t)),Object.values(t)):(this.attendees$.next([]),null))):se(null):se([])))}getInvitees(){try{return ei(this.afAuth).pipe(Le(e=>!!e),ce(e=>({firebaseUser:e})),he(e=>this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})))),he(e=>this.authService.getUser$().pipe(ce(t=>T(I({},e),{user:t})))),he(e=>ao(e.config,e.user,Re.HUDDLE)?se(T(I({},e),{allowed:!0})):(this.loggingService.warn("Huddle feature is not allowed."),se(T(I({},e),{allowed:!1})))),Ct((e,t)=>e?.allowed===t?.allowed),he(e=>this.docService.getDocumentPaths$().pipe(ce(t=>(this.documentPaths=t,e)))),he(e=>e?.allowed?e?.user?.isAnonymous?se(null):this.documentPaths?.huddle?this.commonDbService.dbListener({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(t=>t?.data),ce(t=>t?(this.invitees$.next(Object.values(t)),Object.values(t)):(this.invitees$.next([]),null))):se(null):se([])))}catch(e){return this.loggingService.catch("Error in HuddleService getInvitees:",e),se([])}}clearHuddleInvitees(){try{this.documentPaths?.huddle&&this.commonDbService.deleteData({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in HuddleService clearHuddleInvitees:",e)}}getUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getUser","color: green;"),this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&(this.user=e)},e=>{this.loggingService.catch("Error in getUser: ",e)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$().pipe(on(e=>{this.documentPaths=e})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths: ",e)})}setHuddleToolComponentId(e){this.hudleToolComponentId$.next(e||null)}getHuddleToolComponentId(){return this.hudleToolComponentId$.asObservable()}joinHuddle(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: joinHuddle","color: green;"),this.documentPaths?.huddle?(this.initialHuddleType=e,this.huddleJoined=!0,this.huddleJoined$.next(!0),this.initLocalStreams(),this.huddle=Ai(this.db,this.documentPaths?.huddle),this.iceCandidates=Ai(this.db,`${this.documentPaths?.huddle}/iceCandidates`),this.connections=Ai(this.db,`${this.documentPaths?.huddle}/connections`),this.attendees=Ai(this.db,`${this.documentPaths?.huddle}/attendees`),this.messages=Ai(this.db,`${this.documentPaths?.huddle}/messages`),this.setHuddleListener(),this.addAttendee(),this.callExistingAttendees(),this.userHuddleStartTime$.next(new Date().getTime())):this.loggingService.catch("Error in joinHuddle: documentPaths not found")}catch(t){this.loggingService.catch("Error in HuddleService joinHuddle:",t)}})}initLocalStreams(){try{if(!this.localStream$?.value?.getTracks()?.length){let e=new MediaStream([this.silence(),this.black()]);this.localStream$.next(e)}if(!this.screenSharingStream$?.value?.getTracks()?.length){let e=new MediaStream([this.black()]);this.screenSharingStream$.next(e)}}catch(e){this.loggingService.catch("Error in HuddleService initLocalStreams:",e)}}setHuddleListener(){this.loggingService.log("%c[WB] Calling FUNCTION: setHuddleListener","color: green;"),jp(this.connections,e=>{try{if(e.exists()){let t=e.val();Object.values(t).forEach(a=>{let s=Object.values(a);if(s&&s.length>0){let p=s[0]?.connectionId;this.onHuddleSnapshot(p,a)}}),Object.keys(this.remoteStreamMap).forEach(a=>Q(this,null,function*(){t[a]||(this.remoteStreamMap[a]&&Object.values(this.remoteStreamMap[a]).forEach(s=>{s.getTracks().forEach(c=>{c.stop()})}),delete this.remoteStreamMap[a],yield this.removeIceCandidates(a))})),this.remoteStreamMap$.next(this.remoteStreamMap)}else Object.keys(this.remoteStreamMap).forEach(t=>Q(this,null,function*(){Object.values(this.remoteStreamMap[t]).forEach(r=>{r.getTracks().forEach(a=>{a.stop()})}),yield this.removeIceCandidates(t)})),this.remoteStreamMap={},this.remoteStreamMap$.next(this.remoteStreamMap)}catch(t){this.loggingService.catch("Error in HuddleService setHuddleLister onValue:",t)}}),BV(this.iceCandidates).subscribe(e=>{try{e.event==="child_added"&&this.onIceCandidateSnapshot(e.snapshot)}catch(t){this.loggingService.catch("Error in HuddleService iceCandidates stateChanges:",t)}}),BV(this.attendees).subscribe(e=>{try{if(e.event==="child_removed"){let t=e?.snapshot?.val();if(t){delete this.onOfferUidHistory[t?.userSnippylyId];let r=this.getCombinedId(this.user.userSnippylyId,t?.userSnippylyId);delete this.onAnswerConnectionIdHistory[r],this.closeConnection(r)}}}catch(t){this.loggingService.catch("Error in HuddleService iceCandidates stateChanges:",t)}}),this.messagesSubscription&&this.messagesSubscription.unsubscribe(),this.messagesSubscription=new Ut(e=>{let t=jp(this.messages,r=>e.next(r),r=>e.error(r));return()=>t()}).pipe(he(e=>this.usersService.getUserById$().pipe(ce(()=>e))),he(e=>{if(e.exists()){let t=e.val();return Zi(this.huddleUtilsService.resolveUsersFromHuddleMessages(Object.values(t||{})))}return se([])}),Nn(e=>(this.loggingService.catch("Error in HuddleService messages onValue:",e),se([])))).subscribe(e=>{this.messages$.next(e)})}onHuddleSnapshot(e,t){try{this.loggingService.log("%c[WB] Calling FUNCTION: onHuddleSnapshot","color: green;"),t.offerData&&!t.answerData&&t.offerData.from!==this.user.userSnippylyId&&t.offerData.to===this.user.userSnippylyId&&!(e in this.peerConnectionMap)&&!this.onOfferUidHistory[t.offerData.from]?(this.loggingService.log("offer received"),this.loggingService.log(t),this.onOfferUidHistory[t.offerData.from]=!0,this.onOffer(e,t.offerData)):t.answerData&&t.answerData.from!==this.user.userSnippylyId&&t.answerData.to===this.user.userSnippylyId&&this.peerConnectionMap[e]&&this.peerConnectionMap[e]?.connectionState!=="connected"&&!this.onAnswerConnectionIdHistory[e]&&(this.loggingService.log("answer received"),this.loggingService.log(t),this.onAnswerConnectionIdHistory[e]=!0,this.onAnswer(e,t.answerData))}catch(r){this.loggingService.catch("Error in HuddleService onHuddleSnapshot:",r)}}onIceCandidateSnapshot(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: onIceCandidateSnapshot","color: green;"),this.loggingService.log("ice candidate received");let t=e.val(),r=t.connectionId;t?.from!==this.user.userSnippylyId&&r in this.peerConnectionMap&&this.onIceCandidateChange(r,t)}catch(t){this.loggingService.catch("Error in HuddleService onIceCandidateSnapshot:",t)}}onOffer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: onOffer","color: green;"),this.createPeerConnection(e,t.from)){this.addLocalStreamToPeerConnection(e,!0);let a=t.offer;yield this.setRemoteDescription(e,a),yield this.sendAnswer(e,t.from)}}catch(r){this.loggingService.catch("Error in HuddleService onOffer:",r)}})}sendAnswer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendAnswer","color: green;"),this.loggingService.log(e),this.documentPaths?.huddle&&e){let r=yield this.peerConnectionMap[e].createAnswer();yield this.setLocalDescription(e,r);let s={answer:{type:r.type,sdp:r.sdp},from:this.user.userSnippylyId,connectionId:e,to:t},c=Ai(this.db,`${this.documentPaths?.huddle}/connections/${e}`);this.dbRefsRemoveOnDropCall.push({type:"connection",dbRef:c}),yield q6(c,{answerData:s}),nl(c).remove()}else this.loggingService.catch("Error in sendAnswer: documentPaths not found")}catch(r){this.loggingService.catch("Error in HuddleService onHuddleSnapshot:",r)}})}onAnswer(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onAnswer","color: green;");let r=t.answer;yield this.setRemoteDescription(e,r)}catch(r){this.loggingService.catch("Error in HuddleService onAnswer:",r)}})}onIceCandidateChange(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onIceCandidateChange","color: green;");let r=t.candidate;this.loggingService.log("onIceCandidateChange",r),yield this.peerConnectionMap[e].addIceCandidate(new RTCIceCandidate(r))}catch(r){this.loggingService.catch("Error in HuddleService onIceCandidateChange:",r)}})}setRemoteDescription(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setRemoteDescription","color: green;"),yield this.peerConnectionMap[e].setRemoteDescription(new RTCSessionDescription(t))}catch(r){this.loggingService.catch("Error in HuddleService setRemoteDescription:",r)}})}addAttendee(){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: addAttendee","color: green;"),this.documentPaths?.huddle&&this.user?.userSnippylyId){let e=T(I({},this.user),{timestamp:this.timestamp,streamMetadata:{webcam:this.localStream?.id,screen:this.screenSharingStream?.id},initialHuddleType:this.initialHuddleType,huddleOnCursorMode:this.huddleOnCursorMode$?.value});e=this.huddleUtilsService.formatHuddleAttendeeData(e);let t=Ai(this.db,`${this.documentPaths?.huddle}/attendees/${this.user.userSnippylyId}`);yield iv(t,JSON.parse(JSON.stringify(e))),this.dbRefsRemoveOnDropCall.push({type:"attendee",dbRef:t}),nl(t).remove(),yield this.updateUserHuddleState()}else this.loggingService.catch("Error in addAttendee: documentPaths not found")}catch(e){this.loggingService.catch("Error in HuddleService addAttendee:",e)}})}callExistingAttendees(){try{this.loggingService.log("%c[WB] Calling FUNCTION: callExistingAttendees","color: green;"),kne(this.attendees).pipe(rt(1)).subscribe(e=>{e&&e.length>1?(e.forEach(t=>{t.userSnippylyId!==this.user.userSnippylyId&&!this.onOfferUidHistory[t.userSnippylyId]&&(this.loggingService.log("calling"),this.loggingService.log(t),this.initOffer(t.userSnippylyId))}),this.addLocalStreamToAllPeerConnections()):this.deleteMessages()})}catch(e){this.loggingService.catch("Error in HuddleService callExistingAttendees:",e)}}addLocalStreamToAllPeerConnections(){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: addLocalStreamToAllPeerConnections","color: green;"),Object.keys(this.senders).forEach(e=>{this.loggingService.log(this.senders[e]),this.localStream.getTracks().forEach(t=>{this.loggingService.log(t),this.senders[e].replaceTrack(t)})})}catch(e){this.loggingService.catch("Error in HuddleService addLocalStreamToAllPeerConnections:",e)}})}initOffer(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: initOffer","color: green;");let t=this.createPeerConnection(null,e);t&&(this.addLocalStreamToPeerConnection(t,!1),yield this.sendOffer(t,e))}catch(t){this.loggingService.catch("Error in HuddleService initOffer:",t)}})}createPeerConnection(e,t){try{return this.loggingService.log("%c[WB] Calling FUNCTION: createPeerConnection","color: green;"),e||(e=this.getCombinedId(this.user?.userSnippylyId,t)),e in this.peerConnectionMap?null:(this.loggingService.log("creating pc"),this.peerConnectionMap[e]=new RTCPeerConnection(this.servers),this.peerConnectionMap[e].onicecandidateerror=r=>{this.loggingService.log("Huddle: onicecandidateerror",r)},this.peerConnectionMap[e].onicecandidate=r=>{if(this.loggingService.log("pc onicecandidate"),r.candidate){let a={candidate:r.candidate.toJSON(),from:this.user.userSnippylyId,connectionId:e},s=Lne(this.iceCandidates,a);this.dbRefsRemoveOnDropCall.push({type:"iceCandidate",dbRef:s}),nl(s).remove()}},this.peerConnectionMap[e].ontrack=r=>{this.loggingService.log("pc ontrack"),this.onTrack(e,r)},this.peerConnectionMap[e].onconnectionstatechange=r=>Q(this,null,function*(){this.logStatuses("onconnectionstatechange",e,r),this.peerConnectionMap[e].connectionState==="failed"&&(this.removeConnection(e),this.closeConnection(e),this.checkForRemovingAttendee())}),this.peerConnectionMap[e].onicegatheringstatechange=r=>Q(this,null,function*(){this.logStatuses("onicegatheringstatechange",e,r)}),this.peerConnectionMap[e].onsignalingstatechange=r=>Q(this,null,function*(){this.logStatuses("onsignalingstatechange",e,r)}),this.peerConnectionMap[e].oniceconnectionstatechange=r=>Q(this,null,function*(){this.loggingService.log("pc oniceconnectionstatechange"),this.logStatuses("oniceconnectionstatechange",e,r);try{this.peerConnectionStateMap[e]=this.peerConnectionMap[e].iceConnectionState,this.peerConnectionStateMap$.next(this.peerConnectionStateMap),this.peerConnectionMap[e]?.iceConnectionState==="connected"?(this.loggingService.log("connected"),this.updateTransceiverDirection(e)):this.peerConnectionMap[e]?.iceConnectionState==="disconnected"?this.loggingService.log("Disconnected"):this.peerConnectionMap[e].iceConnectionState==="closed"&&(this.loggingService.log("Closed"),this.closeConnection(e))}catch(a){this.loggingService.catch("Error in HuddleService oniceconnectionstatechange:",a)}}),this.peerConnectionMap[e].onnegotiationneeded=()=>{this.loggingService.log("pc onnegotiationneeded"),this.logStatuses("onnegotiationneeded",e)},e)}catch(r){return this.loggingService.catch("Error in HuddleService createPeerConnection:",r),""}}logStatuses(e,t,r){let a={};["connectionState","iceConnectionState","iceGatheringState","signalingState"].forEach(c=>{a[c]=this.peerConnectionMap[t][c]}),this.loggingService.log("Huddle: logStatues: ",t,e,a,r,this.peerConnectionMap[t])}checkForRemovingAttendee(){return Q(this,null,function*(){try{this.documentPaths?.huddle&&this.user?.userSnippylyId&&(Object.keys(this.peerConnectionMap)?.length||(this.commonDbService.deleteData({feature:"huddleAttendee",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0}}),this.joinHuddle(this.initialHuddleType)))}catch(e){this.loggingService.catch("Error in HuddleService checkForRemovingAttendee:",e)}})}closeConnection(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: closeConnection","color: green;"),this.peerConnectionMap[e]){let t=this.peerConnectionMap[e];t.getTransceivers()?.forEach(a=>{a.stop()}),t.getReceivers()?.forEach(a=>{a.track?.stop()}),t.close(),delete this.peerConnectionMap[e],delete this.onAnswerConnectionIdHistory[e],delete this.senders[e];let r=e.split("__").find(a=>a!==this.user?.userSnippylyId);r&&delete this.onOfferUidHistory[r]}}catch(t){this.loggingService.catch("Error in HuddleService closeConnection:",t)}}removeConnection(e){return Q(this,null,function*(){try{this.documentPaths?.huddle&&e&&this.commonDbService.deleteData({feature:"huddleConnection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e,skipFirestore:!0}})}catch(t){this.loggingService.catch("Error in HuddleService removeConnection:",t)}})}addLocalStreamToPeerConnection(e,t){try{this.loggingService.log("%c[WB] Calling FUNCTION: addLocalStreamToPeerConnection","color: green;"),t?(this.localStream.getTracks().forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.localStream)}),this.screenSharingStream?.getVideoTracks()?.forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.screenSharingStream)})):(this.localStream.getTracks().forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.localStream)}),this.screenSharingStream?.getVideoTracks()?.forEach(r=>{this.peerConnectionMap[e].addTrack(r,this.screenSharingStream)}))}catch(r){this.loggingService.catch("Error in HuddleService addLocalStreamToPeerConnection:",r)}}updateTransceiverDirection(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateTransceiverDirection","color: green;");let t=this.peerConnectionMap[e].getTransceivers();this.loggingService.log(t),t.map(r=>{this.loggingService.log(r.currentDirection),r.currentDirection!=="sendrecv"&&(r.direction="sendrecv"),this.senders[e]=r.sender})}catch(t){this.loggingService.catch("Error in HuddleService updateTransceiverDirection:",t)}}generateKey(){this.loggingService.log("%c[WB] Calling FUNCTION: generateKey","color: green;");let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t="";for(let r=0;r<20;r++)t+=e.charAt(Math.floor(Math.random()*e.length));return t}getCombinedId(e,t){try{return e.localeCompare(t)===-1?`${e}__${t}`:`${t}__${e}`}catch(r){return this.loggingService.catch("Error in HuddleService getCombinedId:",r),""}}sendOffer(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendOffer","color: green;"),this.documentPaths?.huddle&&e){this.onOfferUidHistory[t]=!0;let r=yield this.peerConnectionMap[e].createOffer();yield this.setLocalDescription(e,r);let a={sdp:r.sdp,type:r.type};t||(t="all");let s={offer:a,from:this.user.userSnippylyId,connectionId:e,to:t},c=Ai(this.db,`${this.documentPaths?.huddle}/connections/${e}`);yield iv(c,{offerData:s}),this.dbRefsRemoveOnDropCall.push({type:"connection",dbRef:c}),nl(c).remove()}}catch(r){this.loggingService.catch("Error in HuddleService sendOffer:",r)}})}setLocalDescription(e,t){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setLocalDescription","color: green;"),yield this.peerConnectionMap[e].setLocalDescription(t)}catch(r){this.loggingService.catch("Error in HuddleService setLocalDescription:",r)}})}onTrack(e,t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: onTrack","color: green;"),this.remoteStreamMap[e]||(this.remoteStreamMap[e]={}),this.loggingService.log(t.receiver.track),t?.streams?.length){this.remoteStreamMap[e][t.streams[0].id]=t.streams[0];let r=e.split("__").find(s=>s!==this.user?.userSnippylyId),a=this.attendees$.value?.find(s=>s?.userSnippylyId===r);a&&(a?.streamMetadata?.webcam===t.streams[0].id&&(this.remoteStreamMap[e].webcam=t.streams[0]),a?.streamMetadata?.screen===t.streams[0].id&&(this.remoteStreamMap[e].screen=t.streams[0])),this.remoteStreamMap$.next(this.remoteStreamMap)}}catch(r){this.loggingService.catch("Error in HuddleService onTrack:",r)}}toggleScreenSharing(e){return Q(this,null,function*(){try{if(e)this.screenSharingStream=yield navigator.mediaDevices?.getDisplayMedia({video:!0}),Object.keys(this.peerConnectionMap).forEach(t=>{this.peerConnectionMap[t].getSenders().find(s=>s?.track?.kind==this.screenSharingStream?.getVideoTracks()[0].kind)?.replaceTrack(this.screenSharingStream?.getVideoTracks()[0])});else{let t=this.localStream;Object.keys(this.peerConnectionMap).forEach(r=>{this.peerConnectionMap[r].getSenders().find(c=>c?.track?.kind==t.getVideoTracks()[0].kind)?.replaceTrack(t.getVideoTracks()[0])}),this.screenSharingStream?.getTracks().forEach(r=>r.stop())}}catch(t){this.loggingService.catch("Error in HuddleService toggleScreenSharing:",t)}})}setLocalStream(e){return Q(this,null,function*(){try{if(this.localStream=new MediaStream([this.silence(),this.black()]),e?.audio||e?.video){let t=e,r=kc();e?.audio&&(e?.audio instanceof Object?t.audio=T(I({},e?.audio),{deviceId:r?.selectedAudioDevice?.deviceId}):t.audio={deviceId:r?.selectedAudioDevice?.deviceId}),e?.video&&(e?.video instanceof Object?t.video=T(I({},e?.video),{deviceId:r?.selectedVideoDevice?.deviceId}):t.video={deviceId:r?.selectedVideoDevice?.deviceId});let a=yield navigator.mediaDevices.getUserMedia(t);a?.getAudioTracks()?.length&&(this.localStream.getAudioTracks().forEach(s=>this.localStream.removeTrack(s)),a.getAudioTracks().forEach(s=>this.localStream.addTrack(s))),a?.getVideoTracks()?.length&&(this.localStream.getVideoTracks().forEach(s=>this.localStream.removeTrack(s)),a.getVideoTracks().forEach(s=>this.localStream.addTrack(s)))}this.localStream$.next(this.localStream)}catch(t){this.loggingService.catch("Error in HuddleService setLocalStream:",t)}})}setScreenSharingStream(){return Q(this,null,function*(){try{let e=yield navigator.mediaDevices?.getDisplayMedia({video:!0});e&&this.screenSharingStream$.next(e)}catch(e){this.loggingService.catch("Error in HuddleService setScreenSharingStream:",e)}})}removeLocalStream(){return Q(this,null,function*(){try{this.localStream$?.value&&(this.localStream$.value.getTracks().forEach(t=>{t.stop()}),this.localStream$.next(null))}catch(e){this.loggingService.catch("Error in HuddleService removeLocalStream:",e)}})}toggleLocalStreamAudio(e){return Q(this,null,function*(){try{let t=this.localStream$.value;if(t){let r=t.getAudioTracks()[0];if(r.enabled&&!e)r.stop(),t.getAudioTracks()?.forEach(a=>{t.removeTrack(a)}),t.addTrack(this.silence()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_AUDIO_MUTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)});else{let a=kc(),s=yield navigator.mediaDevices.getUserMedia({audio:{deviceId:a?.selectAudioDevice?.deviceId}});s&&(t.getAudioTracks()?.forEach(c=>{t.removeTrack(c)}),s.getAudioTracks()?.forEach(c=>{t.addTrack(c)}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_AUDIO_UNMUTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(c=>c?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(c=>c?.userId)}))}Object.keys(this.peerConnectionMap).forEach(a=>{this.peerConnectionMap[a].getSenders().find(p=>p?.track?.kind==t?.getAudioTracks()[0].kind)?.replaceTrack(t?.getAudioTracks()[0])}),this.updateUserHuddleState()}}catch(t){this.loggingService.catch("Error in HuddleService toggleLocalStreamAudio:",t)}})}toggleLocalStreamVideo(e){return Q(this,null,function*(){try{let t=this.localStream$.value;if(t){let r=t.getVideoTracks()[0];if(r.enabled&&!e)r.stop(),t.getVideoTracks()?.forEach(a=>{t.removeTrack(a)}),t.addTrack(this.black()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_VIDEO_TURNED_OFF,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)});else{let a=kc(),s=yield navigator.mediaDevices.getUserMedia({video:{deviceId:a?.selectedVideoDevice?.deviceId}});s&&(t.getVideoTracks()?.forEach(c=>{t.removeTrack(c)}),s.getVideoTracks()?.forEach(c=>{t.addTrack(c)}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_VIDEO_TURNED_ON,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(c=>c?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(c=>c?.userId)}))}Object.keys(this.peerConnectionMap).forEach(a=>{this.peerConnectionMap[a].getSenders().find(p=>p?.track?.kind==t?.getVideoTracks()[0].kind)?.replaceTrack(t?.getVideoTracks()[0])}),this.updateUserHuddleState()}}catch(t){this.loggingService.catch("Error in HuddleService toggleLocalStreamVideo:",t)}})}toggleLocalScreenSharing(){return Q(this,null,function*(){try{let e=this.screenSharingStream;if(e){if(e.getVideoTracks()[0].enabled)this.stopScreenSharingStream();else{let r=yield navigator.mediaDevices?.getDisplayMedia({video:!0});r&&(e.getVideoTracks()?.forEach(a=>{e.removeTrack(a)}),r.getVideoTracks()?.forEach(a=>{e.addTrack(a),a.onended=()=>{this.stopScreenSharingStream(),this.updateScreenSharingTracksToPeers(),this.updateUserHuddleState()}})),this.screenSharingStream$.next(e),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_SCREENSHARING_STARTED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(a=>a?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(a=>a?.userId)})}this.updateScreenSharingTracksToPeers(),this.updateUserHuddleState()}}catch(e){this.loggingService.catch("Error in HuddleService toggleLocalScreenSharing:",e)}})}stopScreenSharingStream(){return Q(this,null,function*(){let e=this.screenSharingStream;if(e){let t=e.getVideoTracks()[0];t.enabled&&(t.stop(),e.getVideoTracks()?.forEach(r=>{e.removeTrack(r)}),e.addTrack(this.black()),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_SCREENSHARING_STOPPED,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(r=>r?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(r=>r?.userId)}))}})}updateScreenSharingTracksToPeers(){return Q(this,null,function*(){Object.keys(this.peerConnectionMap).forEach(e=>{let r=this.peerConnectionMap[e].getSenders().filter(a=>a?.track?.kind==this.screenSharingStream?.getVideoTracks()[0].kind);r?.length>1&&r[1]?.replaceTrack(this.screenSharingStream?.getVideoTracks()[0])})})}dropCall(){return Q(this,null,function*(){try{this.messagesSubscription&&this.messagesSubscription.unsubscribe(),this.removeHuddleSessionData(),this.huddleJoined=!1,this.huddleJoined$.next(!1),this.peerConnectionMap&&Object.keys(this.peerConnectionMap).forEach(e=>{let t=this.peerConnectionMap[e];t.getTransceivers()?.forEach(r=>{r.stop()}),t.getSenders()?.forEach(r=>{r.track?.stop()}),t.getReceivers()?.forEach(r=>{r.track?.stop()}),t.close()}),this.peerConnectionMap={},this.dbRefsRemoveOnDropCall.forEach(e=>Q(this,null,function*(){yield W6(e.dbRef)})),this.onOfferUidHistory={},this.onAnswerConnectionIdHistory={},this.senders={},this.peerConnectionStateMap={},this.peerConnectionStateMap$.next(this.peerConnectionStateMap),this.localStream.getTracks().forEach(e=>{e.stop()}),this.screenSharingStream.getTracks().forEach(e=>{e.stop()}),this.localStream=new MediaStream([this.silence(),this.black()]),this.screenSharingStream=new MediaStream([this.black()]),this.localStream$.next(this.localStream),this.screenSharingStream$.next(this.screenSharingStream),this.localStreamState$.next({audioState:!1,videoState:!1,screenSharingState:!1}),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_LEFT,{huddleType:this.initialHuddleType,totalUsers:this.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.getHuddleAttendees()?.map(e=>e?.userId)})}catch(e){this.loggingService.catch("Error in HuddleService dropCall:",e)}})}updateHuddleSessionData(e,t,r){try{let a=JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)||"{}");r?sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA,JSON.stringify(r)):(a[e]=t,sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA,JSON.stringify(a)))}catch(a){this.loggingService.catch("Error in HuddleService updateHuddleSessionData:",a)}}getHuddleSessionData(){try{return sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)?JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)):null}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleSessionData:",e),null}}removeHuddleSessionData(){try{sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA)}catch(e){this.loggingService.catch("Error in HuddleService removeHuddleSessionData:",e)}}removeAttendee(){return Q(this,null,function*(){try{if(this.documentPaths?.huddle&&this.user.userSnippylyId){yield this.commonDbService.deleteData({feature:"huddleAttendee",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0}});return}else return}catch(e){return this.loggingService.catch("Error in HuddleService removeAttendee:",e),Promise.resolve(null)}})}updateUserHuddleState(){return Q(this,null,function*(){try{if(this.attendees&&this.user&&this.documentPaths?.huddle){let e=this.getAudioState(),t=this.getVideoState(),r=this.getScreenSharingState();this.localStreamState$.next({audioState:e,videoState:t,screenSharingState:r});let a={audioState:e,videoState:t,screenSharingState:r};yield this.commonDbService.setData({feature:"huddleAttendeeState",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:this.user?.userSnippylyId,skipFirestore:!0},data:a})}}catch(e){this.loggingService.catch("Error in HuddleService updateUserHuddleState:",e)}})}updateHuddleOnCursorMode(){return Q(this,null,function*(){try{if(this.attendees&&this.user&&this.documentPaths?.huddle){let e=Ai(this.db,`${this.documentPaths?.huddle}/attendees/${this.user.userSnippylyId}/huddleOnCursorMode`);yield iv(e,!!this.huddleOnCursorMode$.value)}}catch(e){this.loggingService.catch("Error in HuddleService updateHuddleOnCursorMode:",e)}})}getAudioState(){try{let e=this.localStream$.value;if(e){let t=e?.getAudioTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getAudioState:",e),!1}}getVideoState(){try{let e=this.localStream$.value;if(e){let t=e?.getVideoTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getVideoState:",e),!1}}getScreenSharingState(){try{let e=this.screenSharingStream;if(e){let t=e?.getVideoTracks();return!!(t?.length?t[0]:null)?.enabled}return!1}catch(e){return this.loggingService.catch("Error in HuddleService getVideoState:",e),!1}}removeIceCandidates(e){return Q(this,null,function*(){try{if(this.documentPaths?.huddle&&e){let t=yield this.commonDbService?.getData({feature:"allHuddleIceCandidates",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",skipFirestore:!0}});Object.keys(t).length>0&&Object.keys(t).forEach(r=>Q(this,null,function*(){t[r].connectionId===e&&this.commonDbService.deleteData({feature:"huddleIceCandidate",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:r,skipFirestore:!0}})}))}}catch(t){this.loggingService.catch("Error in HuddleService dropCall:",t)}})}get timestamp(){return this.commonDbService.getServerTimestamp()}silence(){try{let e=new AudioContext,t=e.createOscillator(),r=t.connect(e.createMediaStreamDestination());return t.start(),Object.assign(r.stream.getAudioTracks()[0],{enabled:!1})}catch(e){this.loggingService.catch("Error in HuddleService silence:",e)}}black({width:e=640,height:t=480}={}){try{let r=Object.assign(document.createElement("canvas"),{width:e,height:t});r.getContext("2d")?.fillRect(0,0,e,t);let a=r.captureStream();return Object.assign(a.getVideoTracks()[0],{enabled:!1})}catch(r){this.loggingService.catch("Error in HuddleService black:",r)}}getInitialHuddleType(){try{return this.initialHuddleType}catch(e){return this.loggingService.catch("Error in HuddleService getInitialHuddleType:",e),null}}getHuddleAttendees$(){try{return this.attendees$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleAttendees$:",e),se([])}}getHuddleAttendees(){try{return this.attendees$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleAttendees:",e),null}}getHuddleInvitees$(){try{return this.invitees$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleInvitees$:",e),se([])}}getHuddleInvitees(){try{return this.invitees$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleInvitees:",e),null}}getHuddleStartTime(){try{return this.userHuddleStartTime$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleStartTime:",e),null}}getTotalUserHuddleDuration(){try{return this.userHuddleStartTime$.value?new Date().getTime()-this.userHuddleStartTime$.value:null}catch(e){return this.loggingService.catch("Error in HuddleService gettotalUserHuddleDuration:",e),null}}inviteUsers(e){try{this.updateInvitees(e);let t={};t.notificationSource="huddleInvite",t.huddleInvitees=e,t.huddleType=this.getInitialHuddleType(),this.updateNotificationsDatabase(t)}catch(t){this.loggingService.catch("Error in HuddleService inviteUsers:",t)}}updateInvitees(e){try{if(this.documentPaths?.huddle){let t={};e.forEach(r=>{if(r?.email){let a=_t(r.email);t[a]=r}}),this.commonDbService.setData({feature:"allHuddleInvitees",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in HuddleService updateInvitees:",t)}}updateNotificationsDatabase(e={}){try{let t=I({notificationSource:"huddle"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in HuddleService updateNotificationsDatabase: ",t)}}getHuddleJoined$(){try{return this.huddleJoined$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleJoined$:",e),se(!1)}}getHuddleCursorAvailableByAttendeeId(){try{return this.huddleCursorAvailableByAttendeeId$.value}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleCursorAvailableByAttendeeId:",e),null}}getHuddleCursorAvailableByAttendeeId$(){try{return this.huddleCursorAvailableByAttendeeId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleCursorAvailableByAttendeeId$:",e),se({})}}updateHuddleCursorAvailableByAttendeeId(e,t){try{let r=this.huddleCursorAvailableByAttendeeId$.value;r[e]=t,this.huddleCursorAvailableByAttendeeId$.next(r)}catch(r){this.loggingService.catch("Error in HuddleService updateCursorUserAvailableByUserId:",r)}}setRemoteStreamsByUserId(e){try{this.remoteStreamsByUserId$.next(e)}catch(t){this.loggingService.catch("Error in HuddleService setRemoteStreamsByUserId:",t)}}getRemoteStreamsByUserId$(){try{return this.remoteStreamsByUserId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getRemoteStreamsByUserId$:",e),se({})}}enableHuddleOnCursorMode(){try{this.huddleOnCursorMode$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableHuddleOnCursorMode:",e)}}disableHuddleOnCursorMode(){try{this.huddleOnCursorMode$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableHuddleOnCursorMode:",e)}}getHuddleOnCursorMode$(){try{return this.huddleOnCursorMode$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleOnCursorMode$:",e),se(!1)}}enableFlockModeOnAvatarClick(){try{this.flockModeOnAvatarClickEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableFlockModeOnAvatarClick:",e)}}disableFlockModeOnAvatarClick(){try{this.flockModeOnAvatarClickEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableFlockModeOnAvatarClick:",e)}}getFlockModeOnAvatarClick$(){try{return this.flockModeOnAvatarClickEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getFlockModeOnAvatarClick$:",e),se(!1)}}getFlockModeOnAvatarClick(){try{return this.flockModeOnAvatarClickEnabled$.value}catch(e){return this.loggingService.catch("Error in HuddleService getFlockModeOnAvatarClick:",e),!1}}enableChat(){try{this.chatEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableChat:",e)}}disableChat(){try{this.chatEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableChat:",e)}}getChatEnabled$(){try{return this.chatEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getChatEnabled$:",e),se(!1)}}getChatEnabled(){try{return this.chatEnabled$.value}catch(e){return this.loggingService.catch("Error in HuddleService getChatEnabled:",e),!1}}enableServerFallback(){try{if(this.serverFallback$.value===!0)return;this.serverFallback$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService enableServerFallback:",e)}}disableServerFallback(){try{if(this.serverFallback$.value===!1)return;this.serverFallback$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService disableServerFallback:",e)}}getServerFallback$(){try{return this.serverFallback$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getServerFallback$:",e),se(!1)}}getServerFallback(){try{return this.serverFallback$.value}catch(e){return this.loggingService.catch("Error in HuddleService getServerFallback:",e),!1}}getHuddleOnCursorModeByAttendeeId$(){try{return this.huddleOnCursorModeByAttendeeId$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getHuddleOnCursorModeByAttendeeId$:",e),se({})}}toggleHuddleOnCursorModeByAttendeeId(e){try{let t=this.huddleOnCursorModeByAttendeeId$.value;t[e]?delete t[e]:t[e]=!0,this.huddleOnCursorModeByAttendeeId$.next(t)}catch(t){this.loggingService.catch("Error in HuddleService toggleHuddleOnCursorModeByAttendeeId:",t)}}addCursorTag(){try{if(!document.querySelector(`${j.TAGS.SNIPPYLY_CURSOR}`)){let e=document.createElement(j.TAGS.SNIPPYLY_CURSOR);e.setAttribute("snippyly-temporary","true"),document.body.appendChild(e)}}catch(e){this.loggingService.catch("Error in HuddleService addCursorTag:",e)}}removeCursorTag(){try{let e=document.querySelector(`${j.TAGS.SNIPPYLY_CURSOR}`);e?.hasAttribute("snippyly-temporary")&&e.remove()}catch(e){this.loggingService.catch("Error in HuddleService removeCursorTag:",e)}}sendMessage(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: sendMessage","color: green;"),this.documentPaths?.huddle&&this.user){let t=new yk;t.message=e,t.from=this.user,t.timestamp=this.timestamp,this.commonDbService.setData({feature:"huddleMessage",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:t.id,skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in HuddleService sendMessage:",t)}}getMessages$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessages$","color: green;"),this.messages$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getMessages$:",e),se([])}}deleteMessages(){try{this.loggingService.log("%c[WB] Calling FUNCTION: deleteMessages","color: green;"),this.documentPaths?.huddle&&this.commonDbService.deleteData({feature:"allHuddleMessages",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in HuddleService deleteMessages:",e)}}showMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: showMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!0)}catch(e){this.loggingService.catch("Error in HuddleService showMessagesPanel:",e)}}hideMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: hideMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!1)}catch(e){this.loggingService.catch("Error in HuddleService hideMessagesPanel:",e)}}toggleMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: toggleMessagesPanel","color: green;"),this.messagesPanelVisible$.next(!this.messagesPanelVisible$.value)}catch(e){this.loggingService.catch("Error in HuddleService toggleMessagesPanel:",e)}}getMessagesPanelVisible$(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessagesPanelVisible$","color: green;"),this.messagesPanelVisible$.asObservable()}catch(e){return this.loggingService.catch("Error in HuddleService getMessagesPanelVisible$:",e),se(!1)}}getMessagesPanelVisible(){try{return this.loggingService.log("%c[WB] Calling FUNCTION: getMessagesPanelVisible","color: green;"),this.messagesPanelVisible$.value}catch(e){return this.loggingService.catch("Error in HuddleService getMessagesPanelVisible:",e),!1}}signOutUser(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: signOutUser","color: green;"),this.huddleJoined$.value&&(yield this.dropCall(),yield this.removeLocalStream(),yield this.removeAttendee())}catch(t){this.loggingService.catch("Error in HuddleService signOutUser:",t)}})}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(et),J(Ve),J(Cn),J(ot),J(kt),J(Be),J(Lk),J(Wo),J(y),J(gn),J(dn),J(Mn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var r9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: HuddleElement","color: blue;"),this.enableCursorMode=this._enableCursorMode,this.disableCursorMode=this._disableCursorMode,this.enableChat=this._enableChat,this.disableChat=this._disableChat,this.enableFlockModeOnAvatarClick=this._enableFlockModeOnAvatarClick,this.disableFlockModeOnAvatarClick=this._disableFlockModeOnAvatarClick}_enableCursorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableCursorMode","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED),this.getService(fr).enableHuddleOnCursorMode()}catch(o){this.getService(y).catch("Error in enableCursorMode: ",o)}}_disableCursorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableCursorMode","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_HUDDLE_ON_CURSOR_MODE_TRIGGERED),this.getService(fr).disableHuddleOnCursorMode()}catch(o){this.getService(y).catch("Error in disableCursorMode: ",o)}}_enableChat(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableChat","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_CHAT_TRIGGERED),this.getService(fr).enableChat()}catch(o){this.getService(y).catch("Error in enableChat: ",o)}}_disableChat(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableChat","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_CHAT_TRIGGERED),this.getService(fr).disableChat()}catch(o){this.getService(y).catch("Error in disableChat: ",o)}}_enableFlockModeOnAvatarClick(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableFlockModeOnAvatarClick","color: green;");try{this.trackEvent(Z.Events.Huddle.ENABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED),this.getService(fr).enableFlockModeOnAvatarClick()}catch(o){this.getService(y).catch("Error in enableFlockModeOnAvatarClick: ",o)}}_disableFlockModeOnAvatarClick(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableFlockModeOnAvatarClick","color: green;");try{this.trackEvent(Z.Events.Huddle.DISABLE_FLOCK_MODE_ON_AVATAR_CLICK_TRIGGERED),this.getService(fr).disableFlockModeOnAvatarClick()}catch(o){this.getService(y).catch("Error in disableFlockModeOnAvatarClick: ",o)}}};var a9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: LiveStateElement","color: blue;"),this.getLiveStateData$=this._getLiveStateData,this.getLiveStateData=this._getLiveStateData,this.setLiveStateData=this._setLiveStateData,this.enableSingleEditorMode=this._enableSingleEditorMode,this.disableSingleEditorMode=this._disableSingleEditorMode,this.isUserEditor$=this._isUserEditor,this.isUserEditor=this._isUserEditor,this.getEditor=this._getEditor,this.setUserAsEditor=this._setUserAsEditor,this.resetUserAccess=this._resetUserAccess,this.singleEditorModeContainerIds=this._singleEditorModeContainerIds,this.enableAutoSyncState=this._enableAutoSyncState,this.disableAutoSyncState=this._disableAutoSyncState,this.requestEditorAccess=this._requestEditorAccess,this.isEditorAccessRequested=this._isEditorAccessRequested,this.acceptEditorAccessRequest=this._acceptEditorAccessRequest,this.rejectEditorAccessRequest=this._rejectEditorAccessRequest,this.cancelEditorAccessRequest=this._cancelEditorAccessRequest,this.editCurrentTab=this._editCurrentTab,this.setEditorAccessTimeout=this._setEditorAccessTimeout,this.enableEditorAccessTransferOnTimeOut=this._enableEditorAccessTransferOnTimeOut,this.disableEditorAccessTransferOnTimeOut=this._disableEditorAccessTransferOnTimeOut,this.enableDefaultSingleEditorUI=this._enableDefaultSingleEditorUI,this.disableDefaultSingleEditorUI=this._disableDefaultSingleEditorUI,this.getEditorAccessTimer=this._getEditorAccessTimer,this.onServerConnectionStateChange=this._onServerConnectionStateChange,this.updateUserPresence=this._updateUserPresence,this.on=this._on}_getLiveStateData(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: getLiveStateData","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_LIVE_STATE_DATA_TRIGGERED),this.getService(Vi).getLiveStateData$(o,n)}catch(e){return this.getService(y).catch("Error in _getLiveStateData: ",e),se(null)}}_setLiveStateData(o,n,e){this.getService(y).log("%c[WB] Calling FUNCTION: setLiveStateData","color: green;");try{return this.getService(Vi).setLiveStateData(o,n,e)}catch(t){return this.getService(y).catch("Error in _setLiveStateData: ",t),Promise.resolve()}}_enableSingleEditorMode(o){this.getService(y).log("%c[WB] Calling FUNCTION: enableSingleEditorMode","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_SINGLE_EDITOR_MODE_TRIGGERED),this.getService(Vi).enableSingleEditorMode(o)}catch(n){this.getService(y).catch("Error in _enableSingleEditorMode: ",n)}}_disableSingleEditorMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableSingleEditorMode","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_SINGLE_EDITOR_MODE_TRIGGERED),this.getService(Vi).disableSingleEditorMode()}catch(o){this.getService(y).catch("Error in _disableSingleEditorMode: ",o)}}_isUserEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: isUserEditor$","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.IS_USER_EDITOR_TRIGGERED),this.getService(Vi).isUserEditor$()}catch(o){return this.getService(y).catch("Error in _isUserEditor$: ",o),se(null)}}_getEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: getEditor","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_EDITOR_TRIGGERED),this.getService(Vi).getEditor$()}catch(o){return this.getService(y).catch("Error in _getEditor: ",o),se(null)}}_setUserAsEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: setUserAsEditor","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.SET_USER_AS_EDITOR_TRIGGERED),this.getService(Vi).setUserAsEditor()}catch(o){return this.getService(y).catch("Error in _setUserAsEditor: ",o),Promise.resolve()}}_resetUserAccess(){this.getService(y).log("%c[WB] Calling FUNCTION: resetUserAccess","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.RESET_USER_ACCESS_TRIGGERED),this.getService(Vi).removeEditorAccess({metadata:{from:"resetUserAccess-liveStateSyncElement",reason:"Client called"}})}catch(o){this.getService(y).catch("Error in _resetUserAccess: ",o)}}_singleEditorModeContainerIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: singleEditorModeContainerIds","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.SINGLE_EDITOR_MODE_CONTAINER_IDS_TRIGGERED),this.getService(Vi).setSingleEditorModeContainerIds(o)}catch(n){this.getService(y).catch("Error in _singleEditorModeContainerIds: ",n)}}_enableAutoSyncState(){this.getService(y).log("%c[WB] Calling FUNCTION: enableAutoSyncState","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_AUTO_SYNC_STATE_TRIGGERED),this.getService(Vi).enableAutoSyncState()}catch(o){this.getService(y).catch("Error in _enableAutoSyncState: ",o)}}_disableAutoSyncState(){this.getService(y).log("%c[WB] Calling FUNCTION: disableAutoSyncState","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_AUTO_SYNC_STATE_TRIGGERED),this.getService(Vi).disableAutoSyncState()}catch(o){this.getService(y).catch("Error in _disableAutoSyncState: ",o)}}_requestEditorAccess(){this.getService(y).log("%c[WB] Calling FUNCTION: requestEditorAccess","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.REQUEST_EDITOR_ACCESS_TRIGGERED),this.getService(Vi).requestEditorAccess()}catch(o){return this.getService(y).catch("Error in _requestEditorAccess: ",o),se(null)}}_isEditorAccessRequested(){this.getService(y).log("%c[WB] Calling FUNCTION: isEditorAccessRequested","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.IS_EDITOR_ACCESS_REQUESTED_TRIGGERED),this.getService(Vi).isEditorAccessRequested$()}catch(o){return this.getService(y).catch("Error in _isEditorAccessRequested: ",o),se(null)}}_acceptEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: acceptEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ACCEPT_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).acceptEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _acceptEditorAccessRequest: ",o)}}_rejectEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: rejectEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.REJECT_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).rejectEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _rejectEditorAccessRequest: ",o)}}_cancelEditorAccessRequest(){this.getService(y).log("%c[WB] Calling FUNCTION: cancelEditorAccessRequest","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.CANCEL_EDITOR_ACCESS_REQUEST_TRIGGERED),this.getService(Vi).cancelEditorAccessRequest()}catch(o){this.getService(y).catch("Error in _cancelEditorAccessRequest: ",o)}}_editCurrentTab(){this.getService(y).log("%c[WB] Calling FUNCTION: editCurrentTab","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.EDIT_CURRENT_TAB_TRIGGERED),this.getService(Vi).editCurrentTab()}catch(o){this.getService(y).catch("Error in _editCurrentTab: ",o)}}_setEditorAccessTimeout(o){this.getService(y).log("%c[WB] Calling FUNCTION: setEditorAccessTimeout","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.SET_EDITOR_ACCESS_TIMEOUT_TRIGGERED),this.getService(Vi).setEditorAccessTimeout(o)}catch(n){this.getService(y).catch("Error in _setEditorAccessTimeout: ",n)}}_enableEditorAccessTransferOnTimeOut(){this.getService(y).log("%c[WB] Calling FUNCTION: enableEditorAccessTransferOnTimeOut","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED),this.getService(Vi).enableEditorAccessTransferOnTimeOut()}catch(o){this.getService(y).catch("Error in _enableEditorAccessTransferOnTimeOut: ",o)}}_disableEditorAccessTransferOnTimeOut(){this.getService(y).log("%c[WB] Calling FUNCTION: disableEditorAccessTransferOnTimeOut","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_EDITOR_ACCESS_TRANSFER_ON_TIMEOUT_TRIGGERED),this.getService(Vi).disableEditorAccessTransferOnTimeOut()}catch(o){this.getService(y).catch("Error in _disableEditorAccessTransferOnTimeOut: ",o)}}_enableDefaultSingleEditorUI(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultSingleEditorUI","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.ENABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED),this.getService(Vi).enableDefaultSingleEditorUI()}catch(o){this.getService(y).catch("Error in _enableDefaultSingleEditorUI: ",o)}}_disableDefaultSingleEditorUI(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultSingleEditorUI","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.DISABLE_DEFAULT_SINGLE_EDITOR_UI_TRIGGERED),this.getService(Vi).disableDefaultSingleEditorUI()}catch(o){this.getService(y).catch("Error in _disableDefaultSingleEditorUI: ",o)}}_getEditorAccessTimer(){this.getService(y).log("%c[WB] Calling FUNCTION: getEditorAccessTimer","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.GET_EDITOR_ACCESS_TIMER_TRIGGERED),this.getService(Vi).getEditorAccessTimer$()}catch(o){return this.getService(y).catch("Error in _getEditorAccessTimer: ",o),se(new g0)}}_onServerConnectionStateChange(){this.getService(y).log("%c[WB] Calling FUNCTION: onServerConnectionStateChange","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.ON_SERVER_CONNECTION_STATE_CHANGE_TRIGGERED),this.getService(Vi).onServerConnectionStateChange$()}catch(o){return this.getService(y).catch("Error in _onServerConnectionStateChange: ",o),se(rl.PENDING_INIT)}}_updateUserPresence(o){this.getService(y).log("%c[WB] Calling FUNCTION: updateUserPresence","color: green;");try{this.trackEvent(Z.Events.LiveStateSync.UPDATE_USER_PRESENCE_TRIGGERED,{payload:{userPresence:o}}),this.getService(Vi).updateUserPresence(o)}catch(n){this.getService(y).catch("Error in _updateUserPresence: ",n)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.LiveStateSync.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(n9).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}};var s9=(()=>{let o=class o{constructor(e){this.loggingService=e,this.actionSubjects=new Map,this.defaultSource="internal",this.isUserAdmin=!1,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: CommentActionsService","color: blue;")}triggerSettingsUpdatedEvent(e){try{this.triggerAction(Qre.SETTINGS_UPDATED,e)}catch(t){this.loggingService.catch("Error in NotificationsActionsService triggerAddCommentAnnotationEvent: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in NotificationsActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in NotificationsActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var l9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ViewsElement","color: blue;"),this.openHistoryPanel=this._openHistoryPanel,this.closeHistoryPanel=this._closeHistoryPanel,this.toggleHistoryPanel=this._toggleHistoryPanel,this.getNotificationsData=this._getNotificationsData,this.setMaxDays=this._setMaxDays,this.setTabConfig=this._setTabConfig,this.enableReadNotificationsOnForYouTab=this._enableReadNotificationsOnForYouTab,this.disableReadNotificationsOnForYouTab=this._disableReadNotificationsOnForYouTab,this.setAllNotificationsAsRead=this._setAllNotificationsAsRead,this.getUnreadNotificationsCount=this._getUnreadNotificationsCount,this.markNotificationAsReadById=this._markNotificationAsReadById,this.setSettings=this._setSettings,this.getSettings=this._getSettings,this.muteAllNotifications=this._muteAllNotifications,this.enableSettings=this._enableSettings,this.enableSelfNotifications=this._enableSelfNotifications,this.disableSelfNotifications=this._disableSelfNotifications,this.disableSettings=this._disableSettings,this.setSettingsInitialConfig=this._setSettingsInitialConfig,this.openNotificationsPanel=this._openNotificationsPanel,this.closeNotificationsPanel=this._closeNotificationsPanel,this.on=this._on}_openHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _openHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.OPEN_HISTORY_PANEL_TRIGGERED),this.getService(gn).setHistoryPanelVisibility(!0,!0)}catch(o){this.getService(y).catch("Error in openHistoryPanel: ",o)}}_closeHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _closeHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.CLOSE_HISTORY_PANEL_TRIGGERED),this.getService(gn).setHistoryPanelVisibility(!1,!0)}catch(o){this.getService(y).catch("Error in closeHistoryPanel: ",o)}}_toggleHistoryPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _toggleHistoryPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.TOGGLE_HISTORY_PANEL_TRIGGERED),this.getService(gn).toggleHistoryPanelVisibility(!0)}catch(o){this.getService(y).catch("Error in toggleHistoryPanel: ",o)}}_getNotificationsData(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getNotificationsData","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_NOTIFICATIONS_DATA_TRIGGERED),this.getService(gn).getNotifications$(o)}catch(n){return this.getService(y).catch("Error in getNotificationsData: ",n),se([])}}_setMaxDays(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setMaxDays","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_MAX_DAYS_TRIGGERED,{payload:{days:o}}),this.getService(gn).setMaxDays(o)}catch(n){this.getService(y).catch("Error in setMaxDays: ",n)}}_setTabConfig(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setTabConfig","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_TAB_CONFIG_TRIGGERED,{payload:{tabConfig:o}}),this.getService(gn).setTabConfig(o)}catch(n){this.getService(y).catch("Error in setTabConfig: ",n)}}_enableReadNotificationsOnForYouTab(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableReadNotificationsOnForYouTab","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED),this.getService(gn).enableReadNotificationsOnForYouTab()}catch(o){this.getService(y).catch("Error in enableReadNotificationsOnForYouTab: ",o)}}_disableReadNotificationsOnForYouTab(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableReadNotificationsOnForYouTab","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_READ_NOTIFICATIONS_ON_FOR_YOU_TAB_TRIGGERED),this.getService(gn).disableReadNotificationsOnForYouTab()}catch(o){this.getService(y).catch("Error in disableReadNotificationsOnForYouTab: ",o)}}_setAllNotificationsAsRead(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setAllNotificationsAsRead","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_ALL_NOTIFICATIONS_AS_READ_TRIGGERED,{payload:{config:o}}),this.getService(gn).setAllNotificationsAsRead(o)}catch(n){this.getService(y).catch("Error in setAllNotificationsAsRead: ",n)}}_getUnreadNotificationsCount(){this.getService(y).log("%c[WB] Calling FUNCTION: _getUnreadNotificationsCount","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_UNREAD_NOTIFICATIONS_COUNT_TRIGGERED),this.getService(gn).getUnreadNotificationsCount$()}catch(o){return this.getService(y).catch("Error in getUnreadNotificationsCount: ",o),se({forYou:null,all:null})}}_markNotificationAsReadById(o){this.getService(y).log("%c[WB] Calling FUNCTION: _markNotificationAsReadById","color: green;");try{this.trackEvent(Z.Events.Notifications.MARK_NOTIFICATION_AS_READ_BY_ID_TRIGGERED,{payload:{notificationId:o}}),this.getService(gn).markNotificationAsReadById(o)}catch(n){this.getService(y).catch("Error in markNotificationAsReadById: ",n)}}_setSettings(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_SETTINGS_TRIGGERED,{payload:{config:o}}),this.getService(gn).setSettingsConfigWithDB(o)}catch(n){this.getService(y).catch("Error in setSettings: ",n)}}_getSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _getSettings","color: green;");try{return this.trackEvent(Z.Events.Notifications.GET_SETTINGS_TRIGGERED),this.getService(gn).getSettingsConfig$()}catch(o){return this.getService(y).catch("Error in getSettings: ",o),se(null)}}_muteAllNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _muteAllNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.MUTE_ALL_NOTIFICATIONS_TRIGGERED),this.getService(gn).setMuteAllNotifications()}catch(o){this.getService(y).catch("Error in muteAllNotifications: ",o)}}_enableSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_SETTINGS_TRIGGERED),this.getService(gn).enableSettings()}catch(o){this.getService(y).catch("Error in enableSettings: ",o)}}_enableSelfNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableSelfNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.ENABLE_SELF_NOTIFICATIONS_TRIGGERED),this.getService(gn).enableSelfNotifications()}catch(o){this.getService(y).catch("Error in enableSelfNotifications: ",o)}}_disableSelfNotifications(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableSelfNotifications","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_SELF_NOTIFICATIONS_TRIGGERED),this.getService(gn).disableSelfNotifications()}catch(o){this.getService(y).catch("Error in disableSelfNotifications: ",o)}}_disableSettings(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableSettings","color: green;");try{this.trackEvent(Z.Events.Notifications.DISABLE_SETTINGS_TRIGGERED),this.getService(gn).disableSettings()}catch(o){this.getService(y).catch("Error in disableSettings: ",o)}}_setSettingsInitialConfig(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setSettingsInitialConfig","color: green;");try{this.trackEvent(Z.Events.Notifications.SET_SETTINGS_INITIAL_CONFIG_TRIGGERED,{payload:{settings:o}}),this.getService(gn).setSettingsInitialConfig(o)}catch(n){this.getService(y).catch("Error in setSettingsInitialConfig: ",n)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Notifications.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(s9).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}_openNotificationsPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _openNotificationsPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.OPEN_NOTIFICATIONS_PANEL_TRIGGERED),this.getService(gn).openNotificationsPanel()}catch(o){this.getService(y).catch("Error in openNotificationsPanel: ",o)}}_closeNotificationsPanel(){this.getService(y).log("%c[WB] Calling FUNCTION: _closeNotificationsPanel","color: green;");try{this.trackEvent(Z.Events.Notifications.CLOSE_NOTIFICATIONS_PANEL_TRIGGERED),this.getService(gn).closeNotificationsPanel()}catch(o){this.getService(y).catch("Error in closeNotificationsPanel: ",o)}}};var Fz=(()=>{let o=class o{constructor(e,t,r){this.analyticsService=e,this.loggingService=t,this.presenceService=r,this.actionSubjects=new Map,this.subscriptions=[];try{this.presenceService.setPresenceActionsService(this)}catch(a){this.loggingService.catch("Error in PresenceActionsService constructor: ",a)}}onMultipleUsersOnline(e){try{this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: onMultipleUsersOnline","color: green;"),this.triggerAction(xj.MULTIPLE_USERS_ONLINE,e),this.analyticsService.trackEvent(Z.Events.Presence.MULTIPLE_USERS_ONLINE,{totalUsers:e?.users?.length,presenceSnippylyUserIds:e?.users?.map(t=>t.userSnippylyId),presenceClientUserIds:e?.users?.map(t=>t.userId)})}catch(t){this.loggingService.catch("Error in PresenceActionsService onMultipleUsersOnline: ",t)}}onUserStateChange(e){try{this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: onUserStateChange","color: green;"),this.triggerAction(xj.USER_STATE_CHANGE,e),this.analyticsService.trackEvent(Z.Events.Presence.ON_USER_STATE_CHANGE,{userSnippylyId:e?.user?.userSnippylyId,userId:e?.user?.userId,state:e?.state})}catch(t){this.loggingService.catch("Error in PresenceActionsService onUserStateChange: ",t)}}getData(e){try{return this.loggingService.log("%c[WB] Calling PresenceActionsService FUNCTION: getData","color: green;"),this.presenceService.getOnlineUsersOnCurrentDocument(e).pipe(ce(t=>({data:t})))}catch(t){return this.loggingService.catch("Error in PresenceActionsService getData: ",t),se({data:null})}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in PresenceActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in PresenceActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(et),J(y),J(Hl))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var c9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: PresenceElement","color: blue;"),this.getOnlineUsersOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.setInactivityTime=this._setInactivityTime,this.enableFlockMode=this._enableFlockMode,this.disableFlockMode=this._disableFlockMode,this.startFollowingUser=this._startFollowingUser,this.stopFollowingUser=this._stopFollowingUser,this.enableSelf=this._enableSelf,this.disableSelf=this._disableSelf,this.getData=this._getData,this.on=this._on}_getOnlineUsersOnCurrentDocument(){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsers","color: green;");try{return this.trackEvent(Z.Events.Presence.GET_ONLINE_USERS_ON_CURRENT_DOCUMENT_TRIGGERED),this.getService(Hl).getOnlineUsersOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getOnlineUsersOnCurrentDocument: ",o),se(null)}}_setInactivityTime(o){this.getService(y).log("%c[WB] Calling FUNCTION: _setInactivityTime","color: green;");try{this.trackEvent(Z.Events.Presence.SET_INACTIVITY_TIME_TRIGGERED,{payload:{time:o}}),isNaN(o)?this.getService(y).catch("Error in setInactivityTime: ","Provided value is not a number."):this.getService(Hl).setInactivityTime(o)}catch(n){this.getService(y).catch("Error in setInactivityTime: ",n)}}_disableFlockMode(){try{this.trackEvent(Z.Events.Presence.DISABLE_FLOCK_MODE_TRIGGERED),this.getService(zc).disableFlockMode()}catch(o){this.getService(y).catch("Error in _disableFlockMode: ",o)}}_enableFlockMode(o){try{this.trackEvent(Z.Events.Presence.ENABLE_FLOCK_MODE_TRIGGERED,{payload:{options:o}}),this.getService(zc).enableFlockMode(o)}catch(n){this.getService(y).catch("Error in _enableFlockMode: ",n)}}_stopFollowingUser(){try{this.trackEvent(Z.Events.Presence.STOP_FOLLOWING_USER_TRIGGERED),this.getService(zc).stopFollowingUser()}catch(o){this.getService(y).catch("Error in _stopFollowingUser: ",o)}}_startFollowingUser(o){try{this.trackEvent(Z.Events.Presence.START_FOLLOWING_USER_TRIGGERED,{payload:{externalId:o}});let n=this.getService(Hl).getPresenceUserFromExternalId(o);return n&&n.userSnippylyId&&n.name!==void 0?(this.getService(zc).startFollowingUser(n.userSnippylyId,n.name),{success:!0,msg:"Joined flock session."}):{success:!1,msg:"User could not be found."}}catch(n){return this.getService(y).catch("Error in _startFollowingUser: ",n),{success:!1,msg:"Unknown error.",raw:n}}}_enableSelf(){try{this.trackEvent(Z.Events.Presence.ENABLE_SELF_TRIGGERED),this.getService(Hl).enableIncludeSelf()}catch(o){this.getService(y).catch("Error in _enableSelf: ",o)}}_disableSelf(){try{this.trackEvent(Z.Events.Presence.DISABLE_SELF_TRIGGERED),this.getService(Hl).disableIncludeSelf()}catch(o){this.getService(y).catch("Error in _disableSelf: ",o)}}_getData(o){this.getService(y).log("%c[WB] Calling FUNCTION: getData","color: green;");try{return this.trackEvent(Z.Events.Presence.GET_PRESENCE_DATA_TRIGGERED,{payload:{query:o}}),o&&typeof o=="object"&&(o=I({},o),o?.documentId&&(o.documentId=na(o.documentId)),o?.organizationId&&(o.organizationId=Va(o.organizationId))),this.getService(Fz).getData(o)}catch(n){return this.getService(y).catch("Error in _getData: ",n),se({data:null})}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Presence.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(Fz).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}};var d9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ReactionElement","color: blue;"),this.enableDarkMode=this._enableDarkMode,this.disableDarkMode=this._disableDarkMode,this.setCustomReactions=this._setCustomReactions}_enableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDarkMode","color: green;");try{this.trackEvent(Z.Events.Reactions.ENABLE_DARK_MODE_TRIGGERED),this.getService(ar).enableDarkMode()}catch(o){this.getService(y).catch("Error in _enableDarkMode: ",o)}}_disableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDarkMode","color: green;");try{this.trackEvent(Z.Events.Reactions.DISABLE_DARK_MODE_TRIGGERED),this.getService(ar).disableDarkMode()}catch(o){this.getService(y).catch("Error in _disableDarkMode: ",o)}}_setCustomReactions(o){this.getService(y).log("%c[WB] Calling FUNCTION: setCustomReactions","color: green;");try{this.trackEvent(Z.Events.Reactions.SET_CUSTOM_REACTIONS_TRIGGERED,{payload:{reactions:o}}),this.getService(ar).setCustomReactions(o)}catch(n){this.getService(y).catch("Error in _setCustomReactions: ",n)}}};var hg=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.recorderAnnotationService=t,this.recorderService=r,this.actionSubjects=new Map,this.subscriptions=[];try{this.recorderAnnotationService.setRecorderActionsService(this),this.recorderService.setRecorderActionsService(this)}catch(a){this.loggingService.catch("Error in RecorderActionsService constructor: ",a)}}onTranscriptionDone(e){try{this.triggerAction(Fl.TRANSCRIPTION_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onTranscriptionDone: ",t)}}onRecordingDone(e){try{this.triggerAction(Fl.RECORDING_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingDone: ",t)}}onRecordingEditDone(e){try{this.triggerAction(Fl.RECORDING_EDIT_DONE,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingEditDone: ",t)}}onRecordingStarted(e){try{this.triggerAction(Fl.RECORDING_STARTED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingStarted: ",t)}}onRecordingPaused(e){try{this.triggerAction(Fl.RECORDING_PAUSED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingPaused: ",t)}}onRecordingCancelled(e){try{this.triggerAction(Fl.RECORDING_CANCELLED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingCancelled: ",t)}}onRecordingStopped(e){try{this.triggerAction(Fl.RECORDING_STOPPED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingStopped: ",t)}}onRecordingResumed(e){try{this.triggerAction(Fl.RECORDING_RESUMED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingResumed: ",t)}}onDeleteRecording(e){try{this.triggerAction(Fl.DELETE_RECORDING,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onDeleteRecording: ",t)}}onError(e){try{this.triggerAction(Fl.ERROR,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onError: ",t)}}onRecordingSaveInitiated(e){try{this.triggerAction(Fl.RECORDING_SAVE_INITIATED,e)}catch(t){this.loggingService.catch("Error in RecorderActionsService onRecordingSaveInitiated: ",t)}}triggerAction(e,t){try{this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.next(t)}catch(r){this.loggingService.catch("Error in RecorderActionsService triggerAction: ",r)}}onAction(e){try{return this.actionSubjects.has(e)||this.actionSubjects.set(e,new tt),this.actionSubjects.get(e)?.asObservable()}catch(t){return this.loggingService.catch("Error in RecorderActionsService onAction: ",t),se(null)}}};o.\u0275fac=function(t){return new(t||o)(J(y),J(Yi),J(In))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var m9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: RecorderElement","color: blue;"),this.initRecording=this._initRecording,this.onRecordedData=this._onRecordedData,this.enableDarkMode=this._enableDarkMode,this.disableDarkMode=this._disableDarkMode,this.enableRecordingCountdown=this._enableRecordingCountdown,this.disableRecordingCountdown=this._disableRecordingCountdown,this.getRecordingDataByRecorderId=this._getRecordingDataByRecorderId,this.enableRecordingTranscription=this._enableRecordingTranscription,this.disableRecordingTranscription=this._disableRecordingTranscription,this.getRecordingData=this._getRecordingData,this.enableVideoEditor=this._enableVideoEditor,this.disableVideoEditor=this._disableVideoEditor,this.getRecordings=this._getRecordings,this.fetchRecordings=this._fetchRecordings,this.deleteRecordings=this._deleteRecordings,this.setRecordingQualityConstraints=this._setRecordingQualityConstraints,this.setRecordingEncodingOptions=this._setRecordingEncodingOptions,this.downloadLatestVideo=this._downloadLatestVideo,this.enableRecordingMic=this._enableRecordingMic,this.disableRecordingMic=this._disableRecordingMic,this.enableOnboardingTooltip=this._enableOnboardingTooltip,this.disableOnboardingTooltip=this._disableOnboardingTooltip,this.enableRetakeOnVideoEditor=this._enableRetakeOnVideoEditor,this.disableRetakeOnVideoEditor=this._disableRetakeOnVideoEditor,this.askDevicePermission=this._askDevicePermission,this.setMaxLength=this._setMaxLength,this.openPictureInPicture=this._openPictureInPicture,this.exitPictureInPicture=this._exitPictureInPicture,this.requestScreenPermission=this._requestScreenPermission,this.enablePictureInPicture=this._enablePictureInPicture,this.disablePictureInPicture=this._disablePictureInPicture,this.on=this._on}_initRecording(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: initRecording","color: green;");try{return this.trackEvent(Z.Events.Recording.INIT_RECORDING_TRIGGERED,{payload:{type:o,panelId:n}}),this.getService(In).initRecording(o,n)}catch(e){return this.getService(y).catch("Error in _initRecording: ",e),se(null)}}_onRecordedData(){this.getService(y).log("%c[WB] Calling FUNCTION: onRecordedData","color: green;");try{return this.trackEvent(Z.Events.Recording.ON_RECORDED_DATA_TRIGGERED),this.getService(In).onRecordedData()}catch(o){return this.getService(y).catch("Error in _onRecordedData: ",o),se(null)}}_enableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDarkMode","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_DARK_MODE_TRIGGERED),this.getService(Yi).setRecorderContainerDarkMode(!0)}catch(o){this.getService(y).catch("Error in _enableDarkMode: ",o)}}_disableDarkMode(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDarkMode","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_DARK_MODE_TRIGGERED),this.getService(Yi).setRecorderContainerDarkMode(!1)}catch(o){this.getService(y).catch("Error in _disableDarkMode: ",o)}}_enableRecordingCountdown(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingCountdown","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_COUNTDOWN_TRIGGERED),this.getService(In).enableRecordingCountdown()}catch(o){this.getService(y).catch("Error in _enableRecordingCountdown: ",o)}}_disableRecordingCountdown(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingCountdown","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_COUNTDOWN_TRIGGERED),this.getService(In).disableRecordingCountdown()}catch(o){this.getService(y).catch("Error in _disableRecordingCountdown: ",o)}}_getRecordingDataByRecorderId(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordingDataByRecorderId","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDING_DATA_BY_RECORDER_ID_TRIGGERED,{payload:{recorderId:o}}),this.getService(Yi).getRecorderDataByRecorderId(o)}catch(n){return this.getService(y).catch("Error in _getRecordingDataByRecorderId: ",n),se(null)}}_getRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordings","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDINGS_TRIGGERED,{payload:{query:o}}),this.getService(Yi).getRecordings(o)}catch(n){return this.getService(y).catch("Error in _getRecordings: ",n),se([])}}_getRecordingData(o){this.getService(y).log("%c[WB] Calling FUNCTION: getRecordingData","color: green;");try{return this.trackEvent(Z.Events.Recording.GET_RECORDING_DATA_TRIGGERED,{payload:{query:o}}),this.getService(Yi).getRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _getRecordingData: ",n),Promise.resolve({data:null})}}_fetchRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: fetchRecordings","color: green;");try{return this.trackEvent(Z.Events.Recording.FETCH_RECORDINGS_TRIGGERED,{payload:{query:o}}),this.getService(Yi).fetchRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _fetchRecordings: ",n),Promise.resolve([])}}_deleteRecordings(o){this.getService(y).log("%c[WB] Calling FUNCTION: deleteRecording","color: green;");try{return this.trackEvent(Z.Events.Recording.DELETE_RECORDING_TRIGGERED,{payload:{query:o}}),this.getService(Yi).deleteRecorderDataByRecorderIds(o)}catch(n){return this.getService(y).catch("Error in _deleteRecording: ",n),Promise.resolve([])}}_enableRecordingTranscription(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingTranscription","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_TRANSCRIPTION_TRIGGERED),this.getService(Yi).enableRecordingTranscription()}catch(o){this.getService(y).catch("Error in _enableRecordingTranscription: ",o)}}_disableRecordingTranscription(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingTranscription","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_TRANSCRIPTION_TRIGGERED),this.getService(Yi).disableRecordingTranscription()}catch(o){this.getService(y).catch("Error in _disableRecordingTranscription: ",o)}}_on(o){this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return this.trackEvent(Z.Events.Recording.ON_ACTION_TRIGGERED,{payload:{action:o}}),this.getService(hg).onAction(o)}catch(n){return this.getService(y).catch("Error in _on: ",n),se(null)}}_enableVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: enableVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_VIDEO_EDITOR_TRIGGERED),this.getService(In).enableVideoEditor()}catch(o){this.getService(y).catch("Error in _enableVideoEditor: ",o)}}_disableVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: disableVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_VIDEO_EDITOR_TRIGGERED),this.getService(In).disableVideoEditor()}catch(o){this.getService(y).catch("Error in _disableVideoEditor: ",o)}}_setRecordingQualityConstraints(o){this.getService(y).log("%c[WB] Calling FUNCTION: setRecordingQualityConstraints","color: green;");try{this.trackEvent(Z.Events.Recording.SET_RECORDING_QUALITY_CONSTRAINTS_TRIGGERED,{payload:{constraints:o}}),this.getService(In).setRecordingQualityConstraints(o)}catch(n){this.getService(y).catch("Error in _setRecordingQualityConstraints: ",n)}}_setRecordingEncodingOptions(o){this.getService(y).log("%c[WB] Calling FUNCTION: setRecordingEncodingOptions","color: green;");try{this.trackEvent(Z.Events.Recording.SET_RECORDING_ENCODING_OPTIONS_TRIGGERED,{payload:{options:o}}),this.getService(In).setRecordingEncodingOptions(o)}catch(n){this.getService(y).catch("Error in _setRecordingEncodingOptions: ",n)}}_downloadLatestVideo(o){this.getService(y).log("%c[WB] Calling FUNCTION: downloadLatestVideo","color: green;");try{return this.trackEvent(Z.Events.Recording.DOWNLOAD_LATEST_VIDEO_TRIGGERED,{payload:{recorderId:o}}),this.getService(Yi).downloadLatestVideo(o)}catch(n){return this.getService(y).catch("Error in _downloadLatestVideo: ",n),Promise.resolve(!1)}}_enableRecordingMic(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRecordingMic","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RECORDING_MIC_TRIGGERED),this.getService(In).enableRecordingMic()}catch(o){this.getService(y).catch("Error in _enableRecordingMic: ",o)}}_disableRecordingMic(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRecordingMic","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RECORDING_MIC_TRIGGERED),this.getService(In).disableRecordingMic()}catch(o){this.getService(y).catch("Error in _disableRecordingMic: ",o)}}_enableOnboardingTooltip(){this.getService(y).log("%c[WB] Calling FUNCTION: enableOnboardingTooltip","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_ONBOARDING_TOOLTIP_TRIGGERED),this.getService(In).enableOnboardingTooltip()}catch(o){this.getService(y).catch("Error in _enableOnboardingTooltip: ",o);return}}_disableOnboardingTooltip(){this.getService(y).log("%c[WB] Calling FUNCTION: disableOnboardingTooltip","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_ONBOARDING_TOOLTIP_TRIGGERED),this.getService(In).disableOnboardingTooltip()}catch(o){this.getService(y).catch("Error in _disableOnboardingTooltip: ",o);return}}_enableRetakeOnVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: enableRetakeOnVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED),this.getService(In).enableRetakeOnVideoEditor()}catch(o){this.getService(y).catch("Error in _enableRetakeOnVideoEditor: ",o)}}_disableRetakeOnVideoEditor(){this.getService(y).log("%c[WB] Calling FUNCTION: disableRetakeOnVideoEditor","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_RETAKE_ON_VIDEO_EDITOR_TRIGGERED),this.getService(In).disableRetakeOnVideoEditor()}catch(o){this.getService(y).catch("Error in _disableRetakeOnVideoEditor: ",o)}}_askDevicePermission(o){this.getService(y).log("%c[WB] Calling FUNCTION: askDevicePermission","color: green;");try{this.trackEvent(Z.Events.Recording.ASK_DEVICE_PERMISSION_TRIGGERED),this.getService(In).askDevicePermission(o)}catch(n){this.getService(y).catch("Error in _askDevicePermission: ",n)}}_setMaxLength(o){this.getService(y).log("%c[WB] Calling FUNCTION: setMaxLength","color: green;");try{this.trackEvent(Z.Events.Recording.SET_MAX_LENGTH_TRIGGERED,{payload:{seconds:o}}),this.getService(In).setMaxRecordingLength(o)}catch(n){this.getService(y).catch("Error in _setMaxLength: ",n)}}_openPictureInPicture(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: openPictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.OPEN_PICTURE_IN_PICTURE_TRIGGERED),yield this.getService(In).openPictureInPicture()}catch(o){this.getService(y).catch("Error in _openPictureInPicture: ",o)}})}_exitPictureInPicture(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: exitPictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.EXIT_PICTURE_IN_PICTURE_TRIGGERED),yield this.getService(za).exitPictureInPicture()}catch(o){this.getService(y).catch("Error in _exitPictureInPicture: ",o)}})}_requestScreenPermission(){return Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: requestScreenPermission","color: green;");try{return this.trackEvent(Z.Events.Recording.REQUEST_SCREEN_PERMISSION_TRIGGERED),this.getService(In).requestScreenPermission()}catch(o){return this.getService(y).catch("Error in _requestScreenPermission: ",o),null}})}_enablePictureInPicture(){this.getService(y).log("%c[WB] Calling FUNCTION: enablePictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.ENABLE_PICTURE_IN_PICTURE_TRIGGERED),this.getService(za).enablePictureInPicture()}catch(o){this.getService(y).catch("Error in _enablePictureInPicture: ",o)}}_disablePictureInPicture(){this.getService(y).log("%c[WB] Calling FUNCTION: disablePictureInPicture","color: green;");try{this.trackEvent(Z.Events.Recording.DISABLE_PICTURE_IN_PICTURE_TRIGGERED),this.getService(za).disablePictureInPicture()}catch(o){this.getService(y).catch("Error in _disablePictureInPicture: ",o)}}};var Gc=(()=>{let o=class o{constructor(e,t,r,a,s,c){this.analyticsService=e,this.authService=t,this.configService=r,this.domService=a,this.loggingService=s,this.functions=c,this.rewriterAnnotations$=new ve([]),this.rewriterOptions$=new ve({}),this.rewriterEnabled$=new ve(!1),this.lastOpenAIPromptCalledAt=0,this.getRewriterEnabled$().subscribe(p=>{try{if(p){let g=document.querySelectorAll(j.TAGS.SNIPPYLY_REWRITER);if(!document.querySelectorAll(j.TAGS.VELT_REWRITER)?.length&&!g?.length){let E=document.createElement(j.TAGS.VELT_REWRITER);document.body.appendChild(E),this.authService.getUser$().pipe(Le(D=>!!D),rt(1)).subscribe(D=>{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITER_ENABLED,{isMobileDevice:this.domService.isMobileDevice()})})}}else{let g=document.querySelectorAll(j.TAGS.SNIPPYLY_REWRITER);g?.length&&g.forEach(E=>{E.remove()});let C=document.querySelectorAll(j.TAGS.VELT_REWRITER);C?.length&&C.forEach(E=>{E.remove()})}}catch(g){this.loggingService.catch("Error in rewriterEnabled$: ",g)}},p=>{this.loggingService.catch("Error in rewriterEnabled$ subscription: ",p)})}getRewriterAnnotations$(){try{return this.rewriterAnnotations$.asObservable()}catch(e){return this.loggingService.catch("Error in getRewriterAnnotations$(): ",e),se([])}}addRewriter(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: addRewriter","color: green;");try{let a=this.authService.getUser();if(a)if(a.isReadOnly||a.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add rewriters.");else{let s=new Tk;s.from=a,s.color=j.DEFAULT_ANNOTATION_COLOR,t&&(s.targetTextRange=t),r&&(s.rewriterType=r),this.saveRewriterToDb(s)}}catch(a){this.loggingService.catch("Error in RewriterService addRewriter: ",a)}}saveRewriterToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: saveRewriterToDb","color: green;");try{e?.annotationId||(e.annotationId=Math.random().toString(36).substring(2)+Date.now().toString(36));let t=this.rewriterAnnotations$.getValue();t.push(e),this.rewriterAnnotations$.next(t),this.domService.toggleAnnotationSelection(e)}catch(t){this.loggingService.catch("Error in RewriterService saveRewriterToDb: ",t)}}removeRewriter(e){try{let t=this.rewriterAnnotations$.getValue(),r=t.findIndex(a=>a.annotationId===e.annotationId);r>-1&&(t.splice(r,1),this.rewriterAnnotations$.next(t))}catch(t){this.loggingService.catch("Error in RewriterService removeRewriter: ",t)}}getRewriterOptions(e,t,r){try{if(this.lastOpenAIPromptCalledAt&&Date.now()-this.lastOpenAIPromptCalledAt<1e3)return this.lastOpenAIPromptCalledAt=Date.now(),se([]);this.lastOpenAIPromptCalledAt=Date.now();let a=br(this.functions,Er({url:oi.cloudFunction.chatgptCompletion,apiProxyDomain:this.configService?.getApiProxyDomain()}),{timeout:20*60*1e3}),s=t?.[0]?.role==="system"?t?.[0]?.content:null;return this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_PROMPT_SUBMITTED,{isMobileDevice:this.domService.isMobileDevice(),prompt:s,type:e}),Zi(a({messages:t,type:e,apiKey:this.configService.getApiKey(),sdkVersion:ia(),sdkType:this.configService.getSdkType()})).pipe(ce(c=>c?.data?c.data:[]))}catch(a){return this.loggingService.catch("Error in RewriterService getRewriterOptions: ",a),se([])}}enableRewriter(){try{this.rewriterEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in RewriterService enableRewriter: ",e)}}disableRewriter(){try{this.rewriterEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in RewriterService disableRewriter: ",e)}}getRewriterEnabled$(){try{return this.rewriterEnabled$.asObservable()}catch(e){return this.loggingService.catch("Error in RewriterService getRewriterEnabled$: ",e),se(!1)}}resetRewriter(){try{this.domService.resetSelectedAnnotationsMap(!1,"rewriter"),this.rewriterAnnotations$.next([])}catch(e){this.loggingService.catch("Error in RewriterService resetRewriter: ",e)}}getChatGPTInput(e,t,r=[]){try{let a="";return e&&(a=`
488
488
  ${a}
489
489
  <|im_start|>system
490
490
  ${e}
@@ -504,7 +504,7 @@ This typically indicates that your device does not have a healthy Internet conne
504
504
  Provide one more option
505
505
  <|im_end|>
506
506
  `),a}catch(a){return this.loggingService.catch("Error in RewriterService getChatGPTPrompt: ",a),""}}removeChatGPTPlaceholders(e){try{let t=["<|im_start|>","<|im_start>","<im_start|>","<im_start>","<|im_end|>","<|im_end>","<im_end|>","<im_end>","<|end|>","<|end>","<end|>","<end>","<|start|>","<|start>","<start|>","<start>"],r=e;return t.forEach(a=>{let s=a.replace(/\|/g,"\\|");r=r?.replace(new RegExp(s,"g"),"")}),r}catch(t){return this.loggingService.catch("Error in RewriterService removeChatGPTPlaceholders: ",t),""}}};o.\u0275fac=function(t){return new(t||o)(J(et),J(Ve),J(kt),J(Be),J(y),J(Wo))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var g9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: RewriterElement","color: blue;"),this.enableRewriter=this._enableRewriter,this.disableRewriter=this._disableRewriter}_enableRewriter(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableLiveRewriter","color: green;");try{this.trackEvent(Z.Events.Rewriter.ENABLE_REWRITER_TRIGGERED),this.getService(Gc).enableRewriter()}catch(o){this.getService(y).catch("Error in enableLiveRewriter: ",o)}}_disableRewriter(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableRewriter","color: green;");try{this.trackEvent(Z.Events.Rewriter.DISABLE_REWRITER_TRIGGERED),this.getService(Gc).disableRewriter()}catch(o){this.getService(y).catch("Error in disableRewriter: ",o)}}};var xRe=()=>({}),Uo=(()=>{let o=class o{constructor(){this.height=void 0,this.width=void 0,this.borderRadius=void 0,this.customClass=void 0,this.veltElement=!0}ngOnInit(){}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=O({type:o,selectors:[["velt-skeleton-loader-internal"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{height:"height",width:"width",borderRadius:"borderRadius",customClass:"customClass",customStyles:"customStyles"},standalone:!1,decls:2,vars:11,consts:[[1,"skeleton-loader",3,"ngStyle"]],template:function(t,r){t&1&&(_(0,"div",0),te(1),b()),t&2&&(tr(r.customClass),it("--velt-skeleton-loader-height",r.height||"100%")("--velt-skeleton-loader-width",r.width||"100%")("--velt-skeleton-loader-border-radius",r.borderRadius||"inherit"),d("ngStyle",r.customStyles||gt(10,xRe)),m(),_e(" ","\u200E ",`
507
- `))},dependencies:[Om],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center}.skeleton-loader[_ngcontent-%COMP%]{display:inline-block;background:linear-gradient(-90deg,#f0f0f0,#e2e2e2,#f0f0f0);background-size:400% 400%;animation:_ngcontent-%COMP%_skeleton-loading 1.2s ease-in-out 4;height:var(--velt-skeleton-loader-height);width:var(--velt-skeleton-loader-width);border-radius:var(--velt-skeleton-loader-border-radius)}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-position:100% 0}to{background-position:-100% 0}}"]});let i=o;return i})();var TRe=["userAvatarRef"],DRe=["*"];function wRe(i,o){if(i&1&&(_(0,"div",7),w(1,"span",8),b()),i&2){let n=l(2).ngIf,e=l();it("background-color",n.background||"#625DF5"),x("data-testid",e.componentId+"-initial-container"),m(),it("color",n.textColor||"#FFFFFF"),x("data-modal-author-initial",n.initial)("data-testid",e.componentId+"-initial")}}function ORe(i,o){if(i&1){let n=Y();_(0,"img",9),G("error",function(){N(n);let t=l(3);return F(t.onImageLoadError())})("load",function(){N(n);let t=l(3);return F(t.onImageLoaded())}),b()}if(i&2){let n=l(2).ngIf,e=l();it("display",n.imgLoaded?"":"none !important"),d("src",n.src,vn),x("alt","User avatar")("data-testid",e.componentId+"-image")}}function ARe(i,o){if(i&1&&(f(0),_(1,"div",4,1),u(3,wRe,2,7,"div",5)(4,ORe,1,5,"ng-template",6),Lt(5),b(),v()),i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId+"-container")("aria-label","User avatar"),m(2),d("ngIf",!n.imgLoaded),m(),d("ngIf",!n.imgLoadError)}}function PRe(i,o){if(i&1&&w(0,"velt-skeleton-loader-internal",10),i&2){let n=l().ngIf;d("height",n.size?n.size+"px":"100%")("width",n.size?n.size+"px":"100%")}}function MRe(i,o){if(i&1&&(f(0),u(1,ARe,6,4,"ng-container",3)(2,PRe,1,2,"ng-template",null,0,xe),v()),i&2){let n=o.ngIf,e=de(3);m(),d("ngIf",n.imgLoaded||(n==null||n.user==null?null:n.user.photoUrl)||(n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email)||(n==null?null:n.initial))("ngIfElse",e)}}var Kn=(()=>{let o=class o{constructor(e,t,r){this.authService=e,this.loggingService=t,this.elementRef=r,this.initial="",this.background="#625DF5",this.textColor="#FFFFFF",this.userAvatarRef=new R(null),this.componentConfigSignal=Te({background:"#625DF5",textColor:"#FFFFFF",initial:"",src:"",imgLoaded:!1,imgLoadError:!1}),this.veltElement=!0,this.componentId="velt-user-avatar"}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in UserAvatarComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","img"),e.setAttribute("data-testid",this.componentId+"-container"),this.updateAriaLabel()}catch(e){this.loggingService.catch("Error in UserAvatarComponent setupA11yAttributes:",e)}}updateAriaLabel(){try{this.elementRef.nativeElement.setAttribute("aria-label","User avatar")}catch(e){this.loggingService.catch("Error in UserAvatarComponent updateAriaLabel:",e)}}ngAfterViewInit(){this.updateAvatarSize()}ngOnChanges(e){try{if(e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e?.user){let t=e.user.currentValue;t?.photoUrl!==this.componentConfigSignal().src&&this.componentConfigSignal.update(r=>(r=T(I({},r),{src:t?.photoUrl,imgLoaded:!1,imgLoadError:!1}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{background:t?.color||this.authService.getUserAvatarColor(t?.userId)}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{textColor:t?.textColor||this.authService.getUserTextColor(t?.userId)}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{initial:t?.initial||t?.name?.charAt(0)||t?.email?.charAt(0)}),r))}e?.size&&this.updateAvatarSize(),e?.width&&this.updateAvatarSize(),e?.height&&this.updateAvatarSize()}catch(t){this.loggingService.catch("Error in UserAvatarComponent ngOnChanges: ",t)}}onImageLoadError(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{imgLoadError:!0}),e))}catch(e){this.loggingService.catch("Error in UserAvatarComponent onImageLoadError: ",e)}}onImageLoaded(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{imgLoaded:!0}),e))}catch(e){this.loggingService.catch("Error in UserAvatarComponent onImageLoaded: ",e)}}updateAvatarSize(){try{this.elementRef?.nativeElement&&(this.size&&(this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-height",this.size+"px"),this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-width",this.size+"px")),this.width&&this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-width",this.size+"px"),this.height&&this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-height",this.size+"px"))}catch(e){this.loggingService.catch("Error in UserAvatarComponent updateAvatarSize: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-avatar"]],viewQuery:function(t,r){if(t&1&&nt(TRe,5),t&2){let a;Xe(a=Qe())&&(r.userAvatarRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{initial:"initial",src:"src",background:"background",textColor:"textColor",size:"size",width:"width",height:"height",user:"user"},standalone:!1,features:[Ze],ngContentSelectors:DRe,decls:1,vars:1,consts:[["loadingTemplateRef",""],["userAvatarRef",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["velt-ignore-change-detection","true","role","img",1,"s-user-avatar-container","velt-user-avatar"],["class","s-user-avatar-initial-container velt-user-avatar--initial-container","aria-hidden","componentConfig.imgLoaded",3,"background-color",4,"ngIf"],[3,"ngIf"],["aria-hidden","componentConfig.imgLoaded",1,"s-user-avatar-initial-container","velt-user-avatar--initial-container"],[1,"s-user-avatar-initial","velt-user-avatar--initial"],["referrerpolicy","no-referrer","velt-ignore-change-detection","true",1,"s-user-avatar-image","velt-user-avatar--image",3,"error","load","src"],["borderRadius","100%",3,"height","width"]],template:function(t,r){t&1&&(jt(),u(0,MRe,4,2,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Uo],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));position:static}*[_ngcontent-%COMP%]:empty{display:revert}.s-user-avatar-container[_ngcontent-%COMP%]{position:relative;width:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));border-radius:50%;display:inline-block}velt-skeleton-loader-internal[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));border-radius:50%}.s-user-avatar-initial-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;border-radius:50%;align-items:center;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}.s-user-avatar-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:50%;width:100%;height:100%;display:flex}.s-user-avatar-initial[_ngcontent-%COMP%]{color:#fff;font-size:calc((var(--legacy-velt-user-avatar-initial-font-size) + 0px) * var(--velt-base-rem-unit));position:relative;text-transform:uppercase}.s-user-avatar-initial[_ngcontent-%COMP%]:after{content:attr(data-modal-author-initial);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.velt-user-avatar[_ngcontent-%COMP%], velt-skeleton-loader-internal[_ngcontent-%COMP%]{height:var(--legacy-velt-user-avatar-height, calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit)));width:var(--legacy-velt-user-avatar-width, calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit)))}"],changeDetection:0});let i=o;return i})();var kRe=["selectionElementPortalOverlay"],RRe=()=>["velt-overlay-panel"],NRe=i=>[i];function FRe(i,o){if(i&1&&(f(0),_(1,"span",10),te(2),P(3,"translate"),b(),v()),i&2){let n=l(),e=n.$implicit,t=n.index,r=l(5);m(),it("--velt-selection-color",e==null||e.user==null?null:e.user.color),x("data-testid",r.componentId+"-user-name-"+t),m(),ze(M(3,4,(e==null||e.user==null?null:e.user.name)||(e==null||e.user==null?null:e.user.email)))}}function LRe(i,o){if(i&1&&(f(0),u(1,FRe,4,6,"ng-container",3),v()),i&2){let n=o.index,e=l(5);m(),d("ngIf",n<e.maxCount)}}function BRe(i,o){if(i&1&&(_(0,"span",11),te(1),b()),i&2){let n=l(4).ngIf,e=l();it("--velt-selection-color",(n.selections[0]==null||n.selections[0].user==null?null:n.selections[0].user.color)||"white"),x("data-testid",e.componentId+"-additional-count")("aria-label",(n.selections==null?null:n.selections.length)-e.maxCount+" additional users"),m(),_e("+",(n.selections==null?null:n.selections.length)-e.maxCount,"")}}function VRe(i,o){if(i&1&&(f(0),_(1,"div",7),P(2,"translate"),u(3,LRe,2,1,"ng-container",8)(4,BRe,2,5,"span",9),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),x("data-testid",e.componentId+"-label-container")("aria-label",M(2,4,"Selected users")),m(2),d("ngForOf",n.selections),m(),d("ngIf",(n.selections==null?null:n.selections.length)>e.maxCount)}}function URe(i,o){if(i&1&&(f(0),w(1,"snippyly-user-avatar",13),v()),i&2){let n=l(),e=n.$implicit,t=n.index;m(),it("--velt-selection-color",e==null||e.user==null?null:e.user.color)("--velt-selection-user-index",t),d("size",20)("user",e==null?null:e.user)}}function jRe(i,o){if(i&1&&(f(0),u(1,URe,2,6,"ng-container",3),v()),i&2){let n=o.index,e=l(5);m(),d("ngIf",n<e.maxCount)}}function $Re(i,o){if(i&1&&(_(0,"div",14),P(1,"translate"),_(2,"span",15),te(3),b()()),i&2){let n=l(4).ngIf,e=l();it("--velt-selection-user-index",n.selections==null?null:n.selections.length)("background-color",(n.selections[(n.selections==null?null:n.selections.length)-1]==null||n.selections[(n.selections==null?null:n.selections.length)-1].user==null?null:n.selections[(n.selections==null?null:n.selections.length)-1].user.color)||"white"),x("data-testid",e.componentId+"-additional-avatars")("aria-label",(n.selections==null?null:n.selections.length)-e.maxCount+" "+M(1,7,"additional users")),m(3),_e("+",(n.selections==null?null:n.selections.length)-e.maxCount,"")}}function HRe(i,o){if(i&1&&u(0,jRe,2,1,"ng-container",8)(1,$Re,4,9,"div",12),i&2){let n=l(3).ngIf,e=l();d("ngForOf",n.selections),m(),d("ngIf",(n.selections==null?null:n.selections.length)>e.maxCount)}}function zRe(i,o){if(i&1&&u(0,VRe,5,6,"ng-container",6)(1,HRe,2,2,"ng-template",null,2,xe),i&2){let n=de(2),e=l(2).ngIf,t=l();d("ngIf",(e==null?null:e.userIndicatorType)===(t.userIndicatorTypes==null?null:t.userIndicatorTypes.Label))("ngIfElse",n)}}function GRe(i,o){if(i&1&&(f(0),w(1,"div",4,0),u(3,zRe,3,2,"ng-template",5,1,xe),v()),i&2){let n=de(2),e=l().ngIf,t=l();m(),it("top",(e==null||e.position==null?null:e.position.top)+t.offsetTop,"px")("left",(e==null||e.position==null?null:e.position.left)+t.offsetLeft,"px"),d("id","selection-element-contianer-"+(t.highlight.user==null?null:t.highlight.user.userSnippylyId)),x("data-testid",t.componentId),m(2),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",!0)("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",gt(13,RRe))("cdkConnectedOverlayPositions",A(14,NRe,e==null?null:e.overlayPosition))}}function WRe(i,o){if(i&1&&(f(0),u(1,GRe,5,16,"ng-container",3),v()),i&2){let n=o.ngIf;m(),d("ngIf",n==null?null:n.position)}}var cde=(()=>{let o=class o{get highlight(){return this._highlight}set highlight(e){this._highlight=e,this.calculatePosition()}constructor(e,t,r){this.loggingService=e,this.selectionService=t,this.elementRef=r,this._highlight=new lg,this.position=null,this.userIndicatorTypes=h0,this.offsetLeft=0,this.offsetTop=0,this.maxCount=1,this.componentConfigSignal=Te({userIndicatorPosition:xb.End,userIndicatorType:h0.Avatar,position:null,overlayPosition:{originX:"end",originY:"top",overlayX:"end",overlayY:"top"},selections:[]}),this.veltElement=!0,this.componentId="velt-selection-element";try{this.loggingService.log("%c[WB] Creating CLASS: SelectionElementPortalComponent","color: blue;");let a=this.selectionService.getUserIndicatorPosition(),s=this.selectionService.getUserIndicatorType();this.componentConfigSignal.update(c=>(c=T(I({},c),{userIndicatorPosition:a,userIndicatorType:s}),c)),this.setOverlayPosition(a)}catch(a){this.loggingService.log("Error in SelectionElementPortalComponent constructor: ",a)}}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","complementary"),e.setAttribute("aria-label","Selection portal")}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent setupA11yAttributes:",e)}}setSelections(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{selections:e}),t))}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent setSelections: ",t)}}addSelection(e){try{this.componentConfigSignal.update(t=>(t=I({},t),t.selections.push(e),t))}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent addSelection: ",t)}}ngAfterViewInit(){try{this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: ngAfterViewInit","color: green;"),this.updateOverlayPosition()}catch(e){this.loggingService.catch("Error in ngAfterViewInit: ",e)}}setOverlayPosition(e){try{switch(this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: setOverlayPosition","color: green;"),e){case"start":this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPosition:{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}}),t));break;default:this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPosition:{originX:"end",originY:"top",overlayX:"end",overlayY:"top"}}),t))}this.updateOverlayPosition()}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent setOverlayPosition: ",t)}}updateOverlayPosition(){try{this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: updateOverlayPosition","color: green;"),this.selectionElementPortalOverlay&&this.selectionElementPortalOverlay?.overlayRef?.updatePosition()}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent updateOverlayPosition: ",e)}}calculatePosition(){try{if(this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: calculatePosition","color: green;"),this.highlight?.targetElement){let e=WS(this.highlight.targetElement);if(e){let t=e.iterateNext(),r,a=null,s=null;try{r=JSON.parse(t?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)||"{}"),a=t?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_USER_INDICATOR_POSITION)||this.componentConfigSignal().userIndicatorPosition,a&&this.setOverlayPosition(a),s=t?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_USER_INDICATOR_TYPE)||this.componentConfigSignal().userIndicatorType,this.componentConfigSignal.update(p=>(p=T(I({},p),{userIndicatorPosition:a,userIndicatorType:s}),p))}catch{}let c;if(r?.horizontal&&(c=r.horizontal),a==="start"?c="top-start":c="top-right",t){let p=t.getBoundingClientRect();if(p&&p.width&&p.height)switch(c){case"left":this.position={top:p.height/2-16,left:-4};break;case"left-start":this.position={top:0,left:-4};break;case"top-start":this.position={top:-32,left:0};break;case"top-right":this.position={top:-32,left:p.width};break;case"bottom-left":this.position={top:p.height+4,left:0};break;case"bottom-right":this.position={top:p.height+4,left:p.width-32};break;case"center-left":this.position={top:p.height/2-16,left:-32};break;case"center-right":this.position={top:p.height/2-16,left:p.width+4};break;default:this.position={top:-32,left:p.width}}else this.position=null}else this.position=null}else this.position=null}this.componentConfigSignal.update(e=>(e=T(I({},e),{position:this.position}),e))}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent calculatePosition: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(Fs),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-selection-element-portal"]],viewQuery:function(t,r){if(t&1&&nt(kRe,5),t&2){let a;Xe(a=Qe())&&(r.selectionElementPortalOverlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{highlight:"highlight",offsetLeft:"offsetLeft",offsetTop:"offsetTop"},standalone:!1,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["selectionElementPortalOverlay","cdkConnectedOverlay"],["defaultAvatarTypeTemplate",""],[4,"ngIf"],["cdkOverlayOrigin","","role","presentation",1,"selection-element-portal",3,"id"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayLockPosition","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayPositions"],[4,"ngIf","ngIfElse"],["role","list",1,"velt-live-selection-element-user-name-container"],[4,"ngFor","ngForOf"],["class","velt-live-selection-element-user-name-plus","role","listitem",3,"--velt-selection-color",4,"ngIf"],["role","listitem",1,"velt-live-selection-element-user-name"],["role","listitem",1,"velt-live-selection-element-user-name-plus"],["class","photo-container","role","listitem",3,"--velt-selection-user-index","background-color",4,"ngIf"],[1,"photo-container","selection-user-avatar",3,"size","user"],["role","listitem",1,"photo-container"],[1,"s-selection-element-avatar-initial"]],template:function(t,r){t&1&&u(0,WRe,2,1,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,an,nn,Kn,ge],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);position:absolute;top:0;left:0;box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert}.selection-element-portal[_ngcontent-%COMP%]{display:none;position:absolute;top:0;left:0;white-space:nowrap;z-index:1;font-size:var(--velt-font-size-xs)}.photo-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc((1.5rem + 0px) * var(--velt-base-rem-unit));height:calc((1.5rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border-radius:50%;color:var(--velt-light-mode-white);border:2px solid var(--velt-selection-color);margin-left:-5px;z-index:calc(var(--velt-selection-user-index, 0) * -1)}.photo-container[_ngcontent-%COMP%] .s-selection-element-avatar-initial[_ngcontent-%COMP%]{color:var(--velt-light-mode-white)}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;object-fit:cover} snippyly-user-avatar.selection-user-avatar .s-user-avatar-initial{font-size:var(--velt-font-size-md)}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%]{display:flex;gap:var(--velt-spacing-xs);margin-top:5px}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%] .velt-live-selection-element-user-name[_ngcontent-%COMP%]{color:var(--velt-light-mode-white);display:flex;background:var(--velt-selection-color);padding:var(--velt-spacing-xs) var(--velt-spacing-sm);font-size:var(--velt-spacing-md);font-style:normal;font-weight:400;line-height:100%;border-radius:var(--velt-border-radius-md);font-family:var(--velt-default-font-family)}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%] .velt-live-selection-element-user-name-plus[_ngcontent-%COMP%]{color:var(--velt-light-mode-white);display:flex;background:var(--velt-selection-color);padding:var(--velt-spacing-x);font-size:var(--velt-font-size-xs);font-style:normal;font-weight:400;line-height:100%;border-radius:var(--velt-border-radius-md);font-family:var(--velt-default-font-family)}"],changeDetection:0});let i=o;return i})();var D0=(i,o)=>{try{let n=YRe(i),e=[],t=[];return n.forEach(r=>{r?.parentElement?.closest(j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT)?r?.parentElement?.normalize():t.push(r)}),t.forEach(r=>{let a=KRe(r,o);a&&e.push(a)}),e}catch(n){return at.catch("Error in highlighter highlightRange: ",n),[]}},YRe=i=>{try{if(i.collapsed)return[];let o=i.commonAncestorContainer;if(i.commonAncestorContainer.nodeType!==Node.ELEMENT_NODE&&(o=i.commonAncestorContainer.parentElement),!o)return[];let n=[],e=o.ownerDocument.createNodeIterator(o,NodeFilter.SHOW_TEXT),t,r=!1;for(;t=e.nextNode();)if(i.intersectsNode(t)){let a=t?.length;i.startContainer===t&&i.startOffset>0&&(t.splitText(i.startOffset),r=!0),i.endContainer===t&&i.endOffset<a&&t.splitText(i.endOffset),n.push(t)}return r&&n.shift(),n}catch(o){return at.catch("Error in highlighter getTextNodesInRange: ",o),[]}},KRe=(i,o)=>{try{let n=document.createElement(o||j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT);return i.parentElement?.replaceChild(n,i),n.appendChild(i),n}catch(n){return at.catch("Error in highlighter highlightNode: ",n),null}};var Fs=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D){this.afAuth=e,this.authService=t,this.configService=r,this.databaseService=a,this.docService=s,this.domService=c,this.componentFactoryResolver=p,this.injector=g,this.appRef=C,this.loggingService=E,this.commonDbService=D,this.documentPaths=null,this.textSelections={},this.enableSelections$=new ve(!1),this.userIndicatorEnabled$=new ve(!0),this.userIndicatorPosition$=new ve(xb.End),this.userIndicatorType$=new ve(h0.Avatar),this.defaultElementsTrackingEnabled$=new ve(!0),this.defaultStylingEnabled$=new ve(!0),this.elementSelections={},this.databaseService.getDb().pipe(Le(L=>!!L),rt(1)).subscribe(L=>{L&&this.updateOnDocumentFocusChange()},L=>{this.loggingService.catch("Error in SelectionService getDb subscription: ",L)}),this.docService.getDocumentPaths$().subscribe(L=>{this.documentPaths=L},L=>{this.loggingService.catch("Error in SelectionService getDocumentPaths subscription: ",L)}),this.domService.onDocumentClick$().subscribe(L=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&L?.target&&!window.getSelection()?.toString()){let z=this.getSelectionEnabledElement(L.target);if(z&&!Xi(z)){let W=this.domService.getXPath(z);if(W){let ee=new lg;ee.type="click",ee.targetElement=W,this.setSelection(ee)}}else this.removeSelection()}}catch(z){this.loggingService.catch("Error in SelectionService onDocumentClick$: ",z)}},L=>{this.loggingService.catch("Error in SelectionService onDocumentClick$ subscription: ",L)}),this.domService.onDocumentFocus$().subscribe(L=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&L?.target){let z=this.getSelectionEnabledElement(L.target);if(z&&!Xi(z)){let W=this.domService.getXPath(z);if(W){let ee=new lg;ee.type="focus",ee.targetElement=W,this.setSelection(ee)}}else this.removeSelection()}}catch(z){this.loggingService.catch("Error in SelectionService onDocumentFocus$: ",z)}},L=>{this.loggingService.catch("Error in SelectionService onDocumentFocus$ subscription: ",L)}),this.domService.onWindowKeyupEsc$().subscribe(L=>{this.removeSelection()},L=>{this.loggingService.catch("Error in SelectionService onWindowKeyupEsc$ subscription: ",L)}),this.enableSelections$.pipe(he(()=>this.isFeatureAllowed$({})),Le(L=>L?.config&&L?.user)).subscribe(L=>{(!L?.featureAllowed||!this.enableSelections$.value)&&this.removeSelection()},L=>{this.loggingService.catch("Error in SelectionService enableSelections$ subscription: ",L)}),this.domService.onSelectionChange$().subscribe(()=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&window.getSelection()?.toString()){let L=window.getSelection()?.getRangeAt(0);if(L.commonAncestorContainer&&!L?.collapsed){let z=iae([L]),W=new lg;W.type="selection",W.targetTextRange=z?.length?z[0]:null,this.setSelection(W)}}}catch(L){this.loggingService.catch("Error in SelectionService onSelectionChange$: ",L)}},L=>{this.loggingService.catch("Error in SelectionService onSelectionChange$ subscription: ",L)}),this.authService.getUser$().subscribe(L=>{this.user=L},L=>{this.loggingService.catch("Error in SelectionService getUser$ subscription: ",L)}),this.getSelectionsOnCurrentDocument().pipe(wi()).subscribe(([L,z])=>{try{if(L){let W=[];Object.keys(L).forEach(ee=>{let me=L[ee],Ce=z?z[ee]:null;!Ii(me,Ce)&&ee!==this.getUserIdHash(this.user)&&W.push(me)}),W.forEach(ee=>{if(ee.targetElement){let me=this.elementSelections[ee?.targetElement]?.portalRef,Ae=(this.elementSelections[ee?.targetElement]?.selections||[]).filter(Ge=>this.getUserIdHash(Ge.user)!==this.getUserIdHash(ee?.user));Ae?.length?(me.instance.setSelections(Ae.slice()),this.elementSelections[ee?.targetElement].selections=Ae.slice(),this.highlightElement(Ae[0])):(this.removeHighlightFromElement(ee),this.removeSelectionElement(ee))}else ee.targetTextRange&&this.removeHighlightFromText(ee)})}if(z){let W=[];Object.keys(z).forEach(ee=>{let me=L?L[ee]:null,Ce=z[ee];!Ii(me,Ce)&&ee!==this.getUserIdHash(this.user)&&W.push(Ce)}),W.forEach(ee=>{ee.targetElement?(this.highlightElement(ee),this.getUserIndicatorEnabled()&&this.setElementHighlight(ee)):ee.targetTextRange&&this.highlightText(ee)})}}catch(W){this.loggingService.catch("Error in SelectionService getSelectionsOnCurrentDocument: ",W)}},L=>{this.loggingService.catch("Error in SelectionService getSelectionsOnCurrentDocument subscription: ",L)}),this.authService.addPreSignOutFuction("highlight-signout",this.signOutUser.bind(this))}isFeatureAllowed(){return ao(this.configService.getConfig(),this.authService.getUser(),Re.LIVE_SELECTION)}updateOnDocumentFocusChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDocumentFocusChange","color: green;");try{document&&document.addEventListener("visibilitychange",e=>{this.user&&document.visibilityState==="hidden"&&this.removeSelection()})}catch(e){this.loggingService.catch("Error in updateOnDocumentFocusChange:",e)}}getSelectionsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getSelectionsOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed$({firebaseUser:e})),he(e=>e.featureAllowed?se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(ce(r=>(this.documentPaths=r,t)))),he(t=>t?.user?t?.user?.isAnonymous?se(null):this.documentPaths?this.databaseService.getDb().pipe(Le(r=>!!r),he(r=>this.documentPaths?.selection?this.commonDbService.dbListener({feature:"allSelections",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(a=>a?.data)):se(null))):se(null):se(null))):se(null)))}isFeatureAllowed$(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>(this.user=r,T(I({},t),{user:r}))))),he(t=>ao(t.config,t.user,Re.LIVE_SELECTION)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Live Selection feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}setSelection(e){try{if(this.user?.userId&&this.documentPaths?.selection){e.user=this.user;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in SelectionService setSelection: ",t)}}removeSelection(){try{this.user?.userId&&this.documentPaths?.selection&&this.commonDbService.deleteData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in SelectionService removeSelection: ",e)}}highlightElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();if(r){let a=["input","textarea","select","button"],s;try{r?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)&&(s=JSON.parse(r?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)||"{}"))}catch{}(!s||s?.border)&&this.domService.highlightUserElement(r,e?.user?.color,e?.user?.name,this.getDefaultStylingEnabled())}}}catch(t){this.loggingService.catch("Error in SelectionService highlightElement: ",t)}}removeHighlightFromElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();r&&this.domService.removeHighlightUserFromElement(r)}}catch(t){this.loggingService.catch("Error in SelectionService removeHighlightFromElement: ",t)}}highlightText(e){try{if(e?.targetTextRange){let t=Ov(e.targetTextRange?.text,this.domService.getXPath(e.targetTextRange?.commonAncestorContainer).iterateNext(),e.targetTextRange?.occurrence),r=new Range;try{r.setStart(t[0].textNode,t[0].startOffset||0),r.setEnd(t[t.length-1].textNode,t[t.length-1].endOffset||0)}catch{}if(r.toString()===e.targetTextRange?.text){let a=D0(r,j.TAGS.SNIPPYLY_HIGHLIGHT_USER_TEXT),s=[],c=this.getSelectionUserMarker(e.user);if(a&&a.length&&(a.forEach(p=>{p?.textContent?.trim()&&(this.domService.addClassToElement(p,p.tagName?.toLowerCase()),this.domService.addClassToElement(p,j.VELT_LIVE_SELECTION_ON_TEXT),this.getDefaultStylingEnabled()&&this.domService.addClassToElement(p,j.VELT_LIVE_SELECTION_ON_TEXT_DEFAULT),e.user?.color&&p.style.setProperty(j.VELT_SELECTION_COLOR,e.user?.color+"55"),s.push({element:p,textNode:p.childNodes[0]}))}),c)){let p=a.filter(C=>C?.textContent?.trim()),g=p?.length?p[p?.length-1]:null;g&&g.parentNode.insertBefore(c,g.nextSibling)}this.textSelections[this.getUserIdHash(e?.user)]={textNodes:s,marker:c}}}}catch(t){this.loggingService.catch("Error in SelectionService highlightText: ",t)}}removeHighlightFromText(e){try{let t=this.getUserIdHash(e?.user);t&&this.textSelections[t]?.textNodes?.length&&(this.textSelections[t].textNodes.forEach(r=>{r?.element&&r?.textNode&&r.element.replaceWith(r.textNode),r.textNode&&r.textNode.parentNode?.normalize()}),this.textSelections[t]?.marker&&this.textSelections[t]?.marker?.remove())}catch(t){this.loggingService.catch("Error in SelectionService removeHighlightFromText: ",t)}}getSelectionUserMarker(e){try{let t=document.createElement("span");t.classList.add("snippyly-user-marker","active"),t.setAttribute("data-name",e?.name+""),t.style.setProperty("--velt-selection-marker-color",e?.color||"#000");let r=document.createElement("span");r.classList.add("snippyly-user-marker-line");let a=document.createElement("span");return a.classList.add("snippyly-user-marker-dot"),r.appendChild(a),t.appendChild(r),setTimeout(()=>{t?.classList?.remove("active")},1e3),t}catch(t){return this.loggingService.catch("Error in SelectionService getSelectionUserMarker: ",t),null}}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths?.selection&&e?this.commonDbService.getData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0}}).then(a=>{a&&this.commonDbService.deleteData({feature:"selection",errorCallback:s=>{r(s)},callback:()=>{t(null)},properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0}}),t(null)}).catch(a=>{this.loggingService.catch("Error in SelectionService signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in SelectionService signOutUser:",a),r(a)}})}enableSelections(e){try{this.enableSelections$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService enableSelections: ",t)}}enableUserIndicator(){try{if(this.userIndicatorEnabled$.value===!0)return;this.userIndicatorEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableUserIndicator: ",e)}}disableUserIndicator(){try{if(this.userIndicatorEnabled$.value===!1)return;this.userIndicatorEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableUserIndicator: ",e)}}getUserIndicatorEnabled$(){return this.userIndicatorEnabled$.asObservable()}getUserIndicatorEnabled(){return this.userIndicatorEnabled$.value}setUserIndicatorPosition(e){try{this.userIndicatorPosition$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService setUserIndicatorPosition: ",t)}}getUserIndicatorPosition$(){return this.userIndicatorPosition$.asObservable()}getUserIndicatorPosition(){return this.userIndicatorPosition$.value}setUserIndicatorType(e){try{this.userIndicatorType$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService setUserIndicatorType: ",t)}}getUserIndicatorType$(){return this.userIndicatorType$.asObservable()}getUserIndicatorType(){return this.userIndicatorType$.value}enableDefaultElementsTracking(){try{if(this.defaultElementsTrackingEnabled$.value===!0)return;this.defaultElementsTrackingEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableDefaultElementsTracking: ",e)}}disableDefaultElementsTracking(){try{if(this.defaultElementsTrackingEnabled$.value===!1)return;this.defaultElementsTrackingEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableDefaultElementsTracking: ",e)}}getDefaultElementsTrackingEnabled$(){return this.defaultElementsTrackingEnabled$.asObservable()}getDefaultElementsTrackingEnabled(){return this.defaultElementsTrackingEnabled$.value}enableDefaultStyling(){try{if(this.defaultStylingEnabled$.value===!0)return;this.defaultStylingEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableDefaultStyling: ",e)}}disableDefaultStyling(){try{if(this.defaultStylingEnabled$.value===!1)return;this.defaultStylingEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableDefaultStyling: ",e)}}getDefaultStylingEnabled$(){return this.defaultStylingEnabled$.asObservable()}getDefaultStylingEnabled(){return this.defaultStylingEnabled$.value}getSelectionEnabledElement(e){try{let t=this.getDefaultElementsTrackingEnabled();return t&&j.SELECTION_ENABLED_ELEMENTS[e.tagName?.toLowerCase()]?e:Nj(e,t)}catch(t){return this.loggingService.catch("Error in SelectionService isElementAllowed: ",t),null}}setElementHighlight(e){try{if(!this.elementSelections[e.targetElement])this.setSelectionElement(e);else{let t=this.elementSelections[e.targetElement].portalRef;this.elementSelections[e.targetElement].selections?.find(a=>this.getUserIdHash(a.user)===this.getUserIdHash(e?.user))||(t.instance.addSelection(e),this.elementSelections[e.targetElement].selections.push(e))}}catch(t){this.loggingService.catch("Error in SelectionService setElementSelection: ",t)}}setSelectionElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();if(r){let a=this.domService.getHostElement(r),s=new $o(cde),c=new Ho(a,this.componentFactoryResolver,this.appRef,this.injector),p=c.attach(s);p.instance.highlight=e,p.instance.setSelections([e]),this.elementSelections[e.targetElement]={selectionHostDomPortalOutlet:c,selectionElementPortal:s,portalRef:p,selections:[JSON.parse(JSON.stringify(e))],userTargetElement:r,selectionHostElement:a,targetElement:e.targetElement},this.updateElementOffset(e)}}}catch(t){this.loggingService.catch("Error in SelectionService setSelectionElement: ",t)}}updateElementOffset(e){try{let{portalRef:t,userTargetElement:r,selectionHostElement:a}=this.elementSelections[e.targetElement],s=this.domService.getElementOffset(r,a);t.instance.offsetLeft=s.offsetLeft,t.instance.offsetTop=s.offsetTop}catch(t){this.loggingService.catch("Error in SelectionService updateElementOffset: ",t)}}checkElementHighlightsToRemove(e){try{let t=e.map(r=>r.targetElement);Object.keys(this.elementSelections).forEach(r=>{if(!t.includes(r)){let a=this.elementSelections[r];a&&(a.selectionHostDomPortalOutlet.detach(),this.domService.removeHighlightFromElement(a.selectionHostElement)),delete this.elementSelections[r]}})}catch(t){this.loggingService.catch("Error in SelectionService checkElementHighlightsToRemove: ",t)}}removeSelectionElement(e){try{let t=this.elementSelections[e.targetElement];t&&(t.selectionHostDomPortalOutlet.detach(),this.domService.removeHighlightFromElement(t.selectionHostElement)),delete this.elementSelections[e.targetElement]}catch(t){this.loggingService.catch("Error in SelectionService removeSelectionElement: ",t)}}getUserIdHash(e){try{return e?.userId?_t(e?.userId):null}catch(t){return this.loggingService.catch("Error in SelectionService getUserIdHash: ",t),null}}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(Ve),J(kt),J(Cn),J(ot),J(Be),J(wo),J(Ot),J(yi),J(y),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var u9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: SelectionElement","color: blue;"),this.enableLiveSelection=this._enableLiveSelection,this.disableLiveSelection=this._disableLiveSelection,this.enableUserIndicator=this._enableUserIndicator,this.disableUserIndicator=this._disableUserIndicator,this.setUserIndicatorPosition=this._setUserIndicatorPosition,this.setUserIndicatorType=this._setUserIndicatorType,this.enableDefaultElementsTracking=this._enableDefaultElementsTracking,this.disableDefaultElementsTracking=this._disableDefaultElementsTracking,this.enableDefaultStyling=this._enableDefaultStyling,this.disableDefaultStyling=this._disableDefaultStyling,this.getLiveSelectionData=this._getLiveSelectionData}_enableLiveSelection(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableLiveSelection","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_LIVE_SELECTION_TRIGGERED),this.getService(Fs).enableSelections(!0)}catch(o){this.getService(y).catch("Error in enableLiveSelection: ",o)}}_disableLiveSelection(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableLiveSelection","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_LIVE_SELECTION_TRIGGERED),this.getService(Fs).enableSelections(!1)}catch(o){this.getService(y).catch("Error in disableLiveSelection: ",o)}}_enableUserIndicator(){this.getService(y).log("%c[WB] Calling FUNCTION: enableUserIndicator","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_USER_INDICATOR_TRIGGERED),this.getService(Fs).enableUserIndicator()}catch(o){this.getService(y).catch("Error in _enableUserIndicator: ",o)}}_disableUserIndicator(){this.getService(y).log("%c[WB] Calling FUNCTION: disableUserIndicator","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_USER_INDICATOR_TRIGGERED),this.getService(Fs).disableUserIndicator()}catch(o){this.getService(y).catch("Error in _disableUserIndicator: ",o)}}_setUserIndicatorPosition(o){this.getService(y).log("%c[WB] Calling FUNCTION: setUserIndicatorPosition","color: green;");try{this.trackEvent(Z.Events.Selection.SET_USER_INDICATOR_POSITION_TRIGGERED,{payload:{position:o}}),this.getService(Fs).setUserIndicatorPosition(o)}catch(n){this.getService(y).catch("Error in _setUserIndicatorPosition: ",n)}}_setUserIndicatorType(o){this.getService(y).log("%c[WB] Calling FUNCTION: setUserIndicatorType","color: green;");try{this.trackEvent(Z.Events.Selection.SET_USER_INDICATOR_TYPE_TRIGGERED,{payload:{type:o}}),this.getService(Fs).setUserIndicatorType(o)}catch(n){this.getService(y).catch("Error in _setUserIndicatorType: ",n)}}_enableDefaultElementsTracking(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultElementsTracking","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED),this.getService(Fs).enableDefaultElementsTracking()}catch(o){this.getService(y).catch("Error in _enableDefaultElementsTracking: ",o)}}_disableDefaultElementsTracking(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultElementsTracking","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED),this.getService(Fs).disableDefaultElementsTracking()}catch(o){this.getService(y).catch("Error in _disableDefaultElementsTracking: ",o)}}_enableDefaultStyling(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultStyling","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_DEFAULT_STYLING_TRIGGERED),this.getService(Fs).enableDefaultStyling()}catch(o){this.getService(y).catch("Error in _enableDefaultStyling: ",o)}}_disableDefaultStyling(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultStyling","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_DEFAULT_STYLING_TRIGGERED),this.getService(Fs).disableDefaultStyling()}catch(o){this.getService(y).catch("Error in _disableDefaultStyling: ",o)}}_getLiveSelectionData(){this.getService(y).log("%c[WB] Calling FUNCTION: getLiveSelectionData","color: green;");try{return this.trackEvent(Z.Events.Selection.GET_LIVE_SELECTION_DATA_TRIGGERED),this.getService(Fs).getSelectionsOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getLiveSelectionData: ",o),se(null)}}};var Ga=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z,W,ee){this.analyticsService=e,this.configService=t,this.docService=r,this.databaseService=a,this.authService=s,this.domService=c,this.afAuth=p,this.iamService=g,this.avatarService=C,this.contactService=E,this.storageService=D,this.dialog=L,this.loggingService=z,this.notificationService=W,this.commonDbService=ee,this.tagAnnotations$=new ve({}),this.tagAnnotationsByDocumentId$=new ve({}),this.documentPaths=null,this.allowedElementIds$=new ve([]),this.addTagMode$=new ve(!1),this.enableTextTags$=new ve(!1),this.loggingService.log("%c[WB] Creating CLASS: TagService","color: blue;"),this.databaseService.getDb().pipe(Le(me=>!!me),rt(1)).subscribe(me=>{me&&this.getDocumentPaths()},me=>{this.loggingService.catch("Error in TagService getDb subscription: ",me)}),this.domService.onWindowPointerMove$().subscribe(me=>{if(this.addTagMode$.value){this.hightlightElement&&this.domService.removeHighlightFromElement(this.hightlightElement);let Ce=this.domService.getBackgroundElement(me.clientX,me.clientY);Ce&&(this.isElementInsideAllowedElements(Ce)?XP(me.target)?this.domService.removeClassFromElement(document.body,"show-pin-cursor"):(this.domService.addClassToElement(document.body,"show-pin-cursor"),this.hightlightElement=Ce,this.domService.highlightElement(this.hightlightElement,j.CURSOR.TAG_PIN)):this.domService.removeClassFromElement(document.body,"show-pin-cursor"))}},me=>{this.loggingService.catch("Error in TagService onWindowPointerMove$ subscription: ",me)}),this.domService.onWindowKeyupEsc$().subscribe(me=>{this.addTagMode$.value&&this.disableAddTagMode()},me=>{this.loggingService.catch("Error in TagService onWindowKeyupEsc$ subscription: ",me)}),this.domService.onDocumentClick$().subscribe(me=>{if(me&&this.addTagMode$.value){if(me.preventDefault(),me.stopPropagation(),!XP(me.target)){let Ce=this.domService.getBackgroundElement(me.clientX,me.clientY);Ce&&this.isElementInsideAllowedElements(Ce)&&this.addTag(me)}this.disableAddTagMode()}},me=>{this.loggingService.catch("Error in TagService onDocumentClick$ subscription: ",me)}),this.addTagMode$.subscribe(me=>{this.hightlightElement&&this.domService.removeHighlightFromElement(this.hightlightElement),me?this.domService.addClassToElement(document.body,"snippyly-add-tag-mode"):(this.domService.removeClassFromElement(document.body,"snippyly-add-tag-mode"),this.domService.removeClassFromElement(document.body,"show-pin-cursor"))},me=>{this.loggingService.catch("Error in TagService addTagMode$ subscription: ",me)}),this.domService.onWindowKeyupBackspace$().subscribe(me=>{this.deleteTagPinAnnotations("keyupBackspace")},me=>{this.loggingService.catch("Error in TagService onWindowKeyupBackspace$ subscription: ",me)}),this.domService.onWindowKeyupDelete$().subscribe(me=>{this.deleteTagPinAnnotations("keyupDelete")},me=>{this.loggingService.catch("Error in TagService onWindowKeyupDelete$ subscription: ",me)}),this.domService.getDeleteCommmentAnnotations$().subscribe(me=>{me?.length&&(me?.filter(Ae=>Ae.type==="tag")).forEach(Ae=>Q(this,null,function*(){yield this.deleteTagPinAnnotation(Ae)}))},me=>{this.loggingService.catch("Error in TagService onWindowKeyupDelete$ subscription: ",me)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$()}getAnonymousAvatarImage(){return this.loggingService.log("%c[WB] Calling FUNCTION: getAnonymousAvatarImage","color: green;"),this.avatarService.generateUserImage()}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}getAllTagAnnotations(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: getAllTagAnnotations","color: green;");let a,s;try{if(e&&(s=Tn(e)),t&&typeof t=="object"){let c=Yo(t);a=Tn(JSON.stringify(c))}}catch(c){this.loggingService.catch("Error in TagService getAllTagAnnotations: ",c)}return ei(this.afAuth).pipe(Le(c=>!!c),he(c=>this.isFeatureAllowed({firebaseUser:c,annotations:[],filteredAnnotations:[]})),he(c=>c.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(p=>(c.featureAllowed=p,c))):se(c)),he(c=>c.featureAllowed?this.authService.isPlanExpired$().pipe(ce(p=>(c.featureAllowed=!p,c))):se(c)),he(c=>c.featureAllowed?se(c).pipe(he(p=>this.docService.getDocumentPaths$().pipe(ce(g=>(this.documentPaths=g,p.documentPaths=g,p)))),he(p=>this.getDataFromDocumentId(s).pipe(ce(g=>(p.annotations=g||[],I({},p))))),he(p=>this.docService.getLocation$().pipe(ce(g=>(p.location=g,p)))),he(p=>this.docService.getLocations$().pipe(ce(g=>(p.customLocations=g,p)))),ce(p=>{if(p.filteredAnnotations=[],s&&!a)return p.filteredAnnotations=p.annotations?.slice(),p;{let g=[];return a?g.push(a):(g.push(p?.location?.locationId),g.push(...Object.values(p?.customLocations||[]).map(C=>C.locationId))),p.filteredAnnotations=this.filterAnnotationsByLocationIds(p?.annotations,g),p}}),he(p=>r?se(p):p?.annotations?.length?this.domService.onWindowResize$().pipe(ce(()=>p)):se(p)),he(p=>r?se(p):p?.annotations?.length?this.domService.onDomChange$("TagService getAllTagAnnotations").pipe(ce(()=>p)):se(p)),ce(p=>(p?.filteredAnnotations?.forEach(g=>{this.calculateTagAnnotationPosition(g)}),p)),he(p=>p?.filteredAnnotations?se(p?.filteredAnnotations||[]):se([]))):se([])))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.TAG)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Tag feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>this.configService?.getApiKey()&&this.documentPaths?.tag?this.commonDbService.dbListener({feature:"allTags",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(r=>r?.data),ce(r=>{let a=[];return r&&(a=Object.values(r).filter(s=>typeof s=="object")),this.setTagAnnotationsByDocumentId(e||this.documentPaths?.documentId,a),a})):se([])))}setTagAnnotationsByDocumentId(e,t){try{e&&this.tagAnnotationsByDocumentId$.next(T(I({},this.tagAnnotationsByDocumentId$.value),{[e]:t}))}catch(r){this.loggingService.catch("Error in TagService setTagAnnotationsByDocumentId:",r)}}filterAnnotationsByLocationIds(e,t){try{return e.filter(r=>t.includes(r.locationId))}catch(r){return this.loggingService.catch("Error in TagService filterAnnotationsByLocations:",r),[]}}calculateTagAnnotationPosition(e){try{if(e.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r&&Ao(r)){let a=r.getBoundingClientRect();if(a&&a.width&&a.height){let{height:s,width:c}=Qp(r);e.position={top:s*e.targetElement.topPercentage/100,left:c*e.targetElement.leftPercentage/100}}else e.position=null}else e.position=null}else e.position=null}}catch(t){this.loggingService.catch("Error in TagService calculateTagAnnotationPosition:",t)}}filterPinAnnotations(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: filterPinAnnotations","color: green;");try{let a=e?Object.values(e):[];a.forEach((c,p)=>{c?.annotationId&&(c.annotationIndex=p+1)});let s=[];if(t)r?s=a.filter(c=>c.locationId===r):s=a.slice();else{let c=this.docService.getLocation();c&&c.locationId?s=a.filter(p=>p.locationId===c.locationId):s=a.filter(p=>!p.locationId)}return s}catch(a){return this.loggingService.catch("Error in TagService filterPinAnnotations:",a),[]}}addTag(e,t){this.loggingService.log("%c[WB] Calling FUNCTION: addTag","color: green;");try{let r=this.authService.getUser();if(r)if(r.isReadOnly||r.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add tags.");else{let a=new Db;a.from=r,a.color=j.DEFAULT_ANNOTATION_COLOR,a.resolved=!1,a.lastUpdated=this.timestamp;let{topPositionX:s,topPositionY:c}=this.domService.getTopLeftPosition();a.positionX=s,a.positionY=c;let p=this.domService.getCurrentWindowSizeValue();if(a.screenWidth=p.screenWidth,a.screenHeight=p.screenHeight,a.screenScrollHeight=p.screenScrollHeight,a.taggedElementPath="",e&&(a.targetElement=this.domService.getTargetElementForCursorPosition(e)),t&&(a.targetTextRange=t),a?.targetElement?.xpath){let g=this.domService.getXPath(a.targetElement.xpath);if(g){let C=g.iterateNext();C&&(Ao(C)||(a.targetElement=null))}}this.setLocationToTagAnnotation(a),a.pageInfo=Pi(),a.pageInfo&&(a.pageInfo.screenWidth=this.domService.getCurrentWindowSizeValue()?.screenWidth),this.saveTagToDb(a)}}catch(r){this.loggingService.catch("Error in TagService addTag: ",r)}}setLocationToTagAnnotation(e){try{let t=this.docService.getLocation();t?(e.locationId=t.locationId,e.location=t.location):(delete e.locationId,delete e.location);try{let r;e.targetElement?.xpath?r=this.domService.getElementFromXPath(e.targetElement.xpath):e.targetTextRange?.commonAncestorContainer&&(r=this.domService.getElementFromXPath(e.targetTextRange.commonAncestorContainer));let a=this.docService.getAdditionLocationFromElement(r);if(a){let s=this.docService.addLocation({location:a,source:"internal"});s?.[0]&&(e.locationId=s[0].locationId,e.location=s[0].location)}}catch{}}catch(t){this.loggingService.catch("Error in TagService setLocationToTagAnnotation:",t)}}saveTagToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: saveTagToDb","color: green;");try{this.authService.getUser()&&this.authService.isFeatureAllowed(Re.TAG)&&this.docService.getDocumentPaths$().pipe(Le(t=>!!t),rt(1),he(t=>(this.documentPaths=t,this.loggingService.log(this.documentPaths),this.databaseService.getDb().pipe(Le(r=>!!r),rt(1),he(r=>{if(this.documentPaths?.tag){e.annotationId=this.commonDbService.generateDocumentId(),e.pageInfo&&(e.pageInfo.tagUrl=this.generateTagUrl(e));let a=JSON.parse(JSON.stringify(e));return a.position=null,this.domService.toggleAnnotationSelection(a),e.targetTextRange&&sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId),this.analyticsService.trackEvent(Z.Events.Tag.TAG_DRAFT_ADDED,{annotationId:e.annotationId}),this.commonDbService.setData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0},data:a})}else return se(null)}))))).subscribe(()=>{},t=>{this.loggingService.catch("Error in TagService saveTagToDb subscription: ",t)})}catch(t){this.loggingService.catch("Error in TagService saveTagToDb: ",t)}}updateTag(e,t=!1,r){try{r&&this.setLocationToTagAnnotation(e),t&&this.updateNotificationsDatabase(e,GS.UPDATED),this.updateTagToDb(e)}catch(a){this.loggingService.catch("Error in TagService updateTag: ",a)}}resolveTag(e){try{e.resolved=!0,this.domService.resetSelectedAnnotationsMap(!1),this.updateNotificationsDatabase(e,GS.RESOLVED),this.updateTagToDb(e),this.domService.updateSelectedAnnotationInMap([e]),this.analyticsService.trackEvent(Z.Events.Tag.TAG_RESOLVED,{annotationId:e.annotationId})}catch(t){this.loggingService.catch("Error in TagService resolveTag: ",t)}}updateTagToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: updateTagToDb","color: green;");try{if(e?.targetElement?.xpath){let t=this.domService.getXPath(e.targetElement.xpath);if(t){let r=t.iterateNext();r&&(Ao(r)||(e.targetElement=null))}}this.domService.updateSelectedAnnotationInMap([e]),this.authService.getUser()&&this.authService.isFeatureAllowed(Re.TAG)&&this.docService.getDocumentPaths$().pipe(Le(t=>!!t),rt(1),he(t=>(this.documentPaths=t,this.loggingService.log(this.documentPaths),this.databaseService.getDb().pipe(Le(r=>!!r),rt(1),he(r=>{if(this.documentPaths?.tag&&e?.annotationId){let a=JSON.parse(JSON.stringify(e));return a.position=null,this.commonDbService.setData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0},data:a})}else return se(null)}))))).subscribe(()=>{},t=>{this.loggingService.catch("Error in TagService updateTagToDb subscription: ",t)})}catch(t){this.loggingService.catch("Error in TagService updateTagToDb: ",t)}}deleteTagPinAnnotations(e){try{let t=this.domService.getSelectedAnnotationsMap(),r=this.authService.getUser(),a=[];Object.keys(t).forEach(s=>Q(this,null,function*(){let c=t[s];c.type==="tag"&&r&&c.from&&(r?.isAdmin||c.from.userId===r.userId)&&a.push(c)})),a?.length&&(this.analyticsService.trackEvent(Z.Events.Tag.TAG_DELETE_TRIGGERED,{triggerType:e,annotationId:a.map(s=>s.annotationId).join()}),this.dialog.open(Sa,{panelClass:"velt-mat-dialog-container",data:{title:"Delete tag?",message:"This selected tag will be deleted.",yesButton:"Delete",noButton:"Cancel",variant:"tag"}}).afterClosed().pipe(rt(1)).subscribe(s=>{s&&(a.forEach(c=>Q(this,null,function*(){yield this.deleteTagPinAnnotation(c)})),setTimeout(()=>{document.querySelectorAll(`[${j.SNIPPYLY_HIGHLIGHT}]`).forEach(p=>{this.domService.removeHighlightFromElement(p)})},100))})),this.domService.resetSelectedAnnotationsMap(!0,"tag")}catch(t){this.loggingService.catch("Error in TagService deleteTagPinAnnotations: ",t)}}deleteTagPinAnnotation(e){return this.authService.isFeatureAllowed(Re.TAG)&&this.documentPaths?.tag&&e?.annotationId?(this.updateNotificationsDatabase(e,GS.DELETED),this.analyticsService.trackEvent(Z.Events.Tag.TAG_DELETED,{annotationId:e.annotationId}),this.commonDbService.deleteData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0}})):Promise.resolve()}enableAddTagMode(){this.authService.isFeatureAllowed(Re.TAG)?(this.analyticsService.trackEvent(Z.Events.Tag.TAG_ADD_MODE_ENABLED),this.addTagMode$.next(!0)):this.loggingService.catch("Error in TagService enableAddTagMode: ","Tag feature is not enabled.")}disableAddTagMode(){this.analyticsService.trackEvent(Z.Events.Tag.TAG_ADD_MODE_DISABLED),this.addTagMode$.next(!1)}addTagModeChange(){return this.addTagMode$.asObservable()}enableTextTags(e){this.enableTextTags$.next(e)}getEnableTextTags$(){return this.enableTextTags$.asObservable()}get timestamp(){return this.commonDbService.getServerTimestamp()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in TagService isElementInsideAllowedElements: ",t),!1}}attachTag(e,t=[]){let r=oa(e,t);if(r){let a=this.domService.getXPath(r),s=this.getTagPinAnnotationObject();s&&(s.targetElement={xpath:a,topPercentage:50,leftPercentage:90},this.saveTagToDb(s))}}getTagPinAnnotationObject(){let e=this.authService.getUser();if(e)if(e.isReadOnly||e.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add tags.");else{let t=new Db;t.from=e,t.color=j.DEFAULT_ANNOTATION_COLOR,t.resolved=!1,t.lastUpdated=this.timestamp;let{topPositionX:r,topPositionY:a}=this.domService.getTopLeftPosition();t.positionX=r,t.positionY=a;let s=this.domService.getCurrentWindowSizeValue();t.screenWidth=s.screenWidth,t.screenHeight=s.screenHeight,t.screenScrollHeight=s.screenScrollHeight,t.taggedElementPath="";let c=this.docService.getLocation();return c&&(t.locationId=c.locationId,t.location=c.location),t}return null}updateNotificationsDatabase(e,t){try{let r={annotationData:e,actionType:t,notificationSource:"tag"};this.notificationService.updateNotificationDatabase(r)}catch(r){this.loggingService.catch("Error in TagService updateNotificationsDatabase: ",r)}}getUserContacts$(){return this.contactService.getUserContacts$()}addUserContact(e){this.contactService.addUserContact(e)}getTagUrl(e){try{return e?.pageInfo?.tagUrl?e.pageInfo.tagUrl:(e?.pageInfo||(e.pageInfo=Pi(),e.pageInfo&&(e.pageInfo.screenWidth=this.domService.getCurrentWindowSizeValue()?.screenWidth)),e.pageInfo.tagUrl=this.generateTagUrl(e),this.updateTag(e),e.pageInfo?.tagUrl)}catch(t){this.loggingService.catch("Error in TagService getTagUrl: ",t);return}}uploadFile(e,t){let r=`${j.FIREBASE_PARTIAL_PATH_DOCS}/${this.documentPaths?.documentId}/${j.FIREBASE_PARTIAL_PATH_TAG}/${t.annotationId}`;return this.documentPaths?.organizationId&&(r=`${j.FIREBASE_PARTIAL_PATH_ORGANIZATIONS}/${this.documentPaths.organizationId}/${j.FIREBASE_PARTIAL_PATH_DOCS}/${this.documentPaths?.documentId}/${j.FIREBASE_PARTIAL_PATH_TAG}/${t.annotationId}`),this.storageService.uploadFile({path:r,file:e})}downloadAttachment(e){this.storageService.downloadAttachment(e)}deleteAttachment(e){return this.storageService.deleteAttachment({attachment:e})}generateTagUrl(e){let t=new URL(window.location.href);return t.searchParams.delete(j.URL_PARAMS.TAG_ID),t.searchParams.append(j.URL_PARAMS.TAG_ID,e.annotationId),t.href}};o.\u0275fac=function(t){return new(t||o)(J(et),J(kt),J(ot),J(Cn),J(Ve),J(Be),J(Oi),J(_n),J(jd),J(Di),J(pg),J(io),J(y),J(gn),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var h9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: TagElement","color: blue;"),this.getAllTagAnnotations=this._getAllTagAnnotations,this.deleteTag=this._deleteTag,this.allowedElementIds=this._allowedElementIds,this.attachTag=this._attachTag,this.addTagModeChange=this._addTagModeChange}_getAllTagAnnotations(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsers","color: green;");try{return this.trackEvent(Z.Events.Tag.GET_ALL_TAG_ANNOTATIONS_TRIGGERED,{payload:{documentId:o,location:n}}),this.getService(Ga).getAllTagAnnotations(o,n)}catch(e){return this.getService(y).catch("Error in _getLiveTagsOnCurrentDocument: ",e),se(null)}}_deleteTag(){this.getService(y).log("%c[WB] Calling FUNCTION: deleteTag","color: green;");try{this.trackEvent(Z.Events.Tag.DELETE_TAG_TRIGGERED),this.getService(Ga).deleteTagPinAnnotations("tagElement")}catch(o){this.getService(y).catch("Error in _deleteTag: ",o)}}_allowedElementIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: allowedElementIds","color: green;");try{this.trackEvent(Z.Events.Tag.ALLOWED_ELEMENT_IDS_TRIGGERED,{payload:{elementIds:o}}),this.getService(Ga).setAllowedElementIds(o)}catch(n){this.getService(y).catch("Error in allowedElementIds: ",n)}}_attachTag(o){this.getService(y).log("%c[WB] Calling FUNCTION: attachTag","color: green;");try{this.trackEvent(Z.Events.Tag.ATTACH_TAG_TRIGGERED,{payload:{elementId:o}}),this.getService(Ga).attachTag(o,["id","data-id"])}catch(n){this.getService(y).catch("Error in _attachTag: ",n)}}_addTagModeChange(){this.getService(y).log("%c[WB] Calling FUNCTION: addTagModeChange","color: green;");try{return this.trackEvent(Z.Events.Tag.ADD_TAG_MODE_CHANGE_TRIGGERED),this.getService(Ga).addTagModeChange()}catch(o){return this.getService(y).catch("Error in _addTagModeChange: ",o),se(!1)}}};var f9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ViewsElement","color: blue;"),this.getUniqueViewsByUser=this._getUniqueViewsByUser,this.getUniqueViewsByDate=this._getUniqueViewsByDate}_getUniqueViewsByUser(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getUniqueViewsByUser","color: green;");try{return this.trackEvent(Z.Events.Views.GET_UNIQUE_VIEWS_BY_USER_TRIGGERED,{payload:{clientLocationId:o}}),this.getService(gs).getUniqueViewsByUser(o)}catch(n){return this.getService(y).catch("Error in getUniqueViewsByUser: ",n),se({})}}_getUniqueViewsByDate(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getUniqueViewsByDate","color: green;");try{return this.trackEvent(Z.Events.Views.GET_UNIQUE_VIEWS_BY_DATE_TRIGGERED,{payload:{clientLocationId:o}}),this.getService(gs).getUniqueViewsByDate(o)}catch(n){return this.getService(y).catch("Error in getUniqueViewsByDate: ",n),se({})}}};var Bb=(()=>{let o=class o{constructor(e,t){this.docService=e,this.loggingService=t}updateDocuments(e){return Q(this,null,function*(){try{return yield this.docService.updateDocuments(e)}catch(t){return this.loggingService.catch("Error in DocActionsService updateDocuments: ",t),null}})}updateLocations(e){return Q(this,null,function*(){try{return yield this.docService.updateLocations(e)}catch(t){return this.loggingService.catch("Error in DocActionsService updateLocations: ",t),null}})}fetchDocuments(e){return Q(this,null,function*(){try{let t=yield this.docService.fetchDocuments(e),r=[];return t.forEach(a=>{let s=a?.docIamConfig??{},c=a?.metadata??{};c.disabled=!!s?.disabled,c.id=c?.clientDocumentId,c.documentId=c?.clientDocumentId,delete c?.clientDocumentId,c.organizationId=c?.clientOrganizationId,delete c?.clientOrganizationId,delete c?.pageInfo,delete c?.veltFolderId,r.push(c)}),{data:r.reduce((a,s)=>(s?.documentId&&(a[s.documentId]=s),a),{})}}catch(t){return this.loggingService.catch("Error in CommentActionsService fetchDocuments: ",t),{data:null}}})}fetchFolders(e){return Q(this,null,function*(){try{let t=yield this.docService.fetchFolders(e),r=t?.parentFolders?.map(s=>{let c=s?.metadata??{};return delete c?.veltFolderId,c.organizationId=c.clientOrganizationId,delete c?.clientOrganizationId,delete c?.veltParentFolderId,I({},c)});return{data:(t?.data?.map(s=>{let c=s?.metadata??{};return delete c?.veltFolderId,c.organizationId=c.clientOrganizationId,delete c?.clientOrganizationId,delete c?.veltParentFolderId,I(I({},c),e?.folderId?{subFolders:r}:{})})).reduce((s,c)=>(c?.folderId&&(s[c.folderId]=c),s),{})}}catch(t){return this.loggingService.catch("Error in CommentActionsService fetchFolders: ",t),{data:null}}})}};o.\u0275fac=function(t){return new(t||o)(J(ot),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var v9=(()=>{let o=class o{constructor(e,t,r,a,s){this.authService=e,this.coreActionsService=t,this.docService=r,this.iamService=a,this.loggingService=s,this.veltInitState$=new ve(void 0);try{this.loggingService.log("%c[WB] Creating CLASS: VeltService","color: blue;");let c=this.authService.getUser$(),p=this.docService.getDocumentPaths$(),g=this.iamService.isUserAllowed$();fn([c,p,g]).subscribe(([C,E,D])=>{C&&E&&D?this.veltInitState$.next(!0):this.veltInitState$.next(!1)}),this.getVeltInitState$().subscribe(C=>{this.coreActionsService.triggerAction(Hi.DOCUMENT_INIT,C)})}catch(c){this.loggingService.catch("Error in VeltService constructor: ",c)}}getVeltInitState$(){try{return this.veltInitState$.asObservable().pipe(Ct())}catch(e){return this.loggingService.catch("Error in VeltService getVeltInitState$: ",e),se(void 0)}}};o.\u0275fac=function(t){return new(t||o)(J(Ve),J($d),J(ot),J(_n),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var C9=class{constructor(o){this.injector=o,this.initConfig=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: initConfig","color: green;");try{n?typeof n!="string"?this.getService(y).catch("Error in initConfig: ","Apikey must be string."):n?.trim()?this.getService(Ve).setApiKey(n?.trim(),e):this.getService(y).catch("Error in initConfig: ","Apikey is not provided."):this.getService(y).catch("Error in initConfig: ","Apikey is not provided.")}catch(t){this.getService(y).catch("Error in initConfig: ",t)}},this.identify=(n,e,t)=>(this.getService(y).log("%c[WB] Calling FUNCTION: identify","color: green;"),new Promise((r,a)=>{try{typeof n=="object"&&(n=JSON.parse(JSON.stringify(n)));let s=this.getService(kt).getApiKey(),c=Pv(s,n.userId);if(t?.ha||this.getService(et).trackEvent(Z.Events.Core.IDENTIFY,{apiKey:s,clientUserId:n.userId,snippylyUserId:c,forceReset:e?.forceReset,user:this.getService(Ve).getUserWithoutContacts(n),source:"client",fromProvider:t?.fromProvider},!0,c,n?.userId),!(n&&n.userId))this.getService(y).catch("Error in identify: ","Missing userId in config data."),r(null);else if(typeof n.userId!="string")this.getService(y).catch("Error in identify: ","userId must be string."),r(null);else if(n?.groupId&&typeof n?.groupId!="string")this.getService(y).catch("Error in identify: ","groupId must be string."),r(null);else{if(n?.groupId)if(n?.groupId?.match(/^[a-zA-Z0-9_]*$/))n.clientGroupId=n.groupId;else{let g=n.groupId;n.clientGroupId=g,n.groupId=_t(g)}if(n?.organizationId){let g=n.organizationId;n.clientOrganizationId=g,n.organizationId=_t(g)}delete n.isAdmin;let p=j.REGEX_URL;if(n?.name&&p.test(n?.name))throw new Error("Invalid name.");n.clientUserName=n.name,n?.name&&n?.name?.length>20&&(n.name=n.name.slice(0,20)),this.getService(Ve).initializeClient(n,e||{},new Date().getTime(),void 0,"external").then(g=>{let C;try{g&&(C=JSON.parse(JSON.stringify(g)))}catch{}r(C)}).catch(g=>{this.getService(y).catch("Error in identify: ",g),r(null)})}}catch(s){this.getService(y).catch("Error in identify: ",s),r(null)}})),this.updateUser=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateUser","color: green;");try{if(this.getService(y).catch("DEPRECATED: ","'updateUser' method is deprecated."),n&&typeof n=="object"){if(n=JSON.parse(JSON.stringify(n)),n?.groupId)if(n?.groupId?.match(/^[a-zA-Z0-9_]*$/))n.clientGroupId=n.groupId;else{let e=n.groupId;n.clientGroupId=e,n.groupId=_t(e)}delete n.isAdmin,this.getService(Ve).updateUser(n)}else this.getService(y).catch("Error in updateUser: ","Invalid user object provided.")}catch(e){this.getService(y).catch("Error in updateUser: ",e)}},this.signOutUser=n=>(this.getService(y).log("%c[WB] Calling FUNCTION: signOutUser","color: green;"),n?.ha||this.trackEvent(Z.Events.Core.SIGN_OUT_USER_TRIGGERED),new Promise((e,t)=>Q(this,null,function*(){try{yield this.getService(Ve).signOutUser("external"),e(null)}catch(r){this.getService(y).catch("Error in signOutUser: ",r),e(null)}}))),this.setDocument=(n,e,t,r)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocument","color: green;");try{r?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{id:n,documentMetadata:e,methodName:"setDocument",source:"external"}}),n&&n.trim()?(e&&(typeof e=="object"?e=JSON.parse(JSON.stringify(e)):this.getService(y).catch("Error in setDocument: ","Invalid documentMetadata provided.")),yield this.getService(ot).setDocument({documentId:n,documentMetadata:e,options:t,source:"external"})):this.getService(y).catch("Error in setDocument: ","Invalid document id provided.")}catch(a){this.getService(y).catch("Error in setDocument: ",a)}}),this.setDocumentId=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocumentId","color: green;");try{if(t?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{id:n,organizationId:e,methodName:"setDocumentId",source:"external"}}),n&&n.trim())return yield this.getService(ot).setDocumentId({documentId:n,clientOrganizationId:e,source:"external"});this.getService(y).catch("Error in setDocumentId: ","Invalid document id provided.")}catch(r){this.getService(y).catch("Error in setDocumentId: ",r)}}),this.setDocuments=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocuments","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{documents:n,options:e,methodName:"setDocuments",source:"external"}}),typeof n=="object"&&n instanceof Array?(n=JSON.parse(JSON.stringify(n)),n=n.filter(r=>typeof r=="object"&&r!==null&&r.id?.trim()),n.length?yield this.getService(ot).setDocuments({documents:n,options:e,source:"external"}):this.getService(y).catch("Error in setDocuments: ","Invalid documents provided.")):this.getService(y).catch("Error in setDocuments: ","Invalid documents provided.")}catch(r){this.getService(y).catch("Error in setDocuments: ",r)}}),this.setRootDocument=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setRootDocument","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ROOT_DOCUMENT_TRIGGERED,{payload:{document:n,methodName:"setRootDocument",source:"external"}}),typeof n=="object"?(n=JSON.parse(JSON.stringify(n)),n.id?yield this.getService(ot).setRootDocument({document:n,source:"external"}):this.getService(y).catch("Error in setRootDocument: ","Invalid document provided.")):this.getService(y).catch("Error in setRootDocument: ","Invalid document provided.")}catch(t){this.getService(y).catch("Error in setRootDocument: ",t)}}),this.unsetDocumentId=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetDocumentId","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.UNSET_DOCUMENTS_TRIGGERED,{payload:{methodName:"unsetDocumentId",source:"external"}}),this.getService(ot).unsetDocumentId({source:"external"})}catch(e){this.getService(y).catch("Error in unsetDocumentId: ",e)}},this.unsetDocuments=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetDocuments","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.UNSET_DOCUMENTS_TRIGGERED,{payload:{methodName:"unsetDocuments",source:"external"}}),this.getService(ot).unsetDocuments({source:"external"})}catch(e){this.getService(y).catch("Error in unsetDocuments: ",e)}},this.fetchDocuments=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: fetchDocuments","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.FETCH_DOCUMENTS_TRIGGERED,{payload:{options:n}}),this.getService(Bb).fetchDocuments(n)}catch(t){return this.getService(y).catch("Error in fetchDocuments: ",t),Promise.resolve({data:null})}},this.updateDocuments=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateDocuments","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.UPDATE_DOCUMENTS_TRIGGERED,{payload:{request:n}}),this.getService(Bb).updateDocuments(n)}catch(t){return this.getService(y).catch("Error in updateDocuments: ",t),Promise.resolve({data:null})}},this.updateLocations=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateLocations","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.UPDATE_LOCATIONS_TRIGGERED,{payload:{request:n}}),this.getService(Bb).updateLocations(n)}catch(t){return this.getService(y).catch("Error in updateLocations: ",t),Promise.resolve({data:null})}},this.fetchFolders=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: fetchFolders","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.FETCH_FOLDERS_TRIGGERED,{payload:{options:n}}),this.getService(Bb).fetchFolders(n)}catch(t){return this.getService(y).catch("Error in fetchFolders: ",t),Promise.resolve({data:null})}},this.setUserDataProvider=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setUserDataProvider","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_USER_DATA_PROVIDER_TRIGGERED),this.getService(Mn).setUserDataProvider(n)}catch(t){this.getService(y).catch("Error in setUserDataProvider: ",t)}},this.setDataProviders=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setDataProviders","color: green;");try{if(e?.ha||this.trackEvent(Z.Events.Core.SET_DATA_PROVIDERS_TRIGGERED),n.comment&&this.getService(Ns).setCommentAnnotationDataProvider(n.comment),n.user&&this.getService(Mn).setUserDataProvider(n.user),n.reaction&&this.getService(zd).setReactionAnnotationDataProvider(n.reaction),n.attachment)if(n.comment)this.getService(mg).setAttachmentDataProvider(n.attachment);else throw new Error("Comment data provider is required for attachment data provider")}catch(t){this.getService(y).catch("Error in setDataProviders: ",t)}},this.setEncryptionProvider=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setEncryptionProvider","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ENCRYPTION_PROVIDER_TRIGGERED),this.getService(kt).setEncryptionProvider(n)}catch(t){this.getService(y).catch("Error in setEncryptionProvider: ",t)}},this.setVeltAuthProvider=n=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setVeltAuthProvider","color: green;");try{return yield this.getService(Ve).setVeltAuthProvider(n)}catch(e){return this.getService(y).catch("Error in setVeltAuthProvider: ",e),null}}),this.getDocumentId=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getDocumentId","color: green;");try{return n?.ha||this.trackEvent(Z.Events.Core.GET_DOCUMENT_ID_TRIGGERED),this.getService(ot).getDocumentId()}catch(e){this.getService(y).catch("Error in getDocumentId: ",e)}},this.setLocation=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setLocation","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{params:n,appendLocation:e,methodName:"setLocation",source:"external"}}),n&&typeof n=="object"?e?this.getService(ot).addLocation({location:n,source:"external"}):yield this.getService(ot).setLocation({location:n,source:"external"}):this.getService(y).catch("Error in setLocation: ","Invalid location params provided.")}catch(r){this.getService(y).catch("Error in setLocation: ",r)}}),this.setRootLocation=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setRootLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ROOT_LOCATION_TRIGGERED,{payload:{location:n,methodName:"setRootLocation",source:"external"}}),typeof n=="object"?(n=JSON.parse(JSON.stringify(n)),n.id?yield this.getService(ot).setRootLocation({location:n,source:"external"}):this.getService(y).catch("Error in setRootLocation: ","Invalid location provided.")):this.getService(y).catch("Error in setRootLocation: ","Invalid location provided.")}catch(t){this.getService(y).catch("Error in setRootLocation: ",t)}}),this.setLocations=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setLocations","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{locations:n,options:e,methodName:"setLocations",source:"external"}}),n&&Array.isArray(n)?yield this.getService(ot).setLocations({locations:n,options:e,source:"external"}):this.getService(y).catch("Error in setLocations: ","Invalid location params provided.")}catch(r){this.getService(y).catch("Error in setLocations: ",r)}}),this.addLocation=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: addLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{params:n,methodName:"addLocation",source:"external"}}),n&&typeof n=="object"?this.getService(ot).addLocation({location:n,source:"external"}):this.getService(y).catch("Error in addLocation: ","Invalid location params provided.")}catch(t){this.getService(y).catch("Error in addLocation: ",t)}}),this.setScrollableElementsIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setScrollableElementsIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_SCROLLABLE_ELEMENTS_IDS_TRIGGERED,{payload:{ids:n}}),n?this.getService(Be).setScrollableElementsIds(n):this.getService(y).catch("Error in setScrollableElementsIds: ","Invalid ids provided.")}catch(t){this.getService(y).catch("Error in setScrollableElementsIds: ",t)}},this.removeLocation=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.REMOVE_LOCATIONS_TRIGGERED,{payload:{location:n},methodName:"removeLocation",source:"external"}),this.getService(ot).removeLocation({location:n,source:"external"})}catch(t){this.getService(y).catch("Error in removeLocation: ",t)}},this.removeLocations=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeLocations","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.REMOVE_LOCATIONS_TRIGGERED,{payload:{locations:n},methodName:"removeLocations",source:"external"}),this.getService(ot).removeLocations({locations:n,source:"external"})}catch(t){this.getService(y).catch("Error in removeLocations: ",t)}},this.unsetLocationIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetLocationIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.UNSET_LOCATIONS_TRIGGERED,{payload:{locationIds:n},methodName:"unsetLocationIds",source:"external"}),this.getService(ot).unsetLocationIds(n,"external")}catch(t){this.getService(y).catch("Error in unsetLocationIds: ",t)}},this.excludeLocationIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: excludeLocationIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.EXCLUDE_LOCATION_IDS_TRIGGERED,{payload:{ids:n}}),typeof n=="object"&&n instanceof Array&&(n=n.filter(t=>typeof t=="string"),this.getService(ot).excludeLocationIds(n))}catch(t){this.getService(y).catch("Error in excludeLocationIds: ",t)}},this.updateContactList=(n,e,t)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateContactList","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.UPDATE_CONTACT_LIST_TRIGGERED,{payload:{userContacts:n,config:e}}),typeof n=="object"&&n instanceof Array&&(!e||e&&typeof e=="object")&&(n=JSON.parse(JSON.stringify(n)),this.getService(Di).updateContactList(n,e))}catch(r){this.getService(y).catch("Error in updateContactList: ",r)}},this.removeScrollableElementsIds=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeScrollableElementsIds","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.REMOVE_SCROLLABLE_ELEMENTS_IDS_TRIGGERED),this.getService(Be).removeScrollableElementsIds()}catch(e){this.getService(y).catch("Error in removeScrollableElementsIds: ",e)}},this.getPresenceElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getPresenceElement","color: green;");try{let e=new c9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getPresenceElement: ",e),null}},this.getCursorElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCursorElement","color: green;");try{let e=new i9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCursorElement: ",e),null}},this.getCommentElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCommentElement","color: green;");try{let e=new Kk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCommentElement: ",e),null}},this.getTagElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getTagElement","color: green;");try{let e=new h9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getTagElement: ",e),null}},this.getSelectionElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getSelectionElement","color: green;");try{let e=new u9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getSelectionElement: ",e),null}},this.getRecorderElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getRecorderElement","color: green;");try{let e=new m9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getRecorderElement: ",e),null}},this.getContactElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getContactElement","color: green;");try{let e=new Zk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getContactElement: ",e),null}},this.getRewriterElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getRewriterElement","color: green;");try{let e=new g9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getRewriterElement: ",e),null}},this.getHuddleElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getHuddleElement","color: green;");try{let e=new r9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getHuddleElement: ",e),null}},this.getLiveStateSyncElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getLiveStateSyncElement","color: green;");try{let e=new a9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getLiveStateSyncElement: ",e),null}},this.getArrowElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getArrowElement","color: green;");try{let e=new Wk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getArrowElement: ",e),null}},this.getViewsElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getViewsElement","color: green;");try{let e=new f9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getViewsElement: ",e),null}},this.getNotificationElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getNotificationElement","color: green;");try{let e=new l9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getNotificationElement: ",e),null}},this.getAutocompleteElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getAutocompleteElement","color: green;");try{let e=new Yk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getAutocompleteElement: ",e),null}},this.getDocElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getDocElement","color: green;");try{let e=new o9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getDocElement: ",e),null}},this.getAreaElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getAreaElement","color: green;");try{let e=new zk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getAreaElement: ",e),null}},this.getReactionElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getReactionElement","color: green;");try{let e=new d9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getReactionElement: ",e),null}},this.getCrdtElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCrdtElement","color: green;");try{let e=new Xk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCrdtElement: ",e),null}},this.getMetadata=n=>Q(this,null,function*(){try{return n?.ha||this.trackEvent(Z.Events.Core.GET_METADATA_TRIGGERED),this.getService($l).getGlobalMetadata()}catch(e){return this.getService(y).catch("Error in getMetadata: ",e),null}}),this.disableFeatures=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.DISABLE_FEATURES_TRIGGERED,{payload:{features:n}}),this.getService(kt).disableFeatures(n)}catch(t){this.getService(y).catch("Error in disableFeatures: ",t)}},this.setDarkMode=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_DARK_MODE_TRIGGERED,{payload:{value:n}}),this.getService(qe).setDarkMode(n)}catch(t){this.getService(y).catch("Error in setDarkMode: ",t)}},this.enableLogs=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_LOGS_TRIGGERED),this.getService(kt).enableLogs()}catch(e){this.getService(y).catch("Error in enableLogs: ",e)}},this.disableLogs=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.DISABLE_LOGS_TRIGGERED),this.getService(kt).disableLogs(n)}catch(t){this.getService(y).catch("Error in disableLogs: ",t)}},this.isUserAllowed$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.IS_USER_ALLOWED_TRIGGERED),this.getService(_n).isUserAllowed$()}catch(e){return this.getService(y).catch("Error in isUserAllowed$: ",e),se(!1)}},this.getUser=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.GET_USER_TRIGGERED);let e=this.getService(Ve).getUser();if(e&&typeof e=="object"){let t=JSON.parse(JSON.stringify(e));return t?.clientOrganizationId&&(t.organizationId=t.clientOrganizationId,delete t.clientOrganizationId),t?.clientGroupId&&(t.groupId=t.clientGroupId,delete t.clientGroupId),delete t.userSnippylyId,t}else return null}catch(e){return this.getService(y).catch("Error in getUser: ",e),null}},this.getUserRole$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_USER_ROLE_TRIGGERED),this.getService(_n).getRole$()}catch(e){return this.getService(y).catch("Error in getUserRole$: ",e),se("")}},this.getUserPermissions=(n,e)=>Q(this,null,function*(){try{return e?.ha||this.trackEvent(Z.Events.Core.GET_USER_PERMISSIONS_TRIGGERED,{payload:{request:n,source:"external"}}),this.getService(S0).getUserPermissions(n)}catch(t){return this.getService(y).catch("Error in getUserPermissions$: ",t),{}}}),this.getFeaturesAccessLevelIam$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_FEATURES_ACCESS_LEVEL_IAM_TRIGGERED),this.getService(_n).getFeaturesAccessLevel$()}catch(e){return this.getService(y).catch("Error in getFeaturesAccessLevel$: ",e),se(void 0)}},this.isPlanExpired$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.IS_PLAN_EXPIRED_TRIGGERED),this.getService(Ve).isPlanExpired$()}catch(e){return this.getService(y).catch("Error in isPlanExpired$: ",e),se(!1)}},this.getCustomerMetadata$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_CUSTOMER_METADATA_TRIGGERED),this.getService(ot).getCustomerMetadata$()}catch(e){return this.getService(y).catch("Error in getCustomerMetadata$: ",e),se(null)}},this.getDocumentMetadata=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_DOCUMENT_METADATA_TRIGGERED),this.getService(ot).getDocumentMetadata$()}catch(e){return this.getService(y).catch("Error in getDocumentMetadata: ",e),se(null)}},this.getVeltInitState=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_VELT_INIT_STATE_TRIGGERED),this.getService(v9).getVeltInitState$()}catch(e){return this.getService(y).catch("Error in getVeltInitState: ",e),se(void 0)}},this.removeVeltContent=(n,e)=>{try{return e?.ha||this.trackEvent(Z.Events.Core.REMOVE_VELT_CONTENT_TRIGGERED),this.getService(Be).removeSnippylyContent(n)}catch(t){return this.getService(y).catch("Error in removeVeltContent: ",t),""}},this.injectCustomCss=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.INJECT_CUSTOM_CSS_TRIGGERED),this.getService(y).log("%c[WB] Calling FUNCTION: injectCustomCss","color: green;"),this.getService(Be).setCustomCss(n)}catch(t){this.getService(y).catch("Error in injectCustomCss: ",t)}},this.setLanguage=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_LANGUAGE_TRIGGERED,{payload:{language:n}}),this.getService(gl).setLanguage(n)}catch(t){this.getService(y).catch("Error in setLanguage: ",t)}},this.setTranslations=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_TRANSLATIONS_TRIGGERED,{payload:{translations:n}}),this.getService(gl).setTranslations(n)}catch(t){this.getService(y).catch("Error in setTranslations: ",t)}},this.enableAutoTranslation=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_AUTO_TRANSLATION_TRIGGERED),this.getService(gl).enableAutoTranslation()}catch(e){this.getService(y).catch("Error in enableAutoTranslation: ",e)}},this.disableAutoTranslation=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.DISABLE_AUTO_TRANSLATION_TRIGGERED),this.getService(gl).disableAutoTranslation()}catch(e){this.getService(y).catch("Error in disableAutoTranslation: ",e)}},this.sf=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SF_TRIGGERED,{payload:{value:n}}),n?(document.querySelector(j.TAGS.SNIPPYLY_PLUGIN)||document.querySelector(j.TAGS.SUPERFLOW_TOOLBAR))&&this.getService(kt).setSF(n):this.getService(kt).setSF(n)}catch(t){this.getService(y).catch("Error in sf: ",t)}},this.st=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.ST_TRIGGERED,{payload:{value:n}}),this.getService(kt).setSdkType(n)}catch(t){this.getService(y).catch("Error in st: ",t)}},this.getService=n=>this.injector.get(n),this.on=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.ON_ACTION_TRIGGERED,{payload:{action:n}}),this.getService($d).onAction(n)}catch(t){return this.getService(y).catch("Error in on: ",t),se(null)}},this.setUiState=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_UI_STATE_TRIGGERED,{payload:{uiState:n}}),this.getService(ot).setUIState(n)}catch(t){this.getService(y).catch("Error in setUiState: ",t)}},this.getUiState=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_UI_STATE_TRIGGERED),this.getService(ot).getUIState$()}catch(e){return this.getService(y).catch("Error in getUiState: ",e),se({})}},this.enableSafeEval=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_SAFE_EVAL_TRIGGERED),this.getService(kt).enableSafeEval()}catch(e){this.getService(y).catch("Error in enableSafeEval: ",e)}},this.disableSafeEval=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.DISABLE_SAFE_EVAL_TRIGGERED),this.getService(kt).disableSafeEval()}catch(e){this.getService(y).catch("Error in disableSafeEval: ",e)}},this.resetVeltButtonState=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.RESET_VELT_BUTTON_STATE_TRIGGERED,{payload:{config:n}}),this.getService(I0).resetVeltButtonState(n)}catch(t){this.getService(y).catch("Error in resetVeltButtonState: ",t)}},this.getService(y).log("%c[WB] Creating CLASS: Snippyly","color: blue;")}trackEvent(o,n={},e=!0){try{n||(n={}),n=T(I({},n),{source:"external"}),this.getService(et).trackAuthenticatedEvent(o,n,e)}catch(t){this.getService(y).catch("Error in _trackEvent: ",t);return}}};var dde=(()=>{let o=class o{constructor(){this.veltElement=!0}ngOnInit(){}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=O({type:o,selectors:[["app-external-styles"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:0,vars:0,template:function(t,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}.cdk-overlay-backdrop{position:absolute;inset:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;z-index:1000;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}@media (prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media (forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}html{--velt-base-rem-unit: 1}velt-wireframe{display:none!important}:root{--legacy-velt-neutral-0: #000000;--legacy-velt-neutral-1: #141416;--legacy-velt-neutral-2: #23262F;--legacy-velt-neutral-3: #353945;--legacy-velt-neutral-4: #777E90;--legacy-velt-neutral-5: #B1B5C3;--legacy-velt-neutral-6: #E6E8EC;--legacy-velt-neutral-7: #F4F5F6;--legacy-velt-neutral-8: #FCFCFD;--legacy-velt-neutral-9: #FFFFFF;--legacy-velt-dark-1: #141416;--legacy-velt-dark-2: #222226;--legacy-velt-dark-3: #303034;--legacy-velt-dark-4: #404044;--legacy-velt-dark-5: #59595F;--legacy-velt-dark-6: #80808A;--legacy-velt-dark-7: #91919C;--legacy-velt-dark-8: #E5E5E9;--legacy-velt-primary-color: var(--legacy-velt-dark-1);--legacy-velt-primary-dark-color: var(--legacy-velt-dark-8);--legacy-velt-secondary-color: var(--legacy-velt-neutral-4);--legacy-velt-secondary-dark-color: var(--legacy-velt-dark-7);--legacy-velt-bg-color: var(--legacy-velt-neutral-8);--legacy-velt-bg-dark-color: var(--legacy-velt-dark-1);--legacy-velt-border-color: var(--legacy-velt-neutral-6);--legacy-velt-border-dark-color: var(--legacy-velt-dark-3);--legacy-velt-grey-2-color: #D4D6DF;--legacy-velt-grey-2-dark-color: var(--legacy-velt-dark-4);--legacy-velt-grey-4-color: #989898;--legacy-velt-grey-4-dark-color: var(--legacy-velt-dark-6);--legacy-velt-status-open-color: #625DF5;--legacy-velt-status-in-progress-color: #ECB000;--legacy-velt-status-resolved-color: #00C48C;--legacy-velt-purple: #625DF5;--legacy-velt-orange: #ECB000;--legacy-velt-green: #0DCF82;--legacy-velt-blue: #0d6efd;--legacy-velt-primary-btn-color: var(--legacy-velt-purple);--legacy-velt-hyperlink-color: var(--legacy-velt-purple);--legacy-velt-grey-btn-color: var(--legacy-velt-neutral-5);--legacy-velt-header-btn-color: var(--legacy-velt-neutral-3);--legacy-velt-dropdown-item-color: var(--legacy-velt-neutral-2);--legacy-velt-avatar-size: 2rem;--velt-default-font-family: sans-serif;--Icon-Size-Small: 12px;--Icon-Size-Medium: 16px;--Icon-Size-Large: 24px}:root[data-velt-theme=dark]{--legacy-velt-primary-color: var(--legacy-velt-primary-dark-color);--legacy-velt-secondary-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-bg-color: var(--legacy-velt-bg-dark-color);--legacy-velt-border-color: var(--legacy-velt-border-dark-color);--legacy-velt-grey-2-color: var(--legacy-velt-grey-2-dark-color);--legacy-velt-grey-4-color: var(--legacy-velt-grey-4-dark-color);--legacy-velt-primary-btn-color: var(--legacy-velt-border-dark-color);--legacy-velt-hyperlink-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-grey-btn-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-header-btn-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-dropdown-item-color: var(--legacy-velt-secondary-dark-color)}:root{--legacy-velt-tool-padding: 6px;--legacy-velt-tool-icon-size: 1.5rem;--legacy-velt-tool-icon-color: var(--legacy-velt-neutral-4);--legacy-velt-tool-border-radius: 50px;--legacy-velt-tool-border-color: transparent;--legacy-velt-tool-border: 2px solid var(--legacy-velt-tool-border-color);--legacy-velt-tool-bg-color: transparent;--legacy-velt-tool-focus-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-focus-icon-color: var(--legacy-velt-tool-icon-color);--legacy-velt-tool-focus-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-focus-border-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-focus-border: 2px solid var(--legacy-velt-tool-focus-border-color);--legacy-velt-tool-focus-bg-color: var(--legacy-velt-tool-bg-color);--legacy-velt-tool-hover-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-hover-icon-color: var(--legacy-velt-neutral-3);--legacy-velt-tool-hover-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-hover-border-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-hover-border: 2px solid var(--legacy-velt-tool-hover-border-color);--legacy-velt-tool-hover-bg-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-active-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-active-icon-color: var(--legacy-velt-neutral-9);--legacy-velt-tool-active-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-active-border-color: var(--legacy-velt-purple);--legacy-velt-tool-active-border: 2px solid var(--legacy-velt-tool-active-border-color);--legacy-velt-tool-active-bg-color: var(--legacy-velt-purple)}:root[data-velt-theme=dark],:root:not(data-velt-theme) velt-comment-tool[dark],:root:not(data-velt-theme) velt-sidebar-button[dark],:root:not(data-velt-theme) velt-arrow-tool[dark],:root:not(data-velt-theme) velt-reaction-tool[dark],:root:not(data-velt-theme) velt-huddle-tool[dark],:root:not(data-velt-theme) velt-recorder-tool[dark],:root:not(data-velt-theme) velt-user-invite-tool[dark],:root:not(data-velt-theme) velt-user-request-tool[dark],:root:not(data-velt-theme) velt-notifications-tool[dark],:root:not(data-velt-theme) app-recorder-all-tool-menu[dark],:root:not(data-velt-theme) snippyly-recording-preview-steps-dialog[dark],:root:not(data-velt-theme) snippyly-recorder-control-panel-internal[dark],:root:not(data-velt-theme) snippyly-recorder-player-internal[dark],:root:not(data-velt-theme) velt-recorder-player-expanded[dark]:root:not(data-velt-theme) app-transcription-panel[dark]{--legacy-velt-tool-icon-size: 1.5rem;--legacy-velt-tool-icon-color: var(--legacy-velt-neutral-4);--legacy-velt-tool-border-radius: 50px;--legacy-velt-tool-border-color: transparent;--legacy-velt-tool-border: 2px solid var(--legacy-velt-tool-border-color);--legacy-velt-tool-bg-color: transparent;--legacy-velt-tool-focus-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-focus-icon-color: var(--legacy-velt-tool-icon-color);--legacy-velt-tool-focus-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-focus-border-color: var(--legacy-velt-neutral-2);--legacy-velt-tool-focus-border: 2px solid var(--legacy-velt-tool-focus-border-color);--legacy-velt-tool-focus-bg-color: var(--legacy-velt-tool-bg-color);--legacy-velt-tool-hover-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-hover-icon-color: var(--legacy-velt-neutral-5);--legacy-velt-tool-hover-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-hover-border-color: var(--legacy-velt-neutral-1);--legacy-velt-tool-hover-border: 2px solid var(--legacy-velt-tool-hover-border-color);--legacy-velt-tool-hover-bg-color: var(--legacy-velt-neutral-1);--legacy-velt-tool-active-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-active-icon-color: var(--legacy-velt-neutral-9);--legacy-velt-tool-active-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-active-border-color: var(--legacy-velt-purple);--legacy-velt-tool-active-border: 2px solid var(--legacy-velt-tool-active-border-color);--legacy-velt-tool-active-bg-color: var(--legacy-velt-purple)}snippyly-user-avatar,velt-user-avatar{--legacy-velt-user-avatar-size: var(--legacy-velt-avatar-size);--legacy-velt-user-avatar-initial-font-size: .8}snippyly-follow-overlay,velt-follow-overlay{--legacy-velt-follow-overlay-bg-color: var(--legacy-velt-bg-color);--legacy-velt-follow-overlay-text-color: var(--legacy-velt-primary-color);--legacy-velt-follow-overlay-btn-color: var(--legacy-velt-neutral-6);--legacy-velt-follow-overlay-btn-hover-color: var(--legacy-velt-neutral-5);--legacy-velt-follow-overlay-border-color: var(--legacy-velt-border-color)}snippyly-follow-overlay[dark],velt-follow-overlay[dark]{--legacy-velt-follow-overlay-bg-color: var(--legacy-velt-bg-dark-color);--legacy-velt-follow-overlay-text-color: var(--legacy-velt-primary-dark-color);--legacy-velt-follow-overlay-border-color: var(--legacy-velt-border-dark-color)}snippyly-cursor,velt-cursor{--legacy-velt-cursor-avatar-size: var(--legacy-velt-avatar-size);--legacy-velt-cursor-video-size: 4.2rem}snippyly-reaction-tool,velt-reaction-tool,app-reaction-tool{--legacy-velt-reaction-tool-icon-size: 2rem;--legacy-velt-reaction-tool-border-radius: 50px;--legacy-velt-reaction-tool-icon-color: #8F95B2;--legacy-velt-reaction-tool-hover-bg-color: #EAE8F9;--legacy-velt-reaction-tool-active-fill-color: white;--legacy-velt-reaction-tool-active-bg-color: var(--legacy-velt-purple)}snippyly-reaction-tool[dark],velt-reaction-tool[dark],app-reaction-tool[dark]{--legacy-velt-reaction-tool-icon-size: 2rem;--legacy-velt-reaction-tool-border-radius: 50px;--legacy-velt-reaction-tool-icon-color: #EAE8F9;--legacy-velt-reaction-tool-hover-bg-color: #8F95B2;--legacy-velt-reaction-tool-active-fill-color: white;--legacy-velt-reaction-tool-active-bg-color: var(--legacy-velt-purple)}velt-view-analytics-dialog{--legacy-velt-view-analytics-dialog-bg-color: #FFF;--legacy-velt-view-analytics-dialog-border-radius: 12px;--legacy-velt-view-analytics-dialog-border: 1px solid rgba(0, 0, 0, .08);--legacy-velt-view-analytics-dialog-box-shadow: 0px 0px 32px 0px rgba(0, 0, 0, .12);--legacy-velt-view-analytics-dialog-padding: 8px;--legacy-velt-view-analytics-dialog-total-views-count-color: #111;--legacy-velt-view-analytics-dialog-total-views-text-color: #625DF5;--legacy-velt-view-analytics-dialog-today-views-text-color: #848297;--legacy-velt-view-analytics-dialog-views-container-bg-color: #F4F3FF;--legacy-velt-view-analytics-dialog-user-name-color: #4C5366;--legacy-velt-view-analytics-dialog-user-timestamp-color: #959595;--legacy-velt-view-analytics-dialog-back-btn-color: #8F95B2}velt-view-analytics-dialog[dark]{--legacy-velt-view-analytics-dialog-bg-color: #131229;--legacy-velt-view-analytics-dialog-border-radius: 12px;--legacy-velt-view-analytics-dialog-border: 1px solid rgba(255, 255, 255, .08);--legacy-velt-view-analytics-dialog-box-shadow: 0px 0px 32px 0px rgba(0, 0, 0, .12);--legacy-velt-view-analytics-dialog-padding: 8px;--legacy-velt-view-analytics-dialog-total-views-count-color: #FFF;--legacy-velt-view-analytics-dialog-total-views-text-color: #9491F8;--legacy-velt-view-analytics-dialog-today-views-text-color: #848297;--legacy-velt-view-analytics-dialog-views-container-bg-color: rgba(244, 243, 255, .06);--legacy-velt-view-analytics-dialog-user-name-color: #FFF;--legacy-velt-view-analytics-dialog-user-timestamp-color: rgba(255, 255, 255, .4)}velt-reaction-pin-tooltip-internal{--Surface-Neutral-0: #FFF;--Surface-Neutral-2: #F5F5F5;--Surface-Neutral-3: #F0F0F0;--Text-Neutral-0: #0A0A0A;--Text-Neutral-3: #292929;--Text-Neutral-5: #525252;--Text-Neutral-9: #999;--Text-Brand-Primary: #625DF5}velt-reaction-pin-tooltip-internal[dark]{--Surface-Neutral-0: #0F0F0F;--Surface-Neutral-2: #1F1F1F;--Surface-Neutral-3: #2F2F2F;--Text-Neutral-0: #FFF;--Text-Neutral-3: #E0E0E0;--Text-Neutral-5: #C2C2C2;--Text-Neutral-9: #ADADAD;--Text-Brand-Primary: #9491F8}:root{--velt-border-radius-2xs: calc((.125rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-xs: calc((.25rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-sm: calc((.5rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-md: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-lg: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-xl: calc((1.25rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-2xl: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-3xl: calc((2rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-full: calc((5rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-2xs: calc((.125rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-xs: calc((.25rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-sm: calc((.5rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-md: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-lg: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-xl: calc((1.25rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-2xl: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-2xs: calc((.625rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-xs: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-sm: calc((.875rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-md: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-lg: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-xl: calc((1.75rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-2xl: calc((2rem + 0px) * var(--velt-base-rem-unit));--velt-light-mode-green: #0DCF82;--velt-light-mode-magenta: #A259FE;--velt-light-mode-amber: #FF7162;--velt-light-mode-purple: #625DF5;--velt-light-mode-cyan: #4BC9F0;--velt-light-mode-orange: #FE965C;--velt-light-mode-black: #080808;--velt-light-mode-white: #FFFFFF;--velt-light-mode-gray: #EBEBEB;--velt-light-mode-error: #FF7162;--velt-light-mode-error-hover: #DE5041;--velt-light-mode-error-foreground: #FFFFFF;--velt-light-mode-error-light: #FFF4F2;--velt-light-mode-error-transparent: rgba(255, 113, 98, .08);--velt-light-mode-warning: #FFCD2E;--velt-light-mode-warning-hover: #C69400;--velt-light-mode-warning-foreground: #474747;--velt-light-mode-warning-light: #FFFBEE;--velt-light-mode-warning-transparent: rgba(255, 205, 46, .08);--velt-light-mode-success: #198F65;--velt-light-mode-success-hover: #006B41;--velt-light-mode-success-foreground: #FFFFFF;--velt-light-mode-success-light: #EDF6F3;--velt-light-mode-success-transparent: rgba(25, 143, 101, .08);--velt-light-mode-accent: #625DF5;--velt-light-mode-accent-text: #625DF5;--velt-light-mode-accent-hover: #534FCF;--velt-light-mode-accent-foreground: #FFFFFF;--velt-light-mode-accent-light: #F2F2FE;--velt-light-mode-accent-transparent: rgba(148, 145, 248, .08);--velt-light-mode-text-0: #0A0A0A;--velt-light-mode-text-1: #141414;--velt-light-mode-text-2: #1F1F1F;--velt-light-mode-text-3: #292929;--velt-light-mode-text-4: #3D3D3D;--velt-light-mode-text-5: #525252;--velt-light-mode-text-6: #666666;--velt-light-mode-text-7: #7A7A7A;--velt-light-mode-text-8: #858585;--velt-light-mode-text-9: #999999;--velt-light-mode-text-10: #B8B8B8;--velt-light-mode-text-11: #A3A3A3;--velt-light-mode-text-12: #8F8F8F;--velt-light-mode-background-0: #FFFFFF;--velt-light-mode-background-1: #FAFAFA;--velt-light-mode-background-2: #F5F5F5;--velt-light-mode-background-3: #F0F0F0;--velt-light-mode-background-4: #EBEBEB;--velt-light-mode-background-5: #E5E5E5;--velt-light-mode-background-6: #E0E0E0;--velt-light-mode-background-7: #DBDBDB;--velt-light-mode-background-8: #D6D6D6;--velt-light-mode-background-9: #D1D1D1;--velt-light-mode-background-10: #CCCCCC;--velt-light-mode-border-0: #FFFFFF;--velt-light-mode-border-1: #FAFAFA;--velt-light-mode-border-2: #F5F5F5;--velt-light-mode-border-3: #F0F0F0;--velt-light-mode-border-4: #EBEBEB;--velt-light-mode-border-5: #E5E5E5;--velt-light-mode-border-6: #E0E0E0;--velt-light-mode-border-7: #DBDBDB;--velt-light-mode-border-8: #D6D6D6;--velt-light-mode-border-9: #D1D1D1;--velt-light-mode-border-10: #CCCCCC;--velt-light-mode-background-transparent: rgba(255, 255, 255, .8);--velt-light-mode-border-transparent: rgba(0, 0, 0, .16);--velt-light-mode-animation-transparent: rgba(255, 255, 255, .2);--velt-dark-mode-green: #0DCF82;--velt-dark-mode-magenta: #A259FE;--velt-dark-mode-amber: #FF7162;--velt-dark-mode-purple: #625DF5;--velt-dark-mode-cyan: #4BC9F0;--velt-dark-mode-orange: #FE965C;--velt-dark-mode-black: #080808;--velt-dark-mode-white: #FFFFFF;--velt-dark-mode-gray: #EBEBEB;--velt-dark-mode-error: #FF7162;--velt-dark-mode-error-hover: #DE5041;--velt-dark-mode-error-foreground: #FFFFFF;--velt-dark-mode-error-light: #FFF4F2;--velt-dark-mode-error-transparent: rgba(255, 113, 98, .08);--velt-dark-mode-warning: #FFCD2E;--velt-dark-mode-warning-hover: #C69400;--velt-dark-mode-warning-foreground: #474747;--velt-dark-mode-warning-light: #FFFBEE;--velt-dark-mode-warning-transparent: rgba(255, 205, 46, .08);--velt-dark-mode-success: #198F65;--velt-dark-mode-success-hover: #006B41;--velt-dark-mode-success-foreground: #FFFFFF;--velt-dark-mode-success-light: #EDF6F3;--velt-dark-mode-success-transparent: rgba(25, 143, 101, .08);--velt-dark-mode-accent: #625DF5;--velt-dark-mode-accent-text: #9491F8;--velt-dark-mode-accent-hover: #534FCF;--velt-dark-mode-accent-foreground: #FFFFFF;--velt-dark-mode-accent-light: #F2F2FE;--velt-dark-mode-accent-transparent: rgba(148, 145, 248, .08);--velt-dark-mode-text-0: #FFFFFF;--velt-dark-mode-text-1: #F5F5F5;--velt-dark-mode-text-2: #EBEBEB;--velt-dark-mode-text-3: #E0E0E0;--velt-dark-mode-text-4: #D6D6D6;--velt-dark-mode-text-5: #C2C2C2;--velt-dark-mode-text-6: #ADADAD;--velt-dark-mode-text-7: #8F8F8F;--velt-dark-mode-text-8: #7A7A7A;--velt-dark-mode-text-9: #666666;--velt-dark-mode-text-10: #525252;--velt-dark-mode-text-11: #474747;--velt-dark-mode-text-12: #3D3D3D;--velt-dark-mode-background-0: #0F0F0F;--velt-dark-mode-background-1: #1A1A1A;--velt-dark-mode-background-2: #1F1F1F;--velt-dark-mode-background-3: #242424;--velt-dark-mode-background-4: #292929;--velt-dark-mode-background-5: #2E2E2E;--velt-dark-mode-background-6: #333333;--velt-dark-mode-background-7: #383838;--velt-dark-mode-background-8: #3D3D3D;--velt-dark-mode-background-9: #424242;--velt-dark-mode-background-10: #474747;--velt-dark-mode-border-0: #0F0F0F;--velt-dark-mode-border-1: #1A1A1A;--velt-dark-mode-border-2: #1F1F1F;--velt-dark-mode-border-3: #242424;--velt-dark-mode-border-4: #292929;--velt-dark-mode-border-5: #2E2E2E;--velt-dark-mode-border-6: #333333;--velt-dark-mode-border-7: #383838;--velt-dark-mode-border-8: #3D3D3D;--velt-dark-mode-border-9: #424242;--velt-dark-mode-border-10: #474747;--velt-dark-mode-background-transparent: rgba(0, 0, 0, .8);--velt-dark-mode-border-transparent: rgba(255, 255, 255, .16);--velt-dark-mode-animation-transparent: rgba(255, 255, 255, .2);--velt-comment-pin-z-index: 2147483557;--velt-arrow-z-index: 2147483557;--velt-recorder-player-z-index: 2147483557;--velt-cursor-z-index: 2147483647;--velt-persistent-comment-frame-z-index: 2147483647;--velt-toast-popup-z-index: 2147483647;--velt-live-state-sync-overlay-z-index: 2147483647;--velt-follow-mode-overlay-z-index: 2147483647;--velt-comments-minimap-z-index: 2147483637;--velt-global-overlay-z-index: 2147483637}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}.cdk-overlay-container{z-index:var(--velt-global-overlay-z-index)!important}.cdk-overlay-container .velt-overlay-panel.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:#fff;padding:24px}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .mdc-dialog__title:before{height:unset}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-actions{padding:var(--mat-dialog-actions-padding, 8px)}.velt-overlay-panel{background-color:transparent;border:none;box-shadow:none}.velt-overlay-panel.mat-mdc-tooltip-panel .mat-mdc-tooltip{color:#fff;background-color:#0b0b0b;border:1px solid #eeeeee;border-radius:4px;padding:8px 12px;font-size:14px}.velt-menu.mat-mdc-menu-panel{box-shadow:none}video.flip{transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}body[data-velt-huddle-on-cursor-mode] .cdk-overlay-container{z-index:calc(var(--velt-global-overlay-z-index, 2147483637) - 1)!important}body[data-velt-huddle-on-cursor-mode]:not(.show-pin-cursor){cursor:none!important}body[data-velt-huddle-on-cursor-mode]:not(.show-pin-cursor) *{cursor:none!important}body.snippyly-add-comment-mode,body.snippyly-add-comment-mode *{-webkit-user-select:none!important;user-select:none!important}body.snippyly-add-comment-mode [data-velt-iframe-container=true][data-velt-iframe-container-static=true]{position:relative!important}body.snippyly-add-comment-mode [data-velt-iframe-container=true]:before{content:""!important;position:absolute!important;inset:0!important;z-index:1!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] [data-velt-element=true]:not(snippyly-comment-text-portal):not(velt-recorder-control-panel):not([data-velt-screen-recorder-panel=true]){display:none!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight{color:inherit!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{color:inherit!important;background-color:inherit!important;cursor:inherit!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.selected{background-color:inherit!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight snippyly-comment-text-portal,body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight velt-comment-text-portal{font-family:inherit!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{color:transparent!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.selected{color:transparent!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-annotation-number{display:none!important}:where([data-velt-pdf-viewer=true]) .textLayer:is(:has([data-snippyly-pin-host],[data-velt-pin-host]),:has(snippyly-comment-pin-portal,snippyly-tag-pin-portal,snippyly-recorder-pin-portal,snippyly-arrow-pin-portal,snippyly-area-pin-portal,velt-comment-pin-portal,velt-tag-pin-portal,velt-recorder-pin-portal,velt-arrow-pin-portal,velt-area-pin-portal)){opacity:1!important;visibility:visible!important}:where([data-velt-pdf-viewer=true]) .textLayer:is(:has([data-snippyly-pin-host],[data-velt-pin-host]),:has(snippyly-comment-pin-portal,snippyly-tag-pin-portal,snippyly-recorder-pin-portal,snippyly-arrow-pin-portal,snippyly-area-pin-portal,velt-comment-pin-portal,velt-tag-pin-portal,velt-recorder-pin-portal,velt-arrow-pin-portal,velt-area-pin-portal)) snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{opacity:.2!important}[data-snippyly-comment-pin-host][data-snippyly-comment-pin-host-static],[data-snippyly-tag-pin-host][data-snippyly-tag-pin-host-static],[data-snippyly-recorder-pin-host][data-snippyly-recorder-pin-host-static],[data-snippyly-arrow-pin-host][data-snippyly-arrow-pin-host-static],[data-snippyly-area-pin-host][data-snippyly-area-pin-host-static],[data-velt-comment-pin-host][data-velt-comment-pin-host-static],[data-velt-tag-pin-host][data-velt-tag-pin-host-static],[data-velt-recorder-pin-host][data-velt-recorder-pin-host-static],[data-velt-arrow-pin-host][data-velt-arrow-pin-host-static],[data-velt-area-pin-host][data-velt-area-pin-host-static]{position:relative}[data-velt-comment-pin-host][data-velt-comment-pin-active=true],[data-velt-area-pin-host][data-velt-area-pin-active=true]{opacity:1!important;visibility:visible!important}.s-display-none,.velt-display-none{display:none!important}.s-flex,.velt-display-flex{display:flex!important}.velt-items-center{align-items:center!important}.s-background-blur-1{-webkit-backdrop-filter:blur(4px)!important;backdrop-filter:blur(4px)!important}.s-background-blur-2{-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important}.s-background-blur-3{-webkit-backdrop-filter:blur(12px)!important;backdrop-filter:blur(12px)!important}.s-background-blur-4{-webkit-backdrop-filter:blur(16px)!important;backdrop-filter:blur(16px)!important}.s-tooltip{position:relative!important}.s-tooltip .s-tooltiptext{visibility:hidden!important;block-size:auto!important;width:max-content!important;top:120%!important;background-color:var(--legacy-velt-bg-color);border:1px solid var(--legacy-velt-border-color);color:var(--legacy-velt-primary-color)!important;text-align:left!important;padding:.5em .75em!important;border-radius:6px!important;font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:2em!important;box-shadow:var(--legacy-velt-box-shadow)!important;position:absolute!important;z-index:1!important;opacity:0!important;transition:opacity .5s!important;left:50%!important;transform:translate(-50%)!important}.s-tooltip .s-tooltiptext:after{content:" "!important;position:absolute!important;top:0!important;left:50%!important;width:12px!important;height:12px!important;border-left:1px solid var(--legacy-velt-border-color);border-top:1px solid var(--legacy-velt-border-color);background-color:var(--legacy-velt-bg-color);border-radius:4px!important;transform:translate(-50%,-41%) rotate(45deg)!important;transform-origin:center!important}.s-tooltip .s-tooltiptext:before{content:" ";position:absolute;top:0;left:50%;width:24px;height:24px;transform:translate(-50%,-41%);background:transparent}.s-tooltip .s-tooltiptext.left{top:50%!important;right:120%!important;transform:translateY(-50%)!important}.s-tooltip .s-tooltiptext.left:after{transform:translate(41%,-50%) rotate(45deg)!important;transform-origin:center!important;left:unset!important;right:0!important;top:50%!important}.s-tooltip .s-tooltiptext.left.top{top:100%!important;transform:translateY(-45%)!important}.s-tooltip .s-tooltiptext.left.top:after{transform:translate(41%,66%) rotate(45deg)!important;top:0!important}.s-tooltip:hover .s-tooltiptext{visibility:visible!important;opacity:1!important}.s-tooltip-light .s-tooltiptext{background-color:#fff!important;color:#000!important;box-shadow:0 2px 8px -2px #9f9f9f!important}.s-tooltip-light .s-tooltiptext:after{background-color:#fff!important}.s-tooltip-link{font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-cursor-pointer,.velt-cursor-pointer{cursor:pointer!important}.s-shake{animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;transform:translateZ(0);backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}app-render-timer-wrapper{width:100%;height:100%}velt-comment-text[comment-available=true]{color:var(--Constant-Warning---Text, #E2A600);background-color:#e2a6001a;border-bottom:1px solid #E2A600}
507
+ `))},dependencies:[Om],styles:["[_nghost-%COMP%]{display:inline-flex;align-items:center}.skeleton-loader[_ngcontent-%COMP%]{display:inline-block;background:linear-gradient(-90deg,#f0f0f0,#e2e2e2,#f0f0f0);background-size:400% 400%;animation:_ngcontent-%COMP%_skeleton-loading 1.2s ease-in-out 4;height:var(--velt-skeleton-loader-height);width:var(--velt-skeleton-loader-width);border-radius:var(--velt-skeleton-loader-border-radius)}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-position:100% 0}to{background-position:-100% 0}}"]});let i=o;return i})();var TRe=["userAvatarRef"],DRe=["*"];function wRe(i,o){if(i&1&&(_(0,"div",7),w(1,"span",8),b()),i&2){let n=l(2).ngIf,e=l();it("background-color",n.background||"#625DF5"),x("data-testid",e.componentId+"-initial-container"),m(),it("color",n.textColor||"#FFFFFF"),x("data-modal-author-initial",n.initial)("data-testid",e.componentId+"-initial")}}function ORe(i,o){if(i&1){let n=Y();_(0,"img",9),G("error",function(){N(n);let t=l(3);return F(t.onImageLoadError())})("load",function(){N(n);let t=l(3);return F(t.onImageLoaded())}),b()}if(i&2){let n=l(2).ngIf,e=l();it("display",n.imgLoaded?"":"none !important"),d("src",n.src,vn),x("alt","User avatar")("data-testid",e.componentId+"-image")}}function ARe(i,o){if(i&1&&(f(0),_(1,"div",4,1),u(3,wRe,2,7,"div",5)(4,ORe,1,5,"ng-template",6),Lt(5),b(),v()),i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId+"-container")("aria-label","User avatar"),m(2),d("ngIf",!n.imgLoaded),m(),d("ngIf",!n.imgLoadError)}}function PRe(i,o){if(i&1&&w(0,"velt-skeleton-loader-internal",10),i&2){let n=l().ngIf;d("height",n.size?n.size+"px":"100%")("width",n.size?n.size+"px":"100%")}}function MRe(i,o){if(i&1&&(f(0),u(1,ARe,6,4,"ng-container",3)(2,PRe,1,2,"ng-template",null,0,xe),v()),i&2){let n=o.ngIf,e=de(3);m(),d("ngIf",n.imgLoaded||(n==null||n.user==null?null:n.user.photoUrl)||(n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email)||(n==null?null:n.initial))("ngIfElse",e)}}var Kn=(()=>{let o=class o{constructor(e,t,r){this.authService=e,this.loggingService=t,this.elementRef=r,this.initial="",this.background="#625DF5",this.textColor="#FFFFFF",this.userAvatarRef=new R(null),this.componentConfigSignal=Te({background:"#625DF5",textColor:"#FFFFFF",initial:"",src:"",imgLoaded:!1,imgLoadError:!1}),this.veltElement=!0,this.componentId="velt-user-avatar"}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in UserAvatarComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","img"),e.setAttribute("data-testid",this.componentId+"-container"),this.updateAriaLabel()}catch(e){this.loggingService.catch("Error in UserAvatarComponent setupA11yAttributes:",e)}}updateAriaLabel(){try{this.elementRef.nativeElement.setAttribute("aria-label","User avatar")}catch(e){this.loggingService.catch("Error in UserAvatarComponent updateAriaLabel:",e)}}ngAfterViewInit(){this.updateAvatarSize()}ngOnChanges(e){try{if(e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e?.user){let t=e.user.currentValue;t?.photoUrl!==this.componentConfigSignal().src&&this.componentConfigSignal.update(r=>(r=T(I({},r),{src:t?.photoUrl,imgLoaded:!1,imgLoadError:!1}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{background:t?.color||this.authService.getUserAvatarColor(t?.userId)}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{textColor:t?.textColor||this.authService.getUserTextColor(t?.userId)}),r)),this.componentConfigSignal.update(r=>(r=T(I({},r),{initial:t?.initial||t?.name?.charAt(0)||t?.email?.charAt(0)}),r))}e?.size&&this.updateAvatarSize(),e?.width&&this.updateAvatarSize(),e?.height&&this.updateAvatarSize()}catch(t){this.loggingService.catch("Error in UserAvatarComponent ngOnChanges: ",t)}}onImageLoadError(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{imgLoadError:!0}),e))}catch(e){this.loggingService.catch("Error in UserAvatarComponent onImageLoadError: ",e)}}onImageLoaded(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{imgLoaded:!0}),e))}catch(e){this.loggingService.catch("Error in UserAvatarComponent onImageLoaded: ",e)}}updateAvatarSize(){try{this.elementRef?.nativeElement&&(this.size&&(this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-height",this.size+"px"),this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-width",this.size+"px")),this.width&&this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-width",this.size+"px"),this.height&&this.elementRef.nativeElement.style.setProperty("--legacy-velt-user-avatar-height",this.size+"px"))}catch(e){this.loggingService.catch("Error in UserAvatarComponent updateAvatarSize: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-avatar"]],viewQuery:function(t,r){if(t&1&&nt(TRe,5),t&2){let a;Xe(a=Qe())&&(r.userAvatarRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{initial:"initial",src:"src",background:"background",textColor:"textColor",size:"size",width:"width",height:"height",user:"user"},standalone:!1,features:[Ze],ngContentSelectors:DRe,decls:1,vars:1,consts:[["loadingTemplateRef",""],["userAvatarRef",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],["velt-ignore-change-detection","true","role","img",1,"s-user-avatar-container","velt-user-avatar"],["class","s-user-avatar-initial-container velt-user-avatar--initial-container","aria-hidden","componentConfig.imgLoaded",3,"background-color",4,"ngIf"],[3,"ngIf"],["aria-hidden","componentConfig.imgLoaded",1,"s-user-avatar-initial-container","velt-user-avatar--initial-container"],[1,"s-user-avatar-initial","velt-user-avatar--initial"],["referrerpolicy","no-referrer","velt-ignore-change-detection","true",1,"s-user-avatar-image","velt-user-avatar--image",3,"error","load","src"],["borderRadius","100%",3,"height","width"]],template:function(t,r){t&1&&(jt(),u(0,MRe,4,2,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Uo],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));position:static}*[_ngcontent-%COMP%]:empty{display:revert}.s-user-avatar-container[_ngcontent-%COMP%]{position:relative;width:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));border-radius:50%;display:inline-block}velt-skeleton-loader-internal[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit));border-radius:50%}.s-user-avatar-initial-container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;border-radius:50%;align-items:center;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}.s-user-avatar-image[_ngcontent-%COMP%]{object-fit:cover;border-radius:50%;width:100%;height:100%;display:flex}.s-user-avatar-initial[_ngcontent-%COMP%]{color:#fff;font-size:calc((var(--legacy-velt-user-avatar-initial-font-size) + 0px) * var(--velt-base-rem-unit));position:relative;text-transform:uppercase}.s-user-avatar-initial[_ngcontent-%COMP%]:after{content:attr(data-modal-author-initial);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.velt-user-avatar[_ngcontent-%COMP%], velt-skeleton-loader-internal[_ngcontent-%COMP%]{height:var(--legacy-velt-user-avatar-height, calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit)));width:var(--legacy-velt-user-avatar-width, calc((var(--legacy-velt-user-avatar-size) + 0px) * var(--velt-base-rem-unit)))}"],changeDetection:0});let i=o;return i})();var kRe=["selectionElementPortalOverlay"],RRe=()=>["velt-overlay-panel"],NRe=i=>[i];function FRe(i,o){if(i&1&&(f(0),_(1,"span",10),te(2),P(3,"translate"),b(),v()),i&2){let n=l(),e=n.$implicit,t=n.index,r=l(5);m(),it("--velt-selection-color",e==null||e.user==null?null:e.user.color),x("data-testid",r.componentId+"-user-name-"+t),m(),ze(M(3,4,(e==null||e.user==null?null:e.user.name)||(e==null||e.user==null?null:e.user.email)))}}function LRe(i,o){if(i&1&&(f(0),u(1,FRe,4,6,"ng-container",3),v()),i&2){let n=o.index,e=l(5);m(),d("ngIf",n<e.maxCount)}}function BRe(i,o){if(i&1&&(_(0,"span",11),te(1),b()),i&2){let n=l(4).ngIf,e=l();it("--velt-selection-color",(n.selections[0]==null||n.selections[0].user==null?null:n.selections[0].user.color)||"white"),x("data-testid",e.componentId+"-additional-count")("aria-label",(n.selections==null?null:n.selections.length)-e.maxCount+" additional users"),m(),_e("+",(n.selections==null?null:n.selections.length)-e.maxCount,"")}}function VRe(i,o){if(i&1&&(f(0),_(1,"div",7),P(2,"translate"),u(3,LRe,2,1,"ng-container",8)(4,BRe,2,5,"span",9),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),x("data-testid",e.componentId+"-label-container")("aria-label",M(2,4,"Selected users")),m(2),d("ngForOf",n.selections),m(),d("ngIf",(n.selections==null?null:n.selections.length)>e.maxCount)}}function URe(i,o){if(i&1&&(f(0),w(1,"snippyly-user-avatar",13),v()),i&2){let n=l(),e=n.$implicit,t=n.index;m(),it("--velt-selection-color",e==null||e.user==null?null:e.user.color)("--velt-selection-user-index",t),d("size",20)("user",e==null?null:e.user)}}function jRe(i,o){if(i&1&&(f(0),u(1,URe,2,6,"ng-container",3),v()),i&2){let n=o.index,e=l(5);m(),d("ngIf",n<e.maxCount)}}function $Re(i,o){if(i&1&&(_(0,"div",14),P(1,"translate"),_(2,"span",15),te(3),b()()),i&2){let n=l(4).ngIf,e=l();it("--velt-selection-user-index",n.selections==null?null:n.selections.length)("background-color",(n.selections[(n.selections==null?null:n.selections.length)-1]==null||n.selections[(n.selections==null?null:n.selections.length)-1].user==null?null:n.selections[(n.selections==null?null:n.selections.length)-1].user.color)||"white"),x("data-testid",e.componentId+"-additional-avatars")("aria-label",(n.selections==null?null:n.selections.length)-e.maxCount+" "+M(1,7,"additional users")),m(3),_e("+",(n.selections==null?null:n.selections.length)-e.maxCount,"")}}function HRe(i,o){if(i&1&&u(0,jRe,2,1,"ng-container",8)(1,$Re,4,9,"div",12),i&2){let n=l(3).ngIf,e=l();d("ngForOf",n.selections),m(),d("ngIf",(n.selections==null?null:n.selections.length)>e.maxCount)}}function zRe(i,o){if(i&1&&u(0,VRe,5,6,"ng-container",6)(1,HRe,2,2,"ng-template",null,2,xe),i&2){let n=de(2),e=l(2).ngIf,t=l();d("ngIf",(e==null?null:e.userIndicatorType)===(t.userIndicatorTypes==null?null:t.userIndicatorTypes.Label))("ngIfElse",n)}}function GRe(i,o){if(i&1&&(f(0),w(1,"div",4,0),u(3,zRe,3,2,"ng-template",5,1,xe),v()),i&2){let n=de(2),e=l().ngIf,t=l();m(),it("top",(e==null||e.position==null?null:e.position.top)+t.offsetTop,"px")("left",(e==null||e.position==null?null:e.position.left)+t.offsetLeft,"px"),d("id","selection-element-contianer-"+(t.highlight.user==null?null:t.highlight.user.userSnippylyId)),x("data-testid",t.componentId),m(2),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",!0)("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",gt(13,RRe))("cdkConnectedOverlayPositions",A(14,NRe,e==null?null:e.overlayPosition))}}function WRe(i,o){if(i&1&&(f(0),u(1,GRe,5,16,"ng-container",3),v()),i&2){let n=o.ngIf;m(),d("ngIf",n==null?null:n.position)}}var cde=(()=>{let o=class o{get highlight(){return this._highlight}set highlight(e){this._highlight=e,this.calculatePosition()}constructor(e,t,r){this.loggingService=e,this.selectionService=t,this.elementRef=r,this._highlight=new lg,this.position=null,this.userIndicatorTypes=h0,this.offsetLeft=0,this.offsetTop=0,this.maxCount=1,this.componentConfigSignal=Te({userIndicatorPosition:xb.End,userIndicatorType:h0.Avatar,position:null,overlayPosition:{originX:"end",originY:"top",overlayX:"end",overlayY:"top"},selections:[]}),this.veltElement=!0,this.componentId="velt-selection-element";try{this.loggingService.log("%c[WB] Creating CLASS: SelectionElementPortalComponent","color: blue;");let a=this.selectionService.getUserIndicatorPosition(),s=this.selectionService.getUserIndicatorType();this.componentConfigSignal.update(c=>(c=T(I({},c),{userIndicatorPosition:a,userIndicatorType:s}),c)),this.setOverlayPosition(a)}catch(a){this.loggingService.log("Error in SelectionElementPortalComponent constructor: ",a)}}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","complementary"),e.setAttribute("aria-label","Selection portal")}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent setupA11yAttributes:",e)}}setSelections(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{selections:e}),t))}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent setSelections: ",t)}}addSelection(e){try{this.componentConfigSignal.update(t=>(t=I({},t),t.selections.push(e),t))}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent addSelection: ",t)}}ngAfterViewInit(){try{this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: ngAfterViewInit","color: green;"),this.updateOverlayPosition()}catch(e){this.loggingService.catch("Error in ngAfterViewInit: ",e)}}setOverlayPosition(e){try{switch(this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: setOverlayPosition","color: green;"),e){case"start":this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPosition:{originX:"start",originY:"top",overlayX:"start",overlayY:"top"}}),t));break;default:this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPosition:{originX:"end",originY:"top",overlayX:"end",overlayY:"top"}}),t))}this.updateOverlayPosition()}catch(t){this.loggingService.catch("Error in SelectionElementPortalComponent setOverlayPosition: ",t)}}updateOverlayPosition(){try{this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: updateOverlayPosition","color: green;"),this.selectionElementPortalOverlay&&this.selectionElementPortalOverlay?.overlayRef?.updatePosition()}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent updateOverlayPosition: ",e)}}calculatePosition(){try{if(this.loggingService.log("%c[WB] Calling SelectionElementPortalComponent FUNCTION: calculatePosition","color: green;"),this.highlight?.targetElement){let e=WS(this.highlight.targetElement);if(e){let t=e.iterateNext(),r,a=null,s=null;try{r=JSON.parse(t?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)||"{}"),a=t?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_USER_INDICATOR_POSITION)||this.componentConfigSignal().userIndicatorPosition,a&&this.setOverlayPosition(a),s=t?.getAttribute(j.ATTRIBUTES.VELT_LIVE_SELECTION_USER_INDICATOR_TYPE)||this.componentConfigSignal().userIndicatorType,this.componentConfigSignal.update(p=>(p=T(I({},p),{userIndicatorPosition:a,userIndicatorType:s}),p))}catch{}let c;if(r?.horizontal&&(c=r.horizontal),a==="start"?c="top-start":c="top-right",t){let p=t.getBoundingClientRect();if(p&&p.width&&p.height)switch(c){case"left":this.position={top:p.height/2-16,left:-4};break;case"left-start":this.position={top:0,left:-4};break;case"top-start":this.position={top:-32,left:0};break;case"top-right":this.position={top:-32,left:p.width};break;case"bottom-left":this.position={top:p.height+4,left:0};break;case"bottom-right":this.position={top:p.height+4,left:p.width-32};break;case"center-left":this.position={top:p.height/2-16,left:-32};break;case"center-right":this.position={top:p.height/2-16,left:p.width+4};break;default:this.position={top:-32,left:p.width}}else this.position=null}else this.position=null}else this.position=null}this.componentConfigSignal.update(e=>(e=T(I({},e),{position:this.position}),e))}catch(e){this.loggingService.catch("Error in SelectionElementPortalComponent calculatePosition: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(Fs),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-selection-element-portal"]],viewQuery:function(t,r){if(t&1&&nt(kRe,5),t&2){let a;Xe(a=Qe())&&(r.selectionElementPortalOverlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{highlight:"highlight",offsetLeft:"offsetLeft",offsetTop:"offsetTop"},standalone:!1,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["selectionElementPortalOverlay","cdkConnectedOverlay"],["defaultAvatarTypeTemplate",""],[4,"ngIf"],["cdkOverlayOrigin","","role","presentation",1,"selection-element-portal",3,"id"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayLockPosition","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayPositions"],[4,"ngIf","ngIfElse"],["role","list",1,"velt-live-selection-element-user-name-container"],[4,"ngFor","ngForOf"],["class","velt-live-selection-element-user-name-plus","role","listitem",3,"--velt-selection-color",4,"ngIf"],["role","listitem",1,"velt-live-selection-element-user-name"],["role","listitem",1,"velt-live-selection-element-user-name-plus"],["class","photo-container","role","listitem",3,"--velt-selection-user-index","background-color",4,"ngIf"],[1,"photo-container","selection-user-avatar",3,"size","user"],["role","listitem",1,"photo-container"],[1,"s-selection-element-avatar-initial"]],template:function(t,r){t&1&&u(0,WRe,2,1,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,an,nn,Kn,ge],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);position:absolute;top:0;left:0;box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert}.selection-element-portal[_ngcontent-%COMP%]{display:none;position:absolute;top:0;left:0;white-space:nowrap;z-index:1;font-size:var(--velt-font-size-xs)}.photo-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:calc((1.5rem + 0px) * var(--velt-base-rem-unit));height:calc((1.5rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border-radius:50%;color:var(--velt-light-mode-white);border:2px solid var(--velt-selection-color);margin-left:-5px;z-index:calc(var(--velt-selection-user-index, 0) * -1)}.photo-container[_ngcontent-%COMP%] .s-selection-element-avatar-initial[_ngcontent-%COMP%]{color:var(--velt-light-mode-white)}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;object-fit:cover} snippyly-user-avatar.selection-user-avatar .s-user-avatar-initial{font-size:var(--velt-font-size-md)}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%]{display:flex;gap:var(--velt-spacing-xs);margin-top:5px}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%] .velt-live-selection-element-user-name[_ngcontent-%COMP%]{color:var(--velt-light-mode-white);display:flex;background:var(--velt-selection-color);padding:var(--velt-spacing-xs) var(--velt-spacing-sm);font-size:var(--velt-spacing-md);font-style:normal;font-weight:400;line-height:100%;border-radius:var(--velt-border-radius-md);font-family:var(--velt-default-font-family)}.velt-live-selection-element-user-name-container[_ngcontent-%COMP%] .velt-live-selection-element-user-name-plus[_ngcontent-%COMP%]{color:var(--velt-light-mode-white);display:flex;background:var(--velt-selection-color);padding:var(--velt-spacing-x);font-size:var(--velt-font-size-xs);font-style:normal;font-weight:400;line-height:100%;border-radius:var(--velt-border-radius-md);font-family:var(--velt-default-font-family)}"],changeDetection:0});let i=o;return i})();var D0=(i,o)=>{try{let n=YRe(i),e=[],t=[];return n.forEach(r=>{r?.parentElement?.closest(j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT)?r?.parentElement?.normalize():t.push(r)}),t.forEach(r=>{let a=KRe(r,o);a&&e.push(a)}),e}catch(n){return at.catch("Error in highlighter highlightRange: ",n),[]}},YRe=i=>{try{if(i.collapsed)return[];let o=i.commonAncestorContainer;if(i.commonAncestorContainer.nodeType!==Node.ELEMENT_NODE&&(o=i.commonAncestorContainer.parentElement),!o)return[];let n=[],e=o.ownerDocument.createNodeIterator(o,NodeFilter.SHOW_TEXT),t,r=!1;for(;t=e.nextNode();)if(i.intersectsNode(t)){let a=t?.length;i.startContainer===t&&i.startOffset>0&&(t.splitText(i.startOffset),r=!0),i.endContainer===t&&i.endOffset<a&&t.splitText(i.endOffset),n.push(t)}return r&&n.shift(),n}catch(o){return at.catch("Error in highlighter getTextNodesInRange: ",o),[]}},KRe=(i,o)=>{try{let n=document.createElement(o||j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT);return i.parentElement?.replaceChild(n,i),n.appendChild(i),n}catch(n){return at.catch("Error in highlighter highlightNode: ",n),null}};var Fs=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D){this.afAuth=e,this.authService=t,this.configService=r,this.databaseService=a,this.docService=s,this.domService=c,this.componentFactoryResolver=p,this.injector=g,this.appRef=C,this.loggingService=E,this.commonDbService=D,this.documentPaths=null,this.textSelections={},this.enableSelections$=new ve(!1),this.userIndicatorEnabled$=new ve(!0),this.userIndicatorPosition$=new ve(xb.End),this.userIndicatorType$=new ve(h0.Avatar),this.defaultElementsTrackingEnabled$=new ve(!0),this.defaultStylingEnabled$=new ve(!0),this.elementSelections={},this.databaseService.getDb().pipe(Le(L=>!!L),rt(1)).subscribe(L=>{L&&this.updateOnDocumentFocusChange()},L=>{this.loggingService.catch("Error in SelectionService getDb subscription: ",L)}),this.docService.getDocumentPaths$().subscribe(L=>{this.documentPaths=L},L=>{this.loggingService.catch("Error in SelectionService getDocumentPaths subscription: ",L)}),this.domService.onDocumentClick$().subscribe(L=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&L?.target&&!window.getSelection()?.toString()){let z=this.getSelectionEnabledElement(L.target);if(z&&!Xi(z)){let W=this.domService.getXPath(z);if(W){let ee=new lg;ee.type="click",ee.targetElement=W,this.setSelection(ee)}}else this.removeSelection()}}catch(z){this.loggingService.catch("Error in SelectionService onDocumentClick$: ",z)}},L=>{this.loggingService.catch("Error in SelectionService onDocumentClick$ subscription: ",L)}),this.domService.onDocumentFocus$().subscribe(L=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&L?.target){let z=this.getSelectionEnabledElement(L.target);if(z&&!Xi(z)){let W=this.domService.getXPath(z);if(W){let ee=new lg;ee.type="focus",ee.targetElement=W,this.setSelection(ee)}}else this.removeSelection()}}catch(z){this.loggingService.catch("Error in SelectionService onDocumentFocus$: ",z)}},L=>{this.loggingService.catch("Error in SelectionService onDocumentFocus$ subscription: ",L)}),this.domService.onWindowKeyupEsc$().subscribe(L=>{this.removeSelection()},L=>{this.loggingService.catch("Error in SelectionService onWindowKeyupEsc$ subscription: ",L)}),this.enableSelections$.pipe(he(()=>this.isFeatureAllowed$({})),Le(L=>L?.config&&L?.user)).subscribe(L=>{(!L?.featureAllowed||!this.enableSelections$.value)&&this.removeSelection()},L=>{this.loggingService.catch("Error in SelectionService enableSelections$ subscription: ",L)}),this.domService.onSelectionChange$().subscribe(()=>{try{if(this.enableSelections$.value&&this.isFeatureAllowed()&&window.getSelection()?.toString()){let L=window.getSelection()?.getRangeAt(0);if(L.commonAncestorContainer&&!L?.collapsed){let z=iae([L]),W=new lg;W.type="selection",W.targetTextRange=z?.length?z[0]:null,this.setSelection(W)}}}catch(L){this.loggingService.catch("Error in SelectionService onSelectionChange$: ",L)}},L=>{this.loggingService.catch("Error in SelectionService onSelectionChange$ subscription: ",L)}),this.authService.getUser$().subscribe(L=>{this.user=L},L=>{this.loggingService.catch("Error in SelectionService getUser$ subscription: ",L)}),this.getSelectionsOnCurrentDocument().pipe(wi()).subscribe(([L,z])=>{try{if(L){let W=[];Object.keys(L).forEach(ee=>{let me=L[ee],Ce=z?z[ee]:null;!Ii(me,Ce)&&ee!==this.getUserIdHash(this.user)&&W.push(me)}),W.forEach(ee=>{if(ee.targetElement){let me=this.elementSelections[ee?.targetElement]?.portalRef,Ae=(this.elementSelections[ee?.targetElement]?.selections||[]).filter(Ge=>this.getUserIdHash(Ge.user)!==this.getUserIdHash(ee?.user));Ae?.length?(me.instance.setSelections(Ae.slice()),this.elementSelections[ee?.targetElement].selections=Ae.slice(),this.highlightElement(Ae[0])):(this.removeHighlightFromElement(ee),this.removeSelectionElement(ee))}else ee.targetTextRange&&this.removeHighlightFromText(ee)})}if(z){let W=[];Object.keys(z).forEach(ee=>{let me=L?L[ee]:null,Ce=z[ee];!Ii(me,Ce)&&ee!==this.getUserIdHash(this.user)&&W.push(Ce)}),W.forEach(ee=>{ee.targetElement?(this.highlightElement(ee),this.getUserIndicatorEnabled()&&this.setElementHighlight(ee)):ee.targetTextRange&&this.highlightText(ee)})}}catch(W){this.loggingService.catch("Error in SelectionService getSelectionsOnCurrentDocument: ",W)}},L=>{this.loggingService.catch("Error in SelectionService getSelectionsOnCurrentDocument subscription: ",L)}),this.authService.addPreSignOutFuction("highlight-signout",this.signOutUser.bind(this))}isFeatureAllowed(){return ao(this.configService.getConfig(),this.authService.getUser(),Re.LIVE_SELECTION)}updateOnDocumentFocusChange(){this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDocumentFocusChange","color: green;");try{document&&document.addEventListener("visibilitychange",e=>{this.user&&document.visibilityState==="hidden"&&this.removeSelection()})}catch(e){this.loggingService.catch("Error in updateOnDocumentFocusChange:",e)}}getSelectionsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getSelectionsOnCurrentDocument","color: green;"),ei(this.afAuth).pipe(Le(e=>!!e),he(e=>this.isFeatureAllowed$({firebaseUser:e})),he(e=>e.featureAllowed?se(e).pipe(he(t=>this.docService.getDocumentPaths$().pipe(ce(r=>(this.documentPaths=r,t)))),he(t=>t?.user?t?.user?.isAnonymous?se(null):this.documentPaths?this.databaseService.getDb().pipe(Le(r=>!!r),he(r=>this.documentPaths?.selection?this.commonDbService.dbListener({feature:"allSelections",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(a=>a?.data)):se(null))):se(null):se(null))):se(null)))}isFeatureAllowed$(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>(this.user=r,T(I({},t),{user:r}))))),he(t=>ao(t.config,t.user,Re.LIVE_SELECTION)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Live Selection feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))),Ct((t,r)=>t?.featureAllowed===r?.featureAllowed))}setSelection(e){try{if(this.user?.userId&&this.documentPaths?.selection){e.user=this.user;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0},data:t})}}catch(t){this.loggingService.catch("Error in SelectionService setSelection: ",t)}}removeSelection(){try{this.user?.userId&&this.documentPaths?.selection&&this.commonDbService.deleteData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0}})}catch(e){this.loggingService.catch("Error in SelectionService removeSelection: ",e)}}highlightElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();if(r){let a=["input","textarea","select","button"],s;try{r?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)&&(s=JSON.parse(r?.getAttribute(j.ATTRIBUTES.VELT_SELECTION_CONFIG)||"{}"))}catch{}(!s||s?.border)&&this.domService.highlightUserElement(r,e?.user?.color,e?.user?.name,this.getDefaultStylingEnabled())}}}catch(t){this.loggingService.catch("Error in SelectionService highlightElement: ",t)}}removeHighlightFromElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();r&&this.domService.removeHighlightUserFromElement(r)}}catch(t){this.loggingService.catch("Error in SelectionService removeHighlightFromElement: ",t)}}highlightText(e){try{if(e?.targetTextRange){let t=Ov(e.targetTextRange?.text,this.domService.getXPath(e.targetTextRange?.commonAncestorContainer).iterateNext(),e.targetTextRange?.occurrence),r=new Range;try{r.setStart(t[0].textNode,t[0].startOffset||0),r.setEnd(t[t.length-1].textNode,t[t.length-1].endOffset||0)}catch{}if(r.toString()===e.targetTextRange?.text){let a=D0(r,j.TAGS.SNIPPYLY_HIGHLIGHT_USER_TEXT),s=[],c=this.getSelectionUserMarker(e.user);if(a&&a.length&&(a.forEach(p=>{p?.textContent?.trim()&&(this.domService.addClassToElement(p,p.tagName?.toLowerCase()),this.domService.addClassToElement(p,j.VELT_LIVE_SELECTION_ON_TEXT),this.getDefaultStylingEnabled()&&this.domService.addClassToElement(p,j.VELT_LIVE_SELECTION_ON_TEXT_DEFAULT),e.user?.color&&p.style.setProperty(j.VELT_SELECTION_COLOR,e.user?.color+"55"),s.push({element:p,textNode:p.childNodes[0]}))}),c)){let p=a.filter(C=>C?.textContent?.trim()),g=p?.length?p[p?.length-1]:null;g&&g.parentNode.insertBefore(c,g.nextSibling)}this.textSelections[this.getUserIdHash(e?.user)]={textNodes:s,marker:c}}}}catch(t){this.loggingService.catch("Error in SelectionService highlightText: ",t)}}removeHighlightFromText(e){try{let t=this.getUserIdHash(e?.user);t&&this.textSelections[t]?.textNodes?.length&&(this.textSelections[t].textNodes.forEach(r=>{r?.element&&r?.textNode&&r.element.replaceWith(r.textNode),r.textNode&&r.textNode.parentNode?.normalize()}),this.textSelections[t]?.marker&&this.textSelections[t]?.marker?.remove())}catch(t){this.loggingService.catch("Error in SelectionService removeHighlightFromText: ",t)}}getSelectionUserMarker(e){try{let t=document.createElement("span");t.classList.add("snippyly-user-marker","active"),t.setAttribute("data-name",e?.name+""),t.style.setProperty("--velt-selection-marker-color",e?.color||"#000");let r=document.createElement("span");r.classList.add("snippyly-user-marker-line");let a=document.createElement("span");return a.classList.add("snippyly-user-marker-dot"),r.appendChild(a),t.appendChild(r),setTimeout(()=>{t?.classList?.remove("active")},1e3),t}catch(t){return this.loggingService.catch("Error in SelectionService getSelectionUserMarker: ",t),null}}signOutUser(e){return new Promise((t,r)=>{try{this.documentPaths?.selection&&e?this.commonDbService.getData({feature:"selection",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:e.uid,skipFirestore:!0}}).then(a=>{a&&this.commonDbService.deleteData({feature:"selection",errorCallback:s=>{r(s)},callback:()=>{t(null)},properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,userId:this.getUserIdHash(this.user)??"",skipFirestore:!0}}),t(null)}).catch(a=>{this.loggingService.catch("Error in SelectionService signOutUser subscription: ",a),r(a)}):t(null)}catch(a){this.loggingService.catch("Error in SelectionService signOutUser:",a),r(a)}})}enableSelections(e){try{this.enableSelections$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService enableSelections: ",t)}}enableUserIndicator(){try{if(this.userIndicatorEnabled$.value===!0)return;this.userIndicatorEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableUserIndicator: ",e)}}disableUserIndicator(){try{if(this.userIndicatorEnabled$.value===!1)return;this.userIndicatorEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableUserIndicator: ",e)}}getUserIndicatorEnabled$(){return this.userIndicatorEnabled$.asObservable()}getUserIndicatorEnabled(){return this.userIndicatorEnabled$.value}setUserIndicatorPosition(e){try{this.userIndicatorPosition$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService setUserIndicatorPosition: ",t)}}getUserIndicatorPosition$(){return this.userIndicatorPosition$.asObservable()}getUserIndicatorPosition(){return this.userIndicatorPosition$.value}setUserIndicatorType(e){try{this.userIndicatorType$.next(e)}catch(t){this.loggingService.catch("Error in SelectionService setUserIndicatorType: ",t)}}getUserIndicatorType$(){return this.userIndicatorType$.asObservable()}getUserIndicatorType(){return this.userIndicatorType$.value}enableDefaultElementsTracking(){try{if(this.defaultElementsTrackingEnabled$.value===!0)return;this.defaultElementsTrackingEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableDefaultElementsTracking: ",e)}}disableDefaultElementsTracking(){try{if(this.defaultElementsTrackingEnabled$.value===!1)return;this.defaultElementsTrackingEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableDefaultElementsTracking: ",e)}}getDefaultElementsTrackingEnabled$(){return this.defaultElementsTrackingEnabled$.asObservable()}getDefaultElementsTrackingEnabled(){return this.defaultElementsTrackingEnabled$.value}enableDefaultStyling(){try{if(this.defaultStylingEnabled$.value===!0)return;this.defaultStylingEnabled$.next(!0)}catch(e){this.loggingService.catch("Error in SelectionService enableDefaultStyling: ",e)}}disableDefaultStyling(){try{if(this.defaultStylingEnabled$.value===!1)return;this.defaultStylingEnabled$.next(!1)}catch(e){this.loggingService.catch("Error in SelectionService disableDefaultStyling: ",e)}}getDefaultStylingEnabled$(){return this.defaultStylingEnabled$.asObservable()}getDefaultStylingEnabled(){return this.defaultStylingEnabled$.value}getSelectionEnabledElement(e){try{let t=this.getDefaultElementsTrackingEnabled();return t&&j.SELECTION_ENABLED_ELEMENTS[e.tagName?.toLowerCase()]?e:Nj(e,t)}catch(t){return this.loggingService.catch("Error in SelectionService isElementAllowed: ",t),null}}setElementHighlight(e){try{if(!this.elementSelections[e.targetElement])this.setSelectionElement(e);else{let t=this.elementSelections[e.targetElement].portalRef;this.elementSelections[e.targetElement].selections?.find(a=>this.getUserIdHash(a.user)===this.getUserIdHash(e?.user))||(t.instance.addSelection(e),this.elementSelections[e.targetElement].selections.push(e))}}catch(t){this.loggingService.catch("Error in SelectionService setElementSelection: ",t)}}setSelectionElement(e){try{let t=this.domService.getXPath(e.targetElement);if(t){let r=t.iterateNext();if(r){let a=this.domService.getHostElement(r),s=new $o(cde),c=new Ho(a,this.componentFactoryResolver,this.appRef,this.injector),p=c.attach(s);p.instance.highlight=e,p.instance.setSelections([e]),this.elementSelections[e.targetElement]={selectionHostDomPortalOutlet:c,selectionElementPortal:s,portalRef:p,selections:[JSON.parse(JSON.stringify(e))],userTargetElement:r,selectionHostElement:a,targetElement:e.targetElement},this.updateElementOffset(e)}}}catch(t){this.loggingService.catch("Error in SelectionService setSelectionElement: ",t)}}updateElementOffset(e){try{let{portalRef:t,userTargetElement:r,selectionHostElement:a}=this.elementSelections[e.targetElement],s=this.domService.getElementOffset(r,a);t.instance.offsetLeft=s.offsetLeft,t.instance.offsetTop=s.offsetTop}catch(t){this.loggingService.catch("Error in SelectionService updateElementOffset: ",t)}}checkElementHighlightsToRemove(e){try{let t=e.map(r=>r.targetElement);Object.keys(this.elementSelections).forEach(r=>{if(!t.includes(r)){let a=this.elementSelections[r];a&&(a.selectionHostDomPortalOutlet.detach(),this.domService.removeHighlightFromElement(a.selectionHostElement)),delete this.elementSelections[r]}})}catch(t){this.loggingService.catch("Error in SelectionService checkElementHighlightsToRemove: ",t)}}removeSelectionElement(e){try{let t=this.elementSelections[e.targetElement];t&&(t.selectionHostDomPortalOutlet.detach(),this.domService.removeHighlightFromElement(t.selectionHostElement)),delete this.elementSelections[e.targetElement]}catch(t){this.loggingService.catch("Error in SelectionService removeSelectionElement: ",t)}}getUserIdHash(e){try{return e?.userId?_t(e?.userId):null}catch(t){return this.loggingService.catch("Error in SelectionService getUserIdHash: ",t),null}}};o.\u0275fac=function(t){return new(t||o)(J(Oi),J(Ve),J(kt),J(Cn),J(ot),J(Be),J(wo),J(Ot),J(yi),J(y),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var u9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: SelectionElement","color: blue;"),this.enableLiveSelection=this._enableLiveSelection,this.disableLiveSelection=this._disableLiveSelection,this.enableUserIndicator=this._enableUserIndicator,this.disableUserIndicator=this._disableUserIndicator,this.setUserIndicatorPosition=this._setUserIndicatorPosition,this.setUserIndicatorType=this._setUserIndicatorType,this.enableDefaultElementsTracking=this._enableDefaultElementsTracking,this.disableDefaultElementsTracking=this._disableDefaultElementsTracking,this.enableDefaultStyling=this._enableDefaultStyling,this.disableDefaultStyling=this._disableDefaultStyling,this.getLiveSelectionData=this._getLiveSelectionData}_enableLiveSelection(){this.getService(y).log("%c[WB] Calling FUNCTION: _enableLiveSelection","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_LIVE_SELECTION_TRIGGERED),this.getService(Fs).enableSelections(!0)}catch(o){this.getService(y).catch("Error in enableLiveSelection: ",o)}}_disableLiveSelection(){this.getService(y).log("%c[WB] Calling FUNCTION: _disableLiveSelection","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_LIVE_SELECTION_TRIGGERED),this.getService(Fs).enableSelections(!1)}catch(o){this.getService(y).catch("Error in disableLiveSelection: ",o)}}_enableUserIndicator(){this.getService(y).log("%c[WB] Calling FUNCTION: enableUserIndicator","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_USER_INDICATOR_TRIGGERED),this.getService(Fs).enableUserIndicator()}catch(o){this.getService(y).catch("Error in _enableUserIndicator: ",o)}}_disableUserIndicator(){this.getService(y).log("%c[WB] Calling FUNCTION: disableUserIndicator","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_USER_INDICATOR_TRIGGERED),this.getService(Fs).disableUserIndicator()}catch(o){this.getService(y).catch("Error in _disableUserIndicator: ",o)}}_setUserIndicatorPosition(o){this.getService(y).log("%c[WB] Calling FUNCTION: setUserIndicatorPosition","color: green;");try{this.trackEvent(Z.Events.Selection.SET_USER_INDICATOR_POSITION_TRIGGERED,{payload:{position:o}}),this.getService(Fs).setUserIndicatorPosition(o)}catch(n){this.getService(y).catch("Error in _setUserIndicatorPosition: ",n)}}_setUserIndicatorType(o){this.getService(y).log("%c[WB] Calling FUNCTION: setUserIndicatorType","color: green;");try{this.trackEvent(Z.Events.Selection.SET_USER_INDICATOR_TYPE_TRIGGERED,{payload:{type:o}}),this.getService(Fs).setUserIndicatorType(o)}catch(n){this.getService(y).catch("Error in _setUserIndicatorType: ",n)}}_enableDefaultElementsTracking(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultElementsTracking","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED),this.getService(Fs).enableDefaultElementsTracking()}catch(o){this.getService(y).catch("Error in _enableDefaultElementsTracking: ",o)}}_disableDefaultElementsTracking(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultElementsTracking","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_DEFAULT_ELEMENTS_TRACKING_TRIGGERED),this.getService(Fs).disableDefaultElementsTracking()}catch(o){this.getService(y).catch("Error in _disableDefaultElementsTracking: ",o)}}_enableDefaultStyling(){this.getService(y).log("%c[WB] Calling FUNCTION: enableDefaultStyling","color: green;");try{this.trackEvent(Z.Events.Selection.ENABLE_DEFAULT_STYLING_TRIGGERED),this.getService(Fs).enableDefaultStyling()}catch(o){this.getService(y).catch("Error in _enableDefaultStyling: ",o)}}_disableDefaultStyling(){this.getService(y).log("%c[WB] Calling FUNCTION: disableDefaultStyling","color: green;");try{this.trackEvent(Z.Events.Selection.DISABLE_DEFAULT_STYLING_TRIGGERED),this.getService(Fs).disableDefaultStyling()}catch(o){this.getService(y).catch("Error in _disableDefaultStyling: ",o)}}_getLiveSelectionData(){this.getService(y).log("%c[WB] Calling FUNCTION: getLiveSelectionData","color: green;");try{return this.trackEvent(Z.Events.Selection.GET_LIVE_SELECTION_DATA_TRIGGERED),this.getService(Fs).getSelectionsOnCurrentDocument()}catch(o){return this.getService(y).catch("Error in _getLiveSelectionData: ",o),se(null)}}};var Ga=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g,C,E,D,L,z,W,ee){this.analyticsService=e,this.configService=t,this.docService=r,this.databaseService=a,this.authService=s,this.domService=c,this.afAuth=p,this.iamService=g,this.avatarService=C,this.contactService=E,this.storageService=D,this.dialog=L,this.loggingService=z,this.notificationService=W,this.commonDbService=ee,this.tagAnnotations$=new ve({}),this.tagAnnotationsByDocumentId$=new ve({}),this.documentPaths=null,this.allowedElementIds$=new ve([]),this.addTagMode$=new ve(!1),this.enableTextTags$=new ve(!1),this.loggingService.log("%c[WB] Creating CLASS: TagService","color: blue;"),this.databaseService.getDb().pipe(Le(me=>!!me),rt(1)).subscribe(me=>{me&&this.getDocumentPaths()},me=>{this.loggingService.catch("Error in TagService getDb subscription: ",me)}),this.domService.onWindowPointerMove$().subscribe(me=>{if(this.addTagMode$.value){this.hightlightElement&&this.domService.removeHighlightFromElement(this.hightlightElement);let Ce=this.domService.getBackgroundElement(me.clientX,me.clientY);Ce&&(this.isElementInsideAllowedElements(Ce)?XP(me.target)?this.domService.removeClassFromElement(document.body,"show-pin-cursor"):(this.domService.addClassToElement(document.body,"show-pin-cursor"),this.hightlightElement=Ce,this.domService.highlightElement(this.hightlightElement,j.CURSOR.TAG_PIN)):this.domService.removeClassFromElement(document.body,"show-pin-cursor"))}},me=>{this.loggingService.catch("Error in TagService onWindowPointerMove$ subscription: ",me)}),this.domService.onWindowKeyupEsc$().subscribe(me=>{this.addTagMode$.value&&this.disableAddTagMode()},me=>{this.loggingService.catch("Error in TagService onWindowKeyupEsc$ subscription: ",me)}),this.domService.onDocumentClick$().subscribe(me=>{if(me&&this.addTagMode$.value){if(me.preventDefault(),me.stopPropagation(),!XP(me.target)){let Ce=this.domService.getBackgroundElement(me.clientX,me.clientY);Ce&&this.isElementInsideAllowedElements(Ce)&&this.addTag(me)}this.disableAddTagMode()}},me=>{this.loggingService.catch("Error in TagService onDocumentClick$ subscription: ",me)}),this.addTagMode$.subscribe(me=>{this.hightlightElement&&this.domService.removeHighlightFromElement(this.hightlightElement),me?this.domService.addClassToElement(document.body,"snippyly-add-tag-mode"):(this.domService.removeClassFromElement(document.body,"snippyly-add-tag-mode"),this.domService.removeClassFromElement(document.body,"show-pin-cursor"))},me=>{this.loggingService.catch("Error in TagService addTagMode$ subscription: ",me)}),this.domService.onWindowKeyupBackspace$().subscribe(me=>{this.deleteTagPinAnnotations("keyupBackspace")},me=>{this.loggingService.catch("Error in TagService onWindowKeyupBackspace$ subscription: ",me)}),this.domService.onWindowKeyupDelete$().subscribe(me=>{this.deleteTagPinAnnotations("keyupDelete")},me=>{this.loggingService.catch("Error in TagService onWindowKeyupDelete$ subscription: ",me)}),this.domService.getDeleteCommmentAnnotations$().subscribe(me=>{me?.length&&(me?.filter(Ae=>Ae.type==="tag")).forEach(Ae=>Q(this,null,function*(){yield this.deleteTagPinAnnotation(Ae)}))},me=>{this.loggingService.catch("Error in TagService onWindowKeyupDelete$ subscription: ",me)})}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;"),this.docService.getDocumentPaths$()}getAnonymousAvatarImage(){return this.loggingService.log("%c[WB] Calling FUNCTION: getAnonymousAvatarImage","color: green;"),this.avatarService.generateUserImage()}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}getAllTagAnnotations(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: getAllTagAnnotations","color: green;");let a,s;try{if(e&&(s=Tn(e)),t&&typeof t=="object"){let c=Yo(t);a=Tn(JSON.stringify(c))}}catch(c){this.loggingService.catch("Error in TagService getAllTagAnnotations: ",c)}return ei(this.afAuth).pipe(Le(c=>!!c),he(c=>this.isFeatureAllowed({firebaseUser:c,annotations:[],filteredAnnotations:[]})),he(c=>c.featureAllowed?this.iamService.isUserAllowed$().pipe(ce(p=>(c.featureAllowed=p,c))):se(c)),he(c=>c.featureAllowed?this.authService.isPlanExpired$().pipe(ce(p=>(c.featureAllowed=!p,c))):se(c)),he(c=>c.featureAllowed?se(c).pipe(he(p=>this.docService.getDocumentPaths$().pipe(ce(g=>(this.documentPaths=g,p.documentPaths=g,p)))),he(p=>this.getDataFromDocumentId(s).pipe(ce(g=>(p.annotations=g||[],I({},p))))),he(p=>this.docService.getLocation$().pipe(ce(g=>(p.location=g,p)))),he(p=>this.docService.getLocations$().pipe(ce(g=>(p.customLocations=g,p)))),ce(p=>{if(p.filteredAnnotations=[],s&&!a)return p.filteredAnnotations=p.annotations?.slice(),p;{let g=[];return a?g.push(a):(g.push(p?.location?.locationId),g.push(...Object.values(p?.customLocations||[]).map(C=>C.locationId))),p.filteredAnnotations=this.filterAnnotationsByLocationIds(p?.annotations,g),p}}),he(p=>r?se(p):p?.annotations?.length?this.domService.onWindowResize$().pipe(ce(()=>p)):se(p)),he(p=>r?se(p):p?.annotations?.length?this.domService.onDomChange$("TagService getAllTagAnnotations").pipe(ce(()=>p)):se(p)),ce(p=>(p?.filteredAnnotations?.forEach(g=>{this.calculateTagAnnotationPosition(g)}),p)),he(p=>p?.filteredAnnotations?se(p?.filteredAnnotations||[]):se([]))):se([])))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(Le(t=>!!t),ce(t=>T(I({},e),{config:t})),he(t=>this.authService.getUser$().pipe(ce(r=>T(I({},t),{user:r})))),he(t=>ao(t.config,t.user,Re.TAG)?se(T(I({},t),{featureAllowed:!0})):(this.loggingService.warn("Tag feature is not allowed."),se(T(I({},t),{featureAllowed:!1})))))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(Le(t=>!!t),he(t=>this.configService?.getApiKey()&&this.documentPaths?.tag?this.commonDbService.dbListener({feature:"allTags",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0}}).pipe(ce(r=>r?.data),ce(r=>{let a=[];return r&&(a=Object.values(r).filter(s=>typeof s=="object")),this.setTagAnnotationsByDocumentId(e||this.documentPaths?.documentId,a),a})):se([])))}setTagAnnotationsByDocumentId(e,t){try{e&&this.tagAnnotationsByDocumentId$.next(T(I({},this.tagAnnotationsByDocumentId$.value),{[e]:t}))}catch(r){this.loggingService.catch("Error in TagService setTagAnnotationsByDocumentId:",r)}}filterAnnotationsByLocationIds(e,t){try{return e.filter(r=>t.includes(r.locationId))}catch(r){return this.loggingService.catch("Error in TagService filterAnnotationsByLocations:",r),[]}}calculateTagAnnotationPosition(e){try{if(e.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r&&Ao(r)){let a=r.getBoundingClientRect();if(a&&a.width&&a.height){let{height:s,width:c}=Qp(r);e.position={top:s*e.targetElement.topPercentage/100,left:c*e.targetElement.leftPercentage/100}}else e.position=null}else e.position=null}else e.position=null}}catch(t){this.loggingService.catch("Error in TagService calculateTagAnnotationPosition:",t)}}filterPinAnnotations(e,t,r){this.loggingService.log("%c[WB] Calling FUNCTION: filterPinAnnotations","color: green;");try{let a=e?Object.values(e):[];a.forEach((c,p)=>{c?.annotationId&&(c.annotationIndex=p+1)});let s=[];if(t)r?s=a.filter(c=>c.locationId===r):s=a.slice();else{let c=this.docService.getLocation();c&&c.locationId?s=a.filter(p=>p.locationId===c.locationId):s=a.filter(p=>!p.locationId)}return s}catch(a){return this.loggingService.catch("Error in TagService filterPinAnnotations:",a),[]}}addTag(e,t){this.loggingService.log("%c[WB] Calling FUNCTION: addTag","color: green;");try{let r=this.authService.getUser();if(r)if(r.isReadOnly||r.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add tags.");else{let a=new Db;a.from=r,a.color=j.DEFAULT_ANNOTATION_COLOR,a.resolved=!1,a.lastUpdated=this.timestamp;let{topPositionX:s,topPositionY:c}=this.domService.getTopLeftPosition();a.positionX=s,a.positionY=c;let p=this.domService.getCurrentWindowSizeValue();if(a.screenWidth=p.screenWidth,a.screenHeight=p.screenHeight,a.screenScrollHeight=p.screenScrollHeight,a.taggedElementPath="",e&&(a.targetElement=this.domService.getTargetElementForCursorPosition(e)),t&&(a.targetTextRange=t),a?.targetElement?.xpath){let g=this.domService.getXPath(a.targetElement.xpath);if(g){let C=g.iterateNext();C&&(Ao(C)||(a.targetElement=null))}}this.setLocationToTagAnnotation(a),a.pageInfo=Pi(),a.pageInfo&&(a.pageInfo.screenWidth=this.domService.getCurrentWindowSizeValue()?.screenWidth),this.saveTagToDb(a)}}catch(r){this.loggingService.catch("Error in TagService addTag: ",r)}}setLocationToTagAnnotation(e){try{let t=this.docService.getLocation();t?(e.locationId=t.locationId,e.location=t.location):(delete e.locationId,delete e.location);try{let r;e.targetElement?.xpath?r=this.domService.getElementFromXPath(e.targetElement.xpath):e.targetTextRange?.commonAncestorContainer&&(r=this.domService.getElementFromXPath(e.targetTextRange.commonAncestorContainer));let a=this.docService.getAdditionLocationFromElement(r);if(a){let s=this.docService.addLocation({location:a,source:"internal"});s?.[0]&&(e.locationId=s[0].locationId,e.location=s[0].location)}}catch{}}catch(t){this.loggingService.catch("Error in TagService setLocationToTagAnnotation:",t)}}saveTagToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: saveTagToDb","color: green;");try{this.authService.getUser()&&this.authService.isFeatureAllowed(Re.TAG)&&this.docService.getDocumentPaths$().pipe(Le(t=>!!t),rt(1),he(t=>(this.documentPaths=t,this.loggingService.log(this.documentPaths),this.databaseService.getDb().pipe(Le(r=>!!r),rt(1),he(r=>{if(this.documentPaths?.tag){e.annotationId=this.commonDbService.generateDocumentId(),e.pageInfo&&(e.pageInfo.tagUrl=this.generateTagUrl(e));let a=JSON.parse(JSON.stringify(e));return a.position=null,this.domService.toggleAnnotationSelection(a),e.targetTextRange&&sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId),this.analyticsService.trackEvent(Z.Events.Tag.TAG_DRAFT_ADDED,{annotationId:e.annotationId}),this.commonDbService.setData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0},data:a})}else return se(null)}))))).subscribe(()=>{},t=>{this.loggingService.catch("Error in TagService saveTagToDb subscription: ",t)})}catch(t){this.loggingService.catch("Error in TagService saveTagToDb: ",t)}}updateTag(e,t=!1,r){try{r&&this.setLocationToTagAnnotation(e),t&&this.updateNotificationsDatabase(e,GS.UPDATED),this.updateTagToDb(e)}catch(a){this.loggingService.catch("Error in TagService updateTag: ",a)}}resolveTag(e){try{e.resolved=!0,this.domService.resetSelectedAnnotationsMap(!1),this.updateNotificationsDatabase(e,GS.RESOLVED),this.updateTagToDb(e),this.domService.updateSelectedAnnotationInMap([e]),this.analyticsService.trackEvent(Z.Events.Tag.TAG_RESOLVED,{annotationId:e.annotationId})}catch(t){this.loggingService.catch("Error in TagService resolveTag: ",t)}}updateTagToDb(e){this.loggingService.log("%c[WB] Calling FUNCTION: updateTagToDb","color: green;");try{if(e?.targetElement?.xpath){let t=this.domService.getXPath(e.targetElement.xpath);if(t){let r=t.iterateNext();r&&(Ao(r)||(e.targetElement=null))}}this.domService.updateSelectedAnnotationInMap([e]),this.authService.getUser()&&this.authService.isFeatureAllowed(Re.TAG)&&this.docService.getDocumentPaths$().pipe(Le(t=>!!t),rt(1),he(t=>(this.documentPaths=t,this.loggingService.log(this.documentPaths),this.databaseService.getDb().pipe(Le(r=>!!r),rt(1),he(r=>{if(this.documentPaths?.tag&&e?.annotationId){let a=JSON.parse(JSON.stringify(e));return a.position=null,this.commonDbService.setData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0},data:a})}else return se(null)}))))).subscribe(()=>{},t=>{this.loggingService.catch("Error in TagService updateTagToDb subscription: ",t)})}catch(t){this.loggingService.catch("Error in TagService updateTagToDb: ",t)}}deleteTagPinAnnotations(e){try{let t=this.domService.getSelectedAnnotationsMap(),r=this.authService.getUser(),a=[];Object.keys(t).forEach(s=>Q(this,null,function*(){let c=t[s];c.type==="tag"&&r&&c.from&&(r?.isAdmin||c.from.userId===r.userId)&&a.push(c)})),a?.length&&(this.analyticsService.trackEvent(Z.Events.Tag.TAG_DELETE_TRIGGERED,{triggerType:e,annotationId:a.map(s=>s.annotationId).join()}),this.dialog.open(Sa,{panelClass:"velt-mat-dialog-container",data:{title:"Delete tag?",message:"This selected tag will be deleted.",yesButton:"Delete",noButton:"Cancel",variant:"tag"}}).afterClosed().pipe(rt(1)).subscribe(s=>{s&&(a.forEach(c=>Q(this,null,function*(){yield this.deleteTagPinAnnotation(c)})),setTimeout(()=>{document.querySelectorAll(`[${j.SNIPPYLY_HIGHLIGHT}]`).forEach(p=>{this.domService.removeHighlightFromElement(p)})},100))})),this.domService.resetSelectedAnnotationsMap(!0,"tag")}catch(t){this.loggingService.catch("Error in TagService deleteTagPinAnnotations: ",t)}}deleteTagPinAnnotation(e){return this.authService.isFeatureAllowed(Re.TAG)&&this.documentPaths?.tag&&e?.annotationId?(this.updateNotificationsDatabase(e,GS.DELETED),this.analyticsService.trackEvent(Z.Events.Tag.TAG_DELETED,{annotationId:e.annotationId}),this.commonDbService.deleteData({feature:"tag",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.annotationId,skipFirestore:!0}})):Promise.resolve()}enableAddTagMode(){this.authService.isFeatureAllowed(Re.TAG)?(this.analyticsService.trackEvent(Z.Events.Tag.TAG_ADD_MODE_ENABLED),this.addTagMode$.next(!0)):this.loggingService.catch("Error in TagService enableAddTagMode: ","Tag feature is not enabled.")}disableAddTagMode(){this.analyticsService.trackEvent(Z.Events.Tag.TAG_ADD_MODE_DISABLED),this.addTagMode$.next(!1)}addTagModeChange(){return this.addTagMode$.asObservable()}enableTextTags(e){this.enableTextTags$.next(e)}getEnableTextTags$(){return this.enableTextTags$.asObservable()}get timestamp(){return this.commonDbService.getServerTimestamp()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in TagService isElementInsideAllowedElements: ",t),!1}}attachTag(e,t=[]){let r=oa(e,t);if(r){let a=this.domService.getXPath(r),s=this.getTagPinAnnotationObject();s&&(s.targetElement={xpath:a,topPercentage:50,leftPercentage:90},this.saveTagToDb(s))}}getTagPinAnnotationObject(){let e=this.authService.getUser();if(e)if(e.isReadOnly||e.isAnonymous)this.loggingService.catch("Anonymous/Readonly users cannot add tags.");else{let t=new Db;t.from=e,t.color=j.DEFAULT_ANNOTATION_COLOR,t.resolved=!1,t.lastUpdated=this.timestamp;let{topPositionX:r,topPositionY:a}=this.domService.getTopLeftPosition();t.positionX=r,t.positionY=a;let s=this.domService.getCurrentWindowSizeValue();t.screenWidth=s.screenWidth,t.screenHeight=s.screenHeight,t.screenScrollHeight=s.screenScrollHeight,t.taggedElementPath="";let c=this.docService.getLocation();return c&&(t.locationId=c.locationId,t.location=c.location),t}return null}updateNotificationsDatabase(e,t){try{let r={annotationData:e,actionType:t,notificationSource:"tag"};this.notificationService.updateNotificationDatabase(r)}catch(r){this.loggingService.catch("Error in TagService updateNotificationsDatabase: ",r)}}getUserContacts$(){return this.contactService.getUserContacts$()}addUserContact(e){this.contactService.addUserContact(e)}getTagUrl(e){try{return e?.pageInfo?.tagUrl?e.pageInfo.tagUrl:(e?.pageInfo||(e.pageInfo=Pi(),e.pageInfo&&(e.pageInfo.screenWidth=this.domService.getCurrentWindowSizeValue()?.screenWidth)),e.pageInfo.tagUrl=this.generateTagUrl(e),this.updateTag(e),e.pageInfo?.tagUrl)}catch(t){this.loggingService.catch("Error in TagService getTagUrl: ",t);return}}uploadFile(e,t){let r=`${j.FIREBASE_PARTIAL_PATH_DOCS}/${this.documentPaths?.documentId}/${j.FIREBASE_PARTIAL_PATH_TAG}/${t.annotationId}`;return this.documentPaths?.organizationId&&(r=`${j.FIREBASE_PARTIAL_PATH_ORGANIZATIONS}/${this.documentPaths.organizationId}/${j.FIREBASE_PARTIAL_PATH_DOCS}/${this.documentPaths?.documentId}/${j.FIREBASE_PARTIAL_PATH_TAG}/${t.annotationId}`),this.storageService.uploadFile({path:r,file:e})}downloadAttachment(e){this.storageService.downloadAttachment(e)}deleteAttachment(e){return this.storageService.deleteAttachment({attachment:e})}generateTagUrl(e){let t=new URL(window.location.href);return t.searchParams.delete(j.URL_PARAMS.TAG_ID),t.searchParams.append(j.URL_PARAMS.TAG_ID,e.annotationId),t.href}};o.\u0275fac=function(t){return new(t||o)(J(et),J(kt),J(ot),J(Cn),J(Ve),J(Be),J(Oi),J(_n),J(jd),J(Di),J(pg),J(io),J(y),J(gn),J(dn))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var h9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: TagElement","color: blue;"),this.getAllTagAnnotations=this._getAllTagAnnotations,this.deleteTag=this._deleteTag,this.allowedElementIds=this._allowedElementIds,this.attachTag=this._attachTag,this.addTagModeChange=this._addTagModeChange}_getAllTagAnnotations(o,n){this.getService(y).log("%c[WB] Calling FUNCTION: getOnlineUsers","color: green;");try{return this.trackEvent(Z.Events.Tag.GET_ALL_TAG_ANNOTATIONS_TRIGGERED,{payload:{documentId:o,location:n}}),this.getService(Ga).getAllTagAnnotations(o,n)}catch(e){return this.getService(y).catch("Error in _getLiveTagsOnCurrentDocument: ",e),se(null)}}_deleteTag(){this.getService(y).log("%c[WB] Calling FUNCTION: deleteTag","color: green;");try{this.trackEvent(Z.Events.Tag.DELETE_TAG_TRIGGERED),this.getService(Ga).deleteTagPinAnnotations("tagElement")}catch(o){this.getService(y).catch("Error in _deleteTag: ",o)}}_allowedElementIds(o){this.getService(y).log("%c[WB] Calling FUNCTION: allowedElementIds","color: green;");try{this.trackEvent(Z.Events.Tag.ALLOWED_ELEMENT_IDS_TRIGGERED,{payload:{elementIds:o}}),this.getService(Ga).setAllowedElementIds(o)}catch(n){this.getService(y).catch("Error in allowedElementIds: ",n)}}_attachTag(o){this.getService(y).log("%c[WB] Calling FUNCTION: attachTag","color: green;");try{this.trackEvent(Z.Events.Tag.ATTACH_TAG_TRIGGERED,{payload:{elementId:o}}),this.getService(Ga).attachTag(o,["id","data-id"])}catch(n){this.getService(y).catch("Error in _attachTag: ",n)}}_addTagModeChange(){this.getService(y).log("%c[WB] Calling FUNCTION: addTagModeChange","color: green;");try{return this.trackEvent(Z.Events.Tag.ADD_TAG_MODE_CHANGE_TRIGGERED),this.getService(Ga).addTagModeChange()}catch(o){return this.getService(y).catch("Error in _addTagModeChange: ",o),se(!1)}}};var f9=class extends si{constructor(o){super(o),this.getService(y).log("%c[WB] Creating CLASS: ViewsElement","color: blue;"),this.getUniqueViewsByUser=this._getUniqueViewsByUser,this.getUniqueViewsByDate=this._getUniqueViewsByDate}_getUniqueViewsByUser(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getUniqueViewsByUser","color: green;");try{return this.trackEvent(Z.Events.Views.GET_UNIQUE_VIEWS_BY_USER_TRIGGERED,{payload:{clientLocationId:o}}),this.getService(gs).getUniqueViewsByUser(o)}catch(n){return this.getService(y).catch("Error in getUniqueViewsByUser: ",n),se({})}}_getUniqueViewsByDate(o){this.getService(y).log("%c[WB] Calling FUNCTION: _getUniqueViewsByDate","color: green;");try{return this.trackEvent(Z.Events.Views.GET_UNIQUE_VIEWS_BY_DATE_TRIGGERED,{payload:{clientLocationId:o}}),this.getService(gs).getUniqueViewsByDate(o)}catch(n){return this.getService(y).catch("Error in getUniqueViewsByDate: ",n),se({})}}};var Bb=(()=>{let o=class o{constructor(e,t){this.docService=e,this.loggingService=t}updateDocuments(e){return Q(this,null,function*(){try{return yield this.docService.updateDocuments(e)}catch(t){return this.loggingService.catch("Error in DocActionsService updateDocuments: ",t),null}})}updateLocations(e){return Q(this,null,function*(){try{return yield this.docService.updateLocations(e)}catch(t){return this.loggingService.catch("Error in DocActionsService updateLocations: ",t),null}})}fetchDocuments(e){return Q(this,null,function*(){try{let t=yield this.docService.fetchDocuments(e),r=[];return t.forEach(a=>{let s=a?.docIamConfig??{},c=a?.metadata??{};c.disabled=!!s?.disabled,c.id=c?.clientDocumentId,c.documentId=c?.clientDocumentId,delete c?.clientDocumentId,c.organizationId=c?.clientOrganizationId,delete c?.clientOrganizationId,delete c?.pageInfo,delete c?.veltFolderId,r.push(c)}),{data:r.reduce((a,s)=>(s?.documentId&&(a[s.documentId]=s),a),{})}}catch(t){return this.loggingService.catch("Error in CommentActionsService fetchDocuments: ",t),{data:null}}})}fetchFolders(e){return Q(this,null,function*(){try{let t=yield this.docService.fetchFolders(e),r=t?.parentFolders?.map(s=>{let c=s?.metadata??{};return delete c?.veltFolderId,c.organizationId=c.clientOrganizationId,delete c?.clientOrganizationId,delete c?.veltParentFolderId,I({},c)});return{data:(t?.data?.map(s=>{let c=s?.metadata??{};return delete c?.veltFolderId,c.organizationId=c.clientOrganizationId,delete c?.clientOrganizationId,delete c?.veltParentFolderId,I(I({},c),e?.folderId?{subFolders:r}:{})})).reduce((s,c)=>(c?.folderId&&(s[c.folderId]=c),s),{})}}catch(t){return this.loggingService.catch("Error in CommentActionsService fetchFolders: ",t),{data:null}}})}};o.\u0275fac=function(t){return new(t||o)(J(ot),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var v9=(()=>{let o=class o{constructor(e,t,r,a,s){this.authService=e,this.coreActionsService=t,this.docService=r,this.iamService=a,this.loggingService=s,this.veltInitState$=new ve(void 0);try{this.loggingService.log("%c[WB] Creating CLASS: VeltService","color: blue;");let c=this.authService.getUser$(),p=this.docService.getDocumentPaths$(),g=this.iamService.isUserAllowed$();fn([c,p,g]).subscribe(([C,E,D])=>{C&&E&&D?this.veltInitState$.next(!0):this.veltInitState$.next(!1)}),this.getVeltInitState$().subscribe(C=>{this.coreActionsService.triggerAction(Hi.DOCUMENT_INIT,C)})}catch(c){this.loggingService.catch("Error in VeltService constructor: ",c)}}getVeltInitState$(){try{return this.veltInitState$.asObservable().pipe(Ct())}catch(e){return this.loggingService.catch("Error in VeltService getVeltInitState$: ",e),se(void 0)}}};o.\u0275fac=function(t){return new(t||o)(J(Ve),J($d),J(ot),J(_n),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var C9=class{constructor(o){this.injector=o,this.initConfig=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: initConfig","color: green;");try{n?typeof n!="string"?this.getService(y).catch("Error in initConfig: ","Apikey must be string."):n?.trim()?this.getService(Ve).setApiKey(n?.trim(),e):this.getService(y).catch("Error in initConfig: ","Apikey is not provided."):this.getService(y).catch("Error in initConfig: ","Apikey is not provided.")}catch(t){this.getService(y).catch("Error in initConfig: ",t)}},this.identify=(n,e,t)=>(this.getService(y).log("%c[WB] Calling FUNCTION: identify","color: green;"),new Promise((r,a)=>{try{typeof n=="object"&&(n=JSON.parse(JSON.stringify(n)));let s=this.getService(kt).getApiKey(),c=Pv(s,n.userId);if(t?.ha||this.getService(et).trackEvent(Z.Events.Core.IDENTIFY,{apiKey:s,clientUserId:n.userId,snippylyUserId:c,forceReset:e?.forceReset,user:this.getService(Ve).getUserWithoutContacts(n),source:"client",fromProvider:t?.fromProvider},!0,c,n?.userId),!(n&&n.userId))this.getService(y).catch("Error in identify: ","Missing userId in config data."),r(null);else if(typeof n.userId!="string")this.getService(y).catch("Error in identify: ","userId must be string."),r(null);else if(n?.groupId&&typeof n?.groupId!="string")this.getService(y).catch("Error in identify: ","groupId must be string."),r(null);else{if(n?.groupId)if(n?.groupId?.match(/^[a-zA-Z0-9_]*$/))n.clientGroupId=n.groupId;else{let g=n.groupId;n.clientGroupId=g,n.groupId=_t(g)}if(n?.organizationId){let g=n.organizationId;n.clientOrganizationId=g,n.organizationId=_t(g)}delete n.isAdmin;let p=j.REGEX_URL_FOR_USER_NAME;n?.name&&p.test(n?.name)&&(n.name=n.name?.split(".")?.slice(0,-1)?.join(".")),n.clientUserName=n.name,n?.name&&n?.name?.length>30&&(n.name=n.name.slice(0,30)),this.getService(Ve).initializeClient(n,e||{},new Date().getTime(),void 0,"external").then(g=>{let C;try{g&&(C=JSON.parse(JSON.stringify(g)))}catch{}r(C)}).catch(g=>{this.getService(y).catch("Error in identify: ",g),r(null)})}}catch(s){this.getService(y).catch("Error in identify: ",s),r(null)}})),this.updateUser=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateUser","color: green;");try{if(this.getService(y).catch("DEPRECATED: ","'updateUser' method is deprecated."),n&&typeof n=="object"){if(n=JSON.parse(JSON.stringify(n)),n?.groupId)if(n?.groupId?.match(/^[a-zA-Z0-9_]*$/))n.clientGroupId=n.groupId;else{let e=n.groupId;n.clientGroupId=e,n.groupId=_t(e)}delete n.isAdmin,this.getService(Ve).updateUser(n)}else this.getService(y).catch("Error in updateUser: ","Invalid user object provided.")}catch(e){this.getService(y).catch("Error in updateUser: ",e)}},this.signOutUser=n=>(this.getService(y).log("%c[WB] Calling FUNCTION: signOutUser","color: green;"),n?.ha||this.trackEvent(Z.Events.Core.SIGN_OUT_USER_TRIGGERED),new Promise((e,t)=>Q(this,null,function*(){try{yield this.getService(Ve).signOutUser("external"),e(null)}catch(r){this.getService(y).catch("Error in signOutUser: ",r),e(null)}}))),this.setDocument=(n,e,t,r)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocument","color: green;");try{r?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{id:n,documentMetadata:e,methodName:"setDocument",source:"external"}}),n&&n.trim()?(e&&(typeof e=="object"?e=JSON.parse(JSON.stringify(e)):this.getService(y).catch("Error in setDocument: ","Invalid documentMetadata provided.")),yield this.getService(ot).setDocument({documentId:n,documentMetadata:e,options:t,source:"external"})):this.getService(y).catch("Error in setDocument: ","Invalid document id provided.")}catch(a){this.getService(y).catch("Error in setDocument: ",a)}}),this.setDocumentId=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocumentId","color: green;");try{if(t?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{id:n,organizationId:e,methodName:"setDocumentId",source:"external"}}),n&&n.trim())return yield this.getService(ot).setDocumentId({documentId:n,clientOrganizationId:e,source:"external"});this.getService(y).catch("Error in setDocumentId: ","Invalid document id provided.")}catch(r){this.getService(y).catch("Error in setDocumentId: ",r)}}),this.setDocuments=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setDocuments","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_DOCUMENTS_TRIGGERED,{payload:{documents:n,options:e,methodName:"setDocuments",source:"external"}}),typeof n=="object"&&n instanceof Array?(n=JSON.parse(JSON.stringify(n)),n=n.filter(r=>typeof r=="object"&&r!==null&&r.id?.trim()),n.length?yield this.getService(ot).setDocuments({documents:n,options:e,source:"external"}):this.getService(y).catch("Error in setDocuments: ","Invalid documents provided.")):this.getService(y).catch("Error in setDocuments: ","Invalid documents provided.")}catch(r){this.getService(y).catch("Error in setDocuments: ",r)}}),this.setRootDocument=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setRootDocument","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ROOT_DOCUMENT_TRIGGERED,{payload:{document:n,methodName:"setRootDocument",source:"external"}}),typeof n=="object"?(n=JSON.parse(JSON.stringify(n)),n.id?yield this.getService(ot).setRootDocument({document:n,source:"external"}):this.getService(y).catch("Error in setRootDocument: ","Invalid document provided.")):this.getService(y).catch("Error in setRootDocument: ","Invalid document provided.")}catch(t){this.getService(y).catch("Error in setRootDocument: ",t)}}),this.unsetDocumentId=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetDocumentId","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.UNSET_DOCUMENTS_TRIGGERED,{payload:{methodName:"unsetDocumentId",source:"external"}}),this.getService(ot).unsetDocumentId({source:"external"})}catch(e){this.getService(y).catch("Error in unsetDocumentId: ",e)}},this.unsetDocuments=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetDocuments","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.UNSET_DOCUMENTS_TRIGGERED,{payload:{methodName:"unsetDocuments",source:"external"}}),this.getService(ot).unsetDocuments({source:"external"})}catch(e){this.getService(y).catch("Error in unsetDocuments: ",e)}},this.fetchDocuments=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: fetchDocuments","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.FETCH_DOCUMENTS_TRIGGERED,{payload:{options:n}}),this.getService(Bb).fetchDocuments(n)}catch(t){return this.getService(y).catch("Error in fetchDocuments: ",t),Promise.resolve({data:null})}},this.updateDocuments=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateDocuments","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.UPDATE_DOCUMENTS_TRIGGERED,{payload:{request:n}}),this.getService(Bb).updateDocuments(n)}catch(t){return this.getService(y).catch("Error in updateDocuments: ",t),Promise.resolve({data:null})}},this.updateLocations=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateLocations","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.UPDATE_LOCATIONS_TRIGGERED,{payload:{request:n}}),this.getService(Bb).updateLocations(n)}catch(t){return this.getService(y).catch("Error in updateLocations: ",t),Promise.resolve({data:null})}},this.fetchFolders=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: fetchFolders","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.FETCH_FOLDERS_TRIGGERED,{payload:{options:n}}),this.getService(Bb).fetchFolders(n)}catch(t){return this.getService(y).catch("Error in fetchFolders: ",t),Promise.resolve({data:null})}},this.setUserDataProvider=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setUserDataProvider","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_USER_DATA_PROVIDER_TRIGGERED),this.getService(Mn).setUserDataProvider(n)}catch(t){this.getService(y).catch("Error in setUserDataProvider: ",t)}},this.setDataProviders=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setDataProviders","color: green;");try{if(e?.ha||this.trackEvent(Z.Events.Core.SET_DATA_PROVIDERS_TRIGGERED),n.comment&&this.getService(Ns).setCommentAnnotationDataProvider(n.comment),n.user&&this.getService(Mn).setUserDataProvider(n.user),n.reaction&&this.getService(zd).setReactionAnnotationDataProvider(n.reaction),n.attachment)if(n.comment)this.getService(mg).setAttachmentDataProvider(n.attachment);else throw new Error("Comment data provider is required for attachment data provider")}catch(t){this.getService(y).catch("Error in setDataProviders: ",t)}},this.setEncryptionProvider=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setEncryptionProvider","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ENCRYPTION_PROVIDER_TRIGGERED),this.getService(kt).setEncryptionProvider(n)}catch(t){this.getService(y).catch("Error in setEncryptionProvider: ",t)}},this.setVeltAuthProvider=n=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setVeltAuthProvider","color: green;");try{return yield this.getService(Ve).setVeltAuthProvider(n)}catch(e){return this.getService(y).catch("Error in setVeltAuthProvider: ",e),null}}),this.getDocumentId=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getDocumentId","color: green;");try{return n?.ha||this.trackEvent(Z.Events.Core.GET_DOCUMENT_ID_TRIGGERED),this.getService(ot).getDocumentId()}catch(e){this.getService(y).catch("Error in getDocumentId: ",e)}},this.setLocation=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setLocation","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{params:n,appendLocation:e,methodName:"setLocation",source:"external"}}),n&&typeof n=="object"?e?this.getService(ot).addLocation({location:n,source:"external"}):yield this.getService(ot).setLocation({location:n,source:"external"}):this.getService(y).catch("Error in setLocation: ","Invalid location params provided.")}catch(r){this.getService(y).catch("Error in setLocation: ",r)}}),this.setRootLocation=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setRootLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_ROOT_LOCATION_TRIGGERED,{payload:{location:n,methodName:"setRootLocation",source:"external"}}),typeof n=="object"?(n=JSON.parse(JSON.stringify(n)),n.id?yield this.getService(ot).setRootLocation({location:n,source:"external"}):this.getService(y).catch("Error in setRootLocation: ","Invalid location provided.")):this.getService(y).catch("Error in setRootLocation: ","Invalid location provided.")}catch(t){this.getService(y).catch("Error in setRootLocation: ",t)}}),this.setLocations=(n,e,t)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: setLocations","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{locations:n,options:e,methodName:"setLocations",source:"external"}}),n&&Array.isArray(n)?yield this.getService(ot).setLocations({locations:n,options:e,source:"external"}):this.getService(y).catch("Error in setLocations: ","Invalid location params provided.")}catch(r){this.getService(y).catch("Error in setLocations: ",r)}}),this.addLocation=(n,e)=>Q(this,null,function*(){this.getService(y).log("%c[WB] Calling FUNCTION: addLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_LOCATIONS_TRIGGERED,{payload:{params:n,methodName:"addLocation",source:"external"}}),n&&typeof n=="object"?this.getService(ot).addLocation({location:n,source:"external"}):this.getService(y).catch("Error in addLocation: ","Invalid location params provided.")}catch(t){this.getService(y).catch("Error in addLocation: ",t)}}),this.setScrollableElementsIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: setScrollableElementsIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.SET_SCROLLABLE_ELEMENTS_IDS_TRIGGERED,{payload:{ids:n}}),n?this.getService(Be).setScrollableElementsIds(n):this.getService(y).catch("Error in setScrollableElementsIds: ","Invalid ids provided.")}catch(t){this.getService(y).catch("Error in setScrollableElementsIds: ",t)}},this.removeLocation=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeLocation","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.REMOVE_LOCATIONS_TRIGGERED,{payload:{location:n},methodName:"removeLocation",source:"external"}),this.getService(ot).removeLocation({location:n,source:"external"})}catch(t){this.getService(y).catch("Error in removeLocation: ",t)}},this.removeLocations=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeLocations","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.REMOVE_LOCATIONS_TRIGGERED,{payload:{locations:n},methodName:"removeLocations",source:"external"}),this.getService(ot).removeLocations({locations:n,source:"external"})}catch(t){this.getService(y).catch("Error in removeLocations: ",t)}},this.unsetLocationIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: unsetLocationIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.UNSET_LOCATIONS_TRIGGERED,{payload:{locationIds:n},methodName:"unsetLocationIds",source:"external"}),this.getService(ot).unsetLocationIds(n,"external")}catch(t){this.getService(y).catch("Error in unsetLocationIds: ",t)}},this.excludeLocationIds=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: excludeLocationIds","color: green;");try{e?.ha||this.trackEvent(Z.Events.Core.EXCLUDE_LOCATION_IDS_TRIGGERED,{payload:{ids:n}}),typeof n=="object"&&n instanceof Array&&(n=n.filter(t=>typeof t=="string"),this.getService(ot).excludeLocationIds(n))}catch(t){this.getService(y).catch("Error in excludeLocationIds: ",t)}},this.updateContactList=(n,e,t)=>{this.getService(y).log("%c[WB] Calling FUNCTION: updateContactList","color: green;");try{t?.ha||this.trackEvent(Z.Events.Core.UPDATE_CONTACT_LIST_TRIGGERED,{payload:{userContacts:n,config:e}}),typeof n=="object"&&n instanceof Array&&(!e||e&&typeof e=="object")&&(n=JSON.parse(JSON.stringify(n)),this.getService(Di).updateContactList(n,e))}catch(r){this.getService(y).catch("Error in updateContactList: ",r)}},this.removeScrollableElementsIds=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: removeScrollableElementsIds","color: green;");try{n?.ha||this.trackEvent(Z.Events.Core.REMOVE_SCROLLABLE_ELEMENTS_IDS_TRIGGERED),this.getService(Be).removeScrollableElementsIds()}catch(e){this.getService(y).catch("Error in removeScrollableElementsIds: ",e)}},this.getPresenceElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getPresenceElement","color: green;");try{let e=new c9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getPresenceElement: ",e),null}},this.getCursorElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCursorElement","color: green;");try{let e=new i9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCursorElement: ",e),null}},this.getCommentElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCommentElement","color: green;");try{let e=new Kk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCommentElement: ",e),null}},this.getTagElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getTagElement","color: green;");try{let e=new h9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getTagElement: ",e),null}},this.getSelectionElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getSelectionElement","color: green;");try{let e=new u9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getSelectionElement: ",e),null}},this.getRecorderElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getRecorderElement","color: green;");try{let e=new m9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getRecorderElement: ",e),null}},this.getContactElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getContactElement","color: green;");try{let e=new Zk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getContactElement: ",e),null}},this.getRewriterElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getRewriterElement","color: green;");try{let e=new g9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getRewriterElement: ",e),null}},this.getHuddleElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getHuddleElement","color: green;");try{let e=new r9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getHuddleElement: ",e),null}},this.getLiveStateSyncElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getLiveStateSyncElement","color: green;");try{let e=new a9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getLiveStateSyncElement: ",e),null}},this.getArrowElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getArrowElement","color: green;");try{let e=new Wk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getArrowElement: ",e),null}},this.getViewsElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getViewsElement","color: green;");try{let e=new f9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getViewsElement: ",e),null}},this.getNotificationElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getNotificationElement","color: green;");try{let e=new l9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getNotificationElement: ",e),null}},this.getAutocompleteElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getAutocompleteElement","color: green;");try{let e=new Yk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getAutocompleteElement: ",e),null}},this.getDocElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getDocElement","color: green;");try{let e=new o9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getDocElement: ",e),null}},this.getAreaElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getAreaElement","color: green;");try{let e=new zk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getAreaElement: ",e),null}},this.getReactionElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getReactionElement","color: green;");try{let e=new d9(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getReactionElement: ",e),null}},this.getCrdtElement=n=>{this.getService(y).log("%c[WB] Calling FUNCTION: getCrdtElement","color: green;");try{let e=new Xk(this.injector);return n?.ha&&e.ha(n.ha),e}catch(e){return this.getService(y).catch("Error in getCrdtElement: ",e),null}},this.getMetadata=n=>Q(this,null,function*(){try{return n?.ha||this.trackEvent(Z.Events.Core.GET_METADATA_TRIGGERED),this.getService($l).getGlobalMetadata()}catch(e){return this.getService(y).catch("Error in getMetadata: ",e),null}}),this.disableFeatures=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.DISABLE_FEATURES_TRIGGERED,{payload:{features:n}}),this.getService(kt).disableFeatures(n)}catch(t){this.getService(y).catch("Error in disableFeatures: ",t)}},this.setDarkMode=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_DARK_MODE_TRIGGERED,{payload:{value:n}}),this.getService(qe).setDarkMode(n)}catch(t){this.getService(y).catch("Error in setDarkMode: ",t)}},this.enableLogs=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_LOGS_TRIGGERED),this.getService(kt).enableLogs()}catch(e){this.getService(y).catch("Error in enableLogs: ",e)}},this.disableLogs=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.DISABLE_LOGS_TRIGGERED),this.getService(kt).disableLogs(n)}catch(t){this.getService(y).catch("Error in disableLogs: ",t)}},this.isUserAllowed$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.IS_USER_ALLOWED_TRIGGERED),this.getService(_n).isUserAllowed$()}catch(e){return this.getService(y).catch("Error in isUserAllowed$: ",e),se(!1)}},this.getUser=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.GET_USER_TRIGGERED);let e=this.getService(Ve).getUser();if(e&&typeof e=="object"){let t=JSON.parse(JSON.stringify(e));return t?.clientOrganizationId&&(t.organizationId=t.clientOrganizationId,delete t.clientOrganizationId),t?.clientGroupId&&(t.groupId=t.clientGroupId,delete t.clientGroupId),delete t.userSnippylyId,t}else return null}catch(e){return this.getService(y).catch("Error in getUser: ",e),null}},this.getUserRole$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_USER_ROLE_TRIGGERED),this.getService(_n).getRole$()}catch(e){return this.getService(y).catch("Error in getUserRole$: ",e),se("")}},this.getUserPermissions=(n,e)=>Q(this,null,function*(){try{return e?.ha||this.trackEvent(Z.Events.Core.GET_USER_PERMISSIONS_TRIGGERED,{payload:{request:n,source:"external"}}),this.getService(S0).getUserPermissions(n)}catch(t){return this.getService(y).catch("Error in getUserPermissions$: ",t),{}}}),this.getFeaturesAccessLevelIam$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_FEATURES_ACCESS_LEVEL_IAM_TRIGGERED),this.getService(_n).getFeaturesAccessLevel$()}catch(e){return this.getService(y).catch("Error in getFeaturesAccessLevel$: ",e),se(void 0)}},this.isPlanExpired$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.IS_PLAN_EXPIRED_TRIGGERED),this.getService(Ve).isPlanExpired$()}catch(e){return this.getService(y).catch("Error in isPlanExpired$: ",e),se(!1)}},this.getCustomerMetadata$=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_CUSTOMER_METADATA_TRIGGERED),this.getService(ot).getCustomerMetadata$()}catch(e){return this.getService(y).catch("Error in getCustomerMetadata$: ",e),se(null)}},this.getDocumentMetadata=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_DOCUMENT_METADATA_TRIGGERED),this.getService(ot).getDocumentMetadata$()}catch(e){return this.getService(y).catch("Error in getDocumentMetadata: ",e),se(null)}},this.getVeltInitState=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_VELT_INIT_STATE_TRIGGERED),this.getService(v9).getVeltInitState$()}catch(e){return this.getService(y).catch("Error in getVeltInitState: ",e),se(void 0)}},this.removeVeltContent=(n,e)=>{try{return e?.ha||this.trackEvent(Z.Events.Core.REMOVE_VELT_CONTENT_TRIGGERED),this.getService(Be).removeSnippylyContent(n)}catch(t){return this.getService(y).catch("Error in removeVeltContent: ",t),""}},this.injectCustomCss=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.INJECT_CUSTOM_CSS_TRIGGERED),this.getService(y).log("%c[WB] Calling FUNCTION: injectCustomCss","color: green;"),this.getService(Be).setCustomCss(n)}catch(t){this.getService(y).catch("Error in injectCustomCss: ",t)}},this.setLanguage=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_LANGUAGE_TRIGGERED,{payload:{language:n}}),this.getService(gl).setLanguage(n)}catch(t){this.getService(y).catch("Error in setLanguage: ",t)}},this.setTranslations=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_TRANSLATIONS_TRIGGERED,{payload:{translations:n}}),this.getService(gl).setTranslations(n)}catch(t){this.getService(y).catch("Error in setTranslations: ",t)}},this.enableAutoTranslation=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_AUTO_TRANSLATION_TRIGGERED),this.getService(gl).enableAutoTranslation()}catch(e){this.getService(y).catch("Error in enableAutoTranslation: ",e)}},this.disableAutoTranslation=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.DISABLE_AUTO_TRANSLATION_TRIGGERED),this.getService(gl).disableAutoTranslation()}catch(e){this.getService(y).catch("Error in disableAutoTranslation: ",e)}},this.sf=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SF_TRIGGERED,{payload:{value:n}}),n?(document.querySelector(j.TAGS.SNIPPYLY_PLUGIN)||document.querySelector(j.TAGS.SUPERFLOW_TOOLBAR))&&this.getService(kt).setSF(n):this.getService(kt).setSF(n)}catch(t){this.getService(y).catch("Error in sf: ",t)}},this.st=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.ST_TRIGGERED,{payload:{value:n}}),this.getService(kt).setSdkType(n)}catch(t){this.getService(y).catch("Error in st: ",t)}},this.getService=n=>this.injector.get(n),this.on=(n,e)=>{this.getService(y).log("%c[WB] Calling FUNCTION: on","color: green;");try{return e?.ha||this.trackEvent(Z.Events.Core.ON_ACTION_TRIGGERED,{payload:{action:n}}),this.getService($d).onAction(n)}catch(t){return this.getService(y).catch("Error in on: ",t),se(null)}},this.setUiState=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.SET_UI_STATE_TRIGGERED,{payload:{uiState:n}}),this.getService(ot).setUIState(n)}catch(t){this.getService(y).catch("Error in setUiState: ",t)}},this.getUiState=n=>{try{return n?.ha||this.trackEvent(Z.Events.Core.GET_UI_STATE_TRIGGERED),this.getService(ot).getUIState$()}catch(e){return this.getService(y).catch("Error in getUiState: ",e),se({})}},this.enableSafeEval=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.ENABLE_SAFE_EVAL_TRIGGERED),this.getService(kt).enableSafeEval()}catch(e){this.getService(y).catch("Error in enableSafeEval: ",e)}},this.disableSafeEval=n=>{try{n?.ha||this.trackEvent(Z.Events.Core.DISABLE_SAFE_EVAL_TRIGGERED),this.getService(kt).disableSafeEval()}catch(e){this.getService(y).catch("Error in disableSafeEval: ",e)}},this.resetVeltButtonState=(n,e)=>{try{e?.ha||this.trackEvent(Z.Events.Core.RESET_VELT_BUTTON_STATE_TRIGGERED,{payload:{config:n}}),this.getService(I0).resetVeltButtonState(n)}catch(t){this.getService(y).catch("Error in resetVeltButtonState: ",t)}},this.getService(y).log("%c[WB] Creating CLASS: Snippyly","color: blue;")}trackEvent(o,n={},e=!0){try{n||(n={}),n=T(I({},n),{source:"external"}),this.getService(et).trackAuthenticatedEvent(o,n,e)}catch(t){this.getService(y).catch("Error in _trackEvent: ",t);return}}};var dde=(()=>{let o=class o{constructor(){this.veltElement=!0}ngOnInit(){}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=O({type:o,selectors:[["app-external-styles"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:0,vars:0,template:function(t,r){},styles:[`.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%;z-index:1000}.cdk-overlay-backdrop{position:absolute;inset:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0;z-index:1000;transition:opacity .4s cubic-bezier(.25,.8,.25,1)}@media (prefers-reduced-motion){.cdk-overlay-backdrop{transition-duration:1ms}}.cdk-overlay-backdrop-showing{opacity:1}@media (forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px;z-index:1000}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}html{--velt-base-rem-unit: 1}velt-wireframe{display:none!important}:root{--legacy-velt-neutral-0: #000000;--legacy-velt-neutral-1: #141416;--legacy-velt-neutral-2: #23262F;--legacy-velt-neutral-3: #353945;--legacy-velt-neutral-4: #777E90;--legacy-velt-neutral-5: #B1B5C3;--legacy-velt-neutral-6: #E6E8EC;--legacy-velt-neutral-7: #F4F5F6;--legacy-velt-neutral-8: #FCFCFD;--legacy-velt-neutral-9: #FFFFFF;--legacy-velt-dark-1: #141416;--legacy-velt-dark-2: #222226;--legacy-velt-dark-3: #303034;--legacy-velt-dark-4: #404044;--legacy-velt-dark-5: #59595F;--legacy-velt-dark-6: #80808A;--legacy-velt-dark-7: #91919C;--legacy-velt-dark-8: #E5E5E9;--legacy-velt-primary-color: var(--legacy-velt-dark-1);--legacy-velt-primary-dark-color: var(--legacy-velt-dark-8);--legacy-velt-secondary-color: var(--legacy-velt-neutral-4);--legacy-velt-secondary-dark-color: var(--legacy-velt-dark-7);--legacy-velt-bg-color: var(--legacy-velt-neutral-8);--legacy-velt-bg-dark-color: var(--legacy-velt-dark-1);--legacy-velt-border-color: var(--legacy-velt-neutral-6);--legacy-velt-border-dark-color: var(--legacy-velt-dark-3);--legacy-velt-grey-2-color: #D4D6DF;--legacy-velt-grey-2-dark-color: var(--legacy-velt-dark-4);--legacy-velt-grey-4-color: #989898;--legacy-velt-grey-4-dark-color: var(--legacy-velt-dark-6);--legacy-velt-status-open-color: #625DF5;--legacy-velt-status-in-progress-color: #ECB000;--legacy-velt-status-resolved-color: #00C48C;--legacy-velt-purple: #625DF5;--legacy-velt-orange: #ECB000;--legacy-velt-green: #0DCF82;--legacy-velt-blue: #0d6efd;--legacy-velt-primary-btn-color: var(--legacy-velt-purple);--legacy-velt-hyperlink-color: var(--legacy-velt-purple);--legacy-velt-grey-btn-color: var(--legacy-velt-neutral-5);--legacy-velt-header-btn-color: var(--legacy-velt-neutral-3);--legacy-velt-dropdown-item-color: var(--legacy-velt-neutral-2);--legacy-velt-avatar-size: 2rem;--velt-default-font-family: sans-serif;--Icon-Size-Small: 12px;--Icon-Size-Medium: 16px;--Icon-Size-Large: 24px}:root[data-velt-theme=dark]{--legacy-velt-primary-color: var(--legacy-velt-primary-dark-color);--legacy-velt-secondary-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-bg-color: var(--legacy-velt-bg-dark-color);--legacy-velt-border-color: var(--legacy-velt-border-dark-color);--legacy-velt-grey-2-color: var(--legacy-velt-grey-2-dark-color);--legacy-velt-grey-4-color: var(--legacy-velt-grey-4-dark-color);--legacy-velt-primary-btn-color: var(--legacy-velt-border-dark-color);--legacy-velt-hyperlink-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-grey-btn-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-header-btn-color: var(--legacy-velt-secondary-dark-color);--legacy-velt-dropdown-item-color: var(--legacy-velt-secondary-dark-color)}:root{--legacy-velt-tool-padding: 6px;--legacy-velt-tool-icon-size: 1.5rem;--legacy-velt-tool-icon-color: var(--legacy-velt-neutral-4);--legacy-velt-tool-border-radius: 50px;--legacy-velt-tool-border-color: transparent;--legacy-velt-tool-border: 2px solid var(--legacy-velt-tool-border-color);--legacy-velt-tool-bg-color: transparent;--legacy-velt-tool-focus-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-focus-icon-color: var(--legacy-velt-tool-icon-color);--legacy-velt-tool-focus-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-focus-border-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-focus-border: 2px solid var(--legacy-velt-tool-focus-border-color);--legacy-velt-tool-focus-bg-color: var(--legacy-velt-tool-bg-color);--legacy-velt-tool-hover-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-hover-icon-color: var(--legacy-velt-neutral-3);--legacy-velt-tool-hover-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-hover-border-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-hover-border: 2px solid var(--legacy-velt-tool-hover-border-color);--legacy-velt-tool-hover-bg-color: var(--legacy-velt-neutral-7);--legacy-velt-tool-active-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-active-icon-color: var(--legacy-velt-neutral-9);--legacy-velt-tool-active-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-active-border-color: var(--legacy-velt-purple);--legacy-velt-tool-active-border: 2px solid var(--legacy-velt-tool-active-border-color);--legacy-velt-tool-active-bg-color: var(--legacy-velt-purple)}:root[data-velt-theme=dark],:root:not(data-velt-theme) velt-comment-tool[dark],:root:not(data-velt-theme) velt-sidebar-button[dark],:root:not(data-velt-theme) velt-arrow-tool[dark],:root:not(data-velt-theme) velt-reaction-tool[dark],:root:not(data-velt-theme) velt-huddle-tool[dark],:root:not(data-velt-theme) velt-recorder-tool[dark],:root:not(data-velt-theme) velt-user-invite-tool[dark],:root:not(data-velt-theme) velt-user-request-tool[dark],:root:not(data-velt-theme) velt-notifications-tool[dark],:root:not(data-velt-theme) app-recorder-all-tool-menu[dark],:root:not(data-velt-theme) snippyly-recording-preview-steps-dialog[dark],:root:not(data-velt-theme) snippyly-recorder-control-panel-internal[dark],:root:not(data-velt-theme) snippyly-recorder-player-internal[dark],:root:not(data-velt-theme) velt-recorder-player-expanded[dark]:root:not(data-velt-theme) app-transcription-panel[dark]{--legacy-velt-tool-icon-size: 1.5rem;--legacy-velt-tool-icon-color: var(--legacy-velt-neutral-4);--legacy-velt-tool-border-radius: 50px;--legacy-velt-tool-border-color: transparent;--legacy-velt-tool-border: 2px solid var(--legacy-velt-tool-border-color);--legacy-velt-tool-bg-color: transparent;--legacy-velt-tool-focus-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-focus-icon-color: var(--legacy-velt-tool-icon-color);--legacy-velt-tool-focus-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-focus-border-color: var(--legacy-velt-neutral-2);--legacy-velt-tool-focus-border: 2px solid var(--legacy-velt-tool-focus-border-color);--legacy-velt-tool-focus-bg-color: var(--legacy-velt-tool-bg-color);--legacy-velt-tool-hover-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-hover-icon-color: var(--legacy-velt-neutral-5);--legacy-velt-tool-hover-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-hover-border-color: var(--legacy-velt-neutral-1);--legacy-velt-tool-hover-border: 2px solid var(--legacy-velt-tool-hover-border-color);--legacy-velt-tool-hover-bg-color: var(--legacy-velt-neutral-1);--legacy-velt-tool-active-icon-size: var(--legacy-velt-tool-icon-size);--legacy-velt-tool-active-icon-color: var(--legacy-velt-neutral-9);--legacy-velt-tool-active-border-radius: var(--legacy-velt-tool-border-radius);--legacy-velt-tool-active-border-color: var(--legacy-velt-purple);--legacy-velt-tool-active-border: 2px solid var(--legacy-velt-tool-active-border-color);--legacy-velt-tool-active-bg-color: var(--legacy-velt-purple)}snippyly-user-avatar,velt-user-avatar{--legacy-velt-user-avatar-size: var(--legacy-velt-avatar-size);--legacy-velt-user-avatar-initial-font-size: .8}snippyly-follow-overlay,velt-follow-overlay{--legacy-velt-follow-overlay-bg-color: var(--legacy-velt-bg-color);--legacy-velt-follow-overlay-text-color: var(--legacy-velt-primary-color);--legacy-velt-follow-overlay-btn-color: var(--legacy-velt-neutral-6);--legacy-velt-follow-overlay-btn-hover-color: var(--legacy-velt-neutral-5);--legacy-velt-follow-overlay-border-color: var(--legacy-velt-border-color)}snippyly-follow-overlay[dark],velt-follow-overlay[dark]{--legacy-velt-follow-overlay-bg-color: var(--legacy-velt-bg-dark-color);--legacy-velt-follow-overlay-text-color: var(--legacy-velt-primary-dark-color);--legacy-velt-follow-overlay-border-color: var(--legacy-velt-border-dark-color)}snippyly-cursor,velt-cursor{--legacy-velt-cursor-avatar-size: var(--legacy-velt-avatar-size);--legacy-velt-cursor-video-size: 4.2rem}snippyly-reaction-tool,velt-reaction-tool,app-reaction-tool{--legacy-velt-reaction-tool-icon-size: 2rem;--legacy-velt-reaction-tool-border-radius: 50px;--legacy-velt-reaction-tool-icon-color: #8F95B2;--legacy-velt-reaction-tool-hover-bg-color: #EAE8F9;--legacy-velt-reaction-tool-active-fill-color: white;--legacy-velt-reaction-tool-active-bg-color: var(--legacy-velt-purple)}snippyly-reaction-tool[dark],velt-reaction-tool[dark],app-reaction-tool[dark]{--legacy-velt-reaction-tool-icon-size: 2rem;--legacy-velt-reaction-tool-border-radius: 50px;--legacy-velt-reaction-tool-icon-color: #EAE8F9;--legacy-velt-reaction-tool-hover-bg-color: #8F95B2;--legacy-velt-reaction-tool-active-fill-color: white;--legacy-velt-reaction-tool-active-bg-color: var(--legacy-velt-purple)}velt-view-analytics-dialog{--legacy-velt-view-analytics-dialog-bg-color: #FFF;--legacy-velt-view-analytics-dialog-border-radius: 12px;--legacy-velt-view-analytics-dialog-border: 1px solid rgba(0, 0, 0, .08);--legacy-velt-view-analytics-dialog-box-shadow: 0px 0px 32px 0px rgba(0, 0, 0, .12);--legacy-velt-view-analytics-dialog-padding: 8px;--legacy-velt-view-analytics-dialog-total-views-count-color: #111;--legacy-velt-view-analytics-dialog-total-views-text-color: #625DF5;--legacy-velt-view-analytics-dialog-today-views-text-color: #848297;--legacy-velt-view-analytics-dialog-views-container-bg-color: #F4F3FF;--legacy-velt-view-analytics-dialog-user-name-color: #4C5366;--legacy-velt-view-analytics-dialog-user-timestamp-color: #959595;--legacy-velt-view-analytics-dialog-back-btn-color: #8F95B2}velt-view-analytics-dialog[dark]{--legacy-velt-view-analytics-dialog-bg-color: #131229;--legacy-velt-view-analytics-dialog-border-radius: 12px;--legacy-velt-view-analytics-dialog-border: 1px solid rgba(255, 255, 255, .08);--legacy-velt-view-analytics-dialog-box-shadow: 0px 0px 32px 0px rgba(0, 0, 0, .12);--legacy-velt-view-analytics-dialog-padding: 8px;--legacy-velt-view-analytics-dialog-total-views-count-color: #FFF;--legacy-velt-view-analytics-dialog-total-views-text-color: #9491F8;--legacy-velt-view-analytics-dialog-today-views-text-color: #848297;--legacy-velt-view-analytics-dialog-views-container-bg-color: rgba(244, 243, 255, .06);--legacy-velt-view-analytics-dialog-user-name-color: #FFF;--legacy-velt-view-analytics-dialog-user-timestamp-color: rgba(255, 255, 255, .4)}velt-reaction-pin-tooltip-internal{--Surface-Neutral-0: #FFF;--Surface-Neutral-2: #F5F5F5;--Surface-Neutral-3: #F0F0F0;--Text-Neutral-0: #0A0A0A;--Text-Neutral-3: #292929;--Text-Neutral-5: #525252;--Text-Neutral-9: #999;--Text-Brand-Primary: #625DF5}velt-reaction-pin-tooltip-internal[dark]{--Surface-Neutral-0: #0F0F0F;--Surface-Neutral-2: #1F1F1F;--Surface-Neutral-3: #2F2F2F;--Text-Neutral-0: #FFF;--Text-Neutral-3: #E0E0E0;--Text-Neutral-5: #C2C2C2;--Text-Neutral-9: #ADADAD;--Text-Brand-Primary: #9491F8}:root{--velt-border-radius-2xs: calc((.125rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-xs: calc((.25rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-sm: calc((.5rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-md: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-lg: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-xl: calc((1.25rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-2xl: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-3xl: calc((2rem + 0px) * var(--velt-base-rem-unit));--velt-border-radius-full: calc((5rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-2xs: calc((.125rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-xs: calc((.25rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-sm: calc((.5rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-md: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-lg: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-xl: calc((1.25rem + 0px) * var(--velt-base-rem-unit));--velt-spacing-2xl: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-2xs: calc((.625rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-xs: calc((.75rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-sm: calc((.875rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-md: calc((1rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-lg: calc((1.5rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-xl: calc((1.75rem + 0px) * var(--velt-base-rem-unit));--velt-font-size-2xl: calc((2rem + 0px) * var(--velt-base-rem-unit));--velt-light-mode-green: #0DCF82;--velt-light-mode-magenta: #A259FE;--velt-light-mode-amber: #FF7162;--velt-light-mode-purple: #625DF5;--velt-light-mode-cyan: #4BC9F0;--velt-light-mode-orange: #FE965C;--velt-light-mode-black: #080808;--velt-light-mode-white: #FFFFFF;--velt-light-mode-gray: #EBEBEB;--velt-light-mode-error: #FF7162;--velt-light-mode-error-hover: #DE5041;--velt-light-mode-error-foreground: #FFFFFF;--velt-light-mode-error-light: #FFF4F2;--velt-light-mode-error-transparent: rgba(255, 113, 98, .08);--velt-light-mode-warning: #FFCD2E;--velt-light-mode-warning-hover: #C69400;--velt-light-mode-warning-foreground: #474747;--velt-light-mode-warning-light: #FFFBEE;--velt-light-mode-warning-transparent: rgba(255, 205, 46, .08);--velt-light-mode-success: #198F65;--velt-light-mode-success-hover: #006B41;--velt-light-mode-success-foreground: #FFFFFF;--velt-light-mode-success-light: #EDF6F3;--velt-light-mode-success-transparent: rgba(25, 143, 101, .08);--velt-light-mode-accent: #625DF5;--velt-light-mode-accent-text: #625DF5;--velt-light-mode-accent-hover: #534FCF;--velt-light-mode-accent-foreground: #FFFFFF;--velt-light-mode-accent-light: #F2F2FE;--velt-light-mode-accent-transparent: rgba(148, 145, 248, .08);--velt-light-mode-text-0: #0A0A0A;--velt-light-mode-text-1: #141414;--velt-light-mode-text-2: #1F1F1F;--velt-light-mode-text-3: #292929;--velt-light-mode-text-4: #3D3D3D;--velt-light-mode-text-5: #525252;--velt-light-mode-text-6: #666666;--velt-light-mode-text-7: #7A7A7A;--velt-light-mode-text-8: #858585;--velt-light-mode-text-9: #999999;--velt-light-mode-text-10: #B8B8B8;--velt-light-mode-text-11: #A3A3A3;--velt-light-mode-text-12: #8F8F8F;--velt-light-mode-background-0: #FFFFFF;--velt-light-mode-background-1: #FAFAFA;--velt-light-mode-background-2: #F5F5F5;--velt-light-mode-background-3: #F0F0F0;--velt-light-mode-background-4: #EBEBEB;--velt-light-mode-background-5: #E5E5E5;--velt-light-mode-background-6: #E0E0E0;--velt-light-mode-background-7: #DBDBDB;--velt-light-mode-background-8: #D6D6D6;--velt-light-mode-background-9: #D1D1D1;--velt-light-mode-background-10: #CCCCCC;--velt-light-mode-border-0: #FFFFFF;--velt-light-mode-border-1: #FAFAFA;--velt-light-mode-border-2: #F5F5F5;--velt-light-mode-border-3: #F0F0F0;--velt-light-mode-border-4: #EBEBEB;--velt-light-mode-border-5: #E5E5E5;--velt-light-mode-border-6: #E0E0E0;--velt-light-mode-border-7: #DBDBDB;--velt-light-mode-border-8: #D6D6D6;--velt-light-mode-border-9: #D1D1D1;--velt-light-mode-border-10: #CCCCCC;--velt-light-mode-background-transparent: rgba(255, 255, 255, .8);--velt-light-mode-border-transparent: rgba(0, 0, 0, .16);--velt-light-mode-animation-transparent: rgba(255, 255, 255, .2);--velt-dark-mode-green: #0DCF82;--velt-dark-mode-magenta: #A259FE;--velt-dark-mode-amber: #FF7162;--velt-dark-mode-purple: #625DF5;--velt-dark-mode-cyan: #4BC9F0;--velt-dark-mode-orange: #FE965C;--velt-dark-mode-black: #080808;--velt-dark-mode-white: #FFFFFF;--velt-dark-mode-gray: #EBEBEB;--velt-dark-mode-error: #FF7162;--velt-dark-mode-error-hover: #DE5041;--velt-dark-mode-error-foreground: #FFFFFF;--velt-dark-mode-error-light: #FFF4F2;--velt-dark-mode-error-transparent: rgba(255, 113, 98, .08);--velt-dark-mode-warning: #FFCD2E;--velt-dark-mode-warning-hover: #C69400;--velt-dark-mode-warning-foreground: #474747;--velt-dark-mode-warning-light: #FFFBEE;--velt-dark-mode-warning-transparent: rgba(255, 205, 46, .08);--velt-dark-mode-success: #198F65;--velt-dark-mode-success-hover: #006B41;--velt-dark-mode-success-foreground: #FFFFFF;--velt-dark-mode-success-light: #EDF6F3;--velt-dark-mode-success-transparent: rgba(25, 143, 101, .08);--velt-dark-mode-accent: #625DF5;--velt-dark-mode-accent-text: #9491F8;--velt-dark-mode-accent-hover: #534FCF;--velt-dark-mode-accent-foreground: #FFFFFF;--velt-dark-mode-accent-light: #F2F2FE;--velt-dark-mode-accent-transparent: rgba(148, 145, 248, .08);--velt-dark-mode-text-0: #FFFFFF;--velt-dark-mode-text-1: #F5F5F5;--velt-dark-mode-text-2: #EBEBEB;--velt-dark-mode-text-3: #E0E0E0;--velt-dark-mode-text-4: #D6D6D6;--velt-dark-mode-text-5: #C2C2C2;--velt-dark-mode-text-6: #ADADAD;--velt-dark-mode-text-7: #8F8F8F;--velt-dark-mode-text-8: #7A7A7A;--velt-dark-mode-text-9: #666666;--velt-dark-mode-text-10: #525252;--velt-dark-mode-text-11: #474747;--velt-dark-mode-text-12: #3D3D3D;--velt-dark-mode-background-0: #0F0F0F;--velt-dark-mode-background-1: #1A1A1A;--velt-dark-mode-background-2: #1F1F1F;--velt-dark-mode-background-3: #242424;--velt-dark-mode-background-4: #292929;--velt-dark-mode-background-5: #2E2E2E;--velt-dark-mode-background-6: #333333;--velt-dark-mode-background-7: #383838;--velt-dark-mode-background-8: #3D3D3D;--velt-dark-mode-background-9: #424242;--velt-dark-mode-background-10: #474747;--velt-dark-mode-border-0: #0F0F0F;--velt-dark-mode-border-1: #1A1A1A;--velt-dark-mode-border-2: #1F1F1F;--velt-dark-mode-border-3: #242424;--velt-dark-mode-border-4: #292929;--velt-dark-mode-border-5: #2E2E2E;--velt-dark-mode-border-6: #333333;--velt-dark-mode-border-7: #383838;--velt-dark-mode-border-8: #3D3D3D;--velt-dark-mode-border-9: #424242;--velt-dark-mode-border-10: #474747;--velt-dark-mode-background-transparent: rgba(0, 0, 0, .8);--velt-dark-mode-border-transparent: rgba(255, 255, 255, .16);--velt-dark-mode-animation-transparent: rgba(255, 255, 255, .2);--velt-comment-pin-z-index: 2147483557;--velt-arrow-z-index: 2147483557;--velt-recorder-player-z-index: 2147483557;--velt-cursor-z-index: 2147483647;--velt-persistent-comment-frame-z-index: 2147483647;--velt-toast-popup-z-index: 2147483647;--velt-live-state-sync-overlay-z-index: 2147483647;--velt-follow-mode-overlay-z-index: 2147483647;--velt-comments-minimap-z-index: 2147483637;--velt-global-overlay-z-index: 2147483637}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}.cdk-overlay-container{z-index:var(--velt-global-overlay-z-index)!important}.cdk-overlay-container .velt-overlay-panel.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:#fff;padding:24px}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .mdc-dialog__title:before{height:unset}.velt-mat-dialog-container mat-dialog-container .mat-mdc-dialog-actions{padding:var(--mat-dialog-actions-padding, 8px)}.velt-overlay-panel{background-color:transparent;border:none;box-shadow:none}.velt-overlay-panel.mat-mdc-tooltip-panel .mat-mdc-tooltip{color:#fff;background-color:#0b0b0b;border:1px solid #eeeeee;border-radius:4px;padding:8px 12px;font-size:14px}.velt-menu.mat-mdc-menu-panel{box-shadow:none}video.flip{transform:rotateY(180deg);-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg)}body[data-velt-huddle-on-cursor-mode] .cdk-overlay-container{z-index:calc(var(--velt-global-overlay-z-index, 2147483637) - 1)!important}body[data-velt-huddle-on-cursor-mode]:not(.show-pin-cursor){cursor:none!important}body[data-velt-huddle-on-cursor-mode]:not(.show-pin-cursor) *{cursor:none!important}body.snippyly-add-comment-mode,body.snippyly-add-comment-mode *{-webkit-user-select:none!important;user-select:none!important}body.snippyly-add-comment-mode [data-velt-iframe-container=true][data-velt-iframe-container-static=true]{position:relative!important}body.snippyly-add-comment-mode [data-velt-iframe-container=true]:before{content:""!important;position:absolute!important;inset:0!important;z-index:1!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] [data-velt-element=true]:not(snippyly-comment-text-portal):not(velt-recorder-control-panel):not([data-velt-screen-recorder-panel=true]){display:none!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight{color:inherit!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{color:inherit!important;background-color:inherit!important;cursor:inherit!important}body[data-velt-ongoing-recording=screen][data-velt-comment-recording=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.selected{background-color:inherit!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight snippyly-comment-text-portal,body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight velt-comment-text-portal{font-family:inherit!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{color:transparent!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.selected{color:transparent!important}body [data-velt-pdf-viewer=true] snippyly-text-highlight.snippyly-text-highlight .comment-annotation-number{display:none!important}:where([data-velt-pdf-viewer=true]) .textLayer:is(:has([data-snippyly-pin-host],[data-velt-pin-host]),:has(snippyly-comment-pin-portal,snippyly-tag-pin-portal,snippyly-recorder-pin-portal,snippyly-arrow-pin-portal,snippyly-area-pin-portal,velt-comment-pin-portal,velt-tag-pin-portal,velt-recorder-pin-portal,velt-arrow-pin-portal,velt-area-pin-portal)){opacity:1!important;visibility:visible!important}:where([data-velt-pdf-viewer=true]) .textLayer:is(:has([data-snippyly-pin-host],[data-velt-pin-host]),:has(snippyly-comment-pin-portal,snippyly-tag-pin-portal,snippyly-recorder-pin-portal,snippyly-arrow-pin-portal,snippyly-area-pin-portal,velt-comment-pin-portal,velt-tag-pin-portal,velt-recorder-pin-portal,velt-arrow-pin-portal,velt-area-pin-portal)) snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{opacity:.2!important}[data-snippyly-comment-pin-host][data-snippyly-comment-pin-host-static],[data-snippyly-tag-pin-host][data-snippyly-tag-pin-host-static],[data-snippyly-recorder-pin-host][data-snippyly-recorder-pin-host-static],[data-snippyly-arrow-pin-host][data-snippyly-arrow-pin-host-static],[data-snippyly-area-pin-host][data-snippyly-area-pin-host-static],[data-velt-comment-pin-host][data-velt-comment-pin-host-static],[data-velt-tag-pin-host][data-velt-tag-pin-host-static],[data-velt-recorder-pin-host][data-velt-recorder-pin-host-static],[data-velt-arrow-pin-host][data-velt-arrow-pin-host-static],[data-velt-area-pin-host][data-velt-area-pin-host-static]{position:relative}[data-velt-comment-pin-host][data-velt-comment-pin-active=true],[data-velt-area-pin-host][data-velt-area-pin-active=true]{opacity:1!important;visibility:visible!important}.s-display-none,.velt-display-none{display:none!important}.s-flex,.velt-display-flex{display:flex!important}.velt-items-center{align-items:center!important}.s-background-blur-1{-webkit-backdrop-filter:blur(4px)!important;backdrop-filter:blur(4px)!important}.s-background-blur-2{-webkit-backdrop-filter:blur(8px)!important;backdrop-filter:blur(8px)!important}.s-background-blur-3{-webkit-backdrop-filter:blur(12px)!important;backdrop-filter:blur(12px)!important}.s-background-blur-4{-webkit-backdrop-filter:blur(16px)!important;backdrop-filter:blur(16px)!important}.s-tooltip{position:relative!important}.s-tooltip .s-tooltiptext{visibility:hidden!important;block-size:auto!important;width:max-content!important;top:120%!important;background-color:var(--legacy-velt-bg-color);border:1px solid var(--legacy-velt-border-color);color:var(--legacy-velt-primary-color)!important;text-align:left!important;padding:.5em .75em!important;border-radius:6px!important;font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:2em!important;box-shadow:var(--legacy-velt-box-shadow)!important;position:absolute!important;z-index:1!important;opacity:0!important;transition:opacity .5s!important;left:50%!important;transform:translate(-50%)!important}.s-tooltip .s-tooltiptext:after{content:" "!important;position:absolute!important;top:0!important;left:50%!important;width:12px!important;height:12px!important;border-left:1px solid var(--legacy-velt-border-color);border-top:1px solid var(--legacy-velt-border-color);background-color:var(--legacy-velt-bg-color);border-radius:4px!important;transform:translate(-50%,-41%) rotate(45deg)!important;transform-origin:center!important}.s-tooltip .s-tooltiptext:before{content:" ";position:absolute;top:0;left:50%;width:24px;height:24px;transform:translate(-50%,-41%);background:transparent}.s-tooltip .s-tooltiptext.left{top:50%!important;right:120%!important;transform:translateY(-50%)!important}.s-tooltip .s-tooltiptext.left:after{transform:translate(41%,-50%) rotate(45deg)!important;transform-origin:center!important;left:unset!important;right:0!important;top:50%!important}.s-tooltip .s-tooltiptext.left.top{top:100%!important;transform:translateY(-45%)!important}.s-tooltip .s-tooltiptext.left.top:after{transform:translate(41%,66%) rotate(45deg)!important;top:0!important}.s-tooltip:hover .s-tooltiptext{visibility:visible!important;opacity:1!important}.s-tooltip-light .s-tooltiptext{background-color:#fff!important;color:#000!important;box-shadow:0 2px 8px -2px #9f9f9f!important}.s-tooltip-light .s-tooltiptext:after{background-color:#fff!important}.s-tooltip-link{font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-cursor-pointer,.velt-cursor-pointer{cursor:pointer!important}.s-shake{animation:shake .82s cubic-bezier(.36,.07,.19,.97) both;transform:translateZ(0);backface-visibility:hidden;perspective:1000px}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}app-render-timer-wrapper{width:100%;height:100%}velt-comment-text[comment-available=true]{color:var(--Constant-Warning---Text, #E2A600);background-color:#e2a6001a;border-bottom:1px solid #E2A600}
508
508
  `],encapsulation:2,changeDetection:0});let i=o;return i})();var Yd=(()=>{let o=class o{constructor(e){this.loggingService=e,this.toasts$=new ve([])}setToast(e){try{e.id||(e.id=Math.random()),this.toasts$.next([...this.toasts$.value,e]),e.duration&&e.duration>0&&ac(e.duration).pipe(rt(1)).subscribe(()=>{this.removeToast(e)},t=>{this.loggingService.catch("Error in ToastService setToast timer subscription: ",t)})}catch(t){this.loggingService.catch("Error in ToastService setToast: ",t)}}removeToast(e){try{this.toasts$.next(this.toasts$.value.filter(t=>t.id!==e.id))}catch(t){this.loggingService.catch("Error in ToastService removeToast: ",t)}}getToasts$(){return this.toasts$.asObservable()}};o.\u0275fac=function(t){return new(t||o)(J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function QRe(i,o){i&1&&(le(),_(0,"svg",6),w(1,"path",7),b())}function JRe(i,o){i&1&&(le(),_(0,"svg",6),w(1,"path",8)(2,"path",9),b())}function eNe(i,o){if(i&1){let n=Y();_(0,"div",2),u(1,QRe,2,0,"svg",3)(2,JRe,3,0,"svg",3),te(3),P(4,"translate"),le(),_(5,"svg",4),G("click",function(){let t=N(n).$implicit,r=l();return F(r.removeToast(t))}),w(6,"path",5),b()()}if(i&2){let n=o.$implicit;d("@fade",!0),m(),d("ngIf",n.type==="success"),m(),d("ngIf",n.type==="error"),m(),_e(" ",M(4,4,n.message)," ")}}var mde=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.toastService=t,this.elementRef=r,this.toasts=[],this.subscriptions=[];try{this.subscriptions.push(this.toastService.getToasts$().subscribe(a=>{this.toasts=a}))}catch(a){console.log(a)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}ngAfterViewInit(){try{setTimeout(()=>{this.moveToastTagToEnd()},5e3)}catch{}}moveToastTagToEnd(){try{let e=this.elementRef?.nativeElement;document.body.appendChild(e)}catch(e){this.loggingService.catch("Error in ToastPopupComponent moveToastTagToEnd: ",e)}}removeToast(e){this.toastService.removeToast(e)}};o.\u0275fac=function(t){return new(t||o)(h(y),h(Yd),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-toast-popup"]],standalone:!1,decls:2,vars:1,consts:[[1,"s-notification-container"],["class","s-notification",4,"ngFor","ngForOf"],[1,"s-notification"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-last-item","s-notification-close-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z","fill","#E6E8EC"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.7071 9.70711C18.0976 9.31658 18.0976 8.68342 17.7071 8.29289C17.3166 7.90237 16.6834 7.90237 16.2929 8.29289L11 13.5858L8.70711 11.2929C8.31658 10.9024 7.68342 10.9024 7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289 12.7071L10.2929 15.7071C10.6834 16.0976 11.3166 16.0976 11.7071 15.7071L17.7071 9.70711Z","fill","#0DCF82"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z","fill","#FF7162"]],template:function(t,r){t&1&&(_(0,"div",0),u(1,eNe,7,6,"div",1),b()),t&2&&(m(),d("ngForOf",r.toasts))},dependencies:[vt,X,ge],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.s-notification-container[_ngcontent-%COMP%]{position:fixed!important;top:5%!important;left:50%!important;transform:translate(-50%)!important;display:flex!important;justify-content:center!important;align-items:center!important;z-index:var(--velt-toast-popup-z-index)!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;flex-direction:column!important}.s-notification[_ngcontent-%COMP%]{display:flex!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((10rem + 0px) * var(--velt-base-rem-unit))!important;background:#23262f!important;color:#e6e8ec!important;width:calc((30rem + 0px) * var(--velt-base-rem-unit))!important;max-width:90vw!important;align-items:center!important}.s-last-item[_ngcontent-%COMP%]{margin-left:auto!important}.s-notification-close-btn[_ngcontent-%COMP%]{cursor:pointer!important}"],data:{animation:[KU("fade",[SP("false",Ad({opacity:0})),SP("true",Ad({opacity:1})),bP("false => true",[Ad({opacity:0}),yP(1e3,Ad({opacity:1}))]),bP("true => false",[yP(1e3,Ad({opacity:0}))])])]},changeDetection:0});let i=o;return i})();var Bz=i=>({componentConfigSignal:i}),pde=(i,o)=>({condition:i,data:o}),nNe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-single-editor-mode-panel-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function iNe(i,o){i&1&&Ue(0)}function oNe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,iNe,1,0,"ng-container",4),b()),i&2){l(3);let n=de(2);m(),d("ngTemplateOutlet",n)}}function rNe(i,o){if(i&1&&(f(0),u(1,oNe,2,1,"velt-shadow-dom-internal",3),v()),i&2){let n=l().ngIf,e=l(),t=de(2);m(),d("ngIf",n.shadowDom&&!e.template)("ngIfElse",t)}}function aNe(i,o){if(i&1&&(f(0),u(1,rNe,2,2,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,pde,n.conditionSignal(),A(1,Bz,n.componentConfigSignal)))}}function sNe(i,o){if(i&1&&(f(0),_(1,"div",8),w(2,"velt-single-editor-mode-panel-viewer-text",9)(3,"velt-single-editor-mode-panel-editor-text",9)(4,"velt-single-editor-mode-panel-countdown",9)(5,"velt-single-editor-mode-panel-request-access",9)(6,"velt-single-editor-mode-panel-reject-request",9)(7,"velt-single-editor-mode-panel-edit-here",9),b(),v()),i&2){let n=l(6);m(2),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)}}function lNe(i,o){if(i&1&&(f(0),u(1,sNe,8,6,"ng-container",7),v()),i&2){let n=l(3).ngIf,e=l(2);m(),d("veltDynamicTemplate",$(3,nNe,e.template,A(1,Bz,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function cNe(i,o){if(i&1&&(_(0,"div",6),u(1,lNe,2,9,"ng-container",2),b()),i&2){let n=l(2).ngIf,e=l(2);ue("velt-single-editor-mode-panel-container-no-pointer",n.type==="editor")("no-pointer",n.type==="editor"),m(),d("veltIf",k(7,pde,e.conditionSignal(),A(5,Bz,e.componentConfigSignal)))}}function dNe(i,o){if(i&1&&(f(0),u(1,cNe,2,10,"div",5),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.leaderName!==""||n.type==="editor")}}function mNe(i,o){if(i&1&&(f(0),u(1,dNe,2,1,"ng-container",1),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.singleEditorMode)}}function pNe(i,o){if(i&1&&u(0,mNe,2,1,"ng-container",1),i&2){let n=l();d("ngIf",n.componentConfigSignal())}}var Sh=(()=>{let o=class o extends Je{set _shadowDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{shadowDom:t}),r))}catch(t){this.loggingService.catch("Error in SingleEditorModePanelComponent _shadowDom: ",t)}}constructor(e,t,r,a,s,c,p){super(e,s,void 0,void 0,void 0,c,a),this.elementRef=e,this.authService=t,this.liveStateService=r,this.loggingService=a,this.themeService=s,this.dynamicDataService=c,this.wireframeService=p,this.subscriptions=[],this.componentConfigSignal=Te({singleEditorMode:!1,defaultSingleEditorUIEnabled:!1,editAccessRequested:!1,leaderName:"",type:"reader",requestEditorAccessCountdown:0,singleEditorLiveStateData:null,singleEditorConfig:null,isUserEditor:null,variant:this.variant,shadowDom:!0,requestEditorAccess:this.requestEditorAccess.bind(this),cancelEditorAccessRequest:this.cancelEditorAccessRequest.bind(this),rejectEditorAccessRequest:this.rejectEditorAccessRequest.bind(this),acceptEditorAccessRequest:this.acceptEditorAccessRequest.bind(this),editCurrentTab:this.editCurrentTab.bind(this)}),this.componentId="velt-single-editor-mode-panel";try{this.loggingService.log("%c[WB] Calling FUNCTION: SingleEditorModePanelComponent constructor","color: green;"),this.subscriptions.push(this.liveStateService.getSingleEditorMode$().subscribe(g=>{this.componentConfigSignal.update(C=>T(I({},C),{singleEditorMode:g}))})),this.subscriptions.push(this.liveStateService.getDefaultSingleEditorUIEnabled$().subscribe(g=>{this.componentConfigSignal.update(C=>T(I({},C),{defaultSingleEditorUIEnabled:g}))})),this.subscriptions.push(this.liveStateService.getSingleEditorModeConfig$().subscribe(g=>{this.componentConfigSignal.update(C=>T(I({},C),{singleEditorConfig:g}))})),this.subscriptions.push(this.liveStateService.isUserEditor$().subscribe(g=>{this.componentConfigSignal.update(C=>T(I({},C),{isUserEditor:g}))})),this.subscriptions.push(this.liveStateService.getSingleEditorLiveStateData$().subscribe(g=>{let C=this.componentConfigSignal().singleEditorLiveStateData?.requestEditorAccess?.user?.userId,E=g?.requestEditorAccess?.user?.userId;if(C&&E&&C!==E&&this.componentConfigSignal().requestEditorAccessCountdown&&this.removeRequestEditorAccessCountdown(),this.componentConfigSignal.update(D=>T(I({},D),{singleEditorLiveStateData:g})),g){this.componentConfigSignal.update(L=>T(I({},L),{leaderName:g?.editor?.name||g?.editor?.email||""}));let D=this.authService.getUser();D?.userId===g?.editor?.userId?this.componentConfigSignal.update(L=>T(I({},L),{type:"editor"})):this.componentConfigSignal.update(L=>T(I({},L),{type:"reader"})),D?.userId===g?.requestEditorAccess?.user?.userId&&g?.requestEditorAccess?.status==="pending"?this.componentConfigSignal.update(L=>T(I({},L),{editAccessRequested:!0})):this.componentConfigSignal.update(L=>T(I({},L),{editAccessRequested:!1})),this.componentConfigSignal().type==="editor"&&!this.componentConfigSignal().requestEditorAccessCountdown&&g?.requestEditorAccess?.status==="pending"?this.showRequestEditorAccessCountdown():this.removeRequestEditorAccessCountdown()}}))}catch(g){this.loggingService.catch("Error in SingleEditorModePanelComponent constructor: ",g)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes();let e="velt-single-editor-mode-panel-wireframe";this.variant&&(e+=`---${this.variant}`),this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}})}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent ngOnDestroy: ",e)}}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in SingleEditorModePanelComponent ngOnChanges: ",t)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent setupA11yAttributes:",e)}}showRequestEditorAccessCountdown(){try{this.loggingService.log("%c[WB] Calling FUNCTION: showRequestEditorAccessCountdown","color: green;"),this.componentConfigSignal.update(e=>(e=T(I({},e),{requestEditorAccessCountdown:e.singleEditorLiveStateData?.requestEditorAccess?.editorAccessTimeout||j.LIVE_STATE_REQUEST_EDITOR_ACCESS_WAIT_TIME}),e)),this.interval=setInterval(()=>{this.componentConfigSignal.update(e=>T(I({},e),{requestEditorAccessCountdown:e.requestEditorAccessCountdown-1})),this.componentConfigSignal().requestEditorAccessCountdown<=0&&clearInterval(this.interval)},1e3)}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent showRequestEditorAccessCountdown: ",e)}}removeRequestEditorAccessCountdown(){try{this.loggingService.log("%c[WB] Calling FUNCTION: removeRequestEditorAccessCountdown","color: green;"),this.componentConfigSignal.update(e=>T(I({},e),{requestEditorAccessCountdown:0})),clearInterval(this.interval)}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent removeRequestEditorAccessCountdown: ",e)}}requestEditorAccess(){try{this.loggingService.log("%c[WB] Calling FUNCTION: requestEditorAccess","color: green;"),this.componentConfigSignal().editAccessRequested||this.liveStateService.requestEditorAccess().subscribe()}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent requestEditorAccess: ",e)}}cancelEditorAccessRequest(){try{this.loggingService.log("%c[WB] Calling FUNCTION: cancelEditorAccessRequest","color: green;"),this.liveStateService.cancelEditorAccessRequest()}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent cancelEditorAccessRequest: ",e)}}acceptEditorAccessRequest(){try{this.loggingService.log("%c[WB] Calling FUNCTION: acceptEditorAccessRequest","color: green;"),this.liveStateService.acceptEditorAccessRequest()}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent acceptEditorAccessRequest: ",e)}}rejectEditorAccessRequest(){try{this.loggingService.log("%c[WB] Calling FUNCTION: rejectEditorAccessRequest","color: green;"),this.liveStateService.rejectEditorAccessRequest()}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent rejectEditorAccessRequest: ",e)}}editCurrentTab(){try{this.loggingService.log("%c[WB] Calling FUNCTION: editCurrentTab","color: green;"),this.liveStateService.editCurrentTab()}catch(e){this.loggingService.catch("Error in SingleEditorModePanelComponent editCurrentTab: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(Ve),h(Vi),h(y),h(qe),h(S),h(He))},o.\u0275cmp=O({type:o,selectors:[["velt-single-editor-mode-panel"]],inputs:{variant:"variant",_shadowDom:[0,"shadowDom","_shadowDom"]},standalone:!1,features:[V([S]),B,Ze],decls:3,vars:1,consts:[["liveStateSyncPanelRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["data-velt-ignore","","class","velt-single-editor-mode-panel-container single-editor-mode-panel-container",3,"velt-single-editor-mode-panel-container-no-pointer","no-pointer",4,"ngIf"],["data-velt-ignore","",1,"velt-single-editor-mode-panel-container","single-editor-mode-panel-container"],[4,"veltDynamicTemplate"],["data-velt-ignore","",1,"velt-single-editor-mode-panel","follow-dialog"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,aNe,2,6,"ng-container",1)(1,pNe,1,1,"ng-template",null,0,xe),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-single-editor-mode-panel[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs);display:flex;justify-content:center;align-items:center;gap:var(--velt-spacing-sm);width:fit-content;padding:var(--velt-spacing-sm) var(--velt-spacing-md);background-color:var(--velt-background-0);color:var(--velt-text-0);border-radius:var(--velt-border-radius-full);box-shadow:0 8px 16px -8px #0f0f0f1a;border:1px solid var(--velt-border-4)}.velt-single-editor-mode-panel-container.velt-single-editor-mode-panel-container-no-pointer[_ngcontent-%COMP%]{pointer-events:none}"],changeDetection:0});let i=o;return i})();function uNe(i,o){if(i&1&&(f(0),_(1,"div",1),w(2,"velt-single-editor-mode-panel",2),b(),v()),i&2){let n=l(2);m(2),d("variant",n.variant)}}function hNe(i,o){if(i&1&&(f(0),u(1,uNe,3,1,"ng-container",0),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.singleEditorMode&&n.defaultSingleEditorUIEnabled)}}var gde=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(e,t,void 0,void 0,void 0,r,a),this.elementRef=e,this.themeService=t,this.dynamicDataService=r,this.loggingService=a,this.liveStateService=s,this.subscriptions=[],this.componentConfigSignal=Te({singleEditorMode:!1,defaultSingleEditorUIEnabled:!1,variant:this.variant}),this.componentId="velt-live-state-sync-overlay";try{this.subscriptions.push(this.liveStateService.getSingleEditorMode$().subscribe(c=>{this.componentConfigSignal.update(p=>T(I({},p),{singleEditorMode:c}))})),this.subscriptions.push(this.liveStateService.getDefaultSingleEditorUIEnabled$().subscribe(c=>{this.componentConfigSignal.update(p=>T(I({},p),{defaultSingleEditorUIEnabled:c}))}))}catch(c){this.loggingService.catch("Error in LiveStateSyncOverlayComponent constructor: ",c)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in LiveStateSyncOverlayComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in LiveStateSyncOverlayComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","dialog"),e.setAttribute("aria-labelledby",this.componentId),e.setAttribute("aria-modal","true")}catch(e){this.loggingService.catch("Error in LiveStateSyncOverlayComponent setupA11yAttributes: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(S),h(y),h(Vi))},o.\u0275cmp=O({type:o,selectors:[["snippyly-live-state-sync-overlay"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],["data-velt-ignore","",1,"velt-live-state-sync-overlay-container","live-state-sync-overlay-container"],[3,"variant"]],template:function(t,r){t&1&&u(0,hNe,2,1,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Sh],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}.velt-live-state-sync-overlay-container{position:fixed;bottom:calc((2rem + 0px) * var(--velt-base-rem-unit));left:50%;transform:translate(-50%);background-color:transparent;z-index:var(--velt-live-state-sync-overlay-z-index);display:flex;justify-content:center;align-items:flex-end}
509
509
  `],encapsulation:3,changeDetection:0});let i=o;return i})();var Vz=(()=>{let o=class o{set signInButton(e){this.translateService.setLanguage(e)}set translations(e){try{let t=e;if(typeof e=="string"&&(t=JSON.parse(e)),!t||typeof t!="object")return;this.translateService.setTranslations(t)}catch(t){this.loggingService.catch("Error in AppComponent set translations: ",t)}}set _autoTranslation(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.translateService.enableAutoTranslation():this.translateService.disableAutoTranslation()}onResize(e){this.setSnippylyViewportSize()}constructor(e,t,r,a,s,c,p,g,C,E){this.docService=e,this.domService=t,this.loggingService=r,this.viewportRuler=a,this.themeService=s,this.breakpointObserver=c,this.translateService=p,this.notificationService=g,this.veltService=C,this.injector=E,this.snippyly=new C9(this.injector),this.getSnippyly=new Me,this.subscriptions=[],this.veltElement=!0,this.loggingService.log("%c[WB] Creating CLASS: AppComponent","color: blue;");try{this.subscriptions.push(this.docService.getDocumentPaths$().subscribe(()=>{this.domService.removeScrollableElementsIds()},D=>{this.loggingService.catch("Error in AppComponent getDocumentPaths subscription:",D)})),this.updateDeviceType(),this.updateDeviceOrientation(),this.setVeltVersion()}catch(D){this.loggingService.catch("Error in AppComponent constructor:",D)}}ngOnInit(){}ngAfterViewInit(){try{this.domService.setDeviceInfo(),this.setSnippylyViewportSize(),this.getSnippyly.emit(this.snippyly),this.setSnippylyRemBaseUnit(),this.subscriptions.push(this.domService.onWindowResize$().subscribe(()=>{this.setSnippylyRemBaseUnit()})),this.themeService.updateListenerOnConfigChange()}catch(e){this.loggingService.catch("Error in App After view init: ",e)}}setVeltVersion(){try{window?.Velt?.version&&localStorage.setItem(j.LOCAL_STORAGE.VELT_VERSION,window.Velt.version)}catch(e){this.loggingService.catch("Error in AppComponent setVeltVersion: ",e)}}updateDeviceType(){try{Object.values(Li).forEach(t=>{zn.Breakpoints[t]=this.breakpointObserver.isMatched(t),this.subscriptions.push(this.breakpointObserver.observe(t).subscribe(r=>{zn.Breakpoints[t]=r.matches}))})}catch(e){this.loggingService.catch("Error in AppComponent updateDeviceType: ",e)}}updateDeviceOrientation(){try{Object.values(wv).forEach(t=>{zn.Orientations[t]=window.matchMedia(t).matches,this.subscriptions.push(this.breakpointObserver.observe(t).subscribe(r=>{zn.Orientations[t]=r.matches}))})}catch(e){this.loggingService.catch("Error in AppComponent updateDeviceOrientation: ",e)}}observeHtmlTagChanges(){}setSnippylyRemBaseUnit(){try{let e=document.documentElement,t=window.getComputedStyle(e),r=16,a=+t.fontSize.replace("px",""),s=a?r/a:1;e.style.setProperty(j.VELT_BASE_REM_UNIT,s+"")}catch(e){this.loggingService.catch("Error in AppComponent setSnippylyRemBaseUnit: ",e)}}setSnippylyViewportSize(){try{setTimeout(()=>{let e=this.viewportRuler.getViewportSize(),t=document.documentElement;t.style.setProperty(j.VELT_VIEWPORT_WIDTH,e.width+"px"),t.style.setProperty(j.VELT_VIEWPORT_HEIGHT,e.height+"px")},100)}catch{}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()}),this.themeService.disablePrefersColorScheme()}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(ot),h(Be),h(y),h(Ks),h(qe),h(vo),h(gl),h(gn),h(v9),h(Ot))},o.\u0275cmp=O({type:o,selectors:[["app-root"]],hostVars:1,hostBindings:function(t,r){t&1&&G("resize",function(s){return r.onResize(s)},!1,mA),t&2&&x("data-velt-element",r.veltElement)},inputs:{snippyly:"snippyly",signInButton:[0,"language","signInButton"],translations:"translations",_autoTranslation:[0,"autoTranslation","_autoTranslation"]},outputs:{getSnippyly:"getSnippyly"},standalone:!1,decls:3,vars:0,template:function(t,r){t&1&&w(0,"app-external-styles")(1,"velt-toast-popup")(2,"snippyly-live-state-sync-overlay")},dependencies:[dde,mde,gde],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important} snippyly-highlight-user-text.velt-live-selection-on-text-default{background-color:var(--velt-selection-color, rgba(162, 89, 254, .5333333333))!important} .velt-live-selection-on-element-default{outline:2px solid var(--velt-selection-color, #a259fe)!important} .snippyly-highlight{outline:var(--legacy-velt-comment-pin-highlight, 2px dashed #a259fe)!important} [snippyly-highlight-preview=true]{outline:2px solid green!important} body.snippyly-add-comment-mode.show-pin-cursor:not[data-velt-element], body.snippyly-add-comment-mode.show-pin-cursor[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:not[data-velt-element]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0iIzYyNURGNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9InBhdGgtMS1pbnNpZGUtMV8yMDMyXzIzNjgxIiBmaWxsPSJ3aGl0ZSI+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiLz4KPC9tYXNrPgo8cGF0aCBkPSJNMC4zNTI5NDEgMThDMC4xNTgwMTcgMTggLTYuOTA3MTVlLTA5IDE3Ljg0MiAtMS41NDI3NWUtMDggMTcuNjQ3MUwtMy45MzQwMmUtMDcgOUMtNi4xMDY3M2UtMDcgNC4wMjk0NCA0LjAyOTQ0IC0xLjc2MTMyZS0wNyA5IC0zLjkzNDAyZS0wN1YtMy45MzQwMmUtMDdDMTMuOTcwNiAtNi4xMDY3M2UtMDcgMTggNC4wMjk0NCAxOCA5VjlDMTggMTMuOTcwNiAxMy45NzA2IDE4IDkgMThMMC4zNTI5NDEgMThaIiBmaWxsPSIjMTQxNDE2Ii8+CjxwYXRoIGQ9Ik0wLjM1Mjk0MSAxOEMwLjE1ODAxNyAxOCAtNi45MDcxNWUtMDkgMTcuODQyIC0xLjU0Mjc1ZS0wOCAxNy42NDcxTC0zLjkzNDAyZS0wNyA5Qy02LjEwNjczZS0wNyA0LjAyOTQ0IDQuMDI5NDQgLTEuNzYxMzJlLTA3IDkgLTMuOTM0MDJlLTA3Vi0zLjkzNDAyZS0wN0MxMy45NzA2IC02LjEwNjczZS0wNyAxOCA0LjAyOTQ0IDE4IDlWOUMxOCAxMy45NzA2IDEzLjk3MDYgMTggOSAxOEwwLjM1Mjk0MSAxOFoiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIgbWFzaz0idXJsKCNwYXRoLTEtaW5zaWRlLTFfMjAzMl8yMzY4MSkiLz4KPC9zdmc+Cg==) 0 31,auto} body.snippyly-add-tag-mode.show-pin-cursor:not[data-velt-element], body.snippyly-add-tag-mode.show-pin-cursor[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:not[data-velt-element]{cursor:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMzIgMzIiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczpieD0iaHR0cHM6Ly9ib3h5LXN2Zy5jb20iPgogIDxlbGxpcHNlIHN0eWxlPSJzdHJva2U6IHJnYigwLCAwLCAwKTsgZmlsbDogcmdiKDE2MiwgODksIDI1NCk7IHBhaW50LW9yZGVyOiBmaWxsOyBzdHJva2Utd2lkdGg6IDBweDsiIGN4PSIxNiIgY3k9IjE2IiByeD0iMTYiIHJ5PSIxNiIvPgogIDxwYXRoIGQ9Ik0gOS4zMzMgMjIgQyA5LjMzMyAyMiA4IDIyIDggMjAuNjY3IEMgOCAxOS4zMzMgOS4zMzMgMTUuMzMzIDE2IDE1LjMzMyBDIDIyLjY2NyAxNS4zMzMgMjQgMTkuMzMzIDI0IDIwLjY2NyBDIDI0IDIyIDIyLjY2NyAyMiAyMi42NjcgMjIgTCA5LjMzMyAyMiBaIE0gMTYgMTQgQyAxOS4wNzkgMTQgMjEuMDA0IDEwLjY2NyAxOS40NjQgOCBDIDE4Ljc1IDYuNzYyIDE3LjQyOSA2IDE2IDYgQyAxMi45MjEgNiAxMC45OTYgOS4zMzMgMTIuNTM2IDEyIEMgMTMuMjUgMTMuMjM3IDE0LjU3MSAxNCAxNiAxNCBaIiBzdHlsZT0iZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyIgYng6b3JpZ2luPSIwLjUgMC41Ii8+Cjwvc3ZnPg==) 16 16,auto!important} body.snippyly-add-arrow-mode.show-pin-cursor:not[data-velt-element], body.snippyly-add-arrow-mode.show-pin-cursor[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:not[data-velt-element]{cursor:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNiAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMy44MDU0IDEwLjAyMDdDMTQuNTQxMiA5Ljk5MTMxIDE1LjExMzggOS4zNzA5OCAxNS4wODQzIDguNjM1MThMMTQuODMwNiAyLjI4OTM5QzE0LjgwMjggMS41OTQ4NiAxNC4yNDYxIDEuMDM4MTkgMTMuNTUxNiAxLjAxMDQxTDcuMjA1NzEgMC43NTY1MzdDNi40Njk5MiAwLjcyNzEwMiA1Ljg0OTU4IDEuMjk5NzIgNS44MjAxNSAyLjAzNTUxQzUuNzkwNzEgMi43NzEzIDYuMzYzMzMgMy4zOTE2NCA3LjA5OTEyIDMuNDIxMDdMMTAuNDAyMSAzLjU1MzIxTDEuMjQxNzcgMTIuNzEzNkMwLjcyMTA2NyAxMy4yMzQzIDAuNzIxMDY3IDE0LjA3ODUgMS4yNDE3NyAxNC41OTkyQzEuNzYyNDYgMTUuMTE5OSAyLjYwNjY4IDE1LjExOTkgMy4xMjczOCAxNC41OTkyTDEyLjI4NzcgNS40Mzg4NkwxMi40MTk4IDguNzQxNzVDMTIuNDQ5MiA5LjQ3NzU0IDEzLjA2OTYgMTAuMDUwMiAxMy44MDU0IDEwLjAyMDdaIiBmaWxsPSIjOEY5NUIyIi8+Cjwvc3ZnPgo=) 15 0,auto!important} .selection-element-portal{display:flex!important} .snippyly-user-marker{cursor:default;display:inline;position:relative} .snippyly-user-marker:after{color:#fff;content:attr(data-name);display:none;font-style:normal;font-weight:400;left:0;line-height:1;opacity:0;position:absolute;top:-30px;transition:opacity .2s linear,transform .3s ease-in-out;white-space:nowrap;z-index:99999;padding:4px!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit));border-radius:8px;font-family:var(--velt-default-font-family, unset);transform:translate(-50%)} .snippyly-user-marker:hover:after, .snippyly-user-marker.active:after{animation:all 1s ease-in-out;display:block;opacity:1} .snippyly-user-marker .snippyly-user-marker-line{bottom:0;height:100%;position:absolute;width:0} .snippyly-user-marker .snippyly-user-marker-line .snippyly-user-marker-dot{border-radius:50%;cursor:default;display:block;height:4px;left:50%;position:absolute;top:-3px;transform:translate(-50%,-50%);width:4px} .snippyly-user-marker:after{background-color:var(--velt-selection-marker-color)!important} .snippyly-user-marker .snippyly-user-marker-line, .snippyly-user-marker .snippyly-user-marker-dot{border:1px solid var(--velt-selection-marker-color)!important;background-color:var(--velt-selection-marker-color)!important} .v-device-info-tooltip-container{display:flex;padding:calc((.25rem + 0px) * var(--velt-base-rem-unit)) calc((.5rem + 0px) * var(--velt-base-rem-unit));margin:calc((.5rem + 0px) * var(--velt-base-rem-unit));align-items:flex-start;flex-direction:column;gap:calc((.2rem + 0px) * var(--velt-base-rem-unit));border-radius:calc((.5rem + 0px) * var(--velt-base-rem-unit));background:var(--neutrals-1, #141416);color:var(--neutrals-10, #FFF);font-size:calc((.75rem + 0px) * var(--velt-base-rem-unit));font-style:normal;font-weight:400;line-height:normal} .v-device-info-tooltip-container.dark{background:var(--neutrals-3, #353945);color:var(--neutrals-10, #FFF)} .huddle-all-menu-panel{box-shadow:0 calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((3rem + 0px) * var(--velt-base-rem-unit)) #0000002d!important;background-color:#fff!important;border-radius:8px;color:#000} .huddle-all-menu-panel .mat-mdc-menu-item{background-color:#fff!important;padding:0 calc((1rem + 0px) * var(--velt-base-rem-unit))!important;height:40px!important;min-height:40px!important;width:100%!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;gap:8px!important;align-items:center!important;border:0!important;font-weight:unset!important;text-transform:unset!important;font-family:var(--velt-default-font-family, unset)!important} .huddle-all-menu-panel .mat-mdc-menu-item .mat-mdc-menu-item-text{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;gap:8px!important;align-items:center!important;border:0!important;font-weight:unset!important;text-transform:unset!important;font-family:var(--velt-default-font-family, unset)!important} .huddle-all-menu-panel .mat-mdc-menu-item:hover{background-color:#f1f1f1!important} .huddle-all-menu-panel .mat-mdc-menu-item:disabled{color:#c4c4c4!important} .snippyly-huddle-menu-panel-overlay-panel{z-index:2147483617!important} .snippyly-huddle-banner-panel{top:0!important;left:0!important} .snippyly-huddle-banner-panel .huddle-banner{border:1px solid rgba(26,28,30,.1);box-shadow:0 2px 12px #001c3b1f;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;position:fixed;background:#fff;z-index:2;top:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;right:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#000} .snippyly-huddle-banner-panel .huddle-banner>div{display:flex} .snippyly-huddle-banner-panel .huddle-banner>div>*{padding:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-huddle-banner-panel .huddle-banner>div .title{font-weight:600;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;margin:0!important} .snippyly-huddle-banner-panel .huddle-banner>div .subtitle{font-weight:400;font-size:14px!important;line-height:21px!important;margin:0} .snippyly-huddle-banner-panel .huddle-banner>div .action-btn-container{margin:calc((.75rem + 0px) * var(--velt-base-rem-unit)) 0 calc((.25rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-huddle-banner-panel .huddle-banner>div .action-btn-container button{cursor:pointer} .snippyly-huddle-banner-panel .huddle-banner>div .join-btn{padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;background:#625df5;border-radius:90px!important;border:0;margin-right:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important;font-weight:700;transition:.2s;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-huddle-banner-panel .huddle-banner>div .join-btn:hover{background:#4742dc} .snippyly-huddle-banner-panel .huddle-banner>div .cancel-btn{color:#777e91;background:transparent;border:0;font-weight:700;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-huddle-banner-panel .huddle-banner>div .close-btn{cursor:pointer} .velt-recorder-all-tool--menu-panel{overflow:unset!important} .velt-recorder-all-tool--menu-panel .mat-mdc-menu-content{padding:0!important} .v-view-analytics-overlay-panel{z-index:2147483617!important}"],changeDetection:0});let i=o;return i})();var mi=(()=>{let o=class o{constructor(){this.subscriptions=[]}ngAfterViewInit(){this.overlay instanceof an?this.setOverlayZIndex(this.overlay):this.overlay instanceof OS?this.setMatAutocompleteZIndex(this.overlay):this.overlay instanceof HTMLElement&&this.setElementZIndex(this.overlay)}setOverlayZIndex(e){this.overlay instanceof an&&this.subscriptions.push(e.positionChange.pipe(rt(1)).subscribe(()=>{e?.overlayRef&&e?.overlayRef?.hostElement&&this.zIndex&&(e.overlayRef.hostElement.style.zIndex=this.zIndex?.toString())},t=>{}))}setMatAutocompleteZIndex(e){try{this.overlay instanceof OS&&this.subscriptions.push(e.opened.pipe(rt(1)).subscribe(()=>{setTimeout(()=>{if(e?.panel?.nativeElement){let t=e.panel.nativeElement?.closest(".cdk-overlay-connected-position-bounding-box");t&&(t.style.zIndex=this.zIndex?.toString())}},100)},t=>{}))}catch{}}setElementZIndex(e){try{this.overlay instanceof HTMLElement&&setTimeout(()=>{let t=e?.closest(".cdk-global-overlay-wrapper")||e?.closest(".cdk-overlay-connected-position-bounding-box");t&&this.zIndex&&(t.style.zIndex=this.zIndex?.toString());let a=e?.closest(".cdk-overlay-container")?.querySelector(".cdk-overlay-backdrop");a&&this.backdropZIndex&&(this.originalBackdropZIndex=a.style.zIndex,a.style.zIndex=this.backdropZIndex?.toString(),this.backdropElement=a)},100)}catch{}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()}),this.backdropElement&&this.originalBackdropZIndex&&(this.backdropElement.style.zIndex=this.originalBackdropZIndex?.toString())}catch{}}};o.\u0275fac=function(t){return new(t||o)},o.\u0275dir=Ht({type:o,selectors:[["","snippylyOverlay",""]],inputs:{overlay:[0,"snippylyOverlay","overlay"],zIndex:[0,"snippylyOverlayZIndex","zIndex"],backdropZIndex:[0,"snippylyOverlayBackdropZIndex","backdropZIndex"]},standalone:!1});let i=o;return i})();var vNe=["*"],CNe=()=>["snippyly-overlay-panel","snippyly-lightbox-overlay-panel","velt-overlay-panel"];function _Ne(i,o){if(i&1){let n=Y();_(0,"div",5),G("click",function(t){return N(n),l(2).closeImageInFullScreen(),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())}),w(1,"img",6),b()}if(i&2){let n=l(2);x("aria-label","Image Preview")("data-testid",n.componentId+"-overlay-container"),m(),d("src",n.src,vn)("alt","Image preview"),x("data-testid",n.componentId+"-image")}}function yNe(i,o){if(i&1&&(f(0),Lt(1),w(2,"div",3,0),u(4,_Ne,2,5,"ng-template",4,1,xe),v()),i&2){let n=o.ngIf,e=de(3),t=de(5),r=l();m(2),x("data-testid",r.componentId+"-trigger"),m(2),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",n.showImageInFullScreen)("cdkConnectedOverlayPanelClass",gt(7,CNe))("cdkConnectedOverlayDisableClose",!0)("snippylyOverlay",t)("snippylyOverlayZIndex",2147483627)}}var ude=(()=>{let o=class o{constructor(e,t){this.loggingService=e,this.elementRef=t,this.componentConfigSignal=Te({showImageInFullScreen:!1}),this.veltElement=!0,this.componentId="velt-lightbox";try{this.loggingService.log("%c[WB] Creating Class: LightboxComponent","color: blue;")}catch(r){this.loggingService.catch("Error in LightboxComponent constructor: ",r)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in LightboxComponent setupA11yAttributes:",e)}}openImageInFullScreen(){try{this.loggingService.log("%c[WB] LightboxComponent FUNCTION: openImageInFullScreen","color: green;"),this.componentConfigSignal.update(e=>(e=T(I({},e),{showImageInFullScreen:!0}),e))}catch(e){this.loggingService.catch("Error in LightboxComponent openImageInFullScreen: ",e)}}closeImageInFullScreen(){try{this.loggingService.log("%c[WB] LightboxComponent FUNCTION: closeImageInFullScreen","color: green;"),this.componentConfigSignal.update(e=>(e=T(I({},e),{showImageInFullScreen:!1}),e))}catch(e){this.loggingService.catch("Error in LightboxComponent closeImageInFullScreen: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-lightbox"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{src:"src"},standalone:!1,ngContentSelectors:vNe,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],[4,"ngIf"],["cdkOverlayOrigin",""],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayDisableClose","snippylyOverlay","snippylyOverlayZIndex"],["role","dialog","aria-modal","true","tabindex","-1",1,"snippyly-image-overlay-container",3,"click","pointerdown"],[3,"src","alt"]],template:function(t,r){t&1&&(jt(),u(0,yNe,6,8,"ng-container",2)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,an,nn,mi],styles:["[_nghost-%COMP%]{display:flex} .snippyly-lightbox-overlay-panel{inset:0!important} .snippyly-lightbox-overlay-panel .snippyly-image-overlay-container{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:#d3d3d37a;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:2147483627} .snippyly-lightbox-overlay-panel img{max-width:80vw;max-height:80vh;border-radius:var(--velt-border-radius-sm)}"],changeDetection:0});let i=o;return i})();var SNe=["menuRef"],bNe=["menuTrigger"],INe=["*"];function ENe(i,o){i&1&&(f(0),w(1,"button",5),v())}var Uz=(()=>{let o=class o{constructor(e){this.loggingService=e,this.menuItems=[],this.veltElement=!0}ngOnInit(){}ngAfterViewInit(){try{let e=this.menuTrigger?.nativeElement?.querySelector("[menu-items]");if(e){e.style.display="none";for(let t=0;t<e.children.length;t++){let r=e.children[t];this.menuItems.push(r)}setTimeout(()=>{this.addMenuOptions()},100)}}catch(e){this.loggingService.catch("Error in MenuComponent afterViewInit: ",e)}}ngAfterContentInit(){}addMenuOptions(){try{this.menuRef&&this.menuRef._allItems.forEach((e,t)=>{e._getHostElement()?.appendChild(this.menuItems[t])})}catch(e){this.loggingService.catch("Error in MenuComponent addMenuOptions: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-menu"]],viewQuery:function(t,r){if(t&1&&(nt(SNe,5),nt(bNe,5)),t&2){let a;Xe(a=Qe())&&(r.menuRef=a.first),Xe(a=Qe())&&(r.menuTrigger=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,ngContentSelectors:INe,decls:7,vars:4,consts:[["menuTrigger","","menuTriggerRef","matMenuTrigger"],["menuRef","matMenu"],[3,"matMenuTriggerFor"],[1,"velt-menu","snippyly-menu-panel"],[4,"ngFor","ngForOf"],["mat-menu-item",""]],template:function(t,r){if(t&1&&(jt(),_(0,"div",2,0),Lt(3),b(),_(4,"mat-menu",3,1),u(6,ENe,2,0,"ng-container",4),b()),t&2){let a=de(2),s=de(5);ue("active",a==null?null:a.menuOpen),d("matMenuTriggerFor",s),m(6),d("ngForOf",r.menuItems)}},dependencies:[vt,kl,il,Wp],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}[_nghost-%COMP%] *[_ngcontent-%COMP%]:empty{display:revert!important} .snippyly-menu-panel{box-shadow:0 calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((3rem + 0px) * var(--velt-base-rem-unit)) #0000002d!important;background-color:#fff!important;border-radius:8px!important} .snippyly-menu-panel button{background-color:#fff;padding:0 calc((1rem + 0px) * var(--velt-base-rem-unit))!important;height:40px!important;width:100%!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-menu-panel button:hover{background-color:#f1f1f1}"],changeDetection:0});let i=o;return i})();var xNe={provide:zm,useExisting:Br(()=>Ub),multi:!0},Ub=(()=>{let o=class o extends AS{};o.\u0275fac=(()=>{let e;return function(r){return(e||(e=Qa(o)))(r||o)}})(),o.\u0275dir=Ht({type:o,selectors:[["","contenteditable","","veltAutocomplete",""]],inputs:{veltAutocomplete:"veltAutocomplete"},exportAs:["snippylyUserSelectorTrigger"],standalone:!1,features:[V([xNe]),B]});let i=o;return i})();var Ls=class{constructor(){this.position={top:-1e3,left:-1e3},this.showAdder=!1,this.createAnnotation=()=>{},this.disabled=!1,this.commentToolEnabled=!0,this.isPlanExpired=!1,this.isUserAllowed=!1,this.enableTextComments=!1,this.user=null,this.rewriterEnabled=!1,this.left=0,this.createRewriter=()=>{},this.selectedWordsCount=0,this.selectedCharactersCount=0,this.MIN_ALLOWED_WORDS_COUNT=3,this.MIN_ALLOWED_CHARACTERS_COUNT=7,this.MAX_ALLOWED_CHARACTERS_COUNT=8e3}};var hde=i=>({componentConfigSignal:i}),TNe=(i,o)=>({condition:i,data:o}),DNe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-tool-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function wNe(i,o){i&1&&Ue(0)}function ONe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,wNe,1,0,"ng-container",2),b()),i&2){l();let n=de(2);m(),d("ngTemplateOutlet",n)}}function ANe(i,o){i&1&&(_(0,"div",8),le(),_(1,"svg",9)(2,"mask",10),w(3,"path",11),b(),w(4,"path",12)(5,"path",13),b()())}function PNe(i,o){if(i&1){let n=Y();_(0,"div",6),P(1,"translate"),G("pointerdown",function(t){return N(n),l(2).ngIf.createAnnotation(),F(t.stopPropagation())}),u(2,ANe,6,0,"div",7),b()}if(i&2){let n=l(2).ngIf,e=l(2);it("top",n.position.top,"px")("left",n.position.left,"px")("visibility",n.showAdder?"visible":"hidden"),x("data-testid",e.componentId)("role","button")("aria-label",M(1,12,"Add text comment"))("aria-disabled",!n.commentToolEnabled)("tabindex",0),m(2),d("veltDynamicTemplate",$(16,DNe,e.template,A(14,hde,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function MNe(i,o){if(i&1&&(f(0),u(1,PNe,3,22,"div",5),v()),i&2){let n=l().ngIf;m(),d("ngIf",n&&!n.disabled&&n.commentToolEnabled&&!n.isPlanExpired&&n.isUserAllowed&&n.enableTextComments&&(n.user==null?null:n.user.userId)&&!n.rewriterEnabled)}}function kNe(i,o){if(i&1&&(f(0),u(1,MNe,2,1,"ng-container",4),v()),i&2){let n=l(2);m(),d("veltIf",k(3,TNe,n.conditionSignal(),A(1,hde,n.componentConfigSignal)))}}function RNe(i,o){if(i&1&&u(0,kNe,2,6,"ng-container",3),i&2){let n=l();d("ngIf",n.componentConfigSignal())}}var w0=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c){super(a,s,void 0,r,r.getTextCommentToolDarkMode$(),c,e),this.loggingService=e,this.wireframeService=t,this.commentService=r,this.elementRef=a,this.themeService=s,this.dynamicDataService=c,this.textCommentToolShadowDOM=!1,this.subscriptions=[],this.componentId="velt-text-comment-tool",super.initializeComponentConfigSignal(new Ls),this.subscriptions.push(this.commentService.getTextCommentToolShadowDOM$().subscribe(p=>{this.textCommentToolShadowDOM=p},p=>{this.loggingService.catch("Error in TextCommentToolComponent getTextCommentToolShadowDOM$ subscription: ",p)}))}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes(),this.subscriptions.push(this.wireframeService.getWireframe$("velt-text-comment-tool-wireframe").subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in CommentBubbleComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Add text comment"),e.setAttribute("tabindex","0");let t=this.componentConfigSignal();e.setAttribute("aria-disabled",String(!t.commentToolEnabled))}catch(e){this.loggingService.catch("Error in TextCommentToolComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(De),h(R),h(qe),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-tool"]],standalone:!1,features:[V([S]),B],decls:3,vars:2,consts:[["textCommentContainerRef",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[4,"ngIf"],[4,"veltIf"],["class","velt-text-comment-tool",3,"top","left","visibility","pointerdown",4,"ngIf"],[1,"velt-text-comment-tool",3,"pointerdown"],["class","velt-text-comment-tool--container",4,"veltDynamicTemplate"],[1,"velt-text-comment-tool--container"],["width","32","height","32","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","role","img","aria-hidden","true","focusable","false"],["id","path-1-inside-1_2032_23681","fill","white"],["d","M0.352941 18C0.158017 18 -6.90715e-09 17.842 -1.54275e-08 17.6471L-3.93402e-07 9C-6.10673e-07 4.02944 4.02944 -1.76132e-07 9 -3.93402e-07C13.9706 -6.10673e-07 18 4.02944 18 9C18 13.9706 13.9706 18 9 18L0.352941 18Z"],["d","M0.352941 18C0.158017 18 -6.90715e-09 17.842 -1.54275e-08 17.6471L-3.93402e-07 9C-6.10673e-07 4.02944 4.02944 -1.76132e-07 9 -3.93402e-07C13.9706 -6.10673e-07 18 4.02944 18 9C18 13.9706 13.9706 18 9 18L0.352941 18Z","fill","#625DF5"],["d","M0.352941 18C0.158017 18 -6.90715e-09 17.842 -1.54275e-08 17.6471L-3.93402e-07 9C-6.10673e-07 4.02944 4.02944 -1.76132e-07 9 -3.93402e-07C13.9706 -6.10673e-07 18 4.02944 18 9C18 13.9706 13.9706 18 9 18L0.352941 18Z","stroke","white","stroke-width","2","mask","url(#path-1-inside-1_2032_23681)"]],template:function(t,r){if(t&1&&u(0,ONe,2,1,"velt-shadow-dom-internal",1)(1,RNe,1,1,"ng-template",null,0,xe),t&2){let a=de(2);d("ngIf",!r.template&&r.textCommentToolShadowDOM)("ngIfElse",a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-text-comment-tool[_ngcontent-%COMP%]{position:fixed;z-index:2147483577;overflow-wrap:break-word;font-size:var(--velt-font-size-xs);text-align:center;visibility:hidden;cursor:pointer}.velt-text-comment-tool[_ngcontent-%COMP%] .velt-text-comment-tool--container[_ngcontent-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var fde=i=>({componentConfigSignal:i}),FNe=(i,o)=>({condition:i,data:o}),LNe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-toolbar-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function BNe(i,o){i&1&&Ue(0)}function VNe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,BNe,1,0,"ng-container",2),b()),i&2){l();let n=de(2);m(),d("ngTemplateOutlet",n)}}function UNe(i,o){if(i&1&&w(0,"app-text-comment-toolbar-comment-annotation",10),i&2){let n=l(6);d("componentConfigSignal",n.componentConfigSignal)}}function jNe(i,o){i&1&&w(0,"app-text-comment-toolbar-divider")}function $Ne(i,o){if(i&1&&(_(0,"div",8),u(1,UNe,1,1,"app-text-comment-toolbar-comment-annotation",9)(2,jNe,1,0,"app-text-comment-toolbar-divider",3),w(3,"app-text-comment-toolbar-copywriter",10)(4,"app-text-comment-toolbar-generic",10),b()),i&2){let n=l(3).ngIf,e=l(2);m(),d("ngIf",n.commentToolEnabled),m(),d("ngIf",n.commentToolEnabled),m(),d("componentConfigSignal",e.componentConfigSignal),m(),d("componentConfigSignal",e.componentConfigSignal)}}function HNe(i,o){if(i&1){let n=Y();_(0,"div",6),P(1,"translate"),G("click",function(t){return N(n),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),F(t.stopPropagation())}),u(2,$Ne,5,4,"div",7),b()}if(i&2){let n=l(2).ngIf,e=l(2);it("top",n.position.top,"px")("left",n.left,"px")("visibility",n.showAdder?"visible":"hidden")("top",n.position.top,"px")("left",n.left,"px")("visibility",n.showAdder?"visible":"hidden"),x("data-testid",e.componentId)("role","toolbar")("aria-label",M(1,17,"Text comment tools"))("aria-hidden",!n.showAdder),m(2),d("veltDynamicTemplate",$(21,LNe,e.template,A(19,fde,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function zNe(i,o){if(i&1&&(f(0),u(1,HNe,3,27,"div",5),v()),i&2){let n=l().ngIf;m(),d("ngIf",n&&!n.disabled&&!n.isPlanExpired&&n.isUserAllowed&&n.enableTextComments&&(n.user==null?null:n.user.userId)&&n.rewriterEnabled)}}function GNe(i,o){if(i&1&&(f(0),u(1,zNe,2,1,"ng-container",4),v()),i&2){let n=l(2);m(),d("veltIf",k(3,FNe,n.conditionSignal(),A(1,fde,n.componentConfigSignal)))}}function WNe(i,o){if(i&1&&u(0,GNe,2,6,"ng-container",3),i&2){let n=l();d("ngIf",n.componentConfigSignal())}}var O0=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c){super(a,s,void 0,r,r.getTextCommentToolbarDarkMode$(),c,e),this.loggingService=e,this.wireframeService=t,this.commentService=r,this.elementRef=a,this.themeService=s,this.dynamicDataService=c,this.textCommentToolbarShadowDOM=!1,this.subscriptions=[],this.componentId="velt-text-comment-toolbar",super.initializeComponentConfigSignal(new Ls),this.subscriptions.push(this.commentService.getTextCommentToolbarShadowDOM$().subscribe(p=>{this.textCommentToolbarShadowDOM=p},p=>{this.loggingService.catch("Error in CommentPinComponent getTextCommentToolbarShadowDOM$ subscription: ",p)}))}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes(),this.subscriptions.push(this.wireframeService.getWireframe$("velt-text-comment-toolbar-wireframe").subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in CommentBubbleComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","toolbar"),e.setAttribute("aria-label","Text comment tools")}catch(e){this.loggingService.catch("Error in TextCommentToolbarComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(De),h(R),h(qe),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-toolbar"]],standalone:!1,features:[V([S]),B],decls:3,vars:2,consts:[["textCommentToolbarContainerRef",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[4,"ngIf"],[4,"veltIf"],["class","velt-text-comment-toolbar",3,"top","left","visibility","click","pointerdown","pointerup",4,"ngIf"],[1,"velt-text-comment-toolbar",3,"click","pointerdown","pointerup"],["class","velt-text-comment-toolbar--container",4,"veltDynamicTemplate"],[1,"velt-text-comment-toolbar--container"],[3,"componentConfigSignal",4,"ngIf"],[3,"componentConfigSignal"]],template:function(t,r){if(t&1&&u(0,VNe,2,1,"velt-shadow-dom-internal",1)(1,WNe,1,1,"ng-template",null,0,xe),t&2){let a=de(2);d("ngIf",!r.template&&r.textCommentToolbarShadowDOM)("ngIfElse",a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-text-comment-toolbar[_ngcontent-%COMP%]{position:fixed;z-index:99999;transform:translate(-50%)}.velt-text-comment-toolbar--container[_ngcontent-%COMP%]{width:max-content;display:flex;align-items:center;padding:var(--velt-spacing-xs) var(--velt-spacing-sm);gap:var(--velt-spacing-sm);background:var(--velt-background-0);border:var(--velt-border-4);box-shadow:0 8px 16px #8f95b226;border-radius:var(--velt-border-radius-full);color:var(--velt-text-0)}"],changeDetection:0});let i=o;return i})();var YNe=["commentAdderRef"],vde=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,g){this.analyticsService=e,this.authService=t,this.domService=r,this.iamService=a,this.commentService=s,this.loggingService=c,this.rewriterService=p,this.elementRef=g,this.componentConfigSignal=Te({position:{top:-1e3,left:-1e3},showAdder:!1,createAnnotation:this.createAnnotation.bind(this),disabled:!1,commentToolEnabled:!0,isPlanExpired:!1,isUserAllowed:!1,enableTextComments:!1,user:null,rewriterEnabled:!1,left:0,createRewriter:this.createRewriter.bind(this),selectedWordsCount:0,selectedCharactersCount:0,MIN_ALLOWED_WORDS_COUNT:3,MIN_ALLOWED_CHARACTERS_COUNT:7,MAX_ALLOWED_CHARACTERS_COUNT:8e3,variant:this.variant}),this.allowedElementIds=[],this.selectedCharactersCount=0,this.subscriptions=[],this.veltElement=!0,this.componentId="velt-comment-adder",this.subscriptions.push(this.commentService.getTextCommentMode$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{enableTextComments:C}),E))},C=>{this.loggingService.catch("Error in CommentAdderComponent getTextCommentMode$ subscription: ",C)})),this.subscriptions.push(this.commentService.getAllowedElementIds().subscribe(C=>{this.allowedElementIds=C},C=>{this.loggingService.catch("Error in CommentAdderComponent getAllowedElementIds subscription: ",C)})),this.subscriptions.push(this.commentService.getCommentTool$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{commentToolEnabled:C}),E))})),this.subscriptions.push(this.iamService.getFeaturesAccessLevel$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{disabled:!!C?.all?.disabled}),E))})),this.subscriptions.push(this.authService.getUser$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{user:C}),E))},C=>{this.loggingService.catch("Error in CommentAdderComponent getUser$ subscription: ",C)})),this.subscriptions.push(this.rewriterService.getRewriterEnabled$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{rewriterEnabled:C}),E))},C=>{this.loggingService.catch("Error in CommentAdderComponent getRewriterEnabled$ subscription: ",C)})),this.subscriptions.push(this.iamService.isUserAllowed$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{isUserAllowed:C}),E))},C=>{this.loggingService.catch("Error in CommentAdderComponent isUserAllowed$ subscription: ",C)})),this.subscriptions.push(this.authService.isPlanExpired$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{isPlanExpired:C}),E))},C=>{this.loggingService.catch("Error in CommentAdderComponent isPlanExpired$ subscription: ",C)}))}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in CommentAdderComponent ngOnChanges: ",t)}}ngOnInit(){this.setupA11yAttributes(),this.domService.onSelectionChange$().subscribe(()=>{try{if(this.componentConfigSignal().enableTextComments&&this.componentConfigSignal().user&&!(this.componentConfigSignal().user?.isReadOnly||this.componentConfigSignal().user?.isAnonymous)&&this.authService.isFeatureAllowed(Re.COMMENT)){if(window.getSelection()?.toString()){let e=window.getSelection()?.toString(),t=iM(e||"").join(" ");this.componentConfigSignal.update(r=>(r=T(I({},r),{selectedWordsCount:t?.split(" ").length||0,selectedCharactersCount:t?.length||0}),r))}else this.componentConfigSignal.update(e=>(e=T(I({},e),{selectedWordsCount:0,selectedCharactersCount:0}),e));if(window.getSelection()?.toString()&&!oM()){let e=window.getSelection()?.getRangeAt(0);e.commonAncestorContainer&&this.commentService.isElementInsideAllowedElements(e.commonAncestorContainer)&&(Wm(e.commonAncestorContainer)?this.clearSelection():(this.onSelection(),this.subscribeScrollChange()))}else this.clearSelection()}else this.clearSelection()}catch(e){this.loggingService.catch("Error in CommentAdderComponent onSelectionChange$: ",e)}},e=>{this.loggingService.catch("Error in CommentAdderComponent onSelectionChange$ subscription: ",e)})}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","application"),e.setAttribute("aria-label","Text comment adder")}catch(e){this.loggingService.catch("Error in CommentAdderComponent setupA11yAttributes:",e)}}subscribeScrollChange(){try{this.loggingService.log("%c[WB] Calling FUNCTION: subscribeScrollChange","color: green;"),this.scrollChangeSubscription&&this.scrollChangeSubscription.unsubscribe(),this.scrollChangeSubscription=fn([this.domService.onWindowPointerUp$(),this.domService.getCurrentWindowSize$()]).subscribe(()=>{this.onSelection()})}catch(e){this.loggingService.catch("Error in CommentAdderComponent subscribeScrollChange: ",e)}}onSelection(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onSelection","color: green;");let e=this.domService.getRange();if(e?.commonAncestorContainer){let t=e.getClientRects();if(t.length){let r=t[t.length-1];this.componentConfigSignal.update(a=>(a=T(I({},a),{position:{top:r.y+r.height+(a.rewriterEnabled?16:4),left:r.x+r.width-16}}),a)),this.onPositionUpdate(),this.componentConfigSignal.update(a=>(a=T(I({},a),{showAdder:!0}),a))}else this.clearSelection()}}catch(e){this.loggingService.catch("Error in CommentAdderComponent onSelection: ",e)}}createAnnotation(e,t){return Q(this,null,function*(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: createAnnotation","color: green;"),yield Rd(200),this.componentConfigSignal().user){let r=this.domService.getRange(),a=r?this.domService.getTargetTextRangeFromSelectionRange(r):void 0;this.domService.clearTextSelection(),setTimeout(()=>{if(e)this.rewriterService.addRewriter(void 0,a,t);else{let s=r?.commonAncestorContainer;s&&s.nodeType===Node.TEXT_NODE&&(s=s.parentElement);let c=this.commentService.getInlineCommentSectionConfig(s);this.commentService.addComment(void 0,a,void 0,void 0,void 0,void 0,void 0,void 0,c)}},100)}}catch(r){this.loggingService.catch("Error in CommentAdderComponent createAnnotation: ",r)}})}createRewriter(e){return Q(this,null,function*(){try{this.loggingService.log("%c[WB] Calling FUNCTION: createRewriter","color: green;"),this.componentConfigSignal().selectedWordsCount>=this.componentConfigSignal().MIN_ALLOWED_WORDS_COUNT&&this.componentConfigSignal().selectedCharactersCount>=this.componentConfigSignal().MIN_ALLOWED_CHARACTERS_COUNT&&this.componentConfigSignal().selectedCharactersCount<this.componentConfigSignal().MAX_ALLOWED_CHARACTERS_COUNT?(this.createAnnotation(!0,e),e==="copywriter"?this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_BUTTON_CLICKED,{charactersSelected:this.componentConfigSignal().selectedCharactersCount,wordsSelected:this.componentConfigSignal().selectedWordsCount,isMobileDevice:this.domService.isMobileDevice()}):this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_PROMPT_BUTTON_CLICKED,{charactersSelected:this.componentConfigSignal().selectedCharactersCount,wordsSelected:this.componentConfigSignal().selectedWordsCount,isMobileDevice:this.domService.isMobileDevice()})):this.componentConfigSignal().selectedCharactersCount<this.componentConfigSignal().MIN_ALLOWED_CHARACTERS_COUNT?this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITER_MIN_CHARACTER_NOT_MET,{minCharacterAllowed:this.componentConfigSignal().MIN_ALLOWED_CHARACTERS_COUNT,charactersSelected:this.componentConfigSignal().selectedCharactersCount,isMobileDevice:this.domService.isMobileDevice()}):this.componentConfigSignal().selectedCharactersCount>this.componentConfigSignal().MAX_ALLOWED_CHARACTERS_COUNT&&this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITER_MAX_CHARACTER_NOT_MET,{maxCharacterAllowed:this.componentConfigSignal().MAX_ALLOWED_CHARACTERS_COUNT,charactersSelected:this.componentConfigSignal().selectedCharactersCount,isMobileDevice:this.domService.isMobileDevice()})}catch(t){this.loggingService.catch("Error in CommentAdderComponent createRewriter: ",t)}})}clearSelection(){try{this.loggingService.log("%c[WB] Calling FUNCTION: clearSelection","color: green;"),this.componentConfigSignal.update(e=>(e=T(I({},e),{showAdder:!1,position:{top:-1e3,left:-1e3}}),e)),this.onPositionUpdate(),this.scrollChangeSubscription&&this.scrollChangeSubscription.unsubscribe()}catch(e){this.loggingService.catch("Error in CommentAdderComponent clearSelection: ",e)}}onPositionUpdate(){try{let e=this.commentAdderRef?.nativeElement.getBoundingClientRect(),t=0,r=0;e&&(t=e.width/2,r=window.innerWidth-e.width/2);let a=this.componentConfigSignal().position.left;a<t&&(a=t),a>r&&(a=r),this.componentConfigSignal().position.left<0&&(a=this.componentConfigSignal().position.left),this.componentConfigSignal.update(s=>(s=T(I({},s),{left:a}),s))}catch(e){this.loggingService.catch("Error in CommentAdderComponent onPositionUpdate: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in CommentAdderComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in CommentAdderComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ve),h(Be),h(_n),h(De),h(y),h(Gc),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-adder"]],viewQuery:function(t,r){if(t&1&&nt(YNe,5),t&2){let a;Xe(a=Qe())&&(r.commentAdderRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{variant:"variant"},standalone:!1,features:[Ze],decls:4,vars:7,consts:[["commentAdderRef",""],[3,"componentConfigSignal"]],template:function(t,r){t&1&&(w(0,"app-text-comment-tool",1),_(1,"div",null,0),w(3,"app-text-comment-toolbar",1),b()),t&2&&(d("componentConfigSignal",r.componentConfigSignal),x("data-testid",r.componentId+"-tool"),m(),x("data-testid",r.componentId+"-toolbar-container")("role","toolbar")("aria-label","Text comment tools")("aria-hidden",!r.componentConfigSignal().showAdder),m(2),d("componentConfigSignal",r.componentConfigSignal))},dependencies:[w0,O0],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));-webkit-user-select:none;-ms-user-select:none;user-select:none}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert}"],changeDetection:0});let i=o;return i})();var ZNe=["overlay"],XNe=()=>["snippyly-overlay-panel","velt-overlay-panel"];function QNe(i,o){if(i&1&&w(0,"span",8),i&2){let n,e=l().ngIf;ue("index-3-digit",(e.commentPinAnnotation==null||e.commentPinAnnotation.annotationIndex==null||(n=e.commentPinAnnotation.annotationIndex.toString())==null?null:n.length)===3),x("data-comment-annotation-number","#"+(e.commentPinAnnotation==null?null:e.commentPinAnnotation.annotationIndex))}}function JNe(i,o){if(i&1){let n=Y();f(0),_(1,"velt-multi-thread-comment-dialog-internal",10),G("saveComment",function(t){N(n);let r=l(3);return F(r.saveComment(t))})("pointerUp",function(t){N(n);let r=l(3);return F(r.togglePinSelection(t))}),b(),v()}if(i&2){let n=l(2).ngIf;m(),d("multiThreadAnnotationId",n.commentPinAnnotation.annotationId)("annotation",n.commentPinAnnotation)("user",n.user)("commentPinSelected",n.commentPinSelected)}}function eFe(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-dialog",11),G("saveComment",function(t){N(n);let r=l(3);return F(r.saveComment(t))}),b()}if(i&2){let n=l(2).ngIf;d("annotation",n.commentPinAnnotation)("user",n.user)("commentPinSelected",n.commentPinSelected)("inlineCommentMode",n.inlineCommentMode)("isInsidePdfViewer",n.isInsidePdfViewer)}}function tFe(i,o){if(i&1&&u(0,JNe,2,4,"ng-container",9)(1,eFe,1,5,"ng-template",null,2,xe),i&2){let n=de(2),e=l().ngIf;d("ngIf",(e==null||e.commentPinAnnotation==null?null:e.commentPinAnnotation.type)==="multiThread")("ngIfElse",n)}}function nFe(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-bottom-sheet",12),G("saveComment",function(t){N(n);let r=l(2);return F(r.saveComment(t))}),b()}if(i&2){let n=l().ngIf;d("annotation",n.commentPinAnnotation)("user",n.user)("isInsidePdfViewer",n.isInsidePdfViewer)}}function iFe(i,o){if(i&1){let n=Y();f(0),_(1,"snippyly-comment-text",4,0),G("pointerover",function(t){return N(n),l().onPointerOver(t),F(t.stopPropagation())})("pointerout",function(){N(n);let t=l();return F(t.onPointerOut())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),l().togglePinSelection(),F(t.stopPropagation())})("touchend",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("click",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())}),b(),u(3,QNe,1,3,"span",5)(4,tFe,3,2,"ng-template",6,1,xe)(6,nFe,1,3,"snippyly-comment-bottom-sheet",7),v()}if(i&2){let n=o.ngIf,e=de(2),t=l();m(),ue("inline-comment-mode",n.inlineCommentMode&&!n.isInsidePdfViewer)("selected",n.commentPinHover||n.commentPinSelected),m(2),d("ngIf",n.last&&n.showCommentIndex&&(n.commentPinAnnotation==null?null:n.commentPinAnnotation.annotationIndex)),m(),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",(!n.mobileMode||!n.isPhone)&&!n.inboxMode&&!n.streamMode&&(!n.inlineCommentMode||n.isInsidePdfViewer)&&n.floatingCommentsEnabled&&(n.textClicked&&n.commentPinSelected||n.commentPinHover&&!n.commentPinSelected))("cdkConnectedOverlayOffsetY",n.overlayOriginY==="top"?-8:2)("cdkConnectedOverlayPanelClass",gt(15,XNe))("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayPositions",t.positions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0),m(2),d("ngIf",(n==null?null:n.user)&&n.mobileMode&&n.isPhone&&!n.sidebarVisible&&(!n.inlineCommentMode||n.isInsidePdfViewer)&&!n.inboxMode&&!n.streamMode&&n.floatingCommentsEnabled&&n.textClicked&&n.commentPinSelected)}}var _9=(()=>{let o=class o{onEnter(e){this.onKeyupEnter&&this.onKeyupEnter()}constructor(e,t,r,a,s,c,p,g){this.analyticsService=e,this.authService=t,this.breakpointObserver=r,this.domService=a,this.commentService=s,this.loggingService=c,this.recorderService=p,this.elementRef=g,this.subscriptions=[],this.selectedAnnotationsMap={},this.customScrollableParentEventsListenersSubscriptions=[],this.isDialogOnHoverEnabled=!1,this.componentConfigSignal=Te({inlineCommentMode:!1,isInsidePdfViewer:!1,commentPinHover:!1,commentPinSelected:!1,first:!1,last:!1,showCommentIndex:!1,commentPinAnnotation:null,isPhone:!1,mobileMode:!1,streamMode:!1,inboxMode:!1,textClicked:!1,floatingCommentsEnabled:!0,sidebarVisible:!1,user:null,overlayOriginX:"start",overlayOriginY:"top"}),this.positions=j.OVERLAY_POSITIONS.map(C=>new xi({originX:C.originX,originY:C.originY},{overlayX:C.overlayX,overlayY:C.overlayY})),this.veltElement=!0,this.componentId="velt-comment-text-portal",this.subscriptions.push(this.authService.getUser$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{user:C}),E))},C=>{this.catchError("Error in CommentTextPortalComponent getUser$ subscription: ",C)})),this.subscriptions.push(this.commentService.getSidebarVisibility$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{sidebarVisible:C}),E))},C=>{this.catchError("Error in CommentTextPortalComponent getSidebarVisibility$ subscription: ",C)})),this.subscriptions.push(this.commentService.showFloatingComments$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{floatingCommentsEnabled:C}),E))},C=>{this.catchError("Error in CommentTextPortalComponent showFloatingComments$ subscription: ",C)})),this.subscriptions.push(this.commentService.getShowCommentIndex().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{showCommentIndex:C}),E))},C=>{this.catchError("Error in CommentTextPortalComponent getShowCommentIndex subscription: ",C)})),this.subscriptions.push(this.commentService.getEnableDialogOnHover$().subscribe(C=>{this.isDialogOnHoverEnabled=C},C=>{this.catchError("Error in CommentPinComponent getEnableDialogOnHover subscription: ",C)})),this.subscriptions.push(this.breakpointObserver.observe(Li.XSmall).subscribe(C=>{let E=!1;C.matches?E=!0:E=!1,this.componentConfigSignal.update(D=>(D=T(I({},D),{isPhone:E}),D))},C=>{this.catchError("Error in CommentTextPortalComponent breakpointObserver subscription: ",C)}))}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentTextPortalComponent ngOnInit:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentTextPortalComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{let e=this.element.childNodes[0];this.element.childNodes[1].childNodes[0].appendChild(e),this.componentConfigSignal.update(r=>{let a=Rv(this.element,j.ATTRIBUTES.VELT_PDF_VIEWER);return r=T(I({},r),{isInsidePdfViewer:a}),r}),this.subscriptions.push(this.overlay?.positionChange?.subscribe(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{overlayOriginX:r.connectionPair.originX,overlayOriginY:r.connectionPair.originY}),a))},r=>{this.catchError("Error in CommentTextPortalComponent positionChange subscription: ",r)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(r=>{this.selectedAnnotationsMap=r,this.checkPinSelection()},r=>{this.catchError("Error in CommentTextPortalComponent getSelectedAnnotationsMap$ subscription: ",r)})),this.subscriptions.push(this.commentService.getStreamMode$().subscribe(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{streamMode:r}),a))},r=>{this.catchError("Error in CommentTextPortalComponent getStreamMode$ subscription: ",r)})),this.subscriptions.push(this.commentService.getInboxMode$().subscribe(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{inboxMode:r}),a))},r=>{this.catchError("Error in CommentTextPortalComponent getInboxMode subscription: ",r)})),this.subscriptions.push(this.commentService.getMobileMode$().subscribe(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{mobileMode:r}),a))},r=>{this.catchError("Error in CommentTextPortalComponent getMobileMode$ subscription: ",r)})),this.subscriptions.push(this.commentService.getInlineCommentMode$().subscribe(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{inlineCommentMode:r}),a))},r=>{this.catchError("Error in CommentTextPortalComponent getInlineCommentMode$ subscription: ",r)})),this.subscriptions.push(this.recorderService.onInitRecording().subscribe(r=>{this.recorderInitConfig=r},r=>{this.catchError("Error in CommentTextPortalComponent onInitRecording subscription: ",r)}))}catch(e){this.catchError("Error in CommentTextPortalComponent AfterViewInit: ",e)}}setFirst(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{first:e}),t))}catch(t){this.catchError("Error in CommentTextPortalComponent setFirst: ",t)}}setLast(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{last:e}),t))}catch(t){this.catchError("Error in CommentTextPortalComponent setLast: ",t)}}setCommentPinAnnotation(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinAnnotation:e}),t))}catch(t){this.catchError("Error in CommentTextPortalComponent setCommentPinAnnotation: ",t)}}setElement(e){try{this.element=e,this.element?this.customScrollableParents=Kp(this.element):this.customScrollableParents=[],this.addCustomScrollableParentsEventListeners()}catch(t){this.catchError("Error in CommentTextPortalComponent setElement: ",t)}}checkPinSelection(){try{this.selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation?.annotationId]?this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinSelected:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinSelected:!1,textClicked:!1}),e)),sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID)===this.componentConfigSignal().commentPinAnnotation.annotationId&&this.componentConfigSignal().last&&(this.componentConfigSignal.update(e=>(e=T(I({},e),{textClicked:!0}),e)),sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID))}catch(e){this.catchError("Error in CommentTextPortalComponent checkPinSelection: ",e)}}onPointerOver(e){try{if(this.componentConfigSignal().commentPinHover)return;e.buttons?this.componentConfigSignal().commentPinHover&&this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinHover:!1}),t)):!this.componentConfigSignal().commentPinHover&&this.isDialogOnHoverEnabled&&this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinHover:!0}),t))}catch(t){this.catchError("Error in CommentTextPortalComponent onPointerOver: ",t)}}onPointerOut(){this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinHover:!1}),e))}togglePinSelection(e){try{if(this.recorderInitConfig?.isCommentRecording||this.componentConfigSignal().textClicked&&!e)return;let t=e||this.componentConfigSignal().commentPinAnnotation;if(this.selectedAnnotationsMap[t.annotationId])e||(document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t?.annotationId}"]`)?this.domService.resetSelectedAnnotationsMap(!0,"comments"):(this.componentConfigSignal.update(a=>(a=T(I({},a),{textClicked:!0}),a)),this.domService.toggleAnnotationSelection(t)));else{let r=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(r||(r=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),r){let a=r.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(a){let s=document.getElementById(`comment-pin-container-${a}`)||document.querySelector(`[data-velt-id='${a}']`);s&&(s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.componentConfigSignal.update(a=>(a=T(I({},a),{textClicked:!0}),a)),this.domService.toggleAnnotationSelection(t)}}catch(t){this.catchError("Error in CommentTextPortalComponent togglePinSelection: ",t)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(t){this.catchError("Error in CommentTextPortalComponent saveComment: ",t)}}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().commentPinAnnotation?.annotationId),this.overlay&&this.overlay?.overlayRef?.updatePosition()}catch(e){this.catchError("Error in CommentTextPortalComponent updateOverlayPosition: ",e)}}addCustomScrollableParentsEventListeners(){try{this.removeCustomScrollableParentsEventListeners(),this.customScrollableParents?.length&&this.customScrollableParents?.forEach(e=>{this.customScrollableParentEventsListenersSubscriptions.push(pi(e,"scroll").subscribe(t=>{this.updateOverlayPosition()},t=>{this.catchError("Error in CommentTextPortalComponent addCustomScrollableParentsEventListeners scroll subscription: ",t)}))})}catch(e){this.catchError("Error in CommentTextPortalComponent addCustomScrollableParentsEventListeners: ",e)}}removeCustomScrollableParentsEventListeners(){try{this.customScrollableParentEventsListenersSubscriptions.map(e=>{e.unsubscribe()}),this.customScrollableParentEventsListenersSubscriptions=[]}catch(e){this.catchError("Error in CommentTextPortalComponent removeCustomScrollableParentsEventListeners: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.removeCustomScrollableParentsEventListeners(),this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.catchError("Error in CommentTextPortalComponent unsubscribe: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ve),h(vo),h(Be),h(De),h(y),h(In),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-text-portal"]],viewQuery:function(t,r){if(t&1&&nt(ZNe,5),t&2){let a;Xe(a=Qe())&&(r.overlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&1&&G("keyup.enter",function(s){return r.onEnter(s)},!1,pA),t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],["commentDialogRef",""],[4,"ngIf"],["cdkOverlayOrigin","","data-velt-comment-disabled","true",1,"comment-text-highlight",3,"pointerover","pointerout","pointerdown","pointerup","touchend","click"],["class","comment-annotation-number",3,"index-3-digit",4,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayOffsetY","cdkConnectedOverlayPanelClass","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],[3,"annotation","user","isInsidePdfViewer","saveComment",4,"ngIf"],[1,"comment-annotation-number"],[4,"ngIf","ngIfElse"],[3,"saveComment","pointerUp","multiThreadAnnotationId","annotation","user","commentPinSelected"],[3,"saveComment","annotation","user","commentPinSelected","inlineCommentMode","isInsidePdfViewer"],[3,"saveComment","annotation","user","isInsidePdfViewer"]],template:function(t,r){t&1&&u(0,iFe,7,16,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;margin:0;padding:0;height:inherit;width:inherit;text-align:inherit;line-height:inherit;font-size:inherit;text-transform:inherit;float:inherit;-webkit-text-fill-color:initial}*[_ngcontent-%COMP%]:empty{display:revert}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);font-family:inherit}.comment-text-highlight[_ngcontent-%COMP%]{cursor:pointer} snippyly-text-highlight.snippyly-text-highlight{color:var(--velt-black)} snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight{color:var(--velt-warning-hover);background-color:var(--velt-warning-transparent);border-bottom:1px solid var(--velt-warning-hover)} snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.selected{color:var(--velt-black);background-color:var(--velt-warning)} snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.inline-comment-mode{background-color:inherit} snippyly-text-highlight.snippyly-text-highlight .comment-text-highlight.inline-comment-mode.selected{background-color:inherit}.comment-annotation-number[_ngcontent-%COMP%]{border-radius:50%;border:1px solid var(--velt-gray);width:20px;height:20px;font-size:calc((.7rem + 0px) * var(--velt-base-rem-unit));display:inline-flex;justify-content:center;align-items:center;box-sizing:content-box;background:var(--velt-white);color:var(--velt-black);position:relative}.comment-annotation-number.index-3-digit[_ngcontent-%COMP%]{width:32px;height:32px}.comment-annotation-number[_ngcontent-%COMP%]:after{content:attr(data-comment-annotation-number);position:absolute;font-weight:400;letter-spacing:normal;word-spacing:normal}"],changeDetection:0});let i=o;return i})();var y9=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.docService=e,this.domService=t,this.commentService=r,this.componentFactoryResolver=a,this.injector=s,this.appRef=c,this.loggingService=p,this.commentsTextById={},this.commonAncestorElementObservers=new Map,this.commonAncestorElementObserverCounts=new Map,this.inlineCommentMode=!1;try{this.commentService.getInlineCommentMode$().subscribe(g=>{this.inlineCommentMode=g})}catch(g){this.loggingService.catch("Error in CommentPinPortalService constructor: ",g)}}updateTextCommentAnnotations(e){try{this.checkToRemoveTextCommentAnnotations(e),e.forEach(t=>{this.updateTextCommentAnnotation(t)})}catch(t){this.loggingService.catch("Error in CommentPinPortalService updateTextCommentAnnotations: ",t)}}updateTextCommentAnnotation(e){let t=this.commentsTextById[e.annotationId];if(t)if(Ii(t?.annotation?.targetTextRange,e?.targetTextRange)){let r=!1;t?.texts?.length?t.texts.forEach(a=>{document.body.contains(a?.textNode)||(r=!0)}):r=!0,r?(this.removeTextCommentAnnotation(e),this.getCommonAncestorContainer(e)):t.texts.forEach(a=>{a.portalRef&&a.portalRef.instance.setCommentPinAnnotation(e)})}else this.removeTextCommentAnnotation(e),this.getCommonAncestorContainer(e);else this.getCommonAncestorContainer(e)}getCommonAncestorContainer(e){try{let t=this.domService.getElementFromXPath(e?.targetTextRange?.commonAncestorContainer);if(t&&this.domService.isElementVisible(t)){let r=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement;this.commentsTextById[e.annotationId]={texts:[],annotation:e,commonAncestorContainer:t,commonAncestorElement:r,commonAncestorText:r?.textContent},this.setTextCommentPortal(e),this.observeCommonAncestorElementChanges(e)}else this.setGhostComment(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService getCommonAncestorContainer: ",t)}}setTextCommentPortal(e){try{let t=this.commentsTextById[e.annotationId];if(t){let r=this.domService.getXPath(e?.targetTextRange?.commonAncestorContainer)?.iterateNext();if(e?.locationId&&this.docService.getLocation()?.locationId!==e?.locationId){let p=this.docService.getElementMapWithLocation();p[e?.locationId]&&(r=p[e?.locationId]?.element)}let a=Ov(e.targetTextRange?.text,r,e.targetTextRange?.occurrence),s=!1;if(a?.forEach(c=>{c?.textNode?.parentElement?.closest("script")&&(s=!0)}),!s){let c=new Range;try{c.setStart(a[0].textNode,a[0].startOffset||0),c.setEnd(a[a.length-1].textNode,a[a.length-1].endOffset||0)}catch{}if(c.toString()===e.targetTextRange?.text){let p=D0(c),g=[],C=p?.find(E=>!E?.textContent);if(C&&C?.remove(),p=p?.filter(E=>E?.textContent),p&&p.length){let E=-1,D=-1;if(p.forEach((L,z)=>{this.textHighlighterClass?this.domService.addClassToElement(L,this.textHighlighterClass):this.domService.addClassToElement(L,L.tagName?.toLowerCase()),L.setAttribute(j.ATTRIBUTES.VELT_ID,e.annotationId);let W=L.childNodes[0],ee=new $o(_9),me=new Ho(L,this.componentFactoryResolver,this.appRef,this.injector),Ce=me.attach(ee);Ce.instance.setCommentPinAnnotation(e),Ce.instance.setElement(L),Ce.instance.onKeyupEnter=()=>{this.onCommonAncestorElementChange(e)},E<0&&(E=z),D=z,g.push({host:me,portal:ee,portalRef:Ce,element:L,textNode:W})}),E>=0&&g[E]?.portalRef&&g[E].portalRef.instance.setFirst(!0),D>=0&&g[D]?.portalRef&&g[D].portalRef.instance.setLast(!0),t.texts=g,this.inlineCommentMode&&!document.querySelector(`${j.TAGS.VELT_INLINE_COMMENT}[${j.ATTRIBUTES.VELT_INLINE_COMMENT_ID}="${e.annotationId}"]`)){let z=t.texts?.filter(ee=>!!ee?.element)?.map(ee=>ee?.element),W=z?.length?z[z.length-1]:null;if(W&&!Rv(W,j.ATTRIBUTES.VELT_PDF_VIEWER)){let me=W?.parentElement;if(me){let Ce=document.createElement(j.TAGS.VELT_INLINE_COMMENT);Ce.setAttribute(j.ATTRIBUTES.VELT_INLINE_COMMENT_ID,e.annotationId),me.insertAdjacentElement("afterend",Ce),t.inlineCommentElement=Ce}}}}this.removeGhostComment(e)}else this.setGhostComment(e)}}else this.setGhostComment(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService setTextCommentPortal: ",t)}}checkToRemoveTextCommentAnnotations(e){try{let t=e.map(a=>a.annotationId),r=!1;if(Object.keys(this.commentsTextById).forEach(a=>{t.includes(a)||(this.commentsTextById[a]?.annotation?.targetTextRange&&(r=!0),this.removeTextCommentAnnotation(this.commentsTextById[a].annotation))}),r){let a=[];Object.keys(this.commentsTextById).forEach(s=>{this.commentsTextById[s]?.annotation?.targetTextRange&&(a.push(this.commentsTextById[s]?.annotation),this.removeTextCommentAnnotation(this.commentsTextById[s]?.annotation))}),a?.length&&a.forEach(s=>{this.updateTextCommentAnnotation(s)})}}catch(t){this.loggingService.catch("Error in CommentPinPortalService checkToRemoveTextCommentAnnotations: ",t)}}removeTextCommentAnnotation(e){try{let t=this.commentsTextById[e.annotationId];if(t.texts.forEach(r=>{r?.host&&r.host.detach(),r?.element&&r?.textNode&&r.element.replaceWith(r.textNode),r.textNode&&r.textNode.parentNode?.normalize()}),t.texts?.length){let r=document.querySelectorAll(`${j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT}[data-velt-id="${e?.annotationId}"]`);r?.length&&r.forEach(a=>{let s=a?.parentNode;if(a?.textContent){let c=document.createTextNode(a.textContent);a.replaceWith(c)}s&&s.normalize()})}t?.inlineCommentElement&&t?.inlineCommentElement?.remove(),this.checkToUnsubscribeCommonAncestorElementChanges(e),delete this.commentsTextById[e.annotationId]}catch(t){this.loggingService.catch("Error in CommentPinPortalService removeTextCommentAnnotation: ",t)}}observeCommonAncestorElementChanges(e){try{let t=this.commentsTextById[e.annotationId];if(t.commonAncestorElement){let r=this.commonAncestorElementObservers.get(t.commonAncestorElement);if(r)r.annotations.find(a=>a.annotationId===e.annotationId)||r.annotations.push(e);else{let a=new MutationObserver(s=>{let c="";if(nM(t?.commonAncestorElement).forEach(g=>{g?.parentElement?.closest(".comment-annotation-number")||(c+=g.textContent)}),t?.commonAncestorText!==c&&s.filter(g=>[Node.ELEMENT_NODE,Node.TEXT_NODE].includes(g.target.nodeType)).filter(g=>g.target?.parentElement&&(g?.target?.parentElement?.classList?.contains("comment-text-highlight")||!Xi(g.target?.parentElement))).length){this.commonAncestorElementObservers.get(t.commonAncestorElement)?.annotations?.forEach(L=>{this.onCommonAncestorElementChange(L)});let{count:C,lastUpdated:E}=this.commonAncestorElementObserverCounts.get(t.commonAncestorElement)||{count:0,lastUpdated:0},D=Date.now();this.commonAncestorElementObserverCounts.set(t.commonAncestorElement,{count:D-E<100?C+1:1,lastUpdated:Date.now()}),C>5&&(a.disconnect(),this.loggingService.catch("Failed to detect text changes."))}});a.observe(t.commonAncestorElement,{characterData:!0,subtree:!0}),r={observer:a,annotations:[e]}}this.commonAncestorElementObservers.set(t.commonAncestorElement,r)}}catch(t){this.loggingService.catch("Error in CommentPinPortalService observeCommonAncestorElementChanges: ",t)}}onCommonAncestorElementChange(e){try{let t=this.commentsTextById[e.annotationId];if(t.texts?.length){let r="";t.texts.forEach(C=>r+=C.textNode?.textContent);let a=t.texts[0].textNode,s=[];document.querySelectorAll(`${j.TAGS.SNIPPYLY_TEXT_HIGHLIGHT}[data-velt-id="${e?.annotationId}"]`)?.forEach(C=>{s.push(C)});let c=!1;if(s?.length!==t?.texts?.length&&(c=!0),s?.length){let C="";s.forEach(E=>{C+=E?.textContent||""}),C&&(r=C,c&&this.removeTextCommentAnnotation(e))}let p=th(t.commonAncestorContainer,0,a,0,r)+1,g={};g.commonAncestorContainer=e.targetTextRange?.commonAncestorContainer,g.text=r,g.occurrence=p,Ii(e.targetTextRange,g)||(t.annotation.targetTextRange=g,this.updateAnnotationToFirebase(t.annotation))}else this.setTextCommentPortal(t.annotation)}catch(t){this.loggingService.catch("Error in CommentPinPortalService onCommonAncestorElementChange: ",t)}}updateAnnotationToFirebase(e){try{this.commentService.updateComment(e,!1,!0)}catch(t){this.loggingService.catch("Error in CommentPinPortalService updateAnnotationToFirebase: ",t)}}checkToUnsubscribeCommonAncestorElementChanges(e){try{let t=this.commentsTextById[e.annotationId];if(t.commonAncestorElement){let r=this.commonAncestorElementObservers.get(t.commonAncestorElement);r&&(r.annotations=r?.annotations.filter(a=>a.annotationId!==e.annotationId),r.annotations.length||this.unsubscribeCommonAncestorElementChanges(e))}}catch(t){this.loggingService.catch("Error in CommentPinPortalService checkToUnsubscribeCommonAncestorElementChanges: ",t)}}setGhostComment(e){try{e.ghostComment={},this.commentService.setGhostCommentMessage(e),this.commentService.addAnnotationToGhostCommentAnnotationMap(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService setGhostComment: ",t)}}removeGhostComment(e){try{delete e.ghostComment,this.commentService.removeAnnotationFromGhostCommentAnnotationMap(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService removeGhostComment: ",t)}}onAcceptComment(e){try{let t=this.commentsTextById[e.annotationId];if(t?.texts?.length){let r=t.texts.length-1,a=t.texts[r].textNode;if(a&&a.parentNode){let s=e.comments?.length?e.comments[0]:null,c=kv(s?.replaceContentHtml)?null:s?.replaceContentHtml,p=s?.replaceContentText||s?.commentText||"";if(kv(c)&&!s?.replaceContentText&&(c=s?.commentHtml||""),e?.selectAllContent&&e?.targetElementId){let g=oa(e.targetElementId,["id","data-id"]);g&&(g.innerHTML=this.domService.sanitizeHtml(kv(c)?p||"":c||""))}else{if(c&&c!==p){let g=document.createElement("span");g.innerHTML=this.domService.sanitizeHtml(c||p||""),a.parentNode.replaceChild(g,a),t.texts[r].textNode=g}else t.texts[r].textNode.textContent=p||"";for(let g=0;g<r;g++){let C=t.texts[g].textNode;C&&(C.textContent="")}}this.removeTextCommentAnnotation(e),this.domService.resetSelectedAnnotationsMap()}}}catch(t){this.loggingService.catch("Error in CommentPinPortalService onAcceptComment: ",t)}}unsubscribeCommonAncestorElementChanges(e){try{let t=this.commentsTextById[e.annotationId];this.commonAncestorElementObservers.get(t.commonAncestorElement)?.observer?.disconnect(),this.commonAncestorElementObservers.delete(t.commonAncestorElement)}catch(t){this.loggingService.catch("Error in CommentPinPortalService unsubscribeCommonAncestorElementChanges: ",t)}}};o.\u0275fac=function(t){return new(t||o)(J(ot),J(Be),J(De),J(wo),J(Ot),J(yi),J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Kd=class{constructor(){this.type="contact"}};var _de=i=>({componentConfigSignal:i}),oFe=(i,o)=>({condition:i,data:o}),rFe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-chip-tooltip-description-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),aFe=()=>({});function sFe(i,o){i&1&&Ue(0)}function lFe(i,o){if(i&1&&(f(0),u(1,sFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(3);m(),d("ngTemplateOutlet",n)}}function cFe(i,o){i&1&&Ue(0)}function dFe(i,o){if(i&1&&(f(0),u(1,cFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(5);m(),d("ngTemplateOutlet",n)}}function mFe(i,o){i&1&&Ue(0)}function pFe(i,o){if(i&1&&(f(0),u(1,mFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(7);m(),d("ngTemplateOutlet",n)}}function gFe(i,o){if(i&1&&(f(0),u(1,lFe,2,1,"ng-container",3)(2,dFe,2,1,"ng-container",3)(3,pFe,2,1,"ng-container",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null?null:n.type)==="contact"),m(),d("ngIf",(n==null?null:n.type)==="custom"),m(),d("ngIf",(n==null?null:n.type)==="group")}}function uFe(i,o){if(i&1&&(te(0),P(1,"translate")),i&2){let n=l(2).ngIf;_e(" ",M(1,1,(n==null||n.contact==null?null:n.contact.email)||(n==null?null:n.email))," ")}}function hFe(i,o){if(i&1&&(te(0),P(1,"translate")),i&2){let n=l(2).ngIf;_e(" ",M(1,1,n==null||n.custom==null||n.custom.custom==null?null:n.custom.custom.description)," ")}}function fFe(i,o){if(i&1&&(f(0),te(1),P(2,"translate"),v()),i&2){let n,e=l(3).ngIf,t=l();m(),vr(" ",(n=t.objectKeys((e==null||e.group==null||e.group.group==null?null:e.group.group.users)||gt(4,aFe)))==null?null:n.length," ",M(2,2,"members")," ")}}function vFe(i,o){if(i&1&&u(0,fFe,3,5,"ng-container",3),i&2){let n=l(2).ngIf;d("ngIf",n==null||n.group==null?null:n.group.group)}}function CFe(i,o){if(i&1&&(f(0),u(1,gFe,4,3,"ng-container",5)(2,uFe,2,3,"ng-template",null,0,xe)(4,hFe,2,3,"ng-template",null,1,xe)(6,vFe,1,1,"ng-template",null,2,xe),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,rFe,e.template,A(1,_de,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function _Fe(i,o){if(i&1&&(f(0),u(1,CFe,8,9,"ng-container",4),v()),i&2){let n=l();m(),d("veltIf",k(3,oFe,n.conditionSignal(),A(1,_de,n.componentConfigSignal)))}}var jb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.objectKeys=Object.keys,super.initializeComponentConfigSignal(new Kd)}ngOnInit(){try{super.ngOnInit()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipDescriptionComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-tooltip-description-internal"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contacEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(t,r){t&1&&u(0,_Fe,2,6,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var yde=i=>({componentConfigSignal:i}),yFe=(i,o)=>({condition:i,data:o}),SFe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-chip-tooltip-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function bFe(i,o){i&1&&Ue(0)}function IFe(i,o){if(i&1&&(f(0),u(1,bFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(3);m(),d("ngTemplateOutlet",n)}}function EFe(i,o){i&1&&Ue(0)}function xFe(i,o){if(i&1&&(f(0),u(1,EFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(5);m(),d("ngTemplateOutlet",n)}}function TFe(i,o){i&1&&Ue(0)}function DFe(i,o){if(i&1&&(f(0),u(1,TFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(7);m(),d("ngTemplateOutlet",n)}}function wFe(i,o){if(i&1&&(f(0),u(1,IFe,2,1,"ng-container",3)(2,xFe,2,1,"ng-container",3)(3,DFe,2,1,"ng-container",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null?null:n.type)==="contact"),m(),d("ngIf",(n==null?null:n.type)==="custom"),m(),d("ngIf",(n==null?null:n.type)==="group")}}function OFe(i,o){if(i&1&&w(0,"snippyly-user-avatar",7),i&2){let n=l(2).ngIf;d("size",32)("user",n==null?null:n.contact)}}function AFe(i,o){if(i&1&&(w(0,"div",11),P(1,"safeSvg")),i&2){let n=l(3).ngIf;d("innerHtml",M(1,1,n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),Ji)}}function PFe(i,o){if(i&1&&w(0,"img",12),i&2){let n=l(3).ngIf;d("src",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url,vn)}}function MFe(i,o){if(i&1&&(u(0,AFe,2,3,"div",8),_(1,"div",9),u(2,PFe,1,1,"img",10),b()),i&2){let n=l(2).ngIf;d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.svg),m(2),d("ngIf",n==null||n.custom==null||n.custom.custom==null||n.custom.custom.icon==null?null:n.custom.custom.icon.url)}}function kFe(i,o){i&1&&(_(0,"div",13),le(),_(1,"svg",14),w(2,"path",15),b()())}function RFe(i,o){if(i&1&&(f(0),u(1,wFe,4,3,"ng-container",5)(2,OFe,1,2,"ng-template",null,0,xe)(4,MFe,3,2,"ng-template",null,1,xe)(6,kFe,3,0,"ng-template",null,2,xe),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,SFe,e.template,A(1,yde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function NFe(i,o){if(i&1&&(f(0),u(1,RFe,8,9,"ng-container",4),v()),i&2){let n=l();m(),d("veltIf",k(3,yFe,n.conditionSignal(),A(1,yde,n.componentConfigSignal)))}}var $b=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,super.initializeComponentConfigSignal(new Kd)}ngOnInit(){try{super.ngOnInit()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-tooltip-icon-internal"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contactAvatarRef",""],["customIconRef",""],["groupIconRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"],[1,"comment-dialog-user-avatar",3,"size","user"],["class","velt-autocomplete-chip-tooltip--icon-svg",3,"innerHtml",4,"ngIf"],[1,"velt-autocomplete-chip-tooltip--icon-img"],[3,"src",4,"ngIf"],[1,"velt-autocomplete-chip-tooltip--icon-svg",3,"innerHtml"],[3,"src"],[1,"velt-autocomplete-chip-tooltip--group-icon","velt-autocomplete-chip-tooltip--icon-svg"],["xmlns","http://www.w3.org/2000/svg","fill","rgb(233, 242, 255)","width","16","height","16","viewBox","0 0 16 16",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(t,r){t&1&&u(0,NFe,2,6,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-autocomplete-chip-tooltip--group-icon[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center}.velt-autocomplete-chip-tooltip--icon-img[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;object-fit:cover}"],changeDetection:0});let i=o;return i})();var Sde=i=>({componentConfigSignal:i}),FFe=(i,o)=>({condition:i,data:o}),LFe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-chip-tooltip-name-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function BFe(i,o){i&1&&Ue(0)}function VFe(i,o){if(i&1&&(f(0),u(1,BFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(3);m(),d("ngTemplateOutlet",n)}}function UFe(i,o){i&1&&Ue(0)}function jFe(i,o){if(i&1&&(f(0),u(1,UFe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(5);m(),d("ngTemplateOutlet",n)}}function $Fe(i,o){i&1&&Ue(0)}function HFe(i,o){if(i&1&&(f(0),u(1,$Fe,1,0,"ng-container",6),v()),i&2){l(2);let n=de(7);m(),d("ngTemplateOutlet",n)}}function zFe(i,o){if(i&1&&(f(0),u(1,VFe,2,1,"ng-container",3)(2,jFe,2,1,"ng-container",3)(3,HFe,2,1,"ng-container",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null?null:n.type)==="contact"),m(),d("ngIf",(n==null?null:n.type)==="custom"),m(),d("ngIf",(n==null?null:n.type)==="group")}}function GFe(i,o){if(i&1&&(te(0),P(1,"translate")),i&2){let n=l(2).ngIf;_e(" ",M(1,1,n==null||n.contact==null?null:n.contact.name)," ")}}function WFe(i,o){if(i&1&&(te(0),P(1,"translate")),i&2){let n=l(2).ngIf;_e(" ",M(1,1,n==null||n.custom==null||n.custom.custom==null?null:n.custom.custom.name)," ")}}function qFe(i,o){if(i&1&&(te(0),P(1,"translate")),i&2){let n=l(2).ngIf;_e(" ",M(1,1,(n==null||n.group==null||n.group.group==null||n.group.group.metadata==null?null:n.group.group.metadata.groupName)||(n==null||n.group==null?null:n.group.text))," ")}}function YFe(i,o){if(i&1&&(f(0),u(1,zFe,4,3,"ng-container",5)(2,GFe,2,3,"ng-template",null,0,xe)(4,WFe,2,3,"ng-template",null,1,xe)(6,qFe,2,3,"ng-template",null,2,xe),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,LFe,e.template,A(1,Sde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function KFe(i,o){if(i&1&&(f(0),u(1,YFe,8,9,"ng-container",4),v()),i&2){let n=l();m(),d("veltIf",k(3,FFe,n.conditionSignal(),A(1,Sde,n.componentConfigSignal)))}}var Hb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,super.initializeComponentConfigSignal(new Kd)}ngOnInit(){try{super.ngOnInit()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipIconComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-tooltip-name-internal"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngTemplateOutlet"]],template:function(t,r){t&1&&u(0,KFe,2,6,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var bde=i=>({componentConfigSignal:i}),ZFe=(i,o)=>({condition:i,data:o}),XFe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-chip-tooltip-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function QFe(i,o){i&1&&Ue(0)}function JFe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,QFe,1,0,"ng-container",4),b()),i&2){l();let n=de(3);m(),d("ngTemplateOutlet",n)}}function eLe(i,o){if(i&1&&(_(0,"div",6)(1,"div",7),w(2,"velt-autocomplete-chip-tooltip-icon-internal",8),b(),_(3,"div",9)(4,"div",10),w(5,"velt-autocomplete-chip-tooltip-name-internal",8),b(),_(6,"div",11),w(7,"velt-autocomplete-chip-tooltip-description-internal",8),b()()()),i&2){let n=l(4);m(2),d("componentConfigSignal",n.componentConfigSignal),m(3),d("componentConfigSignal",n.componentConfigSignal),m(2),d("componentConfigSignal",n.componentConfigSignal)}}function tLe(i,o){if(i&1&&u(0,eLe,8,3,"div",5),i&2){let n=l(2).ngIf,e=l();d("veltDynamicTemplate",$(3,XFe,e.template,A(1,bde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function nLe(i,o){if(i&1&&(f(0),u(1,JFe,2,1,"velt-shadow-dom-internal",3)(2,tLe,1,9,"ng-template",null,0,xe),v()),i&2){let n=de(3),e=l(2);m(),d("ngIf",e.shadowDom&&!e.template)("ngIfElse",n)}}function iLe(i,o){if(i&1&&(f(0),u(1,nLe,4,2,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,ZFe,n.conditionSignal(),A(1,bde,n.componentConfigSignal)))}}var A0=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(r,a,void 0,void 0,void 0,s,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.themeService=a,this.dynamicDataService=s,this.shadowDom=!1,this.subscriptions=[],super.initializeComponentConfigSignal(new Kd)}ngOnInit(){try{super.ngOnInit(),this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.subscriptions.push(this.wireframeService.getWireframe$("velt-autocomplete-chip-tooltip-wireframe").subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in AutocompleteChipTooltipComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(qe),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-tooltip-internal"]],inputs:{shadowDom:"shadowDom",variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["tooltipContainerRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["class","velt-autocomplete-chip-tooltip",4,"veltDynamicTemplate"],[1,"velt-autocomplete-chip-tooltip"],[1,"velt-autocomplete-chip-tooltip--icon"],[3,"componentConfigSignal"],[1,"velt-autocomplete-chip-tooltip--content"],[1,"velt-autocomplete-chip-tooltip--name"],[1,"velt-autocomplete-chip-tooltip--description"]],template:function(t,r){t&1&&u(0,iLe,2,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%]{display:flex;background:var(--velt-background-0);border-radius:var(--velt-border-radius-sm);padding:var(--velt-spacing-md);margin:var(--velt-spacing-xs) 0;box-shadow:0 4px 21px #00000014;gap:var(--velt-spacing-md);max-width:256px;line-height:1.3;align-items:center}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:var(--velt-border-radius-full);overflow:hidden;flex-shrink:0}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] snippyly-user-avatar[_ngcontent-%COMP%]{display:flex}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%]{width:100%;height:100%;padding:var(--velt-spacing-xs);display:flex;align-items:center;justify-content:center;background:linear-gradient(0deg,#ffffff0a,#ffffff0a),linear-gradient(0deg,#3772ff14,#3772ff14);box-sizing:border-box}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon-svg[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--name[_ngcontent-%COMP%]{font-size:var(--velt-font-size-sm);font-weight:400;line-height:21px;text-align:left;word-break:break-word;color:var(--velt-text-0)}.velt-autocomplete-chip-tooltip[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--content[_ngcontent-%COMP%] .velt-autocomplete-chip-tooltip--description[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs);font-weight:400;line-height:17px;letter-spacing:.01em;text-align:left;color:var(--velt-text-5);word-break:break-word}"],changeDetection:0});let i=o;return i})();var Bs=class{constructor(){this.onOptionClick=()=>{},this.newUserContactError=void 0,this.newUserContact=void 0,this.expandMentionGroups=!1,this.showMentionGroupsFirst=!1,this.showMentionGroupsOnly=!1,this.customGroupsEnabled=!1}},Zd=class{constructor(){this.isGroupHeader=!1,this.isGroupMember=!1,this.isNewContact=!1,this.disabled=!1}};var jz=i=>({$implicit:i}),rLe=(i,o)=>({componentConfigSignal:i,userContact:o}),$z=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-option-description-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),aLe=(i,o)=>({componentConfigSignal:i,custom:o}),sLe=(i,o)=>({componentConfigSignal:i,group:o}),Ide=()=>({});function lLe(i,o){i&1&&Ue(0)}function cLe(i,o){if(i&1&&(f(0),u(1,lLe,1,0,"ng-container",4),v()),i&2){l();let n=de(5),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,jz,e.selectorItem==null?null:e.selectorItem.contact))}}function dLe(i,o){i&1&&Ue(0)}function mLe(i,o){if(i&1&&(f(0),u(1,dLe,1,0,"ng-container",4),v()),i&2){l();let n=de(7),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,jz,e.selectorItem==null?null:e.selectorItem.custom))}}function pLe(i,o){i&1&&Ue(0)}function gLe(i,o){if(i&1&&(f(0),u(1,pLe,1,0,"ng-container",4),v()),i&2){l();let n=de(9),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,jz,e.selectorItem==null?null:e.selectorItem.group))}}function uLe(i,o){if(i&1&&(_(0,"p",6),te(1),P(2,"translate"),b()),i&2){let n=l(2).$implicit,e=l(2);ue("velt-autocomplete-option-description--secondary",(n.name==null?null:n.name.length)>0),x("aria-label",e.field?n[e.field]:n.email),m(),_e(" ",e.field?n[e.field]:M(2,4,n.email)," ")}}function hLe(i,o){if(i&1&&(f(0),u(1,uLe,3,6,"p",5),v()),i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,$z,t.template,k(1,rLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function fLe(i,o){if(i&1&&u(0,hLe,2,10,"ng-container",3),i&2){let n=o.$implicit,e=l(2);d("ngIf",e.field?n==null?null:n[e.field]:(n.email==null?null:n.email.length)>0&&(n.name==null?null:n.name.length)>0)}}function vLe(i,o){if(i&1&&(_(0,"p",6),te(1),P(2,"translate"),b()),i&2){let n=l(2).$implicit;x("aria-label",n.description),m(),_e(" ",M(2,2,n.description)," ")}}function CLe(i,o){if(i&1&&(f(0),u(1,vLe,3,4,"p",7),v()),i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,$z,t.template,k(1,aLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function _Le(i,o){if(i&1&&u(0,CLe,2,10,"ng-container",3),i&2){let n=o.$implicit;d("ngIf",(n.description==null?null:n.description.length)>0)}}function yLe(i,o){if(i&1&&(_(0,"p",6),te(1),P(2,"translate"),b()),i&2){let n,e,t=l().$implicit,r=l(2);x("aria-label",((n=r.objectKeys((t==null?null:t.users)||gt(5,Ide)))==null?null:n.length)+" members"),m(),vr(" ",(e=r.objectKeys((t==null?null:t.users)||gt(6,Ide)))==null?null:e.length," ",M(2,3,"members")," ")}}function SLe(i,o){if(i&1&&(f(0),u(1,yLe,3,7,"p",7),v()),i&2){let n=o.$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,$z,t.template,k(1,sLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function bLe(i,o){if(i&1&&(f(0),u(1,cLe,2,4,"ng-container",3)(2,mLe,2,4,"ng-container",3)(3,gLe,2,4,"ng-container",3)(4,fLe,1,1,"ng-template",null,0,xe)(6,_Le,1,1,"ng-template",null,1,xe)(8,SLe,2,10,"ng-template",null,2,xe),v()),i&2){let n=l();m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="contact"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="custom"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="group")}}var zb=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.objectKeys=Object.keys,this.componentId="velt-autocomplete-option-description",super.initializeComponentConfigSignal(new Bs)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteOptionDescriptionComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-option-description-internal"]],inputs:{selectorItem:"selectorItem",field:"field"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contactEmailRef",""],["customDescriptionRef",""],["groupDescriptionRef",""],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","line-height-1 velt-autocomplete-option-description",3,"velt-autocomplete-option-description--secondary",4,"veltDynamicTemplate"],[1,"line-height-1","velt-autocomplete-option-description"],["class","line-height-1 velt-autocomplete-option-description",4,"veltDynamicTemplate"]],template:function(t,r){t&1&&u(0,bLe,10,3,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:block}.velt-autocomplete-option-description[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--velt-text-8);font-size:var(--velt-font-size-xs);margin:0;line-height:18px}"],changeDetection:0});let i=o;return i})();var ILe=i=>({$implicit:i}),ELe=(i,o,n)=>({componentConfigSignal:i,isNewContact:o,userContact:n}),xLe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-option-error-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function TLe(i,o){i&1&&Ue(0)}function DLe(i,o){if(i&1&&(f(0),u(1,TLe,1,0,"ng-container",2),v()),i&2){l();let n=de(3),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,ILe,e.selectorItem==null?null:e.selectorItem.contact))}}function wLe(i,o){if(i&1&&(_(0,"div",6)(1,"div",7),le(),_(2,"svg",8),w(3,"path",9)(4,"path",10),b()()()),i&2){let n=l(3).ngIf,e=l();m(),d("title",n.newUserContactError),x("title",n.newUserContactError)("data-testid",e.componentId+"-icon"),m(),x("data-testid",e.componentId+"-svg")}}function OLe(i,o){if(i&1&&(_(0,"div",4),P(1,"translate"),u(2,wLe,5,4,"div",5),b()),i&2){let n=l().$implicit,e=l().ngIf,t=l();x("aria-label",M(1,3,(e==null?null:e.newUserContactError)||"Invalid contact"))("data-testid",t.componentId),m(2),d("veltDynamicTemplate",$(9,xLe,t.template,je(5,ELe,t.componentConfigSignal,t.isNewContact,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function ALe(i,o){if(i&1&&u(0,OLe,3,15,"div",3),i&2){let n=l().ngIf,e=l();d("ngIf",e.isNewContact&&n.newUserContactError)}}function PLe(i,o){if(i&1&&(f(0),u(1,DLe,2,4,"ng-container",1)(2,ALe,1,1,"ng-template",null,0,xe),v()),i&2){let n=l();m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="contact")}}var Gb=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-autocomplete-error-icon",super.initializeComponentConfigSignal(new Bs)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteOptionErrorIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-option-error-icon-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["errorIconRef",""],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","alert",4,"ngIf"],["role","alert"],["class","velt-autocomplete-option-error-icon",4,"veltDynamicTemplate"],[1,"velt-autocomplete-option-error-icon"],[1,"s-flex",3,"title"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-exclamation-triangle"],["fill","red","d","M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"],["fill","red","d","M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"]],template:function(t,r){t&1&&u(0,PLe,4,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%]{margin-inline:var(--velt-spacing-lg)}.velt-autocomplete-option-error-icon[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;border:none;padding:0;margin:0;cursor:pointer;outline:none;color:var(--velt-text-1)}"],changeDetection:0});let i=o;return i})();var MLe=(i,o)=>({componentConfigSignal:i,selectorItem:o}),kLe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-option-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),Hz=i=>({$implicit:i});function RLe(i,o){i&1&&Ue(0)}function NLe(i,o){if(i&1&&(f(0),u(1,RLe,1,0,"ng-container",7),v()),i&2){l(2);let n=de(3),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,Hz,e.selectorItem==null?null:e.selectorItem.contact))}}function FLe(i,o){i&1&&Ue(0)}function LLe(i,o){if(i&1&&(f(0),u(1,FLe,1,0,"ng-container",7),v()),i&2){l(2);let n=de(5),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,Hz,e.selectorItem==null?null:e.selectorItem.custom))}}function BLe(i,o){i&1&&Ue(0)}function VLe(i,o){if(i&1&&(f(0),u(1,BLe,1,0,"ng-container",7),v()),i&2){l(2);let n=de(7),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,Hz,e.selectorItem==null?null:e.selectorItem.group))}}function ULe(i,o){if(i&1&&(_(0,"div",6),u(1,NLe,2,4,"ng-container",4)(2,LLe,2,4,"ng-container",4)(3,VLe,2,4,"ng-container",4),b()),i&2){let n=l(2);x("data-testid",n.componentId)("aria-label","Option icon"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="contact"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="custom"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="group")}}function jLe(i,o){if(i&1&&(f(0),le(),_(1,"svg",9),w(2,"path",10),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-contact-at")}}function $Le(i,o){if(i&1&&w(0,"snippyly-user-avatar",11),i&2){let n=l().$implicit,e=l(2);d("size",32)("user",n),x("data-testid",e.componentId+"-contact-avatar")}}function HLe(i,o){if(i&1&&u(0,jLe,3,1,"ng-container",8)(1,$Le,1,3,"ng-template",null,3,xe),i&2){let n=o.$implicit,e=de(2);d("ngIf",(n==null?null:n.visibility)==="here")("ngIfElse",e)}}function zLe(i,o){if(i&1&&(f(0),w(1,"div",12),P(2,"safeSvg"),v()),i&2){let n=l().$implicit,e=l(2);m(),d("innerHTML",M(2,2,n.icon.svg),Ji),x("data-testid",e.componentId+"-custom-svg")}}function GLe(i,o){if(i&1&&(f(0),w(1,"img",13),v()),i&2){let n=l().$implicit,e=l(2);m(),d("src",n.icon.url,vn),x("alt",(n==null?null:n.description)||"Custom icon")("data-testid",e.componentId+"-custom-img")}}function WLe(i,o){if(i&1&&u(0,zLe,3,4,"ng-container",4)(1,GLe,2,3,"ng-container",4),i&2){let n=o.$implicit;d("ngIf",n==null||n.icon==null?null:n.icon.svg),m(),d("ngIf",n==null||n.icon==null?null:n.icon.url)}}function qLe(i,o){if(i&1&&(le(),_(0,"svg",14),w(1,"path",15),b()),i&2){let n=l(2);x("data-testid",n.componentId+"-group-icon")}}function YLe(i,o){if(i&1&&(f(0),u(1,ULe,4,5,"div",5)(2,HLe,3,2,"ng-template",null,0,xe)(4,WLe,2,2,"ng-template",null,1,xe)(6,qLe,2,1,"ng-template",null,2,xe),v()),i&2){let n=o.ngIf,e=l();m(),d("veltDynamicTemplate",$(4,kLe,e.template,k(1,MLe,e.componentConfigSignal,e.selectorItem),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}var Wb=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-autocomplete-icon",super.initializeComponentConfigSignal(new Bs)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteOptionIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteOptionIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-option-icon-internal"]],inputs:{selectorItem:"selectorItem"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contactAvatarRef",""],["customAvatarRef",""],["groupAvatarRef",""],["defaultAvatarRef",""],[4,"ngIf"],["class","velt-autocomplete-option-icon","role","img",4,"veltDynamicTemplate"],["role","img",1,"velt-autocomplete-option-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf","ngIfElse"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-at"],["fill","currentColor","d","M13.106 7.222c0-2.967-2.249-5.032-5.482-5.032-3.35 0-5.646 2.318-5.646 5.702 0 3.493 2.235 5.708 5.762 5.708.862 0 1.689-.123 2.304-.335v-.862c-.43.199-1.354.328-2.29.328-2.926 0-4.813-1.88-4.813-4.798 0-2.844 1.921-4.881 4.594-4.881 2.735 0 4.608 1.688 4.608 4.156 0 1.682-.554 2.769-1.416 2.769-.492 0-.772-.28-.772-.76V5.206H8.923v.834h-.11c-.266-.595-.881-.964-1.6-.964-1.4 0-2.378 1.162-2.378 2.823 0 1.737.957 2.906 2.379 2.906.8 0 1.415-.39 1.709-1.087h.11c.081.67.703 1.148 1.503 1.148 1.572 0 2.57-1.415 2.57-3.643zm-7.177.704c0-1.197.54-1.907 1.456-1.907.93 0 1.524.738 1.524 1.907S8.308 9.84 7.371 9.84c-.895 0-1.442-.725-1.442-1.914z"],[3,"size","user"],[1,"velt-autocomplete-option-icon--custom-svg",3,"innerHTML"],[1,"velt-autocomplete-option-icon--custom-img",3,"src"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16","aria-hidden","true","focusable","false",1,"bi","bi-people-fill"],["d","M7 14s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1zm4-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6m-5.784 6A2.24 2.24 0 0 1 5 13c0-1.355.68-2.75 1.936-3.72A6.3 6.3 0 0 0 5 9c-4 0-5 3-5 4s1 1 1 1zM4.5 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"]],template:function(t,r){t&1&&u(0,YLe,8,10,"ng-container",4),t&2&&d("ngIf",r.componentConfigSignal())},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-autocomplete-option-icon--placeholder[_ngcontent-%COMP%]{z-index:2;opacity:.8}.velt-autocomplete-option-icon[_ngcontent-%COMP%]{min-width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));width:calc((2.25rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));height:calc((2.25rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border:solid 2px transparent;display:flex;align-items:center;justify-content:center;position:relative;margin-right:var(--velt-spacing-md)}.velt-autocomplete-option-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:var(--velt-border-radius-full);z-index:2;object-fit:cover}.velt-autocomplete-option-icon[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;background:inherit}.velt-autocomplete-option-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:var(--velt-text-1)}'],changeDetection:0});let i=o;return i})();var zz=i=>({$implicit:i}),KLe=(i,o)=>({componentConfigSignal:i,userContact:o}),Gz=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-option-name-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),ZLe=(i,o)=>({componentConfigSignal:i,custom:o}),XLe=(i,o)=>({componentConfigSignal:i,group:o});function QLe(i,o){i&1&&Ue(0)}function JLe(i,o){if(i&1&&(f(0),u(1,QLe,1,0,"ng-container",5),v()),i&2){l();let n=de(5),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,zz,e.selectorItem==null?null:e.selectorItem.contact))}}function eBe(i,o){i&1&&Ue(0)}function tBe(i,o){if(i&1&&(f(0),u(1,eBe,1,0,"ng-container",5),v()),i&2){l();let n=de(7),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,zz,e.selectorItem==null?null:e.selectorItem.custom))}}function nBe(i,o){i&1&&Ue(0)}function iBe(i,o){if(i&1&&(f(0),u(1,nBe,1,0,"ng-container",5),v()),i&2){l();let n=de(9),e=l();m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(2,zz,e.selectorItem==null?null:e.selectorItem.group))}}function oBe(i,o){if(i&1&&(_(0,"p",8),te(1),P(2,"translate"),b()),i&2){let n=l(2).$implicit,e=l(2);x("data-testid",e.componentId+"-contact-text")("aria-label",n.name||n.email),m(),_e(" ",M(2,3,n.name||n.email)," ")}}function rBe(i,o){if(i&1&&(f(0),u(1,oBe,3,5,"p",7),v()),i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,Gz,t.template,k(1,KLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function aBe(i,o){i&1&&w(0,"velt-skeleton-loader-internal",9)}function sBe(i,o){if(i&1&&u(0,rBe,2,10,"ng-container",6)(1,aBe,1,0,"ng-template",null,3,xe),i&2){let n=o.$implicit,e=de(2);d("ngIf",(n.name==null?null:n.name.length)>0||(n==null||n.email==null?null:n.email.length)>0)("ngIfElse",e)}}function lBe(i,o){if(i&1&&(_(0,"p",8),te(1),P(2,"translate"),b()),i&2){let n=l(2).$implicit,e=l(2);x("data-testid",e.componentId+"-custom-text")("aria-label",n.name),m(),_e(" ",M(2,3,n.name)," ")}}function cBe(i,o){if(i&1&&(f(0),u(1,lBe,3,5,"p",7),v()),i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,Gz,t.template,k(1,ZLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function dBe(i,o){if(i&1&&u(0,cBe,2,10,"ng-container",4),i&2){let n=o.$implicit;d("ngIf",(n.name==null?null:n.name.length)>0)}}function mBe(i,o){if(i&1&&(_(0,"p",8),te(1),P(2,"translate"),b()),i&2){let n=l(2).$implicit,e=l(2);x("data-testid",e.componentId+"-group-text")("aria-label",n==null||n.metadata==null?null:n.metadata.groupName),m(),_e(" ",M(2,3,n==null||n.metadata==null?null:n.metadata.groupName)," ")}}function pBe(i,o){if(i&1&&(f(0),u(1,mBe,3,5,"p",7),v()),i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("veltDynamicTemplate",$(4,Gz,t.template,k(1,XLe,t.componentConfigSignal,n),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function gBe(i,o){if(i&1&&u(0,pBe,2,10,"ng-container",4),i&2){let n=o.$implicit;d("ngIf",(n==null||n.metadata==null||n.metadata.groupName==null?null:n.metadata.groupName.length)>0)}}function uBe(i,o){if(i&1&&(f(0),u(1,JLe,2,4,"ng-container",4)(2,tBe,2,4,"ng-container",4)(3,iBe,2,4,"ng-container",4)(4,sBe,3,2,"ng-template",null,0,xe)(6,dBe,1,1,"ng-template",null,1,xe)(8,gBe,1,1,"ng-template",null,2,xe),v()),i&2){let n=l();m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="contact"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="custom"),m(),d("ngIf",(n.selectorItem==null?null:n.selectorItem.type)==="group")}}var qb=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-autocomplete-name",super.initializeComponentConfigSignal(new Bs)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in AutocompleteOptionNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteOptionNameComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-option-name-internal"]],inputs:{selectorItem:"selectorItem"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["contactNameRef",""],["customNameRef",""],["groupNameRef",""],["loadingTemplateRef",""],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf","ngIfElse"],["class","line-height-1 velt-autocomplete-option-name","role","option",4,"veltDynamicTemplate"],["role","option",1,"line-height-1","velt-autocomplete-option-name"],["height","21px","width","80px","borderRadius","20px"]],template:function(t,r){t&1&&u(0,uBe,10,3,"ng-container",4),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-autocomplete-option-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;color:var(--velt-text-1);font-size:var(--velt-font-size-sm);margin:0;line-height:21px;white-space:nowrap}"],changeDetection:0});let i=o;return i})();var hBe=(i,o,n)=>({componentConfigSignal:i,isNewContact:o,selectorItem:n}),fBe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-autocomplete-option-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function vBe(i,o){if(i&1&&(_(0,"div",2),w(1,"velt-autocomplete-option-icon-internal",3),_(2,"div",4),w(3,"velt-autocomplete-option-name-internal",3)(4,"velt-autocomplete-option-description-internal",3),b(),w(5,"velt-autocomplete-option-error-icon-internal",5),b()),i&2){let n=l().ngIf,e=l();x("data-testid",e.componentId)("aria-selected",!1)("aria-disabled",!!(n!=null&&n.newUserContactError)),m(),d("selectorItem",e.selectorItem)("componentConfigSignal",e.componentConfigSignal),m(),x("data-testid",e.componentId+"-details"),m(),d("selectorItem",e.selectorItem)("componentConfigSignal",e.componentConfigSignal),m(),d("selectorItem",e.selectorItem)("componentConfigSignal",e.componentConfigSignal),m(),d("selectorItem",e.selectorItem)("isNewContact",e.isNewContact)("componentConfigSignal",e.componentConfigSignal)}}function CBe(i,o){if(i&1&&(f(0),u(1,vBe,6,13,"div",1),v()),i&2){let n=o.ngIf,e=l();m(),d("veltDynamicTemplate",$(5,fBe,e.template,je(1,hBe,e.componentConfigSignal,e.isNewContact,e.selectorItem),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}var P0=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.dynamicDataService=a,this.subscriptions=[],this.componentId="velt-autocomplete-option",super.initializeComponentConfigSignal(new Bs)}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;");let e="velt-autocomplete-option-wireframe";this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,selectorItem:this.selectorItem,isNewContact:this.isNewContact}),this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}})),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentBubbleComponent OnInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","option"),e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("aria-label",this.getOptionLabel())}catch(e){this.loggingService.catch("Error in AutocompleteOptionComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: red;"),super.ngOnDestroy(),this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in CommentBubbleComponent OnDestroy: ",e)}}getOptionLabel(){try{switch(this.selectorItem?.type){case"contact":return this.getContactLabel();case"custom":return this.selectorItem.custom?.name||"Custom option";case"group":return this.selectorItem.group?.metadata?.groupName||"Group option";default:return"Option"}}catch(e){return this.loggingService.catch("Error in AutocompleteOptionComponent getOptionLabel:",e),"Option"}}getContactLabel(){try{let e=this.selectorItem?.contact,t=e?.name||e?.email||"Contact";return this.isNewContact?`New contact: ${t}`:t}catch(e){return this.loggingService.catch("Error in AutocompleteOptionComponent getContactLabel:",e),"Contact"}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-option-internal"]],inputs:{selectorItem:"selectorItem",isNewContact:"isNewContact",variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],["class","velt-autocomplete-option--container","role","option",4,"veltDynamicTemplate"],["role","option",1,"velt-autocomplete-option--container"],[3,"selectorItem","componentConfigSignal"],[1,"velt-autocomplete-option--details"],[3,"selectorItem","isNewContact","componentConfigSignal"]],template:function(t,r){t&1&&u(0,CBe,2,11,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}.velt-autocomplete-option--container[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%}.velt-autocomplete-option--details[_ngcontent-%COMP%]{overflow:hidden;flex-grow:1}"],changeDetection:0});let i=o;return i})();var sr=class{constructor(){this.isAudioPermissionOpen=!1,this.toggleAudioPermission=()=>{},this.selectAudioDevice=()=>{},this.audioDevices=[],this.isVideoPermissionOpen=!1,this.toggleVideoPermission=()=>{},this.selectVideoDevice=()=>{},this.videoDevices=[],this.shadowDom=!1,this.isOpen=!1,this.settingsEmbedded=!1,this.closeVideoDropdown=()=>{},this.closeAudioDropdown=()=>{}}};var yBe=i=>({componentConfigSignal:i}),SBe=(i,o)=>({condition:i,data:o}),bBe=i=>({componentConfigSignal:i,type:"audio"}),IBe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-media-source-settings-audio-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function EBe(i,o){if(i&1&&(f(0),_(1,"div",5)(2,"div",6),le(),_(3,"svg",7),w(4,"path",8),b()(),ht(),w(5,"velt-media-source-settings-selected-label-internal",9)(6,"velt-media-source-settings-toggle-icon-internal",9),b(),w(7,"velt-media-source-settings-divider-internal",9)(8,"velt-media-source-settings-options-internal",9),v()),i&2){let n=l(4);m(),x("aria-hidden","true"),m(4),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-label"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-toggle"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-divider"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-options")("role","listbox")("aria-label","Audio source options")}}function xBe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("clickOutside",function(){N(n);let t=l(2).ngIf;return F(t.closeAudioDropdown())})("click",function(t){N(n);let r=l(2).ngIf;return F(r.toggleAudioPermission(t))}),u(2,EBe,9,15,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();ue("velt-media-source-settings-audio--active",n.isAudioPermissionOpen),x("data-testid",e.componentId)("role","button")("aria-expanded",n.isAudioPermissionOpen)("aria-haspopup","listbox")("aria-label",M(1,9,"Audio settings"))("tabindex",0),m(2),d("veltDynamicTemplate",$(13,IBe,e.template,A(11,bBe,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function TBe(i,o){if(i&1&&(f(0),u(1,xBe,3,19,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.settingsVisible==null?null:n.settingsVisible.audio)}}function DBe(i,o){if(i&1&&(f(0),u(1,TBe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,SBe,n.conditionSignal(),A(1,yBe,n.componentConfigSignal)))}}var Yb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-media-source-settings-audio",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsAudioComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsAudioComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsAudioComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-audio-internal"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-media-source-settings-audio","snippylyClickOutside","",3,"velt-media-source-settings-audio--active","clickOutside","click",4,"ngIf"],["snippylyClickOutside","",1,"velt-media-source-settings-audio",3,"clickOutside","click"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings-audio-trigger"],[1,"velt-media-source-settings-audio-trigger-icon"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M3.33301 6.66732C3.33301 7.90499 3.82467 9.09198 4.69984 9.96715C5.57501 10.8423 6.762 11.334 7.99967 11.334M7.99967 11.334C9.23735 11.334 10.4243 10.8423 11.2995 9.96715C12.1747 9.09198 12.6663 7.90499 12.6663 6.66732M7.99967 11.334V14.0007M5.33301 14.0007H10.6663M5.99967 3.33398C5.99967 2.80355 6.21039 2.29484 6.58546 1.91977C6.96053 1.5447 7.46924 1.33398 7.99967 1.33398C8.53011 1.33398 9.03882 1.5447 9.41389 1.91977C9.78896 2.29484 9.99967 2.80355 9.99967 3.33398V6.66732C9.99967 7.19775 9.78896 7.70646 9.41389 8.08153C9.03882 8.4566 8.53011 8.66732 7.99967 8.66732C7.46924 8.66732 6.96053 8.4566 6.58546 8.08153C6.21039 7.70646 5.99967 7.19775 5.99967 6.66732V3.33398Z","stroke","currentColor","stroke-linecap","round","stroke-linejoin","round"],["type","audio",3,"componentConfigSignal","template"]],template:function(t,r){t&1&&u(0,DBe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-media-source-settings-audio[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);margin:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-md);display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.velt-media-source-settings-audio[_ngcontent-%COMP%]:hover{background:var(--velt-background-3)}.velt-media-source-settings-audio--active[_ngcontent-%COMP%]{background:var(--velt-background-2)}.velt-media-source-settings-audio-trigger[_ngcontent-%COMP%]{width:100%;display:flex;gap:var(--velt-spacing-md);align-items:center;cursor:pointer}.velt-media-source-settings-audio-trigger[_ngcontent-%COMP%] .velt-media-source-settings-audio-trigger-icon[_ngcontent-%COMP%]{padding:1px;color:var(--velt-text-3);display:flex}.velt-media-source-settings-audio-trigger[_ngcontent-%COMP%] .velt-media-source-settings-audio-trigger-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{max-width:none}"],changeDetection:0});let i=o;return i})();var wBe=i=>({componentConfigSignal:i}),OBe=(i,o)=>({condition:i,data:o}),ABe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-divider-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function PBe(i,o){if(i&1&&(f(0),w(1,"div",3),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-divider")("role","separator")("aria-orientation","horizontal")("aria-hidden","true")}}function MBe(i,o){if(i&1&&(_(0,"div"),u(1,PBe,2,4,"ng-container",2),b()),i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId+"-divider-container")("role","presentation"),m(),d("veltDynamicTemplate",pt(3,ABe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function kBe(i,o){if(i&1&&(f(0),u(1,MBe,2,8,"div",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",e.type==="audio"?n.isAudioPermissionOpen:n.isVideoPermissionOpen)}}function RBe(i,o){if(i&1&&(f(0),u(1,kBe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,OBe,n.conditionSignal(),A(1,wBe,n.componentConfigSignal)))}}var M0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-divider",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsDividerComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsDividerComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsDividerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-divider-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings-divider"]],template:function(t,r){t&1&&u(0,RBe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-media-source-settings-divider[_ngcontent-%COMP%]{width:100%;height:1px;background:var(--velt-background-4);margin-top:var(--velt-spacing-md)}"],changeDetection:0});let i=o;return i})();var NBe=i=>({componentConfigSignal:i}),FBe=(i,o)=>({condition:i,data:o}),LBe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-options-item-icon-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function BBe(i,o){i&1&&(f(0),le(),_(1,"svg",4),w(2,"path",5),b(),v())}function VBe(i,o){if(i&1&&(f(0),_(1,"div",2),u(2,BBe,3,0,"ng-container",3),b(),v()),i&2){let n=l().ngIf,e=l();m(),ue("selected",e.device.deviceId===(e.type==="audio"?n.selectedAudioDevice==null?null:n.selectedAudioDevice.deviceId:n.selectedVideoDevice==null?null:n.selectedVideoDevice.deviceId)),x("data-testid",e.componentId+"-selected-icon")("role","presentation")("aria-hidden","true"),m(),d("veltDynamicTemplate",pt(6,LBe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function UBe(i,o){if(i&1&&(f(0),u(1,VBe,3,11,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,FBe,n.conditionSignal(),A(1,NBe,n.componentConfigSignal)))}}var Kb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-options-item-icon",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type,device:this.device}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-options-item-icon"]],inputs:{type:"type",device:"device"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-media-source-settings-options--selected-icon"],[4,"veltDynamicTemplate"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M3.75 9L7.5 12.75L15 5.25","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,UBe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-media-source-settings-options--selected-icon[_ngcontent-%COMP%]{visibility:hidden;color:var(--velt-accent-text);display:flex}.velt-media-source-settings-options--selected-icon.selected[_ngcontent-%COMP%]{visibility:visible}"],changeDetection:0});let i=o;return i})();var jBe=i=>({componentConfigSignal:i}),$Be=(i,o)=>({condition:i,data:o}),HBe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-options-item-label-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function zBe(i,o){if(i&1&&(f(0),_(1,"p"),P(2,"translate"),te(3),P(4,"translate"),b(),v()),i&2){let n=l(2).ngIf,e=l();m(),ue("velt-media-source-settings-options--label-selected",e.device.deviceId===(e.type==="audio"?n.selectedAudioDevice==null?null:n.selectedAudioDevice.deviceId:n.selectedVideoDevice==null?null:n.selectedVideoDevice.deviceId)),x("data-testid",e.componentId+"-device-label")("role","option")("title",M(2,6,e.device.label)),m(2),_e(" ",M(4,8,e.device.label)," ")}}function GBe(i,o){if(i&1&&(f(0),u(1,zBe,5,10,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",pt(1,HBe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function WBe(i,o){if(i&1&&(f(0),u(1,GBe,2,6,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,$Be,n.conditionSignal(),A(1,jBe,n.componentConfigSignal)))}}var Zb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-options-item-label",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type,device:this.device}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemLabelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemLabelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsItemLabelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-options-item-label"]],inputs:{type:"type",device:"device"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"]],template:function(t,r){t&1&&u(0,WBe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["p[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0}.velt-media-source-settings-options--label-selected[_ngcontent-%COMP%]{color:var(--velt-text-0)}"],changeDetection:0});let i=o;return i})();var qBe=i=>({componentConfigSignal:i}),YBe=(i,o)=>({condition:i,data:o}),KBe=(i,o,n)=>({device:i,type:o,componentConfigSignal:n}),ZBe=(i,o,n,e,t)=>({template:i,context:o,cloneTemplate:!0,componentName:"velt-media-source-settings-options-item-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function XBe(i,o){if(i&1&&(f(0),w(1,"velt-media-source-settings-options-item-icon",7)(2,"velt-media-source-settings-options-item-label",7),v()),i&2){let n=l().$implicit,e=l(4);m(),d("device",n)("type",e.type)("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-option-icon-"+n.deviceId),m(),d("device",n)("type",e.type)("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-option-label-"+n.deviceId)}}function QBe(i,o){if(i&1){let n=Y();_(0,"div",5),G("click",function(){let t=N(n).$implicit,r=l(3).ngIf,a=l();return F(a.type==="audio"?r.selectAudioDevice(t):r.selectVideoDevice(t))}),u(1,XBe,3,8,"ng-container",6),b()}if(i&2){let n=o.$implicit,e=l(3).ngIf,t=l();ue("velt-media-source-settings-options--current-selected",n.deviceId===(t.type==="audio"?e.selectedAudioDevice==null?null:e.selectedAudioDevice.deviceId:e.selectedVideoDevice==null?null:e.selectedVideoDevice.deviceId)),x("data-testid",t.componentId+"-option-"+n.deviceId)("role","option"),m(),d("veltDynamicTemplate",$(9,ZBe,t.optionTemplate,je(5,KBe,n,t.type,t.componentConfigSignal),e==null?null:e.variant,t.setIfCondition.bind(t),t.elementRef))}}function JBe(i,o){if(i&1&&(_(0,"div",3),u(1,QBe,2,15,"div",4),b()),i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId+"-options")("role","listbox")("aria-orientation","vertical"),m(),d("ngForOf",e.type==="audio"?n.audioDevices:n.videoDevices)}}function eVe(i,o){if(i&1&&(f(0),u(1,JBe,2,4,"div",2),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",e.type==="audio"?n.isAudioPermissionOpen:n.isVideoPermissionOpen)}}function tVe(i,o){if(i&1&&(f(0),u(1,eVe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,YBe,n.conditionSignal(),A(1,qBe,n.componentConfigSignal)))}}var k0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-options",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{if(this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes(),!this.optionTemplate){let e=this.template?.querySelector("velt-media-source-settings-options-item-wireframe");Ke(e)||(this.optionTemplate=e)}}catch{}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsOptionsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-options-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-media-source-settings-options",4,"ngIf"],[1,"velt-media-source-settings-options"],["class","velt-media-source-settings-options-item",3,"velt-media-source-settings-options--current-selected","click",4,"ngFor","ngForOf"],[1,"velt-media-source-settings-options-item",3,"click"],[4,"veltDynamicTemplate"],[3,"device","type","componentConfigSignal"]],template:function(t,r){t&1&&u(0,tVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-media-source-settings-options[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center;max-height:104px;overflow-y:scroll}.velt-media-source-settings-options-item[_ngcontent-%COMP%]{width:100%;display:flex;gap:var(--velt-spacing-md);align-items:center;cursor:pointer;padding-block:var(--velt-spacing-sm);border-radius:var(--velt-border-radius-sm);color:var(--velt-text-6)}.velt-media-source-settings-options-item[_ngcontent-%COMP%]:not(.velt-media-source-settings-options--current-selected):hover{background:var(--velt-background-4);color:var(--velt-text-0)}.velt-media-source-settings-options--current-selected[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:50%;color:var(--velt-text-0)}"],changeDetection:0});let i=o;return i})();var nVe=i=>({componentConfigSignal:i}),iVe=(i,o)=>({condition:i,data:o}),oVe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-selected-label-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function rVe(i,o){if(i&1&&(f(0),_(1,"p",3),te(2),P(3,"translate"),P(4,"translate"),P(5,"translate"),P(6,"translate"),b(),v()),i&2){let n,e=l(3);m(),x("data-testid",e.componentId+"-selected-device-label")("role","status")("aria-live","polite"),m(),_e(" ",e.type==="audio"?(n=M(3,4,(n=e.componentConfigSignal().selectedAudioDevice)==null?null:n.label))!==null&&n!==void 0?n:M(4,6,"No device found"):(n=M(5,8,(n=e.componentConfigSignal().selectedVideoDevice)==null?null:n.label))!==null&&n!==void 0?n:M(6,10,"No device found")," ")}}function aVe(i,o){if(i&1&&(f(0),u(1,rVe,7,12,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",pt(1,oVe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function sVe(i,o){if(i&1&&(f(0),u(1,aVe,2,6,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,iVe,n.conditionSignal(),A(1,nVe,n.componentConfigSignal)))}}var R0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-selected-label",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsSelectedLabelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsSelectedLabelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsSelectedLabelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-selected-label-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings-label"]],template:function(t,r){t&1&&u(0,sVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{flex:1}.velt-media-source-settings-label[_ngcontent-%COMP%]{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;color:var(--velt-text-3)}"],changeDetection:0});let i=o;return i})();var lVe=i=>({componentConfigSignal:i}),cVe=(i,o)=>({condition:i,data:o}),dVe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-toggle-icon-close-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function mVe(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-toggle-icon")("aria-hidden","true")}}function pVe(i,o){if(i&1&&(f(0),u(1,mVe,3,2,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",pt(1,dVe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function gVe(i,o){if(i&1&&(f(0),u(1,pVe,2,6,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",e.type==="audio"?!n.isAudioPermissionOpen:!n.isVideoPermissionOpen)}}function uVe(i,o){if(i&1&&(f(0),u(1,gVe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,cVe,n.conditionSignal(),A(1,lVe,n.componentConfigSignal)))}}var Xb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-toggle-icon-close",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconCloseComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconCloseComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconCloseComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-toggle-icon-close-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","role","presentation",1,"velt-media-source-settings-toggle-icon"],["d","M4 7L9 12L14 7","fill","currentColor"]],template:function(t,r){t&1&&u(0,uVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}svg[_ngcontent-%COMP%]{max-width:none;color:var(--velt-text-12)}"],changeDetection:0});let i=o;return i})();var hVe=i=>({componentConfigSignal:i}),fVe=(i,o)=>({condition:i,data:o}),vVe=(i,o,n,e)=>({template:i,componentName:"velt-media-source-settings-toggle-icon-open-wireframe",variant:o,setIfCondition:n,componentElementRef:e});function CVe(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-toggle-icon-open")("aria-hidden","true")}}function _Ve(i,o){if(i&1&&(f(0),u(1,CVe,3,2,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",pt(1,vVe,e.template,n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function yVe(i,o){if(i&1&&(f(0),u(1,_Ve,2,6,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",e.type==="audio"?n.isAudioPermissionOpen:n.isVideoPermissionOpen)}}function SVe(i,o){if(i&1&&(f(0),u(1,yVe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,fVe,n.conditionSignal(),A(1,hVe,n.componentConfigSignal)))}}var Qb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-toggle-icon-open",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconOpenComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconOpenComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconOpenComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-toggle-icon-open-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","role","presentation",1,"velt-media-source-settings-toggle-icon-open"],["d","M4 12L9 7L14 12","fill","currentColor"]],template:function(t,r){t&1&&u(0,SVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}svg[_ngcontent-%COMP%]{max-width:none;color:var(--velt-text-12)}"],changeDetection:0});let i=o;return i})();var bVe=i=>({componentConfigSignal:i}),IVe=(i,o)=>({condition:i,data:o}),EVe=(i,o)=>({componentConfigSignal:i,type:o}),xVe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-media-source-settings-toggle-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function TVe(i,o){if(i&1&&(f(0),_(1,"div",3),w(2,"velt-media-source-settings-toggle-icon-open-internal",4)(3,"velt-media-source-settings-toggle-icon-close-internal",4),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-toggle-container")("role","presentation")("aria-hidden","true"),m(),d("componentConfigSignal",n.componentConfigSignal)("type",n.type)("template",n.template),x("data-testid",n.componentId+"-toggle-open"),m(),d("componentConfigSignal",n.componentConfigSignal)("type",n.type)("template",n.template),x("data-testid",n.componentId+"-toggle-close")}}function DVe(i,o){if(i&1&&(f(0),u(1,TVe,4,11,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(4,xVe,e.template,k(1,EVe,e.componentConfigSignal,e.type),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function wVe(i,o){if(i&1&&(f(0),u(1,DVe,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,IVe,n.conditionSignal(),A(1,bVe,n.componentConfigSignal)))}}var N0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.type="audio",this.componentId="velt-media-source-settings-toggle-icon",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,type:this.type}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsToggleIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-toggle-icon-internal"]],inputs:{type:"type"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings--toggle-icon"],[3,"componentConfigSignal","type","template"]],template:function(t,r){t&1&&u(0,wVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var OVe=i=>({componentConfigSignal:i}),AVe=(i,o)=>({condition:i,data:o}),PVe=i=>({componentConfigSignal:i,type:"video"}),MVe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-media-source-settings-video-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function kVe(i,o){if(i&1&&(f(0),_(1,"div",5)(2,"div",6),le(),_(3,"svg",7),w(4,"path",8)(5,"path",9),b()(),ht(),w(6,"velt-media-source-settings-selected-label-internal",10)(7,"velt-media-source-settings-toggle-icon-internal",10),b(),w(8,"velt-media-source-settings-divider-internal",10)(9,"velt-media-source-settings-options-internal",10),v()),i&2){let n=l(4);m(),x("aria-hidden","true"),m(5),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-label"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-toggle"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-divider"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template),x("data-testid",n.componentId+"-options")}}function RVe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("clickOutside",function(){N(n);let t=l(2).ngIf;return F(t.closeVideoDropdown())})("click",function(t){N(n);let r=l(2).ngIf;return F(r.toggleVideoPermission(t))}),u(2,kVe,10,13,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();ue("velt-media-source-settings-video--active",n.isVideoPermissionOpen),x("data-testid",e.componentId)("role","button")("aria-expanded",n.isVideoPermissionOpen)("aria-haspopup","listbox")("aria-label",M(1,9,"Video settings"))("tabindex",0),m(2),d("veltDynamicTemplate",$(13,MVe,e.template,A(11,PVe,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function NVe(i,o){if(i&1&&(f(0),u(1,RVe,3,19,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.settingsVisible==null?null:n.settingsVisible.video)}}function FVe(i,o){if(i&1&&(f(0),u(1,NVe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,AVe,n.conditionSignal(),A(1,OVe,n.componentConfigSignal)))}}var Jb=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-media-source-settings-video",super.initializeComponentConfigSignal(new sr)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsVideoComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in MediaSourceSettingsVideoComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsVideoComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-video-internal"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-media-source-settings-video","snippylyClickOutside","",3,"velt-media-source-settings-video--active","clickOutside","click",4,"ngIf"],["snippylyClickOutside","",1,"velt-media-source-settings-video",3,"clickOutside","click"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings-video-trigger"],[1,"velt-media-source-settings-video-trigger-icon"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M10 6.66675L13.0353 5.14941C13.1369 5.09864 13.2499 5.07467 13.3633 5.07978C13.4768 5.08489 13.5871 5.11891 13.6837 5.17862C13.7804 5.23832 13.8602 5.32173 13.9155 5.42093C13.9709 5.52012 13.9999 5.63182 14 5.74541V10.2547C13.9999 10.3683 13.9709 10.48 13.9155 10.5792C13.8602 10.6784 13.7804 10.7618 13.6837 10.8215C13.5871 10.8812 13.4768 10.9153 13.3633 10.9204C13.2499 10.9255 13.1369 10.9015 13.0353 10.8507L10 9.33341V6.66675Z","stroke","currentColor","stroke-linecap","round","stroke-linejoin","round"],["d","M2 5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H8.66667C9.02029 4 9.35943 4.14048 9.60948 4.39052C9.85952 4.64057 10 4.97971 10 5.33333V10.6667C10 11.0203 9.85952 11.3594 9.60948 11.6095C9.35943 11.8595 9.02029 12 8.66667 12H3.33333C2.97971 12 2.64057 11.8595 2.39052 11.6095C2.14048 11.3594 2 11.0203 2 10.6667V5.33333Z","stroke","currentColor","stroke-linecap","round","stroke-linejoin","round"],["type","video",3,"componentConfigSignal","template"]],template:function(t,r){t&1&&u(0,FVe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-media-source-settings-video[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);margin:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-md);display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.velt-media-source-settings-video[_ngcontent-%COMP%]:hover{background:var(--velt-background-3)}.velt-media-source-settings-video--active[_ngcontent-%COMP%]{background:var(--velt-background-2)}.velt-media-source-settings-video-trigger[_ngcontent-%COMP%]{width:100%;display:flex;gap:var(--velt-spacing-md);align-items:center;cursor:pointer}.velt-media-source-settings-video-trigger[_ngcontent-%COMP%] .velt-media-source-settings-video-trigger-icon[_ngcontent-%COMP%]{display:flex;padding:1px;color:var(--velt-text-3)}.velt-media-source-settings-video-trigger[_ngcontent-%COMP%] .velt-media-source-settings-video-trigger-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{max-width:none}"],changeDetection:0});let i=o;return i})();var Ede=i=>({componentConfigSignal:i}),LVe=(i,o)=>({condition:i,data:o}),BVe=(i,o,n,e,t)=>({template:i,context:o,cloneTemplate:!0,componentName:"velt-media-source-settings-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function VVe(i,o){i&1&&Ue(0)}function UVe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,VVe,1,0,"ng-container",4),b()),i&2){l();let n=de(3);m(),d("ngTemplateOutlet",n)}}function jVe(i,o){if(i&1&&(f(0),_(1,"div",8),w(2,"velt-media-source-settings-audio-internal",9)(3,"velt-media-source-settings-video-internal",9),b(),v()),i&2){let n=l(5);m(),x("role","group")("aria-label","Media settings controls"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-audio")("role","region")("aria-label","Audio settings"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-video")("role","region")("aria-label","Video settings")}}function $Ve(i,o){if(i&1&&(_(0,"div",6),P(1,"translate"),u(2,jVe,4,10,"ng-container",7),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId)("role","dialog")("aria-label",M(1,5,"Media source settings"))("aria-modal","true"),m(2),d("veltDynamicTemplate",$(9,BVe,e.template,A(7,Ede,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function HVe(i,o){if(i&1&&u(0,$Ve,3,15,"div",5),i&2){let n=l(2).ngIf;d("ngIf",n.isOpen||n.settingsEmbedded)}}function zVe(i,o){if(i&1&&(f(0),u(1,UVe,2,1,"velt-shadow-dom-internal",3)(2,HVe,1,1,"ng-template",null,0,xe),v()),i&2){let n=de(3),e=l().ngIf,t=l();m(),d("ngIf",e.shadowDom&&!t.template)("ngIfElse",n)}}function GVe(i,o){if(i&1&&(f(0),u(1,zVe,4,2,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,LVe,n.conditionSignal(),A(1,Ede,n.componentConfigSignal)))}}var eI=(()=>{let o=class o extends H{constructor(e,t,r,a,s,c){super(a,s,e),this.loggingService=e,this.wireframeService=t,this.devicePermissionService=r,this.elementRef=a,this.dynamicDataService=s,this.recorderService=c,this.isOpen=!1,this.showMicSettings=!0,this.showCamSettings=!0,this.config={},this.shadowDom=!0,this.devices=[],this.defaultMediaSourceOptions=kc(),this.subscriptions=[],this.veltElement=!0,this.componentConfigSignal=Te({toggleAudioPermission:this.toggleAudioPermission.bind(this),selectAudioDevice:this.selectAudioDevice.bind(this),toggleVideoPermission:this.toggleVideoPermission.bind(this),selectVideoDevice:this.selectVideoDevice.bind(this),isAudioPermissionOpen:!1,settingsVisible:{audio:!0,video:!0},selectedAudioDevice:void 0,selectedVideoDevice:void 0,isVideoPermissionOpen:!1,audioDevices:[],videoDevices:[],shadowDom:this.shadowDom,isOpen:this.isOpen,variant:this.variant,settingsEmbedded:!1,closeVideoDropdown:this.closeVideoDropdown.bind(this),closeAudioDropdown:this.closeAudioDropdown.bind(this)}),this.componentId="velt-media-source-settings";try{this.getDevices(),this.subscriptions.push(this.devicePermissionService.getPermissionState$("video").subscribe(p=>{this.getDevices()})),this.subscriptions.push(this.devicePermissionService.getPermissionState$("audio").subscribe(p=>{this.getDevices()})),this.subscriptions.push(this.recorderService.getSettingsEmbedded$().subscribe(p=>{this.componentConfigSignal.update(g=>T(I({},g),{settingsEmbedded:p}))}))}catch(p){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent constructor: ",p)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.updateSettingsVisibility(),this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;");let e="velt-media-source-settings-wireframe";this.variant&&(e+=`---${this.variant}`),this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}})}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in MediaSourceSettingsComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),(e.showMicSettings||e.showCamSettings)&&this.updateSettingsVisibility()}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnChanges: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e?.unsubscribe()})}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnDestroy: ",e)}}updateSettingsVisibility(){try{this.componentConfigSignal.update(e=>T(I({},e),{settingsVisible:{audio:this.showMicSettings,video:this.showCamSettings}}))}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnChanges: ",e)}}getDevices(){return Q(this,null,function*(){try{let e=new zn;if(e.getBrowserName()?.toLowerCase()==="safari"||e.getBrowserName()?.toLowerCase()==="firefox")try{let t=yield navigator.mediaDevices.getUserMedia({audio:!0,video:!0});t&&t.getTracks().forEach(r=>r.stop())}catch(t){this.loggingService.catch("Error in MediaSourceSettingsComponent getDevices getUserMedia catch: ",t)}navigator.mediaDevices.enumerateDevices().then(t=>{if(this.devices=t.filter(r=>r.kind==="audioinput"||r.kind==="videoinput"),this.componentConfigSignal.update(r=>T(I({},r),{audioDevices:this.devices.filter(a=>a.kind==="audioinput"&&a.deviceId!==""),videoDevices:this.devices.filter(a=>a.kind==="videoinput"&&a.deviceId!=="")})),this.componentConfigSignal().audioDevices.length>0&&!this.componentConfigSignal().selectedAudioDevice){if(this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId){let r=this.componentConfigSignal().audioDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId);r&&this.componentConfigSignal.update(a=>T(I({},a),{selectedAudioDevice:r}))}this.componentConfigSignal().selectedAudioDevice||this.componentConfigSignal.update(r=>T(I({},r),{selectedAudioDevice:this.componentConfigSignal().audioDevices[0]}))}if(this.componentConfigSignal().videoDevices.length>0&&!this.componentConfigSignal().selectedVideoDevice){if(this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId){let r=this.componentConfigSignal().videoDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId);r&&this.componentConfigSignal.update(a=>T(I({},a),{selectedVideoDevice:r}))}this.componentConfigSignal().selectedVideoDevice||this.componentConfigSignal.update(r=>T(I({},r),{selectedVideoDevice:this.componentConfigSignal().videoDevices[0]}))}}).catch(t=>{this.loggingService.catch("Error in MediaSourceSettingsComponent getDevices enumerateDevices catch: ",t)})}catch(e){this.loggingService.catch("Error in MediaSourceSettingsComponent getDevices: ",e)}})}selectAudioDevice(e){try{this.componentConfigSignal.update(t=>T(I({},t),{selectedAudioDevice:e})),this.saveChanges()}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectAudioDevice: ",t)}}selectVideoDevice(e){try{this.componentConfigSignal.update(t=>T(I({},t),{selectedVideoDevice:e})),this.saveChanges()}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectVideoDevice: ",t)}}saveChanges(){try{let e={};this.componentConfigSignal()?.settingsVisible?.audio&&(e.selectedAudioDevice=this.componentConfigSignal()?.selectedAudioDevice),this.componentConfigSignal()?.settingsVisible?.video&&(e.selectedVideoDevice=this.componentConfigSignal()?.selectedVideoDevice),localStorage.setItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS,JSON.stringify(e||{})),this.defaultMediaSourceOptions=kc(),this.config.mediaConfig.audio||(this.config.mediaConfig.audio={enabled:!1}),this.config.mediaConfig.audio.deviceId=this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId,this.config.mediaConfig.video||(this.config.mediaConfig.video={enabled:!1}),this.config.mediaConfig.video.deviceId=this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId,this.config.updateMediaConfig(this.config.mediaConfig)}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent saveChanges: ",e)}}toggleAudioPermission(e){try{e.stopPropagation(),this.componentConfigSignal().audioDevices.length>0&&this.componentConfigSignal.update(t=>T(I({},t),{isAudioPermissionOpen:!t.isAudioPermissionOpen}))}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent toggleAudioPermission: ",t)}}toggleVideoPermission(e){try{e.stopPropagation(),this.componentConfigSignal().videoDevices.length>0&&this.componentConfigSignal.update(t=>(t=T(I({},t),{isVideoPermissionOpen:!t.isVideoPermissionOpen}),t))}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent toggleVideoPermission: ",t)}}closeVideoDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{isVideoPermissionOpen:!1}),e))}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent closeVideoDropdown: ",e)}}closeAudioDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{isAudioPermissionOpen:!1}),e))}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent closeAudioDropdown: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(Wd),h(R),h(S),h(In))},o.\u0275cmp=O({type:o,selectors:[["velt-media-source-settings-internal"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{isOpen:"isOpen",showMicSettings:"showMicSettings",showCamSettings:"showCamSettings",config:"config",shadowDom:"shadowDom",variant:"variant"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[["mediaSourcePermissionRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["class","velt-media-source-settings-container",4,"ngIf"],[1,"velt-media-source-settings-container"],[4,"veltDynamicTemplate"],[1,"velt-media-source-settings"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,GVe,2,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-media-source-settings[_ngcontent-%COMP%]{position:absolute;left:0;bottom:90px;border-radius:var(--velt-border-radius-lg);background:var(--velt-background-1);display:flex;flex-direction:column;width:366px;font-weight:400;font-size:var(--velt-font-size-xs);line-height:18px;overflow:hidden}"],changeDetection:0});let i=o;return i})();var yn=class{constructor(){this.closeDialog=()=>{},this.startCountdown=()=>{},this.toggleAudio=()=>{},this.toggleVideo=()=>{},this.toggleSettings=()=>{},this.cancelCountdown=()=>{},this.updateMediaConfig=()=>{},this.handleOverlayClick=()=>{},this.countdownStarted=!1,this.isSettingsOpen=!1,this.mediaConfig={audio:{enabled:!1},video:{enabled:!1}},this.mediaState={audio:{enabled:!1},video:{enabled:!1}},this.type="video",this.darkMode=!1,this.shadowDom=!0}};var WVe=i=>({componentConfigSignal:i}),qVe=(i,o)=>({condition:i,data:o}),YVe=(i,o)=>({componentConfigSignal:i,variant:o}),KVe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-audio-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function ZVe(i,o){i&1&&Ue(0)}function XVe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,ZVe,1,0,"ng-container",5),b()),i&2){l();let n=de(3);m(),d("ngTemplateOutlet",n)}}function QVe(i,o){if(i&1&&(f(0),_(1,"div",9)(2,"div",10),w(3,"app-recording-preview-steps-dialog-close-button",11),b(),w(4,"app-recording-preview-steps-dialog-timer",11)(5,"app-recording-preview-steps-dialog-waveform",12),_(6,"div",13),w(7,"velt-recording-preview-steps-dialog-settings-panel-internal",12),_(8,"app-recording-preview-steps-dialog-button-panel",11),w(9,"app-recording-preview-steps-dialog-start-recording",11)(10,"velt-recording-preview-steps-dialog-mic-button-internal",11)(11,"app-recording-preview-steps-dialog-settings",11),b(),w(12,"app-recording-preview-steps-dialog-bottom-panel",11),b()(),v()),i&2){let n=l(5);m(),x("data-testid",n.componentId+"-overlay"),m(),x("data-testid",n.componentId+"-header"),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal),m(),x("data-testid",n.componentId+"-settings")("role","group")("aria-label","Recording settings"),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant)}}function JVe(i,o){if(i&1){let n=Y();_(0,"div",7,1),P(2,"translate"),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),F(t.stopPropagation())})("click",function(t){N(n);let r=l(3).ngIf;return F(r.handleOverlayClick(t))}),u(3,QVe,13,28,"ng-container",8),b()}if(i&2){let n=l(4);x("data-testid",n.componentId)("role","dialog")("aria-label",M(2,4,"Audio recording preview")),m(3),d("veltDynamicTemplate",$(9,KVe,n.template,k(6,YVe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function eUe(i,o){if(i&1&&u(0,JVe,4,15,"div",6),i&2){let n=l(2).ngIf;d("ngIf",n.type==="audio")}}function tUe(i,o){if(i&1&&(f(0),u(1,XVe,2,1,"velt-shadow-dom-internal",4)(2,eUe,1,1,"ng-template",null,0,xe),v()),i&2){let n=de(3),e=l().ngIf,t=l();m(),d("ngIf",e.shadowDom&&!t.template)("ngIfElse",n)}}function nUe(i,o){if(i&1&&(f(0),u(1,tUe,4,2,"ng-container",3),v()),i&2){let n=l();m(),d("veltIf",k(3,qVe,n.conditionSignal(),A(1,WVe,n.componentConfigSignal)))}}var tI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.dynamicDataService=a,this.componentId="velt-recording-preview-steps-dialog-audio",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes();let e="velt-recording-preview-steps-dialog-audio-wireframe";this.variant&&(e+=`---${this.variant}`),this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}})}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogAudioComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogAudioComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogAudioComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-audio"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["audioDialogRef",""],["recordingPreviewDialogRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["class","velt-recording-preview-audio",3,"pointerdown","pointerup","click",4,"ngIf"],[1,"velt-recording-preview-audio",3,"pointerdown","pointerup","click"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview-audio--overlay"],[1,"velt-recording-preview-audio--header"],[3,"componentConfigSignal","template","variant"],[3,"componentConfigSignal"],[1,"velt-recording-preview-audio--settings"]],template:function(t,r){t&1&&u(0,nUe,2,6,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%;height:100%}.velt-recording-preview-audio[_ngcontent-%COMP%], .velt-recording-preview-audio--header[_ngcontent-%COMP%]{display:flex}.velt-recording-preview-audio[_ngcontent-%COMP%]{position:relative;width:calc((50rem + 0px) * var(--velt-base-rem-unit));height:calc((30rem + 0px) * var(--velt-base-rem-unit));max-width:calc(.8 * var(--legacy-velt-viewport-width))}.velt-recording-preview-audio[_ngcontent-%COMP%] .velt-recording-preview-audio--audio-waves[_ngcontent-%COMP%]{transform:scale(1.5);height:100%;z-index:-1}@media screen and (max-width: 768px){.velt-recording-preview-audio[_ngcontent-%COMP%]{width:calc((35rem + 0px) * var(--velt-base-rem-unit));height:calc((25rem + 0px) * var(--velt-base-rem-unit));max-width:calc(.8 * var(--legacy-velt-viewport-width))}}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog{width:calc(1 * var(--legacy-velt-viewport-width));max-width:calc(1 * var(--legacy-velt-viewport-width))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{width:calc(1 * var(--legacy-velt-viewport-width));height:calc(1 * var(--legacy-velt-viewport-height));border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .velt-recording-preview-audio{width:calc(1 * var(--legacy-velt-viewport-width));height:calc(1 * var(--legacy-velt-viewport-height));max-width:calc(1 * var(--legacy-velt-viewport-width));border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .velt-recording-preview-audio video{height:100%}}.velt-recording-preview-audio--overlay[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:var(--velt-spacing-2xl);content:"";position:absolute;border-radius:var(--velt-border-radius-lg);border:1px solid var(--velt-border-2);background:var(--velt-background-0);z-index:1;inset:0}.velt-recording-preview-audio--header[_ngcontent-%COMP%]{justify-content:flex-end;width:100%;gap:var(--velt-spacing-sm);align-items:center}.velt-recording-preview-audio--settings[_ngcontent-%COMP%]{width:366px;display:flex;flex-direction:column;gap:var(--velt-spacing-lg);align-items:center;justify-content:center;position:relative;pointer-events:auto}'],changeDetection:0});let i=o;return i})();var iUe=i=>({componentConfigSignal:i}),oUe=(i,o)=>({condition:i,data:o}),rUe=(i,o)=>({componentConfigSignal:i,variant:o}),aUe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-bottom-panel-close-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function sUe(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6),w(3,"path",7),b()(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function lUe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("click",function(){N(n);let t=l(2).ngIf;return F(t.closeDialog())}),u(2,sUe,4,1,"ng-container",4),b()}if(i&2){let n=l(3);x("data-testid",n.componentId)("aria-label",M(1,3,"Cancel recording")),m(2),d("veltDynamicTemplate",$(8,aUe,n.template,k(5,rUe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function cUe(i,o){if(i&1&&(f(0),u(1,lUe,3,14,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.countdownStarted)}}function dUe(i,o){if(i&1&&(f(0),u(1,cUe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,oUe,n.conditionSignal(),A(1,iUe,n.componentConfigSignal)))}}var nI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-bottom-panel-close",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCloseComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCloseComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Close recording preview")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCloseComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-bottom-panel-close"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-recording-preview--bottom-panel-close","role","button","tabindex","0",3,"click",4,"ngIf"],["role","button","tabindex","0",1,"velt-recording-preview--bottom-panel-close",3,"click"],[4,"veltDynamicTemplate"],["aria-hidden","true",1,"velt-recording-preview--close"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","role","img","aria-hidden","true"],["d","M12 3.99805L4 11.998M4 3.99805L12 11.998","stroke","currentColor","stroke-width","1.33333","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,dUe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-recording-preview--close[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm);cursor:pointer;display:flex;color:var(--velt-text-12);transition:all .2s ease}.velt-recording-preview--close[_ngcontent-%COMP%]:hover{color:var(--velt-text-10)}"],changeDetection:0});let i=o;return i})();var mUe=i=>({componentConfigSignal:i}),pUe=(i,o)=>({condition:i,data:o}),gUe=(i,o)=>({componentConfigSignal:i,variant:o}),uUe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-bottom-panel-countdown-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function hUe(i,o){if(i&1&&(_(0,"div",4),te(1),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId)("aria-label","Recording starts in "+n.countdown+" seconds"),m(),_e(" ",n.countdown," ")}}function fUe(i,o){if(i&1&&(f(0),u(1,hUe,2,3,"div",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.countdownStarted)}}function vUe(i,o){if(i&1&&(f(0),u(1,fUe,2,1,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(4,uUe,n.template,k(1,gUe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function CUe(i,o){if(i&1&&(f(0),u(1,vUe,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,pUe,n.conditionSignal(),A(1,mUe,n.componentConfigSignal)))}}var iI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-bottom-panel-countdown",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCountdownComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCountdownComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelCountdownComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-bottom-panel-countdown"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-recording-preview--countdown","role","timer","aria-live","polite",4,"ngIf"],["role","timer","aria-live","polite",1,"velt-recording-preview--countdown"]],template:function(t,r){t&1&&u(0,CUe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-recording-preview--countdown[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:var(--velt-font-size-sm);font-weight:500;color:var(--velt-text-4)}"],changeDetection:0});let i=o;return i})();var _Ue=i=>({componentConfigSignal:i}),yUe=(i,o)=>({condition:i,data:o}),Wz=(i,o)=>({componentConfigSignal:i,variant:o}),qz=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-bottom-panel-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function SUe(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6),w(3,"path",7)(4,"path",8),b()(),v()),i&2){let n=l(5);m(),x("data-testid",n.componentId+"-video")}}function bUe(i,o){if(i&1&&(f(0),u(1,SUe,5,1,"ng-container",4),v()),i&2){let n=l(4);m(),d("veltDynamicTemplate",$(4,qz,n.template,k(1,Wz,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function IUe(i,o){if(i&1&&(f(0),_(1,"div",9),le(),_(2,"svg",6),w(3,"path",10),b()(),v()),i&2){let n=l(5);m(),x("data-testid",n.componentId+"-screen")}}function EUe(i,o){if(i&1&&(f(0),u(1,IUe,4,1,"ng-container",4),v()),i&2){let n=l(4);m(),d("veltDynamicTemplate",$(4,qz,n.template,k(1,Wz,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function xUe(i,o){if(i&1&&(f(0),_(1,"div",11),le(),_(2,"svg",6),w(3,"path",12),b()(),v()),i&2){let n=l(5);m(),x("data-testid",n.componentId+"-audio")}}function TUe(i,o){if(i&1&&(f(0),u(1,xUe,4,1,"ng-container",4),v()),i&2){let n=l(4);m(),d("veltDynamicTemplate",$(4,qz,n.template,k(1,Wz,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function DUe(i,o){if(i&1&&(f(0)(1,2),_(2,"div"),u(3,bUe,2,10,"ng-container",3)(4,EUe,2,10,"ng-container",3)(5,TUe,2,10,"ng-container",3),b(),v()()),i&2){let n=l(2).ngIf,e=l();m(),d("ngSwitch",n.type),m(),ue("velt-recording-preview--recording-started",n.countdownStarted),x("data-testid",e.componentId),m(),d("ngSwitchCase","video"),m(),d("ngSwitchCase","screen"),m(),d("ngSwitchCase","audio")}}function wUe(i,o){if(i&1&&(f(0),u(1,DUe,6,7,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",!e.type||e.type===n.type)}}function OUe(i,o){if(i&1&&(f(0),u(1,wUe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,yUe,n.conditionSignal(),A(1,_Ue,n.componentConfigSignal)))}}var oI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-bottom-panel-icon",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label",`${this.type||""} recording icon`)}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-bottom-panel-icon"]],inputs:{type:"type",variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"veltDynamicTemplate"],["role","img","aria-label","Video recording icon | translate",1,"velt-recording-preview--bottom-panel-icon"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M14.6657 10.2226L18.7128 8.19949C18.8483 8.13179 18.9988 8.09983 19.1501 8.10664C19.3014 8.11346 19.4485 8.15882 19.5773 8.23843C19.7062 8.31803 19.8126 8.42924 19.8864 8.56151C19.9602 8.69377 19.9989 8.8427 19.999 8.99415V15.0066C19.9989 15.1581 19.9602 15.307 19.8864 15.4392C19.8126 15.5715 19.7062 15.6827 19.5773 15.7623C19.4485 15.8419 19.3014 15.8873 19.1501 15.8941C18.9988 15.9009 18.8483 15.869 18.7128 15.8013L14.6657 13.7782V10.2226Z","stroke","white","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M3.99902 8.44428C3.99902 7.97279 4.18632 7.5206 4.51972 7.1872C4.85312 6.8538 5.30531 6.6665 5.7768 6.6665H12.8879C13.3594 6.6665 13.8116 6.8538 14.145 7.1872C14.4784 7.5206 14.6657 7.97279 14.6657 8.44428V15.5554C14.6657 16.0269 14.4784 16.4791 14.145 16.8125C13.8116 17.1459 13.3594 17.3332 12.8879 17.3332H5.7768C5.30531 17.3332 4.85312 17.1459 4.51972 16.8125C4.18632 16.4791 3.99902 16.0269 3.99902 15.5554V8.44428Z","stroke","white","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["role","img","aria-label","Screen recording icon | translate",1,"velt-recording-preview--bottom-panel-icon"],["d","M18.5 12.0004V14.1671C18.5 14.3586 18.4239 14.5423 18.2885 14.6778C18.153 14.8132 17.9693 14.8893 17.7778 14.8893H6.22222C6.03068 14.8893 5.84698 14.8132 5.71153 14.6778C5.57609 14.5423 5.5 14.3586 5.5 14.1671V6.94488C5.5 6.75333 5.57609 6.56963 5.71153 6.43419C5.84698 6.29875 6.03068 6.22266 6.22222 6.22266H12.7222M8.38889 17.7782H15.6111M9.83333 14.8893V17.7782M14.1667 14.8893V17.7782M15.6111 6.22266H18.5M18.5 6.22266V9.11155M18.5 6.22266L14.8889 9.83377","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["role","img","aria-label","Audio recording icon | translate",1,"velt-recording-preview--bottom-panel-icon"],["d","M7 10.4291C7 11.7552 7.52678 13.027 8.46447 13.9647C9.40215 14.9023 10.6739 15.4291 12 15.4291M12 15.4291C13.3261 15.4291 14.5979 14.9023 15.5355 13.9647C16.4732 13.027 17 11.7552 17 10.4291M12 15.4291V18.2863M9.14286 18.2863H14.8571M9.85714 6.8577C9.85714 6.28938 10.0829 5.74434 10.4848 5.34247C10.8866 4.94061 11.4317 4.71484 12 4.71484C12.5683 4.71484 13.1134 4.94061 13.5152 5.34247C13.9171 5.74434 14.1429 6.28938 14.1429 6.8577V10.4291C14.1429 10.9975 13.9171 11.5425 13.5152 11.9444C13.1134 12.3462 12.5683 12.572 12 12.572C11.4317 12.572 10.8866 12.3462 10.4848 11.9444C10.0829 11.5425 9.85714 10.9975 9.85714 10.4291V6.8577Z","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,OUe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:[".velt-recording-preview--bottom-panel-icon[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);background:var(--velt-accent);border-radius:var(--velt-border-radius-full);display:flex;margin-right:var(--velt-spacing-md);color:var(--velt-accent-foreground)}.velt-recording-preview--recording-started[_ngcontent-%COMP%] .velt-recording-preview--bottom-panel-icon[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm)}"],changeDetection:0});let i=o;return i})();var AUe=i=>({componentConfigSignal:i}),PUe=(i,o)=>({condition:i,data:o}),MUe=(i,o)=>({componentConfigSignal:i,variant:o}),kUe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-bottom-panel-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function RUe(i,o){if(i&1&&(_(0,"div",6),te(1),P(2,"translate"),w(3,"app-recording-preview-steps-dialog-bottom-panel-countdown",4),b()),i&2){let n=l(4);x("data-testid",n.componentId+"-countdown"),m(),_e(" ",M(2,5,"Starting recording in")," "),m(2),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant)}}function NUe(i,o){if(i&1&&(f(0),_(1,"div",3),P(2,"translate"),w(3,"app-recording-preview-steps-dialog-bottom-panel-icon",4),u(4,RUe,4,7,"div",5),w(5,"app-recording-preview-steps-dialog-bottom-panel-close",4),b(),v()),i&2){let n=l(2).ngIf,e=l();m(),ue("velt-recording-preview--recording-started",n.countdownStarted),x("data-testid",e.componentId)("aria-label",M(2,11,"Recording preview bottom panel")),m(2),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant),m(),d("ngIf",n.countdownStarted),m(),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant)}}function FUe(i,o){if(i&1&&(f(0),u(1,NUe,6,13,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(4,kUe,n.template,k(1,MUe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function LUe(i,o){if(i&1&&(f(0),u(1,FUe,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,PUe,n.conditionSignal(),A(1,AUe,n.componentConfigSignal)))}}var F0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-bottom-panel",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Recording controls bottom panel")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogBottomPanelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-bottom-panel"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region",1,"velt-recording-preview--bottom-panel"],[3,"componentConfigSignal","template","variant"],["class","velt-recording-preview--countdown","role","status","aria-live","polite",4,"ngIf"],["role","status","aria-live","polite",1,"velt-recording-preview--countdown"]],template:function(t,r){t&1&&u(0,LUe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:fixed;bottom:5%}.velt-recording-preview--bottom-panel[_ngcontent-%COMP%]{opacity:0;animation:_ngcontent-%COMP%_showAfterDelay .4s forwards}@keyframes _ngcontent-%COMP%_showAfterDelay{0%{opacity:0}99%{opacity:0}to{opacity:1}}.velt-recording-preview--recording-started[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:var(--velt-spacing-xs) var(--velt-spacing-md) var(--velt-spacing-xs) var(--velt-spacing-xs);border-radius:var(--velt-border-radius-3xl);border:1px solid var(--velt-border-2);background:var(--velt-background-0);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.velt-recording-preview--countdown[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;font-size:var(--velt-font-size-sm);font-weight:500;color:var(--velt-text-4);gap:var(--velt-spacing-xs)}"],changeDetection:0});let i=o;return i})();var BUe=["*"],VUe=i=>({componentConfigSignal:i}),UUe=(i,o)=>({condition:i,data:o}),jUe=(i,o)=>({componentConfigSignal:i,variant:o}),$Ue=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-button-panel-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function HUe(i,o){i&1&&(f(0),Lt(1),v())}function zUe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),u(2,HUe,2,0,"ng-container",4),b()),i&2){let n=l(3);x("data-testid",n.componentId)("aria-label",M(1,4,"Recording control buttons"))("aria-orientation","horizontal"),m(2),d("veltDynamicTemplate",$(9,$Ue,n.template,k(6,jUe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function GUe(i,o){if(i&1&&(f(0),u(1,zUe,3,15,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!n.countdownStarted)}}function WUe(i,o){if(i&1&&(f(0),u(1,GUe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,UUe,n.conditionSignal(),A(1,VUe,n.componentConfigSignal)))}}var L0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-button-panel",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogButtonPanelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogButtonPanelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","toolbar"),e.setAttribute("aria-label","Recording controls")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogButtonPanelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-button-panel"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],ngContentSelectors:BUe,decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-recording-preview-button-panel","role","toolbar",4,"ngIf"],["role","toolbar",1,"velt-recording-preview-button-panel"],[4,"veltDynamicTemplate"]],template:function(t,r){t&1&&(jt(),u(0,WUe,2,6,"ng-container",0)),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview-button-panel[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--velt-spacing-sm);margin-bottom:var(--velt-spacing-lg)}"],changeDetection:0});let i=o;return i})();var qUe=i=>({componentConfigSignal:i}),YUe=(i,o)=>({condition:i,data:o}),KUe=(i,o)=>({componentConfigSignal:i,variant:o}),ZUe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-camera-button-off-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function XUe(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4)(3,"path",5),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function QUe(i,o){if(i&1&&(f(0),u(1,XUe,4,1,"ng-container",2),v()),i&2){let n=l(3);m(),d("veltDynamicTemplate",$(4,ZUe,n.template,k(1,KUe,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function JUe(i,o){if(i&1&&(f(0),u(1,QUe,2,10,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled))}}function eje(i,o){if(i&1&&(f(0),u(1,JUe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,YUe,n.conditionSignal(),A(1,qUe,n.componentConfigSignal)))}}var rI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-camera-button-off",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOffComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOffComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Camera off"),e.setAttribute("aria-pressed","true"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOffComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-camera-button-off-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M20.9375 17.6068C21.1017 17.5503 21.2442 17.444 21.345 17.3027C21.4459 17.1614 21.5 16.9921 21.5 16.8184V11.1818C21.4999 11.0398 21.4636 10.9002 21.3944 10.7762C21.3252 10.6522 21.2255 10.5479 21.1047 10.4733C20.9839 10.3986 20.846 10.3561 20.7042 10.3497C20.5623 10.3433 20.4212 10.3733 20.2942 10.4368L16.5 12.3334V13.1668V10.6667C16.5 10.2246 16.3244 9.80072 16.0118 9.48816C15.6993 9.17559 15.2754 9 14.8333 9H12.3333M16.5 16.5V17.3333C16.5 17.7754 16.3244 18.1993 16.0118 18.5118C15.6993 18.8244 15.2754 19 14.8333 19H8.16667C7.72464 19 7.30072 18.8244 6.98816 18.5118C6.67559 18.1993 6.5 17.7754 6.5 17.3333V10.6667C6.5 10.2246 6.67559 9.80072 6.98816 9.48816C7.30072 9.17559 7.72464 9 8.16667 9H9","stroke","currentColor","stroke-opacity","0.52","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6.5 6.5L21.5 21.5","stroke","#FF7162","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,eje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var tje=i=>({componentConfigSignal:i}),nje=(i,o)=>({condition:i,data:o}),ije=(i,o)=>({componentConfigSignal:i,variant:o}),oje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-camera-button-on-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function rje(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4)(3,"path",5),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function aje(i,o){if(i&1&&(f(0),u(1,rje,4,1,"ng-container",2),v()),i&2){let n=l(3);m(),d("veltDynamicTemplate",$(4,oje,n.template,k(1,ije,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function sje(i,o){if(i&1&&(f(0),u(1,aje,2,10,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.mediaConfig.video==null?null:n.mediaConfig.video.enabled)}}function lje(i,o){if(i&1&&(f(0),u(1,sje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,nje,n.conditionSignal(),A(1,tje,n.componentConfigSignal)))}}var aI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-camera-button-on",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOnComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOnComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Camera on"),e.setAttribute("aria-pressed","false"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOnComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-camera-button-on-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M16.5 12.3334L20.2942 10.4368C20.4212 10.3733 20.5623 10.3433 20.7042 10.3497C20.846 10.3561 20.9839 10.3986 21.1047 10.4733C21.2255 10.5479 21.3252 10.6522 21.3944 10.7762C21.4636 10.9002 21.4999 11.0398 21.5 11.1818V16.8184C21.4999 16.9604 21.4636 17.1 21.3944 17.224C21.3252 17.348 21.2255 17.4523 21.1047 17.5269C20.9839 17.6016 20.846 17.6441 20.7042 17.6505C20.5623 17.6569 20.4212 17.6269 20.2942 17.5634L16.5 15.6668V12.3334Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6.5 10.6667C6.5 10.2246 6.67559 9.80072 6.98816 9.48816C7.30072 9.17559 7.72464 9 8.16667 9H14.8333C15.2754 9 15.6993 9.17559 16.0118 9.48816C16.3244 9.80072 16.5 10.2246 16.5 10.6667V17.3333C16.5 17.7754 16.3244 18.1993 16.0118 18.5118C15.6993 18.8244 15.2754 19 14.8333 19H8.16667C7.72464 19 7.30072 18.8244 6.98816 18.5118C6.67559 18.1993 6.5 17.7754 6.5 17.3333V10.6667Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,lje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var cje=i=>({componentConfigSignal:i}),dje=(i,o)=>({condition:i,data:o}),mje=(i,o)=>({componentConfigSignal:i,variant:o}),pje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-camera-button-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function gje(i,o){if(i&1&&(f(0),_(1,"div",6),w(2,"velt-recording-preview-steps-dialog-camera-button-on-internal",7)(3,"velt-recording-preview-steps-dialog-camera-button-off-internal",7),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),ue("velt-recording-preview--icon-button-off",!(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled)),x("data-testid",e.componentId+"-icon-container"),m(),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant),m(),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant)}}function uje(i,o){if(i&1){let n=Y();_(0,"app-device-permission-button",3)(1,"div",4),P(2,"translate"),P(3,"translate"),P(4,"translate"),G("click",function(){N(n);let t=l(2).ngIf;return F(t.toggleVideo())}),u(5,gje,4,9,"ng-container",5),b()()}if(i&2){let n=l(2).ngIf,e=l();d("darkMode",!!n.darkMode),x("data-testid",e.componentId+"-permission-button"),m(),x("data-testid",e.componentId+"-toggle")("aria-label",M(2,6,"Toggle camera")+" "+(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled?M(3,8,"off"):M(4,10,"on")))("aria-pressed",!!(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled)),m(4),d("veltDynamicTemplate",$(15,pje,e.template,k(12,mje,e.componentConfigSignal,e.variant),e.variant,e.setIfCondition.bind(e),e.elementRef))}}function hje(i,o){if(i&1&&(f(0),u(1,uje,6,21,"app-device-permission-button",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.type==="screen")}}function fje(i,o){if(i&1&&(f(0),u(1,hje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,dje,n.conditionSignal(),A(1,cje,n.componentConfigSignal)))}}var sI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,t),this.devicePermissionService=e,this.loggingService=t,this.elementRef=r,this.dynamicDataService=a,this.componentId="velt-recording-preview-steps-dialog-camera-button",super.initializeComponentConfigSignal(new yn)}ngOnChanges(e){try{if(e.componentConfigSignal){let t=this.componentConfigSignal();!t?.mediaState?.video?.enabled&&t.type==="video"&&this.devicePermissionService.openDevicePermissionDeniedDialog("video",{darkMode:!1})}}catch(t){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonComponent ngOnChanges:",t)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),!this.componentConfigSignal()?.mediaState?.video?.enabled&&this.componentConfigSignal().type==="video"&&this.devicePermissionService.openDevicePermissionDeniedDialog("video",{darkMode:!1})}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonOnComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","group"),e.setAttribute("aria-label","Camera control buttons")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Wd),h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-camera-button-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","video",3,"darkMode",4,"ngIf"],["type","video",3,"darkMode"],["role","button","tabindex","0",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview--icon-button"],[3,"componentConfigSignal","template","variant"]],template:function(t,r){t&1&&u(0,fje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-recording-preview--icon-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);display:flex;align-items:center;justify-content:center;border-radius:var(--velt-border-radius-3xl);cursor:pointer;border:1.5px solid var(--velt-border-2);background:var(--velt-background-0);color:var(--velt-text-2);transition:all .2s ease}.velt-recording-preview--icon-button[_ngcontent-%COMP%]:hover{border:1.5px solid var(--velt-border-3);background:var(--velt-background-1);color:var(--velt-text-3)}"],changeDetection:0});let i=o;return i})();var xde=i=>({componentConfigSignal:i}),vje=(i,o)=>({condition:i,data:o}),Cje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-mic-button-off-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function _je(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4)(3,"path",5),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function yje(i,o){if(i&1&&(f(0),u(1,_je,4,1,"ng-container",2),v()),i&2){let n=l(3);m(),d("veltDynamicTemplate",$(3,Cje,n.template,A(1,xde,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function Sje(i,o){if(i&1&&(f(0),u(1,yje,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled))}}function bje(i,o){if(i&1&&(f(0),u(1,Sje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,vje,n.conditionSignal(),A(1,xde,n.componentConfigSignal)))}}var lI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-mic-button-off",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOffComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOffComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Microphone off"),e.setAttribute("aria-pressed","true"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOffComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-mic-button-off-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M11.5013 8.1665C11.5013 7.50346 11.7647 6.86758 12.2335 6.39874C12.7024 5.9299 13.3383 5.6665 14.0013 5.6665C14.6643 5.6665 15.3002 5.9299 15.7691 6.39874C16.2379 6.86758 16.5013 7.50346 16.5013 8.1665V12.3332C16.5013 12.58 16.4648 12.8254 16.393 13.0615M14.7263 14.7282C14.3527 14.8414 13.9578 14.8655 13.5732 14.7987C13.1885 14.7318 12.8249 14.5758 12.5114 14.3432C12.198 14.1105 11.9433 13.8077 11.7679 13.459C11.5925 13.1102 11.5012 12.7252 11.5013 12.3348V11.5015M8.16797 12.3332C8.16779 13.386 8.45252 14.4192 8.99198 15.3232C9.53144 16.2273 10.3055 16.9685 11.2321 17.4683C12.1587 17.9681 13.2033 18.2078 14.2551 18.162C15.3069 18.1162 16.3267 17.7866 17.2063 17.2082M18.873 15.5415C19.5012 14.5896 19.835 13.4737 19.833 12.3332M10.668 21.4998H17.3346M14.0013 18.1665V21.4998","stroke","currentColor","stroke-opacity","0.52","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M6.5 6.5L21.5 21.5","stroke","#FF7162","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,bje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var Tde=i=>({componentConfigSignal:i}),Ije=(i,o)=>({condition:i,data:o}),Eje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-mic-button-on-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function xje(i,o){if(i&1&&(f(0),le(),_(1,"svg",3),w(2,"path",4),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function Tje(i,o){if(i&1&&(f(0),u(1,xje,3,1,"ng-container",2),v()),i&2){let n=l(3);m(),d("veltDynamicTemplate",$(3,Eje,n.template,A(1,Tde,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function Dje(i,o){if(i&1&&(f(0),u(1,Tje,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.mediaConfig.audio==null?null:n.mediaConfig.audio.enabled)}}function wje(i,o){if(i&1&&(f(0),u(1,Dje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Ije,n.conditionSignal(),A(1,Tde,n.componentConfigSignal)))}}var cI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-mic-button-on",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOnComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOnComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Microphone on"),e.setAttribute("aria-pressed","false"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOnComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-mic-button-on-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M8.16699 12.3332C8.16699 13.8803 8.78157 15.364 9.87554 16.458C10.9695 17.5519 12.4532 18.1665 14.0003 18.1665M14.0003 18.1665C15.5474 18.1665 17.0312 17.5519 18.1251 16.458C19.2191 15.364 19.8337 13.8803 19.8337 12.3332M14.0003 18.1665V21.4998M10.667 21.4998H17.3337M11.5003 8.1665C11.5003 7.50346 11.7637 6.86758 12.2326 6.39874C12.7014 5.9299 13.3373 5.6665 14.0003 5.6665C14.6634 5.6665 15.2993 5.9299 15.7681 6.39874C16.2369 6.86758 16.5003 7.50346 16.5003 8.1665V12.3332C16.5003 12.9962 16.2369 13.6321 15.7681 14.1009C15.2993 14.5698 14.6634 14.8332 14.0003 14.8332C13.3373 14.8332 12.7014 14.5698 12.2326 14.1009C11.7637 13.6321 11.5003 12.9962 11.5003 12.3332V8.1665Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,wje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var Oje=i=>({componentConfigSignal:i}),Aje=(i,o)=>({condition:i,data:o}),Pje=(i,o)=>({componentConfigSignal:i,variant:o}),Mje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-mic-button-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function kje(i,o){if(i&1&&(f(0),_(1,"div",5),w(2,"velt-recording-preview-steps-dialog-mic-button-on-internal",6)(3,"velt-recording-preview-steps-dialog-mic-button-off-internal",6),b(),v()),i&2){let n=l(2).ngIf,e=l();m(),ue("velt-recording-preview--icon-button-off",!(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled)),x("data-testid",e.componentId+"-icon-container"),m(),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant),m(),d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("variant",e.variant)}}function Rje(i,o){if(i&1){let n=Y();f(0),_(1,"app-device-permission-button",2)(2,"div",3),P(3,"translate"),P(4,"translate"),P(5,"translate"),G("click",function(){N(n);let t=l().ngIf;return F(t.toggleAudio())})("keydown.enter",function(){N(n);let t=l().ngIf;return F(t.toggleAudio())})("keydown.space",function(){N(n);let t=l().ngIf;return F(t.toggleAudio())}),u(6,kje,4,9,"ng-container",4),b()(),v()}if(i&2){let n=l().ngIf,e=l();m(),d("darkMode",!!n.darkMode),x("data-testid",e.componentId+"-permission-button"),m(),x("data-testid",e.componentId+"-toggle")("aria-label",M(3,6,"Toggle microphone")+" "+(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled?M(4,8,"off"):M(5,10,"on")))("aria-pressed",!!(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled)),m(4),d("veltDynamicTemplate",$(15,Mje,e.template,k(12,Pje,e.componentConfigSignal,e.variant),e.variant,e.setIfCondition.bind(e),e.elementRef))}}function Nje(i,o){if(i&1&&(f(0),u(1,Rje,7,21,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Aje,n.conditionSignal(),A(1,Oje,n.componentConfigSignal)))}}var B0=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,t),this.devicePermissionService=e,this.loggingService=t,this.elementRef=r,this.dynamicDataService=a,this.componentId="velt-recording-preview-steps-dialog-mic-button",super.initializeComponentConfigSignal(new yn)}ngOnChanges(e){try{if(e.componentConfigSignal){let t=this.componentConfigSignal();!t?.mediaState?.audio?.enabled&&t.type==="audio"&&this.devicePermissionService.openDevicePermissionDeniedDialog("audio",{darkMode:!1})}}catch(t){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonComponent ngOnChanges:",t)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),!this.componentConfigSignal()?.mediaState?.audio?.enabled&&this.componentConfigSignal().type==="audio"&&this.devicePermissionService.openDevicePermissionDeniedDialog("audio",{darkMode:!1})}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonOnComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","group"),e.setAttribute("aria-label","Microphone control buttons")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogMicButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Wd),h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-mic-button-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","audio",3,"darkMode"],["role","button","tabindex","0",3,"click","keydown.enter","keydown.space"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview--icon-button"],[3,"componentConfigSignal","template","variant"]],template:function(t,r){t&1&&u(0,Nje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview--icon-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);display:flex;align-items:center;justify-content:center;border-radius:var(--velt-border-radius-3xl);cursor:pointer;border:1.5px solid var(--velt-border-2);background:var(--velt-background-0);color:var(--velt-text-2);transition:all .2s ease}.velt-recording-preview--icon-button[_ngcontent-%COMP%]:hover{border:1.5px solid var(--velt-border-3);background:var(--velt-background-1);color:var(--velt-text-3)}"],changeDetection:0});let i=o;return i})();var Dde=i=>({componentConfigSignal:i}),Fje=(i,o)=>({condition:i,data:o}),Lje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-settings-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Bje(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6),w(3,"path",7)(4,"path",8),b()(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon-container"),m(),x("data-testid",n.componentId+"-icon")}}function Vje(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),P(2,"translate"),P(3,"translate"),G("click",function(t){N(n);let r=l(2).ngIf;return F(r.toggleSettings(t))})("keydown.enter",function(t){N(n);let r=l(2).ngIf;return F(r.toggleSettings(t))})("keydown.space",function(t){N(n);let r=l(2).ngIf;return F(r.toggleSettings(t))}),u(4,Bje,5,2,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();ue("velt-recording-preview--settings-button-open",n.isSettingsOpen),x("data-testid",e.componentId+"-button")("aria-label",(n.isSettingsOpen?M(1,7,"Close"):M(2,9,"Open"))+" "+M(3,11,"recording settings"))("aria-expanded",n.isSettingsOpen)("aria-controls",e.componentId+"-panel"),m(4),d("veltDynamicTemplate",$(15,Lje,e.template,A(13,Dde,e.componentConfigSignal),e.variant,e.setIfCondition.bind(e),e.elementRef))}}function Uje(i,o){if(i&1&&(f(0),u(1,Vje,5,21,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!n.countdownStarted)}}function jje(i,o){if(i&1&&(f(0),u(1,Uje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Fje,n.conditionSignal(),A(1,Dde,n.componentConfigSignal)))}}var V0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-settings",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Recording preview settings")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-settings"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",3,"velt-recording-preview--settings-button-open","click","keydown.enter","keydown.space",4,"ngIf"],["role","button","tabindex","0",3,"click","keydown.enter","keydown.space"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview--settings-button"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true"],["d","M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["d","M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,jje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview--settings-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);display:flex;align-items:center;justify-content:center;border-radius:var(--velt-border-radius-full);cursor:pointer;border:1.5px solid var(--velt-border-2);background:var(--velt-background-0);color:var(--velt-text-2);transition:all .2s ease}.velt-recording-preview--settings-button[_ngcontent-%COMP%]:hover{border:1.5px solid var(--velt-border-3);background:var(--velt-background-1);color:var(--velt-text-3)}.velt-recording-preview--settings-button-open[_ngcontent-%COMP%]{background:var(--velt-background-0);border-radius:var(--velt-border-radius-full)}.velt-recording-preview--settings-button-open[_ngcontent-%COMP%] .velt-recording-preview--settings-button[_ngcontent-%COMP%]{color:var(--velt-accent);border:1.5px solid var(--velt-accent-transparent);background:var(--velt-accent-transparent)}"],changeDetection:0});let i=o;return i})();var wde=i=>({componentConfigSignal:i}),$je=(i,o)=>({condition:i,data:o}),Hje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-start-recording-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function zje(i,o){if(i&1&&(f(0),_(1,"div",4),te(2),P(3,"translate"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-label"),m(),_e(" ",M(3,2,"Start Recording"),"")}}function Gje(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("click",function(){N(n);let t=l().ngIf;return F(t.startCountdown())}),u(2,zje,4,4,"ng-container",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),ue("disabled",n.type==="video"&&(!(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled)||!n.mediaState.video.enabled)||n.type==="audio"&&(!(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled)||!n.mediaState.audio.enabled)),x("data-testid",e.componentId+"-button"),m(),d("veltDynamicTemplate",$(6,Hje,e.template,A(4,wde,e.componentConfigSignal),e.variant,e.setIfCondition.bind(e),e.elementRef))}}function Wje(i,o){if(i&1&&(f(0),u(1,Gje,3,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,$je,n.conditionSignal(),A(1,wde,n.componentConfigSignal)))}}var U0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-start-recording",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogStartRecordingComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogStartRecordingComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Start recording")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogStartRecordingComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-start-recording"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview-start-button"]],template:function(t,r){t&1&&u(0,Wje,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview-start-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:var(--velt-spacing-sm);padding:var(--velt-spacing-lg) var(--velt-spacing-2xl);font-size:var(--velt-font-size-sm);font-weight:600;transition:all .2s ease;cursor:pointer;width:fit-content;border-radius:var(--velt-border-radius-full);background:var(--velt-accent);color:var(--velt-accent-foreground)}.velt-recording-preview-start-button[_ngcontent-%COMP%]:hover{background:var(--velt-accent-hover)}.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}"],changeDetection:0});let i=o;return i})();var qje=i=>({componentConfigSignal:i}),Yje=(i,o)=>({condition:i,data:o}),Kje=(i,o)=>({componentConfigSignal:i,variant:o}),Zje=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-camera-off-message-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Xje(i,o){if(i&1&&(f(0),_(1,"h1",5),P(2,"translate"),te(3),P(4,"translate"),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-text")("aria-label",M(2,3,"Camera is off")),m(2),ze(M(4,5,"Camera is off"))}}function Qje(i,o){if(i&1&&(_(0,"div",3),u(1,Xje,5,7,"ng-container",4),b()),i&2){let n=l(3);x("data-testid",n.componentId),m(),d("veltDynamicTemplate",$(5,Zje,n.template,k(2,Kje,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function Jje(i,o){if(i&1&&(f(0),u(1,Qje,2,11,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!n.countdownStarted&&(!(n.mediaConfig.video!=null&&n.mediaConfig.video.enabled)||!n.mediaState.video.enabled))}}function e$e(i,o){if(i&1&&(f(0),u(1,Jje,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Yje,n.conditionSignal(),A(1,qje,n.componentConfigSignal)))}}var dI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-camera-off-message",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraOffMessageComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraOffMessageComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","alert"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraOffMessageComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-camera-off-message"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","alert","aria-live","polite","aria-atomic","true",4,"ngIf"],["role","alert","aria-live","polite","aria-atomic","true"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview-camera-off-message"]],template:function(t,r){t&1&&u(0,e$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview-camera-off-message[_ngcontent-%COMP%]{font-size:var(--velt-font-size-lg);color:var(--velt-text-0);margin:0}"],changeDetection:0});let i=o;return i})();var Ode=i=>({componentConfigSignal:i}),t$e=(i,o)=>({condition:i,data:o}),n$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-close-button-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function i$e(i,o){if(i&1&&(f(0),_(1,"div",4),le(),_(2,"svg",5),w(3,"path",6),b()(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-icon-container"),m(),x("data-testid",n.componentId+"-icon")}}function o$e(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),G("click",function(){N(n);let t=l().ngIf;return F(t.closeDialog())})("keydown.enter",function(){N(n);let t=l().ngIf;return F(t.closeDialog())})("keydown.space",function(){N(n);let t=l().ngIf;return F(t.closeDialog())}),u(3,i$e,4,2,"ng-container",3),b(),v()}if(i&2){let n=l(2);m(),x("data-testid",n.componentId)("aria-label",M(2,3,"Close recording preview")),m(2),d("veltDynamicTemplate",$(7,n$e,n.template,A(5,Ode,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function r$e(i,o){if(i&1&&(f(0),u(1,o$e,4,13,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,t$e,n.conditionSignal(),A(1,Ode,n.componentConfigSignal)))}}var j0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-close-button",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCloseButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCameraOffMessageComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Close recording preview"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogCloseButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-close-button"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",3,"click","keydown.enter","keydown.space"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview--icon-button"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","focusable","false","aria-hidden","true",1,"velt-cursor-pointer"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z","fill","#fff"]],template:function(t,r){t&1&&u(0,r$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-recording-preview--icon-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);display:flex;align-items:center;justify-content:center;border-radius:var(--velt-border-radius-3xl);cursor:pointer;border:1.5px solid var(--velt-border-3);background:var(--velt-background-1);transition:all .2s ease}.velt-recording-preview--icon-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:var(--velt-text-4)}.velt-recording-preview--icon-button[_ngcontent-%COMP%]:hover{border:1.5px solid var(--velt-border-4);background:var(--velt-background-2)}"],changeDetection:0});let i=o;return i})();var Ade=i=>({componentConfigSignal:i}),a$e=(i,o)=>({condition:i,data:o}),s$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-timer-cancel-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function l$e(i,o){if(i&1&&(f(0),_(1,"div",4),te(2),P(3,"translate"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-label"),m(),_e(" ",M(3,2,"Cancel")," ")}}function c$e(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("click",function(){N(n);let t=l().ngIf;return F(t.cancelCountdown())})("keydown.enter",function(){N(n);let t=l().ngIf;return F(t.cancelCountdown())})("keydown.space",function(){N(n);let t=l().ngIf;return F(t.cancelCountdown())}),u(2,l$e,4,4,"ng-container",3),b(),v()}if(i&2){let n=l(2);m(),x("data-testid",n.componentId+"-button"),m(),d("veltDynamicTemplate",$(4,s$e,n.template,A(2,Ade,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function d$e(i,o){if(i&1&&(f(0),u(1,c$e,3,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,a$e,n.conditionSignal(),A(1,Ade,n.componentConfigSignal)))}}var mI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-timer-cancel",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCancelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCancelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Recording countdown cancel controls")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCancelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-timer-cancel"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",1,"velt-recording-preview-timer--cancel-button",3,"click","keydown.enter","keydown.space"],[4,"veltDynamicTemplate"],[1,"velt-recording-preview-timer--cancel-button"]],template:function(t,r){t&1&&u(0,d$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:absolute;bottom:15%}.velt-recording-preview-timer--cancel-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:var(--velt-spacing-sm);font-weight:500;font-size:var(--velt-font-size-md);line-height:24px;color:var(--velt-error);text-transform:uppercase;letter-spacing:1.5px;cursor:pointer}.velt-recording-preview-timer--cancel-button[_ngcontent-%COMP%]:hover{color:var(--velt-error-hover)}"],changeDetection:0});let i=o;return i})();var Pde=i=>({componentConfigSignal:i}),m$e=(i,o)=>({condition:i,data:o}),p$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-timer-countdown-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function g$e(i,o){if(i&1&&(_(0,"h1",4),te(1),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId+"-value"),m(),_e(" ",n.countdown,"")}}function u$e(i,o){if(i&1&&(f(0),u(1,g$e,2,2,"h1",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.countdown)}}function h$e(i,o){if(i&1&&(f(0),u(1,u$e,2,1,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(3,p$e,n.template,A(1,Pde,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function f$e(i,o){if(i&1&&(f(0),u(1,h$e,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,m$e,n.conditionSignal(),A(1,Pde,n.componentConfigSignal)))}}var pI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-timer-countdown",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCountdownComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCountdownComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","timer"),e.setAttribute("aria-label","Recording countdown timer"),e.setAttribute("aria-live","assertive")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerCountdownComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-timer-countdown"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-recording-preview-timer--countdown","role","timer","aria-live","assertive",4,"ngIf"],["role","timer","aria-live","assertive",1,"velt-recording-preview-timer--countdown"]],template:function(t,r){t&1&&u(0,f$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:absolute}.velt-recording-preview-timer--countdown[_ngcontent-%COMP%]{font-size:120px;line-height:120px;font-weight:600;color:var(--velt-text-5);margin:0}"],changeDetection:0});let i=o;return i})();var Mde=i=>({componentConfigSignal:i}),v$e=(i,o)=>({condition:i,data:o}),C$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-timer-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function _$e(i,o){if(i&1&&(f(0),_(1,"div",3),w(2,"app-recording-preview-steps-dialog-timer-countdown",4)(3,"app-recording-preview-steps-dialog-timer-cancel",4),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant)}}function y$e(i,o){if(i&1&&(f(0),u(1,_$e,4,7,"ng-container",2),v()),i&2){let n=l(3);m(),d("veltDynamicTemplate",$(3,C$e,n.template,A(1,Mde,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function S$e(i,o){if(i&1&&(f(0),u(1,y$e,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.countdownStarted)}}function b$e(i,o){if(i&1&&(f(0),u(1,S$e,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,v$e,n.conditionSignal(),A(1,Mde,n.componentConfigSignal)))}}var $0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-timer",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Recording countdown section")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogTimerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-timer"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region","aria-live","polite",1,"velt-recording-preview-dialog-timer"],[3,"componentConfigSignal","template","variant"]],template:function(t,r){t&1&&u(0,b$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-recording-preview-dialog-timer[_ngcontent-%COMP%]{position:relative;width:332px;height:332px;display:flex;align-items:center;justify-content:center;gap:var(--velt-spacing-lg);border-radius:100%;flex-direction:column;border:2px solid var(--velt-border-transparent);background:var(--velt-background-transparent);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}"],changeDetection:0});let i=o;return i})();var I$e=i=>({componentConfigSignal:i}),E$e=(i,o)=>({condition:i,data:o}),x$e=(i,o)=>({componentConfigSignal:i,variant:o}),T$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-video-player-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function D$e(i,o){if(i&1&&(f(0),w(1,"video",3),v()),i&2){let n=l(2).ngIf,e=l();m(),d("srcObject",n.mediaStream)("volume",0),x("data-testid",e.componentId)}}function w$e(i,o){if(i&1&&(f(0),u(1,D$e,2,3,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(4,T$e,n.template,k(1,x$e,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function O$e(i,o){if(i&1&&(f(0),u(1,w$e,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,E$e,n.conditionSignal(),A(1,I$e,n.componentConfigSignal)))}}var gI=(()=>{let o=class o extends H{get isScreenStreamAvailable(){return!!this.componentConfigSignal()?.mediaConfig?.screen?.stream}constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-video-player",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoPlayerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoPlayerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Video preview")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoPlayerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-video-player"]],hostVars:2,hostBindings:function(t,r){t&2&&ue("velt-recording-preview-steps-dialog-screen-available",r.isScreenStreamAvailable)},inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["id","player","autoplay","","muted","true","playsinline","","webkit-playsinline","true","x-webkit-airplay","allow","role","application","aria-live","polite",1,"flip","velt-recording-preview-video--player",3,"srcObject","volume"]],template:function(t,r){t&1&&u(0,O$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:block;width:100%;position:relative}.velt-recording-preview-steps-dialog-screen-available[_nghost-%COMP%]{position:absolute;bottom:20px;left:20px}.velt-recording-preview-steps-dialog-screen-available[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:150px;height:150px;object-fit:cover;border-radius:var(--velt-border-radius-full)}video[_ngcontent-%COMP%]{width:100%;z-index:9999}.velt-recording-preview-video--player[_ngcontent-%COMP%]{object-fit:cover}"],changeDetection:0});let i=o;return i})();var A$e=i=>({componentConfigSignal:i}),P$e=(i,o)=>({condition:i,data:o}),M$e=()=>["video","screen"],k$e=(i,o)=>({componentConfigSignal:i,variant:o}),R$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-video-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function N$e(i,o){i&1&&Ue(0)}function F$e(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,N$e,1,0,"ng-container",5),b()),i&2){l();let n=de(3);m(),d("ngTemplateOutlet",n)}}function L$e(i,o){if(i&1&&(f(0),w(1,"app-recording-preview-steps-dialog-video-player",9)(2,"app-recording-preview-steps-dialog-screen-player",9),_(3,"div",10)(4,"div",11),w(5,"app-recording-preview-steps-dialog-waveform",9)(6,"app-recording-preview-steps-dialog-close-button",12),b(),w(7,"app-recording-preview-steps-dialog-timer",12)(8,"app-recording-preview-steps-dialog-camera-off-message",12),_(9,"div",13),w(10,"velt-recording-preview-steps-dialog-settings-panel-internal",9),_(11,"app-recording-preview-steps-dialog-button-panel",12),w(12,"app-recording-preview-steps-dialog-start-recording",12)(13,"velt-recording-preview-steps-dialog-mic-button-internal",12)(14,"velt-recording-preview-steps-dialog-camera-button-internal",12)(15,"app-recording-preview-steps-dialog-settings",12),b(),w(16,"app-recording-preview-steps-dialog-bottom-panel",12),b()(),v()),i&2){let n=l(5);m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal),m(),x("data-testid",n.componentId+"-overlay"),m(),x("data-testid",n.componentId+"-header"),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),x("data-testid",n.componentId+"-settings"),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.template)("variant",n.variant)}}function B$e(i,o){if(i&1){let n=Y();_(0,"div",7,1),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),F(t.stopPropagation())})("click",function(t){N(n);let r=l(3).ngIf;return F(r.handleOverlayClick(t))}),u(2,L$e,17,34,"ng-container",8),b()}if(i&2){let n=l(4);x("data-testid",n.componentId),m(2),d("veltDynamicTemplate",$(5,R$e,n.template,k(2,k$e,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function V$e(i,o){if(i&1&&u(0,B$e,3,11,"div",6),i&2){let n=l(2).ngIf;d("ngIf",gt(1,M$e).includes(n.type))}}function U$e(i,o){if(i&1&&(f(0),u(1,F$e,2,1,"velt-shadow-dom-internal",4)(2,V$e,1,2,"ng-template",null,0,xe),v()),i&2){let n=de(3),e=l().ngIf,t=l();m(),d("ngIf",e.shadowDom&&!t.template)("ngIfElse",n)}}function j$e(i,o){if(i&1&&(f(0),u(1,U$e,4,2,"ng-container",3),v()),i&2){let n=l();m(),d("veltIf",k(3,P$e,n.conditionSignal(),A(1,A$e,n.componentConfigSignal)))}}var uI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.dynamicDataService=a,this.componentId="velt-recording-preview-steps-dialog-video",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;");let e="velt-recording-preview-steps-dialog-video-wireframe";super.ngOnInit(),this.setupA11yAttributes(),this.variant&&(e+=`---${this.variant}`),this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}})}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoComponent OnInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoComponent ngOnChanges: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Video preview area")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogVideoComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-video"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[["videoDialogRef",""],["recordingPreviewDialogRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["role","dialog","class","velt-recording-preview-video",3,"pointerdown","pointerup","click",4,"ngIf"],["role","dialog",1,"velt-recording-preview-video",3,"pointerdown","pointerup","click"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"],["role","region","aria-label","Video controls overlay",1,"velt-recording-preview-video--overlay"],["role","region","aria-label","Video header controls",1,"velt-recording-preview-video--header"],[3,"componentConfigSignal","template","variant"],["role","region","aria-label","Recording settings and controls",1,"velt-recording-preview-video--settings"]],template:function(t,r){t&1&&u(0,j$e,2,6,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%;height:100%}.velt-recording-preview-video[_ngcontent-%COMP%], .velt-recording-preview-video--header[_ngcontent-%COMP%]{display:flex}.velt-recording-preview-video[_ngcontent-%COMP%]{position:relative;background:var(--velt-background-0);flex-direction:column;align-items:center;overflow:hidden;border-radius:var(--velt-border-radius-lg);width:calc((50rem + 0px) * var(--velt-base-rem-unit));height:calc((30rem + 0px) * var(--velt-base-rem-unit));max-width:calc(.8 * var(--legacy-velt-viewport-width))}@media screen and (max-width: 768px){.velt-recording-preview-video[_ngcontent-%COMP%]{width:calc((35rem + 0px) * var(--velt-base-rem-unit));height:calc((25rem + 0px) * var(--velt-base-rem-unit));max-width:calc(.8 * var(--legacy-velt-viewport-width))}}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog{width:calc(1 * var(--legacy-velt-viewport-width));max-width:calc(1 * var(--legacy-velt-viewport-width))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{width:calc(1 * var(--legacy-velt-viewport-width));height:calc(1 * var(--legacy-velt-viewport-height));border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .velt-recording-preview-video{width:calc(1 * var(--legacy-velt-viewport-width));height:calc(1 * var(--legacy-velt-viewport-height));max-width:calc(1 * var(--legacy-velt-viewport-width));border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))} .velt-mat-dialog-container.snippyly-recording-preview-steps-dialog mat-dialog-container .velt-recording-preview-video video{height:100%}}.velt-recording-preview-video--overlay[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:var(--velt-spacing-2xl);content:"";position:absolute;border-radius:var(--velt-border-radius-lg);z-index:1;inset:0}.velt-recording-preview-video--header[_ngcontent-%COMP%]{justify-content:space-between;width:100%;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit));align-items:flex-start}.velt-recording-preview-video--settings[_ngcontent-%COMP%]{width:366px;display:flex;flex-direction:column;gap:var(--velt-spacing-lg);align-items:center;justify-content:center;position:relative}'],changeDetection:0});let i=o;return i})();var kde=i=>({componentConfigSignal:i}),$$e=(i,o)=>({condition:i,data:o}),H$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-settings-panel-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1}),z$e=()=>["video","screen"];function G$e(i,o){if(i&1&&(f(0),w(1,"velt-media-source-settings-internal",3),P(2,"translate"),v()),i&2){let n=l(2).ngIf;m(),d("showMicSettings",!0)("shadowDom",n.shadowDom)("showCamSettings",gt(8,z$e).includes(n.type))("isOpen",n.isSettingsOpen)("config",n),x("aria-label",M(2,6,"Media source settings"))}}function W$e(i,o){if(i&1&&(f(0),u(1,G$e,3,9,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(3,H$e,n.template,A(1,kde,n.componentConfigSignal),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function q$e(i,o){if(i&1&&(f(0),u(1,W$e,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,$$e,n.conditionSignal(),A(1,kde,n.componentConfigSignal)))}}var H0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-recording-preview-steps-dialog-settings-panel",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsPanelComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsPanelComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","dialog"),e.setAttribute("aria-label","Recording settings panel"),e.setAttribute("aria-modal","true"),e.setAttribute("tabindex","-1"),this.componentConfigSignal().isSettingsOpen?e.setAttribute("aria-hidden","false"):e.setAttribute("aria-hidden","true")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogSettingsPanelComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-recording-preview-steps-dialog-settings-panel-internal"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","group",3,"showMicSettings","shadowDom","showCamSettings","isOpen","config"]],template:function(t,r){t&1&&u(0,q$e,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var Y$e=i=>({componentConfigSignal:i}),K$e=(i,o)=>({condition:i,data:o}),Z$e=(i,o)=>({componentConfigSignal:i,variant:o}),X$e=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-recording-preview-steps-dialog-waveform-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Q$e(i,o){if(i&1&&(f(0),w(1,"app-audio-waveform",3),v()),i&2){let n=l(2).ngIf,e=l();m(),d("variant",n.type==="audio"?"preview":"preview-mini")("previewStream",e.streamSignal())("muteMic",!(n.mediaConfig.audio!=null&&n.mediaConfig.audio.enabled)),x("data-testid",e.componentId)}}function J$e(i,o){if(i&1&&(f(0),u(1,Q$e,2,4,"ng-container",2),v()),i&2){let n=l(2);m(),d("veltDynamicTemplate",$(4,X$e,n.template,k(1,Z$e,n.componentConfigSignal,n.variant),n.variant,n.setIfCondition.bind(n),n.elementRef))}}function eHe(i,o){if(i&1&&(f(0),u(1,J$e,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,K$e,n.conditionSignal(),A(1,Y$e,n.componentConfigSignal)))}}var z0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.streamSignal=Te(null),this.componentId="velt-recording-preview-steps-dialog-waveform",super.initializeComponentConfigSignal(new yn)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.setupAudioElements()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogWaveformComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.cleanupAudio()}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogWaveformComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio waveform visualization"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in RecordingPreviewStepsDialogWaveformComponent setupA11yAttributes:",e)}}setupAudioElements(){return Q(this,null,function*(){try{this.audioContext=new AudioContext,this.streamSignal.set(yield navigator.mediaDevices.getUserMedia({audio:!0}))}catch(e){this.loggingService.catch("Error accessing the microphone",e)}})}cleanupAudio(){try{this.audioContext&&(this.audioContext.close(),this.audioContext=null);let e=this.streamSignal();e&&(e.getTracks().forEach(t=>t.stop()),this.streamSignal.set(null))}catch(e){this.loggingService.catch("Error cleaning up audio resources:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-recording-preview-steps-dialog-waveform"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","img","aria-live","polite",3,"variant","previewStream","muteMic"]],template:function(t,r){t&1&&u(0,eHe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var Rde=i=>({componentConfigSignal:i}),tHe=(i,o)=>({condition:i,data:o}),nHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-toolbar-comment-annotation-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function iHe(i,o){i&1&&(_(0,"div",5),le(),_(1,"svg",6),w(2,"path",7),b()())}function oHe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("pointerdown",function(t){return N(n),l(2).ngIf.createAnnotation(),F(t.stopPropagation())}),u(2,iHe,3,0,"div",4),b()}if(i&2){let n=l(3);x("data-testid",n.componentId)("role","button")("aria-label",M(1,5,"Add comment annotation"))("tabindex",0),m(2),d("veltDynamicTemplate",$(9,nHe,n.template,A(7,Rde,n.componentConfigSignal),n.componentConfigSignal().variant,n.setIfCondition.bind(n),n.elementRef))}}function rHe(i,o){if(i&1&&(f(0),u(1,oHe,3,15,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.commentToolEnabled)}}function aHe(i,o){if(i&1&&(f(0),u(1,rHe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,tHe,n.conditionSignal(),A(1,Rde,n.componentConfigSignal)))}}var hI=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(e,t,void 0,r,r.getTextCommentToolbarDarkMode$(),s,a),this.elementRef=e,this.themeService=t,this.commentService=r,this.loggingService=a,this.dynamicDataService=s,this.componentId="velt-text-comment-toolbar-comment-annotation",super.initializeComponentConfigSignal(new Ls)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in TextCommentToolbarCommentAnnotationComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Add comment annotation"),e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in TextCommentToolbarCommentAnnotationComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(De),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-toolbar-comment-annotation"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"pointerdown",4,"ngIf"],[3,"pointerdown"],["class","velt-cursor-pointer velt-text-comment-toolbar-comment-annotation",4,"veltDynamicTemplate"],[1,"velt-cursor-pointer","velt-text-comment-toolbar-comment-annotation"],["width","32","height","32","viewBox","0 0 32 32","fill","none","xmlns","http://www.w3.org/2000/svg","role","img","aria-hidden","true","focusable","false"],["fill-rule","evenodd","clip-rule","evenodd","d","M17.7608 6.03888C21.6888 6.64595 24.7153 9.3481 25.7503 13.1722C26.0832 14.4028 26.0832 16.5981 25.7503 17.8287C24.8136 21.2897 22.3047 23.7986 18.8437 24.7353C18.1546 24.9217 17.6783 24.9695 16.5154 24.9685C14.9367 24.9672 14.1823 24.8254 12.8496 24.2792L12.1364 23.9869L9.93697 24.5342C7.8786 25.0464 7.71866 25.071 7.44436 24.917C6.90064 24.6118 6.90443 24.3818 7.49147 22.0353L8.03021 19.8823L7.73729 19.1677C7.19053 17.8336 7.04867 17.0796 7.04737 15.5005C7.0464 14.3376 7.09415 13.8613 7.28063 13.1722C8.21127 9.73361 10.737 7.1939 14.1308 6.28405C14.9298 6.06985 17.0392 5.92745 17.7608 6.03888ZM14.2233 8.05664C12.9452 8.46912 12.019 9.04056 11.0373 10.0223C9.57907 11.4805 8.85364 13.0991 8.75174 15.1214C8.68947 16.3572 8.85884 17.3544 9.31582 18.4435C9.47381 18.8201 9.65855 19.2624 9.72624 19.4266C9.82922 19.6761 9.78471 19.9865 9.45432 21.3204C9.23688 22.1979 9.06827 22.9251 9.07953 22.9364C9.09079 22.9476 9.81796 22.779 10.6955 22.5616C12.0294 22.2312 12.3398 22.1867 12.5893 22.2897C12.7535 22.3573 13.1958 22.5421 13.5724 22.7001C14.6615 23.1571 15.6587 23.3264 16.8945 23.2642C18.9168 23.1623 20.5354 22.4368 21.9936 20.9786C22.968 20.0042 23.5361 19.0878 23.9685 17.7926C24.2112 17.0656 24.2457 16.7805 24.2457 15.5005C24.2457 14.2204 24.2112 13.9353 23.9685 13.2083C23.5361 11.9132 22.968 10.9967 21.9936 10.0223C20.3414 8.37025 18.566 7.66777 16.2447 7.74769C15.3595 7.77823 14.8403 7.8575 14.2233 8.05664Z","fill","currentColor"]],template:function(t,r){t&1&&u(0,aHe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-text-comment-toolbar-comment-annotation[_ngcontent-%COMP%]{display:flex;color:var(--velt-accent-text)}"],changeDetection:0});let i=o;return i})();var Nde=i=>({componentConfigSignal:i}),sHe=(i,o)=>({condition:i,data:o}),lHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-toolbar-copywriter-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function cHe(i,o){if(i&1&&(_(0,"div",11),te(1),P(2,"translate"),P(3,"translate"),b()),i&2){let n=l(3).ngIf;m(),_e(" ",n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT?M(2,1,"Select a shorter text"):M(3,3,"Select a longer text")," ")}}function dHe(i,o){if(i&1&&(_(0,"div",4),u(1,cHe,4,5,"div",5),le(),_(2,"svg",6)(3,"g",7),w(4,"path",8),b(),_(5,"defs")(6,"clipPath",9),w(7,"rect",10),b()()(),te(8),P(9,"translate"),b()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.selectedWordsCount<n.MIN_ALLOWED_WORDS_COUNT||n.selectedCharactersCount<n.MIN_ALLOWED_CHARACTERS_COUNT||n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT),m(7),_e(" ",M(9,2,"Rewrite")," ")}}function mHe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),G("pointerdown",function(t){return N(n),l().ngIf.createRewriter("copywriter"),F(t.stopPropagation())}),u(3,dHe,10,4,"div",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),ue("velt-text-comment-toolbar-copywriter--disabled",n.selectedWordsCount<n.MIN_ALLOWED_WORDS_COUNT||n.selectedCharactersCount<n.MIN_ALLOWED_CHARACTERS_COUNT||n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT),x("data-testid",e.componentId)("role","button")("aria-label",M(2,8,"Use AI to rewrite selected text"))("tabindex",0)("aria-disabled",n.selectedWordsCount<n.MIN_ALLOWED_WORDS_COUNT||n.selectedCharactersCount<n.MIN_ALLOWED_CHARACTERS_COUNT||n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT),m(2),d("veltDynamicTemplate",$(12,lHe,e.template,A(10,Nde,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function pHe(i,o){if(i&1&&(f(0),u(1,mHe,4,18,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,sHe,n.conditionSignal(),A(1,Nde,n.componentConfigSignal)))}}var fI=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(e,t,void 0,r,r.getTextCommentToolbarDarkMode$(),s,a),this.elementRef=e,this.themeService=t,this.commentService=r,this.loggingService=a,this.dynamicDataService=s,this.componentId="velt-text-comment-toolbar-copywriter",super.initializeComponentConfigSignal(new Ls)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in TextCommentToolbarCopywriterComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in TextCommentToolbarCopywriterComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label","Rewrite text with copywriter"),e.setAttribute("tabindex","0");let t=this.componentConfigSignal(),r=t.selectedWordsCount<t.MIN_ALLOWED_WORDS_COUNT||t.selectedCharactersCount<t.MIN_ALLOWED_CHARACTERS_COUNT||t.selectedCharactersCount>t.MAX_ALLOWED_CHARACTERS_COUNT;e.setAttribute("aria-disabled",String(r))}catch(e){this.loggingService.catch("Error in TextCommentToolbarCopywriterComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(De),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-toolbar-copywriter"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"pointerdown"],["class","velt-text-comment-toolbar-copywriter s-tooltip s-tooltip-light",4,"veltDynamicTemplate"],[1,"velt-text-comment-toolbar-copywriter","s-tooltip","s-tooltip-light"],["class","s-tooltiptext","role","tooltip",4,"ngIf"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","role","img","aria-hidden","true","focusable","false",1,"velt-text-comment-toolbar-copywriter--svg"],["clip-path","url(#clip0_3311_3365)"],["d","M6.49994 15.9999C6.34193 16.0007 6.18743 15.9533 6.05709 15.8639C5.92676 15.7746 5.8268 15.6476 5.77057 15.4999L4.52557 12.2624C4.50035 12.1972 4.46178 12.1379 4.41232 12.0885C4.36286 12.039 4.30362 12.0004 4.23838 11.9752L0.999941 10.7293C0.852423 10.6727 0.725541 10.5727 0.63604 10.4424C0.546538 10.3122 0.498626 10.1579 0.498626 9.99991C0.498626 9.8419 0.546538 9.68761 0.63604 9.55739C0.725541 9.42717 0.852423 9.32716 0.999941 9.27054L4.23744 8.02554C4.30268 8.00032 4.36193 7.96175 4.41138 7.91229C4.46084 7.86284 4.49941 7.80359 4.52463 7.73835L5.77057 4.49991C5.82718 4.3524 5.9272 4.22551 6.05742 4.13601C6.18764 4.04651 6.34193 3.9986 6.49994 3.9986C6.65795 3.9986 6.81225 4.04651 6.94246 4.13601C7.07268 4.22551 7.1727 4.3524 7.22932 4.49991L8.47432 7.73741C8.49953 7.80265 8.5381 7.8619 8.58756 7.91136C8.63702 7.96081 8.69627 7.99939 8.7615 8.0246L11.9803 9.26304C12.1338 9.31994 12.266 9.42278 12.359 9.55754C12.452 9.6923 12.5012 9.85244 12.4999 10.0162C12.4976 10.1714 12.4486 10.3224 12.3595 10.4495C12.2703 10.5767 12.1451 10.6741 11.9999 10.7293L8.76244 11.9743C8.6972 11.9995 8.63795 12.0381 8.5885 12.0875C8.53904 12.137 8.50047 12.1962 8.47525 12.2615L7.22932 15.4999C7.17308 15.6476 7.07312 15.7746 6.94279 15.8639C6.81245 15.9533 6.65796 16.0007 6.49994 15.9999ZM2.74994 5.49991C2.6573 5.49991 2.56684 5.47184 2.49047 5.4194C2.4141 5.36696 2.35541 5.29262 2.32213 5.20616L1.79525 3.83616C1.78383 3.8062 1.76621 3.77899 1.74354 3.75632C1.72086 3.73364 1.69365 3.71602 1.66369 3.7046L0.293691 3.17773C0.207247 3.14444 0.132915 3.08574 0.0804885 3.00937C0.0280618 2.933 0 2.84255 0 2.74991C0 2.65728 0.0280618 2.56682 0.0804885 2.49045C0.132915 2.41408 0.207247 2.35539 0.293691 2.3221L1.66369 1.79523C1.69362 1.78375 1.72081 1.76611 1.74347 1.74345C1.76614 1.72078 1.78378 1.6936 1.79525 1.66366L2.31744 0.305851C2.34689 0.225914 2.39757 0.155514 2.46402 0.102216C2.53048 0.0489189 2.6102 0.0147393 2.69463 0.00335107C2.79599 -0.00897073 2.89856 0.0128976 2.98608 0.0654883C3.0736 0.118079 3.14105 0.198382 3.17775 0.293664L3.70463 1.66366C3.7161 1.6936 3.73374 1.72078 3.75641 1.74345C3.77908 1.76611 3.80626 1.78375 3.83619 1.79523L5.20619 2.3221C5.29263 2.35539 5.36697 2.41408 5.41939 2.49045C5.47182 2.56682 5.49988 2.65728 5.49988 2.74991C5.49988 2.84255 5.47182 2.933 5.41939 3.00937C5.36697 3.08574 5.29263 3.14444 5.20619 3.17773L3.83619 3.7046C3.80623 3.71602 3.77902 3.73364 3.75635 3.75632C3.73367 3.77899 3.71605 3.8062 3.70463 3.83616L3.17775 5.20616C3.14447 5.29262 3.08578 5.36696 3.00941 5.4194C2.93304 5.47184 2.84258 5.49991 2.74994 5.49991ZM12.4999 7.99991C12.3989 7.99988 12.3002 7.96923 12.2169 7.91199C12.1336 7.85475 12.0696 7.77362 12.0334 7.67929L11.3196 5.82398C11.3071 5.79128 11.2878 5.76159 11.263 5.73683C11.2383 5.71207 11.2086 5.69278 11.1759 5.68023L9.32057 4.96648C9.22631 4.93016 9.14526 4.86614 9.0881 4.78286C9.03094 4.69957 9.00034 4.60093 9.00034 4.49991C9.00034 4.3989 9.03094 4.30026 9.0881 4.21697C9.14526 4.13369 9.22631 4.06967 9.32057 4.03335L11.1759 3.3196C11.2086 3.30705 11.2383 3.28776 11.263 3.263C11.2878 3.23823 11.3071 3.20854 11.3196 3.17585L12.0281 1.33366C12.0604 1.24655 12.1158 1.16983 12.1882 1.11167C12.2607 1.0535 12.3476 1.01607 12.4396 1.00335C12.5502 0.989962 12.6621 1.0139 12.7576 1.07136C12.8531 1.12883 12.9266 1.21652 12.9665 1.32054L13.6803 3.17585C13.6928 3.20854 13.7121 3.23823 13.7369 3.263C13.7616 3.28776 13.7913 3.30705 13.824 3.3196L15.6793 4.03335C15.7736 4.06967 15.8546 4.13369 15.9118 4.21697C15.9689 4.30026 15.9995 4.3989 15.9995 4.49991C15.9995 4.60093 15.9689 4.69957 15.9118 4.78286C15.8546 4.86614 15.7736 4.93016 15.6793 4.96648L13.824 5.68023C13.7913 5.69278 13.7616 5.71207 13.7369 5.73683C13.7121 5.76159 13.6928 5.79128 13.6803 5.82398L12.9665 7.67929C12.9302 7.77362 12.8663 7.85475 12.783 7.91199C12.6997 7.96923 12.601 7.99988 12.4999 7.99991Z","fill","currentColor"],["id","clip0_3311_3365"],["width","16","height","16","fill","currentColor"],["role","tooltip",1,"s-tooltiptext"]],template:function(t,r){t&1&&u(0,pHe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-text-comment-toolbar-copywriter[_ngcontent-%COMP%]{background:var(--velt-background-2);border-radius:var(--velt-border-radius-full);padding:var(--velt-spacing-2xs) var(--velt-spacing-md);cursor:pointer;color:var(--velt-text-4);display:flex;align-items:center;gap:var(--velt-spacing-sm);font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:normal}.velt-text-comment-toolbar-copywriter[_ngcontent-%COMP%] .velt-text-comment-toolbar-copywriter--svg[_ngcontent-%COMP%]{color:var(--velt-accent-text);padding:var(--velt-spacing-xs)}.velt-text-comment-toolbar-copywriter.velt-text-comment-toolbar-copywriter--disabled[_ngcontent-%COMP%]{cursor:not-allowed;color:var(--velt-gray)}"],changeDetection:0});let i=o;return i})();var Fde=i=>({componentConfigSignal:i}),gHe=(i,o)=>({condition:i,data:o}),uHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-toolbar-generic-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function hHe(i,o){if(i&1&&(_(0,"div",15),te(1),P(2,"translate"),P(3,"translate"),b()),i&2){let n=l(3).ngIf;m(),_e(" ",n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT?M(2,1,"Select a shorter text"):M(3,3,"Select a longer text")," ")}}function fHe(i,o){if(i&1&&(_(0,"div",4),u(1,hHe,4,5,"div",5),le(),_(2,"svg",6),w(3,"path",7)(4,"path",8)(5,"path",9)(6,"path",10)(7,"path",11)(8,"path",12)(9,"path",13)(10,"path",14),b(),te(11),P(12,"translate"),b()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.selectedWordsCount<n.MIN_ALLOWED_WORDS_COUNT||n.selectedCharactersCount<n.MIN_ALLOWED_CHARACTERS_COUNT||n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT),m(10),_e(" ",M(12,2,"Ask ChatGPT")," ")}}function vHe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("pointerdown",function(t){return N(n),l().ngIf.createRewriter("generic"),F(t.stopPropagation())}),u(2,fHe,13,4,"div",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),ue("velt-text-comment-toolbar-generic--disabled",n.selectedWordsCount<n.MIN_ALLOWED_WORDS_COUNT||n.selectedCharactersCount<n.MIN_ALLOWED_CHARACTERS_COUNT||n.selectedCharactersCount>n.MAX_ALLOWED_CHARACTERS_COUNT),x("data-testid",e.componentId)("role","separator")("aria-orientation","vertical"),m(),d("veltDynamicTemplate",$(8,uHe,e.template,A(6,Fde,e.componentConfigSignal),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function CHe(i,o){if(i&1&&(f(0),u(1,vHe,3,14,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,gHe,n.conditionSignal(),A(1,Fde,n.componentConfigSignal)))}}var vI=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(e,t,void 0,r,r.getTextCommentToolbarDarkMode$(),s,a),this.elementRef=e,this.themeService=t,this.commentService=r,this.loggingService=a,this.dynamicDataService=s,this.componentId="velt-text-comment-toolbar-divider",super.initializeComponentConfigSignal(new Ls)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in TextCommentToolbarDividerComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","separator"),e.setAttribute("aria-orientation","vertical")}catch(e){this.loggingService.catch("Error in TextCommentToolbarDividerComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in TextCommentToolbarGenericComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(De),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-toolbar-generic"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"pointerdown"],["class","velt-text-comment-toolbar-generic s-tooltip s-tooltip-light",4,"veltDynamicTemplate"],[1,"velt-text-comment-toolbar-generic","s-tooltip","s-tooltip-light"],["class","s-tooltiptext",4,"ngIf"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","role","presentation","aria-hidden","true","focusable","false",1,"velt-text-comment-toolbar-generic--svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M20 6H4C2.89543 6 2 6.89543 2 8V16C2 17.1046 2.89543 18 4 18H20C21.1046 18 22 17.1046 22 16V8C22 6.89543 21.1046 6 20 6ZM4 4C1.79086 4 0 5.79086 0 8V16C0 18.2091 1.79086 20 4 20H20C22.2091 20 24 18.2091 24 16V8C24 5.79086 22.2091 4 20 4H4Z","fill","currentColor"],["d","M16 10C16 9.44772 16.4477 9 17 9H19C19.5523 9 20 9.44772 20 10C20 10.5523 19.5523 11 19 11H17C16.4477 11 16 10.5523 16 10Z","fill","currentColor"],["d","M4 14C4 13.4477 4.44772 13 5 13C5.55228 13 6 13.4477 6 14C6 14.5523 5.55228 15 5 15C4.44772 15 4 14.5523 4 14Z","fill","currentColor"],["d","M8 14C8 13.4477 8.44772 13 9 13H15C15.5523 13 16 13.4477 16 14C16 14.5523 15.5523 15 15 15H9C8.44772 15 8 14.5523 8 14Z","fill","currentColor"],["d","M19 13C18.4477 13 18 13.4477 18 14C18 14.5523 18.4477 15 19 15C19.5523 15 20 14.5523 20 14C20 13.4477 19.5523 13 19 13Z","fill","currentColor"],["d","M13 9C12.4477 9 12 9.44772 12 10C12 10.5523 12.4477 11 13 11C13.5523 11 14 10.5523 14 10C14 9.44772 13.5523 9 13 9Z","fill","currentColor"],["d","M8 10C8 9.44772 8.44772 9 9 9C9.55228 9 10 9.44772 10 10C10 10.5523 9.55228 11 9 11C8.44772 11 8 10.5523 8 10Z","fill","currentColor"],["d","M5 9C4.44772 9 4 9.44772 4 10C4 10.5523 4.44772 11 5 11C5.55228 11 6 10.5523 6 10C6 9.44772 5.55228 9 5 9Z","fill","currentColor"],[1,"s-tooltiptext"]],template:function(t,r){t&1&&u(0,CHe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-text-comment-toolbar-generic[_ngcontent-%COMP%]{background:var(--velt-background-2);border-radius:var(--velt-border-radius-full);padding:var(--velt-spacing-2xs) var(--velt-spacing-md);cursor:pointer;color:var(--velt-text-4);display:flex;align-items:center;gap:var(--velt-spacing-sm);font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:normal}.velt-text-comment-toolbar-generic[_ngcontent-%COMP%] .velt-text-comment-toolbar-generic--svg[_ngcontent-%COMP%]{color:var(--velt-accent-text)}.velt-text-comment-toolbar-generic.velt-text-comment-toolbar-generic--disabled[_ngcontent-%COMP%]{cursor:not-allowed;color:var(--velt-gray)}"],changeDetection:0});let i=o;return i})();var _He=i=>({componentConfigSignal:i}),yHe=(i,o)=>({condition:i,data:o}),SHe=i=>({componentConfig:i}),bHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-text-comment-toolbar-divider-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function IHe(i,o){if(i&1&&(_(0,"div",3),le(),_(1,"svg",4),w(2,"rect",5),b()()),i&2){let n=l(4);x("data-testid",n.componentId)("role","separator")("aria-orientation","vertical")}}function EHe(i,o){if(i&1&&(f(0),u(1,IHe,3,3,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,bHe,e.template,A(1,SHe,n),n.variant,e.setIfCondition.bind(e),e.elementRef))}}function xHe(i,o){if(i&1&&(f(0),u(1,EHe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.commentToolEnabled)}}function THe(i,o){if(i&1&&(f(0),u(1,xHe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,yHe,n.conditionSignal(),A(1,_He,n.componentConfigSignal)))}}var CI=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(e,t,void 0,r,r.getTextCommentToolbarDarkMode$(),s,a),this.elementRef=e,this.themeService=t,this.commentService=r,this.loggingService=a,this.dynamicDataService=s,this.componentId="velt-text-comment-toolbar-divider",super.initializeComponentConfigSignal(new Ls)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in TextCommentToolbarDividerComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","separator"),e.setAttribute("aria-orientation","vertical")}catch(e){this.loggingService.catch("Error in TextCommentToolbarDividerComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in TextCommentToolbarDividerComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(De),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-text-comment-toolbar-divider"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-text-comment-toolbar-divider",4,"veltDynamicTemplate"],[1,"velt-text-comment-toolbar-divider"],["width","1","height","16","viewBox","0 0 1 16","fill","none","xmlns","http://www.w3.org/2000/svg","role","presentation","aria-hidden","true","focusable","false"],["x","1","y","0.5","width","15","height","0.999999","rx","0.5","transform","rotate(90 1 0.5)","fill","currentColor"]],template:function(t,r){t&1&&u(0,THe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-text-comment-toolbar-divider[_ngcontent-%COMP%]{display:flex;color:var(--velt-border-4)}"],changeDetection:0});let i=o;return i})();var tp=class{constructor(){this.annotations=[],this.unresolvedAnnotationsCount=0,this.showAvatar=!0,this.unreadCount=0,this.commentCountType=wj.TOTAL,this.selectedAnnotationsMap={},this.customStatusesShown=!1,this.selectedAnnotationsLocationMap={},this.commentPinSelected=!1,this.groupMatchedComments=!1}};var DHe=i=>({componentConfigSignal:i}),wHe=(i,o)=>({condition:i,data:o}),OHe=(i,o)=>({componentConfigSignal:i,wireframe:o}),AHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-bubble-avatar-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function PHe(i,o){if(i&1&&(f(0),w(1,"snippyly-user-avatar",3),v()),i&2){let n=l(3).ngIf,e=l();m(),d("user",n==null||n.annotation==null?null:n.annotation.from),x("data-testid",e.componentId+"-user")}}function MHe(i,o){if(i&1&&(f(0),u(1,PHe,2,2,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null?null:n.showAvatar)&&(n==null||n.annotation==null?null:n.annotation.from))}}function kHe(i,o){if(i&1&&(f(0),u(1,MHe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(4,AHe,e.template,k(1,OHe,e.componentConfigSignal,e.wireframe),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function RHe(i,o){if(i&1&&(f(0),u(1,kHe,2,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,wHe,n.conditionSignal(),A(1,DHe,n.componentConfigSignal)))}}var _I=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-bubble-avatar",super.initializeComponentConfigSignal(new tp)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentBubbleAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentBubbleAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Comment author avatar")}catch(e){this.loggingService.catch("Error in CommentBubbleAvatarComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-bubble-avatar"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["part","user-avatar",3,"user"]],template:function(t,r){t&1&&u(0,RHe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},encapsulation:2,changeDetection:0});let i=o;return i})();var NHe=i=>({componentConfigSignal:i}),FHe=(i,o)=>({condition:i,data:o}),LHe=(i,o)=>({componentConfigSignal:i,wireframe:o}),BHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-bubble-comments-count-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function VHe(i,o){if(i&1&&(f(0),te(1),v()),i&2){let n=l(2).ngIf;m(),_e(" ",(n==null?null:n.unresolvedAnnotationsCount)||0," ")}}function UHe(i,o){if(i&1&&(f(0),u(1,VHe,2,1,"ng-container",1),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null?null:n.unresolvedAnnotationsCount)}}function jHe(i,o){if(i&1&&(f(0),te(1),v()),i&2){let n=l(2).ngIf;m(),_e(" ",n.commentCountType==="total"?(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)||0:n.unreadCount||0," ")}}function $He(i,o){if(i&1&&u(0,jHe,2,1,"ng-container",1),i&2){let n=l().ngIf;d("ngIf",n.commentCountType==="total"&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)||n.commentCountType!=="total"&&n.unreadCount)}}function HHe(i,o){if(i&1&&(f(0),u(1,UHe,2,1,"ng-container",4)(2,$He,1,1,"ng-template",null,0,xe),v()),i&2){let n=o.ngIf,e=de(3);m(),d("ngIf",(n==null||n.annotation==null?null:n.annotation.type)==="multiThread")("ngIfElse",e)}}function zHe(i,o){if(i&1&&(f(0),u(1,HHe,4,2,"ng-container",1),v()),i&2){let n=l(3);m(),d("ngIf",n.componentConfigSignal())}}function GHe(i,o){if(i&1&&(f(0),u(1,zHe,2,1,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(4,BHe,e.template,k(1,LHe,e.componentConfigSignal,e.wireframe),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function WHe(i,o){if(i&1&&(f(0),u(1,GHe,2,10,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,FHe,n.conditionSignal(),A(1,NHe,n.componentConfigSignal)))}}var yI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-bubble-count",super.initializeComponentConfigSignal(new tp)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentBubbleCommentsCountComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentBubbleCommentsCountComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true")}catch(e){this.loggingService.catch("Error in CommentBubbleCommentsCountComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-bubble-comments-count"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["defaultCommentsCount",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngIf","ngIfElse"]],template:function(t,r){t&1&&u(0,WHe,2,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var Lde=(i,o)=>{try{if(i.hasAttribute(o))return i;if(i.children.length===0)return;for(let n=0;n<i.children.length;n++){let e=i.children[n],t=Lde(e,o);if(t!==void 0)return t}return}catch(n){at.catch("Error in utils findInjectionPointByAttribute: ",n)}},Bde=(i,o,n)=>{try{let e=Lde(i,o);if(e===void 0)return;let t=e.getAttribute(o);if(t===null)return;if(Object.values(j.INJECTION_ATTRIBUTES).includes(o)){if(n===null){e.removeAttribute(t);return}if(t===""){switch(e.tagName.toLowerCase()){case"img":e.src=n;break;case"p":case"a":case"b":case"strong":case"i":case"span":e.innerText=n;break}return}e[t]=n}if(n===null){e.style.removeProperty(t);return}e.style.setProperty(t,n,"important")}catch(e){at.catch("Error in utils injectAttributeData: ",e)}},G0=i=>{let o={};return i.from?.photoUrl?o[j.INJECTION_ATTRIBUTES.VELT_AVATAR_IMG]=i.from?.photoUrl:o[j.INJECTION_ATTRIBUTES.VELT_AVATAR_IMG]=null,i.priority?o[j.INJECTION_STYLE_PROPS.VELT_COMMENT_PRIORITY_COLOR]=i.priority.color:o[j.INJECTION_STYLE_PROPS.VELT_COMMENT_PRIORITY_COLOR]=null,i.from?.color?o[j.INJECTION_STYLE_PROPS.VELT_AVATAR_COLOR]=i.from?.color:o[j.INJECTION_STYLE_PROPS.VELT_AVATAR_COLOR]=null,o[j.INJECTION_ATTRIBUTES.VELT_COMMENT_LENGTH]=i.comments?.length||0,o};var S9=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this._elementRef=e}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}injectAttributeData(e,t){for(let r of Object.keys(t))Bde(e,r,t[r])}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["velt-attribute-injector"]],standalone:!1,features:[B],decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Vde=i=>({componentConfigSignal:i}),qHe=(i,o)=>({condition:i,data:o}),YHe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-bubble-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),KHe=(i,o,n)=>({"velt-comment-pin--status-default":i,"velt-comment-pin--status-ongoing":o,"velt-comment-pin--status-terminal":n});function ZHe(i,o){i&1&&Ue(0)}function XHe(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),u(1,ZHe,1,0,"ng-container",2),b()),i&2){l();let n=de(2);m(),d("ngTemplateOutlet",n)}}function QHe(i,o){if(i&1&&(f(0),_(1,"div",8),le(),_(2,"svg",9),w(3,"path",10),b(),ht(),w(4,"app-comment-bubble-comments-count",11),P(5,"translate"),b(),w(6,"app-comment-bubble-avatar",12),P(7,"translate"),v()),i&2){let n=l(3).ngIf,e=l(2);m(),it("--velt-internal-comment-pin-bg-color",(n.annotation==null||n.annotation.status==null?null:n.annotation.status.color)||"var(--velt-accent, #625DF5)"),d("ngClass",je(16,KHe,!n.customStatusesShown&&(n.annotation==null||n.annotation.status==null?null:n.annotation.status.type)==="default",!n.customStatusesShown&&(n.annotation==null||n.annotation.status==null?null:n.annotation.status.type)==="ongoing",!n.customStatusesShown&&(n.annotation==null||n.annotation.status==null?null:n.annotation.status.type)==="terminal")),x("data-testid",e.componentId+"-count-container"),m(),x("data-testid",e.componentId+"-count-icon")("aria-label","Comment bubble containing "+((n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)||"0")+" comments"),m(2),d("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-count")("aria-label",((n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)||"0")+" "+M(5,12,"comments in this thread")),m(2),d("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-avatar")("aria-label",M(7,14,"Avatar for comment author"))}}function JHe(i,o){if(i&1){let n=Y();f(0),_(1,"velt-comment-dialog-portal-internal",5),G("togglePinSelection",function(t){return N(n),l(4).togglePinSelection(t),F(t.stopPropagation())})("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment(t))})("addComment",function(t){N(n);let r=l(4);return F(r.onAddComment(t))}),_(2,"div",6),G("click",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),l(4).togglePinSelection(),F(t.stopPropagation())}),u(3,QHe,8,20,"ng-container",7),b()(),v()}if(i&2){let n=l(2).ngIf,e=l(2);m(),d("annotation",n.annotation)("context",n.context)("commentPinType","bubble")("commentPinSelected",n.commentPinSelected)("commentBubbleTargetPinHover",e.commentBubbleTargetPinHover)("targetElement",e.targetElement)("user",e.user),x("data-testid",e.componentId+"-dialog-portal"),m(),ue("velt-comment-bubble-hover",e.commentBubbleTargetPinHover)("velt-comment-bubble-open",!!n.selectedAnnotationsMap[n.annotation==null?null:n.annotation.annotationId]),x("data-velt-comment-bubble-comments-count",(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)||"0")("data-testid",e.componentId),m(),d("veltDynamicTemplate",$(17,YHe,e.template,A(15,Vde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function eze(i,o){if(i&1&&(f(0),u(1,JHe,4,23,"ng-container",3),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.annotation)}}function tze(i,o){if(i&1&&(f(0),u(1,eze,2,1,"ng-container",4),v()),i&2){let n=l(2);m(),d("veltIf",k(3,qHe,n.conditionSignal(),A(1,Vde,n.componentConfigSignal)))}}function nze(i,o){if(i&1&&u(0,tze,2,6,"ng-container",3),i&2){let n=l();d("ngIf",n.componentConfigSignal())}}var W0=(()=>{let o=class o extends S9{set _targetCommentElementId(e){try{this.targetElementId=e}catch{}}set _commentCountType(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{commentCountType:e}),t))}catch{}}set _shadowDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.shadowDom=t}catch{}}set commentBubbleTargetPinHoverInput(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentBubbleTargetPinHover=!!t}catch(t){this.catchError("Error in CommentBubbleComponent commentBubbleTargetPinHover setter: ",t)}}set showAvatarInput(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{showAvatar:!!t}),r))}catch(t){this.catchError("Error in CommentBubbleComponent showAvatar setter: ",t)}}set avatar(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{showAvatar:!!t}),r))}catch(t){this.catchError("Error in CommentBubbleComponent showAvatar setter: ",t)}}set _folderId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{folderId:e}),t?.folderId?t.veltFolderId=Bi(t.folderId):t.veltFolderId=void 0,t)),this.checkCommentAnnotationAvailable()}catch{}}set _clientDocumentId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{clientDocumentId:e}),t?.clientDocumentId?t.documentId=this.docService.generateDocumentId(t.clientDocumentId):t.documentId=void 0,t)),this.checkCommentAnnotationAvailable()}catch{}}set _locationId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{locationId:e}),t)),this.checkCommentAnnotationAvailable()}catch{}}set _context(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{context:t}),r))}catch{}}set _contextOptions(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contextOptions:t}),r))}catch{}}constructor(e,t,r,a,s,c,p,g){super(p,g,s),this.authService=e,this.commentService=t,this.docService=r,this.domService=a,this.loggingService=s,this.wireframeService=c,this.elementRef=p,this.dynamicDataService=g,this.shadowDom=!0,this.darkMode=null,this.commentBubbleTargetPinHover=!1,this.commentAnnotationAvailable=!1,this.objectKeys=Object.keys,this.selectedAnnotationsMap={},this.resolvedCommentsOnDom=!1,this.hasSlotContent=!1,this.componentConfigSignal=Te(new tp),this.subscriptions=[],this.veltElement=!0,this.componentId="velt-comment-bubble",this.uniqueComponentId="velt-comment-bubble-"+Dn(),super.initializeComponentConfigSignal(new tp);try{this.multiThreadAnnotationId=`temp_${this.uniqueComponentId}`,this.subscriptions.push(this.authService.getUser$().subscribe(C=>{this.user=C},C=>{this.catchError("Error in CommentBubbleComponent getUser$ subscription: ",C)})),this.subscriptions.push(this.commentService.getUnreadCommentsMap$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{unreadCount:C?.[this.componentConfigSignal().annotation?.annotationId||""]||0}),E))})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{selectedAnnotationsLocationMap:C}),E)),this.checkCommentPinSelected()})),this.subscriptions.push(this.commentService.getCustomStatusesShown$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{customStatusesShown:C}),E))})),this.subscriptions.push(this.commentService.getGroupMatchedComments$().subscribe(C=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{groupMatchedComments:C}),E))})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(C=>{this.selectedAnnotationsMap=C,this.componentConfigSignal.update(E=>(E=T(I({},E),{selectedAnnotationsMap:C}),E)),this.checkCommentPinSelected()},C=>{this.catchError("Error in CommentBubbleComponent getSelectedAnnotationsMap$ subscription: ",C)}))}catch(C){this.catchError("Error in CommentBubbleComponent constructor: ",C)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes();let e="velt-comment-bubble-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.catchError("Error in CommentBubbleComponent OnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentBubbleComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{(this.targetElementId||this.componentConfigSignal().context||this.annotationId)&&this.checkCommentAnnotationAvailable()}catch(e){this.catchError("Error in CommentBubbleComponent AfterViewInit: ",e)}}ngOnChanges(e){try{if(e?.annotationId&&this.annotationId&&this.checkCommentAnnotationAvailable(),(e._context||e.context)&&this.checkCommentAnnotationAvailable(),(e._targetCommentElementId||e.targetElementId)&&this.checkCommentAnnotationAvailable(),e.darkMode){let t=e.darkMode.currentValue;t!==null&&(t!="false"?this.elementRef.nativeElement.setAttribute("dark",""):this.elementRef.nativeElement.removeAttribute("dark"))}}catch(t){this.catchError("Error in CommentBubbleComponent ngOnChanges: ",t)}}handleCustomContent(e){try{let t=e.target;if(t.assignedElements().length>0){this.hasSlotContent=!0;let r=t.assignedElements()[0];this.customContentRef=r,r!==void 0&&this.componentConfigSignal().annotation!==null&&this.componentConfigSignal().annotation!==void 0&&this.injectAttributeData(r,G0(this.componentConfigSignal().annotation))}else this.hasSlotContent=!1,this.customContentRef=void 0}catch(t){this.catchError("Error in CommentBubbleComponent handleCustomContent: ",t)}}checkCommentAnnotationAvailable(){try{this.commentAnnotationSubscription&&this.commentAnnotationSubscription.unsubscribe(),this.removeBubbleCommentAnnotationIds(),this.commentAnnotationAvailable=!1;let e;(this.componentConfigSignal().folderId||this.componentConfigSignal().clientDocumentId)&&(e=this.componentConfigSignal().locationId),!!(this.targetElementId||this.componentConfigSignal().context||this.annotationId||this.componentConfigSignal().folderId||this.componentConfigSignal().documentId||e)?this.commentAnnotationSubscription=this.commentService.getCommentAnnotationsForCommentComponent({type:"bubble",annotationId:this.annotationId,targetElementId:this.targetElementId,context:this.componentConfigSignal().context,contextOptions:this.componentConfigSignal().contextOptions,element:this.elementRef.nativeElement,folderId:this.componentConfigSignal().folderId,documentId:this.componentConfigSignal().documentId,clientDocumentId:this.componentConfigSignal().clientDocumentId,locationId:e}).pipe(he(r=>this.domService.getSelectedAnnotationsMap$().pipe(ce(a=>(this.selectedAnnotationsMap=a,r)))),he(r=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(a=>(this.resolvedCommentsOnDom=a,r))))).subscribe(r=>{let a=this.resolvedCommentsOnDom||this.componentConfigSignal().groupMatchedComments?r?.slice():r?.filter(g=>g.status.type!=="terminal"),s=null,c=!1;if(a?.length&&this.componentConfigSignal().groupMatchedComments&&(c=a?.length>1||!a?.[0]?.isDraft),c){s=new u0,s.annotationId=this.multiThreadAnnotationId,s.isTemporary=!0,s.from=a?.[0]?.from,s.metadata=a?.[0]?.metadata;let g,C=this.componentConfigSignal().locationId;C&&(g=this.docService.getLocationByClientLocationId(C),g||(g={id:C}));let E;g&&(E=this.docService.genarateLocationId(g)),g&&E&&(s.location=g,s.locationId=E),this.componentConfigSignal().context&&(s.context=this.componentConfigSignal().context),this.targetElementId&&(s.targetElementId=this.targetElementId),s.commentAnnotationsMap={},s.commentAnnotations={};for(let D of a||[])D.annotationId&&(s.commentAnnotationsMap||(s.commentAnnotationsMap={}),s.commentAnnotationsMap[D.annotationId]=D,s.commentAnnotations||(s.commentAnnotations={}),s.commentAnnotations[D.annotationId]=!0)}let p=a?.length?a[a?.length-1]:null;s&&(p=s),this.componentConfigSignal.update(g=>(g=T(I({},g),{annotation:p,annotations:a||[]}),g.unresolvedAnnotationsCount=a?.filter(C=>C.status.type!=="terminal")?.length||0,g)),this.resolvedCommentsOnDom||this.componentConfigSignal().annotation?.status?.type!=="terminal"||this.selectedAnnotationsMap[this.componentConfigSignal().annotation?.annotationId]||this.componentConfigSignal.update(g=>(g=T(I({},g),{annotation:null}),g)),this.componentConfigSignal().annotation!==null&&this.customContentRef!==void 0&&this.injectAttributeData(this.customContentRef,G0(this.componentConfigSignal().annotation)),this.veltAnnotationId=this.componentConfigSignal().annotation?.annotationId,this.veltAnnotationIds=r?.map(g=>g?.annotationId).join(","),this.commentService.addBubbleCommentAnnotationIds(r?.map(g=>g?.annotationId)||[]),this.checkCommentPinSelected(),setTimeout(()=>{this.commentService.addBubbleCommentAnnotationIds(r?.map(g=>g?.annotationId)||[])},100)},r=>{this.catchError("Error in CommentBubbleComponent getCommentAnnotationAvailableOnXPath subscription: ",r)}):(this.targetElement=void 0,this.componentConfigSignal.update(r=>(r=T(I({},r),{annotation:null}),r)),this.veltAnnotationId=void 0,this.veltAnnotationIds=void 0,this.selectedAnnotationsMap={})}catch(e){this.catchError("Error in CommentBubbleComponent checkCommentAnnotationAvailable: ",e)}}onAddComment(e){try{this.componentConfigSignal().groupMatchedComments&&e?.annotation?.isDraft&&(this.domService.getSelectedAnnotationsMap()?.[this.multiThreadAnnotationId]||this.domService.toggleAnnotationSelection({annotationId:this.multiThreadAnnotationId,type:"multiThread"},this.componentId))}catch(t){this.catchError("Error in CommentBubbleComponent onAddComment: ",t)}}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,t=this.componentConfigSignal().annotation,r=this.componentConfigSignal().selectedAnnotationsLocationMap,a=this.componentId;if(t){let s=!!e[t?.annotationId];if(s)if(t?.isDraft)t?.sourceId&&(s=t?.sourceId===a,s&&this.domService.setSelectedAnnotationLocation(t.annotationId,this.componentId));else{let c=r?.[t.annotationId];c&&(s=c===this.componentId)}s!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(c=>(c=T(I({},c),{commentPinSelected:s}),c))}}catch(e){this.catchError("Error in CommentBubbleComponent checkCommentPinSelected: ",e)}}togglePinSelection(e){try{let t=e||this.componentConfigSignal().annotation;if(t)if(this.selectedAnnotationsMap[t?.annotationId])document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t.annotationId}"]`)?this.domService.resetSelectedAnnotationsMap(!0,"comments"):this.domService.toggleAnnotationSelection(t,this.componentId);else{let r=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(r||(r=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),r){let a=r.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(a){let s=document.getElementById(`comment-pin-container-${a}`)||document.querySelector(`[data-velt-id='${a}']`);s&&(s.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(t,this.componentId)}}catch(t){this.catchError("Error in CommentBubbleComponent togglePinSelection: ",t)}}saveComment(e){try{this.componentConfigSignal().annotation&&this.commentService.saveComment(this.componentConfigSignal().annotation,e)}catch(t){this.catchError("Error in CommentBubbleComponent saveComment: ",t)}}removeBubbleCommentAnnotationIds(){try{this.commentService.removeBubbleCommentAnnotationIds(this.veltAnnotationIds?.split(",")||[])}catch(e){this.catchError("Error in CommentBubbleComponent removeBubbleCommentAnnotationIds: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{super.ngOnDestroy(),this.removeBubbleCommentAnnotationIds(),this.unsubscribe()}catch(e){this.catchError("Error in CommentBubbleComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.commentAnnotationSubscription&&this.commentAnnotationSubscription.unsubscribe(),this.subscriptions=[]}catch(e){this.catchError("Error in CommentBubbleComponent unsubscribe: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ve),h(De),h(ot),h(Be),h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-bubble"]],hostVars:3,hostBindings:function(t,r){t&2&&x("data-velt-annotation-id",r.veltAnnotationId)("data-velt-annotation-ids",r.veltAnnotationIds)("data-velt-element",r.veltElement)},inputs:{annotationId:"annotationId",_targetCommentElementId:[0,"targetCommentElementId","_targetCommentElementId"],targetElementId:"targetElementId",variant:"variant",_commentCountType:[0,"commentCountType","_commentCountType"],_shadowDom:[0,"shadowDom","_shadowDom"],darkMode:"darkMode",commentBubbleTargetPinHoverInput:[0,"commentBubbleTargetPinHover","commentBubbleTargetPinHoverInput"],showAvatarInput:[0,"showAvatar","showAvatarInput"],avatar:"avatar",_folderId:[0,"folderId","_folderId"],_clientDocumentId:[0,"documentId","_clientDocumentId"],_locationId:[0,"locationId","_locationId"],_context:[0,"context","_context"],_contextOptions:[0,"contextOptions","_contextOptions"]},standalone:!1,features:[V([S]),B,Ze],decls:3,vars:2,consts:[["commentBubbleRefRef",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[4,"ngIf"],[4,"veltIf"],[3,"togglePinSelection","saveComment","addComment","annotation","context","commentPinType","commentPinSelected","commentBubbleTargetPinHover","targetElement","user"],["part","container","slot","comment-bubble",1,"comment-bubble-container","velt-comment-bubble",3,"click","pointerup"],[4,"veltDynamicTemplate"],["part","count-container",1,"comment-count-container","velt-comment-bubble--count-container",3,"ngClass"],["width","32","height","26","viewBox","0 0 32 26","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill","currentColor","stroke","currentColor","part","count-icon-path","d","M18 1H10C5.02944 1 1 5.02944 1 10V16C1 20.9706 5.02944 25 10 25H26H28.1315C29.7289 25 30.6817 23.2197 29.7956 21.8906L27.5038 18.453C27.1753 17.9602 27 17.3812 27 16.7889V10C27 5.02944 22.9706 1 18 1Z"],["aria-hidden","true","role","status",1,"comment-count","velt-comment-bubble--count",3,"componentConfigSignal"],["aria-hidden","true","role","img",3,"componentConfigSignal"]],template:function(t,r){if(t&1&&u(0,XHe,2,1,"velt-shadow-dom-internal",1)(1,nze,1,1,"ng-template",null,0,xe),t&2){let a=de(2);d("ngIf",!r.template&&r.shadowDom)("ngIfElse",a)}},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:inline-flex;--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.comment-bubble-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:0;cursor:pointer}.comment-bubble-container.custom-content[_ngcontent-%COMP%]{display:unset;gap:unset}snippyly-user-avatar[_ngcontent-%COMP%]{--legacy-velt-user-avatar-size: 1.625rem;display:flex;justify-content:center;align-items:center;padding-top:1px}.comment-count-container[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;display:flex;justify-content:left;position:relative;height:calc((1.625rem + 0px) * var(--velt-base-rem-unit));width:calc((2rem + 0px) * var(--velt-base-rem-unit))}.comment-count-container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{color:var(--velt-internal-comment-pin-bg-color)}.comment-count-container[_ngcontent-%COMP%] svg.velt-comment-pin--status-default[_ngcontent-%COMP%]{color:var(--velt-accent, var(--velt-internal-comment-pin-bg-color))}.comment-count-container[_ngcontent-%COMP%] svg.velt-comment-pin--status-ongoing[_ngcontent-%COMP%]{color:var(--velt-warning, var(--velt-internal-comment-pin-bg-color))}.comment-count-container[_ngcontent-%COMP%] svg.velt-comment-pin--status-terminal[_ngcontent-%COMP%]{color:var(--velt-success, var(--velt-internal-comment-pin-bg-color))}.comment-count[_ngcontent-%COMP%]{font-size:var(--velt-font-size-2xs);font-weight:600;left:2px;line-height:20px;position:absolute;right:var(--velt-spacing-xs);text-align:center;color:var(--velt-accent-foreground)}"],changeDetection:0});let i=o;return i})();var ke=class{constructor(){this.addCommentMode=!1,this.moderatorMode=!1,this.enableSignInButton=!1,this.enablePriority=!1,this.enableStatus=!1,this.enableResolve=!1,this.suggestionMode=!1,this.enableUpgradeButton=!1,this.isPlanExpired=!1,this.isPrivateComment=!1,this.isUserAdmin=!1,this.darkMode=!1,this.showScreenSizeInfo=!1,this.multiThread=!1,this.bottomSheetMode=!1,this.showAllComments=!1,this.showCommentIndex=!1,this.disabled=!1,this.enableAutoCategorize=!1,this.enableAttachment=!1,this.enableReactions=!1,this.screenSharingSupported=!1,this.allowedRecordings=[],this.sidebarButtonOnCommentDialogVisible=!1,this.userMentions=!0,this.deleteOnBackspace=!0,this.recordingSummaryEnabled=!1,this.dialogShadowDOM=!1,this.enterKeyToSubmit=!1,this.isInputFocused=!1,this.showDefault=!0,this.dialogOpenedInSidebar=!1,this.resolveStatusAccessAdminOnly=!1,this.linkCallback=!1,this.readOnly=!1,this.newComment="",this.newCommentHTML="",this.showCommentButtons=!1,this.editComment=null,this.editCommentIndex=null,this.optionsMenuOpened=!1,this.selectedUserContacts=[],this.showReplies=!1,this.ghostComment=null,this.enableGhostCommentsMessage=!1,this.hasReactionsByCommentId={},this.unreadCommentsMap=null,this.selectedFiles=[],this.invalidSelectedFiles=[],this.selectedAttachments=[],this.attachmentsToDelete=[],this.uploadingAttachments=!1,this.localRecordedData=[],this.taggedUserContacts=[],this.customList=[],this.toOrganizationUserGroup=[],this.composerInOpenState=!1,this.customChipData=null,this.selectedCustomChipSet=new Set,this.notificationEnabled=!1,this.pageModeComposer=!1,this.playVideoInFullScreen=!0,this.isKnownUser=!1,this.dialogSelectedByKnownUser=!1,this.showGhostCommentMessage=!1,this.showSuggestionModeActions=!1,this.canResolveAnnotation=!1,this.canUnresolveAnnotation=!1,this.getAnnotationDraftAttribute=null,this.assignToMenuOpened=!1,this.commentDialogUniqueId="",this.deviceInfoTooltipPositions=[],this.shortUserName=!0,this.annotationIndex=0,this.userContacts=[],this.annotation=new Vo,this.user=new Po,this.dialogMode=!0,this.sidebarMode=!1,this.inboxMode=!1,this.inlineCommentMode=!1,this.isInsidePdfViewer=!1,this.locationDisplayName=void 0,this.locationVersion=void 0,this.commentPinSelected=!1,this.fullExpanded=!1,this.commentDialogSelected=!1,this.variant="dialog",this.inlineCommentSectionMode=!1,this.commentComposerMode=!1,this.composerMode=eh.DEFAULT,this.openDropdownIndexValue=-1,this.reactionToolOpenIndex=-1,this.focusedThreadMode=!1,this.isFocusedThreadEnabled=!1,this.currentDialogView={},this.userContactsBySnippylyId=null,this.seenByUsers=!0,this.isAutocompleteDropdownOpen=!1,this.repliesUniqueUsers=[],this.maxReplyAvatars=3,this.totalReplies=0,this.replyAvatars=!1}};var Ude=i=>({componentConfigSignal:i}),ize=(i,o)=>({condition:i,data:o}),oze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-all-comment-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function rze(i,o){if(i&1&&(_(0,"div",5),P(1,"translate"),le(),_(2,"svg",6),w(3,"path",7)(4,"path",8),b(),ht(),_(5,"div",9),te(6),P(7,"translate"),b()()),i&2){let n=l(4);x("aria-label",M(1,7,"View all comments"))("aria-haspopup",!0)("aria-expanded",!1)("data-testid",n.componentId+"-button"),m(2),x("data-testid",n.componentId+"-icon"),m(3),x("data-testid",n.componentId+"-label"),m(),_e(" ",M(7,9,"All comments"),"")}}function aze(i,o){if(i&1){let n=Y();_(0,"div",3),G("click",function(t){N(n);let r=l(2).ngIf;return r==null||r.openAllComments(),F(t.stopPropagation())}),u(1,rze,8,11,"div",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId),m(),d("veltDynamicTemplate",$(4,oze,e.template,A(2,Ude,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function sze(i,o){if(i&1&&(f(0),u(1,aze,2,10,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.commentDialogSelected)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&(n==null?null:n.dialogMode)&&(n==null?null:n.sidebarButtonOnCommentDialogVisible))}}function lze(i,o){if(i&1&&(f(0),u(1,sze,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,ize,n.conditionSignal(),A(1,Ude,n.componentConfigSignal)))}}var q0=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-all-comment",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAllCommentComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAllCommentComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAllCommentComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-all-comment"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"click",4,"ngIf"],[3,"click"],["class","velt-all-comment","role","button","tabindex","0",4,"veltDynamicTemplate"],["role","button","tabindex","0",1,"velt-all-comment"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.83268 12.2505V14.8286L9.05119 12.3358L9.49212 12.3286C11.2454 12.2999 12.8232 12.1234 14.003 11.9439C14.7476 11.8306 15.2649 11.3109 15.3773 10.6585C15.5332 9.75341 15.666 8.60678 15.666 7.33268C15.666 6.05858 15.5332 4.91195 15.3773 4.0069C15.2649 3.35442 14.7476 2.83478 14.003 2.72149C12.7126 2.52515 10.948 2.33268 8.99935 2.33268C7.05074 2.33268 5.28608 2.52515 3.9957 2.72149C3.25113 2.83478 2.73377 3.35442 2.62138 4.00691C2.46548 4.91195 2.33268 6.05858 2.33268 7.33268C2.33268 8.60678 2.46548 9.75341 2.62138 10.6585C2.71897 11.2251 3.1148 11.6792 3.69192 11.8711L4.83268 12.2505ZM0.978897 3.72399C1.22072 2.32008 2.33662 1.28808 3.74499 1.07379C5.09444 0.86846 6.94567 0.666016 8.99935 0.666016C11.053 0.666016 12.9043 0.86846 14.2537 1.07379C15.6621 1.28808 16.778 2.32008 17.0198 3.72399C17.1883 4.70245 17.3327 5.94539 17.3327 7.33268C17.3327 8.71997 17.1883 9.96292 17.0198 10.9414C16.778 12.3453 15.6621 13.3773 14.2537 13.5916C13.0192 13.7794 11.3647 13.9648 9.51941 13.9951L4.42329 17.0064C3.86778 17.3347 3.16602 16.9342 3.16602 16.289V13.4526C2.03815 13.0776 1.18648 12.1465 0.978897 10.9414C0.810359 9.96292 0.666016 8.71997 0.666016 7.33268C0.666016 5.94539 0.810359 4.70245 0.978897 3.72399Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.83268 4.83268C4.37244 4.83268 3.99935 5.20578 3.99935 5.66602C3.99935 6.12625 4.37244 6.49935 4.83268 6.49935H13.166C13.6263 6.49935 13.9993 6.12625 13.9993 5.66602C13.9993 5.20578 13.6263 4.83268 13.166 4.83268H4.83268ZM4.83268 8.16602C4.37244 8.16602 3.99935 8.53911 3.99935 8.99935C3.99935 9.45959 4.37245 9.83268 4.83268 9.83268H8.16602C8.62625 9.83268 8.99935 9.45959 8.99935 8.99935C8.99935 8.53911 8.62625 8.16602 8.16602 8.16602H4.83268Z","fill","currentColor"],[1,"velt-all-comment--button"]],template:function(t,r){t&1&&u(0,lze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-all-comment[_ngcontent-%COMP%]{gap:var(--velt-spacing-xs);display:flex;flex-direction:row;align-items:center;justify-content:center}.velt-all-comment[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:var(--velt-accent-text)}.velt-all-comment--button[_ngcontent-%COMP%]{position:relative;line-height:1.25em;font-weight:600;display:inline-block;cursor:pointer}"],changeDetection:0});let i=o;return i})();var jde=i=>({componentConfigSignal:i}),dze=(i,o)=>({condition:i,data:o}),mze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-approve-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function pze(i,o){if(i&1&&(f(0),w(1,"div",5),_(2,"div",6),te(3),P(4,"translate"),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-fill"),m(),x("data-testid",n.componentId+"-label"),m(),_e(" ",M(4,3,"Approve"),"")}}function gze(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("click",function(t){N(n);let r=l(2).ngIf;return r==null||r.approveCommentPinAnnotation(),F(t.stopPropagation())}),u(2,pze,5,5,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("aria-label",M(1,4,"Approve comment"))("aria-pressed",!1)("data-testid",e.componentId+"-button"),m(2),d("veltDynamicTemplate",$(8,mze,e.template,A(6,jde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function uze(i,o){if(i&1&&(f(0),u(1,gze,3,14,"ng-template",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.commentDialogSelected)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&(n==null?null:n.moderatorMode)&&!(!(n==null||n.annotation==null)&&n.annotation.approved)&&(n==null||n.user==null?null:n.user.isAdmin))}}function hze(i,o){if(i&1&&(f(0),u(1,uze,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,dze,n.conditionSignal(),A(1,jde,n.componentConfigSignal)))}}var Y0=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-approve",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogApproveComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogApproveComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogApproveComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-approve"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],["role","button","tabindex","0",3,"click"],[4,"veltDynamicTemplate"],["aria-hidden","true",1,"velt-fill"],[1,"velt-flat-button"]],template:function(t,r){t&1&&u(0,hze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-fill[_ngcontent-%COMP%]{flex-grow:1}.velt-flat-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm) var(--velt-spacing-md);background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl);border:0;color:var(--velt-accent-foreground);font-weight:700;transition:.2s;font-size:var(--velt-font-size-sm);cursor:pointer}.velt-flat-button[_ngcontent-%COMP%]:hover{background:var(--velt-accent-hover)}"],changeDetection:0});let i=o;return i})();var $de=i=>({componentConfigSignal:i}),vze=(i,o)=>({condition:i,data:o}),Cze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-assign-menu-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function _ze(i,o){if(i&1){let n=Y();f(0),_(1,"velt-autocomplete-panel-internal",5),P(2,"translate"),P(3,"translate"),G("optionSelected",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.assignCommentToUser(t))}),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),d("darkMode",!!(n!=null&&n.darkMode))("enableOnFocus",!0)("metadata",n==null||n.annotation==null?null:n.annotation.metadata)("placeholder",M(2,6,"Search")),x("aria-label",M(3,8,"Search users"))("data-testid",e.componentId+"-autocomplete")}}function yze(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),G("clickOutside",function(){N(n);let t=l(2).ngIf;return F(t==null?null:t.closeAssignToMenu())}),u(2,_ze,4,10,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId)("aria-label",M(1,4,"Assign thread"))("aria-modal",!0),m(2),d("veltDynamicTemplate",$(8,Cze,e.template,A(6,$de,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Sze(i,o){if(i&1&&(f(0),u(1,yze,3,14,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null?null:n.assignToMenuOpened)}}function bze(i,o){if(i&1&&(f(0),u(1,Sze,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,vze,n.conditionSignal(),A(1,$de,n.componentConfigSignal)))}}var SI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-assign-menu",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAssignMenuComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAssignMenuComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","dialog"),e.setAttribute("aria-label","Assign thread"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAssignMenuComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-assign-menu"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-header--assign-menu","snippylyClickOutside","","role","dialog",3,"clickOutside",4,"ngIf"],["snippylyClickOutside","","role","dialog",1,"velt-header--assign-menu",3,"clickOutside"],[4,"veltDynamicTemplate"],[3,"optionSelected","darkMode","enableOnFocus","metadata","placeholder"]],template:function(t,r){t&1&&u(0,bze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}[_nghost-%COMP%] .velt-header--assign-menu{position:absolute;top:100%;width:calc((15rem + 0px) * var(--velt-base-rem-unit));right:0;background:var(--velt-background-0);border:1px solid var(--velt-border-4);border-radius:var(--velt-border-radius-md);padding:var(--velt-spacing-sm);box-sizing:border-box;height:100%;height:unset;line-height:unset;display:flex;gap:var(--velt-spacing-sm);z-index:3}[_nghost-%COMP%] .velt-header--assign-menu velt-autocomplete-panel-internal{width:100%}[_nghost-%COMP%] .velt-header--assign-menu velt-autocomplete-panel-internal input{border:0;font-size:var(--velt-font-size-sm)}"],changeDetection:0});let i=o;return i})();var Hde=i=>({componentConfigSignal:i}),Ize=(i,o)=>({condition:i,data:o}),Eze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-assignee-banner-resolve-button-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function xze(i,o){if(i&1&&(le(),_(0,"svg",4),w(1,"path",5),b()),i&2){let n=l(4);x("data-testid",n.componentId+"-icon")}}function Tze(i,o){if(i&1){let n=Y();f(0),_(1,"app-resolve-button",2),G("changeStatus",function(t){N(n);let r=l(2).ngIf;return F(r==null?null:r.changeStatus(t))}),u(2,xze,2,1,"svg",3),b(),v()}if(i&2){let n=l(2).ngIf,e=l();m(),d("darkMode",!!(n!=null&&n.darkMode))("headingMode",!0)("annotation",n==null?null:n.annotation)("sidebarMode",n==null?null:n.sidebarMode),x("data-testid",e.componentId),m(),d("veltDynamicTemplate",$(8,Eze,e.template,A(6,Hde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Dze(i,o){if(i&1&&(f(0),u(1,Tze,3,14,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null?null:n.canResolveAnnotation)}}function wze(i,o){if(i&1&&(f(0),u(1,Dze,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Ize,n.conditionSignal(),A(1,Hde,n.componentConfigSignal)))}}var bI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-banner-resolve-button",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerResolveButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerResolveButtonComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerResolveButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-assignee-banner-resolve-button"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"changeStatus","darkMode","headingMode","annotation","sidebarMode"],["width","12","height","10","viewBox","0 0 12 10","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false",4,"veltDynamicTemplate"],["width","12","height","10","viewBox","0 0 12 10","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.5886 1.07806C11.914 1.4035 11.914 1.93114 11.5886 2.25657L4.92194 8.92324C4.5965 9.24868 4.06886 9.24868 3.74343 8.92324L0.410093 5.58991C0.0846564 5.26447 0.0846564 4.73683 0.410093 4.4114C0.73553 4.08596 1.26317 4.08596 1.5886 4.4114L4.33268 7.15547L10.4101 1.07806C10.7355 0.752625 11.2632 0.752625 11.5886 1.07806Z","fill","currentColor"]],template:function(t,r){t&1&&u(0,wze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var zde=i=>({componentConfigSignal:i}),Oze=(i,o)=>({condition:i,data:o}),Aze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-assignee-banner-user-avatar-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Pze(i,o){if(i&1&&(f(0),w(1,"snippyly-user-avatar",3),P(2,"translate"),v()),i&2){let n=l(2).ngIf,e=l();m(),d("size",28)("user",n==null||n.annotation==null?null:n.annotation.assignedTo),x("aria-label",M(2,4,"Avatar for assigned user"))("data-testid",e.componentId+"-avatar")}}function Mze(i,o){if(i&1&&(f(0),u(1,Pze,3,6,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,Aze,e.template,A(1,zde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function kze(i,o){if(i&1&&(f(0),u(1,Mze,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Oze,n.conditionSignal(),A(1,zde,n.componentConfigSignal)))}}var II=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-assignee-banner-avatar",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserAvatarComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-assignee-banner-user-avatar"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-assignee-banner--user-avatar",3,"size","user"]],template:function(t,r){t&1&&u(0,kze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-assignee-banner--user-avatar[_ngcontent-%COMP%]{align-self:center}"],changeDetection:0});let i=o;return i})();var Gde=i=>({componentConfigSignal:i}),Rze=(i,o)=>({condition:i,data:o}),Nze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-assignee-banner-user-name-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Fze(i,o){if(i&1&&(_(0,"div",5),P(1,"translate"),te(2),P(3,"translate"),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId)("aria-label",M(1,3,"Assigned to")+" "+((n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.name)||(n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.email))),m(2),_e(" ",M(3,5,(n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.name)||(n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.email)),"")}}function Lze(i,o){if(i&1&&(f(0),u(1,Fze,4,7,"div",4),v()),i&2){let n=l(2).ngIf,e=de(3);m(),d("ngIf",(n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.name)||(n==null||n.annotation==null||n.annotation.assignedTo==null?null:n.annotation.assignedTo.email))("ngIfElse",e)}}function Bze(i,o){if(i&1&&(f(0),u(1,Lze,2,2,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,Nze,e.template,A(1,Gde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Vze(i,o){i&1&&w(0,"velt-skeleton-loader-internal",6)}function Uze(i,o){if(i&1&&(f(0),u(1,Bze,2,9,"ng-container",2)(2,Vze,1,0,"ng-template",null,0,xe),v()),i&2){let n=l();m(),d("veltIf",k(3,Rze,n.conditionSignal(),A(1,Gde,n.componentConfigSignal)))}}var EI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-assignee-banner-name",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerUserNameComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-assignee-banner-user-name"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["loadingTemplateRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-assignee-banner--user-name","role","text",4,"ngIf","ngIfElse"],["role","text",1,"velt-assignee-banner--user-name"],["height","16px","width","80px","borderRadius","8px"]],template:function(t,r){t&1&&u(0,Uze,4,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-assignee-banner--user-name[_ngcontent-%COMP%]{color:var(--velt-accent-foreground);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}"],changeDetection:0});let i=o;return i})();var Wde=i=>({componentConfigSignal:i}),jze=(i,o)=>({condition:i,data:o}),$ze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-assignee-banner-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Hze(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-assignee-banner-resolve-button",7)(2,"app-comment-dialog-assignee-banner-unresolve-button",8),v()),i&2){let n=l(5);m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)}}function zze(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),w(2,"app-comment-dialog-assignee-banner-user-avatar",4),_(3,"div",5)(4,"div",6),te(5),P(6,"translate"),b(),w(7,"app-comment-dialog-assignee-banner-user-name",4),b(),u(8,Hze,3,2,"ng-container",0),b()),i&2){let n=l(3).ngIf,e=l();it("background-color",n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.color)("--legacy-velt-assignee-banner-color",(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.lightColor)||"white")("--legacy-velt-tooltip-button-color",(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.lightColor)||"white"),ue("velt-assignee-banner--private-comment-mode",n==null?null:n.isPrivateComment)("private-comment",n==null?null:n.isPrivateComment),x("data-testid",e.componentId)("aria-label",M(1,17,"Comment assignment details")),m(2),d("componentConfigSignal",e.componentConfigSignal),m(),x("data-testid",e.componentId+"-author"),m(2),ze(M(6,19,"Assigned to:")),m(2),d("componentConfigSignal",e.componentConfigSignal),m(),d("ngIf",!(n!=null&&n.readOnly))}}function Gze(i,o){if(i&1&&(f(0),u(1,zze,9,21,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,$ze,e.template,A(1,Wde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Wze(i,o){if(i&1&&(f(0),u(1,Gze,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null||n.annotation==null?null:n.annotation.assignedTo)&&!(n!=null&&n.inlineCommentMode))}}function qze(i,o){if(i&1&&(f(0),u(1,Wze,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,jze,n.conditionSignal(),A(1,Wde,n.componentConfigSignal)))}}var K0=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-assignee-banner",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","region"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogAssigneeBannerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-assignee-banner"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-assignee-banner--heading","role","region",3,"velt-assignee-banner--private-comment-mode","private-comment","backgroundColor","--legacy-velt-assignee-banner-color","--legacy-velt-tooltip-button-color",4,"veltDynamicTemplate"],["role","region",1,"velt-assignee-banner--heading"],[3,"componentConfigSignal"],[1,"velt-assignee-banner--author"],[1,"velt-assignee-banner--text"],[1,"velt-assignee-banner--resolve-button",3,"componentConfigSignal"],[1,"velt-assignee-banner--unresolve-button",3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,qze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-assignee-banner--heading[_ngcontent-%COMP%]{background:var(--velt-green);margin:calc(var(--velt-spacing-lg) * -1);padding:var(--velt-spacing-lg);color:var(--velt-white);display:flex;align-items:center;justify-content:flex-start;grid-gap:var(--velt-spacing-sm);gap:var(--velt-spacing-sm);margin-bottom:0;border-radius:var(--velt-border-radius-md) var(--velt-border-radius-md) 0 0}.velt-assignee-banner--heading.velt-assignee-banner--private-comment-mode[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--velt-purple) 32%,var(--velt-black) 100%);border-radius:0}.velt-assignee-banner--author[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;overflow:hidden}.velt-assignee-banner--text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:var(--velt-font-size-xs);line-height:17px;color:var(--velt-accent-foreground)}.velt-assignee-banner--resolve-button[_ngcontent-%COMP%], .velt-assignee-banner--unresolve-button[_ngcontent-%COMP%]{margin-left:auto}"],changeDetection:0});let i=o;return i})();var Kze=["commentContainer"],Zze=i=>({componentConfigSignal:i}),Xze=(i,o)=>({condition:i,data:o}),Qze=(i,o)=>({componentConfigSignal:i,wireframe:o}),Jze=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-body-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function eGe(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-reply-avatars",10),v()),i&2){let n=l(6);m(),d("componentConfigSignal",n.componentConfigSignal)}}function tGe(i,o){if(i&1&&(_(0,"div",9),u(1,eGe,2,1,"ng-container",1),w(2,"app-comment-dialog-toggle-reply",10),b()),i&2){let n=l(4).ngIf,e=l();ue("velt-comment-dialog-body--reply-avatars-inline-mode",n.inlineCommentSectionMode),m(),d("ngIf",(n==null?null:n.replyAvatars)&&!(n!=null&&n.commentDialogSelected)),m(),d("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-toggle")}}function nGe(i,o){if(i&1){let n=Y();_(0,"div",6),G("scroll",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.setMessageScrollOffset(t))}),w(1,"app-comment-dialog-threads",7),u(2,tGe,3,5,"div",8),b()}if(i&2){let n=l(3).ngIf,e=l();x("aria-live","polite")("aria-atomic","false")("data-testid",e.componentId+"-scroll-container"),m(),d("componentConfigSignal",e.componentConfigSignal)("wireframe",e.wireframe),x("data-testid",e.componentId+"-threads"),m(),d("ngIf",!(n!=null&&n.readOnly))}}function iGe(i,o){if(i&1&&(_(0,"div",4,0),P(2,"translate"),u(3,nGe,3,7,"div",5),b()),i&2){let n=l(2).ngIf,e=l();ue("velt-comment-dialog-body--inline-comment-section-mode",n==null?null:n.inlineCommentSectionMode)("velt-comment-dialog-body--closed",!(n!=null&&n.commentDialogSelected)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length))("velt-comment-dialog-body--focused-thread-mode",n==null?null:n.focusedThreadMode),x("data-testid",e.componentId)("aria-label",M(2,10,"Comment dialog thread"))("aria-expanded",!(!(n!=null&&n.commentDialogSelected)&&(!(n==null||n.annotation==null||n.annotation.comments==null)&&n.annotation.comments.length))),m(3),d("veltDynamicTemplate",$(15,Jze,e.template,k(12,Qze,e.componentConfigSignal,e.wireframe),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function oGe(i,o){if(i&1&&(f(0),u(1,iGe,4,21,"div",3),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)}}function rGe(i,o){if(i&1&&(f(0),u(1,oGe,2,1,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,Xze,n.conditionSignal(),A(1,Zze,n.componentConfigSignal)))}}var Z0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.subscriptions=[],this.componentId="velt-comment-dialog-body",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.subscriptions.push(this.componentConfigSignal().scrollToBottom.subscribe(()=>{this.scrollToBottom()}))}catch{}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()}),clearTimeout(this.scrollTimeout)}catch{}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogBodyComponent setupA11yAttributes:",e)}}scrollToBottom(){try{clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{this.commentContainer?.nativeElement&&this.commentContainer?.nativeElement.scrollTo({top:this.commentContainer.nativeElement.scrollHeight,behavior:"smooth"})},100)}catch(e){this.catchError("Error in CommentDialogBodyComponent scrollToBottom: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-body"]],viewQuery:function(t,r){if(t&1&&nt(Kze,5),t&2){let a;Xe(a=Qe())&&(r.commentContainer=a.first)}},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["commentContainer",""],[4,"ngIf"],[4,"veltIf"],["class","velt-body","role","region",3,"velt-comment-dialog-body--inline-comment-section-mode","velt-comment-dialog-body--closed","velt-comment-dialog-body--focused-thread-mode",4,"ngIf"],["role","region",1,"velt-body"],["role","log",3,"scroll",4,"veltDynamicTemplate"],["role","log",3,"scroll"],[3,"componentConfigSignal","wireframe"],["class","velt-comment-dialog-body--reply-avatars",3,"velt-comment-dialog-body--reply-avatars-inline-mode",4,"ngIf"],[1,"velt-comment-dialog-body--reply-avatars"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,rGe,2,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:250px;position:relative}.velt-body.velt-comment-dialog-body--inline-comment-section-mode[_ngcontent-%COMP%]{max-height:none}.velt-comment-dialog-body--inline-comment-section-mode[_ngcontent-%COMP%] app-comment-dialog-threads[_ngcontent-%COMP%]{max-height:none;overflow:initial}[_ngcontent-%COMP%]::-webkit-scrollbar{display:none;width:0;height:0}[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}[_ngcontent-%COMP%]::-webkit-scrollbar-button{width:0;height:0}.velt-comment-dialog-body--focused-thread-mode[_ngcontent-%COMP%]{width:100%;max-height:none}.velt-comment-dialog-body--focused-thread-mode[_ngcontent-%COMP%] app-comment-dialog-threads[_ngcontent-%COMP%]{max-height:none}.velt-comment-dialog-body--reply-avatars[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;margin-top:var(--velt-spacing-xs)}.velt-comment-dialog-body--reply-avatars-inline-mode[_ngcontent-%COMP%]{margin-left:calc((3rem + 0px) * var(--velt-base-rem-unit));gap:var(--velt-spacing-sm)}"],changeDetection:0});let i=o;return i})();var qde=i=>({componentConfigSignal:i}),sGe=(i,o)=>({condition:i,data:o}),lGe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-comment-category-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function cGe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),te(2),P(3,"translate"),b()),i&2){let n=l(3).ngIf,e=l();it("background-color",(n==null||n.annotation==null||n.annotation.commentCategories==null||n.annotation.commentCategories[0]==null?null:n.annotation.commentCategories[0].color)+" !important"),x("data-testid",e.componentId+"-index")("aria-label",M(1,6,"Comment Index")+" "+(n==null||n.annotation==null?null:n.annotation.annotationIndex))("aria-hidden",!0),m(2),_e(" ",M(3,8,n==null?null:n.annotation.commentCategories[0].name),"")}}function dGe(i,o){if(i&1&&(f(0),u(1,cGe,4,10,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,lGe,e.template,A(1,qde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function mGe(i,o){if(i&1&&(f(0),u(1,dGe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.enableAutoCategorize)&&(n==null||n.annotation==null||n.annotation.commentCategories==null?null:n.annotation.commentCategories.length))}}function pGe(i,o){if(i&1&&(f(0),u(1,mGe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,sGe,n.conditionSignal(),A(1,qde,n.componentConfigSignal)))}}var xI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-comment-category",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogCommentCategoryComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogCommentCategoryComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogCommentCategoryComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-comment-category"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-comment-category",3,"background-color",4,"veltDynamicTemplate"],[1,"velt-comment-category"]],template:function(t,r){t&1&&u(0,pGe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-comment-category[_ngcontent-%COMP%]{color:var(--velt-white);display:flex;justify-content:center;align-items:center;padding:var(--velt-spacing-sm);border-radius:var(--velt-border-radius-3xl);min-width:calc((1rem + 0px) * var(--velt-base-rem-unit));height:calc((1rem + 0px) * var(--velt-base-rem-unit));font-style:normal;font-weight:600;font-size:var(--velt-font-size-2xs);font-weight:400;background:var(--velt-gray);box-sizing:border-box}"],changeDetection:0});let i=o;return i})();var Yde=i=>({componentConfigSignal:i}),gGe=(i,o)=>({condition:i,data:o}),uGe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-comment-index-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function hGe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),te(2),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId)("aria-label",M(1,4,"Comment Index")+" "+(n==null||n.annotation==null?null:n.annotation.annotationIndex))("aria-hidden",!0),m(2),_e(" #",n==null||n.annotation==null?null:n.annotation.annotationIndex,"")}}function fGe(i,o){if(i&1&&(f(0),u(1,hGe,3,6,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,uGe,e.template,A(1,Yde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function vGe(i,o){if(i&1&&(f(0),u(1,fGe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null||n.annotation==null?null:n.annotation.annotationIndex)}}function CGe(i,o){if(i&1&&(f(0),u(1,vGe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,gGe,n.conditionSignal(),A(1,Yde,n.componentConfigSignal)))}}var TI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-comment-index",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogCommentIndexComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogCommentIndexComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogCommentIndexComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-comment-index"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-comment-index",4,"veltDynamicTemplate"],[1,"velt-comment-index"]],template:function(t,r){t&1&&u(0,CGe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-comment-index[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:var(--velt-spacing-sm);border-radius:var(--velt-border-radius-3xl);width:calc((1rem + 0px) * var(--velt-base-rem-unit));height:calc((1rem + 0px) * var(--velt-base-rem-unit));font-style:normal;font-weight:600;font-size:var(--velt-font-size-2xs);box-sizing:border-box;width:calc((2rem + 0px) * var(--velt-base-rem-unit));font-weight:400;background:var(--velt-gray);color:var(--velt-black)}"],changeDetection:0});let i=o;return i})();var Kde=i=>({componentConfigSignal:i}),_Ge=(i,o)=>({condition:i,data:o}),yGe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-comment-suggestion-status-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function SGe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),P(2,"translate"),te(3),P(4,"translate"),b()),i&2){let n=l(3).ngIf,e=l();ue("velt-comment-suggestion-status--accepted",(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.id)===(n==null||n.commentAcceptedStatus==null?null:n.commentAcceptedStatus.id))("velt-comment-suggestion-status--rejected",(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.id)===(n==null||n.commentRejectedStatus==null?null:n.commentRejectedStatus.id)),x("data-testid",e.componentId)("aria-label",M(1,7,"Suggestion")+" "+M(2,9,(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.name)||"")),m(3),_e(" ",M(4,11,(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.name)||"")," ")}}function bGe(i,o){if(i&1&&(f(0),u(1,SGe,5,13,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,yGe,e.template,A(1,Kde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function IGe(i,o){if(i&1&&(f(0),u(1,bGe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.suggestionMode)&&((n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.id)===(n==null||n.commentAcceptedStatus==null?null:n.commentAcceptedStatus.id)||(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.id)===(n==null||n.commentRejectedStatus==null?null:n.commentRejectedStatus.id)))}}function EGe(i,o){if(i&1&&(f(0),u(1,IGe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,_Ge,n.conditionSignal(),A(1,Kde,n.componentConfigSignal)))}}var DI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-comment-suggestion-status",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogCommentSuggestionStatusComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogCommentSuggestionStatusComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogCommentSuggestionStatusComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-comment-suggestion-status"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-comment-suggestion-status","role","status",3,"velt-comment-suggestion-status--accepted","velt-comment-suggestion-status--rejected",4,"veltDynamicTemplate"],["role","status",1,"velt-comment-suggestion-status"]],template:function(t,r){t&1&&u(0,EGe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-comment-suggestion-status[_ngcontent-%COMP%]{background:var(--velt-white);display:flex;justify-content:center;align-items:center;padding:var(--velt-spacing-sm);border-radius:var(--velt-border-radius-3xl);min-width:calc((1rem + 0px) * var(--velt-base-rem-unit));height:calc((1rem + 0px) * var(--velt-base-rem-unit));font-style:normal;font-weight:600;font-size:var(--velt-font-size-2xs);font-weight:400;background:var(--velt-gray)}.velt-comment-suggestion-status.velt-comment-suggestion-status--accepted[_ngcontent-%COMP%]{background:var(--velt-success);color:var(--velt-success-foreground)}.velt-comment-suggestion-status.velt-comment-suggestion-status--rejected[_ngcontent-%COMP%]{background:var(--velt-error);color:var(--velt-error-foreground)}"],changeDetection:0});let i=o;return i})();var X0=i=>({componentConfigSignal:i}),xGe=(i,o)=>({condition:i,data:o}),Q0=(i,o)=>({componentName:"velt-comment-dialog-composer-action-button-wireframe",variant:i,suffix:o}),wI=(i,o,n,e,t,r)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-action-button-wireframe",variant:n,suffix:e,setIfCondition:t,componentElementRef:r});function TGe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-tool-internal",6),P(1,"translate"),G("buttonClick",function(){N(n);let t=l(4).ngIf;return F(t==null?null:t.onAtClick(t==null||t.newCommentTextArea==null?null:t.newCommentTextArea.nativeElement))}),b()}if(i&2){let n=l(4).ngIf,e=l();d("hotkey",e.hotkey)("template",e.template)("componentMeta",k(9,Q0,n==null?null:n.variant,e.type))("darkMode",!!(n!=null&&n.darkMode))("triggerElement",n==null||n.newCommentTextArea==null?null:n.newCommentTextArea.nativeElement),x("aria-label",M(1,7,"Mention someone using @ symbol"))("data-testid",e.componentId+"-autocomplete-new")}}function DGe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-tool-internal",6),P(1,"translate"),G("buttonClick",function(){N(n);let t=l(4).ngIf;return F(t==null?null:t.onAtClick(t==null||t.editCommentTextArea==null?null:t.editCommentTextArea.nativeElement))}),b()}if(i&2){let n=l(4).ngIf,e=l();d("hotkey",e.hotkey)("template",e.template)("componentMeta",k(9,Q0,n==null?null:n.variant,e.type))("darkMode",!!(n!=null&&n.darkMode))("triggerElement",n==null||n.editCommentTextArea==null?null:n.editCommentTextArea.nativeElement),x("aria-label",M(1,7,"Mention someone using @ symbol while editing"))("data-testid",e.componentId+"-autocomplete-edit")}}function wGe(i,o){if(i&1&&(f(0),u(1,TGe,2,12,"velt-autocomplete-tool-internal",5)(2,DGe,2,12,"velt-autocomplete-tool-internal",5),v()),i&2){let n=l(4);m(),d("ngIf",!n.editMode),m(),d("ngIf",n.editMode)}}function OGe(i,o){if(i&1&&(f(0),u(1,wGe,3,2,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null?null:n.userMentions)}}function AGe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-tool-internal",6),P(1,"translate"),G("buttonClick",function(){N(n);let t=l(4).ngIf;return F(t==null?null:t.onAtClick(t==null||t.newCommentTextArea==null?null:t.newCommentTextArea.nativeElement))}),b()}if(i&2){let n=l(4).ngIf,e=l();d("hotkey",e.hotkey)("template",e.template)("componentMeta",k(9,Q0,n==null?null:n.variant,e.type))("darkMode",!!(n!=null&&n.darkMode))("triggerElement",n==null||n.newCommentTextArea==null?null:n.newCommentTextArea.nativeElement),x("aria-label",M(1,7,"Type @ to mention someone"))("data-testid",e.componentId+"-autocomplete-tool-new")}}function PGe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-tool-internal",6),P(1,"translate"),G("buttonClick",function(){N(n);let t=l(4).ngIf;return F(t==null?null:t.onAtClick(t==null||t.editCommentTextArea==null?null:t.editCommentTextArea.nativeElement))}),b()}if(i&2){let n=l(4).ngIf,e=l();d("hotkey",e.hotkey)("template",e.template)("componentMeta",k(9,Q0,n==null?null:n.variant,e.type))("darkMode",!!(n!=null&&n.darkMode))("triggerElement",n==null||n.editCommentTextArea==null?null:n.editCommentTextArea.nativeElement),x("aria-label",M(1,7,"Type @ to mention someone while editing"))("data-testid",e.componentId+"-autocomplete-tool-edit")}}function MGe(i,o){if(i&1&&(f(0),u(1,AGe,2,12,"velt-autocomplete-tool-internal",5)(2,PGe,2,12,"velt-autocomplete-tool-internal",5),v()),i&2){let n=l(4);m(),d("ngIf",!n.editMode),m(),d("ngIf",n.editMode)}}function kGe(i,o){if(i&1&&(f(0),u(1,MGe,3,2,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null?null:n.userMentions)}}function RGe(i,o){if(i&1){let n=Y();_(0,"app-attachment-button",8),P(1,"translate"),G("clicked",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.onAttachmentButtonClick())})("selectFiles",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.selectFiles(t))})("setIfConditionEvent",function(t){N(n);let r=l(4);return F(r.setIfCondition(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("template",e.template)("darkMode",!!(n!=null&&n.darkMode))("componentMeta",k(7,Q0,n==null?null:n.variant,e.type)),x("aria-label",M(1,5,"Add file attachment to comment"))("data-testid",e.componentId+"-attachment-button")}}function NGe(i,o){if(i&1&&(f(0),u(1,RGe,2,10,"app-attachment-button",7),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null?null:n.enableAttachment)}}function FGe(i,o){if(i&1){let n=Y();_(0,"app-attachment-button",8),P(1,"translate"),G("clicked",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.onAttachmentButtonClick())})("selectFiles",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.selectFiles(t))})("setIfConditionEvent",function(t){N(n);let r=l(4);return F(r.setIfCondition(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("template",e.template)("darkMode",!!(n!=null&&n.darkMode))("componentMeta",k(7,Q0,n==null?null:n.variant,e.type)),x("aria-label",M(1,5,"Add file attachment to comment"))("data-testid",e.componentId+"-attachment-button")}}function LGe(i,o){if(i&1&&(f(0),u(1,FGe,2,10,"app-attachment-button",7),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null?null:n.enableAttachment)}}function BGe(i,o){if(i&1&&(f(0),_(1,"app-action-button",13),P(2,"translate"),le(),_(3,"svg",14),w(4,"path",15)(5,"path",16),b()(),v()),i&2){let n=l(4).ngIf,e=l();m(),d("title",M(2,4,"Record voice"))("darkMode",!!(n!=null&&n.darkMode)),x("aria-label","Record voice message")("data-testid",e.componentId+"-audio-record")}}function VGe(i,o){if(i&1){let n=Y();_(0,"app-device-permission-button",10),P(1,"translate"),_(2,"div",11),P(3,"translate"),G("click",function(){N(n);let t=l(3).ngIf;return F(t!=null&&t.recorderInitConfig||t==null?null:t.initRecording("audio"))}),u(4,BGe,6,6,"ng-container",12),b()()}if(i&2){let n=l(3).ngIf,e=l();d("darkMode",!!(n!=null&&n.darkMode)),x("aria-label",M(1,6,"Record voice message"))("data-testid",e.componentId+"-audio-button"),m(2),x("aria-label",M(3,8,"Click to start voice recording"))("data-testid",e.componentId+"-audio-record"),m(2),d("veltDynamicTemplate",Ws(12,wI,e.template,A(10,X0,e.componentConfigSignal),n==null?null:n.variant,e.type,e.setIfCondition.bind(e),e.elementRef))}}function UGe(i,o){if(i&1&&(f(0),u(1,VGe,5,19,"app-device-permission-button",9),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null||n.allowedRecordings==null?null:n.allowedRecordings.includes("audio"))}}function jGe(i,o){if(i&1&&(f(0),_(1,"app-action-button",13),P(2,"translate"),P(3,"translate"),le(),_(4,"svg",19),w(5,"path",20),b()(),v()),i&2){let n=l(4).ngIf,e=l();m(),d("title",M(2,4,"Record video"))("darkMode",!!(n!=null&&n.darkMode)),x("aria-label",M(3,6,"Record video message"))("data-testid",e.componentId+"-video-record")}}function $Ge(i,o){if(i&1){let n=Y();_(0,"app-device-permission-button",18),P(1,"translate"),_(2,"div",11),G("click",function(){N(n);let t=l(3).ngIf;return F(t!=null&&t.recorderInitConfig||t==null?null:t.initRecording("video"))}),u(3,jGe,6,8,"ng-container",12),b()()}if(i&2){let n=l(3).ngIf,e=l();d("darkMode",!!(n!=null&&n.darkMode)),x("aria-label",M(1,6,"Record video message"))("data-testid",e.componentId+"-video-button"),m(2),x("aria-label","Click to start video recording")("data-testid",e.componentId+"-video-record"),m(),d("veltDynamicTemplate",Ws(10,wI,e.template,A(8,X0,e.componentConfigSignal),n==null?null:n.variant,e.type,e.setIfCondition.bind(e),e.elementRef))}}function HGe(i,o){if(i&1&&(f(0),u(1,$Ge,4,17,"app-device-permission-button",17),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null||n.allowedRecordings==null?null:n.allowedRecordings.includes("video"))}}function zGe(i,o){if(i&1&&(f(0),_(1,"app-action-button",13),P(2,"translate"),P(3,"translate"),le(),_(4,"svg",22),w(5,"path",23)(6,"path",24)(7,"path",25)(8,"path",26),b()(),v()),i&2){let n=l(4).ngIf,e=l();m(),d("title",M(2,4,"Record screen"))("darkMode",!!(n!=null&&n.darkMode)),x("aria-label",M(3,6,"Record your screen"))("data-testid",e.componentId+"-screen-record")}}function GGe(i,o){if(i&1){let n=Y();_(0,"div",11),P(1,"translate"),G("click",function(){N(n);let t=l(3).ngIf;return F(t!=null&&t.recorderInitConfig||t==null?null:t.initRecording("screen"))}),u(2,zGe,9,8,"ng-container",12),b()}if(i&2){let n=l(3).ngIf,e=l();x("aria-label",M(1,3,"Click to start screen recording"))("data-testid",e.componentId+"-screen-record"),m(2),d("veltDynamicTemplate",Ws(7,wI,e.template,A(5,X0,e.componentConfigSignal),n==null?null:n.variant,e.type,e.setIfCondition.bind(e),e.elementRef))}}function WGe(i,o){if(i&1&&(f(0),u(1,GGe,3,14,"div",21),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null||n.allowedRecordings==null?null:n.allowedRecordings.includes("screen"))&&(n==null?null:n.screenSharingSupported))}}function qGe(i,o){i&1&&(_(0,"div",30),le(),_(1,"svg",31),w(2,"path",32),b()())}function YGe(i,o){if(i&1){let n=Y();_(0,"button",28),P(1,"translate"),G("click",function(t){N(n);let r=l(3).ngIf;return r==null||r.addComment(),F(t.stopPropagation())}),u(2,qGe,3,0,"div",29),b()}if(i&2){let n,e=l(3).ngIf,t=l();d("disabled",(e==null||e.newComment==null||(n=e.newComment.trim())==null?null:n.length)<1&&!(!(e==null||e.selectedAttachments==null)&&e.selectedAttachments.length)&&!(!(e==null||e.localRecordedData==null)&&e.localRecordedData.length)||(e==null?null:e.uploadingAttachments)),x("aria-label",M(1,4,"Save new comment"))("data-testid",t.componentId+"-submit-new"),m(2),d("veltDynamicTemplate",Ws(8,wI,t.template,A(6,X0,t.componentConfigSignal),e==null?null:e.variant,t.type,t.setIfCondition.bind(t),t.elementRef))}}function KGe(i,o){i&1&&(_(0,"div",30),le(),_(1,"svg",31),w(2,"path",33),b()())}function ZGe(i,o){if(i&1){let n=Y();_(0,"button",28),P(1,"translate"),G("click",function(t){N(n);let r=l(3).ngIf,a=l();return r==null||r.updateComment(a.i,r==null||r.editCommentTextArea==null?null:r.editCommentTextArea.nativeElement.innerText),F(t.stopPropagation())}),u(2,KGe,3,0,"div",29),b()}if(i&2){let n,e=l(3).ngIf,t=l();d("disabled",!(!(e==null||e.editCommentTextArea==null||e.editCommentTextArea.nativeElement==null||e.editCommentTextArea.nativeElement.innerText==null||(n=e.editCommentTextArea.nativeElement.innerText.trim())==null)&&n.length)&&!(!(e==null||e.selectedAttachments==null)&&e.selectedAttachments.length)&&!(!(e==null||e.attachmentsToDelete==null)&&e.attachmentsToDelete.length)&&!(!(e==null||e.localRecordedData==null)&&e.localRecordedData.length)||(e==null?null:e.uploadingAttachments)),x("aria-label",M(1,4,"Save edited comment"))("data-testid",t.componentId+"-submit-edit"),m(2),d("veltDynamicTemplate",Ws(8,wI,t.template,A(6,X0,t.componentConfigSignal),e==null?null:e.variant,t.type,t.setIfCondition.bind(t),t.elementRef))}}function XGe(i,o){if(i&1&&(f(0),u(1,YGe,3,15,"button",27)(2,ZGe,3,15,"button",27),v()),i&2){let n=l(3);m(),d("ngIf",!n.editMode),m(),d("ngIf",n.editMode)}}function QGe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),G("click",function(t){return N(n),F(t.stopPropagation())}),f(3,3),u(4,OGe,2,1,"ng-container",4)(5,kGe,2,1,"ng-container",4)(6,NGe,2,1,"ng-container",4)(7,LGe,2,1,"ng-container",4)(8,UGe,2,1,"ng-container",4)(9,HGe,2,1,"ng-container",4)(10,WGe,2,1,"ng-container",4)(11,XGe,3,2,"ng-container",4),v(),b(),v()}if(i&2){let n=l(2);m(),x("aria-label",M(2,11,"Comment tools and actions"))("data-testid",n.componentId),m(2),d("ngSwitch",n.type),m(),d("ngSwitchCase","userMentions"),m(),d("ngSwitchCase","autocomplete"),m(),d("ngSwitchCase","file"),m(),d("ngSwitchCase","attachments"),m(),d("ngSwitchCase","audio"),m(),d("ngSwitchCase","video"),m(),d("ngSwitchCase","screen"),m(),d("ngSwitchCase","submit")}}function JGe(i,o){if(i&1&&(f(0),u(1,QGe,12,13,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,xGe,n.conditionSignal(),A(1,X0,n.componentConfigSignal)))}}var OI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.editMode=!1,this.hotkey="@",this.componentId="velt-comment-dialog-composer-action-button",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerActionButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerActionButtonComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","group"),e.setAttribute("aria-label",`Composer action button group for ${this.type}`)}catch(e){this.loggingService.catch("Error in CommentDialogComposerActionButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-action-button"]],inputs:{type:"type",editMode:"editMode",i:"i",hotkey:"hotkey"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","group",1,"velt-comment-dialog-composer-action-button",3,"click"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"hotkey","template","componentMeta","darkMode","triggerElement","buttonClick",4,"ngIf"],[3,"buttonClick","hotkey","template","componentMeta","darkMode","triggerElement"],[3,"template","darkMode","componentMeta","clicked","selectFiles","setIfConditionEvent",4,"ngIf"],[3,"clicked","selectFiles","setIfConditionEvent","template","darkMode","componentMeta"],["type","audio","mode","thread",3,"darkMode",4,"ngIf"],["type","audio","mode","thread",3,"darkMode"],["role","button","tabindex","0",3,"click"],[4,"veltDynamicTemplate"],[3,"title","darkMode"],["icon","","width","14","height","20","viewBox","0 0 14 20","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill-rule","evenodd","clip-rule","evenodd","d","M0.833333 7.5C1.29357 7.5 1.66667 7.8731 1.66667 8.33333V9.16667C1.66667 11.9281 3.90524 14.1667 6.66667 14.1667C9.42809 14.1667 11.6667 11.9281 11.6667 9.16667V8.33333C11.6667 7.8731 12.0398 7.5 12.5 7.5C12.9602 7.5 13.3333 7.8731 13.3333 8.33333V9.16667C13.3333 12.5663 10.7886 15.3717 7.5 15.7818V18.3333H10C10.4602 18.3333 10.8333 18.7064 10.8333 19.1667C10.8333 19.6269 10.4602 20 10 20H3.33333C2.8731 20 2.5 19.6269 2.5 19.1667C2.5 18.7064 2.8731 18.3333 3.33333 18.3333H5.83333V15.7818C2.54474 15.3717 0 12.5663 0 9.16667V8.33333C0 7.8731 0.373096 7.5 0.833333 7.5Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M8.33203 9.16667V3.33333C8.33203 2.41286 7.58584 1.66667 6.66536 1.66667C5.74489 1.66667 4.9987 2.41286 4.9987 3.33333V9.16667C4.9987 10.0871 5.74489 10.8333 6.66536 10.8333C7.58584 10.8333 8.33203 10.0871 8.33203 9.16667ZM6.66536 0C4.82442 0 3.33203 1.49238 3.33203 3.33333V9.16667C3.33203 11.0076 4.82442 12.5 6.66536 12.5C8.50631 12.5 9.9987 11.0076 9.9987 9.16667V3.33333C9.9987 1.49238 8.50631 0 6.66536 0Z","fill","currentColor"],["type","video","mode","thread",3,"darkMode",4,"ngIf"],["type","video","mode","thread",3,"darkMode"],["icon","","width","19","height","11","viewBox","0 0 19 11","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.55139 0.230077C1.68754 0.453772 1.06855 1.02195 0.766641 1.86822L0.666016 2.15026V5.58765V9.02505L0.766892 9.30709C1.0535 10.1083 1.64038 10.6731 2.43987 10.9173L2.70863 10.9993H7.1343H11.56L11.8467 10.9033C12.6234 10.6431 13.2099 10.0635 13.47 9.29927C13.56 9.03464 13.5637 8.99015 13.5769 8.02909C13.5844 7.48129 13.6004 7.03312 13.6125 7.03312C13.661 7.03312 15.0857 7.85517 15.8518 8.3252C16.7188 8.85713 16.9126 8.93691 17.338 8.93691C18.0692 8.93691 18.7509 8.40671 18.947 7.68535C19.0174 7.42654 19.0165 3.74584 18.946 3.48531C18.7883 2.90254 18.278 2.40649 17.7016 2.27577C17.4483 2.2183 17.0895 2.23195 16.8373 2.30859C16.6848 2.35492 16.3699 2.52421 15.9107 2.80671C15.3288 3.1648 13.6405 4.14219 13.6039 4.14219C13.5979 4.14219 13.5847 3.70988 13.5747 3.18148C13.5543 2.10348 13.5363 1.99704 13.2916 1.506C13.0166 0.954081 12.475 0.492835 11.8467 0.275239L11.56 0.17596L7.18806 0.168733C2.95948 0.161752 2.80747 0.163762 2.55139 0.230077ZM11.3211 1.83448C11.5404 1.89857 11.7306 2.05186 11.8398 2.25268L11.9183 2.39705V5.57098V8.74488L11.8268 8.91988C11.7122 9.13896 11.4929 9.30656 11.2552 9.35673C11.0123 9.40799 3.20786 9.40919 2.98224 9.35804C2.74243 9.30364 2.53297 9.14287 2.42553 8.93071L2.33236 8.74678V5.58765V2.42853L2.42553 2.2446C2.52985 2.03864 2.7435 1.8703 2.96604 1.81882C3.04208 1.80123 4.88581 1.78558 7.11882 1.7836C10.641 1.7805 11.1578 1.78678 11.3211 1.83448ZM17.3116 5.59171V7.28802L17.2309 7.23605C16.8358 6.98144 15.6936 6.30232 15.1359 5.99038C14.7573 5.77856 14.4468 5.59675 14.4461 5.58635C14.4453 5.57591 14.7874 5.37341 15.2062 5.13632C15.6251 4.89919 16.258 4.52439 16.6128 4.30341C16.9675 4.08243 17.2699 3.90019 17.2847 3.8985C17.2995 3.89681 17.3116 4.65875 17.3116 5.59171Z","fill","currentColor"],["role","button","tabindex","0",3,"click",4,"ngIf"],["icon","","width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["d","M7.4987 15H9.16536V16.6667H10.832V15H12.4987V16.6667H13.332C13.7923 16.6667 14.1654 17.0398 14.1654 17.5C14.1654 17.9602 13.7923 18.3333 13.332 18.3333H6.66536C6.20513 18.3333 5.83203 17.9602 5.83203 17.5C5.83203 17.0398 6.20513 16.6667 6.66536 16.6667H7.4987V15Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.33464 5L3.33464 11.6667C3.33464 12.5871 4.08083 13.3333 5.0013 13.3333L15.0013 13.3333C15.9218 13.3333 16.668 12.5871 16.668 11.6667L16.668 5C16.668 4.07953 15.9218 3.33333 15.0013 3.33333L5.0013 3.33333C4.08083 3.33333 3.33464 4.07953 3.33464 5ZM1.66797 11.6667C1.66797 13.5076 3.16035 15 5.0013 15L15.0013 15C16.8423 15 18.3346 13.5076 18.3346 11.6667L18.3346 5C18.3346 3.15905 16.8423 1.66667 15.0013 1.66667L5.0013 1.66667C3.16035 1.66667 1.66797 3.15905 1.66797 5L1.66797 11.6667Z","fill","currentColor"],["d","M5.83333 5C5.3731 5 5 5.3731 5 5.83333C5 6.29357 5.3731 6.66667 5.83333 6.66667H11.6667C12.1269 6.66667 12.5 6.29357 12.5 5.83333C12.5 5.3731 12.1269 5 11.6667 5H5.83333Z","fill","currentColor"],["d","M5.83333 8.33333C5.3731 8.33333 5 8.70643 5 9.16667C5 9.6269 5.3731 10 5.83333 10H7.5C7.96024 10 8.33333 9.6269 8.33333 9.16667C8.33333 8.70643 7.96024 8.33333 7.5 8.33333H5.83333Z","fill","currentColor"],["class","velt-composer--submit-button",3,"disabled","click",4,"ngIf"],[1,"velt-composer--submit-button",3,"click","disabled"],["class","velt-composer--input-button",4,"veltDynamicTemplate"],[1,"velt-composer--input-button"],["width","14","height","14","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["d","M20.8089 10.1394L4.6724 3.15546C3.9926 2.8612 3.22459 2.99065 2.66814 3.49311C2.1117 3.99565 1.87896 4.76995 2.06084 5.51382L3.49713 11.3888H10.5294C10.853 11.3888 11.1154 11.6625 11.1154 12C11.1154 12.3375 10.853 12.6112 10.5294 12.6112H3.49713L2.06084 18.4862C1.87896 19.2301 2.11166 20.0044 2.66814 20.5069C3.22572 21.0104 3.99381 21.1382 4.67244 20.8445L20.8089 13.8606C21.5436 13.5426 22 12.8297 22 12C22 11.1703 21.5436 10.4574 20.8089 10.1394Z","fill","currentColor"],["d","M20.8089 10.1394L4.6724 3.15546C3.9926 2.8612 3.22459 2.99065 2.66814 3.49311C2.1117 3.99565 1.87896 4.76995 2.06084 5.51382L3.49713 11.3888H10.5294C10.853 11.3888 11.1154 11.6625 11.1154 12C11.1154 12.3375 10.853 12.6112 10.5294 12.6112H3.49713L2.06084 18.4862C1.87896 19.2301 2.11166 20.0044 2.66814 20.5069C3.22572 21.0104 3.99381 21.1382 4.67244 20.8445L20.8089 13.8606C21.5436 13.5426 22 12.8297 22 12C22 11.1703 21.5436 10.4574 20.8089 10.1394Z","fill","white"]],template:function(t,r){t&1&&u(0,JGe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-comment-dialog-composer-action-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.velt-composer--submit-button[_ngcontent-%COMP%]{background:transparent;border:0;outline:0}.velt-composer--submit-button[_ngcontent-%COMP%] .velt-composer--input-button[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:2.4em;height:2.4em;border:0;border-radius:var(--velt-border-radius-3xl);background:var(--velt-accent);color:var(--velt-accent-foreground);cursor:pointer}.velt-composer--submit-button[_ngcontent-%COMP%]:disabled .velt-composer--input-button[_ngcontent-%COMP%]{opacity:.4;pointer-events:none;cursor:not-allowed}.velt-composer--submit-button[_ngcontent-%COMP%]:hover .velt-composer--input-button[_ngcontent-%COMP%]{background:var(--velt-accent-hover);color:var(--velt-accent-foreground)}.velt-composer--submit-button[_ngcontent-%COMP%]:focus .velt-composer--input-button[_ngcontent-%COMP%]{background:var(--velt-accent-hover);color:var(--velt-accent-foreground);outline:0}.velt-composer--submit-button[_ngcontent-%COMP%]:active .velt-composer--input-button[_ngcontent-%COMP%]{background:var(--velt-accent-hover);color:var(--velt-accent-foreground)}"],changeDetection:0});let i=o;return i})();var Zde=i=>({componentConfigSignal:i}),eWe=(i,o)=>({condition:i,data:o}),tWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-assign-user-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function nWe(i,o){if(i&1){let n=Y();_(0,"app-assign-dropdown",4),P(1,"translate"),G("setAssignTo",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.setAssignTo(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("darkMode",!!(n!=null&&n.darkMode))("assignTo",n==null?null:n.assignTo)("selectedUserContacts",n==null?null:n.selectedUserContacts),x("data-testid",e.componentId+"-dropdown")("aria-label",M(1,5,"Assign user"))}}function iWe(i,o){if(i&1&&(f(0),u(1,nWe,2,7,"app-assign-dropdown",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n==null?null:n.userMentions)}}function oWe(i,o){if(i&1&&(f(0),u(1,iWe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,tWe,e.template,A(1,Zde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function rWe(i,o){if(i&1&&(f(0),u(1,oWe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,eWe,n.conditionSignal(),A(1,Zde,n.componentConfigSignal)))}}var AI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-assign-user",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAssignUserComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAssignUserComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAssignUserComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-assign-user"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"darkMode","assignTo","selectedUserContacts","setAssignTo",4,"ngIf"],[3,"setAssignTo","darkMode","assignTo","selectedUserContacts"]],template:function(t,r){t&1&&u(0,rWe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var aWe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),sWe=(i,o)=>({condition:i,data:o}),lWe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),cWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-image-preview-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function dWe(i,o){if(i&1&&(f(0),w(1,"img",3),v()),i&2){let n=l(3);m(),d("src",n.file==null?null:n.file.url,vn)}}function mWe(i,o){if(i&1&&(f(0),u(1,dWe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,cWe,e.template,pt(1,lWe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function pWe(i,o){if(i&1&&(f(0),u(1,mWe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,sWe,n.conditionSignal(),pt(1,aWe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var PI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-image-preview",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImagePreviewComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImagePreviewComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImagePreviewComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-image-preview"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["velt-ignore-change-detection","true","aria-hidden","true","role","img",3,"src"]],template:function(t,r){t&1&&u(0,pWe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}img[_ngcontent-%COMP%]{width:100%;object-fit:cover;height:100%}"],changeDetection:0});let i=o;return i})();var gWe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),uWe=(i,o)=>({condition:i,data:o}),hWe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),fWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-image-delete-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function vWe(i,o){i&1&&(f(0),le(),_(1,"svg",5),w(2,"path",6)(3,"path",7),b(),v())}function CWe(i,o){if(i&1){let n=Y();_(0,"button",3),P(1,"translate"),P(2,"translate"),G("click",function(){N(n);let t=l(2).ngIf,r=l();return F(r.isEditMode?t==null?null:t.removeAttachmentFromComment(r.fileIndex):t==null?null:t.removeFile(r.fileIndex))}),u(3,vWe,4,0,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();d("title",M(1,4,"Remove File")),x("data-testid",e.componentId)("aria-label",M(2,6,"Remove file")),m(3),d("veltDynamicTemplate",$(13,fWe,e.template,pt(8,hWe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function _We(i,o){if(i&1&&(f(0),u(1,CWe,4,19,"button",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(n!=null&&n.uploadingAttachments))}}function yWe(i,o){if(i&1&&(f(0),u(1,_We,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,uWe,n.conditionSignal(),pt(1,gWe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var MI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-image-delete",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageDeleteComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageDeleteComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageDeleteComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-image-delete"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-composer--icon-button",3,"title","click",4,"ngIf"],[1,"velt-composer--icon-button",3,"click","title"],[4,"veltDynamicTemplate"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","currentColor","aria-hidden","true","role","img"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(t,r){t&1&&u(0,yWe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-composer--icon-button[_ngcontent-%COMP%]{background:var(--velt-white);display:flex;align-items:center;border-radius:var(--velt-border-radius-3xl);width:40px;height:40px;justify-content:center;margin:var(--velt-spacing-xs);color:var(--velt-black)}"],changeDetection:0});let i=o;return i})();var SWe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),bWe=(i,o)=>({condition:i,data:o}),IWe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),EWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-image-loading-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function xWe(i,o){i&1&&(f(0),le(),_(1,"svg",3)(2,"circle",4),w(3,"animateTransform",5),b()(),v())}function TWe(i,o){if(i&1&&(f(0),u(1,xWe,4,0,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(6,EWe,e.template,pt(1,IWe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function DWe(i,o){if(i&1&&(f(0),u(1,TWe,2,12,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",(n==null?null:n.uploadingAttachments)&&!e.isEditMode&&!(e.file!=null&&e.file.uploaded))}}function wWe(i,o){if(i&1&&(f(0),u(1,DWe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,bWe,n.conditionSignal(),pt(1,SWe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var kI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-image-loading",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageLoadingComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageLoadingComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageLoadingComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-image-loading"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","48px","height","48px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid","aria-hidden","true","role","img",2,"margin","auto","display","block"],["cx","50","cy","50","fill","none","stroke","currentColor","stroke-width","7","r","34","stroke-dasharray","160.22122533307947 55.40707511102649"],["attributeName","transform","type","rotate","repeatCount","indefinite","dur","1s","values","0 50 50;360 50 50","keyTimes","0;1"]],template:function(t,r){t&1&&u(0,wWe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}svg[_ngcontent-%COMP%]{color:var(--velt-white)}"],changeDetection:0});let i=o;return i})();var OWe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),AWe=(i,o)=>({condition:i,data:o}),PWe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),MWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-image-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function kWe(i,o){if(i&1&&(f(0),_(1,"div",3),P(2,"translate"),P(3,"translate"),_(4,"div",4),P(5,"translate"),P(6,"translate"),w(7,"app-comment-dialog-composer-attachments-image-loading",5),P(8,"translate"),P(9,"translate"),w(10,"app-comment-dialog-composer-attachments-image-delete",6),P(11,"translate"),P(12,"translate"),b(),w(13,"app-comment-dialog-composer-attachments-image-preview",7),P(14,"translate"),P(15,"translate"),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),ue("loading",(n==null?null:n.uploadingAttachments)&&!e.isEditMode&&!(e.file!=null&&e.file.uploaded)),x("aria-label",M(2,24,"Image attachment:")+" "+M(3,26,(e.file==null?null:e.file.name)||"unnamed image"))("data-testid",e.componentId+"-selected-file"),m(3),x("aria-label",M(5,28,"Actions for image:")+" "+M(6,30,(e.file==null?null:e.file.name)||"unnamed image"))("data-testid",e.componentId+"-file-actions"),m(3),d("componentConfigSignal",e.componentConfigSignal)("file",e.file)("fileIndex",e.fileIndex)("isEditMode",e.isEditMode),x("aria-label",M(8,32,"Uploading image:")+" "+M(9,34,(e.file==null?null:e.file.name)||"unnamed image"))("data-testid",e.componentId+"-file-loading"),m(3),d("componentConfigSignal",e.componentConfigSignal)("file",e.file)("fileIndex",e.fileIndex)("isEditMode",e.isEditMode),x("aria-label",M(11,36,"Delete image:")+" "+M(12,38,(e.file==null?null:e.file.name)||"unnamed image"))("data-testid",e.componentId+"-file-delete"),m(3),d("componentConfigSignal",e.componentConfigSignal)("file",e.file)("fileIndex",e.fileIndex)("isEditMode",e.isEditMode),x("aria-label",M(14,40,"Preview of image:")+" "+M(15,42,(e.file==null?null:e.file.name)||"unnamed image"))("data-testid",e.componentId+"-file-preview")}}function RWe(i,o){if(i&1&&(f(0),u(1,kWe,16,44,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(6,MWe,e.template,pt(1,PWe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function NWe(i,o){if(i&1&&(f(0),u(1,RWe,2,12,"ng-container",0),v()),i&2){let n=l(2);m(),d("ngIf",n.isEditMode?n.file==null||n.file.mimeType==null?null:n.file.mimeType.includes("image"):n.file==null||n.file.fileType==null?null:n.file.fileType.includes("image"))}}function FWe(i,o){if(i&1&&(f(0),u(1,NWe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,AWe,n.conditionSignal(),pt(1,OWe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var RI=(()=>{let o=class o extends H{set _imageWireframe(e){this.imageWireframe=e,this.imageWireframe?this.template=this.domService.deepCloneElement(this.imageWireframe):this.template=null}constructor(e,t,r,a){super(t,r,a),this.domService=e,this.elementRef=t,this.dynamicDataService=r,this.loggingService=a,this.componentId="velt-comment-dialog-composer-attachments-image",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Image attachment controls")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsImageComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-image"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode",_imageWireframe:[0,"imageWireframe","_imageWireframe"]},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region",1,"velt-composer--selected-file"],["role","group",1,"velt-composer--selected-file-actions"],[3,"componentConfigSignal","file","fileIndex","isEditMode"],["role","button","tabindex","0",3,"componentConfigSignal","file","fileIndex","isEditMode"],["role","img",3,"componentConfigSignal","file","fileIndex","isEditMode"]],template:function(t,r){t&1&&u(0,FWe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-composer--selected-file[_ngcontent-%COMP%]{border-radius:var(--velt-border-radius-sm);overflow:hidden;line-height:0;position:relative;height:80px;width:93px;flex:0 0 30%}.velt-composer--selected-file[_ngcontent-%COMP%] .velt-composer--selected-file-actions[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background:color-mix(in srgb,var(--velt-surface-0) 32%,transparent);align-items:center;justify-content:center;display:none}.velt-composer--selected-file[_ngcontent-%COMP%]:hover .velt-composer--selected-file-actions[_ngcontent-%COMP%], .velt-composer--selected-file.loading[_ngcontent-%COMP%] .velt-composer--selected-file-actions[_ngcontent-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var LWe=(i,o,n)=>({componentConfigSignal:i,file:o,fileIndex:n}),BWe=(i,o)=>({condition:i,data:o}),VWe=(i,o,n)=>({componentConfigSignal:i,fileIndex:o,file:n}),UWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-invalid-item-preview-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function jWe(i,o){if(i&1&&(f(0),w(1,"img",3),v()),i&2){let n=l(3);m(),d("src",n.file==null?null:n.file.url,vn)}}function $We(i,o){if(i&1&&(f(0),u(1,jWe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,UWe,e.template,je(1,VWe,e.componentConfigSignal,e.fileIndex,e.file),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function HWe(i,o){if(i&1&&(f(0),u(1,$We,2,11,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(5,BWe,n.conditionSignal(),je(1,LWe,n.componentConfigSignal,n.file,n.fileIndex)))}}var NI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-invalid-item-preview",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemPreviewComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemPreviewComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemPreviewComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-invalid-item-preview"]],inputs:{file:"file",fileIndex:"fileIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["velt-ignore-change-detection","true","aria-hidden","true","role","img",3,"src"]],template:function(t,r){t&1&&u(0,HWe,2,8,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}img[_ngcontent-%COMP%]{width:100%;object-fit:cover;height:100%}"],changeDetection:0});let i=o;return i})();var zWe=(i,o,n)=>({componentConfigSignal:i,file:o,fileIndex:n}),GWe=(i,o)=>({condition:i,data:o}),WWe=(i,o,n)=>({componentConfigSignal:i,fileIndex:o,file:n}),qWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-invalid-item-message-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function YWe(i,o){if(i&1&&(f(0),_(1,"span",3),P(2,"translate"),P(3,"translate"),te(4),P(5,"translate"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId)("aria-label",M(2,3,"Error message:")+" "+M(3,5,n.file==null?null:n.file.errorMessage)),m(3),_e(" ",M(5,7,n.file==null?null:n.file.errorMessage)," ")}}function KWe(i,o){if(i&1&&(f(0),u(1,YWe,6,9,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,qWe,e.template,je(1,WWe,e.componentConfigSignal,e.fileIndex,e.file),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function ZWe(i,o){if(i&1&&(f(0),u(1,KWe,2,11,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(5,GWe,n.conditionSignal(),je(1,zWe,n.componentConfigSignal,n.file,n.fileIndex)))}}var FI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-invalid-item-message",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemMessageComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemMessageComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemMessageComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-invalid-item-message"]],inputs:{file:"file",fileIndex:"fileIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-composer--error-message"]],template:function(t,r){t&1&&u(0,ZWe,2,8,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-composer--error-message[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs);text-align:center;margin-top:var(--velt-spacing-xs);color:var(--velt-white)}"],changeDetection:0});let i=o;return i})();var Xde=(i,o,n)=>({componentConfigSignal:i,file:o,fileIndex:n}),XWe=(i,o)=>({condition:i,data:o}),QWe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-invalid-item-delete-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function JWe(i,o){i&1&&(f(0),le(),_(1,"svg",4),w(2,"path",5)(3,"path",6),b(),v())}function eqe(i,o){if(i&1){let n=Y();f(0),_(1,"button",2),P(2,"translate"),P(3,"translate"),P(4,"translate"),G("click",function(){N(n);let t=l().ngIf,r=l();return F(t==null?null:t.removeInvalidFile(r.fileIndex))}),u(5,JWe,4,0,"ng-container",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),d("title",M(2,4,"Remove File")),x("aria-label",M(3,6,"Remove invalid file:")+" "+M(4,8,(e.file==null?null:e.file.name)||"unnamed file"))("data-testid",e.componentId+"-button"),m(4),d("veltDynamicTemplate",$(14,QWe,e.template,je(10,Xde,e.componentConfigSignal,e.file,e.fileIndex),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function tqe(i,o){if(i&1&&(f(0),u(1,eqe,6,20,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(5,XWe,n.conditionSignal(),je(1,Xde,n.componentConfigSignal,n.file,n.fileIndex)))}}var LI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-invalid-item-delete",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemDeleteComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemDeleteComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemDeleteComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-invalid-item-delete"]],inputs:{file:"file",fileIndex:"fileIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[1,"velt-composer--icon-button",3,"click","title"],[4,"veltDynamicTemplate"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","currentColor","aria-hidden","true","role","img"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(t,r){t&1&&u(0,tqe,2,8,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-composer--icon-button[_ngcontent-%COMP%]{background:var(--velt-white);display:flex;align-items:center;border-radius:var(--velt-border-radius-3xl);width:40px;height:40px;justify-content:center;margin:var(--velt-spacing-xs);color:var(--velt-black)}"],changeDetection:0});let i=o;return i})();var Qde=(i,o,n)=>({componentConfigSignal:i,file:o,fileIndex:n}),nqe=(i,o)=>({condition:i,data:o}),iqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-invalid-item-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function oqe(i,o){if(i&1&&(f(0),_(1,"div",3),P(2,"translate"),P(3,"translate"),_(4,"div",4),P(5,"translate"),P(6,"translate"),w(7,"app-comment-dialog-composer-attachments-invalid-item-delete",5),b(),_(8,"div",6),P(9,"translate"),le(),_(10,"svg",7),w(11,"path",8),b(),ht(),w(12,"app-comment-dialog-composer-attachments-invalid-item-message",9),b(),w(13,"app-comment-dialog-composer-attachments-invalid-item-preview",10),P(14,"translate"),P(15,"translate"),b(),v()),i&2){let n=l(3);m(),x("aria-label",M(2,18,"Invalid file:")+" "+M(3,20,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId),m(3),x("aria-label",M(5,22,"Actions for invalid file:")+" "+M(6,24,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-file-actions"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex),x("aria-label","Remove invalid file: "+((n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-delete-file"),m(),x("aria-label","File error: "+M(9,26,(n.file==null?null:n.file.error)||"File cannot be uploaded"))("data-testid",n.componentId+"-error-message"),m(4),d("file",n.file)("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-error-message-text"),m(),d("componentConfigSignal",n.componentConfigSignal)("file",n.file),x("aria-label",M(14,28,"Preview of invalid file:")+" "+M(15,30,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-preview-file")}}function rqe(i,o){if(i&1&&(f(0),u(1,oqe,16,32,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,iqe,e.template,je(1,Qde,e.componentConfigSignal,e.file,e.fileIndex),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function aqe(i,o){if(i&1&&(f(0),u(1,rqe,2,11,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(5,nqe,n.conditionSignal(),je(1,Qde,n.componentConfigSignal,n.file,n.fileIndex)))}}var BI=(()=>{let o=class o extends H{set _itemWireframe(e){this.itemWireframe=e,this.itemWireframe?this.template=this.domService.deepCloneElement(this.itemWireframe):this.template=null}constructor(e,t,r,a){super(t,r,a),this.domService=e,this.elementRef=t,this.dynamicDataService=r,this.loggingService=a,this.componentId="velt-comment-dialog-composer-attachments-invalid-item",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Composer invalid attachment actions")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidItemComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-invalid-item"]],inputs:{file:"file",fileIndex:"fileIndex",_itemWireframe:[0,"itemWireframe","_itemWireframe"]},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region",1,"velt-composer--invalid-selected-file"],["role","group",1,"velt-composer--selected-file-actions"],["role","button","tabindex","0",3,"componentConfigSignal","file","fileIndex"],["role","alert","aria-live","polite",1,"velt-composer--error-message"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","currentColor","aria-hidden","true","role","img",1,"velt-composer--error-message-icon"],["d","M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"],[3,"file","componentConfigSignal"],["role","img",3,"componentConfigSignal","file"]],template:function(t,r){t&1&&u(0,aqe,2,8,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-composer--invalid-selected-file[_ngcontent-%COMP%]{border-radius:var(--velt-border-radius-sm);overflow:hidden;line-height:0;position:relative;height:72px;width:85px;flex:0 0 30%;border:4px solid var(--velt-error)}.velt-composer--invalid-selected-file[_ngcontent-%COMP%] .velt-composer--error-message[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%;background:color-mix(in srgb,var(--velt-surface-0) 52%,transparent);display:flex;flex-direction:column;padding:var(--velt-spacing-xs);align-items:center;justify-content:center;color:var(--velt-white);box-sizing:border-box;gap:var(--velt-spacing-md)}.velt-composer--invalid-selected-file[_ngcontent-%COMP%] .velt-composer--error-message[_ngcontent-%COMP%] .velt-composer--error-message-icon[_ngcontent-%COMP%]{height:24px;color:var(--velt-white)}.velt-composer--invalid-selected-file[_ngcontent-%COMP%] .velt-composer--selected-file-actions[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background:color-mix(in srgb,var(--velt-surface-0) 32%,transparent);align-items:center;justify-content:center;display:none}.velt-composer--invalid-selected-file[_ngcontent-%COMP%]:hover .velt-composer--selected-file-actions[_ngcontent-%COMP%], .velt-composer--invalid-selected-file.loading[_ngcontent-%COMP%] .velt-composer--selected-file-actions[_ngcontent-%COMP%]{display:flex}.velt-composer--invalid-selected-file[_ngcontent-%COMP%]:hover .velt-composer--error-message[_ngcontent-%COMP%]{display:none}"],changeDetection:0});let i=o;return i})();var Jde=i=>({componentConfigSignal:i}),sqe=(i,o)=>({condition:i,data:o}),lqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-invalid-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function cqe(i,o){if(i&1&&(_(0,"div",4),P(1,"translate"),P(2,"translate"),w(3,"app-comment-dialog-composer-attachments-invalid-item",5),b()),i&2){let n=o.$implicit,e=o.index,t=l(4);x("aria-label",M(1,6,"Invalid file")+" "+M(2,8,(n==null||n.file==null?null:n.file.name)||"unknown"))("data-testid",t.componentId+"-invalid-file-"+e),m(3),d("componentConfigSignal",t.componentConfigSignal)("file",n)("fileIndex",e)("itemWireframe",t.itemTemplate)}}function dqe(i,o){if(i&1&&(f(0),u(1,cqe,4,10,"div",3),v()),i&2){let n=l(2).ngIf;m(),d("ngForOf",n==null?null:n.invalidSelectedFiles)}}function mqe(i,o){if(i&1&&(f(0),u(1,dqe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,lqe,e.template,A(1,Jde,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function pqe(i,o){if(i&1&&(f(0),u(1,mqe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,sqe,n.conditionSignal(),A(1,Jde,n.componentConfigSignal)))}}var VI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-invalid",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{if(super.ngOnInit(),this.setupA11yAttributes(),!this.itemTemplate){let e=this.template?.querySelector("velt-comment-dialog-composer-attachments-invalid-item-wireframe");Ke(e)||(this.itemTemplate=e)}}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","list"),e.setAttribute("aria-label","List of invalid files")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsInvalidComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-invalid"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","listitem",4,"ngFor","ngForOf"],["role","listitem"],[3,"componentConfigSignal","file","fileIndex","itemWireframe"]],template:function(t,r){t&1&&u(0,pqe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-sm)}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var gqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),uqe=(i,o)=>({condition:i,data:o}),hqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),fqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-delete-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function vqe(i,o){i&1&&(f(0),le(),_(1,"svg",5),w(2,"path",6),b(),v())}function Cqe(i,o){if(i&1){let n=Y();_(0,"button",3),P(1,"translate"),P(2,"translate"),G("click",function(){N(n);let t=l(2).ngIf,r=l();return F(r.isEditMode?t==null?null:t.removeAttachmentFromComment(r.fileIndex):t==null?null:t.removeFile(r.fileIndex))}),u(3,vqe,3,0,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId+"-button")("aria-label",M(1,3,"Delete file")+" "+M(2,5,(e.file==null||e.file.file==null?null:e.file.file.name)||"unknown")),m(3),d("veltDynamicTemplate",$(12,fqe,e.template,pt(7,hqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function _qe(i,o){if(i&1&&(f(0),u(1,Cqe,4,18,"button",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(n!=null&&n.uploadingAttachments))}}function yqe(i,o){if(i&1&&(f(0),u(1,_qe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,uqe,n.conditionSignal(),pt(1,gqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var UI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-other-delete",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherDeleteComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherDeleteComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherDeleteComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other-delete"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-composer--attachment-icon-btn",3,"click",4,"ngIf"],[1,"velt-composer--attachment-icon-btn",3,"click"],[4,"veltDynamicTemplate"],["xmlns","http://www.w3.org/2000/svg","width","18","height","19","viewBox","0 0 18 19","fill","none","aria-hidden","true","role","img"],["d","M13.5 5L4.5 14M4.5 5L13.5 14","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,yqe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-composer--attachment-icon-btn[_ngcontent-%COMP%]{display:flex;background:transparent;border:0;padding:var(--velt-spacing-sm);cursor:pointer;color:var(--velt-error)}"],changeDetection:0});let i=o;return i})();var Sqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),bqe=(i,o)=>({condition:i,data:o}),Iqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),Eqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function xqe(i,o){if(i&1&&(f(0),_(1,"div",3),w(2,"velt-file-icon-internal",4),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId),m(),d("type",n.isEditMode?n.file==null?null:n.file.mimeType:n.file==null?null:n.file.fileType),x("data-testid",n.componentId+"-file-icon-internal")}}function Tqe(i,o){if(i&1&&(f(0),u(1,xqe,3,3,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,Eqe,e.template,pt(1,Iqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Dqe(i,o){if(i&1&&(f(0),u(1,Tqe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,bqe,n.conditionSignal(),pt(1,Sqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var jI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-other-icon",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other-icon"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-composer--attachment-icon"],[3,"type"]],template:function(t,r){t&1&&u(0,Dqe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-composer--attachment-icon[_ngcontent-%COMP%]{display:flex;color:var(--velt-accent)}"],changeDetection:0});let i=o;return i})();var wqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),Oqe=(i,o)=>({condition:i,data:o}),Aqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),Pqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-loading-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Mqe(i,o){if(i&1&&(f(0),le(),_(1,"svg",3)(2,"circle",4),w(3,"animateTransform",5),b()(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-svg")}}function kqe(i,o){if(i&1&&(f(0),u(1,Mqe,4,1,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(6,Pqe,e.template,pt(1,Aqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Rqe(i,o){if(i&1&&(f(0),u(1,kqe,2,12,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",!e.isEditMode&&(n==null?null:n.uploadingAttachments)&&!(e.file!=null&&e.file.uploaded))}}function Nqe(i,o){if(i&1&&(f(0),u(1,Rqe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,Oqe,n.conditionSignal(),pt(1,wqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var $I=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-other-loading",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherLoadingComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherLoadingComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherLoadingComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other-loading"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","32px","height","32px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid","aria-hidden","true","role","img",2,"margin","auto","display","block"],["cx","50","cy","50","fill","none","stroke","currentColor","stroke-width","7","r","34","stroke-dasharray","160.22122533307947 55.40707511102649"],["attributeName","transform","type","rotate","repeatCount","indefinite","dur","1s","values","0 50 50;360 50 50","keyTimes","0;1"]],template:function(t,r){t&1&&u(0,Nqe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}svg[_ngcontent-%COMP%]{color:var(--velt-accent)}"],changeDetection:0});let i=o;return i})();var Fqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),Lqe=(i,o)=>({condition:i,data:o}),Bqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),Vqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-name-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function Uqe(i,o){if(i&1&&(f(0),_(1,"span",3),P(2,"translate"),te(3),P(4,"translate"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId)("aria-label",n.isEditMode?n.file==null?null:n.file.name:M(2,3,n.file==null||n.file.file==null?null:n.file.file.name)),m(2),_e(" ",n.isEditMode?n.file==null?null:n.file.name:M(4,5,n.file==null||n.file.file==null?null:n.file.file.name)," ")}}function jqe(i,o){if(i&1&&(f(0),u(1,Uqe,5,7,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,Vqe,e.template,pt(1,Bqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function $qe(i,o){if(i&1&&(f(0),u(1,jqe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,Lqe,n.conditionSignal(),pt(1,Fqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var HI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-other-name",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherNameComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other-name"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-composer--attachment-name"]],template:function(t,r){t&1&&u(0,$qe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{line-height:normal}.velt-composer--attachment-name[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-3);text-overflow:ellipsis;font-size:var(--velt-font-size-xs);font-style:normal;font-weight:600;line-height:normal;white-space:nowrap}"],changeDetection:0});let i=o;return i})();var Hqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),zqe=(i,o)=>({condition:i,data:o}),Gqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),Wqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-size-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function qqe(i,o){if(i&1&&(f(0),_(1,"span",3),P(2,"fileSize"),te(3),P(4,"fileSize"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId)("aria-label",n.isEditMode?n.file==null?null:n.file.size:M(2,3,n.file==null||n.file.file==null?null:n.file.file.size)),m(2),_e(" ",n.isEditMode?n.file==null?null:n.file.size:M(4,5,n.file==null||n.file.file==null?null:n.file.file.size)," ")}}function Yqe(i,o){if(i&1&&(f(0),u(1,qqe,5,7,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,Wqe,e.template,pt(1,Gqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function Kqe(i,o){if(i&1&&(f(0),u(1,Yqe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,zqe,n.conditionSignal(),pt(1,Hqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var zI=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-attachments-other-size",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherSizeComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherSizeComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherSizeComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other-size"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-composer--attachment-size"]],template:function(t,r){t&1&&u(0,Kqe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{line-height:normal}.velt-composer--attachment-size[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-7);text-overflow:ellipsis;font-size:var(--velt-font-size-2xs);font-style:normal;font-weight:500;line-height:normal}"],changeDetection:0});let i=o;return i})();var Zqe=(i,o,n,e)=>({componentConfigSignal:i,file:o,fileIndex:n,isEditMode:e}),Xqe=(i,o)=>({condition:i,data:o}),Qqe=(i,o,n,e)=>({componentConfigSignal:i,fileIndex:o,file:n,isEditMode:e}),Jqe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-other-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function eYe(i,o){if(i&1&&(f(0),_(1,"div",3),P(2,"translate"),P(3,"translate"),w(4,"app-comment-dialog-composer-attachments-other-icon",4),P(5,"translate"),P(6,"translate"),_(7,"div",5),P(8,"translate"),P(9,"translate"),w(10,"app-comment-dialog-composer-attachments-other-name",6),P(11,"translate"),P(12,"translate"),w(13,"app-comment-dialog-composer-attachments-other-size",6),P(14,"translate"),P(15,"translate"),b(),w(16,"app-comment-dialog-composer-attachments-other-loading",7),P(17,"translate"),P(18,"translate"),_(19,"div",8),P(20,"translate"),P(21,"translate"),w(22,"app-comment-dialog-composer-attachments-other-delete",9),P(23,"translate"),P(24,"translate"),b()(),v()),i&2){let n=l(4);m(),x("aria-label",M(2,36,"File attachment:")+" "+M(3,38,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex)("isEditMode",n.isEditMode),x("aria-label",M(5,40,"File type icon for")+" "+M(6,42,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment-icon"),m(3),x("aria-label",M(8,44,"Details for file:")+" "+M(9,46,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment-details"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex)("isEditMode",n.isEditMode),x("aria-label",M(11,48,"Filename:")+" "+M(12,50,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment-name"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex)("isEditMode",n.isEditMode),x("aria-label",M(14,52,"File size:")+" "+M(15,54,(n.file==null?null:n.file.size)||"unknown size"))("data-testid",n.componentId+"-attachment-size"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex)("isEditMode",n.isEditMode),x("aria-label",M(17,56,"Uploading file:")+" "+M(18,58,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment-loading"),m(3),x("aria-label",M(20,60,"Actions for file:")+" "+M(21,62,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-attachment-actions"),m(3),d("componentConfigSignal",n.componentConfigSignal)("file",n.file)("fileIndex",n.fileIndex)("isEditMode",n.isEditMode),x("aria-label",M(23,64,"Remove file:")+" "+M(24,66,(n.file==null?null:n.file.name)||"unnamed file"))("data-testid",n.componentId+"-delete-attachment")}}function tYe(i,o){if(i&1&&(f(0),u(1,eYe,25,68,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(6,Jqe,e.template,pt(1,Qqe,e.componentConfigSignal,e.fileIndex,e.file,e.isEditMode),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function nYe(i,o){if(i&1&&(f(0),u(1,tYe,2,12,"ng-container",0),v()),i&2){let n=l(2);m(),d("ngIf",n.isEditMode?!(!(n.file==null||n.file.mimeType==null)&&n.file.mimeType.includes("image")):!(!(n.file==null||n.file.fileType==null)&&n.file.fileType.includes("image")))}}function iYe(i,o){if(i&1&&(f(0),u(1,nYe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,Xqe,n.conditionSignal(),pt(1,Zqe,n.componentConfigSignal,n.file,n.fileIndex,n.isEditMode)))}}var GI=(()=>{let o=class o extends H{set _otherWireframe(e){this.otherWireframe=e,this.otherWireframe?this.template=this.domService.deepCloneElement(this.otherWireframe):this.template=null}constructor(e,t,r,a){super(t,a,r),this.domService=e,this.elementRef=t,this.loggingService=r,this.dynamicDataService=a,this.componentId="velt-comment-dialog-composer-attachments-other",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef?.nativeElement,{componentConfigSignal:this.componentConfigSignal,file:this.file,fileIndex:this.fileIndex,isEditMode:this.isEditMode}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","File attachment controls")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsOtherComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-other"]],inputs:{file:"file",fileIndex:"fileIndex",isEditMode:"isEditMode",_otherWireframe:[0,"otherWireframe","_otherWireframe"]},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region",1,"velt-composer--other-attachment"],["role","img",3,"componentConfigSignal","file","fileIndex","isEditMode"],["role","group",1,"velt-composer--attachment-details"],[3,"componentConfigSignal","file","fileIndex","isEditMode"],["role","status","aria-live","polite",3,"componentConfigSignal","file","fileIndex","isEditMode"],["role","group",1,"velt-composer--attachment-actions"],["role","button","tabindex","0",3,"componentConfigSignal","file","fileIndex","isEditMode"]],template:function(t,r){t&1&&u(0,iYe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-composer--other-attachment[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-sm) var(--velt-spacing-xs) var(--velt-spacing-sm) var(--velt-spacing-md);justify-content:space-between;gap:var(--velt-spacing-sm);align-items:center;align-self:stretch;width:100%;border-radius:var(--velt-border-radius-sm);border:1px solid var(--velt-border-4);box-sizing:border-box}.velt-composer--other-attachment[_ngcontent-%COMP%] .velt-composer--attachment-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-xs);flex:1;overflow:hidden}.velt-composer--other-attachment[_ngcontent-%COMP%] .velt-composer--attachment-actions[_ngcontent-%COMP%]{display:flex;width:0;overflow:hidden}.velt-composer--other-attachment[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--velt-spacing-lg)}.velt-composer--other-attachment[_ngcontent-%COMP%]:hover .velt-composer--attachment-actions[_ngcontent-%COMP%]{width:auto}"],changeDetection:0});let i=o;return i})();var eme=i=>({componentConfigSignal:i}),oYe=(i,o)=>({condition:i,data:o}),rYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-selected-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function aYe(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-composer-attachments-other",7)(2,"app-comment-dialog-composer-attachments-image",8),v()),i&2){let n=o.$implicit,e=o.index,t=l(5);m(),d("componentConfigSignal",t.componentConfigSignal)("file",n)("fileIndex",e)("isEditMode",!0)("otherWireframe",t.otherTemplate),m(),d("componentConfigSignal",t.componentConfigSignal)("file",n)("fileIndex",e)("isEditMode",!0)("imageWireframe",t.imageTemplate)}}function sYe(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-composer-attachments-other",7)(2,"app-comment-dialog-composer-attachments-image",8),v()),i&2){let n=o.$implicit,e=o.index,t=l(5);m(),d("componentConfigSignal",t.componentConfigSignal)("file",n)("fileIndex",e)("isEditMode",!1)("otherWireframe",t.otherTemplate),m(),d("componentConfigSignal",t.componentConfigSignal)("file",n)("fileIndex",e)("isEditMode",!1)("imageWireframe",t.imageTemplate)}}function lYe(i,o){if(i&1&&(_(0,"div",4),P(1,"translate"),P(2,"translate"),u(3,aYe,3,10,"ng-container",5)(4,sYe,3,10,"ng-container",6),b()),i&2){let n=l(3).ngIf,e=l();x("aria-label",M(1,5,"Attached files")+" - "+(((n==null||n.editComment==null||n.editComment.attachments==null?null:n.editComment.attachments.length)||0)+((n==null||n.selectedFiles==null?null:n.selectedFiles.length)||0))+" "+M(2,7,"total attachments"))("data-testid",e.componentId+"-attachments-list"),m(3),d("ngForOf",n==null||n.editComment==null?null:n.editComment.attachments)("ngForTrackBy",n==null?null:n.trackByAttachmentId),m(),d("ngForOf",n==null?null:n.selectedFiles)}}function cYe(i,o){if(i&1&&(f(0),u(1,lYe,5,9,"div",3),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null||n.editComment==null||n.editComment.attachments==null?null:n.editComment.attachments.length)||(n==null||n.selectedFiles==null?null:n.selectedFiles.length))}}function dYe(i,o){if(i&1&&(f(0),u(1,cYe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,rYe,e.template,A(1,eme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function mYe(i,o){if(i&1&&(f(0),u(1,dYe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,oYe,n.conditionSignal(),A(1,eme,n.componentConfigSignal)))}}var WI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-composer-attachments-selected",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{if(super.ngOnInit(),this.setupA11yAttributes(),!this.imageTemplate){let e=this.template?.querySelector("velt-comment-dialog-composer-attachments-image-wireframe");Ke(e)||(this.imageTemplate=e)}if(!this.otherTemplate){let e=this.template?.querySelector("velt-comment-dialog-composer-attachments-other-wireframe");Ke(e)||(this.otherTemplate=e)}}catch{}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsSelectedComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","list"),e.setAttribute("aria-label","List of selected attachments")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsSelectedComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments-selected"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-comment-dialog-composer-attachments--selected","role","list",4,"ngIf"],["role","list",1,"velt-comment-dialog-composer-attachments--selected"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngFor","ngForOf"],[3,"componentConfigSignal","file","fileIndex","isEditMode","otherWireframe"],[3,"componentConfigSignal","file","fileIndex","isEditMode","imageWireframe"]],template:function(t,r){t&1&&u(0,mYe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-comment-dialog-composer-attachments--selected[_ngcontent-%COMP%]{width:100%;display:flex;flex-wrap:wrap;gap:var(--velt-spacing-sm);flex-direction:row;padding:var(--velt-spacing-xs);box-sizing:border-box}"],changeDetection:0});let i=o;return i})();var tme=i=>({componentConfigSignal:i}),pYe=(i,o)=>({condition:i,data:o}),gYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-attachments-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function uYe(i,o){if(i&1&&(f(0),_(1,"div",3),P(2,"translate"),P(3,"translate"),P(4,"translate"),w(5,"app-comment-dialog-composer-attachments-selected",4)(6,"app-comment-dialog-composer-attachments-invalid",4),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),x("aria-label",M(2,4,"File attachments")+" - "+((n==null||n.selectedFiles==null?null:n.selectedFiles.length)||0)+" "+M(3,6,"valid")+", "+((n==null||n.invalidSelectedFiles==null?null:n.invalidSelectedFiles.length)||0)+" "+M(4,8,"invalid files"))("data-testid",e.componentId),m(4),d("componentConfigSignal",e.componentConfigSignal),m(),d("componentConfigSignal",e.componentConfigSignal)}}function hYe(i,o){if(i&1&&(f(0),u(1,uYe,7,10,"ng-container",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,gYe,e.template,A(1,tme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function fYe(i,o){if(i&1&&(f(0),u(1,hYe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.editComment)||(n==null||n.selectedFiles==null?null:n.selectedFiles.length)||(n==null||n.invalidSelectedFiles==null?null:n.invalidSelectedFiles.length))}}function vYe(i,o){if(i&1&&(f(0),u(1,fYe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,pYe,n.conditionSignal(),A(1,tme,n.componentConfigSignal)))}}var qI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-composer-attachments",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Attachments section")}catch(e){this.loggingService.catch("Error in CommentDialogComposerAttachmentsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-attachments"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["role","region",1,"velt-composer--attachments"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,vYe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-composer--attachments[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;width:100%;gap:var(--velt-spacing-sm);flex-direction:row}"],changeDetection:0});let i=o;return i})();var CYe=["newCommentTextArea"],_Ye=["editCommentTextArea"],yYe=["userSelector"],nme=i=>({componentConfigSignal:i}),SYe=(i,o)=>({condition:i,data:o}),bYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-input-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function IYe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-panel-internal",11,1),G("userContactOptionSelected",function(t){N(n),l();let r=de(4),a=l(3).ngIf;return F(a==null?null:a.userContactSelected(t,r))})("customOptionSelected",function(t){N(n),l();let r=de(4),a=l(3).ngIf;return F(a==null?null:a.autocompleteItemSelected(t,r))})("groupOptionSelected",function(t){N(n),l();let r=de(4),a=l(3).ngIf;return F(a==null?null:a.groupSelected(t,r))})("atHereSelected",function(t){N(n),l();let r=de(4),a=l(3).ngIf;return F(a==null?null:a.atHereSelected(t,r))})("enterPressed",function(){N(n);let t=l(5);return F(t.onEnterPressInAutocompletePanel())})("autocompleteStateChanged",function(t){N(n);let r=l(5);return F(r.onAutocompleteStateChanged(t))}),b()}if(i&2){l();let n=de(5),e=l(3).ngIf;d("darkMode",!!(e!=null&&e.darkMode))("hideInput",!0)("showAtHere",!0)("metadata",e==null||e.annotation==null?null:e.annotation.metadata)("autocompletePanelTrigger",n)("type","generic")("autocompletePanelPosition",e!=null&&e.bottomSheetMode?"above":"auto")}}function EYe(i,o){if(i&1){let n=Y();_(0,"div",7),P(1,"translate"),G("click",function(t){N(n);let r=l(3).ngIf;return r==null||r.onComposerClick(),F(t.stopPropagation())}),_(2,"div",8)(3,"div",9,0),P(6,"translate"),G("afterViewInit",function(){N(n);let t=l(4);return F(t.setNewCommentTextArea())})("input",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.onCommentInput(t))})("paste",function(t){N(n);let r=l(3).ngIf;return r==null||r.onPaste(t),F(t.preventDefault())})("keypress",function(t){return N(n),F(t.stopPropagation())})("keyup",function(t){N(n);let r=l(3).ngIf;return t.stopPropagation(),F(r==null?null:r.onEscapeKeyPressed(t))})("keydown",function(t){N(n);let r=l(4);return t.stopPropagation(),F(r.onKeyPressedAddComment(t))})("keydown.escape",function(t){N(n);let r=l(4);return r.onEscapeKeyPressed(t,r.userSelector),F(t.stopPropagation())})("keydown.backspace",function(){N(n);let t=de(4),r=l(3).ngIf;return F(!(t!=null&&t.innerText)&&(r!=null&&r.deleteOnBackspace)?r==null?null:r.deleteCommentPinAnnotations("keydownBackspace"):null)})("keydown.delete",function(){N(n);let t=de(4),r=l(3).ngIf;return F(t!=null&&t.innerText||r==null?null:r.deleteCommentPinAnnotations("keydownDelete"))})("copy",function(t){return N(n),F(t.stopPropagation())})("dragover",function(t){return N(n),F(t.preventDefault())})("dragenter",function(t){return N(n),F(t.preventDefault())})("drop",function(t){N(n);let r=l(3).ngIf;return r==null||r.onDrop(t),F(t.preventDefault())})("click",function(){N(n);let t=l(4);return F(t.onCombinedClick())}),b()(),u(7,IYe,2,7,"velt-autocomplete-panel-internal",10),b()}if(i&2){let n=l(3).ngIf,e=l();x("aria-label",M(1,6,"New comment composer"))("data-testid",e.componentId+"-section"),m(3),d("matAutocompleteDisabled",!(n!=null&&n.userMentions)),x("data-testid",e.componentId+"-new-textarea")("placeholder",M(6,8,e.newCommentPlaceholder)),m(4),d("ngIf",n==null?null:n.userMentions)}}function xYe(i,o){if(i&1){let n=Y();_(0,"velt-autocomplete-panel-internal",11,1),G("userContactOptionSelected",function(t){N(n),l();let r=de(4),a=l(4).ngIf;return F(a==null?null:a.userContactSelected(t,r))})("customOptionSelected",function(t){N(n),l();let r=de(4),a=l(4).ngIf;return F(a==null?null:a.autocompleteItemSelected(t,r))})("groupOptionSelected",function(t){N(n),l();let r=de(4),a=l(4).ngIf;return F(a==null?null:a.groupSelected(t,r))})("atHereSelected",function(t){N(n),l();let r=de(4),a=l(4).ngIf;return F(a==null?null:a.atHereSelected(t,r))})("enterPressed",function(){N(n);let t=l(6);return F(t.onEnterPressInAutocompletePanel())})("autocompleteStateChanged",function(t){N(n);let r=l(6);return F(r.onAutocompleteStateChanged(t))}),b()}if(i&2){l();let n=de(5),e=l(4).ngIf;d("darkMode",!!(e!=null&&e.darkMode))("hideInput",!0)("showAtHere",!0)("metadata",e==null||e.annotation==null?null:e.annotation.metadata)("autocompletePanelTrigger",n)("type","generic")("autocompletePanelPosition",e!=null&&e.bottomSheetMode?"above":"auto")}}function TYe(i,o){if(i&1){let n=Y();_(0,"div",7),P(1,"translate"),G("click",function(t){return N(n),F(t.stopPropagation())}),_(2,"div",8)(3,"div",12,2),P(6,"translate"),G("afterViewInit",function(){N(n);let t=l(5);return F(t.setEditCommentTextArea())})("input",function(t){N(n);let r=l(4).ngIf;return F(r==null?null:r.onCommentInput(t))})("paste",function(t){N(n);let r=l(4).ngIf;return r==null||r.onPaste(t),F(t.preventDefault())})("keypress",function(t){return N(n),F(t.stopPropagation())})("keyup",function(t){return N(n),F(t.stopPropagation())})("keydown",function(t){N(n);let r=de(4),a=l(5);return t.stopPropagation(),F(a.onKeyPressedUpdateComment(t,a.i,r.innerText))})("keydown.backspace",function(){N(n);let t=de(4),r=l(4).ngIf;return F(!(t!=null&&t.innerText)&&(r!=null&&r.deleteOnBackspace)?r==null?null:r.deleteCommentPinAnnotations("keydownBackspace"):null)})("keydown.delete",function(){N(n);let t=de(4),r=l(4).ngIf;return F(t!=null&&t.innerText||r==null?null:r.deleteCommentPinAnnotations("keydownEscape"))})("keydown.escape",function(t){N(n);let r=l(4).ngIf,a=l();return a.onEscapeKeyPressed(t,a.userSelector)||(r==null||r.cancelUpdate()),F(t.stopPropagation())})("copy",function(t){return N(n),F(t.stopPropagation())})("dragover",function(t){return N(n),F(t.preventDefault())})("dragenter",function(t){return N(n),F(t.preventDefault())})("drop",function(t){N(n);let r=l(4).ngIf;return r==null||r.onDrop(t),F(t.preventDefault())})("click",function(){N(n);let t=l(5);return F(t.onInputClick())}),b(),u(7,xYe,2,7,"velt-autocomplete-panel-internal",10),b()()}if(i&2){let n=l(4).ngIf,e=l();x("aria-label",M(1,6,"Edit comment composer"))("data-testid",e.componentId+"-edit-section"),m(3),d("matAutocompleteDisabled",!(n!=null&&n.userMentions)),x("data-testid",e.componentId+"-edit-textarea")("placeholder",M(6,8,e.editCommentPlaceholder)),m(4),d("ngIf",n==null?null:n.userMentions)}}function DYe(i,o){if(i&1&&(f(0),u(1,TYe,8,10,"div",6),v()),i&2){let n=l(3).ngIf;m(),d("ngIf",!(n!=null&&n.recorderInitConfig&&(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.panelId)===(n==null?null:n.commentDialogUniqueId)))}}function wYe(i,o){if(i&1&&(f(0),u(1,EYe,8,10,"div",6)(2,DYe,2,1,"ng-container",3),v()),i&2){let n=l(2).ngIf,e=l();m(),d("ngIf",!e.editMode&&!(n!=null&&n.recorderInitConfig&&(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.panelId)===(n==null?null:n.commentDialogUniqueId))),m(),d("ngIf",e.editMode&&e.commentObj)}}function OYe(i,o){if(i&1&&(f(0),u(1,wYe,3,2,"ng-container",5),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,bYe,e.template,A(1,nme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function AYe(i,o){if(i&1&&(f(0),u(1,OYe,2,9,"ng-container",4),v()),i&2){let n=l();m(),d("veltIf",k(3,SYe,n.conditionSignal(),A(1,nme,n.componentConfigSignal)))}}var YI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.renderer=t,this.elementRef=r,this.dynamicDataService=a,this.editMode=!1,this.allowKeydown=!0,this.newCommentPlaceholder="",this.editCommentPlaceholder="",this.componentId="velt-comment-dialog-composer-input",super.initializeComponentConfigSignal(new ke),No(()=>{this.componentConfigSignal()&&this.calculatePlaceholders()})}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.calculatePlaceholders()}catch(e){this.loggingService.catch("Error in CommentDialogComposerInputComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerInputComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogComposerInputComponent setupA11yAttributes:",e)}}calculatePlaceholders(){try{let e=this.componentConfigSignal();this.placeholder?(this.newCommentPlaceholder=this.placeholder,this.editCommentPlaceholder=this.placeholder):(e?.userMentions?e?.annotation?.comments?.length===0?(this.newCommentPlaceholder="Comment or add others with @",this.editCommentPlaceholder="Edit your comment..."):(this.newCommentPlaceholder="Reply or add others with @",this.editCommentPlaceholder="Edit your reply..."):e?.annotation?.comments?.length===0?(this.newCommentPlaceholder="Write a comment...",this.editCommentPlaceholder="Edit your comment..."):(this.newCommentPlaceholder="Write a reply...",this.editCommentPlaceholder="Edit your reply..."),(this.commentplaceholder||e?.commentplaceholder)&&e?.annotation?.comments?.length===0&&(this.newCommentPlaceholder=this.commentplaceholder||e?.commentplaceholder||this.newCommentPlaceholder,this.editCommentPlaceholder=this.commentplaceholder||e?.commentplaceholder||this.editCommentPlaceholder),(this.replyplaceholder||e?.replyplaceholder)&&e?.annotation?.comments?.length>0&&(this.newCommentPlaceholder=this.replyplaceholder||e?.replyplaceholder||this.newCommentPlaceholder,this.editCommentPlaceholder=this.replyplaceholder||e?.replyplaceholder||this.editCommentPlaceholder))}catch(e){this.loggingService.catch("Error in CommentDialogComposerInputComponent calculatePlaceholders:",e)}}ngAfterViewInit(){try{this.setNewCommentTextArea(),this.setEditCommentTextArea()}catch(e){this.catchError("Error in CommentDialogComposerInputComponent ngAfterViewInit: ",e)}}setNewCommentTextArea(){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: setNewCommentTextArea","color: green;"),setTimeout(()=>{this.componentConfigSignal()&&this.componentConfigSignal.update(e=>(e=T(I({},e),{newCommentTextArea:this.newCommentTextArea}),e))})}catch(e){this.catchError("Error in CommentDialogComposerInputComponent setNewCommentTextArea: ",e)}}setEditCommentTextArea(){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: setEditCommentTextArea","color: green;"),setTimeout(()=>{this.componentConfigSignal()&&this.componentConfigSignal.update(e=>(e=T(I({},e),{editCommentTextArea:this.editCommentTextArea}),e))})}catch(e){this.catchError("Error in CommentDialogComposerInputComponent setEditCommentTextArea: ",e)}}onKeyPressedAddComment(e){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onKeyPressedAddComment","color: green;"),this.allowKeydown?this.componentConfigSignal()?.onKeyPressedAddComment(e):this.allowKeydown=!0}catch(t){this.catchError("Error in CommentDialogComposerInputComponent onKeyPressedAddComment: ",t)}}onKeyPressedUpdateComment(e,t,r){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onKeyPressedUpdateComment","color: green;"),this.allowKeydown?this.componentConfigSignal()?.onKeyPressedUpdateComment(e,t,r):this.allowKeydown=!0}catch(a){this.catchError("Error in CommentDialogComposerInputComponent onKeyPressedUpdateComment: ",a)}}onEnterPressInAutocompletePanel(){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onEnterPressInAutocompletePanel","color: green;"),this.componentConfigSignal()?.enterKeyToSubmit&&(this.allowKeydown=!1)}catch(e){this.catchError("Error in CommentDialogComposerInputComponent onEnterPressInAutocompletePanel: ",e)}}onEscapeKeyPressed(e,t){try{if(this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onEscapeKeyPressed","color: green;"),t?.trigger?.panelOpen||t?.matAutocompleteTrigger?.panelOpen){t.closePanel();let s=e.target;if(s&&s.hasAttribute("contenteditable")){let c=["@","#","$"];if(Mv(s,c)){let g=window.getSelection();if(g&&g.rangeCount>0){let C=g.getRangeAt(0),E=C.startOffset,D=C.commonAncestorContainer?.textContent||"",L=-1;for(let z of c){let W=D.lastIndexOf(z,E);W>L&&(L=W)}L!==-1&&t.disableAutocompleteAtPosition(L)}}}return!0}return!1}catch(r){return this.catchError("Error in CommentDialogComposerInputComponent onEscapeKeyPressed: ",r),!1}}onInputClick(){this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onInputClick","color: green;");try{this.componentConfigSignal.update(e=>(e=T(I({},e),{composerInOpenState:!0}),e)),this.componentConfigSignal()?.composerInOpenState&&setTimeout(()=>{this.componentConfigSignal().updateOverlayPositionEmit()},300)}catch(e){this.catchError("Error in CommentDialogComposerInputComponent onInputClick: ",e)}}onCombinedClick(){this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onCombinedClick","color: green;");try{this.componentConfigSignal()&&this.componentConfigSignal.update(e=>(e=T(I({},e),{showCommentButtons:!0}),e)),this.onInputClick()}catch(e){this.catchError("Error in CommentDialogComposerInputComponent onCombinedClick: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}onFocus(e){this.newCommentTextArea&&this.newCommentTextArea?.nativeElement.contains(e.target)&&this.componentConfigSignal.update(t=>(t=T(I({},t),{isInputFocused:!0}),t)),this.editCommentTextArea&&this.editCommentTextArea?.nativeElement.contains(e.target)&&this.componentConfigSignal.update(t=>(t=T(I({},t),{isInputFocused:!0}),t))}onBlur(e){this.newCommentTextArea&&this.newCommentTextArea?.nativeElement.contains(e.target)&&this.componentConfigSignal.update(t=>(t=T(I({},t),{isInputFocused:!1}),t)),this.editCommentTextArea&&this.editCommentTextArea?.nativeElement.contains(e.target)&&this.componentConfigSignal.update(t=>(t=T(I({},t),{isInputFocused:!1}),t))}onAutocompleteStateChanged(e){try{this.loggingService.log("%c[WB] Calling CommentDialogComposerInputComponent FUNCTION: onAutocompleteStateChanged","color: green;"),this.componentConfigSignal.update(t=>(t=T(I({},t),{isAutocompleteDropdownOpen:e}),t))}catch(t){this.catchError("Error in CommentDialogComposerInputComponent onAutocompleteStateChanged: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(eo),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-input"]],viewQuery:function(t,r){if(t&1&&(nt(CYe,5),nt(_Ye,5),nt(yYe,5)),t&2){let a;Xe(a=Qe())&&(r.newCommentTextArea=a.first),Xe(a=Qe())&&(r.editCommentTextArea=a.first),Xe(a=Qe())&&(r.userSelector=a.first)}},hostBindings:function(t,r){t&1&&G("focusin",function(s){return r.onFocus(s)})("focusout",function(s){return r.onBlur(s)})},inputs:{editMode:"editMode",commentObj:"commentObj",i:"i",placeholder:"placeholder",commentplaceholder:"commentplaceholder",replyplaceholder:"replyplaceholder"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["newCommentTextArea","","snippylyUserSelectorTrigger","snippylyUserSelectorTrigger"],["userSelector",""],["editCommentTextArea","","snippylyUserSelectorTrigger","snippylyUserSelectorTrigger"],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-composer-input","role","region",3,"click",4,"ngIf"],["role","region",1,"velt-composer-input",3,"click"],[1,"velt-composer-input--container"],["role","textbox","contenteditable","","veltAfterViewInit","","veltAutocomplete","",1,"velt-composer-input--message",3,"afterViewInit","input","paste","keypress","keyup","keydown","keydown.escape","keydown.backspace","keydown.delete","copy","dragover","dragenter","drop","click","matAutocompleteDisabled"],[3,"darkMode","hideInput","showAtHere","metadata","autocompletePanelTrigger","type","autocompletePanelPosition","userContactOptionSelected","customOptionSelected","groupOptionSelected","atHereSelected","enterPressed","autocompleteStateChanged",4,"ngIf"],[3,"userContactOptionSelected","customOptionSelected","groupOptionSelected","atHereSelected","enterPressed","autocompleteStateChanged","darkMode","hideInput","showAtHere","metadata","autocompletePanelTrigger","type","autocompletePanelPosition"],["role","textbox","contenteditable","","veltAfterViewInit","","veltAutocomplete","",1,"velt-composer-input--message",3,"afterViewInit","input","paste","keypress","keyup","keydown","keydown.backspace","keydown.delete","keydown.escape","copy","dragover","dragenter","drop","click","matAutocompleteDisabled"]],template:function(t,r){t&1&&u(0,AYe,2,6,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%;display:flex}[_nghost-%COMP%]:empty{display:none}.velt-composer-input[_ngcontent-%COMP%]{position:relative;overflow:auto;width:100%;max-height:10em}.velt-composer-input--container[_ngcontent-%COMP%]{width:100%;display:flex;gap:2rem}.velt-composer-input--container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{display:none}.velt-composer-input--message[_ngcontent-%COMP%]{resize:vertical;padding:var(--velt-spacing-sm);outline:0;border:0;color:var(--velt-text-3);width:100%;box-sizing:border-box}.velt-composer-input--message[_ngcontent-%COMP%]:empty:before{color:var(--velt-text-8);content:attr(placeholder);display:block;pointer-events:none}*[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}*[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}"],changeDetection:0});let i=o;return i})();var ime=i=>({componentConfigSignal:i}),PYe=(i,o)=>({condition:i,data:o}),MYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-recordings-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function kYe(i,o){if(i&1){let n=Y();f(0),_(1,"snippyly-recorder-player-internal",5),P(2,"translate"),P(3,"translate"),G("onDelete",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.onDeleteRecorderAnnotation(t))}),b(),v()}if(i&2){let n=o.$implicit,e=l(3).ngIf,t=l();m(),d("isEditMode",!0)("showSummary",!!(e!=null&&e.recordingSummaryEnabled))("darkMode",!!(e!=null&&e.darkMode))("recorderId",n==null?null:n.id)("shadowDom",(e==null?null:e.dialogShadowDOM)!==!1)("playVideoInFullScreen",e==null?null:e.playVideoInFullScreen),x("aria-label",M(2,8,"Screen recording")+" "+M(3,10,(n==null?null:n.id)||"unnamed"))("data-testid",t.componentId+"-recorder-"+(n==null?null:n.id))}}function RYe(i,o){if(i&1){let n=Y();f(0),u(1,kYe,4,12,"ng-container",3),_(2,"snippyly-recorder-control-panel-internal",4),P(3,"translate"),G("onRecordedData",function(t){N(n);let r=l(2).ngIf;return F(r==null?null:r.onRecordedData(t))}),b(),v()}if(i&2){let n=l(2).ngIf,e=l();m(),d("ngForOf",n==null?null:n.localRecordedData)("ngForTrackBy",n==null?null:n.trackByRecorderId),m(),d("panelId",n==null?null:n.commentDialogUniqueId)("darkMode",!!(n!=null&&n.darkMode)),x("aria-label",M(3,6,"Screen recording controls"))("data-testid",e.componentId+"-control-panel")}}function NYe(i,o){if(i&1&&(f(0),u(1,RYe,4,8,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,MYe,e.template,A(1,ime,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function FYe(i,o){if(i&1&&(f(0),u(1,NYe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,PYe,n.conditionSignal(),A(1,ime,n.componentConfigSignal)))}}var KI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-recordings",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerRecordingsComponent ngOnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerRecordingsComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Recordings section")}catch(e){this.loggingService.catch("Error in CommentDialogComposerRecordingsComponent setupA11yAttributes: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-recordings"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngFor","ngForOf","ngForTrackBy"],["mode","thread","sourceFeature","comment","role","group",3,"onRecordedData","panelId","darkMode"],["mode","thread","sourceFeature","comment","role","group",3,"onDelete","isEditMode","showSummary","darkMode","recorderId","shadowDom","playVideoInFullScreen"]],template:function(t,r){t&1&&u(0,FYe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%;display:flex;flex-direction:column;gap:var(--velt-spacing-lg)}[_nghost-%COMP%]:empty{display:none}snippyly-recorder-control-panel-internal[_ngcontent-%COMP%]{width:100%}snippyly-recorder-player-internal[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});let i=o;return i})();var LYe=i=>({componentConfigSignal:i}),BYe=(i,o)=>({condition:i,data:o}),VYe=(i,o,n,e,t)=>({componentConfigSignal:i,editMode:o,commentObj:n,i:e,wireframe:t}),UYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-composer-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function jYe(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-composer-avatar",6),v()),i&2){let n=l(6);m(),d("componentConfigSignal",n.componentConfigSignal)}}function $Ye(i,o){if(i&1&&w(0,"app-comment-dialog-composer-action-button",13),i&2){let n=l(7);d("type","submit")("componentConfigSignal",n.componentConfigSignal)("editMode",n.editMode)("commentObj",n.commentObj)("i",n.i)}}function HYe(i,o){if(i&1&&(_(0,"div",10),w(1,"app-comment-dialog-composer-input",11),u(2,$Ye,1,5,"app-comment-dialog-composer-action-button",12),b()),i&2){let n=l(5).ngIf,e=l();m(),d("componentConfigSignal",e.componentConfigSignal)("editMode",e.editMode)("commentObj",e.commentObj)("i",e.i),m(),d("ngIf",n.composerMode==="default"&&!n.composerInOpenState)}}function zYe(i,o){i&1&&w(0,"div",18)}function GYe(i,o){if(i&1&&(f(0),u(1,zYe,1,0,"div",14),_(2,"div",15),w(3,"app-comment-dialog-composer-action-button",13)(4,"app-comment-dialog-composer-action-button",16)(5,"app-comment-dialog-composer-action-button",16)(6,"app-comment-dialog-composer-action-button",16)(7,"app-comment-dialog-composer-action-button",16)(8,"div",17)(9,"app-comment-dialog-composer-action-button",13),b(),v()),i&2){let n=l(5).ngIf,e=l();m(),d("ngIf",!(n!=null&&n.recorderInitConfig&&(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.panelId)===(n==null?null:n.commentDialogUniqueId)&&(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.type)==="screen")),m(2),d("type","autocomplete")("componentConfigSignal",e.componentConfigSignal)("editMode",e.editMode)("commentObj",e.commentObj)("i",e.i),m(),d("type","attachments")("componentConfigSignal",e.componentConfigSignal),m(),d("type","audio")("componentConfigSignal",e.componentConfigSignal),m(),d("type","video")("componentConfigSignal",e.componentConfigSignal),m(),d("type","screen")("componentConfigSignal",e.componentConfigSignal),m(2),d("type","submit")("componentConfigSignal",e.componentConfigSignal)("editMode",e.editMode)("commentObj",e.commentObj)("i",e.i)}}function WYe(i,o){if(i&1&&(f(0),_(1,"div"),u(2,jYe,2,1,"ng-container",0),_(3,"div",5),w(4,"app-comment-dialog-composer-private-badge",6)(5,"app-comment-dialog-composer-attachments",7)(6,"app-comment-dialog-composer-recordings",6)(7,"app-comment-dialog-custom-annotation-dropdown",8),u(8,HYe,3,5,"div",9)(9,GYe,10,19,"ng-container",0),b()(),w(10,"app-comment-dialog-composer-assign-user",6),v()),i&2){let n=l(4).ngIf,e=l();m(),ue("velt-composer--inline-comment-section-mode",n.inlineCommentSectionMode)("velt-composer--multi-thread-mode",n.multiThread)("velt-composer--comment-composer-mode",n.commentComposerMode),m(),d("ngIf",n.inlineCommentSectionMode),m(2),d("componentConfigSignal",e.componentConfigSignal),m(),d("wireframe",e.wireframe)("componentConfigSignal",e.componentConfigSignal),m(),d("componentConfigSignal",e.componentConfigSignal),m(),d("componentConfigSignal",e.componentConfigSignal),m(),d("ngIf",!(n!=null&&n.recorderInitConfig&&(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.panelId)===(n==null?null:n.commentDialogUniqueId))),m(),d("ngIf",n.composerMode!=="default"||n.composerMode==="default"&&n.composerInOpenState),m(),d("componentConfigSignal",e.componentConfigSignal)}}function qYe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),P(2,"translate"),G("click",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.focusOnComposerInput())}),u(3,WYe,11,15,"ng-container",4),b()}if(i&2){let n=l(3).ngIf,e=l();ue("velt-comment-dialog-composer--no-comments",!(!(n==null||n.annotation==null||n.annotation.comments==null)&&n.annotation.comments.length))("velt-comment-dialog-composer--inline",n.inlineCommentSectionMode)("velt-comment-dialog-composer--top",n.composerPosition==="top")("velt-comment-dialog-composer--recording",(n==null||n.recorderInitConfig==null?null:n.recorderInitConfig.panelId)===(n==null?null:n.commentDialogUniqueId))("velt-composer-edit-mode",e.editMode)("velt-composer-open",n.composerInOpenState)("velt-composer-input-focused",n.isInputFocused),x("aria-label",e.editMode?M(1,17,"Edit comment section"):M(2,19,"Add new comment section"))("data-testid",e.componentId+"-section"),m(3),d("veltDynamicTemplate",$(27,UYe,e.template,$(21,VYe,e.componentConfigSignal,e.editMode,e.commentObj,e.i,e.wireframe),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function YYe(i,o){if(i&1&&(f(0),u(1,qYe,4,33,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("ngIf",!(n!=null&&n.disabled)&&!!(n!=null&&n.editComment)===e.editMode&&(n==null?null:n.isKnownUser)&&(!(!(n==null||n.annotation==null||n.annotation.comments==null)&&n.annotation.comments.length)||(n==null?null:n.commentDialogSelected))&&!(n!=null&&n.isPlanExpired))}}function KYe(i,o){if(i&1&&(f(0),u(1,YYe,2,1,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(!(n==null||n.annotation==null||n.annotation.comments==null)&&n.annotation.comments.length)||!(n!=null&&n.inlineCommentMode))}}function ZYe(i,o){if(i&1&&(f(0),u(1,KYe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,BYe,n.conditionSignal(),A(1,LYe,n.componentConfigSignal)))}}var bh=(()=>{let o=class o extends H{get composerWireframe(){return this._composerWireframe}set composerWireframe(e){this._composerWireframe=e,this.composerWireframe&&this.composerWireframe?.children?.length>0?this.template=this.domService.deepCloneElement(this.composerWireframe):this.template=null}onClick(e){try{e.stopPropagation(),e.preventDefault()}catch(t){this.loggingService.catch("Error in CommentDialogComposerComponent onClick:",t)}}constructor(e,t,r,a){super(r,a,t),this.domService=e,this.loggingService=t,this.elementRef=r,this.dynamicDataService=a,this.editMode=!1,this.componentId="velt-comment-dialog-composer",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Comment composer section")}catch(e){this.loggingService.catch("Error in CommentDialogComposerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer"]],hostBindings:function(t,r){t&1&&G("click",function(s){return r.onClick(s)})},inputs:{editMode:"editMode",commentObj:"commentObj",i:"i",composerWireframe:"composerWireframe"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-comment-dialog-composer","role","region",3,"velt-comment-dialog-composer--no-comments","velt-comment-dialog-composer--inline","velt-comment-dialog-composer--top","velt-comment-dialog-composer--recording","velt-composer-edit-mode","velt-composer-open","velt-composer-input-focused","click",4,"ngIf"],["role","region",1,"velt-comment-dialog-composer",3,"click"],[4,"veltDynamicTemplate"],[1,"velt-composer--reply-div","velt-composer--input-text-wrap"],[3,"componentConfigSignal"],[3,"wireframe","componentConfigSignal"],["type","composer",3,"componentConfigSignal"],["style","display: flex; width: 100%;",4,"ngIf"],[2,"display","flex","width","100%"],[3,"componentConfigSignal","editMode","commentObj","i"],[3,"type","componentConfigSignal","editMode","commentObj","i",4,"ngIf"],[3,"type","componentConfigSignal","editMode","commentObj","i"],["class","velt-composer--line-div",4,"ngIf"],[1,"velt-composer--actions-wrap"],[3,"type","componentConfigSignal"],[1,"velt-composer--flex-fill"],[1,"velt-composer--line-div"]],template:function(t,r){t&1&&u(0,ZYe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%;display:flex}[_nghost-%COMP%]:empty{display:none}.velt-comment-dialog-composer[_ngcontent-%COMP%]{width:100%;box-sizing:border-box}.velt-composer--reply-div[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:100%;border-radius:var(--velt-border-radius-md);background-color:var(--velt-background-0);border:1px solid var(--velt-border-4);box-sizing:border-box;position:relative;padding:var(--velt-spacing-sm);transition:.5s}.velt-composer--inline-comment-section-mode[_ngcontent-%COMP%]{display:flex;gap:var(--velt-spacing-sm);width:100%}.velt-composer--inline-comment-section-mode[_ngcontent-%COMP%] app-comment-dialog-composer-avatar[_ngcontent-%COMP%]{display:none}.velt-composer--inline-comment-section-mode[_ngcontent-%COMP%] .velt-composer--input-text-wrap[_ngcontent-%COMP%]{border:0px;padding:0}.velt-comment-dialog-composer--no-comments[_ngcontent-%COMP%] .velt-composer--inline-comment-section-mode[_ngcontent-%COMP%] app-comment-dialog-composer-avatar[_ngcontent-%COMP%]{margin-top:2px;display:block}[_nghost-%COMP%] .velt-comment-dialog-composer--inline .velt-dropdown-container{padding:var(--velt-spacing-md) 0px}.velt-composer--line-div[_ngcontent-%COMP%]{border-top:1px solid var(--velt-border-4);width:100%}.velt-composer--line-div[_ngcontent-%COMP%]:not(:empty){overflow:hidden;text-align:center;color:var(--velt-text-10);cursor:pointer;border-top:0}.velt-composer--line-div[_ngcontent-%COMP%]:not(:empty):before, .velt-composer--line-div[_ngcontent-%COMP%]:not(:empty):after{background-color:var(--velt-background-4);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:50%}.velt-composer--line-div[_ngcontent-%COMP%]:not(:empty):before{right:.5em;margin-left:calc(var(--velt-border-radius-full) * -1)}.velt-composer--line-div[_ngcontent-%COMP%]:not(:empty):after{left:.5em;margin-left:calc(var(--velt-border-radius-full) * -1)}.velt-composer--actions-wrap[_ngcontent-%COMP%]{position:relative;width:100%;margin-top:var(--velt-spacing-sm);display:flex;flex-direction:line;align-items:center;justify-content:flex-start;gap:var(--velt-spacing-xs)}.velt-composer--flex-fill[_ngcontent-%COMP%]{flex:1}.velt-composer-open[_ngcontent-%COMP%]{max-height:280px;overflow:auto}*[_ngcontent-%COMP%]{-ms-overflow-style:none;scrollbar-width:none}*[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.velt-comment-dialog-composer--top[_ngcontent-%COMP%] .velt-composer--inline-comment-section-mode[_ngcontent-%COMP%] .velt-composer--input-text-wrap[_ngcontent-%COMP%]{border-bottom:1px solid var(--velt-border-4);padding-bottom:var(--velt-spacing-md);border-radius:0}.velt-comment-dialog-composer--top[_ngcontent-%COMP%] .velt-composer--inline-comment-section-mode[_ngcontent-%COMP%] .velt-composer--input-text-wrap[_ngcontent-%COMP%] .velt-composer--line-div[_ngcontent-%COMP%]{display:none}'],changeDetection:0});let i=o;return i})();var ome=i=>({componentConfigSignal:i}),QYe=(i,o)=>({condition:i,data:o}),JYe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-ghost-banner-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function eKe(i,o){if(i&1&&(f(0),le(),_(1,"svg",5),w(2,"path",6)(3,"path",7),b(),ht(),_(4,"span",8),te(5),P(6,"translate"),b(),v()),i&2){let n=l(3).ngIf,e=l();m(4),x("data-testid",e.componentId+"-message"),m(),_e(" ",M(6,2,n==null||n.ghostComment==null?null:n.ghostComment.message),"")}}function tKe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),u(2,eKe,7,4,"ng-container",4),b()),i&2){let n=l(2).ngIf,e=l();x("aria-label",M(1,3,"Ghost comment notification"))("data-testid",e.componentId),m(2),d("veltDynamicTemplate",$(7,JYe,e.template,A(5,ome,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function nKe(i,o){if(i&1&&(f(0),u(1,tKe,3,13,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.showGhostCommentMessage)&&!(n!=null&&n.inlineCommentMode)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length))}}function iKe(i,o){if(i&1&&(f(0),u(1,nKe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,QYe,n.conditionSignal(),A(1,ome,n.componentConfigSignal)))}}var J0=(()=>{let o=class o extends H{constructor(e,t,r){super(t,r,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-ghost-banner",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogGhostBannerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogGhostBannerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Ghost comment banner")}catch(e){this.loggingService.catch("Error in CommentDialogGhostBannerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-ghost-banner"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-ghost-banner","role","region",4,"ngIf"],["role","region",1,"velt-ghost-banner"],[4,"veltDynamicTemplate"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true"],["fill-rule","evenodd","clip-rule","evenodd","d","M8.00065 13.3333C10.9462 13.3333 13.334 10.9455 13.334 7.99998C13.334 5.05446 10.9462 2.66665 8.00065 2.66665C5.05513 2.66665 2.66732 5.05446 2.66732 7.99998C2.66732 10.9455 5.05513 13.3333 8.00065 13.3333ZM8.00065 14.6666C11.6825 14.6666 14.6673 11.6819 14.6673 7.99998C14.6673 4.31808 11.6825 1.33331 8.00065 1.33331C4.31875 1.33331 1.33398 4.31808 1.33398 7.99998C1.33398 11.6819 4.31875 14.6666 8.00065 14.6666Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M8.00065 4.66669C7.63246 4.66669 7.33398 4.96516 7.33398 5.33335C7.33398 5.70154 7.63246 6.00002 8.00065 6.00002C8.36884 6.00002 8.66732 5.70154 8.66732 5.33335C8.66732 4.96516 8.36884 4.66669 8.00065 4.66669ZM8.00065 7.33335C7.63246 7.33335 7.33398 7.63183 7.33398 8.00002V10.6667C7.33398 11.0349 7.63246 11.3334 8.00065 11.3334C8.36884 11.3334 8.66732 11.0349 8.66732 10.6667V8.00002C8.66732 7.63183 8.36884 7.33335 8.00065 7.33335Z","fill","currentColor"],["aria-live","polite"]],template:function(t,r){t&1&&u(0,iKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-ghost-banner[_ngcontent-%COMP%]{margin:-14px -14px 0;padding:var(--velt-spacing-2xl) var(--velt-spacing-lg);border-radius:var(--velt-border-radius-md) var(--velt-border-radius-md) 0 0;background-color:color-mix(in srgb,var(--velt-error) 12%,transparent);display:flex;gap:var(--velt-spacing-sm);color:var(--velt-error);align-items:center}.velt-ghost-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:var(--velt-font-size-xs)}"],changeDetection:0});let i=o;return i})();var rKe=["customContainerRef"],aKe=["*"],rme=i=>({componentConfigSignal:i}),sKe=(i,o)=>({condition:i,data:o}),lKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-header-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function cKe(i,o){if(i&1&&(_(0,"div",6,0),P(2,"translate"),Lt(3),b()),i&2){let n=l(5);x("data-testid",n.componentId+"-custom")("aria-label",M(2,2,"Comment dialog header"))}}function dKe(i,o){if(i&1&&(_(0,"div",6),P(1,"translate"),w(2,"app-comment-dialog-status",7)(3,"app-comment-dialog-priority",7)(4,"app-comment-dialog-custom-annotation-dropdown",7)(5,"div",8)(6,"app-comment-dialog-options",7)(7,"app-copy-link",7)(8,"app-comment-dialog-resolve-button",7)(9,"app-comment-dialog-unresolve-button",7),b()),i&2){let n=l(5);x("data-testid",n.componentId+"-default")("aria-label",M(1,18,"Comment dialog header controls"))("aria-controls",n.componentId+"-content"),m(2),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-status"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-priority"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-custom-annotation-dropdown"),m(),x("data-testid",n.componentId+"-fill"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-options"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-copy-link"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-resolve-button"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-unresolve-button")}}function mKe(i,o){if(i&1&&(_(0,"div",9),w(1,"app-comment-dialog-comment-index",7)(2,"app-comment-dialog-comment-category",7)(3,"div",8)(4,"app-comment-dialog-comment-suggestion-status",7)(5,"app-comment-dialog-priority",7)(6,"app-comment-dialog-status",7)(7,"app-comment-dialog-navigation-button",7),b()),i&2){let n=l(5);m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-comment-index"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-comment-category"),m(),x("data-testid",n.componentId+"-fill"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-comment-suggestion-status"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-priority"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-status"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-navigation-button")}}function pKe(i,o){if(i&1&&(f(0),u(1,cKe,4,4,"div",4)(2,dKe,10,20,"div",4)(3,mKe,8,13,"div",5),v()),i&2){let n=l(3).ngIf,e=l();m(),d("ngIf",!e.showDefaultContent),m(),d("ngIf",e.showDefaultContent()&&!(n!=null&&n.sidebarMode)),m(),d("ngIf",e.showDefaultContent()&&(n==null?null:n.sidebarMode))}}function gKe(i,o){if(i&1&&(f(0),u(1,pKe,4,3,"ng-container",3),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,lKe,e.template,A(1,rme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function uKe(i,o){if(i&1&&(f(0),u(1,gKe,2,9,"ng-container",1),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)}}function hKe(i,o){if(i&1&&(f(0),u(1,uKe,2,1,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,sKe,n.conditionSignal(),A(1,rme,n.componentConfigSignal)))}}var eC=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.showDefaultContent=Te(!1),this.componentId="velt-comment-dialog-header",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogHeaderComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogHeaderComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogHeaderComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{this.customContainerRef?.nativeElement?.children?.length||this.showDefaultContent.set(!0)}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-header"]],viewQuery:function(t,r){if(t&1&&nt(rKe,5),t&2){let a;Xe(a=Qe())&&(r.customContainerRef=a.first)}},standalone:!1,features:[V([S]),B],ngContentSelectors:aKe,decls:1,vars:1,consts:[["customContainerRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","velt-header","role","banner",4,"ngIf"],["class","velt-header",4,"ngIf"],["role","banner",1,"velt-header"],[3,"componentConfigSignal"],[1,"velt-fill"],[1,"velt-header"]],template:function(t,r){t&1&&(jt(),u(0,hKe,2,6,"ng-container",1)),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]:empty{display:none}.velt-header[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:var(--velt-spacing-sm);position:relative}.velt-fill[_ngcontent-%COMP%]{flex-grow:1}"],changeDetection:0});let i=o;return i})();var ame=i=>({componentConfigSignal:i}),vKe=(i,o)=>({condition:i,data:o}),CKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-more-reply-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function _Ke(i,o){if(i&1&&(_(0,"div",4),te(1),P(2,"translate"),P(3,"translate"),b()),i&2){let n=l(3).ngIf,e=l();x("data-testid",e.componentId+"-count-"+e.i)("aria-live","polite"),m(),_e(" ",(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)===3?M(2,3,"1 more reply"):(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)-2+" "+M(3,5,"more replies")," ")}}function yKe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),P(2,"translate"),P(3,"translate"),G("click",function(t){N(n);let r=l(2).ngIf;return r==null||r.onMoreRepliesClick(),F(t.stopPropagation())}),u(4,_Ke,4,7,"div",3),b(),v()}if(i&2){let n=l(2).ngIf,e=l();m(),x("data-testid",e.componentId+"-button-"+e.i)("aria-label",(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)===3?M(2,3,"Show 1 more reply"):M(3,5,"Show "+((n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)-2)+" more replies")),m(3),d("veltDynamicTemplate",$(9,CKe,e.template,A(7,ame,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function SKe(i,o){if(i&1&&(f(0),u(1,yKe,5,15,"ng-container",0),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",(n==null?null:n.commentDialogSelected)&&!(n!=null&&n.showAllComments)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)>2&&e.i===1)}}function bKe(i,o){if(i&1&&(f(0),u(1,SKe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,vKe,n.conditionSignal(),A(1,ame,n.componentConfigSignal)))}}var ZI=(()=>{let o=class o extends H{get moreReplyTemplate(){return this._moreReplyTemplate}set moreReplyTemplate(e){try{this._moreReplyTemplate=e,this._moreReplyTemplate?this.template=this.domService.deepCloneElement(this.moreReplyTemplate):this.template=null}catch(t){this.loggingService.catch("Error in CommentDialogMoreReplyComponent moreReplyTemplate:",t)}}constructor(e,t,r,a){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.domService=a,this.componentId="velt-comment-dialog-more-reply",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogMoreReplyComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogMoreReplyComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",`${this.componentId}-host-${this.i}`)}catch(e){this.loggingService.catch("Error in CommentDialogMoreReplyComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S),h(Be))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-more-reply"]],inputs:{i:"i",moreReplyTemplate:"moreReplyTemplate"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",3,"click"],["class","velt-hidden-count","role","status",4,"veltDynamicTemplate"],["role","status",1,"velt-hidden-count"]],template:function(t,r){t&1&&u(0,bKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-hidden-count[_ngcontent-%COMP%]{text-align:center;color:var(--velt-text-10);cursor:pointer}.velt-hidden-count[_ngcontent-%COMP%]:before, .velt-hidden-count[_ngcontent-%COMP%]:after{background-color:var(--velt-background-4);content:"";display:inline-block;height:1px;position:relative;vertical-align:middle;width:calc(50% - 50px - 1em)}.velt-hidden-count[_ngcontent-%COMP%]:before{right:.5em;margin-left:-50%}.velt-hidden-count[_ngcontent-%COMP%]:after{left:.5em;margin-right:-50%}'],changeDetection:0});let i=o;return i})();var sme=i=>({componentConfigSignal:i}),IKe=(i,o)=>({condition:i,data:o}),EKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-options-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function xKe(i,o){if(i&1){let n=Y();f(0),_(1,"app-comment-dialog-options-dropdown",3),G("openAssignToMenu",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.toggleAssignToMenu())})("deleteComment",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.deleteComment())})("editCommentClick",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.onEditCommentClick(0))})("toggleNotificationSubscription",function(){N(n);let t=l(3).ngIf;return F(t==null?null:t.toggleNotificationSubscription())})("changeCommentAccessMode",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.changeCommentAccessMode(t))}),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),d("darkMode",!!(n!=null&&n.darkMode))("componentConfigSignal",e.componentConfigSignal)("annotation",n==null?null:n.annotation)("user",n==null?null:n.user)("allowAssignment",!!(n!=null&&n.userMentions))("notificationEnabled",!!(n!=null&&n.notificationEnabled))("variant",n==null?null:n.variant)("allowChangeCommentAccessMode",!!(n!=null&&n.isUserAdmin))("isUserAdmin",!!(n!=null&&n.isUserAdmin))("shadowDom",n.dialogShadowDOM)("contentTemplate",e.contentTemplate)("triggerTemplate",e.triggerTemplate)}}function TKe(i,o){if(i&1&&(f(0),w(1,"app-comment-dialog-assign-menu",4),v()),i&2){let n=l(4);m(),d("componentConfigSignal",n.componentConfigSignal)}}function DKe(i,o){if(i&1&&(f(0),u(1,xKe,2,12,"ng-container",0)(2,TKe,2,1,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n&&!(n!=null&&n.disabled)&&(n==null?null:n.dialogSelectedByKnownUser)&&!(n!=null&&n.isPlanExpired)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&!(n!=null&&n.inlineCommentMode)),m(),d("ngIf",n&&!(n!=null&&n.disabled)&&(n==null?null:n.dialogSelectedByKnownUser)&&!(n!=null&&n.isPlanExpired)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&!(n!=null&&n.inlineCommentMode))}}function wKe(i,o){if(i&1&&(f(0),u(1,DKe,3,2,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,EKe,e.template,A(1,sme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function OKe(i,o){if(i&1&&(f(0),u(1,wKe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,IKe,n.conditionSignal(),A(1,sme,n.componentConfigSignal)))}}var XI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.wireframeService=a,this.subscriptions=[],super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),!this.template){let e="velt-comment-dialog-options-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r,this.getChildTemplate()}}))}this.getChildTemplate()}catch(e){this.catchError("Error in CommentDialogOptionsComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}getChildTemplate(){if(!this.triggerTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-options-dropdown-trigger-wireframe");Ke(e)||(this.triggerTemplate=e)}if(!this.contentTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-options-dropdown-content-wireframe");Ke(e)||(this.contentTemplate=e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S),h(He))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-options"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"openAssignToMenu","deleteComment","editCommentClick","toggleNotificationSubscription","changeCommentAccessMode","darkMode","componentConfigSignal","annotation","user","allowAssignment","notificationEnabled","variant","allowChangeCommentAccessMode","isUserAdmin","shadowDom","contentTemplate","triggerTemplate"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,OKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:relative;display:inline-block}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var lme=i=>({componentConfigSignal:i}),AKe=(i,o)=>({condition:i,data:o}),PKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-priority-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function MKe(i,o){if(i&1){let n=Y();f(0),_(1,"velt-comment-dialog-priority-dropdown-internal",3),G("changePriority",function(t){N(n);let r=l(3).ngIf;return F(r==null?null:r.changePriority(t))})("click",function(t){return N(n),F(t.stopPropagation())}),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),d("disabled",(n==null?null:n.disabled)||(n==null?null:n.isPlanExpired))("darkMode",!!(n!=null&&n.darkMode))("enablePriority",!!(n!=null&&n.enablePriority))("shadowDom",n.dialogShadowDOM)("variant",n==null?null:n.variant)("annotation",n==null?null:n.annotation)("user",n==null?null:n.user)("triggerTemplate",e.triggerTemplate)("contentTemplate",e.contentTemplate)}}function kKe(i,o){if(i&1&&(f(0),u(1,MKe,2,9,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&!(n!=null&&n.inlineCommentMode)&&(n==null?null:n.enablePriority))}}function RKe(i,o){if(i&1&&(f(0),u(1,kKe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,PKe,e.template,A(1,lme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function NKe(i,o){if(i&1&&(f(0),u(1,RKe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,AKe,n.conditionSignal(),A(1,lme,n.componentConfigSignal)))}}var QI=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.dynamicDataService=a,this.subscriptions=[],this.componentId="velt-comment-dialog-priority",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes(),!this.template){let e="velt-comment-dialog-priority-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r,this.getChildTemplate()}}))}this.getChildTemplate()}catch(e){this.catchError("Error in CommentDialogPriorityComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}getChildTemplate(){if(!this.triggerTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-priority-dropdown-trigger-wireframe");Ke(e)||(this.triggerTemplate=e)}if(!this.contentTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-priority-dropdown-content-wireframe");Ke(e)||(this.contentTemplate=e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","combobox"),e.setAttribute("aria-label","Priority")}catch(e){this.loggingService.catch("Error setting up accessibility attributes in CommentDialogPriorityComponent: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-priority"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["snippylyTheme","",3,"changePriority","click","disabled","darkMode","enablePriority","shadowDom","variant","annotation","user","triggerTemplate","contentTemplate"]],template:function(t,r){t&1&&u(0,NKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var cme=i=>({componentConfigSignal:i}),FKe=(i,o)=>({condition:i,data:o}),LKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-private-badge-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function BKe(i,o){if(i&1&&(_(0,"button",3),P(1,"translate"),le(),_(2,"svg",4),w(3,"path",5)(4,"path",6),b(),te(5),P(6,"translate"),b()),i&2){let n=l(4);x("aria-label",M(1,3,"Private comment mode - only visible to your team"))("data-testid",n.componentId),m(5),_e(" ",M(6,5,"Only for your team")," ")}}function VKe(i,o){if(i&1&&(f(0),u(1,BKe,7,7,"button",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,LKe,e.template,A(1,cme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function UKe(i,o){if(i&1&&(f(0),u(1,VKe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.isPrivateComment)&&!(!(n==null||n.annotation==null||n.annotation.comments==null)&&n.annotation.comments.length))}}function jKe(i,o){if(i&1&&(f(0),u(1,UKe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,FKe,n.conditionSignal(),A(1,cme,n.componentConfigSignal)))}}var JI=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-composer-private-badge",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogComposerPrivateBadgeComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogComposerPrivateBadgeComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","region"),e.setAttribute("aria-label","Private comment badge for your team")}catch(e){this.loggingService.catch("Error in CommentDialogComposerPrivateBadgeComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-composer-private-badge"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-private-badge","role","button",4,"veltDynamicTemplate"],["role","button",1,"velt-private-badge"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true"],["fill-rule","evenodd","clip-rule","evenodd","d","M1.81485 7.71681C1.9083 6.42388 2.92469 5.42008 4.21838 5.33784C4.99204 5.28867 5.93802 5.25 7 5.25C8.06198 5.25 9.00796 5.28867 9.78162 5.33784C11.0753 5.42008 12.0917 6.42388 12.1851 7.71681C12.2229 8.23864 12.25 8.79956 12.25 9.33333C12.25 9.86711 12.2229 10.428 12.1851 10.9499C12.0917 12.2428 11.0753 13.2466 9.78162 13.3288C9.00796 13.378 8.06198 13.4167 7 13.4167C5.93802 13.4167 4.99204 13.378 4.21838 13.3288C2.92469 13.2466 1.9083 12.2428 1.81485 10.9499C1.77714 10.428 1.75 9.86711 1.75 9.33333C1.75 8.79956 1.77714 8.23864 1.81485 7.71681ZM8.16667 8.75C8.16667 9.18183 7.93205 9.55887 7.58333 9.76059V10.5C7.58333 10.8222 7.32217 11.0833 7 11.0833C6.67783 11.0833 6.41667 10.8222 6.41667 10.5V9.76059C6.06795 9.55887 5.83333 9.18183 5.83333 8.75C5.83333 8.10567 6.35567 7.58333 7 7.58333C7.64433 7.58333 8.16667 8.10567 8.16667 8.75Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.08398 3.4987C4.08398 1.88787 5.38982 0.582031 7.00065 0.582031C8.61148 0.582031 9.91732 1.88787 9.91732 3.4987V5.83203C9.91732 6.1542 9.65615 6.41536 9.33398 6.41536C9.01182 6.41536 8.75065 6.1542 8.75065 5.83203V3.4987C8.75065 2.5322 7.96715 1.7487 7.00065 1.7487C6.03415 1.7487 5.25065 2.5322 5.25065 3.4987V5.83203C5.25065 6.1542 4.98948 6.41536 4.66732 6.41536C4.34515 6.41536 4.08398 6.1542 4.08398 5.83203V3.4987Z","fill","currentColor"]],template:function(t,r){t&1&&u(0,jKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{align-self:flex-start}[_nghost-%COMP%]:empty{display:none}.velt-private-badge[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;justify-content:center;padding-block:var(--velt-spacing-sm);gap:var(--velt-spacing-sm);background-color:var(--velt-background-0);border:none;border-radius:var(--velt-border-radius-sm);font-style:normal;font-weight:500;font-size:var(--velt-font-size-xs);line-height:18px;color:var(--velt-text-0)}"],changeDetection:0});let i=o;return i})();var dme=i=>({componentConfigSignal:i}),$Ke=(i,o)=>({condition:i,data:o}),HKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-private-banner-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function zKe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),le(),_(2,"svg",4),w(3,"path",5)(4,"path",6),b(),te(5),P(6,"translate"),b()),i&2){let n=l(4);x("data-testid",n.componentId)("aria-label",M(1,4,"Private comment banner")),m(2),x("data-testid",n.componentId+"-icon"),m(3),_e(" ",M(6,6,"Only for your team")," ")}}function GKe(i,o){if(i&1&&(f(0),u(1,zKe,7,8,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,HKe,e.template,A(1,dme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function WKe(i,o){if(i&1&&(f(0),u(1,GKe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.isPrivateComment)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length))}}function qKe(i,o){if(i&1&&(f(0),u(1,WKe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,$Ke,n.conditionSignal(),A(1,dme,n.componentConfigSignal)))}}var tC=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-private-banner",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogPrivateBannerComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogPrivateBannerComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogPrivateBannerComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-private-banner"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-private-comment--heading","role","banner",4,"veltDynamicTemplate"],["role","banner",1,"velt-private-comment--heading"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill-rule","evenodd","clip-rule","evenodd","d","M1.81485 7.71681C1.9083 6.42388 2.92469 5.42008 4.21838 5.33784C4.99204 5.28867 5.93802 5.25 7 5.25C8.06198 5.25 9.00796 5.28867 9.78162 5.33784C11.0753 5.42008 12.0917 6.42388 12.1851 7.71681C12.2229 8.23864 12.25 8.79956 12.25 9.33333C12.25 9.86711 12.2229 10.428 12.1851 10.9499C12.0917 12.2428 11.0753 13.2466 9.78162 13.3288C9.00796 13.378 8.06198 13.4167 7 13.4167C5.93802 13.4167 4.99204 13.378 4.21838 13.3288C2.92469 13.2466 1.9083 12.2428 1.81485 10.9499C1.77714 10.428 1.75 9.86711 1.75 9.33333C1.75 8.79956 1.77714 8.23864 1.81485 7.71681ZM8.16667 8.75C8.16667 9.18183 7.93205 9.55887 7.58333 9.76059V10.5C7.58333 10.8222 7.32217 11.0833 7 11.0833C6.67783 11.0833 6.41667 10.8222 6.41667 10.5V9.76059C6.06795 9.55887 5.83333 9.18183 5.83333 8.75C5.83333 8.10567 6.35567 7.58333 7 7.58333C7.64433 7.58333 8.16667 8.10567 8.16667 8.75Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.0835 3.50001C4.0835 1.88918 5.38933 0.583344 7.00016 0.583344C8.61099 0.583344 9.91683 1.88918 9.91683 3.50001V5.83334C9.91683 6.15551 9.65566 6.41668 9.3335 6.41668C9.01133 6.41668 8.75016 6.15551 8.75016 5.83334V3.50001C8.75016 2.53351 7.96666 1.75001 7.00016 1.75001C6.03366 1.75001 5.25016 2.53351 5.25016 3.50001V5.83334C5.25016 6.15551 4.989 6.41668 4.66683 6.41668C4.34466 6.41668 4.0835 6.15551 4.0835 5.83334V3.50001Z","fill","white"]],template:function(t,r){t&1&&u(0,qKe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-private-comment--heading[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--velt-accent) 32%,var(--velt-black) 100%);margin:calc(var(--velt-spacing-lg) * -1);padding:var(--velt-spacing-lg);color:var(--velt-accent-foreground);display:flex;align-items:center;justify-content:flex-start;grid-gap:var(--velt-spacing-sm);gap:var(--velt-spacing-sm);margin-bottom:0;border-radius:var(--velt-border-radius-md) var(--velt-border-radius-md) 0 0;border-bottom:1px solid color-mix(in srgb,var(--velt-accent-foreground) 16%,transparent)}"],changeDetection:0});let i=o;return i})();var mme=i=>({componentConfigSignal:i}),KKe=(i,o)=>({condition:i,data:o}),ZKe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-resolve-button-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function XKe(i,o){if(i&1&&(f(0),le(),_(1,"svg",5),w(2,"path",6),b(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function QKe(i,o){if(i&1){let n=Y();_(0,"app-resolve-button",3),P(1,"translate"),G("changeStatus",function(t){N(n);let r=l(2).ngIf;return F(r==null?null:r.changeStatus(t))})("click",function(t){return N(n),F(t.stopPropagation())}),u(2,XKe,3,1,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();d("darkMode",!!(n!=null&&n.darkMode))("annotation",n==null?null:n.annotation)("sidebarMode",n==null?null:n.sidebarMode),x("data-testid",e.componentId)("aria-label",M(1,7,"Resolve thread"))("aria-pressed",!1),m(2),d("veltDynamicTemplate",$(11,ZKe,e.template,A(9,mme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function JKe(i,o){if(i&1&&(f(0),u(1,QKe,3,17,"app-resolve-button",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.canResolveAnnotation)&&!(!(n==null||n.annotation==null)&&n.annotation.assignedTo)&&(!(n!=null&&n.resolveStatusAccessAdminOnly)||(n==null||n.annotation==null||n.annotation.from==null?null:n.annotation.from.userId)===(n==null||n.user==null?null:n.user.userId)||(n==null?null:n.isUserAdmin)))}}function eZe(i,o){if(i&1&&(f(0),u(1,JKe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,KKe,n.conditionSignal(),A(1,mme,n.componentConfigSignal)))}}var nC=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-comment-dialog-resolve-button",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogResolveButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogResolveButtonComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogResolveButtonComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-resolve-button"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","button","tabindex","0",3,"darkMode","annotation","sidebarMode","changeStatus","click",4,"ngIf"],["role","button","tabindex","0",3,"changeStatus","click","darkMode","annotation","sidebarMode"],[4,"veltDynamicTemplate"],["width","12","height","10","viewBox","0 0 12 10","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.5886 1.07806C11.914 1.4035 11.914 1.93114 11.5886 2.25657L4.92194 8.92324C4.5965 9.24868 4.06886 9.24868 3.74343 8.92324L0.410093 5.58991C0.0846564 5.26447 0.0846564 4.73683 0.410093 4.4114C0.73553 4.08596 1.26317 4.08596 1.5886 4.4114L4.33268 7.15547L10.4101 1.07806C10.7355 0.752625 11.2632 0.752625 11.5886 1.07806Z","fill","currentColor"]],template:function(t,r){t&1&&u(0,eZe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var pme=i=>({componentConfigSignal:i}),tZe=(i,o)=>({condition:i,data:o}),nZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-sign-in-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function iZe(i,o){if(i&1&&(f(0),w(1,"div",5),_(2,"div",6),P(3,"translate"),te(4),P(5,"translate"),b(),v()),i&2){let n=l(4);m(2),x("data-testid",n.componentId+"-button")("aria-label",M(3,3,"Sign In")),m(2),_e(" ",M(5,5,"Sign In"),"")}}function oZe(i,o){if(i&1){let n=Y();_(0,"div",3),G("click",function(t){N(n);let r=l(2).ngIf;return r==null||r.onSignInClick(),F(t.stopPropagation())}),u(1,iZe,6,7,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId+"-container"),m(),d("veltDynamicTemplate",$(4,nZe,e.template,A(2,pme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function rZe(i,o){if(i&1&&(f(0),u(1,oZe,2,10,"ng-template",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",(n==null?null:n.commentDialogSelected)&&(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&(!(n!=null&&n.user)||(n==null||n.user==null?null:n.user.isAnonymous))&&(n==null?null:n.enableSignInButton))}}function aZe(i,o){if(i&1&&(f(0),u(1,rZe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,tZe,n.conditionSignal(),A(1,pme,n.componentConfigSignal)))}}var iC=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-sign-in",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogSignInComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogSignInComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogSignInComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-sign-in"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],["role","presentation",3,"click"],[4,"veltDynamicTemplate"],["role","presentation",1,"velt-fill"],["role","button","tabindex","0",1,"velt-flat-button","velt-success-button"]],template:function(t,r){t&1&&u(0,aZe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-fill[_ngcontent-%COMP%]{flex-grow:1}.velt-flat-button[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm) var(--velt-spacing-md);background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl);border:0;color:var(--velt-accent-foreground);font-weight:700;transition:.2s;font-size:var(--velt-font-size-sm);cursor:pointer}.velt-flat-button[_ngcontent-%COMP%]:hover{background:var(--velt-accent-hover)}.velt-flat-button.velt-success-button[_ngcontent-%COMP%]{background:var(--velt-success)}.velt-flat-button.velt-success-button[_ngcontent-%COMP%]:hover{background:var(--velt-success-hover)}"],changeDetection:0});let i=o;return i})();var gme=i=>({componentConfigSignal:i}),lZe=(i,o)=>({condition:i,data:o}),cZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-status-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function dZe(i,o){if(i&1){let n=Y();_(0,"app-comment-dialog-status-dropdown",4),P(1,"translate"),G("changeStatus",function(t){N(n);let r=l(4).ngIf;return F(r==null?null:r.changeStatus(t))})("click",function(t){return N(n),F(t.stopPropagation())}),b()}if(i&2){let n=l(4).ngIf,e=l();d("darkMode",!!(n!=null&&n.darkMode))("user",n==null?null:n.user)("annotation",n==null?null:n.annotation)("isUserAdmin",!!(n!=null&&n.isUserAdmin))("resolveStatusAccessAdminOnly",!!(n!=null&&n.resolveStatusAccessAdminOnly))("disabled",(n==null?null:n.disabled)||(n==null?null:n.isPlanExpired))("shadowDom",n.dialogShadowDOM)("variant",n==null?null:n.variant)("triggerTemplate",e.triggerTemplate)("contentTemplate",e.contentTemplate)("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId)("aria-label","Status dropdown for "+M(1,13,(n==null||n.annotation==null||n.annotation.status==null?null:n.annotation.status.name)||"comment"))}}function mZe(i,o){if(i&1&&(f(0),u(1,dZe,2,15,"app-comment-dialog-status-dropdown",3),v()),i&2){let n=l(3).ngIf;m(),d("ngIf",n==null?null:n.enableStatus)}}function pZe(i,o){if(i&1&&(f(0),u(1,mZe,2,1,"ng-container",0),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",(n==null||n.annotation==null||n.annotation.comments==null?null:n.annotation.comments.length)&&!(n!=null&&n.inlineCommentMode))}}function gZe(i,o){if(i&1&&(f(0),u(1,pZe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(3,cZe,e.template,A(1,gme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function uZe(i,o){if(i&1&&(f(0),u(1,gZe,2,9,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,lZe,n.conditionSignal(),A(1,gme,n.componentConfigSignal)))}}var e2=(()=>{let o=class o extends H{constructor(e,t,r,a){super(r,a,e),this.loggingService=e,this.wireframeService=t,this.elementRef=r,this.dynamicDataService=a,this.subscriptions=[],this.componentId="velt-comment-dialog-status",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes(),!this.template){let e="velt-comment-dialog-status-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r,this.getChildTemplate()}}))}this.getChildTemplate()}catch(e){this.catchError("Error in CommentDialogStatusComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","region"),e.setAttribute("aria-label","Thread status controls"),e.setAttribute("data-testid",this.componentId+"-container"),this.componentConfigSignal()?.disabled&&e.setAttribute("aria-disabled","true"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CommentDialogStatusComponent setupA11yAttributes:",e)}}getChildTemplate(){if(!this.triggerTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-status-dropdown-trigger-wireframe");Ke(e)||(this.triggerTemplate=e)}if(!this.contentTemplate&&this.template){let e=this.template.querySelector("velt-comment-dialog-status-dropdown-content-wireframe");Ke(e)||(this.triggerTemplate=e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(He),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-status"]],inputs:{variant:"variant"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"darkMode","user","annotation","isUserAdmin","resolveStatusAccessAdminOnly","disabled","shadowDom","variant","triggerTemplate","contentTemplate","componentConfigSignal","changeStatus","click",4,"ngIf"],[3,"changeStatus","click","darkMode","user","annotation","isUserAdmin","resolveStatusAccessAdminOnly","disabled","shadowDom","variant","triggerTemplate","contentTemplate","componentConfigSignal"]],template:function(t,r){t&1&&u(0,uZe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var ume=i=>({componentConfigSignal:i}),hZe=(i,o)=>({condition:i,data:o}),fZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-suggestion-action-accept-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function vZe(i,o){if(i&1&&(_(0,"div",4),P(1,"translate"),te(2),P(3,"translate"),b()),i&2){let n=l(3);x("data-testid",n.componentId+"-button")("aria-label",M(1,3,"Accept suggestion")),m(2),_e(" ",M(3,5,"Accept")," ")}}function CZe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("click",function(t){N(n);let r=l().ngIf;return r==null||r.acceptCommentPinAnnotation(),F(t.stopPropagation())}),u(2,vZe,4,7,"div",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId),m(),d("veltDynamicTemplate",$(4,fZe,e.template,A(2,ume,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function _Ze(i,o){if(i&1&&(f(0),u(1,CZe,3,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,hZe,n.conditionSignal(),A(1,ume,n.componentConfigSignal)))}}var t2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-suggestion-action-accept",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionAcceptComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionAcceptComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionAcceptComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-suggestion-action-accept"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","presentation",3,"click"],["class","velt-flat-button velt-accept-button","role","button","tabindex","0",4,"veltDynamicTemplate"],["role","button","tabindex","0",1,"velt-flat-button","velt-accept-button"]],template:function(t,r){t&1&&u(0,_Ze,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-flat-button[_ngcontent-%COMP%]{width:100px;text-align:center}.velt-flat-button.velt-accept-button[_ngcontent-%COMP%]{background:transparent;color:var(--velt-success);text-decoration:underline}"],changeDetection:0});let i=o;return i})();var hme=i=>({componentConfigSignal:i}),yZe=(i,o)=>({condition:i,data:o}),SZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-suggestion-action-reject-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function bZe(i,o){if(i&1&&(_(0,"div",4),P(1,"translate"),te(2),P(3,"translate"),b()),i&2){let n=l(3);x("data-testid",n.componentId+"-button")("aria-label",M(1,3,"Reject suggestion")),m(2),_e(" ",M(3,5,"Reject")," ")}}function IZe(i,o){if(i&1){let n=Y();f(0),_(1,"div",2),G("click",function(t){N(n);let r=l().ngIf;return r==null||r.rejectCommentPinAnnotation(),F(t.stopPropagation())}),u(2,bZe,4,7,"div",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),x("data-testid",e.componentId),m(),d("veltDynamicTemplate",$(4,SZe,e.template,A(2,hme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function EZe(i,o){if(i&1&&(f(0),u(1,IZe,3,10,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,yZe,n.conditionSignal(),A(1,hme,n.componentConfigSignal)))}}var n2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-suggestion-action-reject",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionRejectComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionRejectComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionRejectComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-suggestion-action-reject"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["role","presentation",3,"click"],["class","velt-flat-button velt-reject-button","role","button","tabindex","0",4,"veltDynamicTemplate"],["role","button","tabindex","0",1,"velt-flat-button","velt-reject-button"]],template:function(t,r){t&1&&u(0,EZe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-flat-button[_ngcontent-%COMP%]{width:100px;text-align:center}.velt-flat-button.velt-reject-button[_ngcontent-%COMP%]{background:transparent;color:var(--velt-error);text-decoration:underline}"],changeDetection:0});let i=o;return i})();var fme=i=>({componentConfigSignal:i}),xZe=(i,o)=>({condition:i,data:o}),TZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-suggestion-action-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function DZe(i,o){if(i&1&&(_(0,"div",3),P(1,"translate"),w(2,"app-comment-dialog-suggestion-action-accept",4)(3,"app-comment-dialog-suggestion-action-reject",4),b()),i&2){let n=l(4);x("data-testid",n.componentId)("aria-label",M(1,6,"Suggestion actions")),m(2),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-accept"),m(),d("componentConfigSignal",n.componentConfigSignal),x("data-testid",n.componentId+"-reject")}}function wZe(i,o){if(i&1&&(f(0),u(1,DZe,4,8,"div",2),v()),i&2){let n=l(2).ngIf,e=l();m(),d("veltDynamicTemplate",$(3,TZe,e.template,A(1,fme,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function OZe(i,o){if(i&1&&(f(0),u(1,wZe,2,9,"ng-container",0),v()),i&2){let n=l().ngIf;m(),d("ngIf",n==null?null:n.showSuggestionModeActions)}}function AZe(i,o){if(i&1&&(f(0),u(1,OZe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,xZe,n.conditionSignal(),A(1,fme,n.componentConfigSignal)))}}var oC=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-comment-dialog-suggestion-action",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogSuggestionActionComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-suggestion-action"]],standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-suggestion-actions","role","toolbar",4,"veltDynamicTemplate"],["role","toolbar",1,"velt-suggestion-actions"],[3,"componentConfigSignal"]],template:function(t,r){t&1&&u(0,AZe,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-suggestion-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:var(--velt-spacing-lg);margin-bottom:var(--velt-spacing-lg)}.velt-suggestion-actions[_ngcontent-%COMP%]{margin-bottom:0}"],changeDetection:0});let i=o;return i})();var vme=(i,o,n)=>({componentConfigSignal:i,commentObj:o,i:n}),MZe=(i,o)=>({condition:i,data:o}),kZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-avatar-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function RZe(i,o){if(i&1&&(f(0),w(1,"snippyly-user-avatar",3),P(2,"translate"),P(3,"translate"),v()),i&2){let n=l(4);m(),d("size",32)("user",n.commentObj==null?null:n.commentObj.from),x("data-testid",n.componentId)("aria-label",M(2,4,"Avatar for")+" "+M(3,6,(n.commentObj==null||n.commentObj.from==null?null:n.commentObj.from.name)||(n.commentObj==null||n.commentObj.from==null?null:n.commentObj.from.email)||"user"))}}function NZe(i,o){if(i&1&&(f(0),u(1,RZe,4,8,"ng-container",0),v()),i&2){let n=l(3);m(),d("ngIf",n.commentObj)}}function FZe(i,o){if(i&1&&(f(0),u(1,NZe,2,1,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,kZe,e.template,je(1,vme,e.componentConfigSignal,e.commentObj,e.i),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function LZe(i,o){if(i&1&&(f(0),u(1,FZe,2,11,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(5,MZe,n.conditionSignal(),je(1,vme,n.componentConfigSignal,n.commentObj,n.i)))}}var i2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-thread-card-avatar",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,commentObj:this.commentObj,i:this.i}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAvatarComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-avatar"]],inputs:{commentObj:"commentObj",i:"i"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"comment-dialog-user-avatar",3,"size","user"]],template:function(t,r){t&1&&u(0,LZe,2,8,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var Cme=(i,o,n)=>({componentConfigSignal:i,commentObj:o,i:n}),BZe=(i,o)=>({condition:i,data:o}),VZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-device-type-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),UZe=i=>({$implicit:i}),jZe=()=>[];function $Ze(i,o){i&1&&Ue(0)}function HZe(i,o){if(i&1&&(_(0,"div",7),u(1,$Ze,1,0,"ng-container",8),b()),i&2){l();let n=de(3),e=l(2).ngIf,t=l();x("data-testid",t.componentId),m(),d("ngTemplateOutlet",n)("ngTemplateOutletContext",A(3,UZe,e==null?null:e.deviceType))}}function zZe(i,o){if(i&1&&w(0,"app-device-type-icons",10),i&2){let n=l().$implicit,e=l(4);d("deviceType",n),x("data-testid",e.componentId+"-icons")}}function GZe(i,o){if(i&1&&(_(0,"div",11)(1,"div"),te(2),P(3,"translate"),b(),_(4,"div"),te(5),P(6,"translate"),b()()),i&2){let n=l(4).ngIf,e=l();ue("dark",n==null?null:n.darkMode),x("data-testid",e.componentId+"-info"),m(2),L1("",M(3,7,n==null||n.annotation==null||n.annotation.pageInfo==null||n.annotation.pageInfo.deviceInfo==null?null:n.annotation.pageInfo.deviceInfo.osName)," \u2022 ",n==null||n.annotation==null||n.annotation.pageInfo==null||n.annotation.pageInfo.deviceInfo==null?null:n.annotation.pageInfo.deviceInfo.screenWidth,"x",n==null||n.annotation==null||n.annotation.pageInfo==null||n.annotation.pageInfo.deviceInfo==null?null:n.annotation.pageInfo.deviceInfo.screenHeight," "),m(3),_e("Using ",M(6,9,n==null||n.annotation==null||n.annotation.pageInfo==null||n.annotation.pageInfo.deviceInfo==null?null:n.annotation.pageInfo.deviceInfo.browserName),"")}}function WZe(i,o){if(i&1&&(_(0,"app-overlay-tooltip",9),u(1,zZe,1,2,"ng-template",null,1,xe)(3,GZe,7,11,"ng-template",null,2,xe),b()),i&2){let n=l(3).ngIf,e=l();d("positions",(n==null?null:n.deviceInfoTooltipPositions)||gt(2,jZe)),x("data-testid",e.componentId+"-tooltip")}}function qZe(i,o){if(i&1&&(f(0),u(1,HZe,2,5,"div",6)(2,WZe,5,3,"ng-template",null,0,xe),v()),i&2){let n=l(2).ngIf,e=l();m(),d("ngIf",!e.i&&(n==null?null:n.showScreenSizeInfo))}}function YZe(i,o){if(i&1&&(f(0),u(1,qZe,4,1,"ng-container",5),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,VZe,e.template,je(1,Cme,e.componentConfigSignal,e.commentObj,e.i),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function KZe(i,o){if(i&1&&(f(0),u(1,YZe,2,11,"ng-container",4),v()),i&2){let n=l();m(),d("veltIf",k(5,BZe,n.conditionSignal(),je(1,Cme,n.componentConfigSignal,n.commentObj,n.i)))}}var o2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.deviceInfoTooltipPositions=[{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom"}],this.componentId="velt-device-type",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,commentObj:this.commentObj,i:this.i}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardDeviceTypeComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardDeviceTypeComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardDeviceTypeComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-device-type"]],inputs:{i:"i",commentObj:"commentObj"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["deviceTypeRef",""],["triggerTemplate",""],["tooltipTemplate",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","modal-device__type",4,"ngIf"],[1,"modal-device__type"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"positions"],[3,"deviceType"],["role","tooltip",1,"v-device-info-tooltip-container"]],template:function(t,r){t&1&&u(0,KZe,2,8,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var _me=(i,o,n,e)=>({componentConfigSignal:i,attachment:o,attachmentIndex:n,commentObj:e}),ZZe=(i,o)=>({condition:i,data:o}),XZe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-image-preview-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function QZe(i,o){if(i&1){let n=Y();f(0),_(1,"snippyly-lightbox",4,0)(3,"img",5),P(4,"translate"),P(5,"translate"),G("click",function(){N(n);let t=de(2);return F(t==null?null:t.openImageInFullScreen())}),b()(),v()}if(i&2){let n=l(3);m(),d("src",n.attachment==null?null:n.attachment.url),x("data-testid",n.componentId+"-lightbox"),m(2),d("src",n.attachment==null?null:n.attachment.url,vn)("alt",M(4,5,"Attachment")+" "+M(5,7,(n.attachment==null?null:n.attachment.name)||"preview")),x("data-testid",n.componentId+"-image")}}function JZe(i,o){if(i&1&&(f(0),u(1,QZe,6,9,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,XZe,e.template,pt(1,_me,e.componentConfigSignal,e.attachment,e.attachmentIndex,e.commentObj),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function eXe(i,o){if(i&1&&(f(0),u(1,JZe,2,12,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(6,ZZe,n.conditionSignal(),pt(1,_me,n.componentConfigSignal,n.attachment,n.attachmentIndex,n.commentObj)))}}var r2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-attachment-preview",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImagePreviewComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImagePreviewComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImagePreviewComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-image-preview"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["lightboxRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"src"],["velt-ignore-change-detection","true",3,"click","src","alt"]],template:function(t,r){t&1&&u(0,eXe,2,9,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["img[_ngcontent-%COMP%]{width:100%;object-fit:cover}"],changeDetection:0});let i=o;return i})();var yme=(i,o,n,e)=>({componentConfigSignal:i,commentObj:o,attachmentIndex:n,attachment:e}),tXe=(i,o)=>({condition:i,data:o}),nXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-image-delete-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function iXe(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6),w(3,"path",7)(4,"path",8),b()(),v()),i&2){let n=l(4);m(2),x("data-testid",n.componentId+"-icon")}}function oXe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),P(2,"translate"),G("click",function(t){N(n);let r=l(2).ngIf,a=l();return r==null||r.removeAttachment(a.attachmentIndex,a.commentObj),F(t.stopPropagation())}),u(3,iXe,5,1,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();d("title",M(1,4,"Delete Attachment")),x("aria-label",M(2,6,"Delete Attachment"))("data-testid",e.componentId),m(3),d("veltDynamicTemplate",$(13,nXe,e.template,pt(8,yme,e.componentConfigSignal,e.commentObj,e.attachmentIndex,e.attachment),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function rXe(i,o){if(i&1&&(f(0),u(1,oXe,4,19,"div",2),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",!(n!=null&&n.disabled)&&(e.commentObj==null||e.commentObj.from==null?null:e.commentObj.from.userId)===(n==null||n.user==null?null:n.user.userId)&&!(n!=null&&n.isPlanExpired))}}function aXe(i,o){if(i&1&&(f(0),u(1,rXe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,tXe,n.conditionSignal(),pt(1,yme,n.componentConfigSignal,n.commentObj,n.attachmentIndex,n.attachment)))}}var a2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-attachment-delete",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDeleteComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDeleteComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDeleteComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-image-delete"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","button",3,"title","click",4,"ngIf"],["type","button",3,"click","title"],[4,"veltDynamicTemplate"],[1,"icon-button","velt-comment-attachment--image-action-btn"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","currentColor","aria-hidden","true","focusable","false"],["d","M0 0h24v24H0V0z","fill","none"],["d","M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"]],template:function(t,r){t&1&&u(0,aXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-comment-attachment--image-action-btn[_ngcontent-%COMP%]{background:var(--velt-white);display:flex;align-items:center;border-radius:var(--velt-border-radius-3xl);width:40px;height:40px;justify-content:center;opacity:1;margin:var(--velt-spacing-xs);border:0;cursor:pointer;color:var(--velt-black)}"],changeDetection:0});let i=o;return i})();var Sme=(i,o,n,e)=>({componentConfigSignal:i,commentObj:o,attachmentIndex:n,attachment:e}),sXe=(i,o)=>({condition:i,data:o}),lXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-image-download-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function cXe(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6)(3,"g"),w(4,"rect",7),b(),_(5,"g"),w(6,"path",8),b()()(),v()),i&2){let n=l(4);m(2),x("data-testid",n.componentId+"-icon")}}function dXe(i,o){if(i&1){let n=Y();_(0,"div",3),P(1,"translate"),P(2,"translate"),G("click",function(t){N(n);let r=l(2).ngIf,a=l();return r==null||r.downloadAttachment(a.attachment),F(t.stopPropagation())}),u(3,cXe,7,1,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();d("title",M(1,4,"Download Attachment")),x("aria-label",M(2,6,"Download Attachment"))("data-testid",e.componentId),m(3),d("veltDynamicTemplate",$(13,lXe,e.template,pt(8,Sme,e.componentConfigSignal,e.commentObj,e.attachmentIndex,e.attachment),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function mXe(i,o){if(i&1&&(f(0),u(1,dXe,4,19,"div",2),v()),i&2){let n=l().ngIf;m(),d("ngIf",!(n!=null&&n.disabled)&&(n==null||n.user==null?null:n.user.userId)&&!(!(n==null||n.user==null)&&n.user.isAnonymous)&&!(n!=null&&n.isPlanExpired))}}function pXe(i,o){if(i&1&&(f(0),u(1,mXe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,sXe,n.conditionSignal(),pt(1,Sme,n.componentConfigSignal,n.commentObj,n.attachmentIndex,n.attachment)))}}var s2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,t,r),this.elementRef=e,this.dynamicDataService=t,this.loggingService=r,this.componentId="velt-attachment-download",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDownloadComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDownloadComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageDownloadComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(S),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-image-download"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","button",3,"title","click",4,"ngIf"],["type","button",3,"click","title"],[4,"veltDynamicTemplate"],[1,"icon-button","velt-comment-attachment--image-action-btn"],["xmlns","http://www.w3.org/2000/svg","enable-background","new 0 0 24 24","height","24px","viewBox","0 0 24 24","width","24px","fill","currentColor","aria-hidden","true","focusable","false"],["fill","none","height","24","width","24"],["d","M18,15v3H6v-3H4v3c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2v-3H18z M17,11l-1.41-1.41L13,12.17V4h-2v8.17L8.41,9.59L7,11l5,5 L17,11z"]],template:function(t,r){t&1&&u(0,pXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-comment-attachment--image-action-btn[_ngcontent-%COMP%]{background:var(--velt-white);display:flex;align-items:center;border-radius:var(--velt-border-radius-3xl);width:40px;height:40px;justify-content:center;opacity:1;margin:var(--velt-spacing-xs);border:0;cursor:pointer;color:var(--velt-black)}"],changeDetection:0});let i=o;return i})();var bme=(i,o,n,e)=>({componentConfigSignal:i,attachmentIndex:o,attachment:n,commentObj:e}),gXe=(i,o)=>({condition:i,data:o}),uXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-image-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function hXe(i,o){if(i&1&&(_(0,"div",8),P(1,"translate"),w(2,"app-comment-dialog-thread-card-attachments-image-download",7)(3,"app-comment-dialog-thread-card-attachments-image-delete",7),b()),i&2){let n=l(5);x("data-testid",n.componentId+"-actions")("aria-label",M(1,10,"Image attachment actions")),m(2),d("componentConfigSignal",n.componentConfigSignal)("attachmentIndex",n.attachmentIndex)("commentObj",n.commentObj)("attachment",n.attachment),m(),d("componentConfigSignal",n.componentConfigSignal)("attachmentIndex",n.attachmentIndex)("commentObj",n.commentObj)("attachment",n.attachment)}}function fXe(i,o){if(i&1&&(f(0),_(1,"div",5),P(2,"translate"),u(3,hXe,4,12,"div",6),w(4,"app-comment-dialog-thread-card-attachments-image-preview",7),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),x("aria-label",M(2,7,"Image attachment controls"))("data-testid",e.componentId),m(2),d("ngIf",!(n!=null&&n.readOnly)),m(),d("componentConfigSignal",e.componentConfigSignal)("attachmentIndex",e.attachmentIndex)("commentObj",e.commentObj)("attachment",e.attachment)}}function vXe(i,o){if(i&1&&(f(0),u(1,fXe,5,9,"ng-container",4),v()),i&2){l(2);let n=de(3),e=l();m(),d("ngIf",!e.showLoadingTemplate)("ngIfElse",n)}}function CXe(i,o){if(i&1&&(f(0),u(1,vXe,2,2,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,uXe,e.template,pt(1,bme,e.componentConfigSignal,e.attachmentIndex,e.attachment,e.commentObj),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function _Xe(i,o){i&1&&w(0,"velt-skeleton-loader-internal",9)}function yXe(i,o){if(i&1&&(f(0),u(1,CXe,2,12,"ng-container",2)(2,_Xe,1,0,"ng-template",null,0,xe),v()),i&2){let n=l();m(),d("veltIf",k(6,gXe,n.conditionSignal(),pt(1,bme,n.componentConfigSignal,n.attachmentIndex,n.attachment,n.commentObj)))}}var l2=(()=>{let o=class o extends H{get attachment(){return this._attachment}set attachment(e){try{this._attachment=e,this.setShowLoadingTemplate()}catch{}}get imageWireframe(){return this._imageWireframe}set imageWireframe(e){this._imageWireframe=e,this.imageWireframe?this.template=this.domService.deepCloneElement(this.imageWireframe):this.template=null}constructor(e,t,r,a){super(t,a,r),this.domService=e,this.elementRef=t,this.loggingService=r,this.dynamicDataService=a,this.showLoadingTemplate=!1,this.componentId="velt-comment-attachment-image",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageComponent ngOnDestroy:",e)}}setShowLoadingTemplate(){try{this.attachment?.isAttachmentResolverUsed&&!this.attachment?.url?this.showLoadingTemplate=!0:this.showLoadingTemplate=!1}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageComponent setShowLoadingTemplate: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsImageComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-image"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex",imageWireframe:"imageWireframe"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["loadingTemplateRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngIf","ngIfElse"],["velt-ignore-change-detection","true","role","group",1,"comment-attachment","velt-comment-attachment--image"],["class","comment-attachment-actions velt-comment-attachment--image-actions","role","group",4,"ngIf"],[3,"componentConfigSignal","attachmentIndex","commentObj","attachment"],["role","group",1,"comment-attachment-actions","velt-comment-attachment--image-actions"],["height","20px","width","200px","borderRadius","20px",1,"velt-thread-card--message"]],template:function(t,r){t&1&&u(0,yXe,4,9,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-comment-attachment--image[_ngcontent-%COMP%]{border-radius:var(--velt-border-radius-sm);overflow:hidden;line-height:0;position:relative;max-width:400px}.velt-comment-attachment--image[_ngcontent-%COMP%] .velt-comment-attachment--image-actions[_ngcontent-%COMP%]{position:absolute;bottom:8px;right:8px;display:flex;opacity:0}.velt-comment-attachment--image[_ngcontent-%COMP%]:hover .velt-comment-attachment--image-actions[_ngcontent-%COMP%]{opacity:1}.velt-comment-attachment--image[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--velt-spacing-lg)}"],changeDetection:0});let i=o;return i})();var SXe=(i,o,n,e)=>({componentConfigSignal:i,commentObj:o,attachmentIndex:n,attachment:e}),bXe=(i,o)=>({condition:i,data:o}),IXe=i=>({componentConfigSignal:i}),EXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-delete-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function xXe(i,o){if(i&1&&(f(0),_(1,"div",5),le(),_(2,"svg",6),w(3,"path",7),b()(),v()),i&2){let n=l(4);m(),x("data-testid",n.componentId+"-icon")}}function TXe(i,o){if(i&1){let n=Y();_(0,"button",3),P(1,"translate"),G("click",function(t){N(n);let r=l(2).ngIf,a=l();return r==null||r.removeAttachment(a.attachmentIndex,a.commentObj),F(t.stopPropagation())}),u(2,xXe,4,1,"ng-container",4),b()}if(i&2){let n=l(2).ngIf,e=l();x("aria-label",M(1,3,"Delete attachment"))("data-testid",e.componentId),m(2),d("veltDynamicTemplate",$(7,EXe,e.template,A(5,IXe,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function DXe(i,o){if(i&1&&(f(0),u(1,TXe,3,13,"button",2),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",!(n!=null&&n.disabled)&&(e.commentObj==null||e.commentObj.from==null?null:e.commentObj.from.userId)===(n==null||n.user==null?null:n.user.userId)&&!(n!=null&&n.isPlanExpired))}}function wXe(i,o){if(i&1&&(f(0),u(1,DXe,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,bXe,n.conditionSignal(),pt(1,SXe,n.componentConfigSignal,n.commentObj,n.attachmentIndex,n.attachment)))}}var c2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-attachment-other-delete",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDeleteComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDeleteComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDeleteComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other-delete"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","button",3,"click",4,"ngIf"],["type","button",3,"click"],[4,"veltDynamicTemplate"],[1,"attachment-icon-btn","velt-comment-attachment--action-btn"],["width","18","height","19","viewBox","0 0 18 19","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false"],["d","M3 5.75H15M7.5 8.75V13.25M10.5 8.75V13.25M3.75 5.75L4.5 14.75C4.5 15.1478 4.65804 15.5294 4.93934 15.8107C5.22064 16.092 5.60218 16.25 6 16.25H12C12.3978 16.25 12.7794 16.092 13.0607 15.8107C13.342 15.5294 13.5 15.1478 13.5 14.75L14.25 5.75M6.75 5.75V3.5C6.75 3.30109 6.82902 3.11032 6.96967 2.96967C7.11032 2.82902 7.30109 2.75 7.5 2.75H10.5C10.6989 2.75 10.8897 2.82902 11.0303 2.96967C11.171 3.11032 11.25 3.30109 11.25 3.5V5.75","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,wXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex;align-items:center}button[_ngcontent-%COMP%]{background:transparent;border:0;display:flex;margin:0;padding:0}.velt-comment-attachment--action-btn[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-sm);cursor:pointer;align-items:center;color:var(--velt-error)}"],changeDetection:0});let i=o;return i})();var OXe=(i,o,n,e)=>({componentConfigSignal:i,commentObj:o,attachmentIndex:n,attachment:e}),AXe=(i,o)=>({condition:i,data:o}),PXe=i=>({componentConfigSignal:i}),MXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-download-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function kXe(i,o){if(i&1&&(f(0),_(1,"div",4),le(),_(2,"svg",5),w(3,"path",6),b()(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId+"-icon")}}function RXe(i,o){if(i&1){let n=Y();f(0),_(1,"button",2),P(2,"translate"),P(3,"translate"),G("click",function(t){N(n);let r=l().ngIf,a=l();return r==null||r.downloadAttachment(a.attachment),F(t.stopPropagation())}),u(4,kXe,4,1,"ng-container",3),b(),v()}if(i&2){let n=l().ngIf,e=l();m(),x("title",M(2,4,"Download attachment"))("aria-label",M(3,6,"Download attachment"))("data-testid",e.componentId),m(3),d("veltDynamicTemplate",$(10,MXe,e.template,A(8,PXe,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function NXe(i,o){if(i&1&&(f(0),u(1,RXe,5,16,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,AXe,n.conditionSignal(),pt(1,OXe,n.componentConfigSignal,n.commentObj,n.attachmentIndex,n.attachment)))}}var d2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-attachment-other-download",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDownloadComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDownloadComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherDownloadComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other-download"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["type","button",3,"click"],[4,"veltDynamicTemplate"],[1,"attachment-icon-btn","velt-comment-attachment--action-btn"],["width","18","height","19","viewBox","0 0 18 19","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false"],["d","M3 13.25V14.75C3 15.1478 3.15804 15.5294 3.43934 15.8107C3.72064 16.092 4.10218 16.25 4.5 16.25H13.5C13.8978 16.25 14.2794 16.092 14.5607 15.8107C14.842 15.5294 15 15.1478 15 14.75V13.25M5.25 8.75L9 12.5M9 12.5L12.75 8.75M9 12.5V3.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&u(0,NXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex;align-items:center}button[_ngcontent-%COMP%]{background:transparent;border:0;display:flex;margin:0;padding:0}.velt-comment-attachment--action-btn[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-sm);cursor:pointer;align-items:center;color:var(--velt-accent)}"],changeDetection:0});let i=o;return i})();var Ime=(i,o,n,e)=>({componentConfigSignal:i,attachment:o,attachmentIndex:n,commentObj:e}),FXe=(i,o)=>({condition:i,data:o}),LXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-icon-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function BXe(i,o){if(i&1&&(f(0),w(1,"velt-file-icon-internal",3),v()),i&2){let n=l(3);m(),d("type",n.attachment==null?null:n.attachment.mimeType),x("data-testid",n.componentId)}}function VXe(i,o){if(i&1&&(f(0),u(1,BXe,2,2,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,LXe,e.template,pt(1,Ime,e.componentConfigSignal,e.attachment,e.attachmentIndex,e.commentObj),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function UXe(i,o){if(i&1&&(f(0),u(1,VXe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,FXe,n.conditionSignal(),pt(1,Ime,n.componentConfigSignal,n.attachment,n.attachmentIndex,n.commentObj)))}}var m2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-attachment-other-icon",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherIconComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherIconComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherIconComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other-icon"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"type"]],template:function(t,r){t&1&&u(0,UXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:flex;color:var(--velt-accent)}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let i=o;return i})();var Eme=(i,o,n,e)=>({componentConfigSignal:i,attachment:o,attachmentIndex:n,commentObj:e}),jXe=(i,o)=>({condition:i,data:o}),$Xe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-name-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function HXe(i,o){if(i&1&&(f(0),_(1,"span",3),P(2,"translate"),te(3),P(4,"translate"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId)("aria-label","File name: "+M(2,3,(n.attachment==null?null:n.attachment.name)||"")),m(2),ze(M(4,5,n.attachment==null?null:n.attachment.name))}}function zXe(i,o){if(i&1&&(f(0),u(1,HXe,5,7,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,$Xe,e.template,pt(1,Eme,e.componentConfigSignal,e.attachment,e.attachmentIndex,e.commentObj),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function GXe(i,o){if(i&1&&(f(0),u(1,zXe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,jXe,n.conditionSignal(),pt(1,Eme,n.componentConfigSignal,n.attachment,n.attachmentIndex,n.commentObj)))}}var p2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-attachment-other-name",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherNameComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other-name"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"attachment-name","velt-comment-attachment--name"]],template:function(t,r){t&1&&u(0,GXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{line-height:normal}.velt-comment-attachment--name[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-3);text-overflow:ellipsis;font-size:var(--velt-font-size-xs);font-style:normal;font-weight:600;line-height:normal;white-space:nowrap}"],changeDetection:0});let i=o;return i})();var xme=(i,o,n,e)=>({componentConfigSignal:i,attachment:o,attachmentIndex:n,commentObj:e}),WXe=(i,o)=>({condition:i,data:o}),qXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-size-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function YXe(i,o){if(i&1&&(f(0),_(1,"span",3),P(2,"translate"),P(3,"fileSize"),te(4),P(5,"fileSize"),b(),v()),i&2){let n=l(3);m(),x("data-testid",n.componentId)("aria-label",M(2,3,"File size:")+" "+M(3,5,n.attachment==null?null:n.attachment.size)),m(3),ze(M(5,7,n.attachment==null?null:n.attachment.size))}}function KXe(i,o){if(i&1&&(f(0),u(1,YXe,6,9,"ng-container",2),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,qXe,e.template,pt(1,xme,e.componentConfigSignal,e.attachment,e.attachmentIndex,e.commentObj),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function ZXe(i,o){if(i&1&&(f(0),u(1,KXe,2,12,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(6,WXe,n.conditionSignal(),pt(1,xme,n.componentConfigSignal,n.attachment,n.attachmentIndex,n.commentObj)))}}var g2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-attachment-other-size",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherSizeComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherSizeComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherSizeComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other-size"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"attachment-size","velt-comment-attachment--size"]],template:function(t,r){t&1&&u(0,ZXe,2,9,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{line-height:normal}.velt-comment-attachment--size[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-7);text-overflow:ellipsis;font-size:var(--velt-font-size-2xs);font-style:normal;font-weight:500;line-height:normal}"],changeDetection:0});let i=o;return i})();var Tme=(i,o,n,e)=>({componentConfigSignal:i,attachmentIndex:o,commentObj:n,attachment:e}),XXe=(i,o)=>({condition:i,data:o}),QXe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-other-wireframe",variant:n,setIfCondition:e,componentElementRef:t});function JXe(i,o){if(i&1&&(_(0,"div",10),w(1,"app-comment-dialog-thread-card-attachments-other-download",7)(2,"app-comment-dialog-thread-card-attachments-other-delete",7),b()),i&2){let n=l(5);x("data-testid",n.componentId+"-actions")("aria-label","Attachment actions"),m(),d("componentConfigSignal",n.componentConfigSignal)("attachmentIndex",n.attachmentIndex)("commentObj",n.commentObj)("attachment",n.attachment),m(),d("componentConfigSignal",n.componentConfigSignal)("attachmentIndex",n.attachmentIndex)("commentObj",n.commentObj)("attachment",n.attachment)}}function eQe(i,o){if(i&1&&(f(0),_(1,"div",5),P(2,"translate"),_(3,"div",6),w(4,"app-comment-dialog-thread-card-attachments-other-icon",7),b(),_(5,"div",8),w(6,"app-comment-dialog-thread-card-attachments-other-name",7)(7,"app-comment-dialog-thread-card-attachments-other-size",7),b(),u(8,JXe,3,10,"div",9),b(),v()),i&2){let n=l(3).ngIf,e=l();m(),x("data-testid",e.componentId)("aria-label","Attachment: "+M(2,18,(e.attachment==null?null:e.attachment.name)||"")),m(2),x("data-testid",e.componentId+"-icon"),m(),d("componentConfigSignal",e.componentConfigSignal)("attachmentIndex",e.attachmentIndex)("commentObj",e.commentObj)("attachment",e.attachment),m(),x("data-testid",e.componentId+"-details")("aria-label","Attachment details"),m(),d("componentConfigSignal",e.componentConfigSignal)("attachmentIndex",e.attachmentIndex)("commentObj",e.commentObj)("attachment",e.attachment),m(),d("componentConfigSignal",e.componentConfigSignal)("attachmentIndex",e.attachmentIndex)("commentObj",e.commentObj)("attachment",e.attachment),m(),d("ngIf",!(n!=null&&n.readOnly))}}function tQe(i,o){if(i&1&&(f(0),u(1,eQe,9,20,"ng-container",4),v()),i&2){l(2);let n=de(3),e=l();m(),d("ngIf",!e.showLoadingTemplate)("ngIfElse",n)}}function nQe(i,o){if(i&1&&(f(0),u(1,tQe,2,2,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(6,QXe,e.template,pt(1,Tme,e.componentConfigSignal,e.attachmentIndex,e.commentObj,e.attachment),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function iQe(i,o){i&1&&w(0,"velt-skeleton-loader-internal",11)}function oQe(i,o){if(i&1&&(f(0),u(1,nQe,2,12,"ng-container",2)(2,iQe,1,0,"ng-template",null,0,xe),v()),i&2){let n=l();m(),d("veltIf",k(6,XXe,n.conditionSignal(),pt(1,Tme,n.componentConfigSignal,n.attachmentIndex,n.commentObj,n.attachment)))}}var u2=(()=>{let o=class o extends H{get attachment(){return this._attachment}set attachment(e){try{this._attachment=e,this.setShowLoadingTemplate()}catch{}}get otherWireframe(){return this._otherWireframe}set otherWireframe(e){this._otherWireframe=e,this.otherWireframe?this.template=this.domService.deepCloneElement(this.otherWireframe):this.template=null}constructor(e,t,r,a){super(t,a,r),this.domService=e,this.elementRef=t,this.loggingService=r,this.dynamicDataService=a,this.showLoadingTemplate=!1,this.componentId="velt-attachment-other",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,attachmentIndex:this.attachmentIndex,attachment:this.attachment,commentObj:this.commentObj}),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherComponent ngOnDestroy:",e)}}setShowLoadingTemplate(){try{this.attachment?.isAttachmentResolverUsed&&!this.attachment?.url?this.showLoadingTemplate=!0:this.showLoadingTemplate=!1}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherComponent setShowLoadingTemplate: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","article"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsOtherComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments-other"]],inputs:{commentObj:"commentObj",attachment:"attachment",attachmentIndex:"attachmentIndex",otherWireframe:"otherWireframe"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["loadingTemplateRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[4,"ngIf","ngIfElse"],["role","article",1,"comment-pdf-attachment","velt-comment-attachment"],["role","presentation",1,"attachment-icon","velt-comment-attachment--icon"],[3,"componentConfigSignal","attachmentIndex","commentObj","attachment"],["role","group",1,"attachment-details","velt-comment-attachment--details"],["class","attachment-actions velt-comment-attachment--actions","role","group",4,"ngIf"],["role","group",1,"attachment-actions","velt-comment-attachment--actions"],["height","20px","width","200px","borderRadius","20px",1,"velt-thread-card--message"]],template:function(t,r){t&1&&u(0,oQe,4,9,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-comment-attachment[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-sm) var(--velt-spacing-xs) var(--velt-spacing-sm) var(--velt-spacing-md);justify-content:space-between;gap:var(--velt-spacing-sm);align-items:center;align-self:stretch;width:100%;border-radius:var(--velt-border-radius-sm);border:1px solid var(--velt-border-4);box-sizing:border-box}.velt-comment-attachment[_ngcontent-%COMP%] .velt-comment-attachment--icon[_ngcontent-%COMP%]{display:flex}.velt-comment-attachment[_ngcontent-%COMP%] .velt-comment-attachment--details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-xs);flex:1;overflow:hidden}.velt-comment-attachment[_ngcontent-%COMP%] .velt-comment-attachment--actions[_ngcontent-%COMP%]{display:flex;width:0;overflow:hidden}.velt-comment-attachment[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--velt-spacing-lg)}.velt-comment-attachment[_ngcontent-%COMP%]:hover .velt-comment-attachment--actions[_ngcontent-%COMP%]{width:auto}"],changeDetection:0});let i=o;return i})();var Dme=(i,o,n)=>({componentConfigSignal:i,commentObj:o,i:n}),rQe=(i,o)=>({condition:i,data:o}),aQe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-attachments-wireframe",variant:n,setIfCondition:e,componentElementRef:t,replaceTemplate:!1});function sQe(i,o){i&1&&Ue(0)}function lQe(i,o){if(i&1&&(f(0),u(1,sQe,1,0,"ng-container",9),v()),i&2){l();let n=de(5);m(),d("ngTemplateOutlet",n)}}function cQe(i,o){if(i&1&&w(0,"app-comment-dialog-thread-card-attachments-other",10),i&2){let n=l(),e=n.$implicit,t=n.index,r=l(6);d("componentConfigSignal",r.componentConfigSignal)("attachment",e)("commentObj",r.commentObj)("attachmentIndex",t)("otherWireframe",r.otherWireframe)}}function dQe(i,o){if(i&1&&w(0,"app-comment-dialog-thread-card-attachments-image",11),i&2){let n=l(),e=n.$implicit,t=n.index,r=l(6);d("componentConfigSignal",r.componentConfigSignal)("attachmentIndex",t)("commentObj",r.commentObj)("attachment",e)("imageWireframe",r.imageWireframe)}}function mQe(i,o){if(i&1&&(f(0),u(1,lQe,2,1,"ng-container",8)(2,cQe,1,5,"ng-template",null,0,xe)(4,dQe,1,5,"ng-template",null,1,xe),v()),i&2){let n=o.$implicit,e=de(3);m(),d("ngIf",n==null||n.mimeType==null?null:n.mimeType.includes("image"))("ngIfElse",e)}}function pQe(i,o){if(i&1&&(_(0,"div",6),P(1,"translate"),u(2,mQe,6,2,"ng-container",7),b()),i&2){let n=l(4).ngIf,e=l();x("data-testid",e.componentId)("aria-label",M(1,4,"Attachments")+"("+(e.commentObj==null||e.commentObj.attachments==null?null:e.commentObj.attachments.length)+")"),m(2),d("ngForOf",e.commentObj==null?null:e.commentObj.attachments)("ngForTrackBy",n==null?null:n.trackByAttachmentId)}}function gQe(i,o){if(i&1&&(f(0),u(1,pQe,3,6,"div",5),v()),i&2){let n=l(4);m(),d("ngIf",n.commentObj==null||n.commentObj.attachments==null?null:n.commentObj.attachments.length)}}function uQe(i,o){if(i&1&&(f(0),u(1,gQe,2,1,"ng-container",2),v()),i&2){let n=l(3);m(),d("ngIf",n.commentObj)}}function hQe(i,o){if(i&1&&(f(0),u(1,uQe,2,1,"ng-container",4),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,aQe,e.template,je(1,Dme,e.componentConfigSignal,e.commentObj,e.i),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function fQe(i,o){if(i&1&&(f(0),u(1,hQe,2,11,"ng-container",3),v()),i&2){let n=l();m(),d("veltIf",k(5,rQe,n.conditionSignal(),je(1,Dme,n.componentConfigSignal,n.commentObj,n.i)))}}var h2=(()=>{let o=class o extends H{constructor(e,t,r){super(e,r,t),this.elementRef=e,this.loggingService=t,this.dynamicDataService=r,this.componentId="velt-thread-card-attachments",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,commentObj:this.commentObj,i:this.i}),this.setupA11yAttributes(),this.imageWireframe||(this.imageWireframe=this.template?.querySelector("velt-comment-dialog-thread-card-attachments-image-wireframe")),this.otherWireframe||(this.otherWireframe=this.template?.querySelector("velt-comment-dialog-thread-card-attachments-other-wireframe"))}catch{}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","region"),e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("aria-label","Comment attachments")}catch(e){this.loggingService.catch("Error in CommentDialogThreadCardAttachmentsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-thread-card-attachments"]],inputs:{commentObj:"commentObj",i:"i"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["otherAttachmentRef",""],["imageAttachmentRef",""],[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["class","comment-attachments velt-comment-attachments","velt-ignore-change-detection","true","role","region",4,"ngIf"],["velt-ignore-change-detection","true","role","region",1,"comment-attachments","velt-comment-attachments"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[3,"componentConfigSignal","attachment","commentObj","attachmentIndex","otherWireframe"],[3,"componentConfigSignal","attachmentIndex","commentObj","attachment","imageWireframe"]],template:function(t,r){t&1&&u(0,fQe,2,8,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]:empty{display:none}.velt-comment-attachments[_ngcontent-%COMP%]{gap:var(--velt-spacing-sm);display:flex;flex-direction:column}.velt-comment-attachments[_ngcontent-%COMP%]:not(:empty){margin:var(--velt-spacing-lg) 0 var(--velt-spacing-sm);padding-left:calc((3rem + 0px) * var(--velt-base-rem-unit))}"],changeDetection:0});let i=o;return i})();var wme=(i,o,n)=>({componentConfigSignal:i,commentObj:o,i:n}),vQe=(i,o)=>({condition:i,data:o}),CQe=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-dialog-thread-card-message-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),_Qe=(i,o,n,e,t)=>[i,o,n,e,t];function yQe(i,o){if(i&1){let n=Y();_(0,"div",7),P(1,"translate"),G("copy",function(t){return N(n),F(t.stopPropagation())}),te(2),P(3,"translate"),b()}if(i&2){let n=l(4).ngIf,e=l();ue("velt-thread-card--inline-mode",n==null?null:n.inlineCommentSectionMode)("velt-thread-card--draft",e.commentObj==null?null:e.commentObj.isDraft),x("data-testid",e.componentId+"-text")("aria-label",M(1,8,"Comment")+" "+(e.i+1))("data-comment-id",e.commentObj==null?null:e.commentObj.commentId),m(2),_e(" ",M(3,10,e.commentObj.commentText)," ")}}function SQe(i,o){if(i&1){let n=Y();_(0,"div",8),P(1,"sanitizeHtml"),P(2,"replaceAutocompleteList"),P(3,"safeHtml"),P(4,"translate"),G("copy",function(t){return N(n),F(t.stopPropagation())}),b()}if(i&2){let n=l(4).ngIf,e=l();ue("velt-thread-card--inline-mode",n==null?null:n.inlineCommentSectionMode)("velt-thread-card--draft",e.commentObj==null?null:e.commentObj.isDraft),d("innerHTML",Ja(3,16,eX(2,10,$(21,_Qe,M(1,8,e.commentObj.commentHtml),e.commentObj==null?null:e.commentObj.customList,e.commentObj==null?null:e.commentObj.toOrganizationUserGroup,e.commentObj==null?null:e.commentObj.taggedUserContacts,(n==null?null:n.dialogShadowDOM)&&!(n!=null&&n.template))),!1),Ji),x("data-testid",e.componentId+"-html")("aria-label",M(4,19,"Comment")+" "+(e.i+1))("data-comment-id",e.commentObj==null?null:e.commentObj.commentId)}}function bQe(i,o){if(i&1&&(f(0),u(1,yQe,4,12,"div",5)(2,SQe,5,27,"div",6),v()),i&2){let n=l(3).ngIf,e=l();m(),d("ngIf",(n==null?null:n.editCommentIndex)!==e.i&&e.commentObj.commentText&&!e.commentObj.commentHtml),m(),d("ngIf",(n==null?null:n.editCommentIndex)!==e.i&&e.commentObj.commentHtml)}}function IQe(i,o){if(i&1&&(f(0),u(1,bQe,3,2,"ng-container",4),v()),i&2){l(2);let n=de(3),e=l();m(),d("ngIf",!e.showLoadingTemplate)("ngIfElse",n)}}function EQe(i,o){if(i&1&&(f(0),u(1,IQe,2,2,"ng-container",3),v()),i&2){let n=l().ngIf,e=l();m(),d("veltDynamicTemplate",$(5,CQe,e.template,je(1,wme,e.componentConfigSignal,e.commentObj,e.i),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function xQe(i,o){i&1&&w(0,"velt-skeleton-loader-internal",9)}function TQe(i,o){if(i&1&&(f(0),u(1,EQe,2,11,"ng-container",2)(2,xQe,1,0,"ng-template",null,0,xe),v()),i&2){let n=l();m(),d("veltIf",k(5,vQe,n.conditionSignal(),je(1,wme,n.componentConfigSignal,n.commentObj,n.i)))}}var f2=(()=>{let o=class o extends H{get commentObj(){return this._commentObj}set commentObj(e){try{this._commentObj=e,this.setShowLoadingTemplate()}catch{}}constructor(e,t,r,a,s){super(a,s,t),this.authService=e,this.loggingService=t,this.renderer=r,this.elementRef=a,this.dynamicDataService=s,this.showLoadingTemplate=!1,this.componentId="velt-thread-card-message",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{this.setupA11yAttributes(),this.dynamicDataService.applyConditionalClasses(this.elementRef.nativeElement,{componentConfigSignal:this.componentConfigSignal,commentObj:this.commentObj,i:this.i}),this.setShowLoadingTemplate();let t=this.authService.getUser()?.email;if(t){let r=this.renderer.createElement("style");this.renderer.setProperty(r,"type","text/css"),this.renderer.setProperty(r,"innerHTML",`
510
510
  .velt-comment-dialog-thread-card-message--email-chip[email="${t}"] {