@veltdev/sdk-dev 4.5.0-beta.100 → 4.5.0-beta.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/velt.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltdev/sdk-dev",
3
- "version": "4.5.0-beta.100",
3
+ "version": "4.5.0-beta.101",
4
4
  "description": "Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.",
5
5
  "homepage": "https://velt.dev",
6
6
  "keywords": [
package/velt.js CHANGED
@@ -1,4 +1,4 @@
1
- var SNIPPYLY_VERSION = '4.5.0-beta.100';
1
+ var SNIPPYLY_VERSION = '4.5.0-beta.101';
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 sCe=Object.create;var Uw=Object.defineProperty,lCe=Object.defineProperties,cCe=Object.getOwnPropertyDescriptor,mCe=Object.getOwnPropertyDescriptors,dCe=Object.getOwnPropertyNames,Vw=Object.getOwnPropertySymbols,UG=Object.getPrototypeOf,B7=Object.prototype.hasOwnProperty,jG=Object.prototype.propertyIsEnumerable,pCe=Reflect.get;var VG=(i,o,t)=>o in i?Uw(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,I=(i,o)=>{for(var t in o||={})B7.call(o,t)&&VG(i,t,o[t]);if(Vw)for(var t of Vw(o))jG.call(o,t)&&VG(i,t,o[t]);return i},T=(i,o)=>lCe(i,mCe(o));var V7=(i,o)=>{var t={};for(var e in i)B7.call(i,e)&&o.indexOf(e)<0&&(t[e]=i[e]);if(i!=null&&Vw)for(var e of Vw(i))o.indexOf(e)<0&&jG.call(i,e)&&(t[e]=i[e]);return t};var gCe=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),jw=(i,o)=>{for(var t in o)Uw(i,t,{get:o[t],enumerable:!0})},uCe=(i,o,t,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of dCe(o))!B7.call(i,n)&&n!==t&&Uw(i,n,{get:()=>o[n],enumerable:!(e=cCe(o,n))||e.enumerable});return i};var $G=(i,o,t)=>(t=i!=null?sCe(UG(i)):{},uCe(o||!i||!i.__esModule?Uw(t,"default",{value:i,enumerable:!0}):t,i));var jd=(i,o,t)=>pCe(UG(i),t,o);var Q=(i,o,t)=>new Promise((e,n)=>{var r=m=>{try{s(t.next(m))}catch(p){n(p)}},a=m=>{try{s(t.throw(m))}catch(p){n(p)}},s=m=>m.done?e(m.value):Promise.resolve(m.value).then(r,a);s((t=t.apply(i,o)).next())});var oG=gCe((vlo,iG)=>{"use strict";var yt={};yt.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};yt.localCName=yt.generateIdentifier();yt.splitLines=function(i){return i.trim().split(`
@@ -434,7 +434,7 @@ This typically indicates that your device does not have a healthy Internet conne
434
434
  <velt-autocomplete-chip type="group" group='${h?.groupId?JSON.stringify(h||{}):void 0}' encoded-group='${h?.groupId?btoa(JSON.stringify(h||{})):void 0}' shadow-dom='${s?"true":"false"}'>
435
435
  </velt-autocomplete-chip>`)}}),e&&a?.length&&(a.filter((C,E,D)=>D.findIndex(L=>L.text===C.text)===E).forEach(C=>{if(C?.text){let E=new RegExp(ym(C.text),"g");e=e.replaceAll(E,D=>`
436
436
  <velt-autocomplete-chip type="contact" contact='${C?.contact?JSON.stringify(C||{}):void 0}' encoded-contact='${C?.contact?btoa(JSON.stringify(C||{})):void 0}' shadow-dom='${s?"true":"false"}'>
437
- </velt-autocomplete-chip>`)}}),(a?.filter(C=>!C.text).filter((C,E,D)=>D.findIndex(L=>L.userId===C.userId)===E)).forEach(C=>{if(C?.userId){let E=new RegExp(ym(`{{${C.userId}}}`),"g");e=e.replaceAll(E,D=>`<velt-autocomplete-chip type="loading" shadow-dom='${s?"true":"false"}'></velt-autocomplete-chip>`)}})),e}catch{return e}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275pipe=zi({name:"replaceAutocompleteList",type:o,pure:!0,standalone:!1});let i=o;return i})();var p0e=(()=>{let o=class o{set _hotkey(e){try{this.hotkey=e,this.setListData()}catch{}}set _listData(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),this.listData=n,this.setListData()}catch{}}constructor(e,n){this.autocompleteService=e,this.loggingService=n,this.hotkey="",this.listData=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteComponent","color: blue;")}catch(r){this.loggingService.catch("Error in AutocompleteComponent constructor: ",r)}}setListData(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: setListData","color: green;"),this.hotkey&&this.listData?.length&&this.autocompleteService.create({hotkey:this.hotkey,data:this.listData,type:"custom"})}catch(e){this.loggingService.catch("Error in AutocompleteComponent setListData: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: OnDestroy","color: green;"),this.hotkey&&this.autocompleteService.remove(this.hotkey)}catch(e){this.loggingService.catch("Error in AutocompleteComponent OnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(tl),u(y))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-internal"]],inputs:{_hotkey:[0,"hotkey","_hotkey"],_listData:[0,"listData","_listData"]},standalone:!1,decls:0,vars:0,template:function(n,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var hg=(()=>{let o=class o{constructor(e,n){this.domService=e,this.sanitizer=n}transform(e){try{let n=this.domService.sanitizeSvg(e);return this.sanitizer.bypassSecurityTrustHtml(n)}catch{return e}}};o.\u0275fac=function(n){return new(n||o)(u(Re,16),u(Bs,16))},o.\u0275pipe=zi({name:"safeSvg",type:o,pure:!0,standalone:!1});let i=o;return i})();var pen=()=>({"line-height":"20px"});function gen(i,o){if(i&1){let t=q();f(0),_(1,"mark",5),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),te(2),A(3,"translate"),S(),v()}if(i&2){let t=l(3).ngIf,e=l();d(),ge("velt-autocomplete--contact-chip-current-user",(t==null||t.user==null?null:t.user.userId)&&(t==null||t.contact==null?null:t.contact.userId)===(t==null||t.user==null?null:t.user.userId))("current-user-chip",(t==null||t.user==null?null:t.user.userId)&&(t==null||t.contact==null?null:t.contact.userId)===(t==null||t.user==null?null:t.user.userId)),d(),Ce(" ",P(3,5,(t==null||t.contact==null?null:t.contact.name)||(t==null||t.contact==null?null:t.contact.email)||e.email),"")}}function uen(i,o){if(i&1){let t=q();f(0),_(1,"mark",6),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),te(2),A(3,"translate"),S(),v()}if(i&2){let t=l(3).ngIf;d(2),Ce(" ",P(3,1,(t==null||t.group==null||t.group.group==null||t.group.group.metadata==null?null:t.group.group.metadata.groupName)||(t==null||t.group==null?null:t.group.text)),"")}}function hen(i,o){if(i&1&&(w(0,"div",10),A(1,"safeSvg")),i&2){let t=l(4).ngIf;c("innerHtml",P(1,1,t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.svg),Wi)}}function fen(i,o){if(i&1&&w(0,"img",11),i&2){let t=l(4).ngIf;c("src",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.url,mn)}}function ven(i,o){if(i&1){let t=q();f(0),_(1,"div",7),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),g(2,hen,2,3,"div",8)(3,fen,1,1,"img",9),_(4,"span"),te(5),A(6,"translate"),S()(),v()}if(i&2){let t=l(3).ngIf;d(2),c("ngIf",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.svg),d(),c("ngIf",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.url),d(2),je(P(6,3,t==null||t.custom==null||t.custom.custom==null?null:t.custom.custom.name))}}function Cen(i,o){if(i&1&&g(0,gen,4,7,"ng-container",3)(1,uen,4,3,"ng-container",3)(2,ven,7,5,"ng-container",3),i&2){let t=l(3);c("ngIf",t.type==="contact"),d(),c("ngIf",t.type==="group"),d(),c("ngIf",t.type==="custom")}}function _en(i,o){if(i&1&&w(0,"velt-autocomplete-chip-tooltip-internal",12),i&2){let t=l(2).ngIf,e=l();c("componentConfigSignal",e.componentConfigSignal)("shadowDom",!!(t!=null&&t.shadowDom))}}function yen(i,o){i&1&&(f(0),_(1,"app-overlay-tooltip"),g(2,Cen,3,3,"ng-template",null,1,Te)(4,_en,1,2,"ng-template",null,2,Te),S(),v())}function Sen(i,o){i&1&&w(0,"velt-skeleton-loader-internal",13),i&2&&c("borderRadius","4px")("customStyles",Ft(2,pen))}function ben(i,o){if(i&1&&(f(0),g(1,yen,6,0,"ng-container",4)(2,Sen,1,3,"ng-template",null,0,Te),v()),i&2){let t=pe(3),e=l();d(),c("ngIf",e.type!=="loading")("ngIfElse",t)}}var g0e=(()=>{let o=class o{set _custom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _group(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _contactData(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedContact(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedGroup(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedCustom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _shadowDom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}constructor(e,n,r,a,s){this.authService=e,this.autocompleteService=n,this.contactService=r,this.loggingService=a,this.commentService=s,this.type="contact",this.componentConfigSignal=xe({type:"contact"}),this.subscriptions=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteChipComponent","color: blue;"),this.subscriptions.push(this.commentService.getDialogShadowDOM$().subscribe(m=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{shadowDom:m}),p))}))}catch(m){this.loggingService.catch("Error in AutocompleteChipComponent constructor: ",m)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: ngOnInit","color: green;"),setTimeout(()=>{this.componentConfigSignal().type==="contact"&&(this.email||this.componentConfigSignal().contactData?.contact)&&(this.getCurrentUser(),this.email?(this.getContacts(),this.getUserByEmail(this.email)):this.componentConfigSignal().contactData?.contact&&this.componentConfigSignal.update(e=>(e=T(I({},e),{contact:e.contactData?.contact}),e))),this.componentConfigSignal().type==="group"&&this.getOrganizationGroups()},0)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&setTimeout(()=>{Object.keys(e).forEach(n=>{n==="_custom"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedCustom?.currentValue)try{a=JSON.parse(atob(e?._encodedCustom?.currentValue))}catch{}}return r=T(I({},r),{custom:a}),r}):n==="_group"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedGroup?.currentValue)try{a=JSON.parse(atob(e?._encodedGroup?.currentValue))}catch{}}return r=T(I({},r),{group:a}),r}):n==="_contactData"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedContact?.currentValue)try{a=JSON.parse(atob(e?._encodedContact?.currentValue))}catch{}}return r=T(I({},r),{contactData:a}),r}):n==="_shadowDom"?this.componentConfigSignal.update(r=>(r=I({},r),r.shadowDom=typeof e[n].currentValue=="string"?JSON.parse(e[n].currentValue):e[n].currentValue,r)):this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})},0)}catch(n){this.loggingService.catch("Error in AutocompleteChipComponent ngOnChanges: ",n)}}getCurrentUser(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getCurrentUser","color: green;"),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(n=>(n=T(I({},n),{user:e}),n))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getCurrentUser: ",e)}}getContacts(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getContacts","color: green;"),this.subscriptions.push(this.contactService.getUserContacts$().subscribe(e=>{let n=e?.find(r=>r.email===this.email);n&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:n}),r))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getContacts: ",e)}}getUserByEmail(e){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getUserByEmail","color: green;"),this.subscriptions.push(this.contactService.getUserByEmail$(e).subscribe(n=>{n&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:n}),r))}))}catch(n){this.loggingService.catch("Error in AutocompleteChipComponent getUserByEmail: ",n)}}getOrganizationGroups(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getOrganizationGroups","color: green;"),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{if(e){let n=e.find(r=>r?.metadata?.groupId===this.componentConfigSignal().group?.groupId);n&&this.componentConfigSignal().group&&this.componentConfigSignal.update(r=>(r=T(I({},r),{group:T(I({},r.group),{group:n})}),r))}}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getOrganizationGroups: ",e)}}onClick(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: onClick","color: green;");let e;this.componentConfigSignal().custom?.custom?e=T(I({},this.componentConfigSignal().custom?.custom),{type:"custom"}):this.componentConfigSignal().contact?(e={id:this.componentConfigSignal().contact?.userId,name:this.componentConfigSignal().contact?.name,description:this.componentConfigSignal().contact?.email,type:"contact"},this.componentConfigSignal().contact?.photoUrl&&(e.icon={url:this.componentConfigSignal().contact?.photoUrl})):this.componentConfigSignal().type==="contact"&&(e={id:void 0,name:void 0,description:this.email,type:"contact"}),e&&this.autocompleteService.setOnAutocompleteChipClick(e)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent onClick: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: unsubscribe","color: green;"),this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: OnDestroy","color: green;"),this.unsubscribe()}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent OnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(tl),u(_i),u(y),u(we))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-internal"]],inputs:{type:"type",email:"email",_custom:[0,"custom","_custom"],_group:[0,"group","_group"],_contactData:[0,"contact","_contactData"],_encodedContact:[0,"encodedContact","_encodedContact"],_encodedGroup:[0,"encodedGroup","_encodedGroup"],_encodedCustom:[0,"encodedCustom","_encodedCustom"],_shadowDom:[0,"shadowDom","_shadowDom"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["loadingTemplateRef",""],["triggerTemplate",""],["tooltipTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"velt-autocomplete--contact-chip",3,"click"],[1,"velt-autocomplete--group-chip",3,"click"],[1,"custom-chip",3,"click"],["class","custom-chip-icon custom-chip-icon-svg",3,"innerHtml",4,"ngIf"],["class","custom-chip-icon custom-chip-icon-img",3,"src",4,"ngIf"],[1,"custom-chip-icon","custom-chip-icon-svg",3,"innerHtml"],[1,"custom-chip-icon","custom-chip-icon-img",3,"src"],[3,"componentConfigSignal","shadowDom"],["width","64px",3,"borderRadius","customStyles"]],template:function(n,r){n&1&&g(0,ben,4,2,"ng-container",3),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,jm,h0,wo,hg,de],styles:["[_nghost-%COMP%]{display:inline-flex;line-height:32px}.custom-chip[_ngcontent-%COMP%]{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);word-break:break-word;padding:var(--velt-spacing-xs);margin:1px;gap:var(--velt-spacing-xs);opacity:0px;font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:120%;text-align:left;color:var(--velt-accent);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon.custom-chip-icon-img[_ngcontent-%COMP%]{max-height:12px}"],changeDetection:0});let i=o;return i})();var Ien=["customBtnRef"],Een=["*"],xen=i=>({componentConfigSignal:i}),Ten=(i,o)=>({condition:i,data:o}),Den=(i,o,t,e,n,r)=>({template:i,componentName:o,variant:t,suffix:e,setIfCondition:n,componentElementRef:r});function wen(i,o){if(i&1&&(_(0,"div",9)(1,"button",10),A(2,"translate"),le(),_(3,"svg",11)(4,"g",12),w(5,"path",13),S(),_(6,"defs")(7,"clipPath",14),w(8,"rect",15),S()()()()()),i&2){let t=l(4);x("data-testid",t.componentId+"-default-button"),d(),x("aria-label",P(2,2,"Open user tagging menu"))}}function Oen(i,o){i&1&&Ve(0)}function Aen(i,o){if(i&1&&(f(0),g(1,wen,9,4,"div",6),_(2,"div",7,1),g(4,Oen,1,0,"ng-container",8),S(),v()),i&2){l();let t=pe(6),e=l().ngIf,n=l();d(),c("ngIf",e==null?null:e.showDefaultBtn),d(),x("data-testid",n.componentId+"-custom-container"),d(2),c("ngTemplateOutlet",t)}}function Pen(i,o){i&1&&Nt(0)}function Men(i,o){if(i&1){let t=q();f(0),_(1,"div",4),A(2,"translate"),A(3,"translate"),G("click",function(){N(t);let n=l(2);return F(n.onClick())}),g(4,Aen,5,3,"ng-container",5),S(),g(5,Pen,1,0,"ng-template",null,0,Te),v()}if(i&2){let t=l().ngIf,e=l();d(),c("title",P(2,6,"Tag a user")),x("data-testid",e.componentId)("aria-expanded",!1)("aria-label",P(3,8,"Mention user"))("aria-controls",e.componentId+"-popup"),d(3),c("veltDynamicTemplate",Ns(10,Den,e.template,t==null||t.componentMeta==null?null:t.componentMeta.componentName,t==null||t.componentMeta==null?null:t.componentMeta.variant,t==null||t.componentMeta==null?null:t.componentMeta.suffix,e.setIfCondition.bind(e),e.elementRef))}}function ken(i,o){if(i&1&&(f(0),g(1,Men,7,17,"ng-container",3),v()),i&2){let t=l();d(),c("veltIf",k(3,Ten,t.conditionSignal(),M(1,xen,t.componentConfigSignal)))}}var u0e=(()=>{let o=class o extends tt{constructor(e,n,r,a,s){super(n,r,void 0,s,void 0,a,e),this.loggingService=e,this.elementRef=n,this.themeService=r,this.dynamicDataService=a,this.commentService=s,this.triggerElement=null,this.hotkey="@",this.buttonClick=new Ae,this.deviceInfo=new ti,this.componentConfigSignal=xe({componentMeta:this.componentMeta,showDefaultBtn:!1}),this.veltElement=!0,this.componentId="velt-autocomplete-tool"}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngOnInit:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})}catch(n){this.loggingService.catch("Error in AutocompleteToolComponent ngOnChanges: ",n)}}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||this.componentConfigSignal.update(e=>(e=T(I({},e),{showDefaultBtn:!0}),e))}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent setupA11yAttributes:",e)}}onClick(){try{if(this.trigger||this.triggerElement){let e=this.trigger?this.trigger._element?.nativeElement:null;if(!e&&this.triggerElement&&(e=this.triggerElement),e){if(e?.focus(),e?.hasAttribute("contenteditable")){if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase())){let n=window.getSelection();if(n&&n.rangeCount>0){let r=n.getRangeAt(0),a=document.createTextNode(this.hotkey);r.insertNode(a),r.setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r)}else e.innerText+=this.hotkey}else{let n=window?.getSelection()?.getRangeAt(0),r=n?.startContainer,a=n?.startOffset||0;if(r&&a>=0){let s;if(r.nodeType===Node.TEXT_NODE){let p=r.splitText(a);r=p.previousSibling,s=document.createTextNode(this.hotkey),e.insertBefore(s,p)}else s=document.createTextNode(this.hotkey),e.insertBefore(s,r.childNodes[a]);n=document.createRange(),n.setStart(s,s.length),n.collapse(!0);let m=window.getSelection();m?.removeAllRanges(),m?.addRange(n)}else e.innerText+=this.hotkey}setTimeout(()=>{let n=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(n)},100)}else if(["input","textarea"].includes(e?.tagName?.toLowerCase())){let n=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(n)}}}this.buttonClick.emit()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent onClick: ",e)}}setCursorToEndOfContenteditable(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorToEndOfContenteditable","color: green;");try{let n,r;document.createRange&&(n=document.createRange(),n.selectNodeContents(e),n.collapse(!1),r=window.getSelection(),r?.removeAllRanges(),r?.addRange(n))}catch(n){this.loggingService.catch("Error in AutocompleteToolComponent setCursorToEndOfContenteditable: ",n)}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(R),u(qe),u(b),u(we))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-tool-internal"]],viewQuery:function(n,r){if(n&1&&ot(Ien,5),n&2){let a;Je(a=et())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(n,r){n&2&&x("data-velt-element",r.veltElement)},inputs:{trigger:"trigger",triggerElement:"triggerElement",hotkey:"hotkey",template:"template",componentMeta:"componentMeta"},outputs:{buttonClick:"buttonClick"},standalone:!1,features:[U([b]),B,Ze],ngContentSelectors:Een,decls:1,vars:1,consts:[["content",""],["customBtnRef",""],[4,"ngIf"],[4,"veltIf"],["role","combobox","tabindex","0",1,"velt-autocomplete-tool",3,"click","title"],[4,"veltDynamicTemplate"],["class","action-btn",4,"ngIf"],[1,"custom-btn-container"],[4,"ngTemplateOutlet"],[1,"action-btn"],["type","button",1,"action__button"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["clip-path","url(#clip0_12828_43447)"],["d","M12.2142 9.00926C12.2142 9.86174 11.8756 10.6793 11.2728 11.2821C10.67 11.8849 9.85244 12.2235 8.99996 12.2235C8.14748 12.2235 7.32992 11.8849 6.72712 11.2821C6.12432 10.6793 5.78568 9.86174 5.78568 9.00926C5.78568 8.15678 6.12432 7.33921 6.72712 6.73641C7.32992 6.13362 8.14748 5.79497 8.99996 5.79497C9.85244 5.79497 10.67 6.13362 11.2728 6.73641C11.8756 7.33921 12.2142 8.15678 12.2142 9.00926ZM12.2142 9.00926L12.2142 10.2146C12.2142 10.7474 12.4259 11.2584 12.8026 11.6351C13.1794 12.0119 13.6904 12.2235 14.2232 12.2235C14.756 12.2235 15.267 12.0119 15.6437 11.6351C16.0204 11.2584 16.2321 10.7474 16.2321 10.2146V9.00926C16.2341 7.45523 15.7355 5.9419 14.8101 4.69343C13.8847 3.44496 12.5818 2.52777 11.0944 2.07773C9.60695 1.62769 8.01411 1.66873 6.55183 2.19478C5.08955 2.72083 3.83561 3.7039 2.97575 4.99837C2.1159 6.29284 1.69588 7.82985 1.77791 9.38171C1.85994 10.9336 2.43965 12.4177 3.43118 13.6143C4.4227 14.8109 5.7733 15.6563 7.28288 16.0253C8.79247 16.3943 10.3808 16.2672 11.8125 15.6628","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_12828_43447"],["width","18","height","18","fill","white"]],template:function(n,r){n&1&&(Vt(),g(0,ken,2,6,"ng-container",2)),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,Ct,ne,ae,de],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)}*[_ngcontent-%COMP%]{box-sizing:border-box}.action__button[_ngcontent-%COMP%]{border:0;border-radius:var(--velt-border-radius-full);width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;transition:.5s;color:var(--velt-text-10)}.action__button[_ngcontent-%COMP%]:hover{background:var(--velt-background-3);cursor:pointer}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0});let i=o;return i})();var Ren=["commentPinRef"];function Nen(i,o){if(i&1){let t=q();f(0),_(1,"div",2),G("pointerup",function(n){return N(t),l(2).togglePinSelection(),F(n.stopPropagation())})("touchend",function(n){return N(t),n.stopPropagation(),F(n.preventDefault())})("click",function(n){return N(t),F(n.stopPropagation())}),_(2,"snippyly-comment-pin",3,0),G("togglePinSelection",function(n){N(t);let r=l(2);return F(r.togglePinSelection(n))})("saveComment",function(n){N(t);let r=l(2);return F(r.saveComment(n))}),S()(),v()}if(i&2){let t=l().ngIf,e=l();d(),x("data-testid",e.componentId)("role","button")("tabindex",0),d(),c("annotation",t.commentPinAnnotation)("variant",e.variant)("containerComponentId",t.componentId)("commentPinSelected",!!t.commentPinSelected)("multipleCommentPinSelected",t.selectedAnnotationsMap[t.commentPinAnnotation==null?null:t.commentPinAnnotation.annotationId]&&e.objectKeys(t.selectedAnnotationsMap).length>1)("user",t.user),x("data-testid",e.componentId+"-pin")("aria-hidden","true")}}function Fen(i,o){if(i&1&&(f(0),g(1,Nen,4,11,"ng-container",1),v()),i&2){let t=o.ngIf;d(),c("ngIf",t.commentPinAnnotation&&t.user)}}var h0e=(()=>{let o=class o{set _folderId(e){try{this.componentConfigSignal.update(n=>(n=T(I({},n),{folderId:e}),n?.folderId?n.veltFolderId=Ho(n.folderId):n.veltFolderId=void 0,n)),this.getCommentAnnotationsForCommentPin()}catch{}}set _clientDocumentId(e){try{this.componentConfigSignal.update(n=>(n=T(I({},n),{clientDocumentId:e}),n?.clientDocumentId?n.documentId=this.docService.generateDocumentId(n.clientDocumentId):n.documentId=void 0,n)),this.getCommentAnnotationsForCommentPin()}catch{}}set _context(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),n&&typeof n=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{context:n}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}set _contextOptions(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),n&&typeof n=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contextOptions:n}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}constructor(e,n,r,a,s,m){this.authService=e,this.commentService=n,this.docService=r,this.domService=a,this.loggingService=s,this.elementRef=m,this.variant="default",this.objectKeys=Object.keys,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=xe({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},selectedAnnotationsLocationMap:{},componentId:`velt-comment-pin-${gn()}`}),this.subscriptions=[],this.componentId="velt-comment-pin",this.uniqueComponentId="velt-comment-pin-"+gn();try{this.loggingService.log("%c[WB] Creating Class: VeltCommentPinComponent","color: blue;"),this.temporaryMultiThreadAnnotationId=`temp_${this.uniqueComponentId}`,this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{user:p}),h))})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{selectedAnnotationsMap:p}),h)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{selectedAnnotationsLocationMap:p}),h)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsLocationMap$ subscription: ",p)})),this.subscriptions.push(this.commentService.getGroupMatchedComments$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{groupMatchedComments:p}),h))})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{this.commentPinRef&&(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.commentPinRef.updateOverlayPosition()}catch(p){this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$: ",p)}},p=>{this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$ subscription: ",p)}))}catch(p){this.catchError("Error in VeltCommentPinComponent constructor: ",p)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentPinComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{let n=e||this.componentConfigSignal().commentPinAnnotation;if(this.componentConfigSignal().selectedAnnotationsMap[n.annotationId])n?.ghostComment?.type!==qs.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${n?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");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(n,this.componentConfigSignal().componentId)}}catch(n){this.catchError("Error in VeltCommentPinComponent togglePinSelection: ",n)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationsForCommentPin(),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(n){this.catchError("Error in VeltCommentPinComponent ngOnChanges: ",n)}}getCommentAnnotationsForCommentPin(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationsForCommentComponent({type:"pin",annotationId:this.annotationId,folderId:this.componentConfigSignal().folderId,veltFolderId:this.componentConfigSignal().veltFolderId,clientDocumentId:this.componentConfigSignal().clientDocumentId,documentId:this.componentConfigSignal().documentId,context:this.componentConfigSignal().context,contextOptions:this.componentConfigSignal().contextOptions}).pipe(fe(e=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(n=>(this.resolvedCommentsOnDom=n,e)))),fe(e=>this.domService.getSelectedAnnotationsMap$().pipe(ce(n=>({commentPinAnnotation:e?.[0],selectedAnnotationsMap:n||{},commentAnnotations:e||[]}))))).subscribe(e=>{let n=null,r=!1,a=[];if(this.resolvedCommentsOnDom||this.componentConfigSignal().groupMatchedComments&&!this.annotationId)a=e?.commentAnnotations?.slice()||[];else{let m=e?.commentAnnotations?.filter(h=>h?.status?.type!=="terminal"),p=e?.commentAnnotations?.[0];m?.length?a=m:p&&e?.selectedAnnotationsMap?.[p.annotationId]&&(a=[p])}if(a?.length&&this.componentConfigSignal().groupMatchedComments&&!this.annotationId&&(r=a?.length>1||!a?.[0]?.isDraft),r){n=new e0,n.annotationId=this.temporaryMultiThreadAnnotationId,n.isTemporary=!0,n.from=a?.[0]?.from,n.metadata=a?.[0]?.metadata,this.componentConfigSignal().context&&(n.context=this.componentConfigSignal().context),n.commentAnnotationsMap={},n.commentAnnotations={};for(let m of a||[])m.annotationId&&(n.commentAnnotationsMap||(n.commentAnnotationsMap={}),n.commentAnnotationsMap[m.annotationId]=m,n.commentAnnotations||(n.commentAnnotations={}),n.commentAnnotations[m.annotationId]=!0)}let s=a?.length?a[a?.length-1]:null;n&&(s=n),this.componentConfigSignal.update(m=>(m=T(I({},m),{commentPinAnnotation:s,commentAnnotations:a||[]}),m))})}catch(e){this.catchError("Error in VeltCommentPinComponent getCommentAnnotationByAnnotationId: ",e)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{commentPinAnnotation:n}),r))})}catch(n){this.catchError("Error in VeltCommentPinComponent getMultiThreadCommentAnnotationByAnnotationId: ",n)}}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,n=this.componentConfigSignal().commentPinAnnotation,r=this.componentConfigSignal().sourceId;if(n){let a=!!e[n.annotationId];if(a)if(n?.isDraft)n?.sourceId&&(a=n?.sourceId===r,a&&this.domService.setSelectedAnnotationLocation(n.annotationId,this.componentConfigSignal().componentId));else{let s=this.componentConfigSignal().selectedAnnotationsLocationMap?.[n.annotationId];s&&(a=s===this.componentConfigSignal().componentId)}a!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinSelected:a}),s))}}catch(e){this.catchError("Error in VeltCommentPinComponent checkCommentPinSelected: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentPinComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnDestroy","color: green;"),this.unsubscribe()}catch(e){this.catchError("Error in VeltCommentPinComponent ngOnDestroy: ",e)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(n){this.catchError("Error in VeltCommentPinComponent saveComment: ",n)}}catchError(e,n,r){try{this.loggingService.catch(e,n,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(we),u(at),u(Re),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-pin-internal"]],viewQuery:function(n,r){if(n&1&&ot(Ren,5),n&2){let a;Je(a=et())&&(r.commentPinRef=a.first)}},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId",variant:"variant",_folderId:[0,"folderId","_folderId"],_clientDocumentId:[0,"documentId","_clientDocumentId"],_context:[0,"context","_context"],_contextOptions:[0,"contextOptions","_contextOptions"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentPinRef",""],[4,"ngIf"],[1,"velt-comment-pin",3,"pointerup","touchend","click"],[3,"togglePinSelection","saveComment","annotation","variant","containerComponentId","commentPinSelected","multipleCommentPinSelected","user"]],template:function(n,r){n&1&&g(0,Fen,2,1,"ng-container",1),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,mg],styles:[".velt-comment-pin[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0});let i=o;return i})();function Len(i,o){if(i&1){let t=q();f(0),_(1,"div",2),A(2,"translate"),G("pointerup",function(n){let r=N(t).$implicit;return l(2).togglePinSelection(r.commentAnnotation),F(n.stopPropagation())}),_(3,"snippyly-comment-pin",3),G("saveComment",function(n){let r=N(t).$implicit,a=l(2);return F(a.saveComment(n,r.commentAnnotation))}),S()(),v()}if(i&2){let t=o.$implicit,e=l(2);d(),rt("top",(t==null||t.position==null?null:t.position.y)+((e.position==null?null:e.position.y)||0),"px")("left",(t==null||t.position==null?null:t.position.x)+((e.position==null?null:e.position.x)||0),"px"),x("role","button")("aria-label",P(2,14,"Comment pin"))("aria-pressed",!!e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId])("data-testid",e.componentId+(t.commentAnnotation==null?null:t.commentAnnotation.annotationId))("tabindex",0),d(2),c("annotation",t.commentAnnotation)("commentPinSelected",e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length===1)("multipleCommentPinSelected",e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length>1)("user",e.user),x("aria-hidden",!0)}}function Ben(i,o){if(i&1&&(f(0),g(1,Len,4,16,"ng-container",1),v()),i&2){let t=l();d(),c("ngForOf",t.canvasCommentAnnotations)("ngForTrackBy",t.canvasCommentsTrackBy)}}var f0e=(()=>{let o=class o{set _position(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),this.position=n}catch{}}constructor(e,n,r,a,s,m){this.authService=e,this.docService=n,this.domService=r,this.commentService=a,this.loggingService=s,this.elementRef=m,this.position={},this.selectedAnnotationsMap={},this.canvasCommentAnnotations=[],this.objectKeys=Object.keys,this.commentAnnotations=[],this.subscriptions=[],this.componentId="velt-canvas-comment";try{this.loggingService.log("%c[WB] Creating Class: CanvasCommentComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.user=p})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.selectedAnnotationsMap=p},p=>{this.loggingService.catch("Error in CanvasCommentComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.docService.getDocumentPaths$().pipe(fe(p=>p?this.commentService.getAllCommentAnnotations({customClientDocumentId:p?.clientDocumentId,analytics:{enabled:!0,properties:{source:"internal",sourceId:"canvasComment"}}}):[])).subscribe(p=>{this.commentAnnotations=p||[],this.filterCanvasCommentAnnotations()}))}catch(p){this.loggingService.catch("Error in CanvasCommentComponent constructor: ",p)}}ngOnInit(){try{this.setupA11yAttributes(),this.filterCanvasCommentAnnotations()}catch(e){this.loggingService.catch("Error in CanvasCommentComponent ngOnInit: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CanvasCommentComponent setupA11yAttributes:",e)}}canvasCommentsTrackBy(e,n){return n.commentAnnotation.annotationId||""}filterCanvasCommentAnnotations(){try{this.canvasId?this.canvasCommentAnnotations=(this.commentAnnotations||[]).filter(e=>e?.context?.canvasCommentConfig?.id===this.canvasId).map(e=>({position:e.context.canvasCommentConfig.position,commentAnnotation:e})):this.canvasCommentAnnotations=[]}catch(e){this.loggingService.catch("Error in CanvasCommentComponent filterCanvasCommentAnnotations: ",e)}}togglePinSelection(e){try{if(this.selectedAnnotationsMap[e.annotationId])e?.ghostComment?.type!==qs.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${e?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let n=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(n||(n=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),n){let r=n.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(r){let a=document.getElementById(`comment-pin-container-${r}`)||document.querySelector(`[data-velt-id='${r}']`);a&&(a.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(e)}}catch(n){this.loggingService.catch("Error in CanvasCommentComponent togglePinSelection: ",n)}}saveComment(e,n){try{this.commentService.saveComment(n,e)}catch(r){this.loggingService.catch("Error in CanvasCommentComponent saveComment: ",r)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(at),u(Re),u(we),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["app-canvas-comment"]],inputs:{canvasId:"canvasId",_position:[0,"position","_position"]},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"velt-canvas-comment-pin",3,"pointerup"],[3,"saveComment","annotation","commentPinSelected","multipleCommentPinSelected","user"]],template:function(n,r){n&1&&g(0,Ben,2,2,"ng-container",0),n&2&&c("ngIf",r.user)},dependencies:[ht,Z,mg,de],styles:[".velt-canvas-comment-pin[_ngcontent-%COMP%]{position:absolute;transform:translateY(-100%)}"],changeDetection:0});let i=o;return i})();function Ven(i,o){if(i&1&&(f(0),w(1,"app-comments-minimap",1),A(2,"translate"),v()),i&2){let t=l().ngIf,e=l();d(),c("commentAnnotations",t.commentAnnotations)("user",t.user)("position",t.position)("targetScrollableElementId",t.targetScrollableElementId),x("data-testid",e.componentId+"-minimap")("role","complementary")("aria-label",P(2,8,"Comments minimap"))("aria-hidden",!(t.commentAnnotations!=null&&t.commentAnnotations.length))}}function Uen(i,o){if(i&1&&(f(0),g(1,Ven,3,10,"ng-container",0),v()),i&2){let t=o.ngIf;d(),c("ngIf",t.user)}}var v0e=(()=>{let o=class o{constructor(e,n,r,a){this.authService=e,this.commentService=n,this.loggingService=r,this.elementRef=a,this.targetScrollableElementId=null,this.position="right",this.componentConfigSignal=xe({commentAnnotations:[],user:null,position:"right",targetScrollableElementId:null}),this.subscriptions=[],this.componentId="velt-comments-minimap";try{this.loggingService.log("%c[WB] Creating CLASS: VeltCommentsMinimapComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.componentConfigSignal.update(m=>(m=T(I({},m),{user:s}),m))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getUser$: ",s)})),this.subscriptions.push(this.commentService.getCommentAnnotationsFromCommentsContainer$().subscribe(s=>{this.componentConfigSignal.update(m=>(m=T(I({},m),{commentAnnotations:s}),m))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getCommentAnnotationsFromCommentsContainer$: ",s)}))}catch(s){this.loggingService.catch("Error in VeltCommentsMinimapComponent constructor: ",s)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})}catch(n){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnChanges: ",n)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(we),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comments-minimap-internal"]],inputs:{targetScrollableElementId:"targetScrollableElementId",position:"position"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],[3,"commentAnnotations","user","position","targetScrollableElementId"]],template:function(n,r){n&1&&g(0,Uen,2,1,"ng-container",0),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,l7,de],encapsulation:2,changeDetection:0});let i=o;return i})();var jen=["waveformContainer"];function $en(i,o){i&1&&(le(),_(0,"svg",14),w(1,"rect",15),S())}function Hen(i,o){if(i&1&&(_(0,"div",16),te(1),A(2,"translate"),S()),i&2){let t=l().index,e=l(4);d(),Ce(" ",P(2,1,e.indexToTimeSignal()[t])," ")}}function zen(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),S()(),w(4,"div",10),_(5,"div",11),g(6,$en,2,0,"svg",12)(7,Hen,3,3,"div",13),S()()),i&2){let t=o.$implicit,e=o.index;d(),rt("height",t+"px"),ge("silent",t===2),d(5),c("ngIf",e%10===0),d(),c("ngIf",e%10===0)}}function Gen(i,o){if(i&1&&(f(0),_(1,"div",4),w(2,"div",5),_(3,"div",6),g(4,zen,8,6,"div",7),S()(),v()),i&2){let t=l(2).ngIf,e=l();d(4),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Wen(i,o){if(i&1&&(f(0),g(1,Gen,5,2,"ng-container",1),v()),i&2){let t=l().ngIf;d(),c("ngIf",t.isAudio)}}function qen(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),S()()),i&2){let t=o.$implicit;rt("height",t+"px")}}function Yen(i,o){if(i&1&&(_(0,"div",18),g(1,qen,3,2,"div",19),S()),i&2){let t=l(2).ngIf,e=l();ge("thread-mode",t.threadMode),d(),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Ken(i,o){if(i&1&&(f(0),g(1,Yen,2,4,"div",17),v()),i&2){let t=l().ngIf;d(),c("ngIf",t.isAudio&&(t.collapsedMode||t.threadMode))}}function Zen(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),S()()),i&2){let t=o.$implicit,e=o.index,n=l(2).ngIf;rt("height",t+"px"),ge("active-bar",e<=n.activeBarIndex)}}function Xen(i,o){if(i&1&&(f(0),_(1,"div",20),g(2,Zen,3,4,"div",21),S(),v()),i&2){let t=l().ngIf,e=l();d(2),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Qen(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),S()()()),i&2){let t=o.$implicit;d(),rt("height",t+"px")}}function Jen(i,o){if(i&1&&(f(0),_(1,"div",22)(2,"div",4),w(3,"div",5),_(4,"div",6),g(5,Qen,4,2,"div",7),S()()(),v()),i&2){let t=l().ngIf,e=l();d(5),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function etn(i,o){if(i&1&&w(0,"div",25),i&2){let t=o.$implicit;rt("height",t,"px")}}function ttn(i,o){if(i&1&&(f(0),_(1,"div",23),g(2,etn,1,2,"div",24),S(),v()),i&2){let t=l().ngIf,e=l();d(2),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function ntn(i,o){if(i&1&&(f(0),_(1,"div",26,0),le(),_(3,"svg",27)(4,"defs")(5,"linearGradient",28),w(6,"stop",29)(7,"stop",30)(8,"stop",31),S()(),w(9,"path",32),S()(),v()),i&2){let t=l().ngIf;d(9),x("d",t.mirroredWaveformPath)}}function itn(i,o){if(i&1&&(f(0)(1,2),g(2,Wen,2,1,"ng-container",3)(3,Ken,2,1,"ng-container",3)(4,Xen,3,2,"ng-container",3)(5,Jen,6,2,"ng-container",3)(6,ttn,3,2,"ng-container",3)(7,ntn,10,1,"ng-container",3),v()()),i&2){let t=o.ngIf;d(),c("ngSwitch",t.variant),d(),c("ngSwitchCase","expanded"),d(),c("ngSwitchCase","minified"),d(),c("ngSwitchCase","player"),d(),c("ngSwitchCase","preview"),d(),c("ngSwitchCase","preview-mini"),d(),c("ngSwitchCase","editor")}}var u_=(()=>{let o=class o{constructor(e,n){this.loggingService=e,this.recorderService=n,this.height=144,this.isRecording=!1,this.variant="expanded",this.isAudio=!1,this.collapsedMode=!1,this.threadMode=!1,this.numberOfBars=38,this.muteMic=null,this.maxVolumeArray=[],this.allowCleanUp=!0,this.animationFrameId=null,this.lastDrawTime=0,this.drawInterval=50,this.componentConfigSignal=xe({variant:"expanded",isAudio:!1,barHeights:[],collapsedMode:!1,threadMode:!1,activeBarIndex:-1,mirroredWaveformPath:""}),this.indexToTimeSignal=ki(()=>{let r=this.componentConfigSignal().barHeights||[],a=[];for(let s=0;s<r.length;s++){let m=this.indexToTime(s);a.push(m)}return a}),this.showWaveform=()=>{try{if(!this.bufferArray||this.bufferArray.length===0)return;let r=this.bufferArray.length/this.numberOfBars,a=[];for(let s=0;s<this.numberOfBars;s++){let m=s*r,p=m+r,h=0,C=0;for(let L=Math.floor(m);L<p&&L<this.bufferArray.length;L++)h+=this.bufferArray[L],C++;let D=(C>0?h/C:0)/255*this.height*3;a.push(D)}this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a})),this.updateMirroredWaveformPath()}catch(r){this.loggingService.warn("Error in AudioWaveformComponent showWaveform: ",r)}},this.draw=()=>{try{if(!this.analyzer)return;switch(this.analyzer.getByteFrequencyData(this.dataArray),this.componentConfigSignal().variant){case"preview":this.drawPreview();break;case"preview-mini":this.drawPreviewMini();break;default:this.drawDefault()}}catch(r){this.loggingService.warn("Error in AudioWaveformComponent draw: ",r)}}}ngOnInit(){try{this.bufferArray&&this.showWaveform(),setTimeout(()=>{this.setupResizeObserver()},100),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>T(I({},r),{[n]:e[n].currentValue}))}),e.playerCurrentTime&&e.playerCurrentTime.currentValue&&this.componentConfigSignal.update(n=>T(I({},n),{activeBarIndex:this.showActiveBars(e.playerCurrentTime.currentValue,this.totalTime.display)})),(e?.recorderInitData?.currentValue?.stream||e?.previewStream?.currentValue)&&(this.stopAnimation(),this.setupAudioElements(e.recorderInitData?.currentValue?.stream||e.previewStream.currentValue),this.startAnimation()),e.muteMic&&this.handleMicMute(e.muteMic.currentValue),this.updateMirroredWaveformPath()}catch(n){this.loggingService.warn("Error in AudioWaveformComponent ngOnChanges: ",n)}}trackByBarHeights(e,n){return e+"__"+n}showActiveBars(e,n){try{let r=p=>{let[h,C]=p.split(":").map(Number);return h*60+C},a=r(e),s=r(n)-1,m=s>0?a/s:0;return a>=s?this.numberOfBars:Math.floor(m*this.numberOfBars)}catch(r){return this.loggingService.warn("Error in AudioWaveformComponent showActiveBars: ",r),-1}}ngOnDestroy(){try{this.stopAnimation(),this.cleanupAudio(),this.cleanupResizeObserver()}catch{}}setupAudioElements(e){return Q(this,null,function*(){try{this.cleanupAudio(),this.audioContext=new AudioContext,this.stream=e,this.microphone=this.audioContext.createMediaStreamSource(this.stream),this.analyzer=this.audioContext.createAnalyser(),this.analyzer.smoothingTimeConstant=.8,this.microphone.connect(this.analyzer),this.dataArray=new Uint8Array(this.analyzer.frequencyBinCount),this.analyzer.fftSize=1024,this.handleMicMute(this.muteMic)}catch{this.dataArray=new Uint8Array(0)}})}noiseGate(e,n,r){try{for(let a=0;a<e.length;a++)e[a]=Math.abs(e[a])>n?e[a]-n+r:r}catch(a){this.loggingService.warn("Error in AudioWaveformComponent noiseGate: ",a)}}startAnimation(){try{let e=n=>{n-this.lastDrawTime>=this.drawInterval&&(this.draw(),this.lastDrawTime=n),this.animationFrameId=requestAnimationFrame(e)};this.animationFrameId=requestAnimationFrame(e)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent startAnimation: ",e)}}stopAnimation(){try{this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent stopAnimation: ",e)}}drawPreview(){try{this.noiseGate(this.dataArray,128,0);let e=1e3,n=Math.floor(this.dataArray.length/e),r=[];for(let s=0;s<e;s++){let m=s*n,p=Math.min(m+n,this.dataArray.length),h=this.dataArray.slice(m,p),C=h.reduce((E,D)=>E+D,0)/h.length;r.push(C)}r.sort((s,m)=>s-m);let a=[];for(let s=0;s<e;s++)a.push(r[s],r[s]);for(let s=e-1;s>=0;s--)a.push(r[s],r[s]);this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a.filter(m=>m!==0)})),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreview: ",e)}}drawPreviewMini(){try{this.noiseGate(this.dataArray,128,0);let e=Math.max(...this.dataArray),n=Math.max(2,Math.min(14,e/128*14));if(this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[Math.max(2,n/1.5),n,Math.max(2,n/2)]})),this.updateMirroredWaveformPath(),this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let r=Math.max(...this.dataArray);this.maxVolumeArray.push(r),this.recorderService.setRecordedDataStream(this.maxVolumeArray)}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreviewMini: ",e)}}drawDefault(){try{if(this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let e=Math.max(...this.dataArray),n=e/255*this.height*3;this.maxVolumeArray.push(e),this.recorderService.setRecordedDataStream(this.maxVolumeArray),this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[...r.barHeights,n]})),this.updateMirroredWaveformPath()}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawDefault: ",e)}}cleanupAudio(){try{this.allowCleanUp&&this.variant!=="expanded"&&(this.microphone&&(this.microphone.disconnect(),this.microphone=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.analyzer&&(this.analyzer.disconnect(),this.analyzer=null),this.audioContext&&this.audioContext.state!=="closed"&&(this.audioContext.close(),this.audioContext=null),this.componentConfigSignal.update(e=>T(I({},e),{barHeights:[]})),this.updateMirroredWaveformPath())}catch{}}handleMicMute(e){try{this.stream&&this.stream.getAudioTracks().forEach(n=>{n.enabled=!e})}catch(n){this.loggingService.warn("Error in AudioWaveformComponent handleMicMute: ",n)}}indexToTime(e){try{let n=e*100,r=Math.floor(n/1e3),a=Math.floor(r/60),s=r%60,m=a.toString().padStart(2,"0"),p=s.toString().padStart(2,"0");return`${m}:${p}`}catch(n){return this.loggingService.warn("Error in AudioWaveformComponent indexToTime: ",n),""}}generateMirroredWaveformPath(e,n,r){try{if(!e||e.length===0)return"";let a=r?e.slice(0,n):e.slice(n);if(a.length===0)return"";let s=r?0:n,m=e.length,p=100,C=18/2,E=Math.min(...a),L=Math.max(...a)-E,H=L>0?C*.8/L:.1,K=.5,oe="";if(a.length>0){let he=s/m*p;oe=`M ${he} ${C} `;let Se=he,Fe=L>0?(a[0]-E)*H:K,Ye=C-Math.max(Fe,K);oe+=`L ${Se} ${Ye} `;for(let ue=1;ue<a.length;ue++){let ve=(s+ue)/m*p,Le=(s+ue-1)/m*p,Ee=L>0?(a[ue]-E)*H:K,On=L>0?(a[ue-1]-E)*H:K,jn=C-Math.max(Ee,K),Mt=C-Math.max(On,K),Ot=Le+(ve-Le)/3,ft=Le+2*(ve-Le)/3;oe+=`C ${Ot} ${Mt}, ${ft} ${jn}, ${ve} ${jn} `}let Be=(s+a.length-1)/m*p;oe+=`L ${Be} ${C} `;let De=Be,be=L>0?(a[a.length-1]-E)*H:K,Oe=C+Math.max(be,K);oe+=`L ${De} ${Oe} `;for(let ue=a.length-2;ue>=0;ue--){let ve=(s+ue)/m*p,Le=(s+ue+1)/m*p,Ee=L>0?(a[ue]-E)*H:K,On=L>0?(a[ue+1]-E)*H:K,jn=C+Math.max(Ee,K),Mt=C+Math.max(On,K),Ot=Le-(Le-ve)/3,ft=Le-2*(Le-ve)/3;oe+=`C ${Ot} ${Mt}, ${ft} ${jn}, ${ve} ${jn} `}oe+="Z"}return oe}catch(a){return this.loggingService.warn("Error in AudioWaveformComponent generateMirroredWaveformPath: ",a),""}}onResize(){this.componentConfigSignal().variant==="editor"&&setTimeout(()=>{this.updateMirroredWaveformPath()},100)}updateMirroredWaveformPath(){try{let e=this.componentConfigSignal(),n=this.generateMirroredWaveformPath(e.barHeights,e.activeBarIndex+1,!1);this.componentConfigSignal.update(r=>T(I({},r),{mirroredWaveformPath:n}))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent updateMirroredWaveformPath: ",e)}}setupResizeObserver(){try{this.waveformContainer&&!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{this.updateMirroredWaveformPath()}),this.resizeObserver.observe(this.waveformContainer.nativeElement))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent setupResizeObserver: ",e)}}cleanupResizeObserver(){try{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent cleanupResizeObserver: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(fi))},o.\u0275cmp=O({type:o,selectors:[["app-audio-waveform"]],viewQuery:function(n,r){if(n&1&&ot(jen,5),n&2){let a;Je(a=et())&&(r.waveformContainer=a.first)}},hostBindings:function(n,r){n&1&&G("resize",function(){return r.onResize()},!1,IO)},inputs:{height:"height",isRecording:"isRecording",variant:"variant",isAudio:"isAudio",collapsedMode:"collapsedMode",bufferArray:"bufferArray",playerCurrentTime:"playerCurrentTime",totalTime:"totalTime",recorderInitData:"recorderInitData",threadMode:"threadMode",previewStream:"previewStream",numberOfBars:"numberOfBars",muteMic:"muteMic"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["waveformContainer",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"audio-waveform"],[1,"center-line"],[1,"waves"],["class","bar-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bar-container"],[1,"bar"],[1,"line"],[1,"time-container"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["class","time",4,"ngIf"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","width","1","height","8"],[1,"time"],["class","mini-audio-container",3,"thread-mode",4,"ngIf"],[1,"mini-audio-container"],["class","bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mini-audio-container-player"],["class","bar",3,"height","active-bar",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview"],[1,"audio-container-preview-mini"],["class","audio-container-preview-mini--bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview-mini--bar"],[1,"editor-player"],["width","100%","height","18","viewBox","0 0 100 18","preserveAspectRatio","none",1,"smooth-waveform"],["id","active-gradient","x1","0%","y1","0%","x2","0%","y2","100%"],["offset","0%","stop-color","var(--velt-text-8)","stop-opacity","1"],["offset","50%","stop-color","var(--velt-text-8)","stop-opacity","1"],["offset","100%","stop-color","var(--velt-text-8)","stop-opacity","1"],["fill","url(#active-gradient)"]],template:function(n,r){n&1&&g(0,itn,8,7,"ng-container",1),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[ht,Z,Li,Ki,de],styles:[".audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;border:1px solid var(--velt-border-3);border-radius:var(--velt-border-radius-lg)}.audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;height:144px;width:100%;z-index:2!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-xs);transition:height .5s ease}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar.silent[_ngcontent-%COMP%]{background:var(--velt-text-12)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{fill:var(--velt-background-4)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.mini-audio-container[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:flex-end;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container.thread-mode[_ngcontent-%COMP%]{width:100px}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-text-12);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%] .active-bar[_ngcontent-%COMP%]{background:var(--velt-accent-text)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:300px;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;border-width:0px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:144px;width:100%;z-index:2}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.audio-container-preview-mini[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:2px;width:28px;height:28px;background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl)}.audio-container-preview-mini[_ngcontent-%COMP%] .audio-container-preview-mini--bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-white);border-radius:var(--velt-border-radius-2xs);transition:height .1s}.editor-player[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;position:relative;margin-left:1.5px}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-text-12)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-accent-text)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:d .2s ease-in-out}"],changeDetection:0});let i=o;return i})();var otn=["knob"],rtn=["valueIndicatorContainer"];function atn(i,o){if(i&1&&(_(0,"div",2,1)(2,"div",5)(3,"span",6),te(4),S()()()),i&2){let t=l();d(4),je(t.valueIndicatorText)}}var stn=["trackActive"],ltn=["*"];function ctn(i,o){if(i&1&&w(0,"div"),i&2){let t=o.$implicit,e=o.$index,n=l(3);Xo(t===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),rt("transform",n._calcTickMarkTransform(e))}}function mtn(i,o){if(i&1&&ZK(0,ctn,1,4,"div",8,KK),i&2){let t=l(2);XK(t._tickMarks)}}function dtn(i,o){if(i&1&&(_(0,"div",6,1),g(2,mtn,2,0),S()),i&2){let t=l();d(2),Ql(t._cachedWidth?2:-1)}}function ptn(i,o){if(i&1&&w(0,"mat-slider-visual-thumb",7),i&2){let t=l();c("discrete",t.discrete)("thumbPosition",1)("valueIndicatorText",t.startValueIndicatorText)}}var Mn=function(i){return i[i.START=1]="START",i[i.END=2]="END",i}(Mn||{}),h_=function(i){return i[i.ACTIVE=0]="ACTIVE",i[i.INACTIVE=1]="INACTIVE",i}(h_||{}),wz=new ct("_MatSlider"),C0e=new ct("_MatSliderThumb"),gtn=new ct("_MatSliderRangeThumb"),_0e=new ct("_MatSliderVisualThumb");var utn=(()=>{class i{_cdr=ye(Kt);_ngZone=ye(Rt);_slider=ye(wz);_renderer=ye(qi);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=ye(R).nativeElement;_platform=ye(mo);constructor(){}ngAfterViewInit(){let t=this._slider._getInput(this.thumbPosition);t&&(this._ripple.radius=24,this._sliderInput=t,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let e=this._sliderInputEl,n=this._renderer;this._listenerCleanups=[n.listen(e,"pointermove",this._onPointerMove),n.listen(e,"pointerdown",this._onDragStart),n.listen(e,"pointerup",this._onDragEnd),n.listen(e,"pointerleave",this._onMouseLeave),n.listen(e,"focus",this._onFocus),n.listen(e,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t())}_onPointerMove=t=>{if(this._sliderInput._isFocused)return;let e=this._hostElement.getBoundingClientRect(),n=this._slider._isCursorOnSliderThumb(t,e);this._isHovered=n,n?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=t=>{t.button===0&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(t){return t?.state===Za.FADING_IN||t?.state===Za.VISIBLE}_showRipple(t,e){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===Mn.START?Mn.END:Mn.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!e)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:t,centered:!0,persistent:!0})}_hideRipple(t){if(t?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let e=this._getSibling();e._isShowingAnyRipple()||(this._hideValueIndicator(),e._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===Mn.START?Mn.END:Mn.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(e,n){if(e&1&&(ot(Pu,5),ot(otn,5),ot(rtn,5)),e&2){let r;Je(r=et())&&(n._ripple=r.first),Je(r=et())&&(n._knob=r.first),Je(r=et())&&(n._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[U([{provide:_0e,useExisting:i}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(e,n){e&1&&(g(0,atn,5,1,"div",2),w(1,"div",3,0)(3,"div",4)),e&2&&(Ql(n.discrete?0:-1),d(3),c("matRippleDisabled",!0))},dependencies:[Pu],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}
437
+ </velt-autocomplete-chip>`)}}),(a?.filter(C=>!C.text).filter((C,E,D)=>D.findIndex(L=>L.userId===C.userId)===E)).forEach(C=>{if(C?.userId){let E=new RegExp(ym(`{{${C.userId}}}`),"g");e=e.replaceAll(E,D=>`<velt-autocomplete-chip type="loading" shadow-dom='${s?"true":"false"}'></velt-autocomplete-chip>`)}})),e}catch{return e}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275pipe=zi({name:"replaceAutocompleteList",type:o,pure:!0,standalone:!1});let i=o;return i})();var p0e=(()=>{let o=class o{set _hotkey(e){try{this.hotkey=e,this.setListData()}catch{}}set _listData(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),this.listData=n,this.setListData()}catch{}}constructor(e,n){this.autocompleteService=e,this.loggingService=n,this.hotkey="",this.listData=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteComponent","color: blue;")}catch(r){this.loggingService.catch("Error in AutocompleteComponent constructor: ",r)}}setListData(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: setListData","color: green;"),this.hotkey&&this.listData?.length&&this.autocompleteService.create({hotkey:this.hotkey,data:this.listData,type:"custom"})}catch(e){this.loggingService.catch("Error in AutocompleteComponent setListData: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteComponent FUNCTION: OnDestroy","color: green;"),this.hotkey&&this.autocompleteService.remove(this.hotkey)}catch(e){this.loggingService.catch("Error in AutocompleteComponent OnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(tl),u(y))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-internal"]],inputs:{_hotkey:[0,"hotkey","_hotkey"],_listData:[0,"listData","_listData"]},standalone:!1,decls:0,vars:0,template:function(n,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var hg=(()=>{let o=class o{constructor(e,n){this.domService=e,this.sanitizer=n}transform(e){try{let n=this.domService.sanitizeSvg(e);return this.sanitizer.bypassSecurityTrustHtml(n)}catch{return e}}};o.\u0275fac=function(n){return new(n||o)(u(Re,16),u(Bs,16))},o.\u0275pipe=zi({name:"safeSvg",type:o,pure:!0,standalone:!1});let i=o;return i})();var pen=()=>({"line-height":"20px"});function gen(i,o){if(i&1){let t=q();f(0),_(1,"mark",5),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),te(2),A(3,"translate"),S(),v()}if(i&2){let t=l(3).ngIf,e=l();d(),ge("velt-autocomplete--contact-chip-current-user",(t==null||t.user==null?null:t.user.userId)&&(t==null||t.contact==null?null:t.contact.userId)===(t==null||t.user==null?null:t.user.userId))("current-user-chip",(t==null||t.user==null?null:t.user.userId)&&(t==null||t.contact==null?null:t.contact.userId)===(t==null||t.user==null?null:t.user.userId)),d(),Ce(" ",P(3,5,(t==null||t.contact==null?null:t.contact.name)||(t==null||t.contact==null?null:t.contact.email)||e.email),"")}}function uen(i,o){if(i&1){let t=q();f(0),_(1,"mark",6),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),te(2),A(3,"translate"),S(),v()}if(i&2){let t=l(3).ngIf;d(2),Ce(" ",P(3,1,(t==null||t.group==null||t.group.group==null||t.group.group.metadata==null?null:t.group.group.metadata.groupName)||(t==null||t.group==null?null:t.group.text)),"")}}function hen(i,o){if(i&1&&(w(0,"div",10),A(1,"safeSvg")),i&2){let t=l(4).ngIf;c("innerHtml",P(1,1,t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.svg),Wi)}}function fen(i,o){if(i&1&&w(0,"img",11),i&2){let t=l(4).ngIf;c("src",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.url,mn)}}function ven(i,o){if(i&1){let t=q();f(0),_(1,"div",7),G("click",function(){N(t);let n=l(4);return F(n.onClick())}),g(2,hen,2,3,"div",8)(3,fen,1,1,"img",9),_(4,"span"),te(5),A(6,"translate"),S()(),v()}if(i&2){let t=l(3).ngIf;d(2),c("ngIf",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.svg),d(),c("ngIf",t==null||t.custom==null||t.custom.custom==null||t.custom.custom.icon==null?null:t.custom.custom.icon.url),d(2),je(P(6,3,t==null||t.custom==null||t.custom.custom==null?null:t.custom.custom.name))}}function Cen(i,o){if(i&1&&g(0,gen,4,7,"ng-container",3)(1,uen,4,3,"ng-container",3)(2,ven,7,5,"ng-container",3),i&2){let t=l(3);c("ngIf",t.type==="contact"),d(),c("ngIf",t.type==="group"),d(),c("ngIf",t.type==="custom")}}function _en(i,o){if(i&1&&w(0,"velt-autocomplete-chip-tooltip-internal",12),i&2){let t=l(2).ngIf,e=l();c("componentConfigSignal",e.componentConfigSignal)("shadowDom",!!(t!=null&&t.shadowDom))}}function yen(i,o){i&1&&(f(0),_(1,"app-overlay-tooltip"),g(2,Cen,3,3,"ng-template",null,1,Te)(4,_en,1,2,"ng-template",null,2,Te),S(),v())}function Sen(i,o){i&1&&w(0,"velt-skeleton-loader-internal",13),i&2&&c("borderRadius","4px")("customStyles",Ft(2,pen))}function ben(i,o){if(i&1&&(f(0),g(1,yen,6,0,"ng-container",4)(2,Sen,1,3,"ng-template",null,0,Te),v()),i&2){let t=pe(3),e=l();d(),c("ngIf",e.type!=="loading")("ngIfElse",t)}}var g0e=(()=>{let o=class o{set _custom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _group(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _contactData(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedContact(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedGroup(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _encodedCustom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}set _shadowDom(e){try{typeof e=="string"&&(e=JSON.parse(e))}catch{}}constructor(e,n,r,a,s){this.authService=e,this.autocompleteService=n,this.contactService=r,this.loggingService=a,this.commentService=s,this.type="contact",this.componentConfigSignal=xe({type:"contact"}),this.subscriptions=[];try{this.loggingService.log("%c[WB] Creating COMPONENT AutocompleteChipComponent","color: blue;"),this.subscriptions.push(this.commentService.getDialogShadowDOM$().subscribe(m=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{shadowDom:m}),p))}))}catch(m){this.loggingService.catch("Error in AutocompleteChipComponent constructor: ",m)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: ngOnInit","color: green;"),setTimeout(()=>{this.componentConfigSignal().type==="contact"&&(this.email||this.componentConfigSignal().contactData?.contact)&&(this.getCurrentUser(),this.email?(this.getContacts(),this.getUserByEmail(this.email)):this.componentConfigSignal().contactData?.contact&&this.componentConfigSignal.update(e=>(e=T(I({},e),{contact:e.contactData?.contact}),e))),this.componentConfigSignal().type==="group"&&this.getOrganizationGroups()},0)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&setTimeout(()=>{Object.keys(e).forEach(n=>{n==="_custom"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedCustom?.currentValue)try{a=JSON.parse(atob(e?._encodedCustom?.currentValue))}catch{}}return r=T(I({},r),{custom:a}),r}):n==="_group"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedGroup?.currentValue)try{a=JSON.parse(atob(e?._encodedGroup?.currentValue))}catch{}}return r=T(I({},r),{group:a}),r}):n==="_contactData"?this.componentConfigSignal.update(r=>{let a=e[n].currentValue;if(typeof a=="string")try{a=JSON.parse(a)}catch{if(e?._encodedContact?.currentValue)try{a=JSON.parse(atob(e?._encodedContact?.currentValue))}catch{}}return r=T(I({},r),{contactData:a}),r}):n==="_shadowDom"?this.componentConfigSignal.update(r=>(r=I({},r),r.shadowDom=typeof e[n].currentValue=="string"?JSON.parse(e[n].currentValue):e[n].currentValue,r)):this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})},0)}catch(n){this.loggingService.catch("Error in AutocompleteChipComponent ngOnChanges: ",n)}}getCurrentUser(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getCurrentUser","color: green;"),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(n=>(n=T(I({},n),{user:e}),n))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getCurrentUser: ",e)}}getContacts(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getContacts","color: green;"),this.subscriptions.push(this.contactService.getUserContacts$().subscribe(e=>{let n=e?.find(r=>r.email===this.email);n&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:n}),r))}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getContacts: ",e)}}getUserByEmail(e){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getUserByEmail","color: green;"),this.subscriptions.push(this.contactService.getUserByEmail$(e).subscribe(n=>{n&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contact:n}),r))}))}catch(n){this.loggingService.catch("Error in AutocompleteChipComponent getUserByEmail: ",n)}}getOrganizationGroups(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: getOrganizationGroups","color: green;"),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{if(e){let n=e.find(r=>r?.metadata?.groupId===this.componentConfigSignal().group?.groupId);n&&this.componentConfigSignal().group&&this.componentConfigSignal.update(r=>(r=T(I({},r),{group:T(I({},r.group),{group:n})}),r))}}))}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent getOrganizationGroups: ",e)}}onClick(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: onClick","color: green;");let e;this.componentConfigSignal().custom?.custom?e=T(I({},this.componentConfigSignal().custom?.custom),{type:"custom"}):this.componentConfigSignal().contact?(e={id:this.componentConfigSignal().contact?.userId,name:this.componentConfigSignal().contact?.name,description:this.componentConfigSignal().contact?.email,type:"contact"},this.componentConfigSignal().contact?.photoUrl&&(e.icon={url:this.componentConfigSignal().contact?.photoUrl})):this.componentConfigSignal().type==="contact"&&(e={id:void 0,name:void 0,description:this.email,type:"contact"}),e&&this.autocompleteService.setOnAutocompleteChipClick(e)}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent onClick: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: unsubscribe","color: green;"),this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling AutocompleteChipComponent FUNCTION: OnDestroy","color: green;"),this.unsubscribe()}catch(e){this.loggingService.catch("Error in AutocompleteChipComponent OnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(tl),u(_i),u(y),u(we))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-chip-internal"]],inputs:{type:"type",email:"email",_custom:[0,"custom","_custom"],_group:[0,"group","_group"],_contactData:[0,"contact","_contactData"],_encodedContact:[0,"encodedContact","_encodedContact"],_encodedGroup:[0,"encodedGroup","_encodedGroup"],_encodedCustom:[0,"encodedCustom","_encodedCustom"],_shadowDom:[0,"shadowDom","_shadowDom"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["loadingTemplateRef",""],["triggerTemplate",""],["tooltipTemplate",""],[4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"velt-autocomplete--contact-chip",3,"click"],[1,"velt-autocomplete--group-chip",3,"click"],[1,"custom-chip",3,"click"],["class","custom-chip-icon custom-chip-icon-svg",3,"innerHtml",4,"ngIf"],["class","custom-chip-icon custom-chip-icon-img",3,"src",4,"ngIf"],[1,"custom-chip-icon","custom-chip-icon-svg",3,"innerHtml"],[1,"custom-chip-icon","custom-chip-icon-img",3,"src"],[3,"componentConfigSignal","shadowDom"],["width","64px",3,"borderRadius","customStyles"]],template:function(n,r){n&1&&g(0,ben,4,2,"ng-container",3),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,jm,h0,wo,hg,de],styles:["[_nghost-%COMP%]{display:inline-flex;line-height:32px}.custom-chip[_ngcontent-%COMP%]{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);word-break:break-word;padding:var(--velt-spacing-xs);margin:1px;gap:var(--velt-spacing-xs);opacity:0px;font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:120%;text-align:left;color:var(--velt-accent);display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.custom-chip[_ngcontent-%COMP%] .custom-chip-icon.custom-chip-icon-img[_ngcontent-%COMP%]{max-height:12px}"],changeDetection:0});let i=o;return i})();var Ien=["customBtnRef"],Een=["*"],xen=i=>({componentConfigSignal:i}),Ten=(i,o)=>({condition:i,data:o}),Den=(i,o,t,e,n,r)=>({template:i,componentName:o,variant:t,suffix:e,setIfCondition:n,componentElementRef:r});function wen(i,o){if(i&1&&(_(0,"div",9)(1,"button",10),A(2,"translate"),le(),_(3,"svg",11)(4,"g",12),w(5,"path",13),S(),_(6,"defs")(7,"clipPath",14),w(8,"rect",15),S()()()()()),i&2){let t=l(4);x("data-testid",t.componentId+"-default-button"),d(),x("aria-label",P(2,2,"Open user tagging menu"))}}function Oen(i,o){i&1&&Ve(0)}function Aen(i,o){if(i&1&&(f(0),g(1,wen,9,4,"div",6),_(2,"div",7,1),g(4,Oen,1,0,"ng-container",8),S(),v()),i&2){l();let t=pe(6),e=l().ngIf,n=l();d(),c("ngIf",e==null?null:e.showDefaultBtn),d(),x("data-testid",n.componentId+"-custom-container"),d(2),c("ngTemplateOutlet",t)}}function Pen(i,o){i&1&&Nt(0)}function Men(i,o){if(i&1){let t=q();f(0),_(1,"div",4),A(2,"translate"),A(3,"translate"),G("click",function(){N(t);let n=l(2);return F(n.onClick())}),g(4,Aen,5,3,"ng-container",5),S(),g(5,Pen,1,0,"ng-template",null,0,Te),v()}if(i&2){let t=l().ngIf,e=l();d(),c("title",P(2,6,"Tag a user")),x("data-testid",e.componentId)("aria-expanded",!1)("aria-label",P(3,8,"Mention user"))("aria-controls",e.componentId+"-popup"),d(3),c("veltDynamicTemplate",Ns(10,Den,e.template,t==null||t.componentMeta==null?null:t.componentMeta.componentName,t==null||t.componentMeta==null?null:t.componentMeta.variant,t==null||t.componentMeta==null?null:t.componentMeta.suffix,e.setIfCondition.bind(e),e.elementRef))}}function ken(i,o){if(i&1&&(f(0),g(1,Men,7,17,"ng-container",3),v()),i&2){let t=l();d(),c("veltIf",k(3,Ten,t.conditionSignal(),M(1,xen,t.componentConfigSignal)))}}var u0e=(()=>{let o=class o extends tt{constructor(e,n,r,a,s){super(n,r,void 0,s,void 0,a,e),this.loggingService=e,this.elementRef=n,this.themeService=r,this.dynamicDataService=a,this.commentService=s,this.triggerElement=null,this.hotkey="@",this.buttonClick=new Ae,this.deviceInfo=new ti,this.componentConfigSignal=xe({componentMeta:this.componentMeta,showDefaultBtn:!1}),this.veltElement=!0,this.componentId="velt-autocomplete-tool"}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngOnInit:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})}catch(n){this.loggingService.catch("Error in AutocompleteToolComponent ngOnChanges: ",n)}}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||this.componentConfigSignal.update(e=>(e=T(I({},e),{showDefaultBtn:!0}),e))}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent setupA11yAttributes:",e)}}onClick(){try{if(this.trigger||this.triggerElement){let e=this.trigger?this.trigger._element?.nativeElement:null;if(!e&&this.triggerElement&&(e=this.triggerElement),e){if(e?.focus(),e?.hasAttribute("contenteditable")){if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase()))e.innerText+=this.hotkey;else{this.setCursorToEndOfContenteditable(e);let n=window?.getSelection()?.getRangeAt(0),r=n?.startContainer,a=n?.startOffset||0;if(r&&a>=0){let s;if(r.nodeType===Node.TEXT_NODE){let p=r.splitText(a);r=p.previousSibling,s=document.createTextNode(this.hotkey),e.insertBefore(s,p)}else s=document.createTextNode(this.hotkey),e.insertBefore(s,r.childNodes[a]);n=document.createRange(),n.setStart(s,s.length),n.collapse(!0);let m=window.getSelection();m?.removeAllRanges(),m?.addRange(n)}}setTimeout(()=>{let n=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(n)},100)}else if(["input","textarea"].includes(e?.tagName?.toLowerCase())){let n=new InputEvent("input",{data:this.hotkey,inputType:"insertText"});e?.dispatchEvent(n)}}}this.buttonClick.emit()}catch(e){this.loggingService.catch("Error in AutocompleteToolComponent onClick: ",e)}}setCursorToEndOfContenteditable(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorToEndOfContenteditable","color: green;");try{let n,r;document.createRange&&(n=document.createRange(),n.selectNodeContents(e),n.collapse(!1),r=window.getSelection(),r?.removeAllRanges(),r?.addRange(n))}catch(n){this.loggingService.catch("Error in AutocompleteToolComponent setCursorToEndOfContenteditable: ",n)}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(R),u(qe),u(b),u(we))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-tool-internal"]],viewQuery:function(n,r){if(n&1&&ot(Ien,5),n&2){let a;Je(a=et())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(n,r){n&2&&x("data-velt-element",r.veltElement)},inputs:{trigger:"trigger",triggerElement:"triggerElement",hotkey:"hotkey",template:"template",componentMeta:"componentMeta"},outputs:{buttonClick:"buttonClick"},standalone:!1,features:[U([b]),B,Ze],ngContentSelectors:Een,decls:1,vars:1,consts:[["content",""],["customBtnRef",""],[4,"ngIf"],[4,"veltIf"],["role","combobox","tabindex","0",1,"velt-autocomplete-tool",3,"click","title"],[4,"veltDynamicTemplate"],["class","action-btn",4,"ngIf"],[1,"custom-btn-container"],[4,"ngTemplateOutlet"],[1,"action-btn"],["type","button",1,"action__button"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["clip-path","url(#clip0_12828_43447)"],["d","M12.2142 9.00926C12.2142 9.86174 11.8756 10.6793 11.2728 11.2821C10.67 11.8849 9.85244 12.2235 8.99996 12.2235C8.14748 12.2235 7.32992 11.8849 6.72712 11.2821C6.12432 10.6793 5.78568 9.86174 5.78568 9.00926C5.78568 8.15678 6.12432 7.33921 6.72712 6.73641C7.32992 6.13362 8.14748 5.79497 8.99996 5.79497C9.85244 5.79497 10.67 6.13362 11.2728 6.73641C11.8756 7.33921 12.2142 8.15678 12.2142 9.00926ZM12.2142 9.00926L12.2142 10.2146C12.2142 10.7474 12.4259 11.2584 12.8026 11.6351C13.1794 12.0119 13.6904 12.2235 14.2232 12.2235C14.756 12.2235 15.267 12.0119 15.6437 11.6351C16.0204 11.2584 16.2321 10.7474 16.2321 10.2146V9.00926C16.2341 7.45523 15.7355 5.9419 14.8101 4.69343C13.8847 3.44496 12.5818 2.52777 11.0944 2.07773C9.60695 1.62769 8.01411 1.66873 6.55183 2.19478C5.08955 2.72083 3.83561 3.7039 2.97575 4.99837C2.1159 6.29284 1.69588 7.82985 1.77791 9.38171C1.85994 10.9336 2.43965 12.4177 3.43118 13.6143C4.4227 14.8109 5.7733 15.6563 7.28288 16.0253C8.79247 16.3943 10.3808 16.2672 11.8125 15.6628","stroke","currentColor","stroke-width","1.6","stroke-linecap","round","stroke-linejoin","round"],["id","clip0_12828_43447"],["width","18","height","18","fill","white"]],template:function(n,r){n&1&&(Vt(),g(0,ken,2,6,"ng-container",2)),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,Ct,ne,ae,de],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)}*[_ngcontent-%COMP%]{box-sizing:border-box}.action__button[_ngcontent-%COMP%]{border:0;border-radius:var(--velt-border-radius-full);width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;transition:.5s;color:var(--velt-text-10)}.action__button[_ngcontent-%COMP%]:hover{background:var(--velt-background-3);cursor:pointer}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0});let i=o;return i})();var Ren=["commentPinRef"];function Nen(i,o){if(i&1){let t=q();f(0),_(1,"div",2),G("pointerup",function(n){return N(t),l(2).togglePinSelection(),F(n.stopPropagation())})("touchend",function(n){return N(t),n.stopPropagation(),F(n.preventDefault())})("click",function(n){return N(t),F(n.stopPropagation())}),_(2,"snippyly-comment-pin",3,0),G("togglePinSelection",function(n){N(t);let r=l(2);return F(r.togglePinSelection(n))})("saveComment",function(n){N(t);let r=l(2);return F(r.saveComment(n))}),S()(),v()}if(i&2){let t=l().ngIf,e=l();d(),x("data-testid",e.componentId)("role","button")("tabindex",0),d(),c("annotation",t.commentPinAnnotation)("variant",e.variant)("containerComponentId",t.componentId)("commentPinSelected",!!t.commentPinSelected)("multipleCommentPinSelected",t.selectedAnnotationsMap[t.commentPinAnnotation==null?null:t.commentPinAnnotation.annotationId]&&e.objectKeys(t.selectedAnnotationsMap).length>1)("user",t.user),x("data-testid",e.componentId+"-pin")("aria-hidden","true")}}function Fen(i,o){if(i&1&&(f(0),g(1,Nen,4,11,"ng-container",1),v()),i&2){let t=o.ngIf;d(),c("ngIf",t.commentPinAnnotation&&t.user)}}var h0e=(()=>{let o=class o{set _folderId(e){try{this.componentConfigSignal.update(n=>(n=T(I({},n),{folderId:e}),n?.folderId?n.veltFolderId=Ho(n.folderId):n.veltFolderId=void 0,n)),this.getCommentAnnotationsForCommentPin()}catch{}}set _clientDocumentId(e){try{this.componentConfigSignal.update(n=>(n=T(I({},n),{clientDocumentId:e}),n?.clientDocumentId?n.documentId=this.docService.generateDocumentId(n.clientDocumentId):n.documentId=void 0,n)),this.getCommentAnnotationsForCommentPin()}catch{}}set _context(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),n&&typeof n=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{context:n}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}set _contextOptions(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),n&&typeof n=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{contextOptions:n}),r)),this.getCommentAnnotationsForCommentPin()}catch{}}constructor(e,n,r,a,s,m){this.authService=e,this.commentService=n,this.docService=r,this.domService=a,this.loggingService=s,this.elementRef=m,this.variant="default",this.objectKeys=Object.keys,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=xe({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},selectedAnnotationsLocationMap:{},componentId:`velt-comment-pin-${gn()}`}),this.subscriptions=[],this.componentId="velt-comment-pin",this.uniqueComponentId="velt-comment-pin-"+gn();try{this.loggingService.log("%c[WB] Creating Class: VeltCommentPinComponent","color: blue;"),this.temporaryMultiThreadAnnotationId=`temp_${this.uniqueComponentId}`,this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{user:p}),h))})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{selectedAnnotationsMap:p}),h)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{selectedAnnotationsLocationMap:p}),h)),this.checkCommentPinSelected()},p=>{this.catchError("Error in VeltCommentPinComponent getSelectedAnnotationsLocationMap$ subscription: ",p)})),this.subscriptions.push(this.commentService.getGroupMatchedComments$().subscribe(p=>{this.componentConfigSignal.update(h=>(h=T(I({},h),{groupMatchedComments:p}),h))})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{this.commentPinRef&&(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.commentPinRef.updateOverlayPosition()}catch(p){this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$: ",p)}},p=>{this.catchError("Error in VeltCommentPinComponent updateCommentDialogPositionTrigger$ subscription: ",p)}))}catch(p){this.catchError("Error in VeltCommentPinComponent constructor: ",p)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentPinComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{let n=e||this.componentConfigSignal().commentPinAnnotation;if(this.componentConfigSignal().selectedAnnotationsMap[n.annotationId])n?.ghostComment?.type!==qs.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${n?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");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(n,this.componentConfigSignal().componentId)}}catch(n){this.catchError("Error in VeltCommentPinComponent togglePinSelection: ",n)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationsForCommentPin(),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(n){this.catchError("Error in VeltCommentPinComponent ngOnChanges: ",n)}}getCommentAnnotationsForCommentPin(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationsForCommentComponent({type:"pin",annotationId:this.annotationId,folderId:this.componentConfigSignal().folderId,veltFolderId:this.componentConfigSignal().veltFolderId,clientDocumentId:this.componentConfigSignal().clientDocumentId,documentId:this.componentConfigSignal().documentId,context:this.componentConfigSignal().context,contextOptions:this.componentConfigSignal().contextOptions}).pipe(fe(e=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(n=>(this.resolvedCommentsOnDom=n,e)))),fe(e=>this.domService.getSelectedAnnotationsMap$().pipe(ce(n=>({commentPinAnnotation:e?.[0],selectedAnnotationsMap:n||{},commentAnnotations:e||[]}))))).subscribe(e=>{let n=null,r=!1,a=[];if(this.resolvedCommentsOnDom||this.componentConfigSignal().groupMatchedComments&&!this.annotationId)a=e?.commentAnnotations?.slice()||[];else{let m=e?.commentAnnotations?.filter(h=>h?.status?.type!=="terminal"),p=e?.commentAnnotations?.[0];m?.length?a=m:p&&e?.selectedAnnotationsMap?.[p.annotationId]&&(a=[p])}if(a?.length&&this.componentConfigSignal().groupMatchedComments&&!this.annotationId&&(r=a?.length>1||!a?.[0]?.isDraft),r){n=new e0,n.annotationId=this.temporaryMultiThreadAnnotationId,n.isTemporary=!0,n.from=a?.[0]?.from,n.metadata=a?.[0]?.metadata,this.componentConfigSignal().context&&(n.context=this.componentConfigSignal().context),n.commentAnnotationsMap={},n.commentAnnotations={};for(let m of a||[])m.annotationId&&(n.commentAnnotationsMap||(n.commentAnnotationsMap={}),n.commentAnnotationsMap[m.annotationId]=m,n.commentAnnotations||(n.commentAnnotations={}),n.commentAnnotations[m.annotationId]=!0)}let s=a?.length?a[a?.length-1]:null;n&&(s=n),this.componentConfigSignal.update(m=>(m=T(I({},m),{commentPinAnnotation:s,commentAnnotations:a||[]}),m))})}catch(e){this.catchError("Error in VeltCommentPinComponent getCommentAnnotationByAnnotationId: ",e)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{commentPinAnnotation:n}),r))})}catch(n){this.catchError("Error in VeltCommentPinComponent getMultiThreadCommentAnnotationByAnnotationId: ",n)}}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,n=this.componentConfigSignal().commentPinAnnotation,r=this.componentConfigSignal().sourceId;if(n){let a=!!e[n.annotationId];if(a)if(n?.isDraft)n?.sourceId&&(a=n?.sourceId===r,a&&this.domService.setSelectedAnnotationLocation(n.annotationId,this.componentConfigSignal().componentId));else{let s=this.componentConfigSignal().selectedAnnotationsLocationMap?.[n.annotationId];s&&(a=s===this.componentConfigSignal().componentId)}a!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinSelected:a}),s))}}catch(e){this.catchError("Error in VeltCommentPinComponent checkCommentPinSelected: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentPinComponent unsubscribe: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentPinComponent FUNCTION: ngOnDestroy","color: green;"),this.unsubscribe()}catch(e){this.catchError("Error in VeltCommentPinComponent ngOnDestroy: ",e)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(n){this.catchError("Error in VeltCommentPinComponent saveComment: ",n)}}catchError(e,n,r){try{this.loggingService.catch(e,n,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(we),u(at),u(Re),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-pin-internal"]],viewQuery:function(n,r){if(n&1&&ot(Ren,5),n&2){let a;Je(a=et())&&(r.commentPinRef=a.first)}},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId",variant:"variant",_folderId:[0,"folderId","_folderId"],_clientDocumentId:[0,"documentId","_clientDocumentId"],_context:[0,"context","_context"],_contextOptions:[0,"contextOptions","_contextOptions"]},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentPinRef",""],[4,"ngIf"],[1,"velt-comment-pin",3,"pointerup","touchend","click"],[3,"togglePinSelection","saveComment","annotation","variant","containerComponentId","commentPinSelected","multipleCommentPinSelected","user"]],template:function(n,r){n&1&&g(0,Fen,2,1,"ng-container",1),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,mg],styles:[".velt-comment-pin[_ngcontent-%COMP%]{width:fit-content}"],changeDetection:0});let i=o;return i})();function Len(i,o){if(i&1){let t=q();f(0),_(1,"div",2),A(2,"translate"),G("pointerup",function(n){let r=N(t).$implicit;return l(2).togglePinSelection(r.commentAnnotation),F(n.stopPropagation())}),_(3,"snippyly-comment-pin",3),G("saveComment",function(n){let r=N(t).$implicit,a=l(2);return F(a.saveComment(n,r.commentAnnotation))}),S()(),v()}if(i&2){let t=o.$implicit,e=l(2);d(),rt("top",(t==null||t.position==null?null:t.position.y)+((e.position==null?null:e.position.y)||0),"px")("left",(t==null||t.position==null?null:t.position.x)+((e.position==null?null:e.position.x)||0),"px"),x("role","button")("aria-label",P(2,14,"Comment pin"))("aria-pressed",!!e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId])("data-testid",e.componentId+(t.commentAnnotation==null?null:t.commentAnnotation.annotationId))("tabindex",0),d(2),c("annotation",t.commentAnnotation)("commentPinSelected",e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length===1)("multipleCommentPinSelected",e.selectedAnnotationsMap[t.commentAnnotation==null?null:t.commentAnnotation.annotationId]&&e.objectKeys(e.selectedAnnotationsMap).length>1)("user",e.user),x("aria-hidden",!0)}}function Ben(i,o){if(i&1&&(f(0),g(1,Len,4,16,"ng-container",1),v()),i&2){let t=l();d(),c("ngForOf",t.canvasCommentAnnotations)("ngForTrackBy",t.canvasCommentsTrackBy)}}var f0e=(()=>{let o=class o{set _position(e){try{let n=e;typeof e=="string"&&(n=JSON.parse(e)),this.position=n}catch{}}constructor(e,n,r,a,s,m){this.authService=e,this.docService=n,this.domService=r,this.commentService=a,this.loggingService=s,this.elementRef=m,this.position={},this.selectedAnnotationsMap={},this.canvasCommentAnnotations=[],this.objectKeys=Object.keys,this.commentAnnotations=[],this.subscriptions=[],this.componentId="velt-canvas-comment";try{this.loggingService.log("%c[WB] Creating Class: CanvasCommentComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(p=>{this.user=p})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(p=>{this.selectedAnnotationsMap=p},p=>{this.loggingService.catch("Error in CanvasCommentComponent getSelectedAnnotationsMap$ subscription: ",p)})),this.subscriptions.push(this.docService.getDocumentPaths$().pipe(fe(p=>p?this.commentService.getAllCommentAnnotations({customClientDocumentId:p?.clientDocumentId,analytics:{enabled:!0,properties:{source:"internal",sourceId:"canvasComment"}}}):[])).subscribe(p=>{this.commentAnnotations=p||[],this.filterCanvasCommentAnnotations()}))}catch(p){this.loggingService.catch("Error in CanvasCommentComponent constructor: ",p)}}ngOnInit(){try{this.setupA11yAttributes(),this.filterCanvasCommentAnnotations()}catch(e){this.loggingService.catch("Error in CanvasCommentComponent ngOnInit: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CanvasCommentComponent setupA11yAttributes:",e)}}canvasCommentsTrackBy(e,n){return n.commentAnnotation.annotationId||""}filterCanvasCommentAnnotations(){try{this.canvasId?this.canvasCommentAnnotations=(this.commentAnnotations||[]).filter(e=>e?.context?.canvasCommentConfig?.id===this.canvasId).map(e=>({position:e.context.canvasCommentConfig.position,commentAnnotation:e})):this.canvasCommentAnnotations=[]}catch(e){this.loggingService.catch("Error in CanvasCommentComponent filterCanvasCommentAnnotations: ",e)}}togglePinSelection(e){try{if(this.selectedAnnotationsMap[e.annotationId])e?.ghostComment?.type!==qs.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${e?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let n=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(n||(n=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),n){let r=n.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(r){let a=document.getElementById(`comment-pin-container-${r}`)||document.querySelector(`[data-velt-id='${r}']`);a&&(a.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.domService.toggleAnnotationSelection(e)}}catch(n){this.loggingService.catch("Error in CanvasCommentComponent togglePinSelection: ",n)}}saveComment(e,n){try{this.commentService.saveComment(n,e)}catch(r){this.loggingService.catch("Error in CanvasCommentComponent saveComment: ",r)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(at),u(Re),u(we),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["app-canvas-comment"]],inputs:{canvasId:"canvasId",_position:[0,"position","_position"]},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"velt-canvas-comment-pin",3,"pointerup"],[3,"saveComment","annotation","commentPinSelected","multipleCommentPinSelected","user"]],template:function(n,r){n&1&&g(0,Ben,2,2,"ng-container",0),n&2&&c("ngIf",r.user)},dependencies:[ht,Z,mg,de],styles:[".velt-canvas-comment-pin[_ngcontent-%COMP%]{position:absolute;transform:translateY(-100%)}"],changeDetection:0});let i=o;return i})();function Ven(i,o){if(i&1&&(f(0),w(1,"app-comments-minimap",1),A(2,"translate"),v()),i&2){let t=l().ngIf,e=l();d(),c("commentAnnotations",t.commentAnnotations)("user",t.user)("position",t.position)("targetScrollableElementId",t.targetScrollableElementId),x("data-testid",e.componentId+"-minimap")("role","complementary")("aria-label",P(2,8,"Comments minimap"))("aria-hidden",!(t.commentAnnotations!=null&&t.commentAnnotations.length))}}function Uen(i,o){if(i&1&&(f(0),g(1,Ven,3,10,"ng-container",0),v()),i&2){let t=o.ngIf;d(),c("ngIf",t.user)}}var v0e=(()=>{let o=class o{constructor(e,n,r,a){this.authService=e,this.commentService=n,this.loggingService=r,this.elementRef=a,this.targetScrollableElementId=null,this.position="right",this.componentConfigSignal=xe({commentAnnotations:[],user:null,position:"right",targetScrollableElementId:null}),this.subscriptions=[],this.componentId="velt-comments-minimap";try{this.loggingService.log("%c[WB] Creating CLASS: VeltCommentsMinimapComponent","color: blue;"),this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.componentConfigSignal.update(m=>(m=T(I({},m),{user:s}),m))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getUser$: ",s)})),this.subscriptions.push(this.commentService.getCommentAnnotationsFromCommentsContainer$().subscribe(s=>{this.componentConfigSignal.update(m=>(m=T(I({},m),{commentAnnotations:s}),m))},s=>{this.loggingService.catch("Error in VeltCommentsMinimapComponent getCommentAnnotationsFromCommentsContainer$: ",s)}))}catch(s){this.loggingService.catch("Error in VeltCommentsMinimapComponent constructor: ",s)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[n]:e[n].currentValue}),r))})}catch(n){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnChanges: ",n)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in VeltCommentsMinimapComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(we),u(y),u(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comments-minimap-internal"]],inputs:{targetScrollableElementId:"targetScrollableElementId",position:"position"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],[3,"commentAnnotations","user","position","targetScrollableElementId"]],template:function(n,r){n&1&&g(0,Uen,2,1,"ng-container",0),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,l7,de],encapsulation:2,changeDetection:0});let i=o;return i})();var jen=["waveformContainer"];function $en(i,o){i&1&&(le(),_(0,"svg",14),w(1,"rect",15),S())}function Hen(i,o){if(i&1&&(_(0,"div",16),te(1),A(2,"translate"),S()),i&2){let t=l().index,e=l(4);d(),Ce(" ",P(2,1,e.indexToTimeSignal()[t])," ")}}function zen(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),S()(),w(4,"div",10),_(5,"div",11),g(6,$en,2,0,"svg",12)(7,Hen,3,3,"div",13),S()()),i&2){let t=o.$implicit,e=o.index;d(),rt("height",t+"px"),ge("silent",t===2),d(5),c("ngIf",e%10===0),d(),c("ngIf",e%10===0)}}function Gen(i,o){if(i&1&&(f(0),_(1,"div",4),w(2,"div",5),_(3,"div",6),g(4,zen,8,6,"div",7),S()(),v()),i&2){let t=l(2).ngIf,e=l();d(4),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Wen(i,o){if(i&1&&(f(0),g(1,Gen,5,2,"ng-container",1),v()),i&2){let t=l().ngIf;d(),c("ngIf",t.isAudio)}}function qen(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),S()()),i&2){let t=o.$implicit;rt("height",t+"px")}}function Yen(i,o){if(i&1&&(_(0,"div",18),g(1,qen,3,2,"div",19),S()),i&2){let t=l(2).ngIf,e=l();ge("thread-mode",t.threadMode),d(),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Ken(i,o){if(i&1&&(f(0),g(1,Yen,2,4,"div",17),v()),i&2){let t=l().ngIf;d(),c("ngIf",t.isAudio&&(t.collapsedMode||t.threadMode))}}function Zen(i,o){if(i&1&&(_(0,"div",9)(1,"p"),te(2,"."),S()()),i&2){let t=o.$implicit,e=o.index,n=l(2).ngIf;rt("height",t+"px"),ge("active-bar",e<=n.activeBarIndex)}}function Xen(i,o){if(i&1&&(f(0),_(1,"div",20),g(2,Zen,3,4,"div",21),S(),v()),i&2){let t=l().ngIf,e=l();d(2),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function Qen(i,o){if(i&1&&(_(0,"div",8)(1,"div",9)(2,"p"),te(3,"."),S()()()),i&2){let t=o.$implicit;d(),rt("height",t+"px")}}function Jen(i,o){if(i&1&&(f(0),_(1,"div",22)(2,"div",4),w(3,"div",5),_(4,"div",6),g(5,Qen,4,2,"div",7),S()()(),v()),i&2){let t=l().ngIf,e=l();d(5),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function etn(i,o){if(i&1&&w(0,"div",25),i&2){let t=o.$implicit;rt("height",t,"px")}}function ttn(i,o){if(i&1&&(f(0),_(1,"div",23),g(2,etn,1,2,"div",24),S(),v()),i&2){let t=l().ngIf,e=l();d(2),c("ngForOf",t.barHeights)("ngForTrackBy",e.trackByBarHeights)}}function ntn(i,o){if(i&1&&(f(0),_(1,"div",26,0),le(),_(3,"svg",27)(4,"defs")(5,"linearGradient",28),w(6,"stop",29)(7,"stop",30)(8,"stop",31),S()(),w(9,"path",32),S()(),v()),i&2){let t=l().ngIf;d(9),x("d",t.mirroredWaveformPath)}}function itn(i,o){if(i&1&&(f(0)(1,2),g(2,Wen,2,1,"ng-container",3)(3,Ken,2,1,"ng-container",3)(4,Xen,3,2,"ng-container",3)(5,Jen,6,2,"ng-container",3)(6,ttn,3,2,"ng-container",3)(7,ntn,10,1,"ng-container",3),v()()),i&2){let t=o.ngIf;d(),c("ngSwitch",t.variant),d(),c("ngSwitchCase","expanded"),d(),c("ngSwitchCase","minified"),d(),c("ngSwitchCase","player"),d(),c("ngSwitchCase","preview"),d(),c("ngSwitchCase","preview-mini"),d(),c("ngSwitchCase","editor")}}var u_=(()=>{let o=class o{constructor(e,n){this.loggingService=e,this.recorderService=n,this.height=144,this.isRecording=!1,this.variant="expanded",this.isAudio=!1,this.collapsedMode=!1,this.threadMode=!1,this.numberOfBars=38,this.muteMic=null,this.maxVolumeArray=[],this.allowCleanUp=!0,this.animationFrameId=null,this.lastDrawTime=0,this.drawInterval=50,this.componentConfigSignal=xe({variant:"expanded",isAudio:!1,barHeights:[],collapsedMode:!1,threadMode:!1,activeBarIndex:-1,mirroredWaveformPath:""}),this.indexToTimeSignal=ki(()=>{let r=this.componentConfigSignal().barHeights||[],a=[];for(let s=0;s<r.length;s++){let m=this.indexToTime(s);a.push(m)}return a}),this.showWaveform=()=>{try{if(!this.bufferArray||this.bufferArray.length===0)return;let r=this.bufferArray.length/this.numberOfBars,a=[];for(let s=0;s<this.numberOfBars;s++){let m=s*r,p=m+r,h=0,C=0;for(let L=Math.floor(m);L<p&&L<this.bufferArray.length;L++)h+=this.bufferArray[L],C++;let D=(C>0?h/C:0)/255*this.height*3;a.push(D)}this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a})),this.updateMirroredWaveformPath()}catch(r){this.loggingService.warn("Error in AudioWaveformComponent showWaveform: ",r)}},this.draw=()=>{try{if(!this.analyzer)return;switch(this.analyzer.getByteFrequencyData(this.dataArray),this.componentConfigSignal().variant){case"preview":this.drawPreview();break;case"preview-mini":this.drawPreviewMini();break;default:this.drawDefault()}}catch(r){this.loggingService.warn("Error in AudioWaveformComponent draw: ",r)}}}ngOnInit(){try{this.bufferArray&&this.showWaveform(),setTimeout(()=>{this.setupResizeObserver()},100),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent ngOnInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(n=>{this.componentConfigSignal.update(r=>T(I({},r),{[n]:e[n].currentValue}))}),e.playerCurrentTime&&e.playerCurrentTime.currentValue&&this.componentConfigSignal.update(n=>T(I({},n),{activeBarIndex:this.showActiveBars(e.playerCurrentTime.currentValue,this.totalTime.display)})),(e?.recorderInitData?.currentValue?.stream||e?.previewStream?.currentValue)&&(this.stopAnimation(),this.setupAudioElements(e.recorderInitData?.currentValue?.stream||e.previewStream.currentValue),this.startAnimation()),e.muteMic&&this.handleMicMute(e.muteMic.currentValue),this.updateMirroredWaveformPath()}catch(n){this.loggingService.warn("Error in AudioWaveformComponent ngOnChanges: ",n)}}trackByBarHeights(e,n){return e+"__"+n}showActiveBars(e,n){try{let r=p=>{let[h,C]=p.split(":").map(Number);return h*60+C},a=r(e),s=r(n)-1,m=s>0?a/s:0;return a>=s?this.numberOfBars:Math.floor(m*this.numberOfBars)}catch(r){return this.loggingService.warn("Error in AudioWaveformComponent showActiveBars: ",r),-1}}ngOnDestroy(){try{this.stopAnimation(),this.cleanupAudio(),this.cleanupResizeObserver()}catch{}}setupAudioElements(e){return Q(this,null,function*(){try{this.cleanupAudio(),this.audioContext=new AudioContext,this.stream=e,this.microphone=this.audioContext.createMediaStreamSource(this.stream),this.analyzer=this.audioContext.createAnalyser(),this.analyzer.smoothingTimeConstant=.8,this.microphone.connect(this.analyzer),this.dataArray=new Uint8Array(this.analyzer.frequencyBinCount),this.analyzer.fftSize=1024,this.handleMicMute(this.muteMic)}catch{this.dataArray=new Uint8Array(0)}})}noiseGate(e,n,r){try{for(let a=0;a<e.length;a++)e[a]=Math.abs(e[a])>n?e[a]-n+r:r}catch(a){this.loggingService.warn("Error in AudioWaveformComponent noiseGate: ",a)}}startAnimation(){try{let e=n=>{n-this.lastDrawTime>=this.drawInterval&&(this.draw(),this.lastDrawTime=n),this.animationFrameId=requestAnimationFrame(e)};this.animationFrameId=requestAnimationFrame(e)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent startAnimation: ",e)}}stopAnimation(){try{this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent stopAnimation: ",e)}}drawPreview(){try{this.noiseGate(this.dataArray,128,0);let e=1e3,n=Math.floor(this.dataArray.length/e),r=[];for(let s=0;s<e;s++){let m=s*n,p=Math.min(m+n,this.dataArray.length),h=this.dataArray.slice(m,p),C=h.reduce((E,D)=>E+D,0)/h.length;r.push(C)}r.sort((s,m)=>s-m);let a=[];for(let s=0;s<e;s++)a.push(r[s],r[s]);for(let s=e-1;s>=0;s--)a.push(r[s],r[s]);this.componentConfigSignal.update(s=>T(I({},s),{barHeights:a.filter(m=>m!==0)})),this.updateMirroredWaveformPath()}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreview: ",e)}}drawPreviewMini(){try{this.noiseGate(this.dataArray,128,0);let e=Math.max(...this.dataArray),n=Math.max(2,Math.min(14,e/128*14));if(this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[Math.max(2,n/1.5),n,Math.max(2,n/2)]})),this.updateMirroredWaveformPath(),this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let r=Math.max(...this.dataArray);this.maxVolumeArray.push(r),this.recorderService.setRecordedDataStream(this.maxVolumeArray)}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawPreviewMini: ",e)}}drawDefault(){try{if(this.analyzer?.getByteTimeDomainData(this.dataArray),this.noiseGate(this.dataArray,128,2),this.isRecording){let e=Math.max(...this.dataArray),n=e/255*this.height*3;this.maxVolumeArray.push(e),this.recorderService.setRecordedDataStream(this.maxVolumeArray),this.componentConfigSignal.update(r=>T(I({},r),{barHeights:[...r.barHeights,n]})),this.updateMirroredWaveformPath()}}catch(e){this.loggingService.warn("Error in AudioWaveformComponent drawDefault: ",e)}}cleanupAudio(){try{this.allowCleanUp&&this.variant!=="expanded"&&(this.microphone&&(this.microphone.disconnect(),this.microphone=null),this.stream&&(this.stream.getTracks().forEach(e=>e.stop()),this.stream=null),this.analyzer&&(this.analyzer.disconnect(),this.analyzer=null),this.audioContext&&this.audioContext.state!=="closed"&&(this.audioContext.close(),this.audioContext=null),this.componentConfigSignal.update(e=>T(I({},e),{barHeights:[]})),this.updateMirroredWaveformPath())}catch{}}handleMicMute(e){try{this.stream&&this.stream.getAudioTracks().forEach(n=>{n.enabled=!e})}catch(n){this.loggingService.warn("Error in AudioWaveformComponent handleMicMute: ",n)}}indexToTime(e){try{let n=e*100,r=Math.floor(n/1e3),a=Math.floor(r/60),s=r%60,m=a.toString().padStart(2,"0"),p=s.toString().padStart(2,"0");return`${m}:${p}`}catch(n){return this.loggingService.warn("Error in AudioWaveformComponent indexToTime: ",n),""}}generateMirroredWaveformPath(e,n,r){try{if(!e||e.length===0)return"";let a=r?e.slice(0,n):e.slice(n);if(a.length===0)return"";let s=r?0:n,m=e.length,p=100,C=18/2,E=Math.min(...a),L=Math.max(...a)-E,H=L>0?C*.8/L:.1,K=.5,oe="";if(a.length>0){let he=s/m*p;oe=`M ${he} ${C} `;let Se=he,Fe=L>0?(a[0]-E)*H:K,Ye=C-Math.max(Fe,K);oe+=`L ${Se} ${Ye} `;for(let ue=1;ue<a.length;ue++){let ve=(s+ue)/m*p,Le=(s+ue-1)/m*p,Ee=L>0?(a[ue]-E)*H:K,On=L>0?(a[ue-1]-E)*H:K,jn=C-Math.max(Ee,K),Mt=C-Math.max(On,K),Ot=Le+(ve-Le)/3,ft=Le+2*(ve-Le)/3;oe+=`C ${Ot} ${Mt}, ${ft} ${jn}, ${ve} ${jn} `}let Be=(s+a.length-1)/m*p;oe+=`L ${Be} ${C} `;let De=Be,be=L>0?(a[a.length-1]-E)*H:K,Oe=C+Math.max(be,K);oe+=`L ${De} ${Oe} `;for(let ue=a.length-2;ue>=0;ue--){let ve=(s+ue)/m*p,Le=(s+ue+1)/m*p,Ee=L>0?(a[ue]-E)*H:K,On=L>0?(a[ue+1]-E)*H:K,jn=C+Math.max(Ee,K),Mt=C+Math.max(On,K),Ot=Le-(Le-ve)/3,ft=Le-2*(Le-ve)/3;oe+=`C ${Ot} ${Mt}, ${ft} ${jn}, ${ve} ${jn} `}oe+="Z"}return oe}catch(a){return this.loggingService.warn("Error in AudioWaveformComponent generateMirroredWaveformPath: ",a),""}}onResize(){this.componentConfigSignal().variant==="editor"&&setTimeout(()=>{this.updateMirroredWaveformPath()},100)}updateMirroredWaveformPath(){try{let e=this.componentConfigSignal(),n=this.generateMirroredWaveformPath(e.barHeights,e.activeBarIndex+1,!1);this.componentConfigSignal.update(r=>T(I({},r),{mirroredWaveformPath:n}))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent updateMirroredWaveformPath: ",e)}}setupResizeObserver(){try{this.waveformContainer&&!this.resizeObserver&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(e=>{this.updateMirroredWaveformPath()}),this.resizeObserver.observe(this.waveformContainer.nativeElement))}catch(e){this.loggingService.warn("Error in AudioWaveformComponent setupResizeObserver: ",e)}}cleanupResizeObserver(){try{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)}catch(e){this.loggingService.warn("Error in AudioWaveformComponent cleanupResizeObserver: ",e)}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(fi))},o.\u0275cmp=O({type:o,selectors:[["app-audio-waveform"]],viewQuery:function(n,r){if(n&1&&ot(jen,5),n&2){let a;Je(a=et())&&(r.waveformContainer=a.first)}},hostBindings:function(n,r){n&1&&G("resize",function(){return r.onResize()},!1,IO)},inputs:{height:"height",isRecording:"isRecording",variant:"variant",isAudio:"isAudio",collapsedMode:"collapsedMode",bufferArray:"bufferArray",playerCurrentTime:"playerCurrentTime",totalTime:"totalTime",recorderInitData:"recorderInitData",threadMode:"threadMode",previewStream:"previewStream",numberOfBars:"numberOfBars",muteMic:"muteMic"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["waveformContainer",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"audio-waveform"],[1,"center-line"],[1,"waves"],["class","bar-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"bar-container"],[1,"bar"],[1,"line"],[1,"time-container"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["class","time",4,"ngIf"],["width","2","height","8","viewBox","0 0 2 8","fill","none","xmlns","http://www.w3.org/2000/svg"],["x","0.5","width","1","height","8"],[1,"time"],["class","mini-audio-container",3,"thread-mode",4,"ngIf"],[1,"mini-audio-container"],["class","bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mini-audio-container-player"],["class","bar",3,"height","active-bar",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview"],[1,"audio-container-preview-mini"],["class","audio-container-preview-mini--bar",3,"height",4,"ngFor","ngForOf","ngForTrackBy"],[1,"audio-container-preview-mini--bar"],[1,"editor-player"],["width","100%","height","18","viewBox","0 0 100 18","preserveAspectRatio","none",1,"smooth-waveform"],["id","active-gradient","x1","0%","y1","0%","x2","0%","y2","100%"],["offset","0%","stop-color","var(--velt-text-8)","stop-opacity","1"],["offset","50%","stop-color","var(--velt-text-8)","stop-opacity","1"],["offset","100%","stop-color","var(--velt-text-8)","stop-opacity","1"],["fill","url(#active-gradient)"]],template:function(n,r){n&1&&g(0,itn,8,7,"ng-container",1),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[ht,Z,Li,Ki,de],styles:[".audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;border:1px solid var(--velt-border-3);border-radius:var(--velt-border-radius-lg)}.audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;height:144px;width:100%;z-index:2!important}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-xs);transition:height .5s ease}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar.silent[_ngcontent-%COMP%]{background:var(--velt-text-12)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] rect[_ngcontent-%COMP%]{fill:var(--velt-background-4)}.audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.mini-audio-container[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:flex-end;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container.thread-mode[_ngcontent-%COMP%]{width:100px}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.mini-audio-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%]{height:18px;display:flex;align-items:center;justify-content:center;overflow:hidden;margin-left:var(--velt-spacing-sm)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-text-12);margin-right:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-2xs)}.mini-audio-container-player[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.mini-audio-container-player[_ngcontent-%COMP%] .active-bar[_ngcontent-%COMP%]{background:var(--velt-accent-text)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;height:300px;align-items:center;justify-content:center;overflow:hidden;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1;border-width:0px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .center-line[_ngcontent-%COMP%]{position:absolute;background:var(--velt-background-2);height:4px;width:100%;z-index:1}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:144px;width:100%;z-index:2}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-error);margin-right:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-2xs);transition:height .5s ease}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .bar[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{opacity:0}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .line[_ngcontent-%COMP%]{position:absolute;bottom:35px;background:var(--velt-background-4);height:1px;width:6px}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%]{position:absolute;bottom:10px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;margin-left:var(--velt-spacing-lg)}.audio-container-preview[_ngcontent-%COMP%] .audio-waveform[_ngcontent-%COMP%] .waves[_ngcontent-%COMP%] .bar-container[_ngcontent-%COMP%] .time-container[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{padding-top:var(--velt-spacing-sm);font-weight:600;font-size:var(--velt-font-size-2xs);line-height:11px;color:var(--velt-text-12)}.audio-container-preview-mini[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:2px;width:28px;height:28px;background:var(--velt-accent);border-radius:var(--velt-border-radius-3xl)}.audio-container-preview-mini[_ngcontent-%COMP%] .audio-container-preview-mini--bar[_ngcontent-%COMP%]{width:2px;background:var(--velt-white);border-radius:var(--velt-border-radius-2xs);transition:height .1s}.editor-player[_ngcontent-%COMP%]{height:50px;display:flex;align-items:center;justify-content:center;overflow:hidden;width:100%;position:relative;margin-left:1.5px}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;top:0}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .inactive-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-text-12)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-top[_ngcontent-%COMP%], .editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] .active-stop-bottom[_ngcontent-%COMP%]{stop-color:var(--velt-accent-text)}.editor-player[_ngcontent-%COMP%] .smooth-waveform[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{transition:d .2s ease-in-out}"],changeDetection:0});let i=o;return i})();var otn=["knob"],rtn=["valueIndicatorContainer"];function atn(i,o){if(i&1&&(_(0,"div",2,1)(2,"div",5)(3,"span",6),te(4),S()()()),i&2){let t=l();d(4),je(t.valueIndicatorText)}}var stn=["trackActive"],ltn=["*"];function ctn(i,o){if(i&1&&w(0,"div"),i&2){let t=o.$implicit,e=o.$index,n=l(3);Xo(t===0?"mdc-slider__tick-mark--active":"mdc-slider__tick-mark--inactive"),rt("transform",n._calcTickMarkTransform(e))}}function mtn(i,o){if(i&1&&ZK(0,ctn,1,4,"div",8,KK),i&2){let t=l(2);XK(t._tickMarks)}}function dtn(i,o){if(i&1&&(_(0,"div",6,1),g(2,mtn,2,0),S()),i&2){let t=l();d(2),Ql(t._cachedWidth?2:-1)}}function ptn(i,o){if(i&1&&w(0,"mat-slider-visual-thumb",7),i&2){let t=l();c("discrete",t.discrete)("thumbPosition",1)("valueIndicatorText",t.startValueIndicatorText)}}var Mn=function(i){return i[i.START=1]="START",i[i.END=2]="END",i}(Mn||{}),h_=function(i){return i[i.ACTIVE=0]="ACTIVE",i[i.INACTIVE=1]="INACTIVE",i}(h_||{}),wz=new ct("_MatSlider"),C0e=new ct("_MatSliderThumb"),gtn=new ct("_MatSliderRangeThumb"),_0e=new ct("_MatSliderVisualThumb");var utn=(()=>{class i{_cdr=ye(Kt);_ngZone=ye(Rt);_slider=ye(wz);_renderer=ye(qi);_listenerCleanups;discrete;thumbPosition;valueIndicatorText;_ripple;_knob;_valueIndicatorContainer;_sliderInput;_sliderInputEl;_hoverRippleRef;_focusRippleRef;_activeRippleRef;_isHovered=!1;_isActive=!1;_isValueIndicatorVisible=!1;_hostElement=ye(R).nativeElement;_platform=ye(mo);constructor(){}ngAfterViewInit(){let t=this._slider._getInput(this.thumbPosition);t&&(this._ripple.radius=24,this._sliderInput=t,this._sliderInputEl=this._sliderInput._hostElement,this._ngZone.runOutsideAngular(()=>{let e=this._sliderInputEl,n=this._renderer;this._listenerCleanups=[n.listen(e,"pointermove",this._onPointerMove),n.listen(e,"pointerdown",this._onDragStart),n.listen(e,"pointerup",this._onDragEnd),n.listen(e,"pointerleave",this._onMouseLeave),n.listen(e,"focus",this._onFocus),n.listen(e,"blur",this._onBlur)]}))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t())}_onPointerMove=t=>{if(this._sliderInput._isFocused)return;let e=this._hostElement.getBoundingClientRect(),n=this._slider._isCursorOnSliderThumb(t,e);this._isHovered=n,n?this._showHoverRipple():this._hideRipple(this._hoverRippleRef)};_onMouseLeave=()=>{this._isHovered=!1,this._hideRipple(this._hoverRippleRef)};_onFocus=()=>{this._hideRipple(this._hoverRippleRef),this._showFocusRipple(),this._hostElement.classList.add("mdc-slider__thumb--focused")};_onBlur=()=>{this._isActive||this._hideRipple(this._focusRippleRef),this._isHovered&&this._showHoverRipple(),this._hostElement.classList.remove("mdc-slider__thumb--focused")};_onDragStart=t=>{t.button===0&&(this._isActive=!0,this._showActiveRipple())};_onDragEnd=()=>{this._isActive=!1,this._hideRipple(this._activeRippleRef),this._sliderInput._isFocused||this._hideRipple(this._focusRippleRef),this._platform.SAFARI&&this._showHoverRipple()};_showHoverRipple(){this._isShowingRipple(this._hoverRippleRef)||(this._hoverRippleRef=this._showRipple({enterDuration:0,exitDuration:0}),this._hoverRippleRef?.element.classList.add("mat-mdc-slider-hover-ripple"))}_showFocusRipple(){this._isShowingRipple(this._focusRippleRef)||(this._focusRippleRef=this._showRipple({enterDuration:0,exitDuration:0},!0),this._focusRippleRef?.element.classList.add("mat-mdc-slider-focus-ripple"))}_showActiveRipple(){this._isShowingRipple(this._activeRippleRef)||(this._activeRippleRef=this._showRipple({enterDuration:225,exitDuration:400}),this._activeRippleRef?.element.classList.add("mat-mdc-slider-active-ripple"))}_isShowingRipple(t){return t?.state===Za.FADING_IN||t?.state===Za.VISIBLE}_showRipple(t,e){if(!this._slider.disabled&&(this._showValueIndicator(),this._slider._isRange&&this._slider._getThumb(this.thumbPosition===Mn.START?Mn.END:Mn.START)._showValueIndicator(),!(this._slider._globalRippleOptions?.disabled&&!e)))return this._ripple.launch({animation:this._slider._noopAnimations?{enterDuration:0,exitDuration:0}:t,centered:!0,persistent:!0})}_hideRipple(t){if(t?.fadeOut(),this._isShowingAnyRipple())return;this._slider._isRange||this._hideValueIndicator();let e=this._getSibling();e._isShowingAnyRipple()||(this._hideValueIndicator(),e._hideValueIndicator())}_showValueIndicator(){this._hostElement.classList.add("mdc-slider__thumb--with-indicator")}_hideValueIndicator(){this._hostElement.classList.remove("mdc-slider__thumb--with-indicator")}_getSibling(){return this._slider._getThumb(this.thumbPosition===Mn.START?Mn.END:Mn.START)}_getValueIndicatorContainer(){return this._valueIndicatorContainer?.nativeElement}_getKnob(){return this._knob.nativeElement}_isShowingAnyRipple(){return this._isShowingRipple(this._hoverRippleRef)||this._isShowingRipple(this._focusRippleRef)||this._isShowingRipple(this._activeRippleRef)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider-visual-thumb"]],viewQuery:function(e,n){if(e&1&&(ot(Pu,5),ot(otn,5),ot(rtn,5)),e&2){let r;Je(r=et())&&(n._ripple=r.first),Je(r=et())&&(n._knob=r.first),Je(r=et())&&(n._valueIndicatorContainer=r.first)}},hostAttrs:[1,"mdc-slider__thumb","mat-mdc-slider-visual-thumb"],inputs:{discrete:"discrete",thumbPosition:"thumbPosition",valueIndicatorText:"valueIndicatorText"},features:[U([{provide:_0e,useExisting:i}])],decls:4,vars:2,consts:[["knob",""],["valueIndicatorContainer",""],[1,"mdc-slider__value-indicator-container"],[1,"mdc-slider__thumb-knob"],["matRipple","",1,"mat-focus-indicator",3,"matRippleDisabled"],[1,"mdc-slider__value-indicator"],[1,"mdc-slider__value-indicator-text"]],template:function(e,n){e&1&&(g(0,atn,5,1,"div",2),w(1,"div",3,0)(3,"div",4)),e&2&&(Ql(n.discrete?0:-1),d(3),c("matRippleDisabled",!0))},dependencies:[Pu],styles:[`.mat-mdc-slider-visual-thumb .mat-ripple{height:100%;width:100%}.mat-mdc-slider .mdc-slider__tick-marks{justify-content:start}.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--active,.mat-mdc-slider .mdc-slider__tick-marks .mdc-slider__tick-mark--inactive{position:absolute;left:2px}
438
438
  `],encapsulation:2,changeDetection:0})}return i})(),y0e=(()=>{class i{_ngZone=ye(Rt);_cdr=ye(Kt);_elementRef=ye(R);_dir=ye(Ur,{optional:!0});_globalRippleOptions=ye(LV,{optional:!0});_trackActive;_thumbs;_input;_inputs;get disabled(){return this._disabled}set disabled(t){this._disabled=t;let e=this._getInput(Mn.END),n=this._getInput(Mn.START);e&&(e.disabled=this._disabled),n&&(n.disabled=this._disabled)}_disabled=!1;get discrete(){return this._discrete}set discrete(t){this._discrete=t,this._updateValueIndicatorUIs()}_discrete=!1;showTickMarks=!1;get min(){return this._min}set min(t){let e=isNaN(t)?this._min:t;this._min!==e&&this._updateMin(e)}_min=0;color;disableRipple=!1;_updateMin(t){let e=this._min;this._min=t,this._isRange?this._updateMinRange({old:e,new:t}):this._updateMinNonRange(t),this._onMinMaxOrStepChange()}_updateMinRange(t){let e=this._getInput(Mn.END),n=this._getInput(Mn.START),r=e.value,a=n.value;n.min=t.new,e.min=Math.max(t.new,n.value),n.max=Math.min(e.max,e.value),n._updateWidthInactive(),e._updateWidthInactive(),t.new<t.old?this._onTranslateXChangeBySideEffect(e,n):this._onTranslateXChangeBySideEffect(n,e),r!==e.value&&this._onValueChange(e),a!==n.value&&this._onValueChange(n)}_updateMinNonRange(t){let e=this._getInput(Mn.END);if(e){let n=e.value;e.min=t,e._updateThumbUIByValue(),this._updateTrackUI(e),n!==e.value&&this._onValueChange(e)}}get max(){return this._max}set max(t){let e=isNaN(t)?this._max:t;this._max!==e&&this._updateMax(e)}_max=100;_updateMax(t){let e=this._max;this._max=t,this._isRange?this._updateMaxRange({old:e,new:t}):this._updateMaxNonRange(t),this._onMinMaxOrStepChange()}_updateMaxRange(t){let e=this._getInput(Mn.END),n=this._getInput(Mn.START),r=e.value,a=n.value;e.max=t.new,n.max=Math.min(t.new,e.value),e.min=n.value,e._updateWidthInactive(),n._updateWidthInactive(),t.new>t.old?this._onTranslateXChangeBySideEffect(n,e):this._onTranslateXChangeBySideEffect(e,n),r!==e.value&&this._onValueChange(e),a!==n.value&&this._onValueChange(n)}_updateMaxNonRange(t){let e=this._getInput(Mn.END);if(e){let n=e.value;e.max=t,e._updateThumbUIByValue(),this._updateTrackUI(e),n!==e.value&&this._onValueChange(e)}}get step(){return this._step}set step(t){let e=isNaN(t)?this._step:t;this._step!==e&&this._updateStep(e)}_step=1;_updateStep(t){this._step=t,this._isRange?this._updateStepRange():this._updateStepNonRange(),this._onMinMaxOrStepChange()}_updateStepRange(){let t=this._getInput(Mn.END),e=this._getInput(Mn.START),n=t.value,r=e.value,a=e.value;t.min=this._min,e.max=this._max,t.step=this._step,e.step=this._step,this._platform.SAFARI&&(t.value=t.value,e.value=e.value),t.min=Math.max(this._min,e.value),e.max=Math.min(this._max,t.value),e._updateWidthInactive(),t._updateWidthInactive(),t.value<a?this._onTranslateXChangeBySideEffect(e,t):this._onTranslateXChangeBySideEffect(t,e),n!==t.value&&this._onValueChange(t),r!==e.value&&this._onValueChange(e)}_updateStepNonRange(){let t=this._getInput(Mn.END);if(t){let e=t.value;t.step=this._step,this._platform.SAFARI&&(t.value=t.value),t._updateThumbUIByValue(),e!==t.value&&this._onValueChange(t)}}displayWith=t=>`${t}`;_tickMarks;_noopAnimations;_dirChangeSubscription;_resizeObserver;_cachedWidth;_cachedLeft;_rippleRadius=24;startValueIndicatorText="";endValueIndicatorText="";_endThumbTransform;_startThumbTransform;_isRange=!1;_isRtl=!1;_hasViewInitialized=!1;_tickMarkTrackWidth=0;_hasAnimation=!1;_resizeTimer=null;_platform=ye(mo);constructor(){ye(wa).load(av);let t=ye(cr,{optional:!0});this._noopAnimations=t==="NoopAnimations",this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>this._onDirChange()),this._isRtl=this._dir.value==="rtl")}_knobRadius=8;_inputPadding;ngAfterViewInit(){this._platform.isBrowser&&this._updateDimensions();let t=this._getInput(Mn.END),e=this._getInput(Mn.START);this._isRange=!!t&&!!e,this._cdr.detectChanges();let n=this._getThumb(Mn.END);this._rippleRadius=n._ripple.radius,this._inputPadding=this._rippleRadius-this._knobRadius,this._isRange?this._initUIRange(t,e):this._initUINonRange(t),this._updateTrackUI(t),this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._observeHostResize(),this._cdr.detectChanges()}_initUINonRange(t){t.initProps(),t.initUI(),this._updateValueIndicatorUI(t),this._hasViewInitialized=!0,t._updateThumbUIByValue()}_initUIRange(t,e){t.initProps(),t.initUI(),e.initProps(),e.initUI(),t._updateMinMax(),e._updateMinMax(),t._updateStaticStyles(),e._updateStaticStyles(),this._updateValueIndicatorUIs(),this._hasViewInitialized=!0,t._updateThumbUIByValue(),e._updateThumbUIByValue()}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._resizeObserver?.disconnect(),this._resizeObserver=null}_onDirChange(){this._isRtl=this._dir?.value==="rtl",this._isRange?this._onDirChangeRange():this._onDirChangeNonRange(),this._updateTickMarkUI()}_onDirChangeRange(){let t=this._getInput(Mn.END),e=this._getInput(Mn.START);t._setIsLeftThumb(),e._setIsLeftThumb(),t.translateX=t._calcTranslateXByValue(),e.translateX=e._calcTranslateXByValue(),t._updateStaticStyles(),e._updateStaticStyles(),t._updateWidthInactive(),e._updateWidthInactive(),t._updateThumbUIByValue(),e._updateThumbUIByValue()}_onDirChangeNonRange(){this._getInput(Mn.END)._updateThumbUIByValue()}_observeHostResize(){typeof ResizeObserver>"u"||!ResizeObserver||this._ngZone.runOutsideAngular(()=>{this._resizeObserver=new ResizeObserver(()=>{this._isActive()||(this._resizeTimer&&clearTimeout(this._resizeTimer),this._onResize())}),this._resizeObserver.observe(this._elementRef.nativeElement)})}_isActive(){return this._getThumb(Mn.START)._isActive||this._getThumb(Mn.END)._isActive}_getValue(t=Mn.END){let e=this._getInput(t);return e?e.value:this.min}_skipUpdate(){return!!(this._getInput(Mn.START)?._skipUIUpdate||this._getInput(Mn.END)?._skipUIUpdate)}_updateDimensions(){this._cachedWidth=this._elementRef.nativeElement.offsetWidth,this._cachedLeft=this._elementRef.nativeElement.getBoundingClientRect().left}_setTrackActiveStyles(t){let e=this._trackActive.nativeElement.style;e.left=t.left,e.right=t.right,e.transformOrigin=t.transformOrigin,e.transform=t.transform}_calcTickMarkTransform(t){let e=t*(this._tickMarkTrackWidth/(this._tickMarks.length-1));return`translateX(${this._isRtl?this._cachedWidth-6-e:e}px`}_onTranslateXChange(t){this._hasViewInitialized&&(this._updateThumbUI(t),this._updateTrackUI(t),this._updateOverlappingThumbUI(t))}_onTranslateXChangeBySideEffect(t,e){this._hasViewInitialized&&(t._updateThumbUIByValue(),e._updateThumbUIByValue())}_onValueChange(t){this._hasViewInitialized&&(this._updateValueIndicatorUI(t),this._updateTickMarkUI(),this._cdr.detectChanges())}_onMinMaxOrStepChange(){this._hasViewInitialized&&(this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.markForCheck())}_onResize(){if(this._hasViewInitialized){if(this._updateDimensions(),this._isRange){let t=this._getInput(Mn.END),e=this._getInput(Mn.START);t._updateThumbUIByValue(),e._updateThumbUIByValue(),t._updateStaticStyles(),e._updateStaticStyles(),t._updateMinMax(),e._updateMinMax(),t._updateWidthInactive(),e._updateWidthInactive()}else{let t=this._getInput(Mn.END);t&&t._updateThumbUIByValue()}this._updateTickMarkUI(),this._updateTickMarkTrackUI(),this._cdr.detectChanges()}}_thumbsOverlap=!1;_areThumbsOverlapping(){let t=this._getInput(Mn.START),e=this._getInput(Mn.END);return!t||!e?!1:e.translateX-t.translateX<20}_updateOverlappingThumbClassNames(t){let e=t.getSibling(),n=this._getThumb(t.thumbPosition);this._getThumb(e.thumbPosition)._hostElement.classList.remove("mdc-slider__thumb--top"),n._hostElement.classList.toggle("mdc-slider__thumb--top",this._thumbsOverlap)}_updateOverlappingThumbUI(t){!this._isRange||this._skipUpdate()||this._thumbsOverlap!==this._areThumbsOverlapping()&&(this._thumbsOverlap=!this._thumbsOverlap,this._updateOverlappingThumbClassNames(t))}_updateThumbUI(t){if(this._skipUpdate())return;let e=this._getThumb(t.thumbPosition===Mn.END?Mn.END:Mn.START);e._hostElement.style.transform=`translateX(${t.translateX}px)`}_updateValueIndicatorUI(t){if(this._skipUpdate())return;let e=this.displayWith(t.value);if(this._hasViewInitialized?t._valuetext.set(e):t._hostElement.setAttribute("aria-valuetext",e),this.discrete){t.thumbPosition===Mn.START?this.startValueIndicatorText=e:this.endValueIndicatorText=e;let n=this._getThumb(t.thumbPosition);e.length<3?n._hostElement.classList.add("mdc-slider__thumb--short-value"):n._hostElement.classList.remove("mdc-slider__thumb--short-value")}}_updateValueIndicatorUIs(){let t=this._getInput(Mn.END),e=this._getInput(Mn.START);t&&this._updateValueIndicatorUI(t),e&&this._updateValueIndicatorUI(e)}_updateTickMarkTrackUI(){if(!this.showTickMarks||this._skipUpdate())return;let t=this._step&&this._step>0?this._step:1,n=(Math.floor(this.max/t)*t-this.min)/(this.max-this.min);this._tickMarkTrackWidth=(this._cachedWidth-6)*n}_updateTrackUI(t){this._skipUpdate()||(this._isRange?this._updateTrackUIRange(t):this._updateTrackUINonRange(t))}_updateTrackUIRange(t){let e=t.getSibling();if(!e||!this._cachedWidth)return;let n=Math.abs(e.translateX-t.translateX)/this._cachedWidth;t._isLeftThumb&&this._cachedWidth?this._setTrackActiveStyles({left:"auto",right:`${this._cachedWidth-e.translateX}px`,transformOrigin:"right",transform:`scaleX(${n})`}):this._setTrackActiveStyles({left:`${e.translateX}px`,right:"auto",transformOrigin:"left",transform:`scaleX(${n})`})}_updateTrackUINonRange(t){this._isRtl?this._setTrackActiveStyles({left:"auto",right:"0px",transformOrigin:"right",transform:`scaleX(${1-t.fillPercentage})`}):this._setTrackActiveStyles({left:"0px",right:"auto",transformOrigin:"left",transform:`scaleX(${t.fillPercentage})`})}_updateTickMarkUI(){if(!this.showTickMarks||this.step===void 0||this.min===void 0||this.max===void 0)return;let t=this.step>0?this.step:1;this._isRange?this._updateTickMarkUIRange(t):this._updateTickMarkUINonRange(t)}_updateTickMarkUINonRange(t){let e=this._getValue(),n=Math.max(Math.round((e-this.min)/t),0)+1,r=Math.max(Math.round((this.max-e)/t),0)-1;this._isRtl?n++:r++,this._tickMarks=Array(n).fill(h_.ACTIVE).concat(Array(r).fill(h_.INACTIVE))}_updateTickMarkUIRange(t){let e=this._getValue(),n=this._getValue(Mn.START),r=Math.max(Math.round((n-this.min)/t),0),a=Math.max(Math.round((e-n)/t)+1,0),s=Math.max(Math.round((this.max-e)/t),0);this._tickMarks=Array(r).fill(h_.INACTIVE).concat(Array(a).fill(h_.ACTIVE),Array(s).fill(h_.INACTIVE))}_getInput(t){if(t===Mn.END&&this._input)return this._input;if(this._inputs?.length)return t===Mn.START?this._inputs.first:this._inputs.last}_getThumb(t){return t===Mn.END?this._thumbs?.last:this._thumbs?.first}_setTransition(t){this._hasAnimation=!this._platform.IOS&&t&&!this._noopAnimations,this._elementRef.nativeElement.classList.toggle("mat-mdc-slider-with-animation",this._hasAnimation)}_isCursorOnSliderThumb(t,e){let n=e.width/2,r=e.x+n,a=e.y+n,s=t.clientX-r,m=t.clientY-a;return Math.pow(s,2)+Math.pow(m,2)<Math.pow(n,2)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=O({type:i,selectors:[["mat-slider"]],contentQueries:function(e,n,r){if(e&1&&(Rs(r,C0e,5),Rs(r,gtn,4)),e&2){let a;Je(a=et())&&(n._input=a.first),Je(a=et())&&(n._inputs=a)}},viewQuery:function(e,n){if(e&1&&(ot(stn,5),ot(_0e,5)),e&2){let r;Je(r=et())&&(n._trackActive=r.first),Je(r=et())&&(n._thumbs=r)}},hostAttrs:[1,"mat-mdc-slider","mdc-slider"],hostVars:12,hostBindings:function(e,n){e&2&&(Xo("mat-"+(n.color||"primary")),ge("mdc-slider--range",n._isRange)("mdc-slider--disabled",n.disabled)("mdc-slider--discrete",n.discrete)("mdc-slider--tick-marks",n.showTickMarks)("_mat-animation-noopable",n._noopAnimations))},inputs:{disabled:[2,"disabled","disabled",ii],discrete:[2,"discrete","discrete",ii],showTickMarks:[2,"showTickMarks","showTickMarks",ii],min:[2,"min","min",Jl],color:"color",disableRipple:[2,"disableRipple","disableRipple",ii],max:[2,"max","max",Jl],step:[2,"step","step",Jl],displayWith:"displayWith"},exportAs:["matSlider"],features:[U([{provide:wz,useExisting:i}])],ngContentSelectors:ltn,decls:9,vars:5,consts:[["trackActive",""],["tickMarkContainer",""],[1,"mdc-slider__track"],[1,"mdc-slider__track--inactive"],[1,"mdc-slider__track--active"],[1,"mdc-slider__track--active_fill"],[1,"mdc-slider__tick-marks"],[3,"discrete","thumbPosition","valueIndicatorText"],[3,"class","transform"]],template:function(e,n){e&1&&(Vt(),Nt(0),_(1,"div",2),w(2,"div",3),_(3,"div",4),w(4,"div",5,0),S(),g(6,dtn,3,1,"div",6),S(),g(7,ptn,1,3,"mat-slider-visual-thumb",7),w(8,"mat-slider-visual-thumb",7)),e&2&&(d(6),Ql(n.showTickMarks?6:-1),d(),Ql(n._isRange?7:-1),d(),c("discrete",n.discrete)("thumbPosition",2)("valueIndicatorText",n.endValueIndicatorText))},dependencies:[utn],styles:[`.mdc-slider__track{position:absolute;top:50%;transform:translateY(-50%);width:100%;pointer-events:none;height:var(--mdc-slider-inactive-track-height, 4px)}.mdc-slider__track--active,.mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider__track--active{overflow:hidden;border-radius:var(--mdc-slider-active-track-shape, var(--mat-sys-corner-full));height:var(--mdc-slider-active-track-height, 4px);top:calc((var(--mdc-slider-inactive-track-height, 4px) - var(--mdc-slider-active-track-height, 4px))/2)}.mdc-slider__track--active_fill{border-top-style:solid;box-sizing:border-box;height:100%;width:100%;position:relative;transform-origin:left;transition:transform 80ms ease;border-color:var(--mdc-slider-active-track-color, var(--mat-sys-primary));border-top-width:var(--mdc-slider-active-track-height, 4px)}.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:var(--mdc-slider-disabled-active-track-color, var(--mat-sys-on-surface))}[dir=rtl] .mdc-slider__track--active_fill{-webkit-transform-origin:right;transform-origin:right}.mdc-slider__track--inactive{left:0;top:0;opacity:.24;background-color:var(--mdc-slider-inactive-track-color, var(--mat-sys-surface-variant));height:var(--mdc-slider-inactive-track-height, 4px);border-radius:var(--mdc-slider-inactive-track-shape, var(--mat-sys-corner-full))}.mdc-slider--disabled .mdc-slider__track--inactive{background-color:var(--mdc-slider-disabled-inactive-track-color, var(--mat-sys-on-surface));opacity:.24}.mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider__value-indicator-container{bottom:44px;left:50%;pointer-events:none;position:absolute;transform:translateX(-50%);transform:var(--mat-slider-value-indicator-container-transform, translateX(-50%) rotate(-45deg))}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider__value-indicator{display:flex;align-items:center;border-radius:4px;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom;opacity:1;transition:transform 100ms cubic-bezier(0.4, 0, 1, 1);word-break:normal;background-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary));color:var(--mdc-slider-label-label-text-color, var(--mat-sys-on-primary));width:var(--mat-slider-value-indicator-width, 28px);height:var(--mat-slider-value-indicator-height, 28px);padding:var(--mat-slider-value-indicator-padding, 0);opacity:var(--mat-slider-value-indicator-opacity, 1);border-radius:var(--mat-slider-value-indicator-border-radius, 50% 50% 50% 0)}.mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}.mdc-slider__value-indicator::before{border-left:6px solid rgba(0,0,0,0);border-right:6px solid rgba(0,0,0,0);border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;display:var(--mat-slider-value-indicator-caret-display, none);border-top-color:var(--mdc-slider-label-container-color, var(--mat-sys-primary))}.mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media(forced-colors: active){.mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider__value-indicator-text{text-align:center;width:var(--mat-slider-value-indicator-width, 28px);transform:var(--mat-slider-value-indicator-text-transform, rotate(45deg));font-family:var(--mdc-slider-label-label-text-font, var(--mat-sys-label-medium-font));font-size:var(--mdc-slider-label-label-text-size, var(--mat-sys-label-medium-size));font-weight:var(--mdc-slider-label-label-text-weight, var(--mat-sys-label-medium-weight));line-height:var(--mdc-slider-label-label-text-line-height, var(--mat-sys-label-medium-line-height));letter-spacing:var(--mdc-slider-label-label-text-tracking, var(--mat-sys-label-medium-tracking))}.mdc-slider__thumb{-webkit-user-select:none;user-select:none;display:flex;left:-24px;outline:none;position:absolute;height:48px;width:48px;pointer-events:none}.mdc-slider--discrete .mdc-slider__thumb{transition:transform 80ms ease}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__thumb--top{z-index:1}.mdc-slider__thumb-knob{position:absolute;box-sizing:border-box;left:50%;top:50%;transform:translate(-50%, -50%);border-style:solid;width:var(--mdc-slider-handle-width, 20px);height:var(--mdc-slider-handle-height, 20px);border-width:calc(var(--mdc-slider-handle-height, 20px)/2) calc(var(--mdc-slider-handle-width, 20px)/2);box-shadow:var(--mdc-slider-handle-elevation, var(--mat-sys-level1));background-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-handle-color, var(--mat-sys-primary));border-radius:var(--mdc-slider-handle-shape, var(--mat-sys-corner-full))}.mdc-slider__thumb:hover .mdc-slider__thumb-knob{background-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-hover-handle-color, var(--mat-sys-primary))}.mdc-slider__thumb--focused .mdc-slider__thumb-knob{background-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary));border-color:var(--mdc-slider-focus-handle-color, var(--mat-sys-primary))}.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface));border-color:var(--mdc-slider-disabled-handle-color, var(--mat-sys-on-surface))}.mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border:solid 1px #fff;box-sizing:content-box;border-color:var(--mdc-slider-with-overlap-handle-outline-color, var(--mat-sys-on-primary));border-width:var(--mdc-slider-with-overlap-handle-outline-width, 1px)}.mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider__tick-mark--active,.mdc-slider__tick-mark--inactive{width:var(--mdc-slider-with-tick-marks-container-size, 2px);height:var(--mdc-slider-with-tick-marks-container-size, 2px);border-radius:var(--mdc-slider-with-tick-marks-container-shape, var(--mat-sys-corner-full))}.mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-inactive-container-color, var(--mat-sys-on-surface-variant))}.mdc-slider--disabled .mdc-slider__tick-mark--inactive{opacity:var(--mdc-slider-with-tick-marks-inactive-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-disabled-container-color, var(--mat-sys-on-surface))}.mdc-slider__tick-mark--active{opacity:var(--mdc-slider-with-tick-marks-active-container-opacity, 0.38);background-color:var(--mdc-slider-with-tick-marks-active-container-color, var(--mat-sys-on-primary))}.mdc-slider__input{cursor:pointer;left:2px;margin:0;height:44px;opacity:0;position:absolute;top:2px;width:44px;box-sizing:content-box}.mdc-slider__input.mat-mdc-slider-input-no-pointer-events{pointer-events:none}.mdc-slider__input.mat-slider__right-input{left:auto;right:0}.mat-mdc-slider{display:inline-block;box-sizing:border-box;outline:none;vertical-align:middle;cursor:pointer;height:48px;margin:0 8px;position:relative;touch-action:pan-y;width:auto;min-width:112px;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-slider.mdc-slider--disabled{cursor:auto;opacity:.38}.mat-mdc-slider .mdc-slider__thumb,.mat-mdc-slider .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider.mdc-slider--discrete .mdc-slider__track--active_fill{transition-duration:0ms}.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__thumb,.mat-mdc-slider.mat-mdc-slider-with-animation .mdc-slider__track--active_fill{transition-duration:80ms}.mat-mdc-slider .mat-ripple .mat-ripple-element{background-color:var(--mat-slider-ripple-color, var(--mat-sys-primary))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-hover-ripple{background-color:var(--mat-slider-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 5%, transparent))}.mat-mdc-slider .mat-ripple .mat-mdc-slider-focus-ripple,.mat-mdc-slider .mat-ripple .mat-mdc-slider-active-ripple{background-color:var(--mat-slider-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-primary) 20%, transparent))}.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__thumb,.mat-mdc-slider._mat-animation-noopable.mdc-slider--discrete .mdc-slider__track--active_fill,.mat-mdc-slider._mat-animation-noopable .mdc-slider__value-indicator{transition:none}.mat-mdc-slider .mat-focus-indicator::before{border-radius:50%}.mdc-slider__thumb--focused .mat-focus-indicator::before{content:""}
439
439
  `],encapsulation:2,changeDetection:0})}return i})();var htn={provide:xd,useExisting:Fr(()=>Oz),multi:!0};var Oz=(()=>{class i{_ngZone=ye(Rt);_elementRef=ye(R);_cdr=ye(Kt);_slider=ye(wz);_platform=ye(mo);_listenerCleanups;get value(){return Jl(this._hostElement.value,0)}set value(t){t=isNaN(t)?0:t;let e=t+"";if(!this._hasSetInitialValue){this._initialValue=e;return}this._isActive||this._setValue(e)}_setValue(t){this._hostElement.value=t,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges(),this._slider._cdr.markForCheck()}valueChange=new Ae;dragStart=new Ae;dragEnd=new Ae;get translateX(){return this._slider.min>=this._slider.max?(this._translateX=this._tickMarkOffset,this._translateX):(this._translateX===void 0&&(this._translateX=this._calcTranslateXByValue()),this._translateX)}set translateX(t){this._translateX=t}_translateX;thumbPosition=Mn.END;get min(){return Jl(this._hostElement.min,0)}set min(t){this._hostElement.min=t+"",this._cdr.detectChanges()}get max(){return Jl(this._hostElement.max,0)}set max(t){this._hostElement.max=t+"",this._cdr.detectChanges()}get step(){return Jl(this._hostElement.step,0)}set step(t){this._hostElement.step=t+"",this._cdr.detectChanges()}get disabled(){return ii(this._hostElement.disabled)}set disabled(t){this._hostElement.disabled=t,this._cdr.detectChanges(),this._slider.disabled!==this.disabled&&(this._slider.disabled=this.disabled)}get percentage(){return this._slider.min>=this._slider.max?this._slider._isRtl?1:0:(this.value-this._slider.min)/(this._slider.max-this._slider.min)}get fillPercentage(){return this._slider._cachedWidth?this._translateX===0?0:this.translateX/this._slider._cachedWidth:this._slider._isRtl?1:0}_hostElement=this._elementRef.nativeElement;_valuetext=xe("");_knobRadius=8;_tickMarkOffset=3;_isActive=!1;_isFocused=!1;_setIsFocused(t){this._isFocused=t}_hasSetInitialValue=!1;_initialValue;_formControl;_destroyed=new Xe;_skipUIUpdate=!1;_onChangeFn;_onTouchedFn=()=>{};_isControlInitialized=!1;constructor(){let t=ye(qi);this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[t.listen(this._hostElement,"pointerdown",this._onPointerDown.bind(this)),t.listen(this._hostElement,"pointermove",this._onPointerMove.bind(this)),t.listen(this._hostElement,"pointerup",this._onPointerUp.bind(this))]})}ngOnDestroy(){this._listenerCleanups.forEach(t=>t()),this._destroyed.next(),this._destroyed.complete(),this.dragStart.complete(),this.dragEnd.complete()}initProps(){this._updateWidthInactive(),this.disabled!==this._slider.disabled&&(this._slider.disabled=!0),this.step=this._slider.step,this.min=this._slider.min,this.max=this._slider.max,this._initValue()}initUI(){this._updateThumbUIByValue()}_initValue(){this._hasSetInitialValue=!0,this._initialValue===void 0?this.value=this._getDefaultValue():(this._hostElement.value=this._initialValue,this._updateThumbUIByValue(),this._slider._onValueChange(this),this._cdr.detectChanges())}_getDefaultValue(){return this.min}_onBlur(){this._setIsFocused(!1),this._onTouchedFn()}_onFocus(){this._slider._setTransition(!1),this._slider._updateTrackUI(this),this._setIsFocused(!0)}_onChange(){this.valueChange.emit(this.value),this._isActive&&this._updateThumbUIByValue({withAnimation:!0})}_onInput(){this._onChangeFn?.(this.value),(this._slider.step||!this._isActive)&&this._updateThumbUIByValue({withAnimation:!0}),this._slider._onValueChange(this)}_onNgControlValueChange(){(!this._isActive||!this._isFocused)&&(this._slider._onValueChange(this),this._updateThumbUIByValue()),this._slider.disabled=this._formControl.disabled}_onPointerDown(t){if(!(this.disabled||t.button!==0)){if(this._platform.IOS){let e=this._slider._isCursorOnSliderThumb(t,this._slider._getThumb(this.thumbPosition)._hostElement.getBoundingClientRect());this._isActive=e,this._updateWidthActive(),this._slider._updateDimensions();return}this._isActive=!0,this._setIsFocused(!0),this._updateWidthActive(),this._slider._updateDimensions(),this._slider.step||this._updateThumbUIByPointerEvent(t,{withAnimation:!0}),this.disabled||(this._handleValueCorrection(t),this.dragStart.emit({source:this,parent:this._slider,value:this.value}))}}_handleValueCorrection(t){this._skipUIUpdate=!0,setTimeout(()=>{this._skipUIUpdate=!1,this._fixValue(t)},0)}_fixValue(t){let e=t.clientX-this._slider._cachedLeft,n=this._slider._cachedWidth,r=this._slider.step===0?1:this._slider.step,a=Math.floor((this._slider.max-this._slider.min)/r),s=this._slider._isRtl?1-e/n:e/n,p=Math.round(s*a)/a*(this._slider.max-this._slider.min)+this._slider.min,h=Math.round(p/r)*r,C=this.value;if(h===C){this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(t,{withAnimation:this._slider._hasAnimation});return}this.value=h,this.valueChange.emit(this.value),this._onChangeFn?.(this.value),this._slider._onValueChange(this),this._slider.step>0?this._updateThumbUIByValue():this._updateThumbUIByPointerEvent(t,{withAnimation:this._slider._hasAnimation})}_onPointerMove(t){!this._slider.step&&this._isActive&&this._updateThumbUIByPointerEvent(t)}_onPointerUp(){this._isActive&&(this._isActive=!1,this._platform.SAFARI&&this._setIsFocused(!1),this.dragEnd.emit({source:this,parent:this._slider,value:this.value}),setTimeout(()=>this._updateWidthInactive(),this._platform.IOS?10:0))}_clamp(t){let e=this._tickMarkOffset,n=this._slider._cachedWidth-this._tickMarkOffset;return Math.max(Math.min(t,n),e)}_calcTranslateXByValue(){return this._slider._isRtl?(1-this.percentage)*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset:this.percentage*(this._slider._cachedWidth-this._tickMarkOffset*2)+this._tickMarkOffset}_calcTranslateXByPointerEvent(t){return t.clientX-this._slider._cachedLeft}_updateWidthActive(){}_updateWidthInactive(){this._hostElement.style.padding=`0 ${this._slider._inputPadding}px`,this._hostElement.style.width=`calc(100% + ${this._slider._inputPadding-this._tickMarkOffset*2}px)`,this._hostElement.style.left=`-${this._slider._rippleRadius-this._tickMarkOffset}px`}_updateThumbUIByValue(t){this.translateX=this._clamp(this._calcTranslateXByValue()),this._updateThumbUI(t)}_updateThumbUIByPointerEvent(t,e){this.translateX=this._clamp(this._calcTranslateXByPointerEvent(t)),this._updateThumbUI(e)}_updateThumbUI(t){this._slider._setTransition(!!t?.withAnimation),this._slider._onTranslateXChange(this)}writeValue(t){(this._isControlInitialized||t!==null)&&(this.value=t)}registerOnChange(t){this._onChangeFn=t,this._isControlInitialized=!0}registerOnTouched(t){this._onTouchedFn=t}setDisabledState(t){this.disabled=t}focus(){this._hostElement.focus()}blur(){this._hostElement.blur()}static \u0275fac=function(e){return new(e||i)};static \u0275dir=Bt({type:i,selectors:[["input","matSliderThumb",""]],hostAttrs:["type","range",1,"mdc-slider__input"],hostVars:1,hostBindings:function(e,n){e&1&&G("change",function(){return n._onChange()})("input",function(){return n._onInput()})("blur",function(){return n._onBlur()})("focus",function(){return n._onFocus()}),e&2&&x("aria-valuetext",n._valuetext())},inputs:{value:[2,"value","value",Jl]},outputs:{valueChange:"valueChange",dragStart:"dragStart",dragEnd:"dragEnd"},exportAs:["matSliderThumb"],features:[U([htn,{provide:C0e,useExisting:i}])]})}return i})();var S0e=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=en({type:i});static \u0275inj=Jt({imports:[Mo,sv]})}return i})();var vtn=["*"],C7=(()=>{let o=class o extends tt{constructor(e,n,r,a){super(r,a),this.loggingService=e,this.customFilterService=n,this.elementRef=r,this.themeService=a,this.headingMode=!1,this.changeStatus=new Ae,this.componentId="velt-unresolve-button"}ngOnInit(){this.setupA11yAttributes()}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","button"),e.setAttribute("aria-label","Unresolve comment"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in UnresolveButtonComponent setupA11yAttributes: ",e)}}unresolveComment(e){this.loggingService.log("%c[WB] Calling FUNCTION: unresolveComment","color: green;");try{if(!this.annotation)return;this.changeStatus.emit({status:this.customFilterService.defaultStatus,statusOptionType:e})}catch(n){this.catchError("Error in UnresolveButtonComponent unresolveComment: ",n)}}catchError(e,n,r){try{this.loggingService.catch(e,n,T(I({},r||{}),{annotationId:this.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(Go),u(R),u(qe))},o.\u0275cmp=O({type:o,selectors:[["app-unresolve-button"]],inputs:{annotation:"annotation",sidebarMode:"sidebarMode",headingMode:"headingMode"},outputs:{changeStatus:"changeStatus"},standalone:!1,features:[B],ngContentSelectors:vtn,decls:3,vars:8,consts:[["type","unresolve",3,"clicked","tooltip","darkMode","colorMode"]],template:function(n,r){n&1&&(Vt(),_(0,"app-tooltip-button",0),A(1,"translate"),G("clicked",function(){return r.unresolveComment("button")}),Nt(2),S()),n&2&&(rt("color",(r.annotation==null||r.annotation.status==null?null:r.annotation.status.color)+" !important"),c("tooltip",P(1,6,"Unresolve"))("darkMode",r.darkMode)("colorMode",r.headingMode),x("data-testid",r.componentId+"-tooltip-button"))},dependencies:[ug,de],encapsulation:2});let i=o;return i})();var b0e=(()=>{let o=class o{constructor(e){this.loggingService=e,this.commentTextData$=new _e({});try{this.loggingService.log("%c[WB] Creating CLASS: CommentTextService","color: blue;")}catch(n){this.loggingService.catch("Error in CommentTextService constructor: ",n)}}setCommentTextData(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: setCommentTextData","color: green;");let n=e.annotationId||e.multiThreadAnnotationId;if(n){let r=e.componentId,a=this.commentTextData$.getValue();a[n]||(a[n]={}),a[n][r]=e,this.commentTextData$.next(a),this.updateLastPositionInDataByAnnotationId(n)}}catch(n){this.loggingService.catch("Error in CommentTextService setCommentTextData: ",n)}}removeCommentTextData(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: removeCommentTextData","color: green;");let n=e.annotationId||e.multiThreadAnnotationId;if(n){let r=e.componentId,a=this.commentTextData$.getValue();delete a[n][r],this.commentTextData$.next(a),this.updateLastPositionInDataByAnnotationId(n)}}catch(n){this.loggingService.catch("Error in CommentTextService removeCommentTextData: ",n)}}updateLastPositionInDataByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: updateLastPositionInDataByAnnotationId","color: green;");let n=this.commentTextData$.getValue();Object.values(n[e]).forEach(r=>{r.last=this.checkIfLast(r)}),this.commentTextData$.next(n)}catch(n){this.loggingService.catch("Error in CommentTextService updateLastPositionInDataByAnnotationId: ",n)}}checkIfLast(e){try{if(this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: checkIfLast","color: green;"),e?.elementRef?.nativeElement){let n=[];if(e.annotationId?n=Array.from(document.querySelectorAll(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.ANNOTATION_ID}="${e.annotationId}"]`)):e.multiThreadAnnotationId&&(n=Array.from(document.querySelectorAll(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.MULTI_THREAD_ANNOTATION_ID}="${e.multiThreadAnnotationId}"]`))),n.length&&n[n.length-1]===e.elementRef.nativeElement)return!0}return!1}catch(n){return this.loggingService.catch("Error in CommentTextService checkIfLast: ",n),!1}}getCommentTextDataByAnnotationIdAndComponentId(e,n){try{return this.loggingService.log("%c[WB] Calling CommentTextService FUNCTION: getCommentTextDataByAnnotationIdAndComponentId","color: green;"),this.commentTextData$.pipe(ce(r=>r&&e&&n&&r[e]?r[e][n]:null))}catch(r){return this.loggingService.catch("Error in CommentTextService getCommentTextDataByAnnotationIdAndComponentId: ",r),se(null)}}};o.\u0275fac=function(n){return new(n||o)(J(y))},o.\u0275prov=Pe({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var _tn=["overlay"],ytn=["*"];function Stn(i,o){if(i&1){let t=q();f(0),_(1,"velt-multi-thread-comment-dialog-internal",6),A(2,"translate"),G("updateOverlayPosition",function(){N(t);let n=l(4);return F(n.updateOverlayPosition())})("saveComment",function(n){N(t);let r=l(4);return F(r.saveComment(n))}),S(),v()}if(i&2){let t=l(3).ngIf,e=l();d(),c("multiThreadAnnotationId",t.commentPinAnnotation.annotationId)("annotation",t.commentPinAnnotation)("user",t.user)("commentPinSelected",!0),x("data-testid",e.componentTestId+"-multi-thread-dialog")("role","dialog")("aria-label",P(2,7,"Multi-thread comment dialog"))}}function btn(i,o){if(i&1){let t=q();_(0,"snippyly-comment-dialog",7),A(1,"translate"),G("updateOverlayPosition",function(){N(t);let n=l(4);return F(n.updateOverlayPosition())})("saveComment",function(n){N(t);let r=l(4);return F(r.saveComment(n))}),S()}if(i&2){let t=l(3).ngIf,e=l();c("annotation",t.commentPinAnnotation)("user",t.user)("commentPinSelected",t.commentPinSelected),x("data-testid",e.componentTestId+"-comment-dialog")("role","dialog")("aria-label",P(1,6,"Comment dialog"))}}function Itn(i,o){if(i&1&&g(0,Stn,3,9,"ng-container",5)(1,btn,2,8,"ng-template",null,1,Te),i&2){let t=pe(2),e=l(2).ngIf;c("ngIf",(e==null||e.commentPinAnnotation==null?null:e.commentPinAnnotation.type)==="multiThread")("ngIfElse",t)}}function Etn(i,o){if(i&1&&g(0,Itn,3,2,"ng-template",4,0,Te),i&2){let t=l().ngIf,e=l();c("cdkConnectedOverlayOrigin",e.origin)("cdkConnectedOverlayOpen",(!t.mobileMode||!t.isPhone)&&!t.inboxMode&&!t.streamMode&&(!t.inlineCommentMode||t.isInsidePdfViewer)&&t.floatingCommentsEnabled&&(t.last&&t.commentPinSelected||t.commentPinHover&&!t.commentPinSelected))("cdkConnectedOverlayPanelClass","snippyly-overlay-panel")("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)}}function xtn(i,o){if(i&1&&(f(0),Nt(1),g(2,Etn,2,7,"ng-template",3),v()),i&2){let t=l();d(2),c("ngIf",t.origin)}}var I0e=(()=>{let o=class o{onPointerOverListener(e){try{this.onPointerOver(e),e.stopPropagation()}catch(n){this.catchError("Error in VeltCommentTextComponent onPointerOverListener: ",n)}}onPointerOutListener(e){try{this.onPointerOut(),e.stopPropagation()}catch(n){this.catchError("Error in VeltCommentTextComponent onPointerOutListener: ",n)}}onPointerDownListener(e){try{e.stopPropagation()}catch(n){this.catchError("Error in VeltCommentTextComponent onPointerDownListener: ",n)}}onPointerUpListener(e){try{this.togglePinSelection(),e.stopPropagation()}catch(n){this.catchError("Error in VeltCommentTextComponent onPointerUpListener: ",n)}}constructor(e,n,r,a,s,m,p){this.authService=e,this.commentService=n,this.commentTextService=r,this.domService=a,this.loggingService=s,this.elementRef=m,this.cd=p,this.resolvedCommentsOnDom=!1,this.componentConfigSignal=xe({commentPinAnnotation:void 0,user:null,selectedAnnotationsMap:{},commentPinHover:!1,commentPinSelected:!1,isPhone:!1,mobileMode:!1,streamMode:!1,inboxMode:!1,textClicked:!1,floatingCommentsEnabled:!0,sidebarVisible:!1,inlineCommentMode:!1,isInsidePdfViewer:!1,first:!1,last:!1}),this.selectedAnnotationsMap={},this.isDialogOnHoverEnabled=!1,this.subscriptions=[],this.componentId=gn(),this.commentAvailable=!1,this.commentSelected=!1,this.componentTestId="velt-comment-text";try{this.loggingService.log("%c[WB] Creating Class: VeltCommentTextComponent","color: blue;"),this.origin=new Pn(this.elementRef),this.subscriptions.push(this.authService.getUser$().subscribe(h=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{user:h}),C))},h=>{this.catchError("Error in VeltCommentTextComponent getUser$ subscription: ",h)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(h=>{this.selectedAnnotationsMap=h,this.componentConfigSignal.update(C=>(C=T(I({},C),{selectedAnnotationsMap:h}),C)),this.checkPinSelection()},h=>{this.catchError("Error in VeltCommentTextComponent getSelectedAnnotationsMap$ subscription: ",h)})),this.subscriptions.push(this.commentService.getEnableDialogOnHover$().subscribe(h=>{this.isDialogOnHoverEnabled=h},h=>{this.catchError("Error in CommentPinComponent getEnableDialogOnHover subscription: ",h)})),this.subscriptions.push(this.commentService.onCommentAnnotationDelete$().subscribe(h=>{h?.annotationId&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&h.annotationId===this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.removeThisComponent()},h=>{this.catchError("Error in VeltCommentTextComponent onCommentAnnotationDelete$ subscription: ",h)})),this.subscriptions.push(this.commentService.onMultiThreadCommentAnnotationDelete$().subscribe(h=>{h?.annotationId&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&h.annotationId===this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.removeThisComponent()},h=>{this.catchError("Error in VeltCommentTextComponent onMultiThreadCommentAnnotationDelete$ subscription: ",h)})),this.subscriptions.push(this.commentService.updateCommentDialogPositionTrigger$().subscribe(()=>{try{!!(this.componentConfigSignal().selectedAnnotationsMap&&this.componentConfigSignal().commentPinAnnotation?.annotationId&&this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId])&&this.updateOverlayPosition()}catch(h){this.catchError("Error in VeltCommentTextComponent updateCommentDialogPositionTrigger$: ",h)}},h=>{this.catchError("Error in VeltCommentTextComponent updateCommentDialogPositionTrigger$ subscription: ",h)}))}catch(h){this.catchError("Error in VeltCommentTextComponent constructor: ",h)}}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentTestId)}catch(e){this.loggingService.catch("Error in VeltCommentTextComponent setupA11yAttributes:",e)}}togglePinSelection(e){try{if(this.componentConfigSignal().textClicked&&!e)return;let n=e||this.componentConfigSignal().commentPinAnnotation;if(n)if(this.selectedAnnotationsMap[n.annotationId])e||(document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${n?.annotationId}"]`)?this.domService.resetSelectedAnnotationsMap(!0,"comments"):(this.componentConfigSignal.update(a=>(a=T(I({},a),{textClicked:!0}),a)),this.domService.toggleAnnotationSelection(n)));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(n)}}catch(n){this.catchError("Error in VeltCommentTextComponent togglePinSelection: ",n)}}ngAfterViewInit(){try{this.commentTextData={annotationId:this.annotationId,multiThreadAnnotationId:this.multiThreadAnnotationId,componentId:this.componentId,elementRef:this.elementRef,last:!1},this.commentTextService.setCommentTextData(this.commentTextData),this.subscriptions.push(this.commentTextService.getCommentTextDataByAnnotationIdAndComponentId(this.annotationId||this.multiThreadAnnotationId,this.componentId).subscribe(e=>{this.componentConfigSignal.update(n=>(n=T(I({},n),{last:e?.last||!1}),n)),this.checkPinSelection()},e=>{this.catchError("Error in VeltCommentTextComponent getCommentTextDataByAnnotationIdAndComponentId subscription: ",e)}))}catch(e){this.catchError("Error in VeltCommentTextComponent ngAfterViewInit: ",e)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: ngOnChanges","color: green;"),e?.annotationId&&this.annotationId&&this.getCommentAnnotationByAnnotationId(this.annotationId),e?.multiThreadAnnotationId&&this.multiThreadAnnotationId&&this.getMultiThreadCommentAnnotationByAnnotationId(this.multiThreadAnnotationId)}catch(n){this.catchError("Error in VeltCommentTextComponent ngOnChanges: ",n)}}getCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: getCommentAnnotationByAnnotationId","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.commentAnnotationByAnnotationIdSubscription=this.commentService.getCommentAnnotationByAnnotationId(e).pipe(fe(n=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(r=>(this.resolvedCommentsOnDom=r,n)))),fe(n=>this.domService.getSelectedAnnotationsMap$().pipe(ce(r=>({commentPinAnnotation:n,selectedAnnotationsMap:r||{}}))))).subscribe(n=>{let r;n?.commentPinAnnotation&&(this.resolvedCommentsOnDom||this.commentService.getFilterCommentsOnDom()&&this.commentService.getCommentsFromSidebarMap()||n?.commentPinAnnotation?.status?.type!=="terminal"||n?.selectedAnnotationsMap[n.commentPinAnnotation.annotationId])&&(r=n.commentPinAnnotation),this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinAnnotation:r}),s));let a=!!r;this.commentAvailable!==a&&(this.commentAvailable=a,this.cd.markForCheck()),this.checkPinSelection()})}catch(n){this.catchError("Error in VeltCommentTextComponent getCommentAnnotationByAnnotationId: ",n)}}getMultiThreadCommentAnnotationByAnnotationId(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: getMultiThreadCommentAnnotationByAnnotationId","color: green;"),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription=this.commentService.getMultiThreadCommentAnnotationByAnnotationId(e).subscribe(n=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{commentPinAnnotation:n}),a));let r=!!n;this.commentAvailable!==r&&(this.commentAvailable=r,this.cd.markForCheck()),this.checkPinSelection()})}catch(n){this.catchError("Error in VeltCommentTextComponent getMultiThreadCommentAnnotationByAnnotationId: ",n)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: unsubscribe","color: green;"),this.commentAnnotationByAnnotationIdSubscription&&(this.commentAnnotationByAnnotationIdSubscription.unsubscribe(),this.commentAnnotationByAnnotationIdSubscription=void 0),this.multiThreadCommentAnnotationByAnnotationIdSubscription&&(this.multiThreadCommentAnnotationByAnnotationIdSubscription.unsubscribe(),this.multiThreadCommentAnnotationByAnnotationIdSubscription=void 0),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.catchError("Error in VeltCommentTextComponent unsubscribe: ",e)}}checkPinSelection(){try{this.selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation?.annotationId]?this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinSelected:!0}),e?.commentPinAnnotation?.isDraft&&(e.textClicked=!!e.last),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)),this.componentConfigSignal().commentPinSelected!==this.commentSelected&&(this.commentSelected=this.componentConfigSignal().commentPinSelected,this.cd.markForCheck())}catch(e){this.catchError("Error in VeltCommentTextComponent checkPinSelection: ",e)}}onPointerOver(e){try{if(this.componentConfigSignal().commentPinHover)return;e.buttons?this.componentConfigSignal().commentPinHover&&this.componentConfigSignal.update(n=>(n=T(I({},n),{commentPinHover:!1}),n)):!this.componentConfigSignal().commentPinHover&&this.isDialogOnHoverEnabled&&this.componentConfigSignal.update(n=>(n=T(I({},n),{commentPinHover:!0}),n))}catch(n){this.catchError("Error in VeltCommentTextComponent onPointerOver: ",n)}}onPointerOut(){this.componentConfigSignal.update(e=>(e=T(I({},e),{commentPinHover:!1}),e))}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().commentPinAnnotation?.annotationId),this.commentDialogOverlay&&this.commentDialogOverlay?.overlayRef?.updatePosition()}catch{}}removeThisComponent(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: removeThisComponent","color: green;"),this.clearRemoveThisComponentTimeout();try{if(this.elementRef.nativeElement?.closest(`[${j.ATTRIBUTES.SLATE_EDITOR}]`))return}catch(e){this.catchError("Error in VeltCommentTextComponent removeThisComponent: ",e)}this.removeThisComponentTimeout=setTimeout(()=>{if(this.elementRef.nativeElement?.isConnected){let e=this.elementRef.nativeElement.parentElement,n=this.elementRef.nativeElement.childNodes,r=document.createDocumentFragment();for(let a=0;a<n.length;a++){let s=n[a];s?.nodeType!==Node.COMMENT_NODE&&r.appendChild(s)}e.insertBefore(r,this.elementRef.nativeElement),e.removeChild(this.elementRef.nativeElement),e.normalize()}},500)}catch(e){this.catchError("Error in VeltCommentTextComponent removeThisComponent: ",e)}}clearRemoveThisComponentTimeout(){try{this.removeThisComponentTimeout&&(clearTimeout(this.removeThisComponentTimeout),this.removeThisComponentTimeout=void 0)}catch(e){this.catchError("Error in VeltCommentTextComponent clearRemoveThisComponentTimeout: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: ngOnDestroy","color: green;"),this.clearRemoveThisComponentTimeout(),this.unsubscribe(),this.commentTextData&&this.commentTextService.removeCommentTextData(this.commentTextData)}catch(e){this.catchError("Error in VeltCommentTextComponent ngOnDestroy: ",e)}}saveComment(e){try{this.loggingService.log("%c[WB] Calling VeltCommentTextComponent FUNCTION: saveComment","color: green;"),this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(n){this.catchError("Error in VeltCommentTextComponent saveComment: ",n)}}catchError(e,n,r){try{this.loggingService.catch(e,n,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(n){return new(n||o)(u(He),u(we),u(b0e),u(Re),u(y),u(R),u(Kt))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-text-internal"]],viewQuery:function(n,r){if(n&1&&ot(_tn,5),n&2){let a;Je(a=et())&&(r.commentDialogOverlay=a.first)}},hostVars:2,hostBindings:function(n,r){n&1&&G("pointerover",function(s){return r.onPointerOverListener(s)})("pointerout",function(s){return r.onPointerOutListener(s)})("pointerdown",function(s){return r.onPointerDownListener(s)})("pointerup",function(s){return r.onPointerUpListener(s)}),n&2&&x("comment-available",r.commentAvailable)("comment-selected",r.commentSelected)},inputs:{annotationId:"annotationId",multiThreadAnnotationId:"multiThreadAnnotationId"},standalone:!1,features:[Ze],ngContentSelectors:ytn,decls:1,vars:1,consts:[["overlay","cdkConnectedOverlay"],["commentDialogRef",""],[4,"ngIf"],[3,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],[4,"ngIf","ngIfElse"],[3,"updateOverlayPosition","saveComment","multiThreadAnnotationId","annotation","user","commentPinSelected"],[3,"updateOverlayPosition","saveComment","annotation","user","commentPinSelected"]],template:function(n,r){n&1&&(Vt(),g(0,xtn,3,1,"ng-container",2)),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,Vn,Wo,rs,de],encapsulation:2,changeDetection:0});let i=o;return i})();var E0e=(()=>{let o=class o{transform(e,n=!0){try{if(!n)return e;if(!e)return"";if(e.includes("@"))return e.split("@")[0];let r=e.trim().split(" ");if(r.length<=1)return e;let s=r.pop()?.[0].toUpperCase();return`${r.join(" ")} ${s}.`}catch{return e}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275pipe=zi({name:"shortUserName",type:o,pure:!0,standalone:!1});let i=o;return i})();var x0e=(()=>{let o=class o{constructor(e){this.domService=e}transform(e){try{return this.domService.sanitizeHtml(e)}catch{return e}}};o.\u0275fac=function(n){return new(n||o)(u(Re,16))},o.\u0275pipe=zi({name:"sanitizeHtml",type:o,pure:!0,standalone:!1});let i=o;return i})();var T0e=(()=>{let o=class o{transform(e,n,r){try{return!e||!n||e.length===0?e:e.sort((s,m)=>{let p=s[n],h=m[n];return p<h?r==="asc"?-1:1:p>h?r==="asc"?1:-1:0})}catch{return e}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275pipe=zi({name:"orderBy",type:o,pure:!0,standalone:!1});let i=o;return i})();var D0e=(()=>{let o=class o{transform(e,n){try{return!e||e.length===0?e:[...e].sort((r,a)=>r.value.displayName===n?-1:a.value.displayName===n?1:0)}catch{return e}}};o.\u0275fac=function(n){return new(n||o)},o.\u0275pipe=zi({name:"orderByThisPageInSidebarFilter",type:o,pure:!0,standalone:!1});let i=o;return i})();var w0e=i=>({componentConfigSignal:i}),Ttn=(i,o)=>({condition:i,data:o}),Dtn=(i,o,t,e,n)=>({template:i,context:o,componentName:"velt-notifications-panel-settings-wireframe",variant:t,setIfCondition:e,componentElementRef:n});function wtn(i,o){if(i&1&&(f(0),_(1,"div",3),w(2,"app-notifications-panel-settings-header",4),_(3,"div",5),w(4,"app-notifications-panel-settings-title",4)(5,"app-notifications-panel-settings-description",4),S(),w(6,"app-notifications-panel-settings-list",4)(7,"app-notifications-panel-settings-footer",4),S(),v()),i&2){let t=l(4);d(2),c("componentConfigSignal",t.componentConfigSignal),d(2),c("componentConfigSignal",t.componentConfigSignal),d(),c("componentConfigSignal",t.componentConfigSignal),d(),c("componentConfigSignal",t.componentConfigSignal),d(),c("componentConfigSignal",t.componentConfigSignal)}}function Otn(i,o){if(i&1&&(f(0),g(1,wtn,8,5,"ng-container",2),v()),i&2){let t=l(2).ngIf,e=l();d(),c("veltDynamicTemplate",$(3,Dtn,e.template,M(1,w0e,e.componentConfigSignal),t.variant,e.setIfCondition.bind(e),e.elementRef))}}function Atn(i,o){if(i&1&&(f(0),g(1,Otn,2,9,"ng-container",0),v()),i&2){let t=l().ngIf;d(),c("ngIf",t.settingsOpen&&t.settingsEnabled)}}function Ptn(i,o){if(i&1&&(f(0),g(1,Atn,2,1,"ng-container",1),v()),i&2){let t=l();d(),c("veltIf",k(3,Ttn,t.conditionSignal(),M(1,w0e,t.componentConfigSignal)))}}var O0e=(()=>{let o=class o extends z{constructor(e,n,r){super(n,r,e),this.loggingService=e,this.elementRef=n,this.dynamicDataService=r,this.componentId="velt-notifications-panel-settings",super.initializeComponentConfigSignal(new lt)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in NotificationsPanelSettingsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(n){return new(n||o)(u(y),u(R),u(b))},o.\u0275cmp=O({type:o,selectors:[["app-notifications-panel-settings"]],standalone:!1,features:[U([b]),B],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[1,"velt-notification-panel--settings"],[3,"componentConfigSignal"],[1,"velt-notification-panel--settings-section"]],template:function(n,r){n&1&&g(0,Ptn,2,6,"ng-container",0),n&2&&c("ngIf",r.componentConfigSignal())},dependencies:[Z,ne,s_,o_,r_,a_,l_,ae],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-notification-panel--settings-section[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-lg) var(--velt-spacing-lg) 0px var(--velt-spacing-lg);align-items:flex-start;gap:calc(var(--velt-spacing-sm) + var(--velt-spacing-2xs));align-self:stretch;flex-direction:column}"],changeDetection:0});let i=o;return i})();var A0e=(()=>{let o=class o{constructor(e){this.injector=e,this.customElements=[{name:j.TAGS.SNIPPYLY_ROOT,component:zH},{name:j.TAGS.SNIPPYLY_PRESENCE,component:c_},{name:j.TAGS.SNIPPYLY_CURSOR,component:oz},{name:j.TAGS.SNIPPYLY_COMMENT_TOOL,component:sC},{name:j.TAGS.SNIPPYLY_COMMENTS,component:iz},{name:j.TAGS.SNIPPYLY_COMMENTS_SIDEBAR,component:c7},{name:j.TAGS.SNIPPYLY_COMMENT_BUBBLE,component:P0},{name:j.TAGS.SNIPPYLY_TAG_TOOL,component:hz},{name:j.TAGS.SNIPPYLY_TAGS,component:uz},{name:j.TAGS.SNIPPYLY_HUDDLE,component:sz},{name:j.TAGS.SNIPPYLY_HUDDLE_TOOL,component:az},{name:j.TAGS.SNIPPYLY_RECORDER_TOOL,component:lz},{name:j.TAGS.SNIPPYLY_RECORDER_NOTES,component:mz},{name:j.TAGS.SNIPPYLY_MENU,component:GH},{name:j.TAGS.SNIPPYLY_RECORDER_CONTROL_PANEL,component:dz},{name:j.TAGS.SNIPPYLY_RECORDER_PLAYER,component:pz},{name:j.TAGS.SNIPPYLY_REWRITER,component:gz},{name:j.TAGS.SNIPPYLY_SIDEBAR_BUTTON,component:Jp},{name:j.TAGS.SNIPPYLY_USER_INVITE_TOOL,component:uw},{name:j.TAGS.SNIPPYLY_USER_REQUEST_TOOL,component:_z},{name:j.TAGS.SNIPPYLY_ARROW_TOOL,component:bz},{name:j.TAGS.SNIPPYLY_ARROWS,component:Iz},{name:j.TAGS.SNIPPYLY_AREA_TOOL,component:xz},{name:j.TAGS.SNIPPYLY_AREAS,component:Ez}],this.veltCustomElements=[{name:j.TAGS.VELT_ROOT,component:zH},{name:j.TAGS.VELT_PRESENCE,component:c_},{name:j.TAGS.VELT_CURSOR,component:oz},{name:j.TAGS.VELT_COMMENT_TOOL,component:sC},{name:j.TAGS.VELT_COMMENTS,component:iz},{name:j.TAGS.VELT_COMMENTS_SIDEBAR,component:c7},{name:j.TAGS.VELT_COMMENT_BUBBLE,component:P0},{name:j.TAGS.VELT_COMMENT_THREAD,component:p3},{name:j.TAGS.VELT_COMMENT_PIN,component:h0e},{name:j.TAGS.VELT_COMMENT_TEXT,component:I0e},{name:j.TAGS.VELT_CHART_COMMENT,component:m0e},{name:j.TAGS.VELT_CANVAS_COMMENT,component:f0e},{name:j.TAGS.VELT_INLINE_COMMENTS_SECTION,component:bE},{name:j.TAGS.VELT_COMMENTS_MINIMAP,component:v0e},{name:j.TAGS.VELT_TAG_TOOL,component:hz},{name:j.TAGS.VELT_TAGS,component:uz},{name:j.TAGS.VELT_HUDDLE,component:sz},{name:j.TAGS.VELT_HUDDLE_TOOL,component:az},{name:j.TAGS.VELT_RECORDER_TOOL,component:lz},{name:j.TAGS.VELT_RECORDER_NOTES,component:mz},{name:j.TAGS.VELT_MENU,component:GH},{name:j.TAGS.VELT_RECORDER_CONTROL_PANEL,component:dz},{name:j.TAGS.VELT_RECORDER_PLAYER,component:pz},{name:j.TAGS.VELT_REWRITER,component:gz},{name:j.TAGS.VELT_SIDEBAR_BUTTON,component:Jp},{name:j.TAGS.VELT_COMMENTS_SIDEBAR_BUTTON,component:Jp},{name:j.TAGS.VELT_USER_INVITE_TOOL,component:uw},{name:j.TAGS.VELT_USER_REQUEST_TOOL,component:_z},{name:j.TAGS.VELT_ARROW_TOOL,component:bz},{name:j.TAGS.VELT_ARROWS,component:Iz},{name:j.TAGS.VELT_AREA_TOOL,component:xz},{name:j.TAGS.VELT_AREAS,component:Ez},{name:j.TAGS.VELT_INLINE_COMMENT,component:Zve},{name:j.TAGS.VELT_VIDEO_PLAYER,component:o0e},{name:j.TAGS.VELT_VIDEO_COMMENTS_TIMELINE,component:f7},{name:j.TAGS.VELT_REACTION_TOOL,component:g_},{name:j.TAGS.VELT_INLINE_REACTIONS_SECTION,component:ET},{name:j.TAGS.VELT_VIEW_ANALYTICS,component:a0e},{name:j.TAGS.VELT_NOTIFICATIONS_TOOL,component:sx},{name:j.TAGS.VELT_NOTIFICATIONS_PANEL,component:Rc},{name:j.TAGS.VELT_NOTIFICATIONS_HISTORY_PANEL,component:s0e},{name:j.TAGS.VELT_WIREFRAME,component:c0e},{name:j.TAGS.VELT_AUTOCOMPLETE,component:p0e},{name:j.TAGS.VELT_AUTOCOMPLETE_CHIP,component:g0e},{name:j.TAGS.VELT_COMMENT_COMPOSER,component:XT},{name:j.TAGS.VELT_SKELETON_LOADER,component:wo},{name:j.TAGS.VELT_SINGLE_EDITOR_MODE_PANEL,component:lh}]}ngDoBootstrap(){this.customElements.forEach(e=>{let n=qN(e.component,{injector:this.injector});customElements.get(e.name)||customElements.define(e.name,n)}),this.veltCustomElements.forEach(e=>{let n=qN(e.component,{injector:this.injector});customElements.get(e.name)||customElements.define(e.name,n)})}};o.\u0275fac=function(n){return new(n||o)(J(xt))},o.\u0275mod=en({type:o}),o.\u0275inj=Jt({providers:[MQ(()=>{let e=sessionStorage?.getItem("veltFirebaseLogLevel")||Qn?.firebaseLogLevel||"silent";return fF(e),kQ(Qn.firebaseConfig)}),Bte(()=>Ei()),NJ(()=>FJ()),Ane(()=>Qy()),Kte(()=>{let e=Xte();return Qn.useEmulators&&Zte(e,"localhost",5001),e}),{provide:cl,useClass:kve},CN(_N()),cZ()],imports:[B1,Joe,Us,FX,ul,W1,XX,Zie,Rie,XV,tU,Lie,iie,oie,S0e]});let i=o;return i})();ie(c_,[Z,Ct,ne,rn,ae,ow,rw],[]);ie(sC,[Z,Ct,ne,rn,ae],[]);ie(a7,[Z,la,np,mg],[]);ie(I9,[Z,Vn,Pn,Wo,r7,Kve,rs],[]);ie(Ca,[Z,ZV,Fo,ne,Ox,Ax,wx,Dx,ae],[]);ie(UD,[Z,ne,ae],[]);ie(P0,[Vr,Z,Ct,ne,i2,n2,rn,d_,ae],[de]);ie(Jp,[Z,Ct,Vn,Pn,c7,Fo,ne,cC,rn,uC],[de]);ie(WM,[Z,Fo,Xb,Bb],[]);ie(W0,[Z,ug,ne,ae],[de]);ie(lE,[Z,ne,sE,iE],[de]);ie(cw,[Z,Ct,ne,rn,ae,aw,dw],[]);ie(p3,[Z,Wo,ae],[]);ie(sx,[Z,Ct,Vn,Pn,Rc,l0e,ne,rn,ax,ix,ox,ae],[de]);ie(Rc,[Z,Ct,ai,ne,rn,TE,O0e,wE,kE],[de]);ie(GM,[Z,Li,Ki,Fo],[de]);ie(V0,[Z,W0,L2,N2,j0,R2,ne,c2,l2,m2,fC,HC,c3,ae],[de]);ie(N0,[Z,ne,aI,sI,ae],[de]);ie(L2,[Z,Bve,ne,ae],[de]);ie(N2,[Z,Uve,ne,ae],[]);ie(j0,[Z,g7,ne,ae],[de]);ie(R2,[Z,yz,o2,ne,ae],[]);ie(rI,[Z,j0,U2,eI,oI,j2,ch,ne,J2,tI,Q2,iI,nI,z0,Px,HC,UT,g3,ae],[de]);ie(U2,[Z,Wn,ne,ae],[de]);ie(eI,[Z,ne,ae,wo],[de,E0e]);ie(oI,[Z,ne,ae],[iN,pg]);ie(j2,[Z,Ct,jve,jm,ne,ae],[de]);ie(U0,[Z,ne,ae],[de]);ie(R0,[Z,ne,a2,s2,r2,VT,ae],[de]);ie(B0,[Z,ne,ae],[de]);ie(F2,[Z,ne,ae],[de]);ie(ch,[Z,F2,ne,A2,M2,p2,g2,P2,xE,fC,ae],[de]);ie(M0,[Z,ne,ae],[de]);ie($0,[Z,ne,ae],[de]);ie(k0,[Z,ne,ae],[de]);ie(G0,[Z,ne,ae],[de]);ie(H0,[Z,B2,V2,ne,ae],[de]);ie(B2,[Z,ne,ae],[de]);ie(V2,[Z,ne,ae],[de]);ie(o2,[Z,ai,ne,dg,ae],[de]);ie(aI,[ht,Z,rI,ne,k2,ae],[T0e,de]);ie(J2,[Z,ne,ae,wo],[gg,x0e,de,d0e]);ie(a2,[Z,Wn,ne,ae],[de]);ie(s2,[Z,ne,ae,wo],[de]);ie(r2,[Z,g7,ne,ae],[]);ie(A2,[Z,ne,b2,O2,ae],[de]);ie(M2,[ht,Z,Ld,d7,ne,ae],[de]);ie(p2,[Z,Li,Ki,u7,$ve,p_,ne,u0e,ae],[de]);ie(g2,[Z,Vve,ne,ae],[de]);ie(P2,[Z,Ib,ne,ag,dg,ae],[de]);ie(sI,[Z,ne,I3,b3,E3,ae],[de]);ie(k2,[Z,ne,ae],[de]);ie(tI,[Z,Ct,ai,yz,W0,g7,ne,dg,C7,ae],[de]);ie(c2,[Z,ne,ae],[de]);ie(l2,[Z,ne,ae],[de]);ie(m2,[Z,ne,ae],[de]);ie(jI,[Z,ne,wI,$I,HI,AI,ae],[de]);ie(UI,[Vr,Z,ai,ne,MI,RI,$3,BI,oC,FI,H3,z3,PI,LI,kI,VI,NI,ae,x3,i_],[de]);ie(OI,[Z,Ct,ne,l3,ae],[de]);ie(aC,[Z,Wo,ne,ae],[de]);ie(wI,[Z,ne,ae],[de]);ie($I,[Z,pa,Ka,Oa,ne,ae],[de]);ie(HI,[Z,lE,ne,ae],[de]);ie(AI,[Z,ne,ae],[de]);ie(Os,[Z,ne,L3,F3,N3,B3,ae],[]);ie(L3,[Z,pa,Ka,Oa,ne,ae],[de]);ie(F3,[Z,ne,ae],[]);ie(N3,[Z,ne,ae],[]);ie(B3,[ht,Z,ne,V3,ae],[]);ie(V3,[Z,ne,U3,j3,ae],[]);ie(U3,[Z,ne,ae],[]);ie(j3,[Z,ne,ae],[]);ie(MI,[Z,ne,ae],[de]);ie(RI,[Z,ne,ae],[de]);ie($3,[Z,ne,ae],[de]);ie(BI,[Z,ne,ae],[de]);ie(oC,[ht,Z,Ct,ai,ne,Os,Ba,Va,hC,ae],[rm,D0e,de]);ie(FI,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(H3,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(z3,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(PI,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[rm,de]);ie(LI,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(kI,[ht,Z,ne,Ba,Va,ae],[de]);ie(VI,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[]);ie(NI,[ht,Z,ne,Ba,Va,ae],[rm,de]);ie(cC,[Z,ne,ae],[]);ie(tC,[Z,ne,ae],[de]);ie(J0,[Z,ne,ae],[de]);ie(eC,[Z,ne,ae],[]);ie(i2,[Z,ne,ae],[]);ie(n2,[Z,Wn,ne,ae],[]);ie(iC,[Z,ne,ae],[]);ie(Q2,[ht,Z,Ct,ne,G2,X2,ae],[de]);ie(iI,[ht,Z,Ld,ne,ae],[de]);ie(nI,[ht,Z,hh,ne,z0,ae],[de]);ie(z0,[Z,g_,ne,ae],[]);ie(nC,[Z,ne,ae],[]);ie(g0,[Z,Ct,ne,rn,ae],[de]);ie(u0,[Z,Ct,ne,Qb,t2,Jb,e2,rn,ae],[de]);ie(Qb,[Z,ne,ae],[de]);ie(t2,[Z,ne,ae],[]);ie(Jb,[Z,ne,ae],[de]);ie(e2,[Z,ne,ae],[de]);ie(KC,[ht,Z,ne,ae],[de]);ie(f0,[Z,ne,Ob,Ab,Db,wb],[]);ie(Ob,[Z,Ct,Wn,ne],[hg]);ie(Ab,[Z,Ct,ne,wo],[de]);ie(Db,[Z,Ct,ne],[de]);ie(wb,[Z,Ct,ne],[de]);ie(ZC,[Z,ne,ae],[]);ie(dh,[Z,ne,ae],[de]);ie(mh,[Z,ne,jI,UI,D9,OI,aC,ae],[de]);ie(Q0,[Vr,Z,ne,TI,DI,xI,ae],[]);ie(TI,[Z,ne,ae],[hg]);ie(DI,[Z,ne,ae],[de]);ie(xI,[Z,ne,ae],[]);ie(X0,[Z,ne,II,EI,ae],[de]);ie(II,[Z,ne,ae],[hg]);ie(EI,[Z,ne,ae],[de]);ie(Z0,[Z,ne,yI,bI,SI,ae],[]);ie(K0,[ht,Z,Ct,ne,rn,_I,ae],[]);ie(yI,[Z,ne,ae],[]);ie(bI,[Z,ne,ae],[de]);ie(SI,[Z,ne,ae],[]);ie(_I,[Z,ne,fI,vI,CI,ae],[de]);ie(fI,[Z,ne,ae],[de]);ie(vI,[Z,ne,ae],[de]);ie(CI,[Z,ne,ae],[de]);ie(Y0,[Z,ne,ae],[de]);ie(q0,[Z,Ct,ne,rn,hI,lI,pI,dI,Ix,ae],[]);ie(hI,[Z,ne,gI,uI,ae],[]);ie(lI,[Z,ne,ae],[de]);ie(pI,[Z,ne,ae],[de]);ie(dI,[Z,ne,mI,cI,ae],[de]);ie(mI,[Z,ne,ae],[de]);ie(cI,[Z,ne,ae],[de]);ie(gI,[Z,ne,ae],[de]);ie(uI,[Z,ne,ae],[de]);ie(dC,[Z,ne,ae],[h7,de]);ie(mC,[Z,ne,ae],[de]);ie(pC,[Z,Ct,ne,rn,qI],[de]);ie(qI,[ht,Z,ne,WI,ae],[de]);ie(WI,[Z,ne,zI,GI,ae],[de]);ie(zI,[Z,Wn,ne,ae],[de]);ie(GI,[Z,ne,ae,wo],[de]);ie(gC,[ht,Z,ne,KI,ae],[rm,de]);ie(KI,[Z,ne,YI,ae],[de]);ie(YI,[Z,ne,ae],[]);ie(h0,[Z,Ct,ne,rn,xb,Tb,Eb,ae],[]);ie(xb,[Z,Ct,Wn,ne,ae],[hg]);ie(Tb,[Z,Ct,ne,ae],[de]);ie(Eb,[Z,Ct,ne,ae],[de]);ie(G2,[Z,ne,z2,H2,$2,ae,wo],[de]);ie(X2,[Z,ne,Y2,K2,Z2,q2,W2,ae,wo],[de]);ie(z2,[Z,ne,ae],[de]);ie(H2,[Z,ne,ae],[de]);ie($2,[Z,gce,ne,ae],[de]);ie(Y2,[Z,ne,Dz,ae],[]);ie(K2,[Z,ne,ae],[de]);ie(Z2,[Z,ne,ae],[de,Tz]);ie(q2,[Z,ne,ae],[de]);ie(W2,[Z,ne,ae],[de]);ie(b2,[ht,Z,ne,S2,ae],[de]);ie(v2,[Z,ne,f2,h2,u2,ae],[de]);ie(w2,[Z,ne,E2,T2,D2,x2,I2,ae],[de]);ie(f2,[Z,ne,ae],[]);ie(h2,[Z,ne,ae],[de]);ie(u2,[Z,ne,ae],[]);ie(E2,[Z,ne,Dz,ae],[]);ie(T2,[Z,ne,ae],[de]);ie(D2,[Z,ne,ae],[Tz]);ie(x2,[Z,ne,ae],[]);ie(I2,[Z,ne,ae],[de]);ie(O2,[ht,Z,ne,v2,w2,ae],[de]);ie(S2,[Z,ne,C2,_2,y2,ae],[de]);ie(C2,[Z,ne,ae],[]);ie(_2,[Z,ne,ae],[de]);ie(y2,[Z,ne,ae],[de]);ie(sE,[Z,ne,aE,oE,rE,ae],[]);ie(aE,[Z,ne,ae],[de]);ie(oE,[Z,ne,ae],[]);ie(rE,[Z,ne,ae],[]);ie(iE,[ht,Z,ai,ne,nE,ae],[de]);ie(nE,[Z,ne,eE,tE,JI,QI,ae],[]);ie(eE,[Z,ne,ae],[hg,de]);ie(tE,[Z,ne,ae],[de]);ie(JI,[Z,ne,ae],[]);ie(QI,[Z,ne,ZI,XI,ae],[]);ie(ZI,[Z,ne,ae],[]);ie(XI,[Z,ne,ae],[]);ie(uC,[Z,ne,ae],[]);ie(Ba,[Z,ne,mE,pE,gE,ae],[de]);ie(mE,[Z,ne,cE,dE,ae],[]);ie(pE,[Z,ne,ae],[de]);ie(gE,[Z,ne,ae],[de]);ie(cE,[Z,ne,ae],[de]);ie(dE,[Z,ne,ae],[de]);ie(Va,[Z,ne,ae],[de]);ie(hC,[Z,ne,ae],[de]);ie(rC,[Z,ne,uE,CE,ae],[]);ie(uE,[Z,Wo,ne,ae],[de]);ie(CE,[Z,ne,hE,fE,vE,ae],[]);ie(hE,[Z,ne,ae],[]);ie(fE,[Z,ne,ae],[de]);ie(vE,[Z,ne,ae],[de]);ie(bE,[Z,Ct,ne,rn,EE,IE],[de]);ie(SE,[Z,Wo,ai,ne,ae],[de]);ie(_E,[Z,ne,ae],[]);ie(yE,[ht,Z,Wo,ne,ae],[]);ie(EE,[Z,ne,ae],[de]);ie(IE,[Z,ne,SE,_E,yE,ae,R3],[de]);ie(xE,[Z,Wn,ne,ae],[de]);ie(TE,[Z,ne,DE,$D,lx,ae],[de]);ie(DE,[Z,ne,ae],[de]);ie($D,[Z,ne,ae],[de]);ie(HD,[Z,ne,ae],[]);ie(YD,[Z,ne,ae],[]);ie(KD,[Z,ne,ae],[]);ie(zD,[Z,ne,qD,WD,ae],[]);ie(qD,[Z,ne,KD,ew,tw,ae],[]);ie(WD,[ht,Z,ne,GD,ae],[]);ie(GD,[Z,ne,QD,JD,ae],[]);ie(s_,[Z,ne,ae],[]);ie(o_,[Z,ne,ae],[]);ie(r_,[Z,ne,YD,XD,ZD,ae],[]);ie(a_,[Z,ne,HD,nw,ae],[]);ie(XD,[Z,ne,ae],[]);ie(ZD,[Z,ne,ae],[]);ie(l_,[ht,Z,ne,zD,ae],[]);ie(QD,[Z,ne,ae],[]);ie(JD,[Z,ne,ae],[]);ie(wE,[Z,ne,ME,OE,PE,AE,ae],[de]);ie(kE,[Z,ne,RE,NE,tx,FE,ae],[]);ie(ng,[Z,ne,KE,ae],[de]);ie(KE,[Z,ne,ae],[de]);ie(RE,[Z,ne,ng,tg,ig,rg,ae],[de]);ie(NE,[Z,ne,ng,cx,rg,ae],[de]);ie(tx,[Z,ne,ng,ex,rg,ae],[de]);ie(FE,[Z,ne,ng,BE,rg,ae],[de]);ie(tg,[ht,Z,ne,YE,ae],[]);ie(YE,[Z,ne,$E,qE,GE,HE,zE,WE,ae],[de]);ie(ig,[Z,ne,ae],[de]);ie(BE,[ht,Z,ne,LE,ae],[]);ie(LE,[Z,ne,jE,UE,VE,gx,ae],[]);ie(jE,[Z,Ct,ne,ae],[de]);ie(UE,[Z,ne,ae],[de]);ie(VE,[Z,ne,tg,ig,ae],[de]);ie(ex,[ht,Z,ne,JE,ae],[rm]);ie(JE,[Z,ne,QE,XE,ZE,nx,ae],[]);ie(QE,[Z,ne,ae],[de]);ie(XE,[Z,ne,ae],[de]);ie(ZE,[Z,ne,tg,ig,ae],[de]);ie(nx,[Z,Wn,ne,ae],[de]);ie($E,[Z,Wn,ne,ae],[]);ie(qE,[Z,ne,ae],[de]);ie(GE,[Z,ne,ae],[gg,de]);ie(HE,[Z,ne,ae,wo],[gg,de]);ie(zE,[Z,ne,ae],[de]);ie(WE,[Z,ne,ae],[pg,de]);ie(ME,[Z,ne,ae],[de]);ie(OE,[Z,ne,ae],[de]);ie(PE,[Z,ne,ae],[de]);ie(AE,[Z,ne,ae],[de]);ie(ax,[Z,ne,ae],[de]);ie(ix,[Z,ne,ae],[de]);ie(ox,[Z,ne,rx,ae],[de]);ie(rx,[Z,ne,ae],[]);ie(lx,[Z,ne,ae],[de]);ie(cx,[ht,Z,ne,mx,ae],[de]);ie(mx,[Z,ne,dx,px,ae],[de]);ie(dx,[Z,ne,ae],[de]);ie(px,[Z,ne,tg,ig,ae],[]);ie(gx,[Z,ne,ae],[de]);ie(ew,[Z,ne,ae],[]);ie(tw,[Z,ne,ae],[]);ie(nw,[Z,ne,ae],[]);ie(fC,[Z,Ll,ne,bx,vx,ae],[]);ie(bx,[Z,ne,yx,Sx,Cx,Tx,ae],[]);ie(vx,[ht,Z,Ct,ne,rn,fx,ae],[de]);ie(yx,[ht,Z,ne,_x,ae],[de]);ie(Sx,[Z,ne,ae],[de]);ie(Cx,[Z,ne,ae],[de]);ie(_x,[Z,ne,ae],[de]);ie(fx,[Z,ne,hx,ux,ae],[]);ie(hx,[Z,ne,ae],[de]);ie(ux,[Z,ne,ae],[]);ie(Ix,[Z,ne,Ex,xx,ae],[]);ie(Ex,[Z,ne,ae],[de]);ie(xx,[Z,ne,ae],[de]);ie(O9,[Z,ug,ne,ae],[de]);ie(Tx,[Z,ne,ae],[de]);ie(Ox,[Z,YV,ne,ae],[de]);ie(Ax,[Z,KV,ne,ae],[de]);ie(wx,[Z,ne,ae],[de]);ie(Dx,[Z,qV,ne,ae],[de]);ie(Px,[Z,ne,ae],[de]);ie(CC,[Z,Ct,ne,rn,ae],[de]);ie(yC,[Z,Ct,ne,rn,ae],[de]);ie(_C,[Z,Ct,ne,rn,ae],[de]);ie(vC,[Z,Ct,El,Dp,ne,rn,kx,ae],[de]);ie(Mx,[Z,Ws,ne,ae],[de]);ie(Nx,[Z,Ws,ne,ae],[de]);ie(Rx,[Z,Ws,ne,ae],[de]);ie(kx,[Z,Ct,ne,rn,Mx,Nx,Rx,ae],[de]);ie(T0,[Z,ne,ae],[de]);ie(b0,[Z,ne,ae],[de]);ie(Xb,[Z,Ct,ne,rn,T0,b0,Zb,qb,D0,x0,I0,zb,E0,S0,w0,O0,ae],[]);ie(Zb,[Z,ne,ae],[]);ie(qb,[Z,ne,ae],[de]);ie(D0,[Z,ne,Yb,Kb,ae],[]);ie(Yb,[Z,ne,ae],[de]);ie(Kb,[Z,ne,ae],[]);ie(x0,[Z,ne,ae],[de]);ie(I0,[Z,p_,ne,Gb,Wb,ae],[de]);ie(zb,[Z,p_,ne,Hb,$b,ae],[de]);ie(E0,[Z,ne,ae],[de]);ie(Bb,[Z,Ct,ne,rn,T0,b0,D0,x0,I0,E0,S0,w0,O0,ae],[de]);ie(Hb,[Z,ne,ae],[]);ie($b,[Z,ne,ae],[]);ie(Gb,[Z,ne,ae],[]);ie(Wb,[Z,ne,ae],[]);ie(Lb,[Z,Ct,ne,rn,Pb,Fb,ae],[de]);ie(Pb,[Z,ai,ne,_0,y0,C0,v0,ae],[de]);ie(Fb,[Z,ai,ne,_0,y0,C0,v0,ae],[de]);ie(_0,[Z,ne,ae],[de]);ie(y0,[Z,ne,Nb,Rb,ae],[]);ie(Nb,[Z,ne,ae],[]);ie(Rb,[Z,ne,ae],[]);ie(C0,[ht,Z,ne,Mb,kb,ae],[]);ie(Mb,[Z,ne,ae],[]);ie(kb,[Z,ne,ae],[de]);ie(v0,[Z,ne,ae],[]);ie(t_,[Z,ne,_D,J9,ae],[]);ie(_D,[Z,ne,X9,Q9,JC,CD,ae],[]);ie(Z9,[Z,ne,ae],[]);ie(JC,[Z,ne,ae],[]);ie(CD,[Z,ne,JC,iD,dD,cD,sD,uD,vD,oD,ae],[]);ie(iD,[Z,ne,ae],[]);ie(dD,[Z,ne,gD,pD,ae],[]);ie(cD,[Z,ne,lD,mD,ae],[]);ie(sD,[Z,ne,aD,rD,ae],[]);ie(uD,[Z,ne,hD,fD,ae],[]);ie(K9,[Z,ne,ae],[]);ie(vD,[Z,pa,Ka,Oa,y0e,Oz,ne,ae],[]);ie(oD,[ht,Z,ne,ae],[de]);ie(aD,[Z,ne,ae],[de]);ie(rD,[Z,ne,ae],[]);ie(lD,[Z,ne,ae],[]);ie(mD,[Z,ne,ae],[]);ie(gD,[Z,ne,ae],[]);ie(pD,[Z,ne,ae],[]);ie(hD,[Z,ne,ae],[]);ie(fD,[Z,ne,ae],[de]);ie(S0,[Z,ne,Vb,Ub,jb,ae],[de]);ie(Vb,[Z,ne,ae],[de]);ie(Ub,[Z,ne,ae],[]);ie(jb,[Z,Li,Ki,ne,ae],[]);ie(EC,[Z,ne,ae],[de]);ie(SC,[Z,ne,Gx,jx,zx,Ux,Vx,Wx,ae],[de]);ie(Gx,[Z,Li,Ki,ne,ae],[de]);ie(jx,[Z,ne,ae],[de]);ie(zx,[Z,ne,Hx,$x,ae],[de]);ie(Hx,[Z,ne,ae],[de]);ie($x,[Z,ne,ae],[de]);ie(Ux,[Z,ne,ae],[de]);ie(Vx,[Z,ne,ae],[de]);ie(xC,[Z,Ct,Vn,Pn,ne,rn,EC,SC,ph,n_,ae],[de]);ie(IC,[Z,Ct,ne,rn,EC,SC,qx,n_,ae],[de]);ie(ph,[Z,ne,ae],[de]);ie(Yx,[Z,ne,ae],[de]);ie(Bx,[Z,ne,Lx,Fx,ae],[de]);ie(Lx,[Z,ne,ae],[]);ie(Fx,[Z,ne,ae],[]);ie(oT,[ht,Z,ne,ag,ae],[sg,de]);ie(iT,[Z,ne,AC,nT,ae],[de]);ie(eT,[Z,ne,ae],[de]);ie(tT,[Z,ne,AC,kC,ae],[de]);ie(NC,[Z,Ct,UD,ne,rn,oT,iT,eT,tT,OC,MC,RC,DC,wC,PC,YC,ae],[de]);ie(AC,[Z,ne,ae],[de]);ie(kC,[Z,ne,ae],[]);ie(nT,[Z,pa,xV,Ka,Oa,ne,ae],[de]);ie(OC,[Z,ne,ae],[de]);ie(MC,[Z,uh,ne,ae],[de]);ie(RC,[Z,e_,ne,ae],[de]);ie(DC,[Z,ne,ae],[de]);ie(wC,[Z,ne,ae],[de]);ie(w0,[Z,ne,Lb,ae],[de]);ie(O0,[Z,ne,u_,ae],[]);ie(qx,[Z,ne,ph,Yx,Bx,bC,ae],[de]);ie(n_,[Z,ne,ph,bC,ae],[de]);ie(Wx,[Z,ne,u_,ae],[de]);ie(bC,[Z,ne,u_,ae],[de]);ie(TC,[Z,Ct,Pn,ne,rn,kC,OC,MC,RC,DC,wC,Jx,Xx,Qx,PC,YC,ae],[de]);ie(Jx,[ht,Z,ne,ag,ae],[sg,de]);ie(Xx,[Z,ne,Zx,Kx,ae],[de]);ie(Qx,[Z,ne,u_,ae],[de]);ie(Zx,[Z,ne,ae],[]);ie(Kx,[Z,ne,ae],[de]);ie(PC,[Z,ne,ae],[de]);ie(FC,[Z,Ct,ne,rn,lT],[]);ie(LC,[Z,Pn,ne,cT,rT,sT],[]);ie(cT,[Z,ne],[de]);ie(rT,[Z,ne],[]);ie(aT,[Z,ne],[]);ie(sT,[Z,Vn,la,Fo,ne,aT,lT],[de]);ie(jC,[Z,la,ne,pT,dT,gh,k9],[de]);ie(pT,[Z,ne,gT,uT],[]);ie(gT,[Z,ne],[]);ie(uT,[Z,ne],[de]);ie(dT,[Z,ne],[]);ie(gh,[Z,ne,R9,CT],[]);ie(CT,[Z,ne,vT,fT],[]);ie(UC,[Z,ne,M9,P9],[]);ie(VC,[Z,Ct,ne,rn,jC],[]);ie(BC,[Z,Ct,Pn,ne,rn,_T,mT,hT],[]);ie(_T,[Z,ne],[de]);ie(mT,[Z,ne],[]);ie(hT,[Z,Vn,Fo,ne,jC],[]);ie(vT,[Z,ne],[de]);ie(fT,[Z,ne],[de]);ie($C,[Z,Ct,ne,rn,IT,yT],[de]);ie(IT,[Z,ne,ST,bT],[]);ie(ST,[Z,ne],[de]);ie(bT,[Z,ne],[de]);ie(yT,[Z,ne],[de]);ie(YC,[Z,Wn,ne,ae],[de]);ie(N9,[Z,ne,ae],[de]);ie(ET,[Z,Ct,ne,rn,DT,ae],[]);ie(DT,[Z,ne,TT,xT,ae],[]);ie(TT,[ht,Z,hh,ne,ae],[]);ie(xT,[Z,g_,ne,ae],[]);ie(F9,[Z,ne,kT,MT,ae],[de]);ie(kT,[Z,ne,ae],[de]);ie(MT,[Z,ai,ne,RT,NT,wT,PT,OT,AT,ae],[de]);ie(RT,[Z,ne,Vm,ae],[de]);ie(NT,[Z,ne,Vm,ae],[de]);ie(wT,[Z,ne,Vm,ae],[de]);ie(PT,[Z,ne,Vm,ae],[de]);ie(OT,[Z,ne,Vm,ae],[de]);ie(AT,[Z,ne,Vm,ae],[de]);ie(Vm,[Z,ne,ae],[de]);ie(L9,[Z,ne,LT,FT,ae],[de]);ie(LT,[Z,ne,BT,ae],[de]);ie(FT,[Z,ai,ne,oC,ae],[de]);ie(BT,[Z,ne,ae],[de]);ie(HC,[Z,ne,C7,ae],[de]);ie(VT,[Z,ne,C7,ae],[]);ie(rs,[Z,Ct,ne,rn,zC,GC,WC,jT,ZT,n3],[de]);ie(zC,[Z,ne,ae],[]);ie(GC,[Z,Wo,ne,ae],[de]);ie(WC,[ht,Z,Wo,ne,ae],[de]);ie(V9,[Z,ne,zC,GC,WC,ae],[de]);ie(B9,[Z,ne,ae],[de]);ie(j9,[Z,ne],[]);ie(UT,[Z,ne,ae],[de]);ie(jT,[Z,ne,HT,$T,ae],[]);ie(HT,[Z,ai,ne,zT,WT,qT,GT,YT,KT,ae],[de]);ie($T,[Z,ne,ae],[de]);ie(zT,[Z,ne,Um,ae],[de]);ie(WT,[Z,ne,Um,ae],[de]);ie(qT,[Z,ne,Um,ae],[de]);ie(GT,[Z,ne,Um,ae],[de]);ie(Um,[Z,ne,ae],[]);ie(YT,[Z,ne,Um,ae],[de]);ie(KT,[Z,ne,Um,ae],[de]);ie(ZT,[Z,ne,s3,ae],[de]);ie(XT,[Z,Wo,ae],[]);ie($9,[Z,ne,JT,QT,ae],[de]);ie(JT,[Z,ai,ne,e3,t3,ae],[de]);ie(QT,[Z,ne,ae],[de]);ie(e3,[Z,ne,ae],[de]);ie(t3,[Z,ne,ae],[de]);ie(n3,[Z,ne,ae],[de]);ie(H9,[Z,ne,o3,i3,ae],[]);ie(o3,[Z,ai,ne,r3,a3,ae],[de]);ie(i3,[Z,ne,ae],[de]);ie(r3,[Z,ne,ae],[de]);ie(a3,[Z,ne,ae],[de]);ie(s3,[Z,ne,ae],[de]);ie(rg,[Z,ne,ae],[]);ie(l3,[Z,ne,ae],[de]);ie(z9,[Z,ne,ae],[de]);ie(c3,[Z,ne,ae],[de]);ie(qC,[Z,ne,d3,m3,ae],[]);ie(d3,[Z,ne,ae],[de]);ie(m3,[Z,Wo,ne,ae],[de]);ie(g3,[Z,Ll,ne,y3,_3,ae],[de]);ie(y3,[Z,ne,ae],[de]);ie(_3,[Z,Ct,ne,rn,C3,S3,ae],[de]);ie(v3,[Z,ne,ae],[de]);ie(f3,[Z,ne,ae],[pg,de]);ie(h3,[Z,Wn,ne,ae],[de]);ie(C3,[Z,ne,ae],[de]);ie(u3,[Z,ne,v3,f3,h3,ae],[de]);ie(S3,[ht,Z,ne,u3,ae],[de]);ie(W9,[Z,ne,ae],[de]);ie(I3,[Z,ne,ae],[]);ie(b3,[Z,ne,ae],[]);ie(E3,[Z,ne,ae],[de]);ie(x3,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(i7,[ht,Z,Ct,ai,ne,Os,Ba,Va,ae],[de]);ie(R3,[Z,ne,ae,k3,A3],[]);ie(k3,[Z,ne,ae,M3,P3],[de]);ie(A3,[ht,Z,ai,ne,ae,O3],[de]);ie(M3,[Z,ne,ae],[de]);ie(P3,[Z,ne,ae],[]);ie(O3,[Z,ne,ae,w3,T3,D3],[]);ie(w3,[Z,ne,ae],[]);ie(T3,[Z,ne,ae],[]);ie(D3,[Z,ne,ae],[de]);ie(QC,[Z,ne,ae,G3,W3,q3,Z3,X3,Q3,J3,eD,tD,jD],[]);ie(q9,[Z,ne,ae],[]);ie(G3,[Z,ne,ae],[]);ie(W3,[Z,ne,ae],[]);ie(q3,[Z,ne,ae],[]);ie(Y3,[Z,ne,ae],[]);ie(K3,[ht,Z,pd,la,ne,ae],[sg]);ie(Z3,[Z,ne,ae,Y3,K3],[]);ie(X3,[Z,ne,ae,XC],[]);ie(Q3,[Z,ne,ae,XC,nD],[]);ie(J3,[Z,ne,ae,MD,ND],[]);ie(eD,[Z,ne,ae],[]);ie(tD,[Z,ne,ae],[]);ie(XC,[Z,ne,ae],[]);ie(nD,[Z,ne,ae],[]);ie(Y9,[Z,ne,ae],[de]);ie(lh,[Z,Ct,ne,rn,ae,yD,SD,bD,ID,ED,xD],[]);ie(e7,[Z,ne,ae],[de]);ie(t7,[Z,ne,ae],[de]);ie(yD,[Z,ne,ae],[]);ie(SD,[Z,ne,ae],[de]);ie(bD,[Z,ne,ae],[de]);ie(ID,[Z,ne,ae],[de]);ie(ED,[Z,ne,ae],[de]);ie(xD,[Z,ne,ae],[de]);ie(PD,[Z,Vn,Pn,Fo,ai,ne,ae,AD,OD],[]);ie(AD,[Z,ne,ae],[]);ie(OD,[Z,ne,ae,wD,TD],[]);ie(wD,[ht,Z,ne,ae,DD],[]);ie(DD,[Z,ne,ae],[]);ie(TD,[Z,ne,ae],[]);ie(MD,[ht,Z,ne,ae],[]);ie(kD,[ht,Z,ne,ae,PD],[]);ie(RD,[ht,Z,ne,u_,ae],[]);ie(ND,[Z,ne,ae,kD,RD,FD],[]);ie(FD,[Z,ne,ae],[]);ie(jD,[Z,ne,ae],[]);ie(n7,[Z,Vn,Pn,Fo,ai,ne,ae,BD,LD],[de]);ie(BD,[Z,ne,ae,VD],[de]);ie(VD,[Z,ne,ae],[de]);ie(LD,[Z,ai,ne,ae,i_],[de]);ie(i_,[ht,Z,Ct,ai,ne,Os,Ba,Va,hC,ae],[rm,de]);ie(ow,[ht,Z,ne,ae,iw],[]);ie(rw,[Z,Wn,ne,ae],[]);ie(iw,[Z,Wn,cw,ne,ae],[]);ie(aw,[Z,Wn,ne,ae],[]);ie(dw,[Z,ne,ae,mw,sw,lw],[]);ie(mw,[Z,ne,ae,wo],[de]);ie(sw,[Z,ne,ae],[de]);ie(lw,[Z,ne,ae],[de]);var M0e=!0,k0e=!0;function vw(i,o,t){let e=i.match(o);return e&&e.length>=t&&parseInt(e[t],10)}function $m(i,o,t){if(!i.RTCPeerConnection)return;let e=i.RTCPeerConnection.prototype,n=e.addEventListener;e.addEventListener=function(a,s){if(a!==o)return n.apply(this,arguments);let m=p=>{let h=t(p);h&&(s.handleEvent?s.handleEvent(h):s(h))};return this._eventMap=this._eventMap||{},this._eventMap[o]||(this._eventMap[o]=new Map),this._eventMap[o].set(s,m),n.apply(this,[a,m])};let r=e.removeEventListener;e.removeEventListener=function(a,s){if(a!==o||!this._eventMap||!this._eventMap[o])return r.apply(this,arguments);if(!this._eventMap[o].has(s))return r.apply(this,arguments);let m=this._eventMap[o].get(s);return this._eventMap[o].delete(s),this._eventMap[o].size===0&&delete this._eventMap[o],Object.keys(this._eventMap).length===0&&delete this._eventMap,r.apply(this,[a,m])},Object.defineProperty(e,"on"+o,{get(){return this["_on"+o]},set(a){this["_on"+o]&&(this.removeEventListener(o,this["_on"+o]),delete this["_on"+o]),a&&this.addEventListener(o,this["_on"+o]=a)},enumerable:!0,configurable:!0})}function R0e(i){return typeof i!="boolean"?new Error("Argument type: "+typeof i+". Please use a boolean."):(M0e=i,i?"adapter.js logging disabled":"adapter.js logging enabled")}function N0e(i){return typeof i!="boolean"?new Error("Argument type: "+typeof i+". Please use a boolean."):(k0e=!i,"adapter.js deprecation warnings "+(i?"disabled":"enabled"))}function _7(){if(typeof window=="object"){if(M0e)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function f_(i,o){k0e&&console.warn(i+" is deprecated, please use "+o+" instead.")}function F0e(i){let o={browser:null,version:null};if(typeof i>"u"||!i.navigator||!i.navigator.userAgent)return o.browser="Not a browser.",o;let{navigator:t}=i;if(t.mozGetUserMedia)o.browser="firefox",o.version=vw(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia||i.isSecureContext===!1&&i.webkitRTCPeerConnection)o.browser="chrome",o.version=vw(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(i.RTCPeerConnection&&t.userAgent.match(/AppleWebKit\/(\d+)\./))o.browser="safari",o.version=vw(t.userAgent,/AppleWebKit\/(\d+)\./,1),o.supportsUnifiedPlan=i.RTCRtpTransceiver&&"currentDirection"in i.RTCRtpTransceiver.prototype;else return o.browser="Not a supported browser.",o;return o}function P0e(i){return Object.prototype.toString.call(i)==="[object Object]"}function Pz(i){return P0e(i)?Object.keys(i).reduce(function(o,t){let e=P0e(i[t]),n=e?Pz(i[t]):i[t],r=e&&!Object.keys(n).length;return n===void 0||r?o:Object.assign(o,{[t]:n})},{}):i}function Az(i,o,t){!o||t.has(o.id)||(t.set(o.id,o),Object.keys(o).forEach(e=>{e.endsWith("Id")?Az(i,i.get(o[e]),t):e.endsWith("Ids")&&o[e].forEach(n=>{Az(i,i.get(n),t)})}))}function Mz(i,o,t){let e=t?"outbound-rtp":"inbound-rtp",n=new Map;if(o===null)return n;let r=[];return i.forEach(a=>{a.type==="track"&&a.trackIdentifier===o.id&&r.push(a)}),r.forEach(a=>{i.forEach(s=>{s.type===e&&s.trackId===a.id&&Az(i,s,n)})}),n}var b7={};jw(b7,{fixNegotiationNeeded:()=>Vz,shimAddTrackRemoveTrack:()=>Bz,shimAddTrackRemoveTrackWithNative:()=>V0e,shimGetDisplayMedia:()=>B0e,shimGetSendersWithDtmf:()=>Nz,shimGetStats:()=>Fz,shimGetUserMedia:()=>y7,shimMediaStream:()=>kz,shimOnTrack:()=>Rz,shimPeerConnection:()=>S7,shimSenderReceiverGetStats:()=>Lz});var L0e=_7;function y7(i,o){let t=i&&i.navigator;if(!t.mediaDevices)return;let e=function(s){if(typeof s!="object"||s.mandatory||s.optional)return s;let m={};return Object.keys(s).forEach(p=>{if(p==="require"||p==="advanced"||p==="mediaSource")return;let h=typeof s[p]=="object"?s[p]:{ideal:s[p]};h.exact!==void 0&&typeof h.exact=="number"&&(h.min=h.max=h.exact);let C=function(E,D){return E?E+D.charAt(0).toUpperCase()+D.slice(1):D==="deviceId"?"sourceId":D};if(h.ideal!==void 0){m.optional=m.optional||[];let E={};typeof h.ideal=="number"?(E[C("min",p)]=h.ideal,m.optional.push(E),E={},E[C("max",p)]=h.ideal,m.optional.push(E)):(E[C("",p)]=h.ideal,m.optional.push(E))}h.exact!==void 0&&typeof h.exact!="number"?(m.mandatory=m.mandatory||{},m.mandatory[C("",p)]=h.exact):["min","max"].forEach(E=>{h[E]!==void 0&&(m.mandatory=m.mandatory||{},m.mandatory[C(E,p)]=h[E])})}),s.advanced&&(m.optional=(m.optional||[]).concat(s.advanced)),m},n=function(s,m){if(o.version>=61)return m(s);if(s=JSON.parse(JSON.stringify(s)),s&&typeof s.audio=="object"){let p=function(h,C,E){C in h&&!(E in h)&&(h[E]=h[C],delete h[C])};s=JSON.parse(JSON.stringify(s)),p(s.audio,"autoGainControl","googAutoGainControl"),p(s.audio,"noiseSuppression","googNoiseSuppression"),s.audio=e(s.audio)}if(s&&typeof s.video=="object"){let p=s.video.facingMode;p=p&&(typeof p=="object"?p:{ideal:p});let h=o.version<66;if(p&&(p.exact==="user"||p.exact==="environment"||p.ideal==="user"||p.ideal==="environment")&&!(t.mediaDevices.getSupportedConstraints&&t.mediaDevices.getSupportedConstraints().facingMode&&!h)){delete s.video.facingMode;let C;if(p.exact==="environment"||p.ideal==="environment"?C=["back","rear"]:(p.exact==="user"||p.ideal==="user")&&(C=["front"]),C)return t.mediaDevices.enumerateDevices().then(E=>{E=E.filter(L=>L.kind==="videoinput");let D=E.find(L=>C.some(H=>L.label.toLowerCase().includes(H)));return!D&&E.length&&C.includes("back")&&(D=E[E.length-1]),D&&(s.video.deviceId=p.exact?{exact:D.deviceId}:{ideal:D.deviceId}),s.video=e(s.video),L0e("chrome: "+JSON.stringify(s)),m(s)})}s.video=e(s.video)}return L0e("chrome: "+JSON.stringify(s)),m(s)},r=function(s){return o.version>=64?s:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[s.name]||s.name,message:s.message,constraint:s.constraint||s.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},a=function(s,m,p){n(s,h=>{t.webkitGetUserMedia(h,m,C=>{p&&p(r(C))})})};if(t.getUserMedia=a.bind(t),t.mediaDevices.getUserMedia){let s=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(m){return n(m,p=>s(p).then(h=>{if(p.audio&&!h.getAudioTracks().length||p.video&&!h.getVideoTracks().length)throw h.getTracks().forEach(C=>{C.stop()}),new DOMException("","NotFoundError");return h},h=>Promise.reject(r(h))))}}}function B0e(i,o){if(!(i.navigator.mediaDevices&&"getDisplayMedia"in i.navigator.mediaDevices)&&i.navigator.mediaDevices){if(typeof o!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}i.navigator.mediaDevices.getDisplayMedia=function(e){return o(e).then(n=>{let r=e.video&&e.video.width,a=e.video&&e.video.height,s=e.video&&e.video.frameRate;return e.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:n,maxFrameRate:s||3}},r&&(e.video.mandatory.maxWidth=r),a&&(e.video.mandatory.maxHeight=a),i.navigator.mediaDevices.getUserMedia(e)})}}}function kz(i){i.MediaStream=i.MediaStream||i.webkitMediaStream}function Rz(i){if(typeof i=="object"&&i.RTCPeerConnection&&!("ontrack"in i.RTCPeerConnection.prototype)){Object.defineProperty(i.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(t){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=t)},enumerable:!0,configurable:!0});let o=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=e=>{e.stream.addEventListener("addtrack",n=>{let r;i.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(s=>s.track&&s.track.id===n.track.id):r={track:n.track};let a=new Event("track");a.track=n.track,a.receiver=r,a.transceiver={receiver:r},a.streams=[e.stream],this.dispatchEvent(a)}),e.stream.getTracks().forEach(n=>{let r;i.RTCPeerConnection.prototype.getReceivers?r=this.getReceivers().find(s=>s.track&&s.track.id===n.id):r={track:n};let a=new Event("track");a.track=n,a.receiver=r,a.transceiver={receiver:r},a.streams=[e.stream],this.dispatchEvent(a)})},this.addEventListener("addstream",this._ontrackpoly)),o.apply(this,arguments)}}else $m(i,"track",o=>(o.transceiver||Object.defineProperty(o,"transceiver",{value:{receiver:o.receiver}}),o))}function Nz(i){if(typeof i=="object"&&i.RTCPeerConnection&&!("getSenders"in i.RTCPeerConnection.prototype)&&"createDTMFSender"in i.RTCPeerConnection.prototype){let o=function(n,r){return{track:r,get dtmf(){return this._dtmf===void 0&&(r.kind==="audio"?this._dtmf=n.createDTMFSender(r):this._dtmf=null),this._dtmf},_pc:n}};if(!i.RTCPeerConnection.prototype.getSenders){i.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let n=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addTrack=function(s,m){let p=n.apply(this,arguments);return p||(p=o(this,s),this._senders.push(p)),p};let r=i.RTCPeerConnection.prototype.removeTrack;i.RTCPeerConnection.prototype.removeTrack=function(s){r.apply(this,arguments);let m=this._senders.indexOf(s);m!==-1&&this._senders.splice(m,1)}}let t=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(r){this._senders=this._senders||[],t.apply(this,[r]),r.getTracks().forEach(a=>{this._senders.push(o(this,a))})};let e=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(r){this._senders=this._senders||[],e.apply(this,[r]),r.getTracks().forEach(a=>{let s=this._senders.find(m=>m.track===a);s&&this._senders.splice(this._senders.indexOf(s),1)})}}else if(typeof i=="object"&&i.RTCPeerConnection&&"getSenders"in i.RTCPeerConnection.prototype&&"createDTMFSender"in i.RTCPeerConnection.prototype&&i.RTCRtpSender&&!("dtmf"in i.RTCRtpSender.prototype)){let o=i.RTCPeerConnection.prototype.getSenders;i.RTCPeerConnection.prototype.getSenders=function(){let e=o.apply(this,[]);return e.forEach(n=>n._pc=this),e},Object.defineProperty(i.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function Fz(i){if(!i.RTCPeerConnection)return;let o=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){let[e,n,r]=arguments;if(arguments.length>0&&typeof e=="function")return o.apply(this,arguments);if(o.length===0&&(arguments.length===0||typeof e!="function"))return o.apply(this,[]);let a=function(m){let p={};return m.result().forEach(C=>{let E={id:C.id,timestamp:C.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[C.type]||C.type};C.names().forEach(D=>{E[D]=C.stat(D)}),p[E.id]=E}),p},s=function(m){return new Map(Object.keys(m).map(p=>[p,m[p]]))};if(arguments.length>=2){let m=function(p){n(s(a(p)))};return o.apply(this,[m,e])}return new Promise((m,p)=>{o.apply(this,[function(h){m(s(a(h)))},p])}).then(n,r)}}function Lz(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender&&i.RTCRtpReceiver))return;if(!("getStats"in i.RTCRtpSender.prototype)){let t=i.RTCPeerConnection.prototype.getSenders;t&&(i.RTCPeerConnection.prototype.getSenders=function(){let r=t.apply(this,[]);return r.forEach(a=>a._pc=this),r});let e=i.RTCPeerConnection.prototype.addTrack;e&&(i.RTCPeerConnection.prototype.addTrack=function(){let r=e.apply(this,arguments);return r._pc=this,r}),i.RTCRtpSender.prototype.getStats=function(){let r=this;return this._pc.getStats().then(a=>Mz(a,r.track,!0))}}if(!("getStats"in i.RTCRtpReceiver.prototype)){let t=i.RTCPeerConnection.prototype.getReceivers;t&&(i.RTCPeerConnection.prototype.getReceivers=function(){let n=t.apply(this,[]);return n.forEach(r=>r._pc=this),n}),$m(i,"track",e=>(e.receiver._pc=e.srcElement,e)),i.RTCRtpReceiver.prototype.getStats=function(){let n=this;return this._pc.getStats().then(r=>Mz(r,n.track,!1))}}if(!("getStats"in i.RTCRtpSender.prototype&&"getStats"in i.RTCRtpReceiver.prototype))return;let o=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof i.MediaStreamTrack){let e=arguments[0],n,r,a;return this.getSenders().forEach(s=>{s.track===e&&(n?a=!0:n=s)}),this.getReceivers().forEach(s=>(s.track===e&&(r?a=!0:r=s),s.track===e)),a||n&&r?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):n?n.getStats():r?r.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return o.apply(this,arguments)}}function V0e(i){i.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(a=>this._shimmedLocalStreams[a][0])};let o=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addTrack=function(a,s){if(!s)return o.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let m=o.apply(this,arguments);return this._shimmedLocalStreams[s.id]?this._shimmedLocalStreams[s.id].indexOf(m)===-1&&this._shimmedLocalStreams[s.id].push(m):this._shimmedLocalStreams[s.id]=[s,m],m};let t=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(a){this._shimmedLocalStreams=this._shimmedLocalStreams||{},a.getTracks().forEach(p=>{if(this.getSenders().find(C=>C.track===p))throw new DOMException("Track already exists.","InvalidAccessError")});let s=this.getSenders();t.apply(this,arguments);let m=this.getSenders().filter(p=>s.indexOf(p)===-1);this._shimmedLocalStreams[a.id]=[a].concat(m)};let e=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[a.id],e.apply(this,arguments)};let n=i.RTCPeerConnection.prototype.removeTrack;i.RTCPeerConnection.prototype.removeTrack=function(a){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},a&&Object.keys(this._shimmedLocalStreams).forEach(s=>{let m=this._shimmedLocalStreams[s].indexOf(a);m!==-1&&this._shimmedLocalStreams[s].splice(m,1),this._shimmedLocalStreams[s].length===1&&delete this._shimmedLocalStreams[s]}),n.apply(this,arguments)}}function Bz(i,o){if(!i.RTCPeerConnection)return;if(i.RTCPeerConnection.prototype.addTrack&&o.version>=65)return V0e(i);let t=i.RTCPeerConnection.prototype.getLocalStreams;i.RTCPeerConnection.prototype.getLocalStreams=function(){let h=t.apply(this);return this._reverseStreams=this._reverseStreams||{},h.map(C=>this._reverseStreams[C.id])};let e=i.RTCPeerConnection.prototype.addStream;i.RTCPeerConnection.prototype.addStream=function(h){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},h.getTracks().forEach(C=>{if(this.getSenders().find(D=>D.track===C))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[h.id]){let C=new i.MediaStream(h.getTracks());this._streams[h.id]=C,this._reverseStreams[C.id]=h,h=C}e.apply(this,[h])};let n=i.RTCPeerConnection.prototype.removeStream;i.RTCPeerConnection.prototype.removeStream=function(h){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},n.apply(this,[this._streams[h.id]||h]),delete this._reverseStreams[this._streams[h.id]?this._streams[h.id].id:h.id],delete this._streams[h.id]},i.RTCPeerConnection.prototype.addTrack=function(h,C){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");let E=[].slice.call(arguments,1);if(E.length!==1||!E[0].getTracks().find(H=>H===h))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(H=>H.track===h))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let L=this._streams[C.id];if(L)L.addTrack(h),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{let H=new i.MediaStream([h]);this._streams[C.id]=H,this._reverseStreams[H.id]=C,this.addStream(H)}return this.getSenders().find(H=>H.track===h)};function r(p,h){let C=h.sdp;return Object.keys(p._reverseStreams||[]).forEach(E=>{let D=p._reverseStreams[E],L=p._streams[D.id];C=C.replace(new RegExp(L.id,"g"),D.id)}),new RTCSessionDescription({type:h.type,sdp:C})}function a(p,h){let C=h.sdp;return Object.keys(p._reverseStreams||[]).forEach(E=>{let D=p._reverseStreams[E],L=p._streams[D.id];C=C.replace(new RegExp(D.id,"g"),L.id)}),new RTCSessionDescription({type:h.type,sdp:C})}["createOffer","createAnswer"].forEach(function(p){let h=i.RTCPeerConnection.prototype[p],C={[p](){let E=arguments;return arguments.length&&typeof arguments[0]=="function"?h.apply(this,[L=>{let H=r(this,L);E[0].apply(null,[H])},L=>{E[1]&&E[1].apply(null,L)},arguments[2]]):h.apply(this,arguments).then(L=>r(this,L))}};i.RTCPeerConnection.prototype[p]=C[p]});let s=i.RTCPeerConnection.prototype.setLocalDescription;i.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?s.apply(this,arguments):(arguments[0]=a(this,arguments[0]),s.apply(this,arguments))};let m=Object.getOwnPropertyDescriptor(i.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(i.RTCPeerConnection.prototype,"localDescription",{get(){let p=m.get.apply(this);return p.type===""?p:r(this,p)}}),i.RTCPeerConnection.prototype.removeTrack=function(h){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!h._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(h._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let E;Object.keys(this._streams).forEach(D=>{this._streams[D].getTracks().find(H=>h.track===H)&&(E=this._streams[D])}),E&&(E.getTracks().length===1?this.removeStream(this._reverseStreams[E.id]):E.removeTrack(h.track),this.dispatchEvent(new Event("negotiationneeded")))}}function S7(i,o){!i.RTCPeerConnection&&i.webkitRTCPeerConnection&&(i.RTCPeerConnection=i.webkitRTCPeerConnection),i.RTCPeerConnection&&o.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){let e=i.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new(t==="addIceCandidate"?i.RTCIceCandidate:i.RTCSessionDescription)(arguments[0]),e.apply(this,arguments)}};i.RTCPeerConnection.prototype[t]=n[t]})}function Vz(i,o){$m(i,"negotiationneeded",t=>{let e=t.target;if(!((o.version<72||e.getConfiguration&&e.getConfiguration().sdpSemantics==="plan-b")&&e.signalingState!=="stable"))return t})}var x7={};jw(x7,{shimAddTransceiver:()=>Gz,shimCreateAnswer:()=>Yz,shimCreateOffer:()=>qz,shimGetDisplayMedia:()=>U0e,shimGetParameters:()=>Wz,shimGetUserMedia:()=>I7,shimOnTrack:()=>Uz,shimPeerConnection:()=>E7,shimRTCDataChannel:()=>zz,shimReceiverGetStats:()=>$z,shimRemoveStream:()=>Hz,shimSenderGetStats:()=>jz});function I7(i,o){let t=i&&i.navigator,e=i&&i.MediaStreamTrack;if(t.getUserMedia=function(n,r,a){f_("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),t.mediaDevices.getUserMedia(n).then(r,a)},!(o.version>55&&"autoGainControl"in t.mediaDevices.getSupportedConstraints())){let n=function(a,s,m){s in a&&!(m in a)&&(a[m]=a[s],delete a[s])},r=t.mediaDevices.getUserMedia.bind(t.mediaDevices);if(t.mediaDevices.getUserMedia=function(a){return typeof a=="object"&&typeof a.audio=="object"&&(a=JSON.parse(JSON.stringify(a)),n(a.audio,"autoGainControl","mozAutoGainControl"),n(a.audio,"noiseSuppression","mozNoiseSuppression")),r(a)},e&&e.prototype.getSettings){let a=e.prototype.getSettings;e.prototype.getSettings=function(){let s=a.apply(this,arguments);return n(s,"mozAutoGainControl","autoGainControl"),n(s,"mozNoiseSuppression","noiseSuppression"),s}}if(e&&e.prototype.applyConstraints){let a=e.prototype.applyConstraints;e.prototype.applyConstraints=function(s){return this.kind==="audio"&&typeof s=="object"&&(s=JSON.parse(JSON.stringify(s)),n(s,"autoGainControl","mozAutoGainControl"),n(s,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[s])}}}}function U0e(i,o){i.navigator.mediaDevices&&"getDisplayMedia"in i.navigator.mediaDevices||i.navigator.mediaDevices&&(i.navigator.mediaDevices.getDisplayMedia=function(e){if(!(e&&e.video)){let n=new DOMException("getDisplayMedia without video constraints is undefined");return n.name="NotFoundError",n.code=8,Promise.reject(n)}return e.video===!0?e.video={mediaSource:o}:e.video.mediaSource=o,i.navigator.mediaDevices.getUserMedia(e)})}function Uz(i){typeof i=="object"&&i.RTCTrackEvent&&"receiver"in i.RTCTrackEvent.prototype&&!("transceiver"in i.RTCTrackEvent.prototype)&&Object.defineProperty(i.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function E7(i,o){if(typeof i!="object"||!(i.RTCPeerConnection||i.mozRTCPeerConnection))return;!i.RTCPeerConnection&&i.mozRTCPeerConnection&&(i.RTCPeerConnection=i.mozRTCPeerConnection),o.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let r=i.RTCPeerConnection.prototype[n],a={[n](){return arguments[0]=new(n==="addIceCandidate"?i.RTCIceCandidate:i.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}};i.RTCPeerConnection.prototype[n]=a[n]});let t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},e=i.RTCPeerConnection.prototype.getStats;i.RTCPeerConnection.prototype.getStats=function(){let[r,a,s]=arguments;return e.apply(this,[r||null]).then(m=>{if(o.version<53&&!a)try{m.forEach(p=>{p.type=t[p.type]||p.type})}catch(p){if(p.name!=="TypeError")throw p;m.forEach((h,C)=>{m.set(C,Object.assign({},h,{type:t[h.type]||h.type}))})}return m}).then(a,s)}}function jz(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender)||i.RTCRtpSender&&"getStats"in i.RTCRtpSender.prototype)return;let o=i.RTCPeerConnection.prototype.getSenders;o&&(i.RTCPeerConnection.prototype.getSenders=function(){let n=o.apply(this,[]);return n.forEach(r=>r._pc=this),n});let t=i.RTCPeerConnection.prototype.addTrack;t&&(i.RTCPeerConnection.prototype.addTrack=function(){let n=t.apply(this,arguments);return n._pc=this,n}),i.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function $z(i){if(!(typeof i=="object"&&i.RTCPeerConnection&&i.RTCRtpSender)||i.RTCRtpSender&&"getStats"in i.RTCRtpReceiver.prototype)return;let o=i.RTCPeerConnection.prototype.getReceivers;o&&(i.RTCPeerConnection.prototype.getReceivers=function(){let e=o.apply(this,[]);return e.forEach(n=>n._pc=this),e}),$m(i,"track",t=>(t.receiver._pc=t.srcElement,t)),i.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Hz(i){!i.RTCPeerConnection||"removeStream"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.removeStream=function(t){f_("removeStream","removeTrack"),this.getSenders().forEach(e=>{e.track&&t.getTracks().includes(e.track)&&this.removeTrack(e)})})}function zz(i){i.DataChannel&&!i.RTCDataChannel&&(i.RTCDataChannel=i.DataChannel)}function Gz(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.addTransceiver;o&&(i.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;e===void 0&&(e=[]),e=[...e];let n=e.length>0;n&&e.forEach(a=>{if("rid"in a&&!/^[a-z0-9]{0,16}$/i.test(a.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in a&&!(parseFloat(a.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in a&&!(parseFloat(a.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});let r=o.apply(this,arguments);if(n){let{sender:a}=r,s=a.getParameters();(!("encodings"in s)||s.encodings.length===1&&Object.keys(s.encodings[0]).length===0)&&(s.encodings=e,a.sendEncodings=e,this.setParametersPromises.push(a.setParameters(s).then(()=>{delete a.sendEncodings}).catch(()=>{delete a.sendEncodings})))}return r})}function Wz(i){if(!(typeof i=="object"&&i.RTCRtpSender))return;let o=i.RTCRtpSender.prototype.getParameters;o&&(i.RTCRtpSender.prototype.getParameters=function(){let e=o.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function qz(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.createOffer;i.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>o.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):o.apply(this,arguments)}}function Yz(i){if(!(typeof i=="object"&&i.RTCPeerConnection))return;let o=i.RTCPeerConnection.prototype.createAnswer;i.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>o.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):o.apply(this,arguments)}}var T7={};jw(T7,{shimAudioContext:()=>nG,shimCallbacksAPI:()=>Xz,shimConstraints:()=>j0e,shimCreateOfferLegacy:()=>tG,shimGetUserMedia:()=>Qz,shimLocalStreamsAPI:()=>Kz,shimRTCIceServerUrls:()=>Jz,shimRemoteStreamsAPI:()=>Zz,shimTrackEventTransceiver:()=>eG});function Kz(i){if(!(typeof i!="object"||!i.RTCPeerConnection)){if("getLocalStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in i.RTCPeerConnection.prototype)){let o=i.RTCPeerConnection.prototype.addTrack;i.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(n=>o.call(this,n,e)),e.getVideoTracks().forEach(n=>o.call(this,n,e))},i.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach(r=>{this._localStreams?this._localStreams.includes(r)||this._localStreams.push(r):this._localStreams=[r]}),o.apply(this,arguments)}}"removeStream"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.removeStream=function(t){this._localStreams||(this._localStreams=[]);let e=this._localStreams.indexOf(t);if(e===-1)return;this._localStreams.splice(e,1);let n=t.getTracks();this.getSenders().forEach(r=>{n.includes(r.track)&&this.removeTrack(r)})})}}function Zz(i){if(!(typeof i!="object"||!i.RTCPeerConnection)&&("getRemoteStreams"in i.RTCPeerConnection.prototype||(i.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in i.RTCPeerConnection.prototype))){Object.defineProperty(i.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(t){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=t),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(n=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(n))return;this._remoteStreams.push(n);let r=new Event("addstream");r.stream=n,this.dispatchEvent(r)})})}});let o=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(n){n.streams.forEach(r=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(r)>=0)return;e._remoteStreams.push(r);let a=new Event("addstream");a.stream=r,e.dispatchEvent(a)})}),o.apply(e,arguments)}}}function Xz(i){if(typeof i!="object"||!i.RTCPeerConnection)return;let o=i.RTCPeerConnection.prototype,t=o.createOffer,e=o.createAnswer,n=o.setLocalDescription,r=o.setRemoteDescription,a=o.addIceCandidate;o.createOffer=function(p,h){let C=arguments.length>=2?arguments[2]:arguments[0],E=t.apply(this,[C]);return h?(E.then(p,h),Promise.resolve()):E},o.createAnswer=function(p,h){let C=arguments.length>=2?arguments[2]:arguments[0],E=e.apply(this,[C]);return h?(E.then(p,h),Promise.resolve()):E};let s=function(m,p,h){let C=n.apply(this,[m]);return h?(C.then(p,h),Promise.resolve()):C};o.setLocalDescription=s,s=function(m,p,h){let C=r.apply(this,[m]);return h?(C.then(p,h),Promise.resolve()):C},o.setRemoteDescription=s,s=function(m,p,h){let C=a.apply(this,[m]);return h?(C.then(p,h),Promise.resolve()):C},o.addIceCandidate=s}function Qz(i){let o=i&&i.navigator;if(o.mediaDevices&&o.mediaDevices.getUserMedia){let t=o.mediaDevices,e=t.getUserMedia.bind(t);o.mediaDevices.getUserMedia=n=>e(j0e(n))}!o.getUserMedia&&o.mediaDevices&&o.mediaDevices.getUserMedia&&(o.getUserMedia=(function(e,n,r){o.mediaDevices.getUserMedia(e).then(n,r)}).bind(o))}function j0e(i){return i&&i.video!==void 0?Object.assign({},i,{video:Pz(i.video)}):i}function Jz(i){if(!i.RTCPeerConnection)return;let o=i.RTCPeerConnection;i.RTCPeerConnection=function(e,n){if(e&&e.iceServers){let r=[];for(let a=0;a<e.iceServers.length;a++){let s=e.iceServers[a];s.urls===void 0&&s.url?(f_("RTCIceServer.url","RTCIceServer.urls"),s=JSON.parse(JSON.stringify(s)),s.urls=s.url,delete s.url,r.push(s)):r.push(e.iceServers[a])}e.iceServers=r}return new o(e,n)},i.RTCPeerConnection.prototype=o.prototype,"generateCertificate"in o&&Object.defineProperty(i.RTCPeerConnection,"generateCertificate",{get(){return o.generateCertificate}})}function eG(i){typeof i=="object"&&i.RTCTrackEvent&&"receiver"in i.RTCTrackEvent.prototype&&!("transceiver"in i.RTCTrackEvent.prototype)&&Object.defineProperty(i.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function tG(i){let o=i.RTCPeerConnection.prototype.createOffer;i.RTCPeerConnection.prototype.createOffer=function(e){if(e){typeof e.offerToReceiveAudio<"u"&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let n=this.getTransceivers().find(a=>a.receiver.track.kind==="audio");e.offerToReceiveAudio===!1&&n?n.direction==="sendrecv"?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":n.direction==="recvonly"&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):e.offerToReceiveAudio===!0&&!n&&this.addTransceiver("audio",{direction:"recvonly"}),typeof e.offerToReceiveVideo<"u"&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let r=this.getTransceivers().find(a=>a.receiver.track.kind==="video");e.offerToReceiveVideo===!1&&r?r.direction==="sendrecv"?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":r.direction==="recvonly"&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):e.offerToReceiveVideo===!0&&!r&&this.addTransceiver("video",{direction:"recvonly"})}return o.apply(this,arguments)}}function nG(i){typeof i!="object"||i.AudioContext||(i.AudioContext=i.webkitAudioContext)}var rG={};jw(rG,{removeExtmapAllowMixed:()=>O7,shimAddIceCandidateNullOrEmpty:()=>Sw,shimConnectionState:()=>w7,shimMaxMessageSize:()=>_w,shimParameterlessSetLocalDescription:()=>bw,shimRTCIceCandidate:()=>Cw,shimRTCIceCandidateRelayProtocol:()=>D7,shimSendThrowTypeError:()=>yw});var v_=$G(oG());function Cw(i){if(!i.RTCIceCandidate||i.RTCIceCandidate&&"foundation"in i.RTCIceCandidate.prototype)return;let o=i.RTCIceCandidate;i.RTCIceCandidate=function(e){if(typeof e=="object"&&e.candidate&&e.candidate.indexOf("a=")===0&&(e=JSON.parse(JSON.stringify(e)),e.candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let n=new o(e),r=v_.default.parseCandidate(e.candidate);for(let a in r)a in n||Object.defineProperty(n,a,{value:r[a]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new o(e)},i.RTCIceCandidate.prototype=o.prototype,$m(i,"icecandidate",t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new i.RTCIceCandidate(t.candidate),writable:"false"}),t))}function D7(i){!i.RTCIceCandidate||i.RTCIceCandidate&&"relayProtocol"in i.RTCIceCandidate.prototype||$m(i,"icecandidate",o=>{if(o.candidate){let t=v_.default.parseCandidate(o.candidate.candidate);t.type==="relay"&&(o.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return o})}function _w(i,o){if(!i.RTCPeerConnection)return;"sctp"in i.RTCPeerConnection.prototype||Object.defineProperty(i.RTCPeerConnection.prototype,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp}});let t=function(s){if(!s||!s.sdp)return!1;let m=v_.default.splitSections(s.sdp);return m.shift(),m.some(p=>{let h=v_.default.parseMLine(p);return h&&h.kind==="application"&&h.protocol.indexOf("SCTP")!==-1})},e=function(s){let m=s.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(m===null||m.length<2)return-1;let p=parseInt(m[1],10);return p!==p?-1:p},n=function(s){let m=65536;return o.browser==="firefox"&&(o.version<57?s===-1?m=16384:m=2147483637:o.version<60?m=o.version===57?65535:65536:m=2147483637),m},r=function(s,m){let p=65536;o.browser==="firefox"&&o.version===57&&(p=65535);let h=v_.default.matchPrefix(s.sdp,"a=max-message-size:");return h.length>0?p=parseInt(h[0].substring(19),10):o.browser==="firefox"&&m!==-1&&(p=2147483637),p},a=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,o.browser==="chrome"&&o.version>=76){let{sdpSemantics:m}=this.getConfiguration();m==="plan-b"&&Object.defineProperty(this,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp},enumerable:!0,configurable:!0})}if(t(arguments[0])){let m=e(arguments[0]),p=n(m),h=r(arguments[0],m),C;p===0&&h===0?C=Number.POSITIVE_INFINITY:p===0||h===0?C=Math.max(p,h):C=Math.min(p,h);let E={};Object.defineProperty(E,"maxMessageSize",{get(){return C}}),this._sctp=E}return a.apply(this,arguments)}}function yw(i){if(!(i.RTCPeerConnection&&"createDataChannel"in i.RTCPeerConnection.prototype))return;function o(e,n){let r=e.send;e.send=function(){let s=arguments[0],m=s.length||s.size||s.byteLength;if(e.readyState==="open"&&n.sctp&&m>n.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+n.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}let t=i.RTCPeerConnection.prototype.createDataChannel;i.RTCPeerConnection.prototype.createDataChannel=function(){let n=t.apply(this,arguments);return o(n,this),n},$m(i,"datachannel",e=>(o(e.channel,e.target),e))}function w7(i){if(!i.RTCPeerConnection||"connectionState"in i.RTCPeerConnection.prototype)return;let o=i.RTCPeerConnection.prototype;Object.defineProperty(o,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(o,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(t){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),t&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=t)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(t=>{let e=o[t];o[t]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=n=>{let r=n.target;if(r._lastConnectionState!==r.connectionState){r._lastConnectionState=r.connectionState;let a=new Event("connectionstatechange",n);r.dispatchEvent(a)}return n},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),e.apply(this,arguments)}})}function O7(i,o){if(!i.RTCPeerConnection||o.browser==="chrome"&&o.version>=71||o.browser==="safari"&&o.version>=605)return;let t=i.RTCPeerConnection.prototype.setRemoteDescription;i.RTCPeerConnection.prototype.setRemoteDescription=function(n){if(n&&n.sdp&&n.sdp.indexOf(`
440
440
  a=extmap-allow-mixed`)!==-1){let r=n.sdp.split(`