diff --git a/chunk-DRGWRVTY.js b/chunk-DRGWRVTY.js deleted file mode 100644 index 7f98bc6b..00000000 --- a/chunk-DRGWRVTY.js +++ /dev/null @@ -1,2 +0,0 @@ -var Fb=Object.create;var ed=Object.defineProperty,Lb=Object.defineProperties,kb=Object.getOwnPropertyDescriptor,jb=Object.getOwnPropertyDescriptors,Vb=Object.getOwnPropertyNames,Fa=Object.getOwnPropertySymbols,Ub=Object.getPrototypeOf,td=Object.prototype.hasOwnProperty,pg=Object.prototype.propertyIsEnumerable;var hg=(e,t,n)=>t in e?ed(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t||(t={}))td.call(t,n)&&hg(e,n,t[n]);if(Fa)for(var n of Fa(t))pg.call(t,n)&&hg(e,n,t[n]);return e},Ve=(e,t)=>Lb(e,jb(t));var mg=(e,t)=>{var n={};for(var r in e)td.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Fa)for(var r of Fa(e))t.indexOf(r)<0&&pg.call(e,r)&&(n[r]=e[r]);return n};var Bb=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Hb=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Vb(t))!td.call(e,i)&&i!==n&&ed(e,i,{get:()=>t[i],enumerable:!(r=kb(t,i))||r.enumerable});return e};var $b=(e,t,n)=>(n=e!=null?Fb(Ub(e)):{},Hb(t||!e||!e.__esModule?ed(n,"default",{value:e,enumerable:!0}):n,e));var zb=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{a(n.next(c))}catch(u){i(u)}},s=c=>{try{a(n.throw(c))}catch(u){i(u)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,s);a((n=n.apply(e,t)).next())});var ub=Bb((jm,Vm)=>{"use strict";(function(e,t){typeof jm=="object"&&typeof Vm<"u"?Vm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=t())})(jm,function(){"use strict";let{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object,{freeze:o,seal:s,create:a}=Object,{apply:c,construct:u}=typeof Reflect<"u"&&Reflect;o||(o=function(z){return z}),s||(s=function(z){return z}),c||(c=function(z,Me,we){return z.apply(Me,we)}),u||(u=function(z,Me){return new z(...Me)});let l=De(Array.prototype.forEach),d=De(Array.prototype.pop),f=De(Array.prototype.push),p=De(String.prototype.toLowerCase),g=De(String.prototype.toString),_=De(String.prototype.match),T=De(String.prototype.replace),A=De(String.prototype.indexOf),q=De(String.prototype.trim),B=De(RegExp.prototype.test),he=It(TypeError);function De(Se){return function(z){for(var Me=arguments.length,we=new Array(Me>1?Me-1:0),Tt=1;Tt2&&arguments[2]!==void 0?arguments[2]:p;t&&t(Se,null);let we=z.length;for(;we--;){let Tt=z[we];if(typeof Tt=="string"){let Kn=Me(Tt);Kn!==Tt&&(n(z)||(z[we]=Kn),Tt=Kn)}Se[Tt]=!0}return Se}function Ye(Se){let z=a(null);for(let[Me,we]of e(Se))i(Se,Me)!==void 0&&(z[Me]=we);return z}function Ft(Se,z){for(;Se!==null;){let we=i(Se,z);if(we){if(we.get)return De(we.get);if(typeof we.value=="function")return De(we.value)}Se=r(Se)}function Me(we){return console.warn("fallback value for",we),null}return Me}let _t=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fn=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yn=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$r=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),bn=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ia=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),x=o(["#text"]),L=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ce=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ke=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),tn=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),St=s(/<%[\w\W]*|[\w\W]*%>/gm),Cn=s(/\${[\w\W]*}/gm),Be=s(/^data-[\-\w.\u00B7-\uFFFF]/),Sa=s(/^aria-[\-\w]+$/),Ma=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ut=s(/^(?:\w+script|data):/i),Zn=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mt=s(/^html$/i);var zr=Object.freeze({__proto__:null,MUSTACHE_EXPR:tn,ERB_EXPR:St,TMPLIT_EXPR:Cn,DATA_ATTR:Be,ARIA_ATTR:Sa,IS_ALLOWED_URI:Ma,IS_SCRIPT_OR_DATA:ut,ATTR_WHITESPACE:Zn,DOCTYPE_NAME:Mt});let Wo=function(){return typeof window>"u"?null:window},db=function(z,Me){if(typeof z!="object"||typeof z.createPolicy!="function")return null;let we=null,Tt="data-tt-policy-suffix";Me&&Me.hasAttribute(Tt)&&(we=Me.getAttribute(Tt));let Kn="dompurify"+(we?"#"+we:"");try{return z.createPolicy(Kn,{createHTML(Pi){return Pi},createScriptURL(Pi){return Pi}})}catch{return console.warn("TrustedTypes policy "+Kn+" could not be created."),null}};function Um(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wo(),z=k=>Um(k);if(z.version="3.0.6",z.removed=[],!Se||!Se.document||Se.document.nodeType!==9)return z.isSupported=!1,z;let{document:Me}=Se,we=Me,Tt=we.currentScript,{DocumentFragment:Kn,HTMLTemplateElement:Pi,Node:Ll,Element:Bm,NodeFilter:kl,NamedNodeMap:hb=Se.NamedNodeMap||Se.MozNamedAttrMap,HTMLFormElement:pb,DOMParser:mb,trustedTypes:Ta}=Se,Aa=Bm.prototype,gb=Ft(Aa,"cloneNode"),vb=Ft(Aa,"nextSibling"),yb=Ft(Aa,"childNodes"),jl=Ft(Aa,"parentNode");if(typeof Pi=="function"){let k=Me.createElement("template");k.content&&k.content.ownerDocument&&(Me=k.content.ownerDocument)}let At,qo="",{implementation:Vl,createNodeIterator:_b,createDocumentFragment:Db,getElementsByTagName:Eb}=Me,{importNode:wb}=we,In={};z.isSupported=typeof e=="function"&&typeof jl=="function"&&Vl&&Vl.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ul,ERB_EXPR:Bl,TMPLIT_EXPR:Hl,DATA_ATTR:bb,ARIA_ATTR:Cb,IS_SCRIPT_OR_DATA:Ib,ATTR_WHITESPACE:Hm}=zr,{IS_ALLOWED_URI:$m}=zr,lt=null,zm=O({},[..._t,...fn,...Yn,...bn,...x]),dt=null,Gm=O({},[...L,...V,...ce,...ke]),Je=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Yo=null,$l=null,Wm=!0,zl=!0,qm=!1,Ym=!0,Ri=!1,Gr=!1,Gl=!1,Wl=!1,Fi=!1,Oa=!1,xa=!1,Zm=!0,Km=!1,Sb="user-content-",ql=!0,Zo=!1,Li={},ki=null,Qm=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Xm=null,Jm=O({},["audio","video","img","source","image","track"]),Yl=null,eg=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Na="http://www.w3.org/1998/Math/MathML",Pa="http://www.w3.org/2000/svg",Qn="http://www.w3.org/1999/xhtml",ji=Qn,Zl=!1,Kl=null,Mb=O({},[Na,Pa,Qn],g),Wr=null,Tb=["application/xhtml+xml","text/html"],Ab="text/html",ft=null,Vi=null,Ob=Me.createElement("form"),tg=function(m){return m instanceof RegExp||m instanceof Function},Ql=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Vi&&Vi===m)){if((!m||typeof m!="object")&&(m={}),m=Ye(m),Wr=Tb.indexOf(m.PARSER_MEDIA_TYPE)===-1?Wr=Ab:Wr=m.PARSER_MEDIA_TYPE,ft=Wr==="application/xhtml+xml"?g:p,lt="ALLOWED_TAGS"in m?O({},m.ALLOWED_TAGS,ft):zm,dt="ALLOWED_ATTR"in m?O({},m.ALLOWED_ATTR,ft):Gm,Kl="ALLOWED_NAMESPACES"in m?O({},m.ALLOWED_NAMESPACES,g):Mb,Yl="ADD_URI_SAFE_ATTR"in m?O(Ye(eg),m.ADD_URI_SAFE_ATTR,ft):eg,Xm="ADD_DATA_URI_TAGS"in m?O(Ye(Jm),m.ADD_DATA_URI_TAGS,ft):Jm,ki="FORBID_CONTENTS"in m?O({},m.FORBID_CONTENTS,ft):Qm,Yo="FORBID_TAGS"in m?O({},m.FORBID_TAGS,ft):{},$l="FORBID_ATTR"in m?O({},m.FORBID_ATTR,ft):{},Li="USE_PROFILES"in m?m.USE_PROFILES:!1,Wm=m.ALLOW_ARIA_ATTR!==!1,zl=m.ALLOW_DATA_ATTR!==!1,qm=m.ALLOW_UNKNOWN_PROTOCOLS||!1,Ym=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ri=m.SAFE_FOR_TEMPLATES||!1,Gr=m.WHOLE_DOCUMENT||!1,Fi=m.RETURN_DOM||!1,Oa=m.RETURN_DOM_FRAGMENT||!1,xa=m.RETURN_TRUSTED_TYPE||!1,Wl=m.FORCE_BODY||!1,Zm=m.SANITIZE_DOM!==!1,Km=m.SANITIZE_NAMED_PROPS||!1,ql=m.KEEP_CONTENT!==!1,Zo=m.IN_PLACE||!1,$m=m.ALLOWED_URI_REGEXP||Ma,ji=m.NAMESPACE||Qn,Je=m.CUSTOM_ELEMENT_HANDLING||{},m.CUSTOM_ELEMENT_HANDLING&&tg(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Je.tagNameCheck=m.CUSTOM_ELEMENT_HANDLING.tagNameCheck),m.CUSTOM_ELEMENT_HANDLING&&tg(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Je.attributeNameCheck=m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Je.allowCustomizedBuiltInElements=m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ri&&(zl=!1),Oa&&(Fi=!0),Li&&(lt=O({},[...x]),dt=[],Li.html===!0&&(O(lt,_t),O(dt,L)),Li.svg===!0&&(O(lt,fn),O(dt,V),O(dt,ke)),Li.svgFilters===!0&&(O(lt,Yn),O(dt,V),O(dt,ke)),Li.mathMl===!0&&(O(lt,bn),O(dt,ce),O(dt,ke))),m.ADD_TAGS&&(lt===zm&&(lt=Ye(lt)),O(lt,m.ADD_TAGS,ft)),m.ADD_ATTR&&(dt===Gm&&(dt=Ye(dt)),O(dt,m.ADD_ATTR,ft)),m.ADD_URI_SAFE_ATTR&&O(Yl,m.ADD_URI_SAFE_ATTR,ft),m.FORBID_CONTENTS&&(ki===Qm&&(ki=Ye(ki)),O(ki,m.FORBID_CONTENTS,ft)),ql&&(lt["#text"]=!0),Gr&&O(lt,["html","head","body"]),lt.table&&(O(lt,["tbody"]),delete Yo.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw he('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');At=m.TRUSTED_TYPES_POLICY,qo=At.createHTML("")}else At===void 0&&(At=db(Ta,Tt)),At!==null&&typeof qo=="string"&&(qo=At.createHTML(""));o&&o(m),Vi=m}},ng=O({},["mi","mo","mn","ms","mtext"]),rg=O({},["foreignobject","desc","title","annotation-xml"]),xb=O({},["title","style","font","a","script"]),Ra=O({},fn);O(Ra,Yn),O(Ra,$r);let Xl=O({},bn);O(Xl,Ia);let Nb=function(m){let C=jl(m);(!C||!C.tagName)&&(C={namespaceURI:ji,tagName:"template"});let F=p(m.tagName),je=p(C.tagName);return Kl[m.namespaceURI]?m.namespaceURI===Pa?C.namespaceURI===Qn?F==="svg":C.namespaceURI===Na?F==="svg"&&(je==="annotation-xml"||ng[je]):!!Ra[F]:m.namespaceURI===Na?C.namespaceURI===Qn?F==="math":C.namespaceURI===Pa?F==="math"&&rg[je]:!!Xl[F]:m.namespaceURI===Qn?C.namespaceURI===Pa&&!rg[je]||C.namespaceURI===Na&&!ng[je]?!1:!Xl[F]&&(xb[F]||!Ra[F]):!!(Wr==="application/xhtml+xml"&&Kl[m.namespaceURI]):!1},qr=function(m){f(z.removed,{element:m});try{m.parentNode.removeChild(m)}catch{m.remove()}},Jl=function(m,C){try{f(z.removed,{attribute:C.getAttributeNode(m),from:C})}catch{f(z.removed,{attribute:null,from:C})}if(C.removeAttribute(m),m==="is"&&!dt[m])if(Fi||Oa)try{qr(C)}catch{}else try{C.setAttribute(m,"")}catch{}},ig=function(m){let C=null,F=null;if(Wl)m=""+m;else{let Et=_(m,/^[\r\n\t ]+/);F=Et&&Et[0]}Wr==="application/xhtml+xml"&&ji===Qn&&(m=''+m+"");let je=At?At.createHTML(m):m;if(ji===Qn)try{C=new mb().parseFromString(je,Wr)}catch{}if(!C||!C.documentElement){C=Vl.createDocument(ji,"template",null);try{C.documentElement.innerHTML=Zl?qo:je}catch{}}let Dt=C.body||C.documentElement;return m&&F&&Dt.insertBefore(Me.createTextNode(F),Dt.childNodes[0]||null),ji===Qn?Eb.call(C,Gr?"html":"body")[0]:Gr?C.documentElement:Dt},og=function(m){return _b.call(m.ownerDocument||m,m,kl.SHOW_ELEMENT|kl.SHOW_COMMENT|kl.SHOW_TEXT,null)},Pb=function(m){return m instanceof pb&&(typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||!(m.attributes instanceof hb)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function")},sg=function(m){return typeof Ll=="function"&&m instanceof Ll},Xn=function(m,C,F){In[m]&&l(In[m],je=>{je.call(z,C,F,Vi)})},ag=function(m){let C=null;if(Xn("beforeSanitizeElements",m,null),Pb(m))return qr(m),!0;let F=ft(m.nodeName);if(Xn("uponSanitizeElement",m,{tagName:F,allowedTags:lt}),m.hasChildNodes()&&!sg(m.firstElementChild)&&B(/<[/\w]/g,m.innerHTML)&&B(/<[/\w]/g,m.textContent))return qr(m),!0;if(!lt[F]||Yo[F]){if(!Yo[F]&&ug(F)&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,F)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(F)))return!1;if(ql&&!ki[F]){let je=jl(m)||m.parentNode,Dt=yb(m)||m.childNodes;if(Dt&&je){let Et=Dt.length;for(let Lt=Et-1;Lt>=0;--Lt)je.insertBefore(gb(Dt[Lt],!0),vb(m))}}return qr(m),!0}return m instanceof Bm&&!Nb(m)||(F==="noscript"||F==="noembed"||F==="noframes")&&B(/<\/no(script|embed|frames)/i,m.innerHTML)?(qr(m),!0):(Ri&&m.nodeType===3&&(C=m.textContent,l([Ul,Bl,Hl],je=>{C=T(C,je," ")}),m.textContent!==C&&(f(z.removed,{element:m.cloneNode()}),m.textContent=C)),Xn("afterSanitizeElements",m,null),!1)},cg=function(m,C,F){if(Zm&&(C==="id"||C==="name")&&(F in Me||F in Ob))return!1;if(!(zl&&!$l[C]&&B(bb,C))){if(!(Wm&&B(Cb,C))){if(!dt[C]||$l[C]){if(!(ug(m)&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,m)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(m))&&(Je.attributeNameCheck instanceof RegExp&&B(Je.attributeNameCheck,C)||Je.attributeNameCheck instanceof Function&&Je.attributeNameCheck(C))||C==="is"&&Je.allowCustomizedBuiltInElements&&(Je.tagNameCheck instanceof RegExp&&B(Je.tagNameCheck,F)||Je.tagNameCheck instanceof Function&&Je.tagNameCheck(F))))return!1}else if(!Yl[C]){if(!B($m,T(F,Hm,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&m!=="script"&&A(F,"data:")===0&&Xm[m])){if(!(qm&&!B(Ib,T(F,Hm,"")))){if(F)return!1}}}}}}return!0},ug=function(m){return m.indexOf("-")>0},lg=function(m){Xn("beforeSanitizeAttributes",m,null);let{attributes:C}=m;if(!C)return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:dt},je=C.length;for(;je--;){let Dt=C[je],{name:Et,namespaceURI:Lt,value:Yr}=Dt,Ko=ft(Et),kt=Et==="value"?Yr:q(Yr);if(F.attrName=Ko,F.attrValue=kt,F.keepAttr=!0,F.forceKeepAttr=void 0,Xn("uponSanitizeAttribute",m,F),kt=F.attrValue,F.forceKeepAttr||(Jl(Et,m),!F.keepAttr))continue;if(!Ym&&B(/\/>/i,kt)){Jl(Et,m);continue}Ri&&l([Ul,Bl,Hl],fg=>{kt=T(kt,fg," ")});let dg=ft(m.nodeName);if(cg(dg,Ko,kt)){if(Km&&(Ko==="id"||Ko==="name")&&(Jl(Et,m),kt=Sb+kt),At&&typeof Ta=="object"&&typeof Ta.getAttributeType=="function"&&!Lt)switch(Ta.getAttributeType(dg,Ko)){case"TrustedHTML":{kt=At.createHTML(kt);break}case"TrustedScriptURL":{kt=At.createScriptURL(kt);break}}try{Lt?m.setAttributeNS(Lt,Et,kt):m.setAttribute(Et,kt),d(z.removed)}catch{}}}Xn("afterSanitizeAttributes",m,null)},Rb=function k(m){let C=null,F=og(m);for(Xn("beforeSanitizeShadowDOM",m,null);C=F.nextNode();)Xn("uponSanitizeShadowNode",C,null),!ag(C)&&(C.content instanceof Kn&&k(C.content),lg(C));Xn("afterSanitizeShadowDOM",m,null)};return z.sanitize=function(k){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,F=null,je=null,Dt=null;if(Zl=!k,Zl&&(k=""),typeof k!="string"&&!sg(k))if(typeof k.toString=="function"){if(k=k.toString(),typeof k!="string")throw he("dirty is not a string, aborting")}else throw he("toString is not a function");if(!z.isSupported)return k;if(Gl||Ql(m),z.removed=[],typeof k=="string"&&(Zo=!1),Zo){if(k.nodeName){let Yr=ft(k.nodeName);if(!lt[Yr]||Yo[Yr])throw he("root node is forbidden and cannot be sanitized in-place")}}else if(k instanceof Ll)C=ig(""),F=C.ownerDocument.importNode(k,!0),F.nodeType===1&&F.nodeName==="BODY"||F.nodeName==="HTML"?C=F:C.appendChild(F);else{if(!Fi&&!Ri&&!Gr&&k.indexOf("<")===-1)return At&&xa?At.createHTML(k):k;if(C=ig(k),!C)return Fi?null:xa?qo:""}C&&Wl&&qr(C.firstChild);let Et=og(Zo?k:C);for(;je=Et.nextNode();)ag(je)||(je.content instanceof Kn&&Rb(je.content),lg(je));if(Zo)return k;if(Fi){if(Oa)for(Dt=Db.call(C.ownerDocument);C.firstChild;)Dt.appendChild(C.firstChild);else Dt=C;return(dt.shadowroot||dt.shadowrootmode)&&(Dt=wb.call(we,Dt,!0)),Dt}let Lt=Gr?C.outerHTML:C.innerHTML;return Gr&<["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&B(Mt,C.ownerDocument.doctype.name)&&(Lt="\n"+Lt),Ri&&l([Ul,Bl,Hl],Yr=>{Lt=T(Lt,Yr," ")}),At&&xa?At.createHTML(Lt):Lt},z.setConfig=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ql(k),Gl=!0},z.clearConfig=function(){Vi=null,Gl=!1},z.isValidAttribute=function(k,m,C){Vi||Ql({});let F=ft(k),je=ft(m);return cg(F,je,C)},z.addHook=function(k,m){typeof m=="function"&&(In[k]=In[k]||[],f(In[k],m))},z.removeHook=function(k){if(In[k])return d(In[k])},z.removeHooks=function(k){In[k]&&(In[k]=[])},z.removeAllHooks=function(){In={}},z}var fb=Um();return fb})});var gg=null;var nd=1;function Ot(e){let t=gg;return gg=e,t}var vg={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Gb(e){if(!(od(e)&&!e.dirty)&&!(!e.dirty&&e.lastCleanEpoch===nd)){if(!e.producerMustRecompute(e)&&!rd(e)){e.dirty=!1,e.lastCleanEpoch=nd;return}e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=nd}}function yg(e){return e&&(e.nextProducerIndex=0),Ot(e)}function _g(e,t){if(Ot(t),!(!e||e.producerNode===void 0||e.producerIndexOfThis===void 0||e.producerLastReadVersion===void 0)){if(od(e))for(let n=e.nextProducerIndex;ne.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function rd(e){La(e);for(let t=0;t0}function La(e){var t,n,r;(t=e.producerNode)!=null||(e.producerNode=[]),(n=e.producerIndexOfThis)!=null||(e.producerIndexOfThis=[]),(r=e.producerLastReadVersion)!=null||(e.producerLastReadVersion=[])}function Wb(e){var t,n;(t=e.liveConsumerNode)!=null||(e.liveConsumerNode=[]),(n=e.liveConsumerIndexOfThis)!=null||(e.liveConsumerIndexOfThis=[])}function qb(){throw new Error}var Yb=qb;function Eg(e){Yb=e}function H(e){return typeof e=="function"}function Ui(e){let n=e(r=>{Error.call(r),r.stack=new Error().stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var ka=Ui(e=>function(n){e(this),this.message=n?"".concat(n.length," errors occurred during unsubscription:\n").concat(n.map((r,i)=>"".concat(i+1,") ").concat(r.toString())).join("\n ")):"",this.name="UnsubscriptionError",this.errors=n});function Zr(e,t){if(e){let n=e.indexOf(t);0<=n&&e.splice(n,1)}}var rt=class e{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(let o of n)o.remove(this);else n.remove(this);let{initialTeardown:r}=this;if(H(r))try{r()}catch(o){t=o instanceof ka?o.errors:[o]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let o of i)try{wg(o)}catch(s){t=t!=null?t:[],s instanceof ka?t=[...t,...s.errors]:t.push(s)}}if(t)throw new ka(t)}}add(t){var n;if(t&&t!==this)if(this.closed)wg(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}}_hasParent(t){let{_parentage:n}=this;return n===t||Array.isArray(n)&&n.includes(t)}_addParent(t){let{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t}_removeParent(t){let{_parentage:n}=this;n===t?this._parentage=null:Array.isArray(n)&&Zr(n,t)}remove(t){let{_finalizers:n}=this;n&&Zr(n,t),t instanceof e&&t._removeParent(this)}};rt.EMPTY=(()=>{let e=new rt;return e.closed=!0,e})();var sd=rt.EMPTY;function ja(e){return e instanceof rt||e&&"closed"in e&&H(e.remove)&&H(e.add)&&H(e.unsubscribe)}function wg(e){H(e)?e():e.unsubscribe()}var hn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Bi={setTimeout(e,t,...n){let{delegate:r}=Bi;return r!=null&&r.setTimeout?r.setTimeout(e,t,...n):setTimeout(e,t,...n)},clearTimeout(e){let{delegate:t}=Bi;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Va(e){Bi.setTimeout(()=>{let{onUnhandledError:t}=hn;if(t)t(e);else throw e})}function Gt(){}var bg=(()=>ad("C",void 0,void 0))();function Cg(e){return ad("E",void 0,e)}function Ig(e){return ad("N",e,void 0)}function ad(e,t,n){return{kind:e,value:t,error:n}}var Kr=null;function Hi(e){if(hn.useDeprecatedSynchronousErrorHandling){let t=!Kr;if(t&&(Kr={errorThrown:!1,error:null}),e(),t){let{errorThrown:n,error:r}=Kr;if(Kr=null,n)throw r}}else e()}function Sg(e){hn.useDeprecatedSynchronousErrorHandling&&Kr&&(Kr.errorThrown=!0,Kr.error=e)}var Qr=class extends rt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,ja(t)&&t.add(this)):this.destination=Qb}static create(t,n,r){return new Jn(t,n,r)}next(t){this.isStopped?ud(Ig(t),this):this._next(t)}error(t){this.isStopped?ud(Cg(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?ud(bg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Zb=Function.prototype.bind;function cd(e,t){return Zb.call(e,t)}var ld=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:n}=this;if(n.next)try{n.next(t)}catch(r){Ua(r)}}error(t){let{partialObserver:n}=this;if(n.error)try{n.error(t)}catch(r){Ua(r)}else Ua(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(n){Ua(n)}}},Jn=class extends Qr{constructor(t,n,r){super();let i;if(H(t)||!t)i={next:t!=null?t:void 0,error:n!=null?n:void 0,complete:r!=null?r:void 0};else{let o;this&&hn.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),i={next:t.next&&cd(t.next,o),error:t.error&&cd(t.error,o),complete:t.complete&&cd(t.complete,o)}):i=t}this.destination=new ld(i)}};function Ua(e){hn.useDeprecatedSynchronousErrorHandling?Sg(e):Va(e)}function Kb(e){throw e}function ud(e,t){let{onStoppedNotification:n}=hn;n&&Bi.setTimeout(()=>n(e,t))}var Qb={closed:!0,next:Gt,error:Kb,complete:Gt};var $i=(()=>typeof Symbol=="function"&&Symbol.observable||"@@observable")();function Qe(e){return e}function Xr(...e){return dd(e)}function dd(e){return e.length===0?Qe:e.length===1?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}var N=(()=>{class e{constructor(n){n&&(this._subscribe=n)}lift(n){let r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){let o=Jb(n)?n:new Jn(n,r,i);return Hi(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(n){try{return this._subscribe(n)}catch(r){n.error(r)}}forEach(n,r){return r=Mg(r),new r((i,o)=>{let s=new Jn({next:a=>{try{n(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});this.subscribe(s)})}_subscribe(n){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(n)}[$i](){return this}pipe(...n){return dd(n)(this)}toPromise(n){return n=Mg(n),new n((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function Mg(e){var t;return(t=e!=null?e:hn.Promise)!==null&&t!==void 0?t:Promise}function Xb(e){return e&&H(e.next)&&H(e.error)&&H(e.complete)}function Jb(e){return e&&e instanceof Qr||Xb(e)&&ja(e)}function fd(e){return H(e==null?void 0:e.lift)}function j(e){return t=>{if(fd(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function P(e,t,n,r,i){return new hd(e,t,n,r,i)}var hd=class extends Qr{constructor(t,n,r,i,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=n?function(a){try{n(a)}catch(c){t.error(c)}}:super._next,this._error=i?function(a){try{i(a)}catch(c){t.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:n}=this;super.unsubscribe(),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function zi(){return j((e,t)=>{let n=null;e._refCount++;let r=P(t,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount){n=null;return}let i=e._connection,o=n;n=null,i&&(!o||i===o)&&i.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}var Gi=class extends N{constructor(t,n){super(),this.source=t,this.subjectFactory=n,this._subject=null,this._refCount=0,this._connection=null,fd(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t==null||t.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new rt;let n=this.getSubject();t.add(this.source.subscribe(P(n,void 0,()=>{this._teardown(),n.complete()},r=>{this._teardown(),n.error(r)},()=>this._teardown()))),t.closed&&(this._connection=null,t=rt.EMPTY)}return t}refCount(){return zi()(this)}};var Tg=Ui(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Te=(()=>{class e extends N{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(n){let r=new Ba(this,this);return r.operator=n,r}_throwIfClosed(){if(this.closed)throw new Tg}next(n){Hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let r of this.currentObservers)r.next(n)}})}error(n){Hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=n;let{observers:r}=this;for(;r.length;)r.shift().error(n)}})}complete(){Hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:n}=this;for(;n.length;)n.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0}_trySubscribe(n){return this._throwIfClosed(),super._trySubscribe(n)}_subscribe(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)}_innerSubscribe(n){let{hasError:r,isStopped:i,observers:o}=this;return r||i?sd:(this.currentObservers=null,o.push(n),new rt(()=>{this.currentObservers=null,Zr(o,n)}))}_checkFinalizedStatuses(n){let{hasError:r,thrownError:i,isStopped:o}=this;r?n.error(i):o&&n.complete()}asObservable(){let n=new N;return n.source=this,n}}return e.create=(t,n)=>new Ba(t,n),e})(),Ba=class extends Te{constructor(t,n){super(),this.destination=t,this.source=n}next(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.next)===null||r===void 0||r.call(n,t)}error(t){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.error)===null||r===void 0||r.call(n,t)}complete(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)}_subscribe(t){var n,r;return(r=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&r!==void 0?r:sd}};var We=class extends Te{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let n=super._subscribe(t);return!n.closed&&t.next(this._value),n}getValue(){let{hasError:t,thrownError:n,_value:r}=this;if(t)throw n;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}};var Qo={now(){return(Qo.delegate||Date).now()},delegate:void 0};var er=class extends Te{constructor(t=1/0,n=1/0,r=Qo){super(),this._bufferSize=t,this._windowTime=n,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=n===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,n)}next(t){let{isStopped:n,_buffer:r,_infiniteTimeWindow:i,_timestampProvider:o,_windowTime:s}=this;n||(r.push(t),!i&&r.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let n=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:i}=this,o=i.slice();for(let s=0;se.complete());function Ga(e){return e&&H(e.schedule)}function pd(e){return e[e.length-1]}function qi(e){return H(pd(e))?e.pop():void 0}function Sn(e){return Ga(pd(e))?e.pop():void 0}function Og(e,t){return typeof pd(e)=="number"?e.pop():t}function Ng(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,n,o):s(t,n))||o);return i>3&&o&&Object.defineProperty(t,n,o),o}function qa(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function xg(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ei(e){return this instanceof ei?(this.v=e,this):new ei(e)}function Pg(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(f){r[f]&&(i[f]=function(p){return new Promise(function(g,_){o.push([f,p,g,_])>1||a(f,p)})})}function a(f,p){try{c(r[f](p))}catch(g){d(o[0][3],g)}}function c(f){f.value instanceof ei?Promise.resolve(f.value.v).then(u,l):d(o[0][2],f)}function u(f){a("next",f)}function l(f){a("throw",f)}function d(f,p){f(p),o.shift(),o.length&&a(o[0][0],o[0][1])}}function Rg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof xg=="function"?xg(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}var Yi=e=>e&&typeof e.length=="number"&&typeof e!="function";function Ya(e){return H(e==null?void 0:e.then)}function Za(e){return H(e[$i])}function Ka(e){return Symbol.asyncIterator&&H(e==null?void 0:e[Symbol.asyncIterator])}function Qa(e){return new TypeError("You provided ".concat(e!==null&&typeof e=="object"?"an invalid object":"'".concat(e,"'")," where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable."))}function eC(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Xa=eC();function Ja(e){return H(e==null?void 0:e[Xa])}function ec(e){return Pg(this,arguments,function*(){let n=e.getReader();try{for(;;){let{value:r,done:i}=yield ei(n.read());if(i)return yield ei(void 0);yield yield ei(r)}}finally{n.releaseLock()}})}function tc(e){return H(e==null?void 0:e.getReader)}function Q(e){if(e instanceof N)return e;if(e!=null){if(Za(e))return tC(e);if(Yi(e))return nC(e);if(Ya(e))return rC(e);if(Ka(e))return Fg(e);if(Ja(e))return iC(e);if(tc(e))return oC(e)}throw Qa(e)}function tC(e){return new N(t=>{let n=e[$i]();if(H(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function nC(e){return new N(t=>{for(let n=0;n{e.then(n=>{t.closed||(t.next(n),t.complete())},n=>t.error(n)).then(null,Va)})}function iC(e){return new N(t=>{for(let n of e)if(t.next(n),t.closed)return;t.complete()})}function Fg(e){return new N(t=>{sC(e,t).catch(n=>t.error(n))})}function oC(e){return Fg(ec(e))}function sC(e,t){var n,r,i,o;return qa(this,void 0,void 0,function*(){try{for(n=Rg(e);r=yield n.next(),!r.done;){let s=r.value;if(t.next(s),t.closed)return}}catch(s){i={error:s}}finally{try{r&&!r.done&&(o=n.return)&&(yield o.call(n))}finally{if(i)throw i.error}}t.complete()})}function jt(e,t,n,r=0,i=!1){let o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function nc(e,t=0){return j((n,r)=>{n.subscribe(P(r,i=>jt(r,e,()=>r.next(i),t),()=>jt(r,e,()=>r.complete(),t),i=>jt(r,e,()=>r.error(i),t)))})}function rc(e,t=0){return j((n,r)=>{r.add(e.schedule(()=>n.subscribe(r),t))})}function Lg(e,t){return Q(e).pipe(rc(t),nc(t))}function kg(e,t){return Q(e).pipe(rc(t),nc(t))}function jg(e,t){return new N(n=>{let r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function Vg(e,t){return new N(n=>{let r;return jt(n,t,()=>{r=e[Xa](),jt(n,t,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(s){n.error(s);return}o?n.complete():n.next(i)},0,!0)}),()=>H(r==null?void 0:r.return)&&r.return()})}function ic(e,t){if(!e)throw new Error("Iterable cannot be null");return new N(n=>{jt(n,t,()=>{let r=e[Symbol.asyncIterator]();jt(n,t,()=>{r.next().then(i=>{i.done?n.complete():n.next(i.value)})},0,!0)})})}function Ug(e,t){return ic(ec(e),t)}function Bg(e,t){if(e!=null){if(Za(e))return Lg(e,t);if(Yi(e))return jg(e,t);if(Ya(e))return kg(e,t);if(Ka(e))return ic(e,t);if(Ja(e))return Vg(e,t);if(tc(e))return Ug(e,t)}throw Qa(e)}function Oe(e,t){return t?Bg(e,t):Q(e)}function M(...e){let t=Sn(e);return Oe(e,t)}function Zi(e,t){let n=H(e)?e:()=>e,r=i=>i.error(n());return new N(t?i=>t.schedule(r,0,i):r)}function ti(e){return!!e&&(e instanceof N||H(e.lift)&&H(e.subscribe))}var tr=Ui(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function Hg(e){return e instanceof Date&&!isNaN(e)}function w(e,t){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>{r.next(e.call(t,o,i++))}))})}var{isArray:aC}=Array;function cC(e,t){return aC(t)?e(...t):e(t)}function Ki(e){return w(t=>cC(e,t))}var{isArray:uC}=Array,{getPrototypeOf:lC,prototype:dC,keys:fC}=Object;function oc(e){if(e.length===1){let t=e[0];if(uC(t))return{args:t,keys:null};if(hC(t)){let n=fC(t);return{args:n.map(r=>t[r]),keys:n}}}return{args:e,keys:null}}function hC(e){return e&&typeof e=="object"&&lC(e)===dC}function sc(e,t){return e.reduce((n,r,i)=>(n[r]=t[i],n),{})}function ac(...e){let t=Sn(e),n=qi(e),{args:r,keys:i}=oc(e);if(r.length===0)return Oe([],t);let o=new N(pC(r,t,i?s=>sc(i,s):Qe));return n?o.pipe(Ki(n)):o}function pC(e,t,n=Qe){return r=>{$g(t,()=>{let{length:i}=e,o=new Array(i),s=i,a=i;for(let c=0;c{let u=Oe(e[c],t),l=!1;u.subscribe(P(r,d=>{o[c]=d,l||(l=!0,a--),a||r.next(n(o.slice()))},()=>{--s||r.complete()}))},r)},r)}}function $g(e,t,n){e?jt(n,e,t):t()}function zg(e,t,n,r,i,o,s,a){let c=[],u=0,l=0,d=!1,f=()=>{d&&!c.length&&!u&&t.complete()},p=_=>u{o&&t.next(_),u++;let T=!1;Q(n(_,l++)).subscribe(P(t,A=>{i==null||i(A),o?p(A):t.next(A)},()=>{T=!0},void 0,()=>{if(T)try{for(u--;c.length&&ug(A)):g(A)}f()}catch(A){t.error(A)}}))};return e.subscribe(P(t,p,()=>{d=!0,f()})),()=>{a==null||a()}}function Ze(e,t,n=1/0){return H(t)?Ze((r,i)=>w((o,s)=>t(r,o,i,s))(Q(e(r,i))),n):(typeof t=="number"&&(n=t),j((r,i)=>zg(r,i,e,n)))}function Jo(e=1/0){return Ze(Qe,e)}function Gg(){return Jo(1)}function Vt(...e){return Gg()(Oe(e,Sn(e)))}function Mn(e){return new N(t=>{Q(e()).subscribe(t)})}function md(...e){let t=qi(e),{args:n,keys:r}=oc(e),i=new N(o=>{let{length:s}=n;if(!s){o.complete();return}let a=new Array(s),c=s,u=s;for(let l=0;l{d||(d=!0,u--),a[l]=f},()=>c--,void 0,()=>{(!c||!d)&&(u||o.next(r?sc(r,a):a),o.complete())}))}});return t?i.pipe(Ki(t)):i}var mC=["addListener","removeListener"],gC=["addEventListener","removeEventListener"],vC=["on","off"];function Tn(e,t,n,r){if(H(n)&&(r=n,n=void 0),r)return Tn(e,t,n).pipe(Ki(r));let[i,o]=DC(e)?gC.map(s=>a=>e[s](t,a,n)):yC(e)?mC.map(Wg(e,t)):_C(e)?vC.map(Wg(e,t)):[];if(!i&&Yi(e))return Ze(s=>Tn(s,t,n))(Q(e));if(!i)throw new TypeError("Invalid event target");return new N(s=>{let a=(...c)=>s.next(1o(a)})}function Wg(e,t){return n=>r=>e[n](t,r)}function yC(e){return H(e.addListener)&&H(e.removeListener)}function _C(e){return H(e.on)&&H(e.off)}function DC(e){return H(e.addEventListener)&&H(e.removeEventListener)}function ht(e=0,t,n=Ag){let r=-1;return t!=null&&(Ga(t)?n=t:r=t),new N(i=>{let o=Hg(e)?+e-n.now():e;o<0&&(o=0);let s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function xe(...e){let t=Sn(e),n=Og(e,1/0),r=e;return r.length?r.length===1?Q(r[0]):Jo(n)(Oe(r,t)):Ae}var EC=new N(Gt);var{isArray:wC}=Array;function qg(e){return e.length===1&&wC(e[0])?e[0]:e}function ye(e,t){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>e.call(t,o,i++)&&r.next(o)))})}function gd(...e){return e=qg(e),e.length===1?Q(e[0]):new N(bC(e))}function bC(e){return t=>{let n=[];for(let r=0;n&&!t.closed&&r{if(n){for(let o=0;o{let r=null,i=!1,o;r=t.subscribe(P(n,void 0,void 0,s=>{o=Q(e(s,pn(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Yg(e,t,n,r,i){return(o,s)=>{let a=n,c=t,u=0;o.subscribe(P(s,l=>{let d=u++;c=a?e(c,l,d):(a=!0,l),r&&s.next(c)},i&&(()=>{a&&s.next(c),s.complete()})))}}function ni(e,t){return H(t)?Ze(e,t,1):Ze(e,1)}function CC(e){return j((t,n)=>{let r=!1,i=null,o=null,s=()=>{if(o==null||o.unsubscribe(),o=null,r){r=!1;let a=i;i=null,n.next(a)}};t.subscribe(P(n,a=>{o==null||o.unsubscribe(),r=!0,i=a,o=P(n,s,Gt),Q(e(a)).subscribe(o)},()=>{s(),n.complete()},void 0,()=>{i=o=null}))})}function Zg(e,t=Jr){return j((n,r)=>{let i=null,o=null,s=null,a=()=>{if(i){i.unsubscribe(),i=null;let u=o;o=null,r.next(u)}};function c(){let u=s+e,l=t.now();if(l{o=u,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},()=>{a(),r.complete()},void 0,()=>{o=i=null}))})}function Er(e){return j((t,n)=>{let r=!1;t.subscribe(P(n,i=>{r=!0,n.next(i)},()=>{r||n.next(e),n.complete()}))})}function Ke(e){return e<=0?()=>Ae:j((t,n)=>{let r=0;t.subscribe(P(n,i=>{++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Qi(){return j((e,t)=>{e.subscribe(P(t,Gt))})}function es(e){return w(()=>e)}function vd(e,t){return t?n=>Vt(t.pipe(Ke(1),Qi()),n.pipe(vd(e))):Ze((n,r)=>Q(e(n,r)).pipe(Ke(1),es(n)))}function ts(e,t=Jr){let n=ht(e,t);return vd(()=>n)}function Ue(e,t=Qe){return e=e!=null?e:IC,j((n,r)=>{let i,o=!0;n.subscribe(P(r,s=>{let a=t(s);(o||!e(i,a))&&(o=!1,i=a,r.next(s))}))})}function IC(e,t){return e===t}function cc(e=SC){return j((t,n)=>{let r=!1;t.subscribe(P(n,i=>{r=!0,n.next(i)},()=>r?n.complete():n.error(e())))})}function SC(){return new tr}function ns(...e){return t=>Vt(t,M(...e))}function wr(e){return j((t,n)=>{try{t.subscribe(n)}finally{n.add(e)}})}function mn(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((i,o)=>e(i,o,r)):Qe,Ke(1),n?Er(t):cc(()=>new tr))}function Xi(e){return e<=0?()=>Ae:j((t,n)=>{let r=[];t.subscribe(P(n,i=>{r.push(i),e{for(let i of r)n.next(i);n.complete()},void 0,()=>{r=null}))})}function yd(e,t){let n=arguments.length>=2;return r=>r.pipe(e?ye((i,o)=>e(i,o,r)):Qe,Xi(1),n?Er(t):cc(()=>new tr))}function uc(e){let t=1/0,n;return e!=null&&(typeof e=="object"?{count:t=1/0,delay:n}=e:t=e),t<=0?()=>Ae:j((r,i)=>{let o=0,s,a=()=>{if(s==null||s.unsubscribe(),s=null,n!=null){let u=typeof n=="number"?ht(n):Q(n(o)),l=P(i,()=>{l.unsubscribe(),c()});u.subscribe(l)}else c()},c=()=>{let u=!1;s=r.subscribe(P(i,void 0,()=>{++o{let r,i=!1,o,s=!1,a=!1,c=()=>a&&s&&(n.complete(),!0),u=()=>(o||(o=new Te,Q(e(o)).subscribe(P(n,()=>{r?l():i=!0},()=>{s=!0,c()}))),o),l=()=>{a=!1,r=t.subscribe(P(n,void 0,()=>{a=!0,!c()&&u().next()})),i&&(r.unsubscribe(),r=null,i=!1,l())};l()})}function lc(e,t){return j(Yg(e,t,arguments.length>=2,!0))}function vt(e={}){let{connector:t=()=>new Te,resetOnError:n=!0,resetOnComplete:r=!0,resetOnRefCountZero:i=!0}=e;return o=>{let s,a,c,u=0,l=!1,d=!1,f=()=>{a==null||a.unsubscribe(),a=void 0},p=()=>{f(),s=c=void 0,l=d=!1},g=()=>{let _=s;p(),_==null||_.unsubscribe()};return j((_,T)=>{u++,!d&&!l&&f();let A=c=c!=null?c:t();T.add(()=>{u--,u===0&&!d&&!l&&(a=Dd(g,i))}),A.subscribe(T),!s&&u>0&&(s=new Jn({next:q=>A.next(q),error:q=>{d=!0,f(),a=Dd(p,n,q),A.error(q)},complete:()=>{l=!0,f(),a=Dd(p,r),A.complete()}}),Q(_).subscribe(s))})(o)}}function Dd(e,t,...n){if(t===!0){e();return}if(t===!1)return;let r=new Jn({next:()=>{r.unsubscribe(),e()}});return Q(t(...n)).subscribe(r)}function Wt(e,t,n){let r,i=!1;return e&&typeof e=="object"?{bufferSize:r=1/0,windowTime:t=1/0,refCount:i=!1,scheduler:n}=e:r=e!=null?e:1/0,vt({connector:()=>new er(r,t,n),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Ed(e){return ye((t,n)=>e<=n)}function wd(e){return j((t,n)=>{let r=!1,i=0;t.subscribe(P(n,o=>(r||(r=!e(o,i++)))&&n.next(o)))})}function _e(...e){let t=Sn(e);return j((n,r)=>{(t?Vt(e,n,t):Vt(e,n)).subscribe(r)})}function ee(e,t){return j((n,r)=>{let i=null,o=0,s=!1,a=()=>s&&!i&&r.complete();n.subscribe(P(r,c=>{i==null||i.unsubscribe();let u=0,l=o++;Q(e(c,l)).subscribe(i=P(r,d=>r.next(t?t(c,d,l,u++):d),()=>{i=null,a()}))},()=>{s=!0,a()}))})}function be(e){return j((t,n)=>{Q(e).subscribe(P(n,()=>n.complete(),Gt)),!n.closed&&t.subscribe(n)})}function dc(e,t=!1){return j((n,r)=>{let i=0;n.subscribe(P(r,o=>{let s=e(o,i++);(s||t)&&r.next(o),!s&&r.complete()}))})}function Ne(e,t,n){let r=H(e)||t||n?{next:e,error:t,complete:n}:e;return r?j((i,o)=>{var s;(s=r.subscribe)===null||s===void 0||s.call(r);let a=!0;i.subscribe(P(o,c=>{var u;(u=r.next)===null||u===void 0||u.call(r,c),o.next(c)},()=>{var c;a=!1,(c=r.complete)===null||c===void 0||c.call(r),o.complete()},c=>{var u;a=!1,(u=r.error)===null||u===void 0||u.call(r,c),o.error(c)},()=>{var c,u;a&&((c=r.unsubscribe)===null||c===void 0||c.call(r)),(u=r.finalize)===null||u===void 0||u.call(r)}))}):Qe}function Kg(e,t){return j((n,r)=>{let{leading:i=!0,trailing:o=!1}=t!=null?t:{},s=!1,a=null,c=null,u=!1,l=()=>{c==null||c.unsubscribe(),c=null,o&&(p(),u&&r.complete())},d=()=>{c=null,u&&r.complete()},f=g=>c=Q(e(g)).subscribe(P(r,l,d)),p=()=>{if(s){s=!1;let g=a;a=null,r.next(g),!u&&f(g)}};n.subscribe(P(r,g=>{s=!0,a=g,!(c&&!c.closed)&&(i?p():f(g))},()=>{u=!0,!(o&&s&&c&&!c.closed)&&r.complete()}))})}function br(e,t=Jr,n){let r=ht(e,t);return Kg(()=>r,n)}function rs(...e){let t=qi(e);return j((n,r)=>{let i=e.length,o=new Array(i),s=e.map(()=>!1),a=!1;for(let c=0;c{o[c]=u,!a&&!s[c]&&(s[c]=!0,(a=s.every(Qe))&&(s=null))},Gt));n.subscribe(P(r,c=>{if(a){let u=[c,...o];r.next(t?t(...u):u)}}))})}function Re(e){for(let t in e)if(e[t]===Re)return t;throw Error("Could not find renamed property on target object.")}function fc(e,t){for(let n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function wt(e){if(typeof e=="string")return e;if(Array.isArray(e))return"["+e.map(wt).join(", ")+"]";if(e==null)return""+e;if(e.overriddenName)return"".concat(e.overriddenName);if(e.name)return"".concat(e.name);let t=e.toString();if(t==null)return""+t;let n=t.indexOf("\n");return n===-1?t:t.substring(0,n)}function Qg(e,t){return e==null||e===""?t===null?"":t:t==null||t===""?e:e+" "+t}var MC=Re({__forward_ref__:Re});function dr(e){return e.__forward_ref__=dr,e.toString=function(){return wt(this())},e}function xt(e){return jv(e)?e():e}function jv(e){return typeof e=="function"&&e.hasOwnProperty(MC)&&e.__forward_ref__===dr}function Vv(e){return e&&!!e.\u0275providers}var Uv="https://g.co/ng/security#xss",b=class extends Error{constructor(t,n){super(Kc(t,n)),this.code=t}};function Kc(e,t){let n="NG0".concat(Math.abs(e));return"".concat(n).concat(t?": "+t:"")}var TC=Re({\u0275cmp:Re}),AC=Re({\u0275dir:Re}),OC=Re({\u0275pipe:Re}),xC=Re({\u0275mod:Re}),Mc=Re({\u0275fac:Re}),is=Re({__NG_ELEMENT_ID__:Re}),Xg=Re({__NG_ENV_ID__:Re});function vs(e){return typeof e=="string"?e:e==null?"":String(e)}function NC(e){return typeof e=="function"?e.name||e.toString():typeof e=="object"&&e!=null&&typeof e.type=="function"?e.type.name||e.type.toString():vs(e)}function PC(e,t){let n=t?". Dependency path: ".concat(t.join(" > ")," > ").concat(e):"";throw new b(-200,"Circular dependency in DI detected for ".concat(e).concat(n))}function Lf(e,t){let n=t?" in ".concat(t):"";throw new b(-201,!1)}function RC(e,t){e==null&&FC(t,e,null,"!=")}function FC(e,t,n,r){throw new Error("ASSERTION ERROR: ".concat(e)+(r==null?"":" [Expected=> ".concat(n," ").concat(r," ").concat(t," <=Actual]")))}function S(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Z(e){return{providers:e.providers||[],imports:e.imports||[]}}function Qc(e){return Jg(e,Hv)||Jg(e,$v)}function Bv(e){return Qc(e)!==null}function Jg(e,t){return e.hasOwnProperty(t)?e[t]:null}function LC(e){let t=e&&(e[Hv]||e[$v]);return t||null}function ev(e){return e&&(e.hasOwnProperty(tv)||e.hasOwnProperty(kC))?e[tv]:null}var Hv=Re({\u0275prov:Re}),tv=Re({\u0275inj:Re}),$v=Re({ngInjectableDef:Re}),kC=Re({ngInjectorDef:Re}),se=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(se||{}),Ud;function jC(){return Ud}function Ut(e){let t=Ud;return Ud=e,t}function zv(e,t,n){let r=Qc(e);if(r&&r.providedIn=="root")return r.value===void 0?r.value=r.factory():r.value;if(n&se.Optional)return null;if(t!==void 0)return t;Lf(wt(e),"Injector")}var nr=globalThis;var D=class{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof n=="number"?this.__NG_ELEMENT_ID__=n:n!==void 0&&(this.\u0275prov=S({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return"InjectionToken ".concat(this._desc)}};var VC={},as=VC,Bd="__NG_DI_FLAG__",Tc="ngTempTokenPath",UC="ngTokenPath",BC=/\n/gm,HC="\u0275",nv="__source",os;function Ir(e){let t=os;return os=e,t}function $C(e,t=se.Default){if(os===void 0)throw new b(-203,!1);return os===null?zv(e,void 0,t):os.get(e,t&se.Optional?null:void 0,t)}function I(e,t=se.Default){return(jC()||$C)(xt(e),t)}function v(e,t=se.Default){return I(e,Xc(t))}function Xc(e){return typeof e>"u"||typeof e=="number"?e:0|(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Hd(e){let t=[];for(let n=0;n ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):wt(a)))}i="{".concat(o.join(", "),"}")}return"".concat(n).concat(r?"("+r+")":"","[").concat(i,"]: ").concat(e.replace(BC,"\n "))}function ys(e){return{toString:e}.toString()}var Gv=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(Gv||{}),Pn=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(Pn||{}),ro={},qt=[];function Wv(e,t,n){let r=e.length;for(;;){let i=e.indexOf(t,n);if(i===-1)return i;if(i===0||e.charCodeAt(i-1)<=32){let o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}function $d(e,t,n){let r=0;for(;rt){s=o-1;break}}}for(;oo?f="":f=i[d+1].toLowerCase();let p=r&8?f:null;if(p&&Wv(p,u,0)!==-1||r&2&&u!==f){if(gn(r))return!1;s=!0}}}}return gn(r)||s}function gn(e){return(e&1)===0}function XC(e,t,n,r){if(t===null)return-1;let i=0;if(r||!n){let o=!1;for(;i-1)for(n++;n0?'="'+a+'"':"")+"]"}else r&8?i+="."+s:r&4&&(i+=" "+s);else i!==""&&!gn(s)&&(t+=iv(o,i),i=""),r=s,o=o||!gn(r);n++}return i!==""&&(t+=iv(o,i)),t}function iI(e){return e.map(rI).join(",")}function oI(e){let t=[],n=[],r=1,i=2;for(;r{var i;let t=ey(e),n=Ve(R({},t),{decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Gv.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:(i=e.signals)!=null?i:!1,data:e.data||{},encapsulation:e.encapsulation||Pn.Emulated,styles:e.styles||qt,_:null,schemas:e.schemas||null,tView:null,id:""});ty(n);let r=e.dependencies;return n.directiveDefs=sv(r,!1),n.pipeDefs=sv(r,!0),n.id=cI(n),n})}function sI(e){return ii(e)||Kv(e)}function aI(e){return e!==null}function K(e){return ys(()=>({type:e.type,bootstrap:e.bootstrap||qt,declarations:e.declarations||qt,imports:e.imports||qt,exports:e.exports||qt,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function ov(e,t){if(e==null)return ro;let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],o=i;Array.isArray(i)&&(o=i[1],i=i[0]),n[i]=r,t&&(t[i]=o)}return n}function $(e){return ys(()=>{let t=ey(e);return ty(t),t})}function pi(e){return{type:e.type,name:e.name,factory:null,pure:e.pure!==!1,standalone:e.standalone===!0,onDestroy:e.type.prototype.ngOnDestroy||null}}function ii(e){return e[TC]||null}function Kv(e){return e[AC]||null}function Qv(e){return e[OC]||null}function Xv(e){let t=ii(e)||Kv(e)||Qv(e);return t!==null?t.standalone:!1}function Jv(e,t){let n=e[xC]||null;if(!n&&t===!0)throw new Error("Type ".concat(wt(e)," does not have '\u0275mod' property."));return n}function ey(e){let t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||ro,exportAs:e.exportAs||null,standalone:e.standalone===!0,signals:e.signals===!0,selectors:e.selectors||qt,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:ov(e.inputs,t),outputs:ov(e.outputs),debugInfo:null}}function ty(e){var t;(t=e.features)==null||t.forEach(n=>n(e))}function sv(e,t){if(!e)return null;let n=t?Qv:sI;return()=>(typeof e=="function"?e():e).map(r=>n(r)).filter(aI)}function cI(e){let t=0,n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(let i of n)t=Math.imul(31,t)+i.charCodeAt(0)<<0;return t+=2147483647+1,"c"+t}var Ht=0,te=1,Y=2,tt=3,vn=4,Zt=5,rr=6,us=7,nn=8,io=9,oo=10,He=11,ls=12,av=13,fo=14,Yt=15,_s=16,Ji=17,xn=18,Jc=19,ny=20,ss=21,bd=22,oi=23,it=25,jf=1,ds=6,ir=7,Ac=8,so=9,Bt=10,ao=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e[e.HasChildViewsToRefresh=4]="HasChildViewsToRefresh",e}(ao||{});function Nn(e){return Array.isArray(e)&&typeof e[jf]=="object"}function rn(e){return Array.isArray(e)&&e[jf]===!0}function Vf(e){return(e.flags&4)!==0}function Ds(e){return e.componentOffset>-1}function eu(e){return(e.flags&1)===1}function or(e){return!!e.template}function ry(e){return(e[Y]&512)!==0}function si(e,t){let n=e.hasOwnProperty(Mc);return n?e[Mc]:null}var zd=class{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}};function sn(){return iy}function iy(e){return e.type.prototype.ngOnChanges&&(e.setInput=lI),uI}sn.ngInherit=!0;function uI(){let e=sy(this),t=e==null?void 0:e.current;if(t){let n=e.previous;if(n===ro)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function lI(e,t,n,r){let i=this.declaredInputs[n],o=sy(e)||dI(e,{previous:ro,current:null}),s=o.current||(o.current={}),a=o.previous,c=a[i];s[i]=new zd(c&&c.currentValue,t,a===ro),e[r]=t}var oy="__ngSimpleChanges__";function sy(e){return e[oy]||null}function dI(e,t){return e[oy]=t}var cv=null;var An=function(e,t,n){cv!=null&&cv(e,t,n)},ay="svg",fI="math";function yn(e){for(;Array.isArray(e);)e=e[Ht];return e}function hI(e){for(;Array.isArray(e);){if(typeof e[jf]=="object")return e;e=e[Ht]}return null}function cy(e,t){return yn(t[e])}function Kt(e,t){return yn(t[e.index])}function uy(e,t){return e.data[t]}function tu(e,t){return e[t]}function Mr(e,t){let n=t[e];return Nn(n)?n:n[Ht]}function pI(e){return(e[Y]&4)===4}function Uf(e){return(e[Y]&128)===128}function mI(e){return rn(e[tt])}function co(e,t){return t==null?null:e[t]}function ly(e){e[Ji]=0}function gI(e){e[Y]&1024||(e[Y]|=1024,Uf(e)&&nu(e))}function vI(e,t){for(;e>0;)t=t[fo],e--;return t}function dy(e){var t;return e[Y]&9216||((t=e[oi])==null?void 0:t.dirty)}function fy(e){dy(e)&&nu(e)}function nu(e){let t=e[tt];for(;t!==null&&!(rn(t)&&t[Y]&ao.HasChildViewsToRefresh||Nn(t)&&t[Y]&8192);){if(rn(t))t[Y]|=ao.HasChildViewsToRefresh;else if(t[Y]|=8192,!Uf(t))break;t=t[tt]}}function yI(e,t){if((e[Y]&256)===256)throw new b(911,!1);e[ss]===null&&(e[ss]=[]),e[ss].push(t)}var ne={lFrame:_y(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function _I(){return ne.lFrame.elementDepthCount}function DI(){ne.lFrame.elementDepthCount++}function EI(){ne.lFrame.elementDepthCount--}function hy(){return ne.bindingsEnabled}function ho(){return ne.skipHydrationRootTNode!==null}function wI(e){return ne.skipHydrationRootTNode===e}function bI(e){ne.skipHydrationRootTNode=e}function CI(){ne.skipHydrationRootTNode=null}function fe(){return ne.lFrame.lView}function ot(){return ne.lFrame.tView}function Rn(e){return ne.lFrame.contextLView=e,e[nn]}function Fn(e){return ne.lFrame.contextLView=null,e}function $t(){let e=py();for(;e!==null&&e.type===64;)e=e.parent;return e}function py(){return ne.lFrame.currentTNode}function II(){let e=ne.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}function mi(e,t){let n=ne.lFrame;n.currentTNode=e,n.isParent=t}function Bf(){return ne.lFrame.isParent}function Hf(){ne.lFrame.isParent=!1}function SI(){return ne.lFrame.contextLView}function Es(){let e=ne.lFrame,t=e.bindingRootIndex;return t===-1&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function MI(e){return ne.lFrame.bindingIndex=e}function ws(){return ne.lFrame.bindingIndex++}function TI(e){let t=ne.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function AI(){return ne.lFrame.inI18n}function OI(e,t){let n=ne.lFrame;n.bindingIndex=n.bindingRootIndex=e,Gd(t)}function xI(){return ne.lFrame.currentDirectiveIndex}function Gd(e){ne.lFrame.currentDirectiveIndex=e}function my(e){let t=ne.lFrame.currentDirectiveIndex;return t===-1?null:e[t]}function gy(){return ne.lFrame.currentQueryIndex}function $f(e){ne.lFrame.currentQueryIndex=e}function NI(e){let t=e[te];return t.type===2?t.declTNode:t.type===1?e[Zt]:null}function vy(e,t,n){if(n&se.SkipSelf){let i=t,o=e;for(;i=i.parent,i===null&&!(n&se.Host);)if(i=NI(o),i===null||(o=o[fo],i.type&10))break;if(i===null)return!1;t=i,e=o}let r=ne.lFrame=yy();return r.currentTNode=t,r.lView=e,!0}function zf(e){let t=yy(),n=e[te];ne.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function yy(){let e=ne.lFrame,t=e===null?null:e.child;return t===null?_y(e):t}function _y(e){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return e!==null&&(e.child=t),t}function Dy(){let e=ne.lFrame;return ne.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}var Ey=Dy;function Gf(){let e=Dy();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function PI(e){return(ne.lFrame.contextLView=vI(e,ne.lFrame.contextLView))[nn]}function po(){return ne.lFrame.selectedIndex}function ai(e){ne.lFrame.selectedIndex=e}function ru(){let e=ne.lFrame;return uy(e.tView,e.selectedIndex)}function bs(){ne.lFrame.currentNamespace=ay}function wy(){RI()}function RI(){ne.lFrame.currentNamespace=null}function by(){return ne.lFrame.currentNamespace}var Cy=!0;function iu(){return Cy}function Tr(e){Cy=e}function FI(e,t,n){var s,a,c,u,l;let{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){let d=iy(t);((s=n.preOrderHooks)!=null?s:n.preOrderHooks=[]).push(e,d),((a=n.preOrderCheckHooks)!=null?a:n.preOrderCheckHooks=[]).push(e,d)}i&&((c=n.preOrderHooks)!=null?c:n.preOrderHooks=[]).push(0-e,i),o&&(((u=n.preOrderHooks)!=null?u:n.preOrderHooks=[]).push(e,o),((l=n.preOrderCheckHooks)!=null?l:n.preOrderCheckHooks=[]).push(e,o))}function ou(e,t){var n,r,i,o,s,a,c;for(let u=t.directiveStart,l=t.directiveEnd;u=r)break}else t[c]<0&&(e[Ji]+=65536),(a>14>16&&(e[Y]&3)===t&&(e[Y]+=16384,uv(a,o)):uv(a,o)}var no=-1,ci=class{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}};function kI(e){return e instanceof ci}function jI(e){return(e.flags&8)!==0}function VI(e){return(e.flags&16)!==0}function Sy(e){return e!==no}function Oc(e){let t=e&32767;return e&32767}function UI(e){return e>>16}function xc(e,t){let n=UI(e),r=t;for(;n>0;)r=r[fo],n--;return r}var Wd=!0;function Nc(e){let t=Wd;return Wd=e,t}var BI=256,My=BI-1,Ty=5,HI=0,On={};function $I(e,t,n){let r;typeof n=="string"?r=n.charCodeAt(0)||0:n.hasOwnProperty(is)&&(r=n[is]),r==null&&(r=n[is]=HI++);let i=r&My,o=1<>Ty)]|=o}function Pc(e,t){let n=Ay(e,t);if(n!==-1)return n;let r=t[te];r.firstCreatePass&&(e.injectorIndex=t.length,Id(r.data,e),Id(t,null),Id(r.blueprint,null));let i=Wf(e,t),o=e.injectorIndex;if(Sy(i)){let s=Oc(i),a=xc(i,t),c=a[te].data;for(let u=0;u<8;u++)t[o+u]=a[s+u]|c[s+u]}return t[o+8]=i,o}function Id(e,t){e.push(0,0,0,0,0,0,0,0,t)}function Ay(e,t){return e.injectorIndex===-1||e.parent&&e.parent.injectorIndex===e.injectorIndex||t[e.injectorIndex+8]===null?-1:e.injectorIndex}function Wf(e,t){if(e.parent&&e.parent.injectorIndex!==-1)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;i!==null;){if(r=Ry(i),r===null)return no;if(n++,i=i[fo],r.injectorIndex!==-1)return r.injectorIndex|n<<16}return no}function qd(e,t,n){$I(e,t,n)}function Oy(e,t,n){if(n&se.Optional||e!==void 0)return e;Lf(t,"NodeInjector")}function xy(e,t,n,r){if(n&se.Optional&&r===void 0&&(r=null),!(n&(se.Self|se.Host))){let i=e[io],o=Ut(void 0);try{return i?i.get(t,r,n&se.Optional):zv(t,r,n&se.Optional)}finally{Ut(o)}}return Oy(r,t,n)}function Ny(e,t,n,r=se.Default,i){if(e!==null){if(t[Y]&2048&&!(r&se.Self)){let s=qI(e,t,n,r,On);if(s!==On)return s}let o=Py(e,t,n,r,On);if(o!==On)return o}return xy(t,n,r,i)}function Py(e,t,n,r,i){let o=GI(n);if(typeof o=="function"){if(!vy(t,e,r))return r&se.Host?Oy(i,n,r):xy(t,n,r,i);try{let s;if(s=o(r),s==null&&!(r&se.Optional))Lf(n);else return s}finally{Ey()}}else if(typeof o=="number"){let s=null,a=Ay(e,t),c=no,u=r&se.Host?t[Yt][Zt]:null;for((a===-1||r&se.SkipSelf)&&(c=a===-1?Wf(e,t):t[a+8],c===no||!dv(r,!1)?a=-1:(s=t[te],a=Oc(c),t=xc(c,t)));a!==-1;){let l=t[te];if(lv(o,a,l.data)){let d=zI(a,t,n,s,r,u);if(d!==On)return d}c=t[a+8],c!==no&&dv(r,t[te].data[a+8]===u)&&lv(o,a,t)?(s=l,a=Oc(c),t=xc(c,t)):a=-1}}return i}function zI(e,t,n,r,i,o){let s=t[te],a=s.data[e+8],c=r==null?Ds(a)&&Wd:r!=s&&(a.type&3)!==0,u=i&se.Host&&o===a,l=bc(a,s,n,c,u);return l!==null?ui(t,s,l,a):On}function bc(e,t,n,r,i){let o=e.providerIndexes,s=t.data,a=o&1048575,c=e.directiveStart,u=e.directiveEnd,l=o>>20,d=r?a:a+l,f=i?a+l:u;for(let p=d;p=c&&g.type===n)return p}if(i){let p=s[c];if(p&&or(p)&&p.type===n)return c}return null}function ui(e,t,n,r){let i=e[n],o=t.data;if(kI(i)){let s=i;s.resolving&&PC(NC(o[n]));let a=Nc(s.canSeeViewProviders);s.resolving=!0;let c,u=s.injectImpl?Ut(s.injectImpl):null,l=vy(e,r,se.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&FI(n,o[n],t)}finally{u!==null&&Ut(u),Nc(a),s.resolving=!1,Ey()}}return i}function GI(e){if(typeof e=="string")return e.charCodeAt(0)||0;let t=e.hasOwnProperty(is)?e[is]:void 0;return typeof t=="number"?t>=0?t&My:WI:t}function lv(e,t,n){let r=1<>Ty)]&r)}function dv(e,t){return!(e&se.Self)&&!(e&se.Host&&t)}var ri=class{constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return Ny(this._tNode,this._lView,t,Xc(r),n)}};function WI(){return new ri($t(),fe())}function Fe(e){return ys(()=>{let t=e.prototype.constructor,n=t[Mc]||Yd(t),r=Object.prototype,i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){let o=i[Mc]||Yd(i);if(o&&o!==n)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function Yd(e){return jv(e)?()=>{let t=Yd(xt(e));return t&&t()}:si(e)}function qI(e,t,n,r,i){let o=e,s=t;for(;o!==null&&s!==null&&s[Y]&2048&&!(s[Y]&512);){let a=Py(o,s,n,r|se.Self,On);if(a!==On)return a;let c=o.parent;if(!c){let u=s[ny];if(u){let l=u.get(n,On,r);if(l!==On)return l}c=Ry(s),s=s[fo]}o=c}return i}function Ry(e){let t=e[te],n=t.type;return n===2?t.declTNode:n===1?e[Zt]:null}var hc="__parameters__";function YI(e){return function(...n){if(e){let r=e(...n);for(let i in r)this[i]=r[i]}}}function qf(e,t,n){return ys(()=>{let r=YI(t);function i(...o){if(this instanceof i)return r.apply(this,o),this;let s=new i(...o);return a.annotation=s,a;function a(c,u,l){let d=c.hasOwnProperty(hc)?c[hc]:Object.defineProperty(c,hc,{value:[]})[hc];for(;d.length<=l;)d.push(null);return(d[l]=d[l]||[]).push(s),c}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}function ZI(e){return typeof e=="function"}function KI(e,t,n){if(e.length!==t.length)return!1;for(let r=0;rArray.isArray(n)?Yf(n,t):t(n))}function Fy(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Rc(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Ly(e,t){let n=[];for(let r=0;rt;){let o=i-2;e[i]=e[o],i--}e[t]=n,e[t+1]=r}}function JI(e,t,n){let r=Cs(e,t);return r>=0?e[r|1]=n:(r=~r,XI(e,r,t,n)),r}function Sd(e,t){let n=Cs(e,t);if(n>=0)return e[n|1]}function Cs(e,t){return eS(e,t,1)}function eS(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){let o=r+(i-r>>1),s=e[o<t?i=o:r=o+1}return~(i<{n.push(s)};return Yf(t,s=>{let a=s;Zd(a,o,[],r)&&(i||(i=[]),i.push(a))}),i!==void 0&&Uy(i,o),n}function Uy(e,t){for(let n=0;n{t(o,r)})}}function Zd(e,t,n,r){if(e=xt(e),!e)return!1;let i=null,o=ev(e),s=!o&&ii(e);if(!o&&!s){let c=e.ngModule;if(o=ev(c),o)i=c;else return!1}else{if(s&&!s.standalone)return!1;i=e}let a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let u of c)Zd(u,t,n,r)}}else if(o){if(o.imports!=null&&!a){r.add(i);let u;try{Yf(o.imports,l=>{Zd(l,t,n,r)&&(u||(u=[]),u.push(l))})}finally{}u!==void 0&&Uy(u,t)}if(!a){let u=si(i)||(()=>new i);t({provide:i,useFactory:u,deps:qt},i),t({provide:jy,useValue:i,multi:!0},i),t({provide:mo,useValue:()=>I(i),multi:!0},i)}let c=o.providers;if(c!=null&&!a){let u=e;Zf(c,l=>{t(l,u)})}}else return!1;return i!==e&&e.providers!==void 0}function Zf(e,t){for(let n of e)Vv(n)&&(n=n.\u0275providers),Array.isArray(n)?Zf(n,t):t(n)}var nS=Re({provide:String,useValue:Re});function By(e){return e!==null&&typeof e=="object"&&nS in e}function rS(e){return!!(e&&e.useExisting)}function iS(e){return!!(e&&e.useFactory)}function uo(e){return typeof e=="function"}function oS(e){return!!e.useClass}var su=new D("Set Injector scope."),Cc={},sS={},Md;function Kf(){return Md===void 0&&(Md=new Fc),Md}var on=class{},fs=class extends on{get destroyed(){return this._destroyed}constructor(t,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Qd(t,s=>this.processProvider(s)),this.records.set(go,eo(void 0,this)),i.has("environment")&&this.records.set(on,eo(void 0,this));let o=this.records.get(su);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(jy,qt,se.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear()}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();let n=Ir(this),r=Ut(void 0),i;try{return t()}finally{Ir(n),Ut(r)}}get(t,n=as,r=se.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(Xg))return t[Xg](this);r=Xc(r);let i,o=Ir(this),s=Ut(void 0);try{if(!(r&se.SkipSelf)){let c=this.records.get(t);if(c===void 0){let u=dS(t)&&Qc(t);u&&this.injectableDefInScope(u)?c=eo(Kd(t),Cc):c=null,this.records.set(t,c)}if(c!=null)return this.hydrate(t,c)}let a=r&se.Self?Kf():this.parent;return n=r&se.Optional&&n===as?null:n,a.get(t,n)}catch(a){if(a.name==="NullInjectorError"){if((a[Tc]=a[Tc]||[]).unshift(wt(t)),o)throw a;return GC(a,t,"R3InjectorError",this.source)}else throw a}finally{Ut(s),Ir(o)}}resolveInjectorInitializers(){let t=Ir(this),n=Ut(void 0),r;try{let i=this.get(mo,qt,se.Self);for(let o of i)o()}finally{Ir(t),Ut(n)}}toString(){let t=[],n=this.records;for(let r of n.keys())t.push(wt(r));return"R3Injector[".concat(t.join(", "),"]")}assertNotDestroyed(){if(this._destroyed)throw new b(205,!1)}processProvider(t){t=xt(t);let n=uo(t)?t:xt(t&&t.provide),r=cS(t);if(!uo(t)&&t.multi===!0){let i=this.records.get(n);i||(i=eo(void 0,Cc,!0),i.factory=()=>Hd(i.multi),this.records.set(n,i)),n=t,i.multi.push(t)}else{let i=this.records.get(n)}this.records.set(n,r)}hydrate(t,n){return n.value===Cc&&(n.value=sS,n.value=n.factory()),typeof n.value=="object"&&n.value&&lS(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(t){if(!t.providedIn)return!1;let n=xt(t.providedIn);return typeof n=="string"?n==="any"||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){let n=this._onDestroyHooks.indexOf(t);n!==-1&&this._onDestroyHooks.splice(n,1)}};function Kd(e){let t=Qc(e),n=t!==null?t.factory:si(e);if(n!==null)return n;if(e instanceof D)throw new b(204,!1);if(e instanceof Function)return aS(e);throw new b(204,!1)}function aS(e){let t=e.length;if(t>0){let r=Ly(t,"?");throw new b(204,!1)}let n=LC(e);return n!==null?()=>n.factory(e):()=>new e}function cS(e){if(By(e))return eo(void 0,e.useValue);{let t=Hy(e);return eo(t,Cc)}}function Hy(e,t,n){let r;if(uo(e)){let i=xt(e);return si(i)||Kd(i)}else if(By(e))r=()=>xt(e.useValue);else if(iS(e))r=()=>e.useFactory(...Hd(e.deps||[]));else if(rS(e))r=()=>I(xt(e.useExisting));else{let i=xt(e&&(e.useClass||e.provide));if(uS(e))r=()=>new i(...Hd(e.deps));else return si(i)||Kd(i)}return r}function eo(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function uS(e){return!!e.deps}function lS(e){return e!==null&&typeof e=="object"&&typeof e.ngOnDestroy=="function"}function dS(e){return typeof e=="function"||typeof e=="object"&&e instanceof D}function Qd(e,t){for(let n of e)Array.isArray(n)?Qd(n,t):n&&Vv(n)?Qd(n.\u0275providers,t):t(n)}function Ar(e,t){e instanceof fs&&e.assertNotDestroyed();let n,r=Ir(e),i=Ut(void 0);try{return t()}finally{Ir(r),Ut(i)}}function fv(e,t=null,n=null,r){let i=$y(e,t,n,r);return i.resolveInjectorInitializers(),i}function $y(e,t=null,n=null,r,i=new Set){let o=[n||qt,tS(e)];return r=r||(typeof e=="object"?void 0:wt(e)),new fs(o,t||Kf(),r||null,i)}var bt=(()=>{let t=class t{static create(r,i){var o;if(Array.isArray(r))return fv({name:""},i,r,"");{let s=(o=r.name)!=null?o:"";return fv({name:s},r.parent,r.providers,s)}}};t.THROW_IF_NOT_FOUND=as,t.NULL=new Fc,t.\u0275prov=S({token:t,providedIn:"any",factory:()=>I(go)}),t.__NG_ELEMENT_ID__=-1;let e=t;return e})();var Xd;function zy(e){Xd=e}function Is(){if(Xd!==void 0)return Xd;if(typeof document<"u")return document;throw new b(210,!1)}var au=new D("AppId",{providedIn:"root",factory:()=>fS}),fS="ng",Qf=new D("Platform Initializer"),Qt=new D("Platform ID",{providedIn:"platform",factory:()=>"unknown"});var yz=new D("AnimationModuleType"),Xf=new D("CSP nonce",{providedIn:"root",factory:()=>{var e,t;return((t=(e=Is().body)==null?void 0:e.querySelector("[ngCspNonce]"))==null?void 0:t.getAttribute("ngCspNonce"))||null}});function _z(e){return e.ownerDocument.defaultView}function Dz(e){return e.ownerDocument}function hS(e){return e.ownerDocument.body}function Gy(e){return e instanceof Function?e():e}function pc(e){return(e!=null?e:v(bt)).get(Qt)==="browser"}var pS="ngSkipHydration",mS="ngskiphydration";function Wy(e){let t=e.mergedAttrs;if(t===null)return!1;for(let n=0;n|^->||--!>|)/g,_S="\u200B$1\u200B";function DS(e){return e.replace(vS,t=>t.replace(yS,_S))}var Yy=new Map,ES=0;function wS(){return ES++}function bS(e){Yy.set(e[Jc],e)}function CS(e){Yy.delete(e[Jc])}var hv="__ngContext__";function Sr(e,t){Nn(t)?(e[hv]=t[Jc],bS(t)):e[hv]=t}var IS;function Jf(e,t){return IS(e,t)}function eh(e){let t=e[tt];return rn(t)?t[tt]:t}function Zy(e){return Qy(e[ls])}function Ky(e){return Qy(e[vn])}function Qy(e){for(;e!==null&&!rn(e);)e=e[vn];return e}function to(e,t,n,r,i){if(r!=null){let o,s=!1;rn(r)?o=r:Nn(r)&&(s=!0,r=r[Ht]);let a=yn(r);e===0&&n!==null?i==null?r_(t,n,a):kc(t,n,a,i||null,!0):e===1&&n!==null?kc(t,n,a,i||null,!0):e===2?s_(t,a,s):e===3&&t.destroyNode(a),o!=null&&BS(t,e,o,n,i)}}function Xy(e,t){return e.createText(t)}function SS(e,t,n){e.setValue(t,n)}function Jy(e,t){return e.createComment(DS(t))}function th(e,t,n){return e.createElement(t,n)}function MS(e,t){let n=t[He];Ss(e,t,n,2,null,null),t[Ht]=null,t[Zt]=null}function TS(e,t,n,r,i,o){r[Ht]=i,r[Zt]=t,Ss(e,r,n,1,i,o)}function AS(e,t){Ss(e,t,t[He],2,null,null)}function OS(e){let t=e[ls];if(!t)return Td(e[te],e);for(;t;){let n=null;if(Nn(t))n=t[ls];else{let r=t[Bt];r&&(n=r)}if(!n){for(;t&&!t[vn]&&t!==e;)Nn(t)&&Td(t[te],t),t=t[tt];t===null&&(t=e),Nn(t)&&Td(t[te],t),n=t&&t[vn]}t=n}}function xS(e,t,n,r){let i=Bt+r,o=n.length;r>0&&(n[i-1][vn]=t),r0&&(e[n-1][vn]=r[vn]);let o=Rc(e,Bt+t);MS(r[te],r);let s=o[xn];s!==null&&s.detachView(o[te]),r[tt]=null,r[vn]=null,r[Y]&=-129}return r}function t_(e,t){if(!(t[Y]&256)){let n=t[He];t[oi]&&Dg(t[oi]),n.destroyNode&&Ss(e,t,n,3,null,null),OS(t)}}function Td(e,t){if(!(t[Y]&256)){t[Y]&=-129,t[Y]|=256,RS(e,t),PS(e,t),t[te].type===1&&t[He].destroy();let n=t[_s];if(n!==null&&rn(t[tt])){n!==t[tt]&&e_(n,t);let r=t[xn];r!==null&&r.detachView(e)}CS(t)}}function PS(e,t){let n=e.cleanup,r=t[us];if(n!==null)for(let o=0;o=0?r[s]():r[-s].unsubscribe(),o+=2}else{let s=r[n[o+1]];n[o].call(s)}r!==null&&(t[us]=null);let i=t[ss];if(i!==null){t[ss]=null;for(let o=0;o-1){let{encapsulation:o}=e.data[r.directiveStart+i];if(o===Pn.None||o===Pn.Emulated)return null}return Kt(r,n)}}function kc(e,t,n,r,i){e.insertBefore(t,n,r,i)}function r_(e,t,n){e.appendChild(t,n)}function pv(e,t,n,r,i){r!==null?kc(e,t,n,r,i):r_(e,t,n)}function LS(e,t,n,r){e.removeChild(t,n,r)}function nh(e,t){return e.parentNode(t)}function kS(e,t){return e.nextSibling(t)}function i_(e,t,n){return VS(e,t,n)}function jS(e,t,n){return e.type&40?Kt(e,n):null}var VS=jS,mv;function cu(e,t,n,r){let i=n_(e,r,t),o=t[He],s=r.parent||t[Zt],a=i_(s,r,t);if(i!=null)if(Array.isArray(n))for(let c=0;ce,createScript:e=>e,createScriptURL:e=>e})}catch{}return mc}function uu(e){var t;return((t=zS())==null?void 0:t.createHTML(e))||e}var gc;function GS(){if(gc===void 0&&(gc=null,nr.trustedTypes))try{gc=nr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return gc}function gv(e){var t;return((t=GS())==null?void 0:t.createHTML(e))||e}var ar=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: ".concat(this.changingThisBreaksApplicationSecurity)+" (see ".concat(Uv,")")}},tf=class extends ar{getTypeName(){return"HTML"}},nf=class extends ar{getTypeName(){return"Style"}},rf=class extends ar{getTypeName(){return"Script"}},of=class extends ar{getTypeName(){return"URL"}},sf=class extends ar{getTypeName(){return"ResourceURL"}};function Ln(e){return e instanceof ar?e.changingThisBreaksApplicationSecurity:e}function Or(e,t){let n=WS(e);if(n!=null&&n!==t){if(n==="ResourceURL"&&t==="URL")return!0;throw new Error("Required a safe ".concat(t,", got a ").concat(n," (see ").concat(Uv,")"))}return n===t}function WS(e){return e instanceof ar&&e.getTypeName()||null}function d_(e){return new tf(e)}function f_(e){return new nf(e)}function h_(e){return new rf(e)}function p_(e){return new of(e)}function m_(e){return new sf(e)}function qS(e){let t=new cf(e);return YS()?new af(t):t}var af=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let n=new window.DOMParser().parseFromString(uu(t),"text/html").body;return n===null?this.inertDocumentHelper.getInertBodyElement(t):(n.removeChild(n.firstChild),n)}catch{return null}}},cf=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let n=this.inertDocument.createElement("template");return n.innerHTML=uu(t),n}};function YS(){try{return!!new window.DOMParser().parseFromString(uu(""),"text/html")}catch{return!1}}var ZS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function lu(e){return e=String(e),e.match(ZS)?e:"unsafe:"+e}function pr(e){let t={};for(let n of e.split(","))t[n]=!0;return t}function Ms(...e){let t={};for(let n of e)for(let r in n)n.hasOwnProperty(r)&&(t[r]=!0);return t}var g_=pr("area,br,col,hr,img,wbr"),v_=pr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y_=pr("rp,rt"),KS=Ms(y_,v_),QS=Ms(v_,pr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),XS=Ms(y_,pr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),vv=Ms(g_,QS,XS,KS),__=pr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),JS=pr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),eM=pr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),tM=Ms(__,JS,eM),nM=pr("script,style,template"),uf=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let n=t.firstChild,r=!0;for(;n;){if(n.nodeType===Node.ELEMENT_NODE?r=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,r&&n.firstChild){n=n.firstChild;continue}for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let i=this.checkClobberedElement(n,n.nextSibling);if(i){n=i;break}n=this.checkClobberedElement(n,n.parentNode)}}return this.buf.join("")}startElement(t){let n=t.nodeName.toLowerCase();if(!vv.hasOwnProperty(n))return this.sanitizedSomething=!0,!nM.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);let r=t.attributes;for(let i=0;i"),!0}endElement(t){let n=t.nodeName.toLowerCase();vv.hasOwnProperty(n)&&!g_.hasOwnProperty(n)&&(this.buf.push(""))}chars(t){this.buf.push(yv(t))}checkClobberedElement(t,n){if(n&&(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: ".concat(t.outerHTML));return n}},rM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,iM=/([^\#-~ |!])/g;function yv(e){return e.replace(/&/g,"&").replace(rM,function(t){let n=t.charCodeAt(0),r=t.charCodeAt(1);return"&#"+((n-55296)*1024+(r-56320)+65536)+";"}).replace(iM,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var vc;function ih(e,t){let n=null;try{vc=vc||qS(e);let r=t?String(t):"";n=vc.getInertBodyElement(r);let i=5,o=r;do{if(i===0)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=vc.getInertBodyElement(r)}while(r!==o);let a=new uf().sanitizeChildren(_v(n)||n);return uu(a)}finally{if(n){let r=_v(n)||n;for(;r.firstChild;)r.removeChild(r.firstChild)}}}function _v(e){return"content"in e&&oM(e)?e.content:null}function oM(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="TEMPLATE"}var mt=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(mt||{});function vo(e){let t=E_();return t?gv(t.sanitize(mt.HTML,e)||""):Or(e,"HTML")?gv(Ln(e)):ih(Is(),vs(e))}function D_(e){let t=E_();return t?t.sanitize(mt.URL,e)||"":Or(e,"URL")?Ln(e):lu(vs(e))}function E_(){let e=fe();return e&&e[oo].sanitizer}function sM(){let e=new vi;return v(Qt)==="browser"&&(e.store=aM(Is(),v(au))),e}var vi=(()=>{let t=class t{constructor(){this.store={},this.onSerializeCallbacks={}}get(r,i){return this.store[r]!==void 0?this.store[r]:i}set(r,i){this.store[r]=i}remove(r){delete this.store[r]}hasKey(r){return this.store.hasOwnProperty(r)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(r,i){this.onSerializeCallbacks[r]=i}toJson(){for(let r in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(r))try{this.store[r]=this.onSerializeCallbacks[r]()}catch(i){console.warn("Exception in onSerialize callback: ",i)}return JSON.stringify(this.store).replace(/null;function mM(e,t,n=!1){var u;let r=e.getAttribute(Ad);if(r==null)return null;let[i,o]=r.split("|");if(r=n?o:i,!r)return null;let s=n?i:o?"|".concat(o):"",a={};if(r!==""){let l=t.get(vi,null,{optional:!0});l!==null&&(a=l.get(I_,[])[Number(r)])}let c={data:a,firstChild:(u=e.firstChild)!=null?u:null};return n&&(c.firstChild=e,du(c,0,e.nextSibling)),s?e.setAttribute(Ad,s):e.removeAttribute(Ad),c}function gM(){S_=mM}function sh(e,t,n=!1){return S_(e,t,n)}function vM(e){let t=e._lView;return t[te].type===2?null:(ry(t)&&(t=t[it]),t)}function yM(e){var t;return(t=e.textContent)==null?void 0:t.replace(/\s/gm,"")}function _M(e){let t=Is(),n=t.createNodeIterator(e,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=yM(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),r,i=[];for(;r=n.nextNode();)i.push(r);for(let o of i)o.textContent==="ngetn"?o.replaceWith(t.createTextNode("")):o.remove()}function du(e,t,n){var r;(r=e.segmentHeads)!=null||(e.segmentHeads={}),e.segmentHeads[t]=n}function df(e,t){var n,r;return(r=(n=e.segmentHeads)==null?void 0:n[t])!=null?r:null}function DM(e,t){var i,o,s;let n=e.data,r=(o=(i=n[cM])==null?void 0:i[t])!=null?o:null;return r===null&&((s=n[oh])!=null&&s[t])&&(r=ah(e,t)),r}function M_(e,t){var n,r;return(r=(n=e.data[oh])==null?void 0:n[t])!=null?r:null}function ah(e,t){var i,o;let n=(i=M_(e,t))!=null?i:[],r=0;for(let s of n)r+=s[jc]*((o=s[C_])!=null?o:1);return r}function fu(e,t){var n;if(typeof e.disconnectedNodes>"u"){let r=e.data[fM];e.disconnectedNodes=r?new Set(r):null}return!!((n=e.disconnectedNodes)!=null&&n.has(t))}var ff=class{},Vc=class{};function EM(e){let t=Error("No component factory found for ".concat(wt(e),"."));return t[wM]=e,t}var wM="ngComponent";var hf=class{resolveComponentFactory(t){throw EM(t)}},kn=(()=>{let t=class t{};t.NULL=new hf;let e=t;return e})();function bM(){return yo($t(),fe())}function yo(e,t){return new X(Kt(e,t))}var X=(()=>{let t=class t{constructor(r){this.nativeElement=r}};t.__NG_ELEMENT_ID__=bM;let e=t;return e})();function CM(e){return e instanceof X?e.nativeElement:e}var li=class{},mr=(()=>{let t=class t{constructor(){this.destroyNode=null}};t.__NG_ELEMENT_ID__=()=>IM();let e=t;return e})();function IM(){let e=fe(),t=$t(),n=Mr(t.index,e);return(Nn(n)?n:e)[He]}var SM=(()=>{let t=class t{};t.\u0275prov=S({token:t,providedIn:"root",factory:()=>null});let e=t;return e})(),di=class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}},MM=new di("17.0.5"),Od={};function ch(e){let t=Ot(null);try{return e()}finally{Ot(t)}}function T_(e){return AM(e)?Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e:!1}function TM(e,t){if(Array.isArray(e))for(let n=0;nt,mf=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||OM}forEachItem(t){let n;for(n=this._itHead;n!==null;n=n._next)t(n)}forEachOperation(t){let n=this._itHead,r=this._removalsHead,i=0,o=null;for(;n||r;){let s=!r||n&&n.currentIndex{s=this._trackByFn(i,a),n===null||!Object.is(n.trackById,s)?(n=this._mismatch(n,a,s,i),r=!0):(r&&(n=this._verifyReinsertion(n,a,s,i)),Object.is(n.item,a)||this._addIdentityChange(n,a)),n=n._next,i++}),this.length=i;return this._truncate(n),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,n,r,i){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._reinsertAfter(t,o,i)):(t=this._linkedRecords===null?null:this._linkedRecords.get(r,i),t!==null?(Object.is(t.item,n)||this._addIdentityChange(t,n),this._moveAfter(t,o,i)):t=this._addAfter(new gf(n,r),o,i)),t}_verifyReinsertion(t,n,r,i){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(r,null);return o!==null?t=this._reinsertAfter(o,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;t!==null;){let n=t._next;this._addToRemovals(this._unlink(t)),t=n}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,n,r){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let i=t._prevRemoved,o=t._nextRemoved;return i===null?this._removalsHead=o:i._nextRemoved=o,o===null?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(t,n,r),this._addToMoves(t,r),t}_moveAfter(t,n,r){return this._unlink(t),this._insertAfter(t,n,r),this._addToMoves(t,r),t}_addAfter(t,n,r){return this._insertAfter(t,n,r),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,n,r){let i=n===null?this._itHead:n._next;return t._next=i,t._prev=n,i===null?this._itTail=t:i._prev=t,n===null?this._itHead=t:n._next=t,this._linkedRecords===null&&(this._linkedRecords=new Uc),this._linkedRecords.put(t),t.currentIndex=r,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let n=t._prev,r=t._next;return n===null?this._itHead=r:n._next=r,r===null?this._itTail=n:r._prev=n,t}_addToMoves(t,n){return t.previousIndex===n||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Uc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,n){return t.item=n,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},gf=class{constructor(t,n){this.item=t,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},vf=class{constructor(){this._head=null,this._tail=null}add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,n){let r;for(r=this._head;r!==null;r=r._nextDup)if((n===null||n<=r.currentIndex)&&Object.is(r.trackById,t))return r;return null}remove(t){let n=t._prevDup,r=t._nextDup;return n===null?this._head=r:n._nextDup=r,r===null?this._tail=n:r._prevDup=n,this._head===null}},Uc=class{constructor(){this.map=new Map}put(t){let n=t.trackById,r=this.map.get(n);r||(r=new vf,this.map.set(n,r)),r.add(t)}get(t,n){let r=t,i=this.map.get(r);return i?i.get(t,n):null}remove(t){let n=t.trackById;return this.map.get(n).remove(t)&&this.map.delete(n),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Dv(e,t,n){let r=e.previousIndex;if(r===null)return r;let i=0;return n&&r{let t=class t{constructor(r){this.factories=r}static create(r,i){if(i!=null){let o=i.factories.slice();r=r.concat(o)}return new t(r)}static extend(r){return{provide:t,useFactory:i=>t.create(r,i||Ev()),deps:[[t,new hr,new fr]]}}find(r){let i=this.factories.find(o=>o.supports(r));if(i!=null)return i;throw new b(901,!1)}};t.\u0275prov=S({token:t,providedIn:"root",factory:Ev});let e=t;return e})();function Bc(e,t,n,r,i=!1){for(;n!==null;){let o=t[n.index];o!==null&&r.push(yn(o)),rn(o)&&xM(o,r);let s=n.type;if(s&8)Bc(e,t,n.child,r);else if(s&32){let a=Jf(n,t),c;for(;c=a();)r.push(c)}else if(s&16){let a=o_(t,n);if(Array.isArray(a))r.push(...a);else{let c=eh(t[Yt]);Bc(c[te],c,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function xM(e,t){for(let n=Bt;n{nu(e.lView)},consumerOnSignalRead(){this.lView[oi]=this}}),LM="ngOriginalError";function xd(e){return e[LM]}var cr=class{constructor(){this._console=console}handleError(t){let n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&xd(t);for(;n&&xd(n);)n=xd(n);return n||null}},yc=new D(""),O_=!1,x_=new D("",{providedIn:"root",factory:()=>O_});var yi={};function re(e){N_(ot(),fe(),po()+e,!1)}function N_(e,t,n,r){if(!r)if((t[Y]&3)===3){let o=e.preOrderCheckHooks;o!==null&&Ec(t,o,n)}else{let o=e.preOrderHooks;o!==null&&wc(t,o,0,n)}ai(n)}function y(e,t=se.Default){let n=fe();if(n===null)return I(e,t);let r=$t();return Ny(r,n,xt(e),t)}function lh(){let e="invalid";throw new Error(e)}function kM(e,t){let n=e.hostBindingOpCodes;if(n!==null)try{for(let r=0;rit&&N_(e,t,it,!1),An(s?2:0,i),n(r,i)}finally{ai(o),An(s?3:1,i)}}function dh(e,t,n){if(Vf(t)){let r=Ot(null);try{let i=t.directiveStart,o=t.directiveEnd;for(let s=i;snull;function HM(e){qy(e)?a_(e):_M(e)}function $M(){L_=HM}function zM(e,t,n,r){let i=H_(t);i.push(n),e.firstCreatePass&&$_(e).push(r,i.length-1)}function GM(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return ho()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function wv(e,t,n,r){for(let i in e)if(e.hasOwnProperty(i)){n=n===null?{}:n;let o=e[i];r===null?bv(n,t,i,o):r.hasOwnProperty(i)&&bv(n,t,r[i],o)}return n}function bv(e,t,n,r){e.hasOwnProperty(n)?e[n].push(t,r):e[n]=[t,r]}function WM(e,t,n){let r=t.directiveStart,i=t.directiveEnd,o=e.data,s=t.attrs,a=[],c=null,u=null;for(let l=r;l0;){let n=e[--t];if(typeof n=="number"&&n<0)return n}return 0}function QM(e,t,n,r){let i=n.directiveStart,o=n.directiveEnd;Ds(n)&&iT(t,n,e.data[i+n.componentOffset]),e.firstCreatePass||Pc(n,t),Sr(r,t);let s=n.initialInputs;for(let a=i;a-1&&(Jd(t,r),Rc(n,r))}this._attachedToViewContainer=!1}t_(this._lView[te],this._lView)}onDestroy(t){yI(this._lView,t)}markForCheck(){yh(this._cdRefInjectingView||this._lView)}detach(){this._lView[Y]&=-129}reattach(){fy(this._lView),this._lView[Y]|=128}detectChanges(){fT(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new b(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,AS(this._lView[te],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new b(902,!1);this._appRef=t}},gt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=vT;let e=t;return e})();function vT(e){return yT($t(),fe(),(e&16)===16)}function yT(e,t,n){if(Ds(e)&&!n){let r=Mr(e.index,t);return new fi(r,r)}else if(e.type&47){let r=t[Yt];return new fi(r,t)}return null}var Cv=new Set;function Ts(e){var t;Cv.has(e)||(Cv.add(e),(t=performance==null?void 0:performance.mark)==null||t.call(performance,"mark_use_counter",{detail:{feature:e}}))}var Df=class extends Te{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,n,r){var c,u,l;let i=t,o=n||(()=>null),s=r;if(t&&typeof t=="object"){let d=t;i=(c=d.next)==null?void 0:c.bind(d),o=(u=d.error)==null?void 0:u.bind(d),s=(l=d.complete)==null?void 0:l.bind(d)}this.__isAsync&&(o=Nd(o),i&&(i=Nd(i)),s&&(s=Nd(s)));let a=super.subscribe({next:i,error:o,complete:s});return t instanceof rt&&t.add(a),a}};function Nd(e){return t=>{setTimeout(e,void 0,t)}}var et=Df;function Iv(...e){}function _T(){let e=typeof nr.requestAnimationFrame=="function",t=nr[e?"requestAnimationFrame":"setTimeout"],n=nr[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&n){let r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);let i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}var ue=class e{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new et(!1),this.onMicrotaskEmpty=new et(!1),this.onStable=new et(!1),this.onError=new et(!1),typeof Zone>"u")throw new b(908,!1);Zone.assertZonePatched();let i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=_T().nativeRequestAnimationFrame,wT(i)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!e.isInAngularZone())throw new b(909,!1)}static assertNotInAngularZone(){if(e.isInAngularZone())throw new b(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,DT,Iv,Iv);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}},DT={};function _h(e){if(e._nesting==0&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function ET(e){e.isCheckStableRunning||e.lastRequestAnimationFrameId!==-1||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(nr,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,Ef(e),e.isCheckStableRunning=!0,_h(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),Ef(e))}function wT(e){let t=()=>{ET(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,o,s,a)=>{if(bT(a))return n.invokeTask(i,o,s,a);try{return Sv(e),n.invokeTask(i,o,s,a)}finally{(e.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||e.shouldCoalesceRunChangeDetection)&&t(),Mv(e)}},onInvoke:(n,r,i,o,s,a,c)=>{try{return Sv(e),n.invoke(i,o,s,a,c)}finally{e.shouldCoalesceRunChangeDetection&&t(),Mv(e)}},onHasTask:(n,r,i,o)=>{n.hasTask(i,o),r===i&&(o.change=="microTask"?(e._hasPendingMicrotasks=o.microTask,Ef(e),_h(e)):o.change=="macroTask"&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,r,i,o)=>(n.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}function Ef(e){e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&e.lastRequestAnimationFrameId!==-1?e.hasPendingMicrotasks=!0:e.hasPendingMicrotasks=!1}function Sv(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Mv(e){e._nesting--,_h(e)}var K_=new D("",{providedIn:"root",factory:Q_});function Q_(){let e=v(ue),t=!0,n=new N(i=>{t=e.isStable&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks,e.runOutsideAngular(()=>{i.next(t),i.complete()})}),r=new N(i=>{let o;e.runOutsideAngular(()=>{o=e.onStable.subscribe(()=>{ue.assertNotInAngularZone(),queueMicrotask(()=>{!t&&!e.hasPendingMacrotasks&&!e.hasPendingMicrotasks&&(t=!0,i.next(!0))})})});let s=e.onUnstable.subscribe(()=>{ue.assertInAngularZone(),t&&(t=!1,e.runOutsideAngular(()=>{i.next(!1)}))});return()=>{o.unsubscribe(),s.unsubscribe()}});return xe(n,r.pipe(vt()))}function bT(e){var t;return!Array.isArray(e)||e.length!==1?!1:((t=e[0].data)==null?void 0:t.__ignore_ng_zone__)===!0}var CT=(()=>{let t=class t{constructor(){this.renderDepth=0,this.handler=null,this.internalCallbacks=[]}begin(){var r;(r=this.handler)==null||r.validateBegin(),this.renderDepth++}end(){var r;if(this.renderDepth--,this.renderDepth===0){for(let i of this.internalCallbacks)i();this.internalCallbacks.length=0,(r=this.handler)==null||r.execute()}}ngOnDestroy(){var r;(r=this.handler)==null||r.destroy(),this.handler=null,this.internalCallbacks.length=0}};t.\u0275prov=S({token:t,providedIn:"root",factory:()=>new t});let e=t;return e})();function IT(e,t){let n=Mr(t,e),r=n[te];ST(r,n);let i=n[Ht];i!==null&&n[rr]===null&&(n[rr]=sh(i,n[io])),Dh(r,n,n[nn])}function ST(e,t){for(let n=t.length;n0&&u_(e,n,o.join(" "))}}function RT(e,t,n){let r=e.projection=[];for(let i=0;i=0;r--){let i=e[r];i.hostVars=t+=i.hostVars,i.hostAttrs=cs(i.hostAttrs,n=cs(n,i.hostAttrs))}}function _c(e){return e===ro?{}:e===qt?[]:e}function jT(e,t){let n=e.viewQuery;n?e.viewQuery=(r,i)=>{t(r,i),n(r,i)}:e.viewQuery=t}function VT(e,t){let n=e.contentQueries;n?e.contentQueries=(r,i,o)=>{t(r,i,o),n(r,i,o)}:e.contentQueries=t}function UT(e,t){let n=e.hostBindings;n?e.hostBindings=(r,i)=>{t(r,i),n(r,i)}:e.hostBindings=t}function Eh(e,t,n){return e[t]=n}function ur(e,t,n){let r=e[t];return Object.is(r,n)?!1:(e[t]=n,!0)}function Cf(e,t,n,r){let i=ur(e,t,n);return ur(e,t+1,r)||i}function BT(e,t,n,r,i,o){let s=Cf(e,t,n,r);return Cf(e,t+2,i,o)||s}function at(e,t,n,r){let i=fe(),o=ws();if(ur(i,o,t)){let s=ot(),a=ru();oT(a,i,e,t,n,r)}return at}function HT(e,t,n,r){return ur(e,ws(),n)?t+vs(n)+r:yi}function Dc(e,t){return e<<17|t<<2}function hi(e){return e>>17&32767}function $T(e){return(e&2)==2}function zT(e,t){return e&131071|t<<17}function If(e){return e|2}function lo(e){return(e&131068)>>2}function Pd(e,t){return e&-131069|t<<2}function GT(e){return(e&1)===1}function Sf(e){return e|1}function WT(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=hi(s),c=lo(s);e[r]=n;let u=!1,l;if(Array.isArray(n)){let d=n;l=d[1],(l===null||Cs(d,l)>0)&&(u=!0)}else l=n;if(i)if(c!==0){let f=hi(e[a+1]);e[r+1]=Dc(f,a),f!==0&&(e[f+1]=Pd(e[f+1],r)),e[a+1]=zT(e[a+1],r)}else e[r+1]=Dc(a,0),a!==0&&(e[a+1]=Pd(e[a+1],r)),a=r;else e[r+1]=Dc(c,0),a===0?a=r:e[c+1]=Pd(e[c+1],r),c=r;u&&(e[r+1]=If(e[r+1])),Av(e,l,r,!0,o),Av(e,l,r,!1,o),qT(t,l,e,r,o),s=Dc(a,c),o?t.classBindings=s:t.styleBindings=s}function qT(e,t,n,r,i){let o=i?e.residualClasses:e.residualStyles;o!=null&&typeof t=="string"&&Cs(o,t)>=0&&(n[r+1]=Sf(n[r+1]))}function Av(e,t,n,r,i){let o=e[n+1],s=t===null,a=r?hi(o):lo(o),c=!1;for(;a!==0&&(c===!1||s);){let u=e[a],l=e[a+1];YT(u,t)&&(c=!0,e[a+1]=r?Sf(l):If(l)),a=r?hi(l):lo(l)}c&&(e[n+1]=r?If(o):Sf(o))}function YT(e,t){return e===null||t==null||(Array.isArray(e)?e[1]:e)===t?!0:Array.isArray(e)&&typeof t=="string"?Cs(e,t)>=0:!1}function U(e,t,n){let r=fe(),i=ws();if(ur(r,i,t)){let o=ot(),s=ru();mh(o,s,r,e,t,r[He],n,!1)}return U}function Ov(e,t,n,r,i){let o=t.inputs,s=i?"class":"style";vh(e,n,o[s],s,r)}function Do(e,t,n){return X_(e,t,n,!1),Do}function Xe(e,t){return X_(e,t,null,!0),Xe}function X_(e,t,n,r){let i=fe(),o=ot(),s=TI(2);if(o.firstUpdatePass&&KT(o,e,s,r),t!==yi&&ur(i,s,t)){let a=o.data[po()];tA(o,a,i,i[He],e,i[s+1]=nA(t,n),r,s)}}function ZT(e,t){return t>=e.expandoStartIndex}function KT(e,t,n,r){let i=e.data;if(i[n+1]===null){let o=i[po()],s=ZT(e,n);rA(o,r)&&t===null&&!s&&(t=!1),t=QT(i,o,t,r),WT(i,o,t,n,s,r)}}function QT(e,t,n,r){let i=my(e),o=r?t.residualClasses:t.residualStyles;if(i===null)(r?t.classBindings:t.styleBindings)===0&&(n=Rd(null,e,t,n,r),n=ps(n,t.attrs,r),o=null);else{let s=t.directiveStylingLast;if(s===-1||e[s]!==i)if(n=Rd(i,e,t,n,r),o===null){let c=XT(e,t,r);c!==void 0&&Array.isArray(c)&&(c=Rd(null,e,t,c[1],r),c=ps(c,t.attrs,r),JT(e,t,r,c))}else o=eA(e,t,r)}return o!==void 0&&(r?t.residualClasses=o:t.residualStyles=o),n}function XT(e,t,n){let r=n?t.classBindings:t.styleBindings;if(lo(r)!==0)return e[hi(r)]}function JT(e,t,n,r){let i=n?t.classBindings:t.styleBindings;e[hi(i)]=r}function eA(e,t,n){let r,i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0;){let c=e[i],u=Array.isArray(c),l=u?c[1]:c,d=l===null,f=n[i+1];f===yi&&(f=d?qt:void 0);let p=d?Sd(f,r):l===r?f:void 0;if(u&&!zc(p)&&(p=Sd(c,r)),zc(p)&&(a=p,s))return a;let g=e[i+1];i=s?hi(g):lo(g)}if(t!==null){let c=o?t.residualClasses:t.residualStyles;c!=null&&(a=Sd(c,r))}return a}function zc(e){return e!==void 0}function nA(e,t){return e==null||e===""||(typeof t=="string"?e=e+t:typeof e=="object"&&(e=wt(Ln(e)))),e}function rA(e,t){return(e.flags&(t?8:16))!==0}function J_(e){var i;let t=(i=e[ds])!=null?i:[],r=e[tt][He];for(let o of t)iA(o,r);e[ds]=qt}function iA(e,t){let n=0,r=e.firstChild;if(r){let i=e.data[jc];for(;n0&&(s.firstChild=e,e=gu(i[jc],e)),n.push(s)}return[e,n]}var tD=(e,t)=>null;function fA(e,t){let n=e[ds];return!t||n===null||n.length===0?null:n[0].data[lM]===t?n.shift():(J_(e),null)}function hA(){tD=fA}function Nv(e,t){return tD(e,t)}function pA(e,t,n,r){var l,d;let i=t.tView,s=e[Y]&4096?4096:16,a=hu(e,i,n,s,null,t,null,null,null,(l=r==null?void 0:r.injector)!=null?l:null,(d=r==null?void 0:r.dehydratedView)!=null?d:null),c=e[t.index];a[_s]=c;let u=e[xn];return u!==null&&(a[xn]=u.createEmbeddedView(i)),Dh(i,a,n),a}function Pv(e,t){return!t||Lc(e)}function mA(e,t,n,r=!0){let i=t[te];if(xS(i,t,e,n),r){let o=ef(n,e),s=t[He],a=nh(s,e[ir]);a!==null&&TS(i,e[Zt],s,t,a,o)}}var Nt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=gA;let e=t;return e})();function gA(){let e=$t();return rD(e,fe())}var vA=Nt,nD=class extends vA{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return yo(this._hostTNode,this._hostLView)}get injector(){return new ri(this._hostTNode,this._hostLView)}get parentInjector(){let t=Wf(this._hostTNode,this._hostLView);if(Sy(t)){let n=xc(t,this._hostLView),r=Oc(t),i=n[te].data[r+8];return new ri(i,n)}else return new ri(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let n=Rv(this._lContainer);return n!==null&&n[t]||null}get length(){return this._lContainer.length-Bt}createEmbeddedView(t,n,r){let i,o;typeof r=="number"?i=r:r!=null&&(i=r.index,o=r.injector);let s=Nv(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(n||{},o,s);return this.insertImpl(a,i,Pv(this._hostTNode,s)),a}createComponent(t,n,r,i,o){var g,_,T;let s=t&&!ZI(t),a;if(s)a=n;else{let A=n||{};a=A.index,r=A.injector,i=A.projectableNodes,o=A.environmentInjector||A.ngModuleRef}let c=s?t:new hs(ii(t)),u=r||this.parentInjector;if(!o&&c.ngModule==null){let q=(s?u:this.parentInjector).get(on,null);q&&(o=q)}let l=ii((g=c.componentType)!=null?g:{}),d=Nv(this._lContainer,(_=l==null?void 0:l.id)!=null?_:null),f=(T=d==null?void 0:d.firstChild)!=null?T:null,p=c.create(u,i,f,o);return this.insertImpl(p.hostView,a,Pv(this._hostTNode,d)),p}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){let i=t._lView;if(mI(i)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let c=i[tt],u=new nD(c,c[Zt],c[tt]);u.detach(u.indexOf(t))}}let o=this._adjustIndex(n),s=this._lContainer;return mA(s,i,o,r),t.attachToViewContainerRef(),Fy(Ld(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){let n=Rv(this._lContainer);return n!==null?n.indexOf(t):-1}remove(t){let n=this._adjustIndex(t,-1),r=Jd(this._lContainer,n);r&&(Rc(Ld(this._lContainer),n),t_(r[te],r))}detach(t){let n=this._adjustIndex(t,-1),r=Jd(this._lContainer,n);return r&&Rc(Ld(this._lContainer),n)!=null?new fi(r):null}_adjustIndex(t,n=0){return t==null?this.length+n:t}};function Rv(e){return e[Ac]}function Ld(e){return e[Ac]||(e[Ac]=[])}function rD(e,t){let n,r=t[e.index];return rn(r)?n=r:(n=U_(r,t,null,e),t[e.index]=n,pu(t,n)),iD(n,t,e,r),new nD(n,e,t)}function yA(e,t){let n=e[He],r=n.createComment(""),i=Kt(t,e),o=nh(n,i);return kc(n,o,r,kS(n,i),!1),r}var iD=oD,wh=(e,t,n)=>!1;function _A(e,t,n){return wh(e,t,n)}function oD(e,t,n,r){if(e[ir])return;let i;n.type&8?i=yn(r):i=yA(t,n),e[ir]=i}function DA(e,t,n){var l;if(e[ir]&&e[ds])return!0;let r=n[rr],i=t.index-it;if(!r||gS(t)||fu(r,i))return!1;let s=df(r,i),a=(l=r.data[oh])==null?void 0:l[i],[c,u]=dA(s,a);return e[ir]=c,e[ds]=u,!0}function EA(e,t,n,r){wh(e,n,t)||oD(e,t,n,r)}function wA(){iD=EA,wh=DA}function bA(e,t,n,r,i,o,s,a,c){let u=t.consts,l=_o(t,e,4,s||null,co(u,a));gh(t,n,l,co(u,c)),ou(t,l);let d=l.tView=ph(2,l,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,u,null);return t.queries!==null&&(t.queries.template(t,l),d.queries=t.queries.embeddedTView(l)),l}function Ce(e,t,n,r,i,o,s,a){let c=fe(),u=ot(),l=e+it,d=u.firstCreatePass?bA(l,u,c,t,n,r,i,o,s):u.data[l];mi(d,!1);let f=sD(u,c,d,e);iu()&&cu(u,c,f,d),Sr(f,c);let p=U_(f,c,f,d);return c[l]=p,pu(c,p),_A(p,d,c),eu(d)&&fh(u,c,d),s!=null&&hh(c,d,a),Ce}var sD=aD;function aD(e,t,n,r){return Tr(!0),t[He].createComment("")}function CA(e,t,n,r){var l,d;let i=t[rr],o=!i||ho()||fu(i,r);if(Tr(o),o)return aD(e,t,n,r);let s=(d=(l=i.data[uM])==null?void 0:l[r])!=null?d:null;s!==null&&n.tView!==null&&n.tView.ssrId===null&&(n.tView.ssrId=s);let a=mu(i,e,t,n);du(i,r,a);let c=ah(i,r);return gu(c,a)}function IA(){sD=CA}function SA(e,t,n,r,i,o){let s=t.consts,a=co(s,i),c=_o(t,e,2,r,a);return gh(t,n,c,co(s,o)),c.attrs!==null&&Hc(c,c.attrs,!1),c.mergedAttrs!==null&&Hc(c,c.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,c),c}function ge(e,t,n,r){let i=fe(),o=ot(),s=it+e,a=i[He],c=o.firstCreatePass?SA(s,o,i,t,n,r):o.data[s],u=cD(o,i,c,a,t,e);i[s]=u;let l=eu(c);return mi(c,!0),l_(a,u,c),(c.flags&32)!==32&&iu()&&cu(o,i,u,c),_I()===0&&Sr(u,i),DI(),l&&(fh(o,i,c),dh(o,c,i)),r!==null&&hh(i,c),ge}function pe(){let e=$t();Bf()?Hf():(e=e.parent,mi(e,!1));let t=e;wI(t)&&CI(),EI();let n=ot();return n.firstCreatePass&&(ou(n,e),Vf(e)&&n.queries.elementEnd(e)),t.classesWithoutHost!=null&&jI(t)&&Ov(n,t,fe(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&VI(t)&&Ov(n,t,fe(),t.stylesWithoutHost,!1),pe}function Le(e,t,n,r){return ge(e,t,n,r),pe(),Le}var cD=(e,t,n,r,i,o)=>(Tr(!0),th(r,i,by()));function MA(e,t,n,r,i,o){let s=t[rr],a=!s||ho()||fu(s,o);if(Tr(a),a)return th(r,i,by());let c=mu(s,e,t,n);return M_(s,o)&&du(s,o,c.nextSibling),s&&(Wy(n)||qy(c))&&Ds(n)&&(bI(n),a_(c)),c}function TA(){cD=MA}function AA(e,t,n,r,i){let o=t.consts,s=co(o,r),a=_o(t,e,8,"ng-container",s);s!==null&&Hc(a,s,!0);let c=co(o,i);return gh(t,n,a,c),t.queries!==null&&t.queries.elementStart(t,a),a}function _n(e,t,n){let r=fe(),i=ot(),o=e+it,s=i.firstCreatePass?AA(o,i,r,t,n):i.data[o];mi(s,!0);let a=uD(i,r,s,e);return r[o]=a,iu()&&cu(i,r,a,s),Sr(a,r),eu(s)&&(fh(i,r,s),dh(i,s,r)),n!=null&&hh(r,s),_n}function Dn(){let e=$t(),t=ot();return Bf()?Hf():(e=e.parent,mi(e,!1)),t.firstCreatePass&&(ou(t,e),Vf(e)&&t.queries.elementEnd(e)),Dn}function As(e,t,n){return _n(e,t,n),Dn(),As}var uD=(e,t,n,r)=>(Tr(!0),Jy(t[He],""));function OA(e,t,n,r){let i,o=t[rr],s=!o||ho();if(Tr(s),s)return Jy(t[He],"");let a=mu(o,e,t,n),c=DM(o,r);return du(o,r,a),i=gu(c,a),i}function xA(){uD=OA}function jn(){return fe()}function bh(e,t,n){let r=fe(),i=ws();if(ur(r,i,t)){let o=ot(),s=ru();mh(o,s,r,e,t,r[He],n,!0)}return bh}function Os(e,t,n){let r=fe(),i=ws();if(ur(r,i,t)){let o=ot(),s=ru(),a=my(o.data),c=uT(a,s,r);mh(o,s,r,e,t,c,n,!0)}return Os}var Wc="en-US";var NA=Wc;function PA(e){RC(e,"Expected localeId to be defined"),typeof e=="string"&&(NA=e.toLowerCase().replace(/_/g,"-"))}function xr(e){return!!e&&typeof e.then=="function"}function Ch(e){return!!e&&typeof e.subscribe=="function"}function nt(e,t,n,r){let i=fe(),o=ot(),s=$t();return FA(o,i,i[He],s,e,t,r),nt}function RA(e,t,n,r){let i=e.cleanup;if(i!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function FA(e,t,n,r,i,o,s){let a=eu(r),u=e.firstCreatePass&&$_(e),l=t[nn],d=H_(t),f=!0;if(r.type&3||s){let _=Kt(r,t),T=s?s(_):_,A=d.length,q=s?he=>s(yn(he[r.index])):r.index,B=null;if(!s&&a&&(B=RA(e,t,i,r.index)),B!==null){let he=B.__ngLastListenerFn__||B;he.__ngNextListenerFn__=o,B.__ngLastListenerFn__=o,f=!1}else{o=Lv(r,t,l,o,!1);let he=n.listen(T,i,o);d.push(o,he),u&&u.push(i,q,A,A+1)}}else o=Lv(r,t,l,o,!1);let p=r.outputs,g;if(f&&p!==null&&(g=p[i])){let _=g.length;if(_)for(let T=0;T<_;T+=2){let A=g[T],q=g[T+1],De=t[A][q].subscribe(o),It=d.length;d.push(o,De),u&&u.push(i,r.index,It,-(It+1))}}}function Fv(e,t,n,r){try{return An(6,t,n),n(r)!==!1}catch(i){return z_(e,i),!1}finally{An(7,t,n)}}function Lv(e,t,n,r,i){return function o(s){if(s===Function)return r;let a=e.componentOffset>-1?Mr(e.index,t):t;yh(a);let c=Fv(t,n,r,s),u=o.__ngNextListenerFn__;for(;u;)c=Fv(t,n,u,s)&&c,u=u.__ngNextListenerFn__;return i&&c===!1&&s.preventDefault(),c}}function me(e=1){return PI(e)}function LA(e,t){let n=null,r=JC(e);for(let i=0;i=e.data.length&&(e.data[n]=null,e.blueprint[n]=null),t[n]=r}function lD(e){let t=SI();return tu(t,it+e)}function Un(e,t=""){let n=fe(),r=ot(),i=e+it,o=r.firstCreatePass?_o(r,i,1,t,null):r.data[i],s=dD(r,n,o,t,e);n[i]=s,iu()&&cu(r,n,s,o),mi(o,!1)}var dD=(e,t,n,r,i)=>(Tr(!0),Xy(t[He],r));function jA(e,t,n,r,i){let o=t[rr],s=!o||ho()||fu(o,i);return Tr(s),s?Xy(t[He],r):mu(o,e,t,n)}function VA(){dD=jA}function UA(e){return an("",e,""),UA}function an(e,t,n){let r=fe(),i=HT(r,e,t,n);return i!==yi&&lT(r,po(),i),an}function BA(e,t,n){let r=ot();if(r.firstCreatePass){let i=or(e);Mf(n,r.data,r.blueprint,i,!0),Mf(t,r.data,r.blueprint,i,!1)}}function Mf(e,t,n,r,i){if(e=xt(e),Array.isArray(e))for(let o=0;o>20;if(uo(e)||!e.multi){let p=new ci(u,i,y),g=jd(c,t,i?l:l+f,d);g===-1?(qd(Pc(a,s),o,c),kd(o,e,t.length),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(p),s.push(p)):(n[g]=p,s[g]=p)}else{let p=jd(c,t,l+f,d),g=jd(c,t,l,l+f),_=p>=0&&n[p],T=g>=0&&n[g];if(i&&!T||!i&&!_){qd(Pc(a,s),o,c);let A=zA(i?$A:HA,n.length,i,r,u);!i&&T&&(n[g].providerFactory=A),kd(o,e,t.length,0),t.push(c),a.directiveStart++,a.directiveEnd++,i&&(a.providerIndexes+=1048576),n.push(A),s.push(A)}else{let A=fD(n[i?g:p],u,!i&&r);kd(o,e,p>-1?p:g,A)}!i&&r&&T&&n[g].componentProviders++}}}function kd(e,t,n,r){let i=uo(t),o=oS(t);if(i||o){let c=(o?xt(t.useClass):t).prototype.ngOnDestroy;if(c){let u=e.destroyHooks||(e.destroyHooks=[]);if(!i&&t.multi){let l=u.indexOf(n);l===-1?u.push(n,[r,c]):u[l+1].push(r,c)}else u.push(n,c)}}}function fD(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function jd(e,t,n,r){for(let i=n;i{n.providersResolver=(r,i)=>BA(r,i?i(e):e,t)}}var lr=class{},ms=class{};function hD(e,t){return new qc(e,t!=null?t:null,[])}var qc=class extends lr{constructor(t,n,r){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new $c(this);let i=Jv(t);this._bootstrapComponents=Gy(i.bootstrap),this._r3Injector=$y(t,n,[{provide:lr,useValue:this},{provide:kn,useValue:this.componentFactoryResolver},...r],wt(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},Af=class extends ms{constructor(t){super(),this.moduleType=t}create(t){return new qc(this.moduleType,t,[])}};var Yc=class extends lr{constructor(t){super(),this.componentFactoryResolver=new $c(this),this.instance=null;let n=new fs([...t.providers,{provide:lr,useValue:this},{provide:kn,useValue:this.componentFactoryResolver}],t.parent||Kf(),t.debugName,new Set(["environment"]));this.injector=n,t.runEnvironmentInitializers&&n.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function Ih(e,t,n=null){return new Yc({providers:e,parent:t,debugName:n,runEnvironmentInitializers:!0}).injector}var GA=(()=>{let t=class t{constructor(r){this._injector=r,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(r){if(!r.standalone)return null;if(!this.cachedInjectors.has(r)){let i=Vy(!1,r.type),o=i.length>0?Ih([i],this._injector,"Standalone[".concat(r.type.name,"]")):null;this.cachedInjectors.set(r,o)}return this.cachedInjectors.get(r)}ngOnDestroy(){try{for(let r of this.cachedInjectors.values())r!==null&&r.destroy()}finally{this.cachedInjectors.clear()}}};t.\u0275prov=S({token:t,providedIn:"environment",factory:()=>new t(I(on))});let e=t;return e})();function pD(e){Ts("NgStandalone"),e.getStandaloneInjector=t=>t.get(GA).getOrCreateStandaloneInjector(e)}function wz(e,t,n,r){return mD(fe(),Es(),e,t,n,r)}function bz(e,t,n,r,i){return gD(fe(),Es(),e,t,n,r,i)}function Sh(e,t){let n=e[t];return n===yi?void 0:n}function mD(e,t,n,r,i,o){let s=t+n;return ur(e,s,i)?Eh(e,s+1,o?r.call(o,i):r(i)):Sh(e,s+1)}function gD(e,t,n,r,i,o,s){let a=t+n;return Cf(e,a,i,o)?Eh(e,a+2,s?r.call(s,i,o):r(i,o)):Sh(e,a+2)}function WA(e,t,n,r,i,o,s,a,c){let u=t+n;return BT(e,u,i,o,s,a)?Eh(e,u+4,c?r.call(c,i,o,s,a):r(i,o,s,a)):Sh(e,u+4)}function cn(e,t){var c;let n=ot(),r,i=e+it;n.firstCreatePass?(r=qA(t,n.pipeRegistry),n.data[i]=r,r.onDestroy&&((c=n.destroyHooks)!=null?c:n.destroyHooks=[]).push(i,r.onDestroy)):r=n.data[i];let o=r.factory||(r.factory=si(r.type,!0)),s,a=Ut(y);try{let u=Nc(!1),l=o();return Nc(u),kA(n,fe(),i,l),l}finally{Ut(a)}}function qA(e,t){if(t)for(let n=t.length-1;n>=0;n--){let r=t[n];if(e===r.name)return r}}function un(e,t,n){let r=e+it,i=fe(),o=tu(i,r);return Mh(i,r)?mD(i,Es(),t,o.transform,n,o):o.transform(n)}function Cz(e,t,n,r){let i=e+it,o=fe(),s=tu(o,i);return Mh(o,i)?gD(o,Es(),t,s.transform,n,r,s):s.transform(n,r)}function Iz(e,t,n,r,i,o){let s=e+it,a=fe(),c=tu(a,s);return Mh(a,s)?WA(a,Es(),t,c.transform,n,r,i,o,c):c.transform(n,r,i,o)}function Mh(e,t){return e[te].data[t].pure}function YA(){return this._results[Symbol.iterator]()}var gs=class e{get changes(){return this._changes||(this._changes=new et)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;let n=e.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=YA)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;let r=QI(t);(this._changesDetected=!KI(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}},pt=(()=>{let t=class t{};t.__NG_ELEMENT_ID__=QA;let e=t;return e})(),ZA=pt,KA=class extends ZA{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){var t;return((t=this._declarationTContainer.tView)==null?void 0:t.ssrId)||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let i=pA(this._declarationLView,this._declarationTContainer,t,{injector:n,dehydratedView:r});return new fi(i)}};function QA(){return vu($t(),fe())}function vu(e,t){return e.type&4?new KA(t,e,yo(e,t)):null}var Of=class e{constructor(t){this.queryList=t,this.matches=null}clone(){return new e(this.queryList)}setDirty(){this.queryList.setDirty()}},xf=class e{constructor(t=[]){this.queries=t}createEmbeddedView(t){let n=t.queries;if(n!==null){let r=t.contentQueries!==null?t.contentQueries[0]:n.length,i=[];for(let o=0;o0)r.push(s[a/2]);else{let u=o[a+1],l=t[-c];for(let d=Bt;d{let t=class t{constructor(){var r;this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,o)=>{this.resolve=i,this.reject=o}),this.appInits=(r=v(bD,{optional:!0}))!=null?r:[]}runInitializers(){if(this.initialized)return;let r=[];for(let o of this.appInits){let s=o();if(xr(s))r.push(s);else if(Ch(s)){let a=new Promise((c,u)=>{s.subscribe({complete:c,error:u})});r.push(a)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(r).then(()=>{i()}).catch(o=>{this.reject(o)}),r.length===0&&i(),this.initialized=!0}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),yu=(()=>{let t=class t{log(r){console.log(r)}warn(r){console.warn(r)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"platform"});let e=t;return e})();function oO(){return typeof $localize<"u"&&$localize.locale||Wc}var xs=new D("LocaleId",{providedIn:"root",factory:()=>v(xs,se.Optional|se.SkipSelf)||oO()});var _u=(()=>{let t=class t{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new We(!1)}add(){this.hasPendingTasks.next(!0);let r=this.taskId++;return this.pendingTasks.add(r),r}remove(r){this.pendingTasks.delete(r),this.pendingTasks.size===0&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks.next(!1)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Ff=class{constructor(t,n){this.ngModuleFactory=t,this.componentFactories=n}},Oh=(()=>{let t=class t{compileModuleSync(r){return new Af(r)}compileModuleAsync(r){return Promise.resolve(this.compileModuleSync(r))}compileModuleAndAllComponentsSync(r){let i=this.compileModuleSync(r),o=Jv(r),s=Gy(o.declarations).reduce((a,c)=>{let u=ii(c);return u&&a.push(new hs(u)),a},[]);return new Ff(i,s)}compileModuleAndAllComponentsAsync(r){return Promise.resolve(this.compileModuleAndAllComponentsSync(r))}clearCache(){}clearCacheFor(r){}getModuleId(r){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var ID=new D("");var Sc=null;var SD=new D("PlatformDestroyListeners"),Eo=new D("appBootstrapListener");function sO(){Eg(()=>{throw new b(600,!1)})}function aO(e){return e.isBoundToModule}function cO(e=[]){if(Sc)return Sc;let t=lO(e);return Sc=t,sO(),uO(t),t}function uO(e){let t=e.get(Qf,null);t==null||t.forEach(n=>n())}function MD(e){try{let{rootComponent:t,appProviders:n,platformProviders:r}=e,i=cO(r),o=[gO(),...n||[]],a=new Yc({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(ue);return c.run(()=>{a.resolveInjectorInitializers();let u=a.get(cr,null),l;c.runOutsideAngular(()=>{l=c.onError.subscribe({next:p=>{u.handleError(p)}})});let d=()=>a.destroy(),f=i.get(SD);return f.add(d),a.onDestroy(()=>{l.unsubscribe(),f.delete(d)}),fO(u,c,()=>{let p=a.get(CD);return p.runInitializers(),p.donePromise.then(()=>{let g=a.get(xs,Wc);PA(g||Wc);let _=a.get(Nr);return t!==void 0&&_.bootstrap(t),_})})})}catch(t){return Promise.reject(t)}}function lO(e=[],t){return bt.create({name:t,providers:[{provide:su,useValue:"platform"},{provide:SD,useValue:new Set([()=>Sc=null])},...e]})}function dO(e){var t,n;return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:(t=e==null?void 0:e.eventCoalescing)!=null?t:!1,shouldCoalesceRunChangeDetection:(n=e==null?void 0:e.runCoalescing)!=null?n:!1}}function fO(e,t,n){try{let r=n();return xr(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}var Nr=(()=>{let t=class t{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=v(TD),this.zoneIsStable=v(K_),this.componentTypes=[],this.components=[],this.isStable=v(_u).hasPendingTasks.pipe(ee(r=>r?M(!1):this.zoneIsStable),Ue(),vt()),this._injector=v(on)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(r,i){let o=r instanceof Vc;if(!this._injector.get(CD).done){let g="Cannot bootstrap as there are still asynchronous initializers running."+(!o&&Xv(r)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new b(405,!1)}let a;o?a=r:a=this._injector.get(kn).resolveComponentFactory(r),this.componentTypes.push(a.componentType);let c=aO(a)?void 0:this._injector.get(lr),u=i||a.selector,l=a.create(bt.NULL,[],u,c),d=l.location.nativeElement,f=l.injector.get(ID,null);return f==null||f.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),Vd(this.components,l),f==null||f.unregisterApplication(d)}),this._loadComponent(l),l}tick(){if(this._runningTick)throw new b(101,!1);try{this._runningTick=!0;for(let r of this._views)r.detectChanges()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1}}attachView(r){let i=r;this._views.push(i),i.attachToAppRef(this)}detachView(r){let i=r;Vd(this._views,i),i.detachFromAppRef()}_loadComponent(r){this.attachView(r.hostView),this.tick(),this.components.push(r);let i=this._injector.get(Eo,[]);[...this._bootstrapListeners,...i].forEach(o=>o(r))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(r=>r()),this._views.slice().forEach(r=>r.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(r){return this._destroyListeners.push(r),()=>Vd(this._destroyListeners,r)}destroy(){if(this._destroyed)throw new b(406,!1);let r=this._injector;r.destroy&&!r.destroyed&&r.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function Vd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var TD=new D("",{providedIn:"root",factory:()=>v(cr).handleError.bind(void 0)});function hO(){let e=v(ue),t=v(cr);return n=>e.runOutsideAngular(()=>t.handleError(n))}var pO=(()=>{let t=class t{constructor(){this.zone=v(ue),this.applicationRef=v(Nr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){var r;(r=this._onMicrotaskEmptySubscription)==null||r.unsubscribe()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function mO(e){return[{provide:ue,useFactory:e},{provide:mo,multi:!0,useFactory:()=>{let t=v(pO,{optional:!0});return()=>t.initialize()}},{provide:TD,useFactory:hO},{provide:K_,useFactory:Q_}]}function gO(e){let t=mO(()=>new ue(dO(e)));return gi([[],t])}var Cr;function xh(e){Cr!=null||(Cr=new WeakMap);let t=Cr.get(e);if(t)return t;let n=e.isStable.pipe(mn(r=>r)).toPromise().then(()=>{});return Cr.set(e,n),e.onDestroy(()=>Cr==null?void 0:Cr.delete(e)),n}function AD(){return!1}var kv=!1;function vO(){kv||(kv=!0,gM(),TA(),VA(),xA(),IA(),wA(),hA(),$M())}function yO(e,t){return xh(e)}function OD(){return gi([{provide:yc,useFactory:()=>{let e=!0;if(pc()){let t=v(vi,{optional:!0});e=!!(t!=null&&t.get(I_,null))}return e&&Ts("NgHydration"),e}},{provide:mo,useValue:()=>{pc()&&v(yc)&&(_O(),vO())},multi:!0},{provide:x_,useFactory:()=>pc()&&v(yc)},{provide:Eo,useFactory:()=>{if(pc()&&v(yc)){let e=v(Nr),t=v(bt);return()=>{yO(e,t).then(()=>{ue.assertInAngularZone(),oA(e)})}}return()=>{}},multi:!0}])}function _O(){var n;let e=Is(),t;for(let r of e.body.childNodes)if(r.nodeType===Node.COMMENT_NODE&&((n=r.textContent)==null?void 0:n.trim())===pM){t=r;break}if(!t)throw new b(-507,!1)}function Ns(e){return typeof e=="boolean"?e:e!=null&&e!=="false"}var Nh=null;function gr(){return Nh}function LD(e){Nh||(Nh=e)}var Du=class{},le=new D("DocumentToken"),kD=(()=>{let t=class t{historyGo(r){throw new Error("Not implemented")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(wO))(),providedIn:"platform"});let e=t;return e})();var wO=(()=>{let t=class t extends kD{constructor(){super(),this._doc=v(le),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return gr().getBaseHref(this._doc)}onPopState(r){let i=gr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",r,!1),()=>i.removeEventListener("popstate",r)}onHashChange(r){let i=gr().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",r,!1),()=>i.removeEventListener("hashchange",r)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(r){this._location.pathname=r}pushState(r,i,o){this._history.pushState(r,i,o)}replaceState(r,i,o){this._history.replaceState(r,i,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(r=0){this._history.go(r)}getState(){return this._history.state}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>new t)(),providedIn:"platform"});let e=t;return e})();function jD(e,t){if(e.length==0)return t;if(t.length==0)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,n==2?e+t.substring(1):n==1?e+t:e+"/"+t}function xD(e){let t=e.match(/#|\?|$/),n=t&&t.index||e.length,r=n-(e[n-1]==="/"?1:0);return e.slice(0,r)+e.slice(n)}function _i(e){return e&&e[0]!=="?"?"?"+e:e}var wu=(()=>{let t=class t{historyGo(r){throw new Error("Not implemented")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(VD))(),providedIn:"root"});let e=t;return e})(),bO=new D("appBaseHref"),VD=(()=>{let t=class t extends wu{constructor(r,i){var o,s,a;super(),this._platformLocation=r,this._removeListenerFns=[],this._baseHref=(a=(s=i!=null?i:this._platformLocation.getBaseHrefFromDOM())!=null?s:(o=v(le).location)==null?void 0:o.origin)!=null?a:""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(r){this._removeListenerFns.push(this._platformLocation.onPopState(r),this._platformLocation.onHashChange(r))}getBaseHref(){return this._baseHref}prepareExternalUrl(r){return jD(this._baseHref,r)}path(r=!1){let i=this._platformLocation.pathname+_i(this._platformLocation.search),o=this._platformLocation.hash;return o&&r?"".concat(i).concat(o):i}pushState(r,i,o,s){let a=this.prepareExternalUrl(o+_i(s));this._platformLocation.pushState(r,i,a)}replaceState(r,i,o,s){let a=this.prepareExternalUrl(o+_i(s));this._platformLocation.replaceState(r,i,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(r=0){var i,o;(o=(i=this._platformLocation).historyGo)==null||o.call(i,r)}};t.\u0275fac=function(i){return new(i||t)(I(kD),I(bO,8))},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ps=(()=>{let t=class t{constructor(r){this._subject=new et,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=r;let i=this._locationStrategy.getBaseHref();this._basePath=SO(xD(ND(i))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){var r;(r=this._urlChangeSubscription)==null||r.unsubscribe(),this._urlChangeListeners=[]}path(r=!1){return this.normalize(this._locationStrategy.path(r))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(r,i=""){return this.path()==this.normalize(r+_i(i))}normalize(r){return t.stripTrailingSlash(IO(this._basePath,ND(r)))}prepareExternalUrl(r){return r&&r[0]!=="/"&&(r="/"+r),this._locationStrategy.prepareExternalUrl(r)}go(r,i="",o=null){this._locationStrategy.pushState(o,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+_i(i)),o)}replaceState(r,i="",o=null){this._locationStrategy.replaceState(o,"",r,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(r+_i(i)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(r=0){var i,o;(o=(i=this._locationStrategy).historyGo)==null||o.call(i,r)}onUrlChange(r){return this._urlChangeListeners.push(r),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{var o;let i=this._urlChangeListeners.indexOf(r);this._urlChangeListeners.splice(i,1),this._urlChangeListeners.length===0&&((o=this._urlChangeSubscription)==null||o.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(r="",i){this._urlChangeListeners.forEach(o=>o(r,i))}subscribe(r,i,o){return this._subject.subscribe({next:r,error:i,complete:o})}};t.normalizeQueryParams=_i,t.joinWithSlash=jD,t.stripTrailingSlash=xD,t.\u0275fac=function(i){return new(i||t)(I(wu))},t.\u0275prov=S({token:t,factory:()=>CO(),providedIn:"root"});let e=t;return e})();function CO(){return new Ps(I(wu))}function IO(e,t){if(!e||!t.startsWith(e))return t;let n=t.substring(e.length);return n===""||["/",";","?","#"].includes(n[0])?n:t}function ND(e){return e.replace(/\/index.html$/,"")}function SO(e){if(new RegExp("^(https?:)?//").test(e)){let[,n]=e.split(/\/\/[^\/]+/);return n}return e}function UD(e,t){t=encodeURIComponent(t);for(let n of e.split(";")){let r=n.indexOf("="),[i,o]=r==-1?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}var Yz=(()=>{let t=class t{constructor(r){this._viewContainerRef=r,this.ngComponentOutlet=null,this._inputsUsed=new Map}_needToReCreateNgModuleInstance(r){return r.ngComponentOutletNgModule!==void 0||r.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(r){return r.ngComponentOutlet!==void 0||r.ngComponentOutletContent!==void 0||r.ngComponentOutletInjector!==void 0||this._needToReCreateNgModuleInstance(r)}ngOnChanges(r){var i;if(this._needToReCreateComponentInstance(r)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let o=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(r)&&((i=this._moduleRef)==null||i.destroy(),this.ngComponentOutletNgModule?this._moduleRef=hD(this.ngComponentOutletNgModule,PD(o)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(PD(o)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:o,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let r of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(r,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){var r;(r=this._moduleRef)==null||r.destroy()}_applyInputStateDiff(r){for(let[i,o]of this._inputsUsed)o?(r.setInput(i,this.ngComponentOutletInputs[i]),this._inputsUsed.set(i,!1)):(r.setInput(i,void 0),this._inputsUsed.delete(i))}};t.\u0275fac=function(i){return new(i||t)(y(Nt))},t.\u0275dir=$({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[sn]});let e=t;return e})();function PD(e){return e.get(lr).injector}var Ph=class{constructor(t,n,r,i){this.$implicit=t,this.ngForOf=n,this.index=r,this.count=i}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Zz=(()=>{let t=class t{set ngForOf(r){this._ngForOf=r,this._ngForOfDirty=!0}set ngForTrackBy(r){this._trackByFn=r}get ngForTrackBy(){return this._trackByFn}constructor(r,i,o){this._viewContainer=r,this._template=i,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(r){r&&(this._template=r)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let r=this._ngForOf;if(!this._differ&&r)if(!1)try{}catch{}else this._differ=this._differs.find(r).create(this.ngForTrackBy)}if(this._differ){let r=this._differ.diff(this._ngForOf);r&&this._applyChanges(r)}}_applyChanges(r){let i=this._viewContainer;r.forEachOperation((o,s,a)=>{if(o.previousIndex==null)i.createEmbeddedView(this._template,new Ph(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)i.remove(s===null?void 0:s);else if(s!==null){let c=i.get(s);i.move(c,a),RD(c,o)}});for(let o=0,s=i.length;o{let s=i.get(o.currentIndex);RD(s,o)})}static ngTemplateContextGuard(r,i){return!0}};t.\u0275fac=function(i){return new(i||t)(y(Nt),y(pt),y(uh))},t.\u0275dir=$({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let e=t;return e})();function RD(e,t){e.context.$implicit=t.item}var Pt=(()=>{let t=class t{constructor(r,i){this._viewContainer=r,this._context=new Rh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(r){this._context.$implicit=this._context.ngIf=r,this._updateView()}set ngIfThen(r){FD("ngIfThen",r),this._thenTemplateRef=r,this._thenViewRef=null,this._updateView()}set ngIfElse(r){FD("ngIfElse",r),this._elseTemplateRef=r,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(r,i){return!0}};t.\u0275fac=function(i){return new(i||t)(y(Nt),y(pt))},t.\u0275dir=$({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let e=t;return e})(),Rh=class{constructor(){this.$implicit=null,this.ngIf=null}};function FD(e,t){if(!!!(!t||t.createEmbeddedView))throw new Error("".concat(e," must be a TemplateRef, but received '").concat(wt(t),"'."))}function MO(e,t){return new b(2100,!1)}var Fh=class{createSubscription(t,n){return ch(()=>t.subscribe({next:n,error:r=>{throw r}}))}dispose(t){ch(()=>t.unsubscribe())}},Lh=class{createSubscription(t,n){return t.then(n,r=>{throw r})}dispose(t){}},TO=new Lh,AO=new Fh,Bn=(()=>{let t=class t{constructor(r){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=r}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(r){return this._obj?r!==this._obj?(this._dispose(),this.transform(r)):this._latestValue:(r&&this._subscribe(r),this._latestValue)}_subscribe(r){this._obj=r,this._strategy=this._selectStrategy(r),this._subscription=this._strategy.createSubscription(r,i=>this._updateLatestValue(r,i))}_selectStrategy(r){if(xr(r))return TO;if(Ch(r))return AO;throw MO(t,r)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(r,i){r===this._obj&&(this._latestValue=i,this._ref.markForCheck())}};t.\u0275fac=function(i){return new(i||t)(y(gt,16))},t.\u0275pipe=pi({name:"async",type:t,pure:!1,standalone:!0});let e=t;return e})();var Rt=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({});let e=t;return e})(),kh="browser",OO="server";function BD(e){return e===kh}function Rs(e){return e===OO}var Eu=class{};var Cu=class e{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split("\n").forEach(n=>{let r=n.indexOf(":");if(r>0){let i=n.slice(0,r),o=i.toLowerCase(),s=n.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((n,r)=>{this.setHeaderEntries(r,n)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([n,r])=>{this.setHeaderEntries(n,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let n=this.headers.get(t.toLowerCase());return n&&n.length>0?n[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,n){return this.clone({name:t,value:n,op:"a"})}set(t,n){return this.clone({name:t,value:n,op:"s"})}delete(t,n){return this.clone({name:t,value:n,op:"d"})}maybeSetNormalizedName(t,n){this.normalizedNames.has(n)||this.normalizedNames.set(n,t)}init(){this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(n=>{this.headers.set(n,t.headers.get(n)),this.normalizedNames.set(n,t.normalizedNames.get(n))})}clone(t){let n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n}applyUpdate(t){let n=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,n);let i=(t.op==="a"?this.headers.get(n):void 0)||[];i.push(...r),this.headers.set(n,i);break;case"d":let o=t.value;if(!o)this.headers.delete(n),this.normalizedNames.delete(n);else{let s=this.headers.get(n);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(n),this.normalizedNames.delete(n)):this.headers.set(n,s)}break}}setHeaderEntries(t,n){let r=(Array.isArray(n)?n:[n]).map(o=>o.toString()),i=t.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(t,i)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(n=>t(this.normalizedNames.get(n),this.headers.get(n)))}};var YD=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(YD||{}),jh=class{constructor(t,n=200,r="OK"){this.headers=t.headers||new Cu,this.status=t.status!==void 0?t.status:n,this.statusText=t.statusText||r,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}};var Iu=class e extends jh{constructor(t={}){super(t),this.type=YD.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new e({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}};var NO=new D("");var HD="b",$D="h",zD="s",GD="st",WD="u",qD="rt",bu=new D(""),PO=["GET","HEAD"];function RO(e,t){var d;let l=v(bu),{isCacheActive:n}=l,r=mg(l,["isCacheActive"]),{transferCache:i,method:o}=e;if(!n||o==="POST"&&!r.includePostRequests&&!i||o!=="POST"&&!PO.includes(o)||i===!1||((d=r.filter)==null?void 0:d.call(r,e))===!1)return t(e);let s=v(vi),a=LO(e),c=s.get(a,null),u=r.includeHeaders;if(typeof i=="object"&&i.includeHeaders&&(u=i.includeHeaders),c){let{[HD]:f,[qD]:p,[$D]:g,[zD]:_,[GD]:T,[WD]:A}=c,q=f;switch(p){case"arraybuffer":q=new TextEncoder().encode(f).buffer;break;case"blob":q=new Blob([f]);break}let B=new Cu(g);return M(new Iu({body:q,headers:B,status:_,statusText:T,url:A}))}return t(e).pipe(Ne(f=>{f instanceof Iu&&s.set(a,{[HD]:f.body,[$D]:FO(f.headers,u),[zD]:f.status,[GD]:f.statusText,[WD]:f.url||"",[qD]:e.responseType})}))}function FO(e,t){if(!t)return{};let n={};for(let r of t){let i=e.getAll(r);i!==null&&(n[r]=i)}return n}function LO(e){let{params:t,method:n,responseType:r,url:i}=e,o=t.keys().sort().map(c=>"".concat(c,"=").concat(t.getAll(c))).join("&"),s=n+"."+r+"."+i+"?"+o,a=kO(s);return a}function kO(e){let t=0;for(let n of e)t=Math.imul(31,t)+n.charCodeAt(0)<<0;return t+=2147483647+1,t.toString()}function ZD(e){return[{provide:bu,useFactory:()=>(Ts("NgHttpTransferCache"),R({isCacheActive:!0},e))},{provide:NO,useValue:RO,multi:!0,deps:[vi,bu]},{provide:Eo,multi:!0,useFactory:()=>{let t=v(Nr),n=v(bu);return()=>{xh(t).then(()=>{n.isCacheActive=!1})}}}]}var Bh=class extends Du{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Hh=class e extends Bh{static makeCurrent(){LD(new e)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,n){return n=n||this.getDefaultDocument(),n.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return n==="window"?window:n==="document"?t:n==="body"?t.body:null}getBaseHref(t){let n=jO();return n==null?null:VO(n)}resetBaseElement(){Fs=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return UD(document.cookie,t)}},Fs=null;function jO(){return Fs=Fs||document.querySelector("base"),Fs?Fs.getAttribute("href"):null}function VO(e){return new URL(e,"http://a").pathname}var UO=(()=>{let t=class t{build(){return new XMLHttpRequest}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),wo=new D("EventManagerPlugins"),JD=(()=>{let t=class t{constructor(r,i){this._zone=i,this._eventNameToPlugin=new Map,r.forEach(o=>{o.manager=this}),this._plugins=r.slice().reverse()}addEventListener(r,i,o){return this._findPluginFor(i).addEventListener(r,i,o)}getZone(){return this._zone}_findPluginFor(r){let i=this._eventNameToPlugin.get(r);if(i)return i;if(i=this._plugins.find(s=>s.supports(r)),!i)throw new b(5101,!1);return this._eventNameToPlugin.set(r,i),i}};t.\u0275fac=function(i){return new(i||t)(I(wo),I(ue))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),Su=class{constructor(t){this._doc=t}},Vh="ng-app-id",e0=(()=>{let t=class t{constructor(r,i,o,s={}){this.doc=r,this.appId=i,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Rs(s),this.resetHostNodes()}addStyles(r){for(let i of r)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(r){for(let i of r)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let r=this.styleNodesInDOM;r&&(r.forEach(i=>i.remove()),r.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(r){this.hostNodes.add(r);for(let i of this.getAllStyles())this.addStyleToHost(r,i)}removeHost(r){this.hostNodes.delete(r)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(r){for(let i of this.hostNodes)this.addStyleToHost(i,r)}onStyleRemoved(r){var o,s;let i=this.styleRef;(s=(o=i.get(r))==null?void 0:o.elements)==null||s.forEach(a=>a.remove()),i.delete(r)}collectServerRenderedStyles(){var i;let r=(i=this.doc.head)==null?void 0:i.querySelectorAll("style[".concat(Vh,'="').concat(this.appId,'"]'));if(r!=null&&r.length){let o=new Map;return r.forEach(s=>{s.textContent!=null&&o.set(s.textContent,s)}),o}return null}changeUsageCount(r,i){let o=this.styleRef;if(o.has(r)){let s=o.get(r);return s.usage+=i,s.usage}return o.set(r,{usage:i,elements:[]}),i}getStyleElement(r,i){let o=this.styleNodesInDOM,s=o==null?void 0:o.get(i);if((s==null?void 0:s.parentNode)===r)return o.delete(i),s.removeAttribute(Vh),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=i,this.platformIsServer&&a.setAttribute(Vh,this.appId),r.appendChild(a),a}}addStyleToHost(r,i){var c;let o=this.getStyleElement(r,i),s=this.styleRef,a=(c=s.get(i))==null?void 0:c.elements;a?a.push(o):s.set(i,{elements:[o],usage:1})}resetHostNodes(){let r=this.hostNodes;r.clear(),r.add(this.doc.head)}};t.\u0275fac=function(i){return new(i||t)(I(le),I(au),I(Xf,8),I(Qt))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),Uh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},zh=/%COMP%/g,t0="%COMP%",BO="_nghost-".concat(t0),HO="_ngcontent-".concat(t0),$O=!0,zO=new D("RemoveStylesOnCompDestroy",{providedIn:"root",factory:()=>$O});function GO(e){return HO.replace(zh,e)}function WO(e){return BO.replace(zh,e)}function n0(e,t){return t.map(n=>n.replace(zh,e))}var KD=(()=>{let t=class t{constructor(r,i,o,s,a,c,u,l=null){this.eventManager=r,this.sharedStylesHost=i,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=u,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Rs(c),this.defaultRenderer=new Ls(r,a,u,this.platformIsServer)}createRenderer(r,i){if(!r||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===Pn.ShadowDom&&(i=Ve(R({},i),{encapsulation:Pn.Emulated}));let o=this.getOrCreateRenderer(r,i);return o instanceof Mu?o.applyToHost(r):o instanceof ks&&o.applyStyles(),o}getOrCreateRenderer(r,i){let o=this.rendererByCompId,s=o.get(i.id);if(!s){let a=this.doc,c=this.ngZone,u=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(i.encapsulation){case Pn.Emulated:s=new Mu(u,l,i,this.appId,d,a,c,f);break;case Pn.ShadowDom:return new $h(u,l,r,i,a,c,this.nonce,f);default:s=new ks(u,l,i,d,a,c,f);break}o.set(i.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};t.\u0275fac=function(i){return new(i||t)(I(JD),I(e0),I(au),I(zO),I(le),I(Qt),I(ue),I(Xf))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),Ls=class{constructor(t,n,r,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(Uh[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(QD(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(QD(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new b(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;let o=Uh[i];o?t.setAttributeNS(o,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){let i=Uh[r];i?t.removeAttributeNS(i,n):t.removeAttribute("".concat(r,":").concat(n))}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(sr.DashCase|sr.Important)?t.style.setProperty(n,r,i&sr.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&sr.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){t!=null&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r){if(typeof t=="string"&&(t=gr().getGlobalEventTarget(this.doc,t),!t))throw new Error("Unsupported event target ".concat(t," for event ").concat(n));return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if(n==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))===!1&&n.preventDefault()}}};function QD(e){return e.tagName==="TEMPLATE"&&e.content!==void 0}var $h=class extends Ls{constructor(t,n,r,i,o,s,a,c){super(t,o,s,c),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=n0(i.id,i.styles);for(let l of u){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(this.nodeOrShadowRoot(t),n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},ks=class extends Ls{constructor(t,n,r,i,o,s,a,c){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i,this.styles=c?n0(c,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},Mu=class extends ks{constructor(t,n,r,i,o,s,a,c){let u=i+"-"+r.id;super(t,n,r,o,s,a,c,u),this.contentAttr=GO(u),this.hostAttr=WO(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){let r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}},qO=(()=>{let t=class t extends Su{constructor(r){super(r)}supports(r){return!0}addEventListener(r,i,o){return r.addEventListener(i,o,!1),()=>this.removeEventListener(r,i,o)}removeEventListener(r,i,o){return r.removeEventListener(i,o)}};t.\u0275fac=function(i){return new(i||t)(I(le))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),XD=["alt","control","meta","shift"],YO={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ZO={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey},KO=(()=>{let t=class t extends Su{constructor(r){super(r)}supports(r){return t.parseEventName(r)!=null}addEventListener(r,i,o){let s=t.parseEventName(i),a=t.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>gr().onAndCancel(r,s.domEventName,a))}static parseEventName(r){let i=r.toLowerCase().split("."),o=i.shift();if(i.length===0||!(o==="keydown"||o==="keyup"))return null;let s=t._normalizeKey(i.pop()),a="",c=i.indexOf("code");if(c>-1&&(i.splice(c,1),a="code."),XD.forEach(l=>{let d=i.indexOf(l);d>-1&&(i.splice(d,1),a+=l+".")}),a+=s,i.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=a,u}static matchEventFullKeyCode(r,i){let o=YO[r.key]||r.key,s="";return i.indexOf("code.")>-1&&(o=r.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),XD.forEach(a=>{if(a!==o){let c=ZO[a];c(r)&&(s+=a+".")}}),s+=o,s===i)}static eventCallback(r,i,o){return s=>{t.matchEventFullKeyCode(s,r)&&o.runGuarded(()=>i(s))}}static _normalizeKey(r){return r==="esc"?"escape":r}};t.\u0275fac=function(i){return new(i||t)(I(le))},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})();function wG(e,t){return MD(R({rootComponent:e},QO(t)))}function QO(e){var t;return{appProviders:[...nx,...(t=e==null?void 0:e.providers)!=null?t:[]],platformProviders:tx}}function XO(){Hh.makeCurrent()}function JO(){return new cr}function ex(){return zy(document),document}var tx=[{provide:Qt,useValue:kh},{provide:Qf,useValue:XO,multi:!0},{provide:le,useFactory:ex,deps:[]}];var nx=[{provide:su,useValue:"root"},{provide:cr,useFactory:JO,deps:[]},{provide:wo,useClass:qO,multi:!0,deps:[le,ue,Qt]},{provide:wo,useClass:KO,multi:!0,deps:[le]},KD,e0,JD,{provide:li,useExisting:KD},{provide:Eu,useClass:UO,deps:[]},[]];function rx(){return new Gh(I(le))}var Gh=(()=>{let t=class t{constructor(r){this._doc=r}getTitle(){return this._doc.title}setTitle(r){this._doc.title=r||""}};t.\u0275fac=function(i){return new(i||t)(I(le))},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new i:o=rx(),o},providedIn:"root"});let e=t;return e})();var js=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new(i||t):o=I(r0),o},providedIn:"root"});let e=t;return e})();function ix(e){return new r0(e.get(le))}var r0=(()=>{let t=class t extends js{constructor(r){super(),this._doc=r}sanitize(r,i){if(i==null)return null;switch(r){case mt.NONE:return i;case mt.HTML:return Or(i,"HTML")?Ln(i):ih(this._doc,String(i)).toString();case mt.STYLE:return Or(i,"Style")?Ln(i):i;case mt.SCRIPT:if(Or(i,"Script"))return Ln(i);throw new b(5200,!1);case mt.URL:return Or(i,"URL")?Ln(i):lu(String(i));case mt.RESOURCE_URL:if(Or(i,"ResourceURL"))return Ln(i);throw new b(5201,!1);default:throw new b(5202,!1)}}bypassSecurityTrustHtml(r){return d_(r)}bypassSecurityTrustStyle(r){return f_(r)}bypassSecurityTrustScript(r){return h_(r)}bypassSecurityTrustUrl(r){return p_(r)}bypassSecurityTrustResourceUrl(r){return m_(r)}};t.\u0275fac=function(i){return new(i||t)(I(le))},t.\u0275prov=S({token:t,factory:function(i){let o=null;return i?o=new i:o=ix(I(bt)),o},providedIn:"root"});let e=t;return e})();function bG(...e){let t=[],n=new Set,r=n.has(1);for(let{\u0275providers:i,\u0275kind:o}of e)n.add(o),i.length&&t.push(i);return gi([[],OD(),n.has(0)||r?[]:ZD({}),t])}var f0=(()=>{let t=class t{constructor(r,i){this._renderer=r,this._elementRef=i,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(r,i){this._renderer.setProperty(this._elementRef.nativeElement,r,i)}registerOnTouched(r){this.onTouched=r}registerOnChange(r){this.onChange=r}setDisabledState(r){this.setProperty("disabled",r)}};t.\u0275fac=function(i){return new(i||t)(y(mr),y(X))},t.\u0275dir=$({type:t});let e=t;return e})(),h0=(()=>{let t=class t extends f0{};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,features:[$e]});let e=t;return e})(),Kh=new D("NgValueAccessor");var sx={provide:Kh,useExisting:dr(()=>p0),multi:!0};function ax(){let e=gr()?gr().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}var cx=new D("CompositionEventMode"),p0=(()=>{let t=class t extends f0{constructor(r,i,o){super(r,i),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!ax())}writeValue(r){let i=r==null?"":r;this.setProperty("value",i)}_handleInput(r){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(r)}_compositionStart(){this._composing=!0}_compositionEnd(r){this._composing=!1,this._compositionMode&&this.onChange(r)}};t.\u0275fac=function(i){return new(i||t)(y(mr),y(X),y(cx,8))},t.\u0275dir=$({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,o){i&1&&nt("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[ze([sx]),$e]});let e=t;return e})();function ux(e){return e==null||(typeof e=="string"||Array.isArray(e))&&e.length===0}var m0=new D("NgValidators"),lx=new D("NgAsyncValidators");function dx(e){return ux(e.value)?{required:!0}:null}function i0(e){return null}function g0(e){return e!=null}function v0(e){return xr(e)?Oe(e):e}function y0(e){let t={};return e.forEach(n=>{t=n!=null?R(R({},t),n):t}),Object.keys(t).length===0?null:t}function _0(e,t){return t.map(n=>n(e))}function fx(e){return!e.validate}function D0(e){return e.map(t=>fx(t)?t:n=>t.validate(n))}function hx(e){if(!e)return null;let t=e.filter(g0);return t.length==0?null:function(n){return y0(_0(n,t))}}function E0(e){return e!=null?hx(D0(e)):null}function px(e){if(!e)return null;let t=e.filter(g0);return t.length==0?null:function(n){let r=_0(n,t).map(v0);return md(r).pipe(w(y0))}}function w0(e){return e!=null?px(D0(e)):null}function o0(e,t){return e===null?[t]:Array.isArray(e)?[...e,t]:[e,t]}function mx(e){return e._rawValidators}function gx(e){return e._rawAsyncValidators}function Wh(e){return e?Array.isArray(e)?e:[e]:[]}function Au(e,t){return Array.isArray(e)?e.includes(t):e===t}function s0(e,t){let n=Wh(t);return Wh(e).forEach(i=>{Au(n,i)||n.push(i)}),n}function a0(e,t){return Wh(t).filter(n=>!Au(e,n))}var Ou=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=E0(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=w0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,n){return this.control?this.control.hasError(t,n):!1}getError(t,n){return this.control?this.control.getError(t,n):null}},qh=class extends Ou{get formDirective(){return null}get path(){return null}},Ei=class extends Ou{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Yh=class{constructor(t){this._cd=t}get isTouched(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.touched)}get isUntouched(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.untouched)}get isPristine(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.pristine)}get isDirty(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.dirty)}get isValid(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.valid)}get isInvalid(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.invalid)}get isPending(){var t,n;return!!((n=(t=this._cd)==null?void 0:t.control)!=null&&n.pending)}get isSubmitted(){var t;return!!((t=this._cd)!=null&&t.submitted)}},vx={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},UG=Ve(R({},vx),{"[class.ng-submitted]":"isSubmitted"}),BG=(()=>{let t=class t extends Yh{constructor(r){super(r)}};t.\u0275fac=function(i){return new(i||t)(y(Ei,2))},t.\u0275dir=$({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,o){i&2&&Xe("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[$e]});let e=t;return e})();var Vs="VALID",Tu="INVALID",bo="PENDING",Us="DISABLED";function yx(e){return(xu(e)?e.validators:e)||null}function _x(e){return Array.isArray(e)?E0(e):e||null}function Dx(e,t){return(xu(t)?t.asyncValidators:e)||null}function Ex(e){return Array.isArray(e)?w0(e):e||null}function xu(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}var Zh=class{constructor(t,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Vs}get invalid(){return this.status===Tu}get pending(){return this.status==bo}get disabled(){return this.status===Us}get enabled(){return this.status!==Us}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(s0(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(s0(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(a0(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(a0(t,this._rawAsyncValidators))}hasValidator(t){return Au(this._rawValidators,t)}hasAsyncValidator(t){return Au(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=bo,t.emitEvent!==!1&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Us,this.errors=null,this._forEachChild(r=>{r.disable(Ve(R({},t),{onlySelf:!0}))}),this._updateValue(),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Ve(R({},t),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let n=this._parentMarkedDirty(t.onlySelf);this.status=Vs,this._forEachChild(r=>{r.enable(Ve(R({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Ve(R({},t),{skipPristineCheck:n})),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Vs||this.status===bo)&&this._runAsyncValidator(t.emitEvent)),t.emitEvent!==!1&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Us:Vs}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=bo,this._hasOwnPendingAsyncValidator=!0;let n=v0(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(r,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,n={}){this.errors=t,this._updateControlsErrors(n.emitEvent!==!1)}get(t){let n=t;return n==null||(Array.isArray(n)||(n=n.split(".")),n.length===0)?null:n.reduce((r,i)=>r&&r._find(i),this)}getError(t,n){let r=n?this.get(n):this;return r&&r.errors?r.errors[t]:null}hasError(t,n){return!!this.getError(t,n)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new et,this.statusChanges=new et}_calculateStatus(){return this._allControlsDisabled()?Us:this.errors?Tu:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(bo)?bo:this._anyControlsHaveStatus(Tu)?Tu:Vs}_anyControlsHaveStatus(t){return this._anyControls(n=>n.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){xu(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let n=this._parent&&this._parent.dirty;return!t&&!!n&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=_x(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Ex(this._rawAsyncValidators)}};var b0=new D("CallSetDisabledState",{providedIn:"root",factory:()=>Qh}),Qh="always";function wx(e,t){return[...t.path,e]}function bx(e,t,n=Qh){var r,i;Ix(e,t),t.valueAccessor.writeValue(e.value),(e.disabled||n==="always")&&((i=(r=t.valueAccessor).setDisabledState)==null||i.call(r,e.disabled)),Sx(e,t),Tx(e,t),Mx(e,t),Cx(e,t)}function c0(e,t){e.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(t)})}function Cx(e,t){if(t.valueAccessor.setDisabledState){let n=r=>{t.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(n),t._registerOnDestroy(()=>{e._unregisterOnDisabledChange(n)})}}function Ix(e,t){let n=mx(e);t.validator!==null?e.setValidators(o0(n,t.validator)):typeof n=="function"&&e.setValidators([n]);let r=gx(e);t.asyncValidator!==null?e.setAsyncValidators(o0(r,t.asyncValidator)):typeof r=="function"&&e.setAsyncValidators([r]);let i=()=>e.updateValueAndValidity();c0(t._rawValidators,i),c0(t._rawAsyncValidators,i)}function Sx(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,e.updateOn==="change"&&C0(e,t)})}function Mx(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,e.updateOn==="blur"&&e._pendingChange&&C0(e,t),e.updateOn!=="submit"&&e.markAsTouched()})}function C0(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Tx(e,t){let n=(r,i)=>{t.valueAccessor.writeValue(r),i&&t.viewToModelUpdate(r)};e.registerOnChange(n),t._registerOnDestroy(()=>{e._unregisterOnChange(n)})}function Ax(e,t){if(!e.hasOwnProperty("model"))return!1;let n=e.model;return n.isFirstChange()?!0:!Object.is(t,n.currentValue)}function Ox(e){return Object.getPrototypeOf(e.constructor)===h0}function xx(e,t){if(!t)return null;Array.isArray(t);let n,r,i;return t.forEach(o=>{o.constructor===p0?n=o:Ox(o)?r=o:i=o}),i||r||n||null}function u0(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function l0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===2&&"value"in e&&"disabled"in e}var Nx=class extends Zh{constructor(t=null,n,r){super(yx(n),Dx(r,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),xu(n)&&(n.nonNullable||n.initialValueIsDefault)&&(l0(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,n={}){this.value=this._pendingValue=t,this._onChange.length&&n.emitModelToViewChange!==!1&&this._onChange.forEach(r=>r(this.value,n.emitViewToModelChange!==!1)),this.updateValueAndValidity(n)}patchValue(t,n={}){this.setValue(t,n)}reset(t=this.defaultValue,n={}){this._applyFormState(t),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){u0(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){u0(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){l0(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Px={provide:Ei,useExisting:dr(()=>Nu)},d0=(()=>Promise.resolve())(),Nu=(()=>{let t=class t extends Ei{constructor(r,i,o,s,a,c){super(),this._changeDetectorRef=a,this.callSetDisabledState=c,this.control=new Nx,this._registered=!1,this.name="",this.update=new et,this._parent=r,this._setValidators(i),this._setAsyncValidators(o),this.valueAccessor=xx(this,s)}ngOnChanges(r){if(this._checkForErrors(),!this._registered||"name"in r){if(this._registered&&(this._checkName(),this.formDirective)){let i=r.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in r&&this._updateDisabled(r),Ax(r,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(r){this.viewModel=r,this.update.emit(r)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){bx(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(r){d0.then(()=>{var i;this.control.setValue(r,{emitViewToModelChange:!1}),(i=this._changeDetectorRef)==null||i.markForCheck()})}_updateDisabled(r){let i=r.isDisabled.currentValue,o=i!==0&&Ns(i);d0.then(()=>{var s;o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),(s=this._changeDetectorRef)==null||s.markForCheck()})}_getPath(r){return this._parent?wx(r,this._parent):[r]}};t.\u0275fac=function(i){return new(i||t)(y(qh,9),y(m0,10),y(lx,10),y(Kh,10),y(gt,8),y(b0,8))},t.\u0275dir=$({type:t,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[ze([Px]),$e,sn]});let e=t;return e})();var Rx=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({});let e=t;return e})();var Fx={provide:Kh,useExisting:dr(()=>Lx),multi:!0},Lx=(()=>{let t=class t extends h0{writeValue(r){this.setProperty("value",parseFloat(r))}registerOnChange(r){this.onChange=i=>{r(i==""?null:parseFloat(i))}}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,o){i&1&&nt("change",function(a){return o.onChange(a.target.value)})("input",function(a){return o.onChange(a.target.value)})("blur",function(){return o.onTouched()})},features:[ze([Fx]),$e]});let e=t;return e})();var kx=(()=>{let t=class t{constructor(){this._validator=i0}ngOnChanges(r){if(this.inputName in r){let i=this.normalizeInput(r[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):i0,this._onChange&&this._onChange()}}validate(r){return this._validator(r)}registerOnValidatorChange(r){this._onChange=r}enabled(r){return r!=null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=$({type:t,features:[sn]});let e=t;return e})();var jx={provide:m0,useExisting:dr(()=>Vx),multi:!0};var Vx=(()=>{let t=class t extends kx{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Ns,this.createValidator=r=>dx}enabled(r){return r}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275dir=$({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,o){i&2&&at("required",o._enabled?"":null)},inputs:{required:"required"},features:[ze([jx]),$e]});let e=t;return e})();var Ux=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({imports:[Rx]});let e=t;return e})();var $G=(()=>{let t=class t{static withConfig(r){var i;return{ngModule:t,providers:[{provide:b0,useValue:(i=r.callSetDisabledState)!=null?i:Qh}]}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=K({type:t}),t.\u0275inj=Z({imports:[Ux]});let e=t;return e})();var de=new D("An abstraction over global window object",{factory:()=>{let{defaultView:e}=v(le);if(!e)throw new Error("Window is not available");return e}}),En=new D("Shared Observable based on `window.requestAnimationFrame`",{factory:()=>{let{requestAnimationFrame:e,cancelAnimationFrame:t}=v(de);return new N(r=>{let i=NaN,o=s=>{r.next(s),i=e(o)};return i=e(o),()=>{t(i)}}).pipe(vt())}}),ZG=new D("An abstraction over window.caches object",{factory:()=>v(de).caches}),KG=new D("An abstraction over window.crypto object",{factory:()=>v(de).crypto}),QG=new D("An abstraction over window.CSS object",{factory:()=>v(de).CSS||{escape:e=>e,supports:()=>!1}}),XG=new D("An abstraction over window.history object",{factory:()=>v(de).history}),JG=new D("An abstraction over window.localStorage object",{factory:()=>v(de).localStorage}),e3=new D("An abstraction over window.location object",{factory:()=>v(de).location}),Co=new D("An abstraction over window.navigator object",{factory:()=>v(de).navigator}),t3=new D("An abstraction over window.navigator.mediaDevices object",{factory:()=>v(Co).mediaDevices}),n3=new D("An abstraction over window.navigator.connection object",{factory:()=>v(Co).connection||null}),r3=new D("Shared Observable based on `document visibility changed`",{factory:()=>{let e=v(le);return Tn(e,"visibilitychange").pipe(_e(0),w(()=>e.visibilityState!=="hidden"),Ue(),Wt({refCount:!1,bufferSize:1}))}}),I0=new D("An abstraction over window.performance object",{factory:()=>v(de).performance}),i3=new D("An abstraction over window.screen object",{factory:()=>v(de).screen}),o3=new D("An abstraction over window.sessionStorage object",{factory:()=>v(de).sessionStorage}),s3=new D("An abstraction over SpeechRecognition class",{factory:()=>{let e=v(de);return e.speechRecognition||e.webkitSpeechRecognition||null}}),a3=new D("An abstraction over window.speechSynthesis object",{factory:()=>v(de).speechSynthesis}),Xh=new D("An abstraction over window.navigator.userAgent object",{factory:()=>v(Co).userAgent});var Hn="*";function Ge(e,t){return{type:7,name:e,definitions:t,options:{}}}function G(e,t=null){return{type:4,styles:t,timings:e}}function S0(e,t=null){return{type:2,steps:e,options:t}}function E(e){return{type:6,styles:e,offset:null}}function ae(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}function M0(e=null){return{type:9,options:e}}function ct(e,t,n=null){return{type:11,selector:e,animation:t,options:n}}function yt(e,t){return{type:12,timings:e,animation:t}}var Pr=class{constructor(t=0,n=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+n}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let n=t=="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},Bs=class{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let n=0,r=0,i=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++n==o&&this._onFinish()}),s.onDestroy(()=>{++r==o&&this._onDestroy()}),s.onStart(()=>{++i==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let n=t*this.totalTime;this.players.forEach(r=>{let i=r.totalTime?Math.min(1,n/r.totalTime):1;r.setPosition(i)})}getPosition(){let t=this.players.reduce((n,r)=>n===null||r.totalTime>n.totalTime?r:n,null);return t!=null?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let n=t=="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},Pu="!";var Rr=()=>!1,Io=()=>!0,f3=79,T0={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},h3=new gs,Jh=[],ep=()=>{},A0=Object.assign(Object.assign({},T0),{toJSON(){return T0}}),p3=e=>String(e);function Hx(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length}var m3=(e,t)=>e===t||Hx(e,t),g3=Ge("tuiParentAnimation",[ae(":leave",[ct(":scope > *",[M0()],{optional:!0})])]),v3=Ge("tuiParentStop",[ae(":enter",[])]),So=1e3/15,O0=e=>"ownerSVGElement"in e?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,x0="\xA0",y3="\u2013";var N0="3.57.0";var P0="edge/";function D3(e,t){return parseInt(t.slice(t.toLowerCase().indexOf(P0)+P0.length),10)=t&&e=n?n:Math.round(e)}var $x=292;function zx(e,t,n){if(e===1/0)return e;t=Math.min(t,$x);let r="".concat(e,"e").split("e"),i=n(Number("".concat(r[0],"e").concat(Number(r[1])+t))),o="".concat(i,"e").split("e");return Number("".concat(o[0],"e").concat(Number(o[1])-t))}function I3(e,t=0){return zx(e,t,Math.round)}function F0(e,t){return e.slice(0,Math.max(t,0)).concat(e.slice(Math.max(t+1,0)))}function yr(e){return typeof e=="string"}function Ee(e){return ie(()=>e)}function ie(e){return new D("",{factory:e})}function L0(e){return e<.5?2*e*e:-1+(4-2*e)*e}function k0(e){return!e}function wi(e){return e!=null}function T3(e,t,n){return e===null?t===null:t===null?!1:n(e,t)}function Gx(e,t,n){let r=e;for(;r!==t.parentElement;){if(Math.floor(r.scrollTop)>0&&!n||Math.ceil(r.scrollTop+r.clientHeight)0&&!n||Math.ceil(r.scrollLeft+r.clientWidth)!e.contains(_));return g.length===4?g:null}function P3(e,t){let{offsetTop:n,offsetLeft:r,offsetParent:i}=t;for(;Mo(i)&&i!==e;)n+=i.offsetTop,r+=i.offsetLeft,i=i.offsetParent;return{offsetTop:n,offsetLeft:r}}function Lu(e,t=!0){return e===null?null:t&&e.scrollHeight>e.clientHeight||!t&&e.scrollWidth>e.clientWidth?e:Lu(e.parentElement,t)}function R3(e){return Zx(e)&&!e.readOnly||!!e.isContentEditable}function F3(e=0,t=0){let n={x:e,y:t,left:e,right:e,top:t,bottom:t,width:0,height:0};return Object.assign(Object.assign({},n),{toJSON(){return n}})}function L3(e){return"explicitOriginalTarget"in e?(e==null?void 0:e.explicitOriginalTarget)!==e.target:"pointerId"in e?e.pointerId===-1:"detail"in e&&"webkitForce"in e?(e==null?void 0:e.detail)===0:!1}function tp({activeElement:e}){if(!(e!=null&&e.shadowRoot))return e;let t=e.shadowRoot.activeElement;for(;t!=null&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function U0(e){let t=tp(e);Mo(t)&&t.blur()}function B0(e){if(e.hasAttribute("disabled")||e.getAttribute("tabIndex")==="-1")return!1;if(Mo(e)&&e.isContentEditable||e.getAttribute("tabIndex")==="0")return!0;switch(e.tagName){case"BUTTON":case"SELECT":case"TEXTAREA":return!0;case"VIDEO":case"AUDIO":return e.hasAttribute("controls");case"INPUT":return e.getAttribute("type")!=="hidden";case"A":case"LINK":return e.hasAttribute("href");default:return!1}}function Kx(e){return!e.hasAttribute("disabled")&&(e.getAttribute("tabIndex")==="-1"||B0(e))}function U3({initial:e,root:t,previous:n=!1,keyboard:r=!0}){if(!t.ownerDocument)return null;let i=r?B0:Kx,o=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,O0);for(o.currentNode=e;n?o.previousNode():o.nextNode();)if(Mo(o.currentNode)&&(e=o.currentNode),Mo(e)&&i(e))return e;return null}function Ao(e){return!!(e!=null&&e.ownerDocument)&&tp(e.ownerDocument)===e&&e.ownerDocument.hasFocus()}function H0(e){if(!e.ownerDocument||!e.contains)return!1;let t=tp(e.ownerDocument);return t!==null&&e.contains(t)&&e.ownerDocument.hasFocus()}function Oo(e){return"".concat(e,"px")}function Qx(e){return e.platform.startsWith("Mac")||e.platform==="iPhone"}var Xx=/ipad|iphone|ipod/;function np(e){return Xx.test(e.userAgent.toLowerCase())||Qx(e)&&e.maxTouchPoints>1}var Jx=/^((?!chrome|android).)*safari/i;function $0(e){return np(e)||Jx.test(e.userAgent.toLowerCase())}function eN(){return Math.floor(Math.random()*Date.now())}function tN(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function nN(e){var t;let n=((t=e.match(/url\(("?)('*)#(.*?)('*)\)/g))!==null&&t!==void 0?t:[]).map(r=>r.slice(4,r.length-1).replace(/['"#]+/g,""));return Array.from(new Set(n))}function rN(e,t){try{let n=new DOMParser().parseFromString(e,"text/html");return n.body.querySelectorAll("[fill^=url]").forEach(r=>r.setAttribute("fill","".concat(r.getAttribute("fill")," ").concat(t).trim())),n.body.innerHTML.trim()}catch{return e}}function ku(e,t=eN(),n="rgba(0, 0, 0, 0.7)"){if(yr(e)){let i=nN(e).reduce((o,s)=>{let a=tN(s),c="id_".concat(t,"_").concat(s);return o.replace(new RegExp('"'.concat(a,'"'),"g"),'"'.concat(c,'"')).replace(new RegExp("'".concat(a,"'"),"g"),"'".concat(c,"'")).replace(new RegExp("url\\('#".concat(a,"'\\)"),"g"),"url('#".concat(c,"')")).replace(new RegExp('url\\("#'.concat(a,'"\\)'),"g"),'url("#'.concat(c,'")')).replace(new RegExp("url\\(#".concat(a,"\\)"),"g"),"url(#".concat(c,")"))},e);return rN(i,n)}return e}var z0=class extends Error{constructor(t){super("")}},G0=class extends Error{constructor(t){super("")}},W0=class extends Error{constructor(t){super("")}},ju=class extends Error{constructor(){super("")}},$s=class extends Error{constructor(){super("")}},zs=class extends Error{constructor(){super("")}};var Vu=class extends Error{constructor(){super("")}};function eW(e){return new N(t=>{if(!e.valueChanges)throw new Vu;e.valueChanges.pipe(_e(e.value)).subscribe(t)})}function J(e,t,n={}){return Tn(e,t,n)}function iN(e){return xe(J(e,"mouseup"),J(e,"dragend"))}function q0(e=0){return Xr(ee(()=>ht(e).pipe(w(Rr),_e(!0))),Ue())}var rp,ip;function Y0(e){let t=J(e,"blur"),{ownerDocument:n}=e;if(!n)throw new $s;return(!ip||!rp)&&(rp=J(n,"mouseup",{capture:!0}).pipe(q0(),_e(!1),Wt({bufferSize:1,refCount:!0})),ip=J(n,"mousedown",{capture:!0}).pipe(q0(),_e(!1),Wt({bufferSize:1,refCount:!0}))),xe(Vt(J(e,"focus").pipe(Ke(1)),t.pipe(ye(()=>!Ao(e)),Ke(1),Qi())).pipe(uc(),rs(ip,rp,(r,i,o)=>i||o),ye(k0))).pipe(ee(()=>t.pipe(w(Rr),Ke(1),_e(!0))),Ue())}function Z0(e,t=Boolean){return Xr(ee(n=>t(n)?e(n):Ae))}function K0(e){var t,n;return"observed"in e?e.observed:!!(!((n=(t=e)===null||t===void 0?void 0:t.observers)===null||n===void 0)&&n.length)}function tW(e,{onlyTrusted:t}={onlyTrusted:!0}){let{ownerDocument:n}=e;if(!n)throw new $s;return J(e,"mousedown").pipe(ye(({isTrusted:r})=>r||!t),ee(()=>iN(n).pipe(w(Rr),Ke(1),_e(!0))))}function oN(){return Ne(e=>e.preventDefault())}function Q0(e){return J(e===e.ownerDocument.documentElement?e.ownerDocument:e,"scroll")}function X0(){return Ne(e=>{e.stopPropagation()})}function J0(e){return Ne(()=>{e.markForCheck()})}function sN(e){return t=>new N(n=>t.subscribe({next:r=>e.run(()=>n.next(r)),error:r=>e.run(()=>n.error(r)),complete:()=>e.run(()=>n.complete())}))}function $n(e){return t=>new N(n=>e.runOutsideAngular(()=>t.subscribe(n)))}function zn(e){return Xr($n(e),sN(e))}var Gs=new D("POLYMORPHEUS_CONTEXT"),bi=class{constructor(t,n){this.component=t,this.i=n}createInjector(t,n){return bt.create({parent:this.i||t,providers:[{provide:Gs,useValue:n}]})}},sp=(()=>{class e{constructor(n,r){this.template=n,this.cdr=r,this.polymorpheus=""}check(){this.cdr.markForCheck()}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(y(pt,2),y(gt))},e.\u0275dir=$({type:e,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]}),e})(),Uu=class{constructor(t){this.$implicit=t}get polymorpheusOutlet(){return this.$implicit}};var Lr=(()=>{class e{constructor(n,r,i){this.vcr=n,this.i=r,this.t=i,this.content=""}get template(){return op(this.content)?this.content.template:this.content instanceof pt?this.content:this.t}ngOnChanges({content:n}){var r;let i=this.getContext();if((r=this.c)===null||r===void 0||r.injector.get(gt).markForCheck(),!n)return;this.vcr.clear();let o=i&&new Proxy(i,{get:(s,a)=>{var c;return(c=this.getContext())===null||c===void 0?void 0:c[a]}});eE(this.content)?this.process(this.content,o):(i instanceof Uu&&i.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,o)}ngDoCheck(){op(this.content)&&this.content.check()}static ngTemplateContextGuard(n,r){return!0}getContext(){return aN(this.content)||eE(this.content)?this.context:new Uu(typeof this.content=="function"?this.content(this.context):this.content)}process(n,r){let i=n.createInjector(this.i,r);this.c=this.vcr.createComponent(i.get(kn).resolveComponentFactory(n.component),0,i)}}return e.\u0275fac=function(n){return new(n||e)(y(Nt),y(bt),y(pt))},e.\u0275dir=$({type:e,selectors:[["","polymorpheusOutlet",""]],inputs:{content:["polymorpheusOutlet","content"],context:["polymorpheusOutletContext","context"]},features:[sn]}),e})();function op(e){return e instanceof sp}function eE(e){return e instanceof bi}function aN(e){return op(e)||e instanceof pt}var kr=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function ap(e,t={}){let{selector:n}=t,r=Ng(t,["selector"]);return new N(i=>{let o=new AbortController,{signal:s}=o,a=!0,{signal:c}=r;if(c)if(c.aborted)o.abort();else{let d=()=>{s.aborted||o.abort()};c.addEventListener("abort",d),i.add(()=>c.removeEventListener("abort",d))}let u=Object.assign(Object.assign({},r),{signal:s}),l=d=>{a=!1,i.error(d)};return fetch(e,u).then(d=>{n?Q(n(d)).subscribe(P(i,void 0,()=>{a=!1,i.complete()},l)):(a=!1,i.next(d),i.complete())}).catch(l),()=>{a&&o.abort()}})}function tE(e){return new b(3e3,!1)}function cN(){return new b(3100,!1)}function uN(){return new b(3101,!1)}function lN(e){return new b(3001,!1)}function dN(e){return new b(3003,!1)}function fN(e){return new b(3004,!1)}function hN(e,t){return new b(3005,!1)}function pN(){return new b(3006,!1)}function mN(){return new b(3007,!1)}function gN(e,t){return new b(3008,!1)}function vN(e){return new b(3002,!1)}function yN(e,t,n,r,i){return new b(3010,!1)}function _N(){return new b(3011,!1)}function DN(){return new b(3012,!1)}function EN(){return new b(3200,!1)}function wN(){return new b(3202,!1)}function bN(){return new b(3013,!1)}function CN(e){return new b(3014,!1)}function IN(e){return new b(3015,!1)}function SN(e){return new b(3016,!1)}function MN(e,t){return new b(3404,!1)}function TN(e){return new b(3502,!1)}function AN(e){return new b(3503,!1)}function ON(){return new b(3300,!1)}function xN(e){return new b(3504,!1)}function NN(e){return new b(3301,!1)}function PN(e,t){return new b(3302,!1)}function RN(e){return new b(3303,!1)}function FN(e,t){return new b(3400,!1)}function LN(e){return new b(3401,!1)}function kN(e){return new b(3402,!1)}function jN(e,t){return new b(3505,!1)}function jr(e){switch(e.length){case 0:return new Pr;case 1:return e[0];default:return new Bs(e)}}function yE(e,t,n=new Map,r=new Map){let i=[],o=[],s=-1,a=null;if(t.forEach(c=>{let u=c.get("offset"),l=u==s,d=l&&a||new Map;c.forEach((f,p)=>{let g=p,_=f;if(p!=="offset")switch(g=e.normalizePropertyName(g,i),_){case Pu:_=n.get(p);break;case Hn:_=r.get(p);break;default:_=e.normalizeStyleValue(p,g,_,i);break}d.set(g,_)}),l||o.push(d),a=d,s=u}),i.length)throw TN(i);return o}function Op(e,t,n,r){switch(t){case"start":e.onStart(()=>r(n&&cp(n,"start",e)));break;case"done":e.onDone(()=>r(n&&cp(n,"done",e)));break;case"destroy":e.onDestroy(()=>r(n&&cp(n,"destroy",e)));break}}function cp(e,t,n){let r=n.totalTime,i=!!n.disabled,o=xp(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,r==null?e.totalTime:r,i),s=e._data;return s!=null&&(o._data=s),o}function xp(e,t,n,r,i="",o=0,s){return{element:e,triggerName:t,fromState:n,toState:r,phaseName:i,totalTime:o,disabled:!!s}}function Jt(e,t,n){let r=e.get(t);return r||e.set(t,r=n),r}function nE(e){let t=e.indexOf(":"),n=e.substring(1,t),r=e.slice(t+1);return[n,r]}var VN=(()=>typeof document>"u"?null:document.documentElement)();function Np(e){let t=e.parentNode||e.host||null;return t===VN?null:t}function UN(e){return e.substring(1,6)=="ebkit"}var Ci=null,rE=!1;function BN(e){Ci||(Ci=HN()||{},rE=Ci.style?"WebkitAppearance"in Ci.style:!1);let t=!0;return Ci.style&&!UN(e)&&(t=e in Ci.style,!t&&rE&&(t="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in Ci.style)),t}function HN(){return typeof document<"u"?document.body:null}function _E(e,t){for(;t;){if(t===e)return!0;t=Np(t)}return!1}function DE(e,t,n){if(n)return Array.from(e.querySelectorAll(t));let r=e.querySelector(t);return r?[r]:[]}var $N=(()=>{let t=class t{validateStyleProperty(r){return BN(r)}matchesElement(r,i){return!1}containsElement(r,i){return _E(r,i)}getParentElement(r){return Np(r)}query(r,i,o){return DE(r,i,o)}computeStyle(r,i,o){return o||""}animate(r,i,o,s,a,c=[],u){return new Pr(o,s)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac});let e=t;return e})(),vW=(()=>{let t=class t{};t.NOOP=new $N;let e=t;return e})(),pp=class{};var zN=1e3,EE="{{",GN="}}",wE="ng-enter",mp="ng-leave",Hu="ng-trigger",qu=".ng-trigger",iE="ng-animating",gp=".ng-animating";function _r(e){if(typeof e=="number")return e;let t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:vp(parseFloat(t[1]),t[2])}function vp(e,t){switch(t){case"s":return e*zN;default:return e}}function Yu(e,t,n){return e.hasOwnProperty("duration")?e:WN(e,t,n)}function WN(e,t,n){let r=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,o=0,s="";if(typeof e=="string"){let a=e.match(r);if(a===null)return t.push(tE(e)),{duration:0,delay:0,easing:""};i=vp(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=vp(parseFloat(c),a[4]));let u=a[5];u&&(s=u)}else i=e;if(!n){let a=!1,c=t.length;i<0&&(t.push(cN()),a=!0),o<0&&(t.push(uN()),a=!0),a&&t.splice(c,0,tE(e))}return{duration:i,delay:o,easing:s}}function Xs(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function bE(e){let t=new Map;return Object.keys(e).forEach(n=>{let r=e[n];t.set(n,r)}),t}function qN(e){return e.length?e[0]instanceof Map?e:e.map(t=>bE(t)):[]}function No(e,t=new Map,n){if(n)for(let[r,i]of n)t.set(r,i);for(let[r,i]of e)t.set(r,i);return t}function Gn(e,t,n){t.forEach((r,i)=>{let o=Pp(i);n&&!n.has(i)&&n.set(i,e.style[o]),e.style[o]=r})}function Si(e,t){t.forEach((n,r)=>{let i=Pp(r);e.style[i]=""})}function Ws(e){return Array.isArray(e)?e.length==1?e[0]:S0(e):e}function YN(e,t,n){let r=t.params||{},i=CE(e);i.length&&i.forEach(o=>{r.hasOwnProperty(o)||n.push(lN(o))})}var yp=new RegExp("".concat(EE,"\\s*(.+?)\\s*").concat(GN),"g");function CE(e){let t=[];if(typeof e=="string"){let n;for(;n=yp.exec(e);)t.push(n[1]);yp.lastIndex=0}return t}function Ys(e,t,n){let r=e.toString(),i=r.replace(yp,(o,s)=>{let a=t[s];return a==null&&(n.push(dN(s)),a=""),a.toString()});return i==r?e:i}function Zu(e){let t=[],n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}var ZN=/-+([a-z0-9])/g;function Pp(e){return e.replace(ZN,(...t)=>t[1].toUpperCase())}function KN(e,t){return e===0||t===0}function QN(e,t,n){if(n.size&&t.length){let r=t[0],i=[];if(n.forEach((o,s)=>{r.has(s)||i.push(s),r.set(s,o)}),i.length)for(let o=1;os.set(a,IE(e,a)))}}return t}function Xt(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw fN(t.type)}}function IE(e,t){return window.getComputedStyle(e)[t]}var XN=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),oE=class extends pp{normalizePropertyName(t,n){return Pp(t)}normalizeStyleValue(t,n,r,i){let o="",s=r.toString().trim();if(XN.has(n)&&r!==0&&r!=="0")if(typeof r=="number")o="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(hN(t,r))}return s+o}};var Ku="*";function JN(e,t){let n=[];return typeof e=="string"?e.split(/\s*,\s*/).forEach(r=>eP(r,n,t)):n.push(e),n}function eP(e,t,n){if(e[0]==":"){let c=tP(e,n);if(typeof c=="function"){t.push(c);return}e=c}let r=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(r==null||r.length<4)return n.push(IN(e)),t;let i=r[1],o=r[2],s=r[3];t.push(sE(i,s));let a=i==Ku&&s==Ku;o[0]=="<"&&!a&&t.push(sE(s,i))}function tP(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(n,r)=>parseFloat(r)>parseFloat(n);case":decrement":return(n,r)=>parseFloat(r) *"}}var $u=new Set(["true","1"]),zu=new Set(["false","0"]);function sE(e,t){let n=$u.has(e)||zu.has(e),r=$u.has(t)||zu.has(t);return(i,o)=>{let s=e==Ku||e==i,a=t==Ku||t==o;return!s&&n&&typeof i=="boolean"&&(s=i?$u.has(e):zu.has(e)),!a&&r&&typeof o=="boolean"&&(a=o?$u.has(t):zu.has(t)),s&&a}}var SE=":self",nP=new RegExp("s*".concat(SE,"s*,?"),"g");function ME(e,t,n,r){return new _p(e).build(t,n,r)}var aE="",_p=class{constructor(t){this._driver=t}build(t,n,r){let i=new Dp(n);return this._resetContextStyleTimingState(i),Xt(this,Ws(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector=aE,t.collectedStyles=new Map,t.collectedStyles.set(aE,new Map),t.currentTime=0}visitTrigger(t,n){let r=n.queryCount=0,i=n.depCount=0,o=[],s=[];return t.name.charAt(0)=="@"&&n.errors.push(pN()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(n),a.type==0){let c=a,u=c.name;u.toString().split(/\s*,\s*/).forEach(l=>{c.name=l,o.push(this.visitState(c,n))}),c.name=u}else if(a.type==1){let c=this.visitTransition(a,n);r+=c.queryCount,i+=c.depCount,s.push(c)}else n.errors.push(mN())}),{type:7,name:t.name,states:o,transitions:s,queryCount:r,depCount:i,options:null}}visitState(t,n){let r=this.visitStyle(t.styles,n),i=t.options&&t.options.params||null;if(r.containsDynamicStyles){let o=new Set,s=i||{};if(r.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{CE(c).forEach(u=>{s.hasOwnProperty(u)||o.add(u)})})}),o.size){let a=Zu(o.values());n.errors.push(gN(t.name,a))}}return{type:0,name:t.name,style:r,options:i?{params:i}:null}}visitTransition(t,n){n.queryCount=0,n.depCount=0;let r=Xt(this,Ws(t.animation),n);return{type:1,matchers:JN(t.expr,n.errors),animation:r,queryCount:n.queryCount,depCount:n.depCount,options:Ii(t.options)}}visitSequence(t,n){return{type:2,steps:t.steps.map(r=>Xt(this,r,n)),options:Ii(t.options)}}visitGroup(t,n){let r=n.currentTime,i=0,o=t.steps.map(s=>{n.currentTime=r;let a=Xt(this,s,n);return i=Math.max(i,n.currentTime),a});return n.currentTime=i,{type:3,steps:o,options:Ii(t.options)}}visitAnimate(t,n){let r=sP(t.timings,n.errors);n.currentAnimateTimings=r;let i,o=t.styles?t.styles:E({});if(o.type==5)i=this.visitKeyframes(o,n);else{let s=t.styles,a=!1;if(!s){a=!0;let u={};r.easing&&(u.easing=r.easing),s=E(u)}n.currentTime+=r.duration+r.delay;let c=this.visitStyle(s,n);c.isEmptyStep=a,i=c}return n.currentAnimateTimings=null,{type:4,timings:r,style:i,options:null}}visitStyle(t,n){let r=this._makeStyleAst(t,n);return this._validateStyleAst(r,n),r}_makeStyleAst(t,n){let r=[],i=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of i)typeof a=="string"?a===Hn?r.push(a):n.errors.push(vN(a)):r.push(bE(a));let o=!1,s=null;return r.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(EE)>=0){o=!0;break}}}),{type:6,styles:r,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,n){let r=n.currentAnimateTimings,i=n.currentTime,o=n.currentTime;r&&o>0&&(o-=r.duration+r.delay),t.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let u=n.collectedStyles.get(n.currentQuerySelector),l=u.get(c),d=!0;l&&(o!=i&&o>=l.startTime&&i<=l.endTime&&(n.errors.push(yN(c,l.startTime,l.endTime,o,i)),d=!1),o=l.startTime),d&&u.set(c,{startTime:o,endTime:i}),n.options&&YN(a,n.options,n.errors)})})}visitKeyframes(t,n){let r={type:5,styles:[],options:null};if(!n.currentAnimateTimings)return n.errors.push(_N()),r;let i=1,o=0,s=[],a=!1,c=!1,u=0,l=t.steps.map(A=>{let q=this._makeStyleAst(A,n),B=q.offset!=null?q.offset:oP(q.styles),he=0;return B!=null&&(o++,he=q.offset=B),c=c||he<0||he>1,a=a||he0&&o{let B=f>0?q==p?1:f*q:s[q],he=B*T;n.currentTime=g+_.delay+he,_.duration=he,this._validateStyleAst(A,n),A.offset=B,r.styles.push(A)}),r}visitReference(t,n){return{type:8,animation:Xt(this,Ws(t.animation),n),options:Ii(t.options)}}visitAnimateChild(t,n){return n.depCount++,{type:9,options:Ii(t.options)}}visitAnimateRef(t,n){return{type:10,animation:this.visitReference(t.animation,n),options:Ii(t.options)}}visitQuery(t,n){let r=n.currentQuerySelector,i=t.options||{};n.queryCount++,n.currentQuery=t;let[o,s]=rP(t.selector);n.currentQuerySelector=r.length?r+" "+o:o,Jt(n.collectedStyles,n.currentQuerySelector,new Map);let a=Xt(this,Ws(t.animation),n);return n.currentQuery=null,n.currentQuerySelector=r,{type:11,selector:o,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Ii(t.options)}}visitStagger(t,n){n.currentQuery||n.errors.push(bN());let r=t.timings==="full"?{duration:0,delay:0,easing:"full"}:Yu(t.timings,n.errors,!0);return{type:12,animation:Xt(this,Ws(t.animation),n),timings:r,options:null}}};function rP(e){let t=!!e.split(/\s*,\s*/).find(n=>n==SE);return t&&(e=e.replace(nP,"")),e=e.replace(/@\*/g,qu).replace(/@\w+/g,n=>qu+"-"+n.slice(1)).replace(/:animating/g,gp),[e,t]}function iP(e){return e?Xs(e):null}var Dp=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function oP(e){if(typeof e=="string")return null;let t=null;if(Array.isArray(e))e.forEach(n=>{if(n instanceof Map&&n.has("offset")){let r=n;t=parseFloat(r.get("offset")),r.delete("offset")}});else if(e instanceof Map&&e.has("offset")){let n=e;t=parseFloat(n.get("offset")),n.delete("offset")}return t}function sP(e,t){if(e.hasOwnProperty("duration"))return e;if(typeof e=="number"){let o=Yu(e,t).duration;return up(o,0,"")}let n=e;if(n.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=up(0,0,"");return o.dynamic=!0,o.strValue=n,o}let i=Yu(n,t);return up(i.duration,i.delay,i.easing)}function Ii(e){return e?(e=Xs(e),e.params&&(e.params=iP(e.params))):e={},e}function up(e,t,n){return{duration:e,delay:t,easing:n}}function Rp(e,t,n,r,i,o,s=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:r,duration:i,delay:o,totalTime:i+o,easing:s,subTimeline:a}}var Zs=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,n){let r=this._map.get(t);r||this._map.set(t,r=[]),r.push(...n)}has(t){return this._map.has(t)}clear(){this._map.clear()}},aP=1,cP=":enter",uP=new RegExp(cP,"g"),lP=":leave",dP=new RegExp(lP,"g");function TE(e,t,n,r,i,o=new Map,s=new Map,a,c,u=[]){return new Ep().buildKeyframes(e,t,n,r,i,o,s,a,c,u)}var Ep=class{buildKeyframes(t,n,r,i,o,s,a,c,u,l=[]){u=u||new Zs;let d=new wp(t,n,u,i,o,l,[]);d.options=c;let f=c.delay?_r(c.delay):0;d.currentTimeline.delayNextStep(f),d.currentTimeline.setStyles([s],null,d.errors,c),Xt(this,r,d);let p=d.timelines.filter(g=>g.containsAnimation());if(p.length&&a.size){let g;for(let _=p.length-1;_>=0;_--){let T=p[_];if(T.element===n){g=T;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,d.errors,c)}return p.length?p.map(g=>g.buildKeyframes()):[Rp(n,[],[],[],0,f,"",!1)]}visitTrigger(t,n){}visitState(t,n){}visitTransition(t,n){}visitAnimateChild(t,n){let r=n.subInstructions.get(n.element);if(r){let i=n.createSubContext(t.options),o=n.currentTimeline.currentTime,s=this._visitSubInstructions(r,i,i.options);o!=s&&n.transformIntoNewTimeline(s)}n.previousNode=t}visitAnimateRef(t,n){let r=n.createSubContext(t.options);r.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],n,r),this.visitReference(t.animation,r),n.transformIntoNewTimeline(r.currentTimeline.currentTime),n.previousNode=t}_applyAnimationRefDelays(t,n,r){var i;for(let o of t){let s=o==null?void 0:o.delay;if(s){let a=typeof s=="number"?s:_r(Ys(s,(i=o==null?void 0:o.params)!=null?i:{},n.errors));r.delayNextStep(a)}}}_visitSubInstructions(t,n,r){let o=n.currentTimeline.currentTime,s=r.duration!=null?_r(r.duration):null,a=r.delay!=null?_r(r.delay):null;return s!==0&&t.forEach(c=>{let u=n.appendInstructionToTimeline(c,s,a);o=Math.max(o,u.duration+u.delay)}),o}visitReference(t,n){n.updateOptions(t.options,!0),Xt(this,t.animation,n),n.previousNode=t}visitSequence(t,n){let r=n.subContextCount,i=n,o=t.options;if(o&&(o.params||o.delay)&&(i=n.createSubContext(o),i.transformIntoNewTimeline(),o.delay!=null)){i.previousNode.type==6&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Qu);let s=_r(o.delay);i.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Xt(this,s,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>r&&i.transformIntoNewTimeline()),n.previousNode=t}visitGroup(t,n){let r=[],i=n.currentTimeline.currentTime,o=t.options&&t.options.delay?_r(t.options.delay):0;t.steps.forEach(s=>{let a=n.createSubContext(t.options);o&&a.delayNextStep(o),Xt(this,s,a),i=Math.max(i,a.currentTimeline.currentTime),r.push(a.currentTimeline)}),r.forEach(s=>n.currentTimeline.mergeTimelineCollectedStyles(s)),n.transformIntoNewTimeline(i),n.previousNode=t}_visitTiming(t,n){if(t.dynamic){let r=t.strValue,i=n.params?Ys(r,n.params,n.errors):r;return Yu(i,n.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,n){let r=n.currentAnimateTimings=this._visitTiming(t.timings,n),i=n.currentTimeline;r.delay&&(n.incrementTime(r.delay),i.snapshotCurrentStyles());let o=t.style;o.type==5?this.visitKeyframes(o,n):(n.incrementTime(r.duration),this.visitStyle(o,n),i.applyStylesToKeyframe()),n.currentAnimateTimings=null,n.previousNode=t}visitStyle(t,n){let r=n.currentTimeline,i=n.currentAnimateTimings;!i&&r.hasCurrentStyleProperties()&&r.forwardFrame();let o=i&&i.easing||t.easing;t.isEmptyStep?r.applyEmptyStep(o):r.setStyles(t.styles,o,n.errors,n.options),n.previousNode=t}visitKeyframes(t,n){let r=n.currentAnimateTimings,i=n.currentTimeline.duration,o=r.duration,a=n.createSubContext().currentTimeline;a.easing=r.easing,t.styles.forEach(c=>{let u=c.offset||0;a.forwardTime(u*o),a.setStyles(c.styles,c.easing,n.errors,n.options),a.applyStylesToKeyframe()}),n.currentTimeline.mergeTimelineCollectedStyles(a),n.transformIntoNewTimeline(i+o),n.previousNode=t}visitQuery(t,n){let r=n.currentTimeline.currentTime,i=t.options||{},o=i.delay?_r(i.delay):0;o&&(n.previousNode.type===6||r==0&&n.currentTimeline.hasCurrentStyleProperties())&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=Qu);let s=r,a=n.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,n.errors);n.currentQueryTotal=a.length;let c=null;a.forEach((u,l)=>{n.currentQueryIndex=l;let d=n.createSubContext(t.options,u);o&&d.delayNextStep(o),u===n.element&&(c=d.currentTimeline),Xt(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe();let f=d.currentTimeline.currentTime;s=Math.max(s,f)}),n.currentQueryIndex=0,n.currentQueryTotal=0,n.transformIntoNewTimeline(s),c&&(n.currentTimeline.mergeTimelineCollectedStyles(c),n.currentTimeline.snapshotCurrentStyles()),n.previousNode=t}visitStagger(t,n){let r=n.parentContext,i=n.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(n.currentQueryTotal-1),c=s*n.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=r.currentStaggerTime;break}let l=n.currentTimeline;c&&l.delayNextStep(c);let d=l.currentTime;Xt(this,t.animation,n),n.previousNode=t,r.currentStaggerTime=i.currentTime-d+(i.startTime-r.currentTimeline.startTime)}},Qu={},wp=class e{constructor(t,n,r,i,o,s,a,c){this._driver=t,this.element=n,this.subInstructions=r,this._enterClassName=i,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Qu,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new Xu(this._driver,n,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,n){if(!t)return;let r=t,i=this.options;r.duration!=null&&(i.duration=_r(r.duration)),r.delay!=null&&(i.delay=_r(r.delay));let o=r.params;if(o){let s=i.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!n||!s.hasOwnProperty(a))&&(s[a]=Ys(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let n=this.options.params;if(n){let r=t.params={};Object.keys(n).forEach(i=>{r[i]=n[i]})}}return t}createSubContext(t=null,n,r){let i=n||this.element,o=new e(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,r||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Qu,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,n,r){let i={duration:n!=null?n:t.duration,delay:this.currentTimeline.currentTime+(r!=null?r:0)+t.delay,easing:""},o=new bp(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(o),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,n,r,i,o,s){let a=[];if(i&&a.push(this.element),t.length>0){t=t.replace(uP,"."+this._enterClassName),t=t.replace(dP,"."+this._leaveClassName);let c=r!=1,u=this._driver.query(this.element,t,c);r!==0&&(u=r<0?u.slice(u.length+r,u.length):u.slice(0,r)),a.push(...u)}return!o&&a.length==0&&s.push(CN(n)),a}},Xu=class e{constructor(t,n,r,i){this._driver=t,this.element=n,this.startTime=r,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let n=this._keyframes.size===1&&this._pendingStyles.size;this.duration||n?(this.forwardTime(this.currentTime+t),n&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,n){return this.applyStylesToKeyframe(),new e(this._driver,t,n||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=aP,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,n){this._localTimelineStyles.set(t,n),this._globalTimelineStyles.set(t,n),this._styleSummary.set(t,{time:this.currentTime,value:n})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[n,r]of this._globalTimelineStyles)this._backFill.set(n,r||Hn),this._currentKeyframe.set(n,Hn);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,n,r,i){var a;n&&this._previousKeyframe.set("easing",n);let o=i&&i.params||{},s=fP(t,this._globalTimelineStyles);for(let[c,u]of s){let l=Ys(u,o,r);this._pendingStyles.set(c,l),this._localTimelineStyles.has(c)||this._backFill.set(c,(a=this._globalTimelineStyles.get(c))!=null?a:Hn),this._updateStyle(c,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((t,n)=>{this._currentKeyframe.set(n,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,n)=>{this._currentKeyframe.has(n)||this._currentKeyframe.set(n,t)}))}snapshotCurrentStyles(){for(let[t,n]of this._localTimelineStyles)this._pendingStyles.set(t,n),this._updateStyle(t,n)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let n in this._currentKeyframe)t.push(n);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((n,r)=>{let i=this._styleSummary.get(r);(!i||n.time>i.time)&&this._updateStyle(r,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,n=new Set,r=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,c)=>{let u=No(a,new Map,this._backFill);u.forEach((l,d)=>{l===Pu?t.add(d):l===Hn&&n.add(d)}),r||u.set("offset",c/this.duration),i.push(u)});let o=t.size?Zu(t.values()):[],s=n.size?Zu(n.values()):[];if(r){let a=i[0],c=new Map(a);a.set("offset",0),c.set("offset",1),i=[a,c]}return Rp(this.element,i,o,s,this.duration,this.startTime,this.easing,!1)}},bp=class extends Xu{constructor(t,n,r,i,o,s,a=!1){super(t,n,s.delay),this.keyframes=r,this.preStyleProps=i,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:n,duration:r,easing:i}=this.timings;if(this._stretchStartingKeyframe&&n){let o=[],s=r+n,a=n/s,c=No(t[0]);c.set("offset",0),o.push(c);let u=No(t[0]);u.set("offset",cE(a)),o.push(u);let l=t.length-1;for(let d=1;d<=l;d++){let f=No(t[d]),p=f.get("offset"),g=n+p*r;f.set("offset",cE(g/s)),o.push(f)}r=s,n=0,i="",t=o}return Rp(this.element,t,this.preStyleProps,this.postStyleProps,r,n,i,!0)}};function cE(e,t=3){let n=Math.pow(10,t-1);return Math.round(e*n)/n}function fP(e,t){let n=new Map,r;return e.forEach(i=>{if(i==="*"){r=r||t.keys();for(let o of r)n.set(o,Hn)}else No(i,n)}),n}function uE(e,t,n,r,i,o,s,a,c,u,l,d,f){return{type:0,element:e,triggerName:t,isRemovalTransition:i,fromState:n,fromStyles:o,toState:r,toStyles:s,timelines:a,queriedElements:c,preStyleProps:u,postStyleProps:l,totalTime:d,errors:f}}var lp={},Ju=class{constructor(t,n,r){this._triggerName=t,this.ast=n,this._stateStyles=r}match(t,n,r,i){return hP(this.ast.matchers,t,n,r,i)}buildStyles(t,n,r){let i=this._stateStyles.get("*");return t!==void 0&&(i=this._stateStyles.get(t==null?void 0:t.toString())||i),i?i.buildStyles(n,r):new Map}build(t,n,r,i,o,s,a,c,u,l){var Ft;let d=[],f=this.ast.options&&this.ast.options.params||lp,p=a&&a.params||lp,g=this.buildStyles(r,p,d),_=c&&c.params||lp,T=this.buildStyles(i,_,d),A=new Set,q=new Map,B=new Map,he=i==="void",De={params:pP(_,f),delay:(Ft=this.ast.options)==null?void 0:Ft.delay},It=l?[]:TE(t,n,this.ast.animation,o,s,g,T,De,u,d),O=0;if(It.forEach(_t=>{O=Math.max(_t.duration+_t.delay,O)}),d.length)return uE(n,this._triggerName,r,i,he,g,T,[],[],q,B,O,d);It.forEach(_t=>{let fn=_t.element,Yn=Jt(q,fn,new Set);_t.preStyleProps.forEach(bn=>Yn.add(bn));let $r=Jt(B,fn,new Set);_t.postStyleProps.forEach(bn=>$r.add(bn)),fn!==n&&A.add(fn)});let Ye=Zu(A.values());return uE(n,this._triggerName,r,i,he,g,T,It,Ye,q,B,O)}};function hP(e,t,n,r,i){return e.some(o=>o(t,n,r,i))}function pP(e,t){let n=Xs(t);for(let r in e)e.hasOwnProperty(r)&&e[r]!=null&&(n[r]=e[r]);return n}var Cp=class{constructor(t,n,r){this.styles=t,this.defaultParams=n,this.normalizer=r}buildStyles(t,n){let r=new Map,i=Xs(this.defaultParams);return Object.keys(t).forEach(o=>{let s=t[o];s!==null&&(i[o]=s)}),this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=Ys(s,i,n));let c=this.normalizer.normalizePropertyName(a,n);s=this.normalizer.normalizeStyleValue(a,c,s,n),r.set(a,s)})}),r}};function mP(e,t,n){return new Ip(e,t,n)}var Ip=class{constructor(t,n,r){this.name=t,this.ast=n,this._normalizer=r,this.transitionFactories=[],this.states=new Map,n.states.forEach(i=>{let o=i.options&&i.options.params||{};this.states.set(i.name,new Cp(i.style,o,r))}),lE(this.states,"true","1"),lE(this.states,"false","0"),n.transitions.forEach(i=>{this.transitionFactories.push(new Ju(t,i,this.states))}),this.fallbackTransition=gP(t,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,n,r,i){return this.transitionFactories.find(s=>s.match(t,n,r,i))||null}matchStyles(t,n,r){return this.fallbackTransition.buildStyles(t,n,r)}};function gP(e,t,n){let o={type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0};return new Ju(e,o,t)}function lE(e,t,n){e.has(t)?e.has(n)||e.set(n,e.get(t)):e.has(n)&&e.set(t,e.get(n))}var vP=new Zs,Sp=class{constructor(t,n,r){this.bodyNode=t,this._driver=n,this._normalizer=r,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,n){let r=[],i=[],o=ME(this._driver,n,r,i);if(r.length)throw AN(r);i.length&&void 0,this._animations.set(t,o)}_buildPlayer(t,n,r){let i=t.element,o=yE(this._normalizer,t.keyframes,n,r);return this._driver.animate(i,o,t.duration,t.delay,t.easing,[],!0)}create(t,n,r={}){let i=[],o=this._animations.get(t),s,a=new Map;if(o?(s=TE(this._driver,n,o,wE,mp,new Map,new Map,r,vP,i),s.forEach(l=>{let d=Jt(a,l.element,new Map);l.postStyleProps.forEach(f=>d.set(f,null))})):(i.push(ON()),s=[]),i.length)throw xN(i);a.forEach((l,d)=>{l.forEach((f,p)=>{l.set(p,this._driver.computeStyle(d,p,Hn))})});let c=s.map(l=>{let d=a.get(l.element);return this._buildPlayer(l,new Map,d)}),u=jr(c);return this._playersById.set(t,u),u.onDestroy(()=>this.destroy(t)),this.players.push(u),u}destroy(t){let n=this._getPlayer(t);n.destroy(),this._playersById.delete(t);let r=this.players.indexOf(n);r>=0&&this.players.splice(r,1)}_getPlayer(t){let n=this._playersById.get(t);if(!n)throw NN(t);return n}listen(t,n,r,i){let o=xp(n,"","","");return Op(this._getPlayer(t),r,o,i),()=>{}}command(t,n,r,i){if(r=="register"){this.register(t,i[0]);return}if(r=="create"){let s=i[0]||{};this.create(t,n,s);return}let o=this._getPlayer(t);switch(r){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t);break}}},dE="ng-animate-queued",yP=".ng-animate-queued",dp="ng-animate-disabled",_P=".ng-animate-disabled",DP="ng-star-inserted",EP=".ng-star-inserted",wP=[],AE={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},bP={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},wn="__ng_removed",Ks=class{get params(){return this.options.params}constructor(t,n=""){this.namespaceId=n;let r=t&&t.hasOwnProperty("value"),i=r?t.value:t;if(this.value=IP(i),r){let o=Xs(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let n=t.params;if(n){let r=this.options.params;Object.keys(n).forEach(i=>{r[i]==null&&(r[i]=n[i])})}}},qs="void",fp=new Ks(qs),Mp=class{constructor(t,n,r){this.id=t,this.hostElement=n,this._engine=r,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,ln(n,this._hostClassName)}listen(t,n,r,i){if(!this._triggers.has(n))throw PN(r,n);if(r==null||r.length==0)throw RN(n);if(!SP(r))throw FN(r,n);let o=Jt(this._elementListeners,t,[]),s={name:n,phase:r,callback:i};o.push(s);let a=Jt(this._engine.statesByElement,t,new Map);return a.has(n)||(ln(t,Hu),ln(t,Hu+"-"+n),a.set(n,fp)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(n)||a.delete(n)})}}register(t,n){return this._triggers.has(t)?!1:(this._triggers.set(t,n),!0)}_getTrigger(t){let n=this._triggers.get(t);if(!n)throw LN(t);return n}trigger(t,n,r,i=!0){let o=this._getTrigger(n),s=new Qs(this.id,n,t),a=this._engine.statesByElement.get(t);a||(ln(t,Hu),ln(t,Hu+"-"+n),this._engine.statesByElement.set(t,a=new Map));let c=a.get(n),u=new Ks(r,this.id);if(!(r&&r.hasOwnProperty("value"))&&c&&u.absorbOptions(c.options),a.set(n,u),c||(c=fp),!(u.value===qs)&&c.value===u.value){if(!AP(c.params,u.params)){let _=[],T=o.matchStyles(c.value,c.params,_),A=o.matchStyles(u.value,u.params,_);_.length?this._engine.reportError(_):this._engine.afterFlush(()=>{Si(t,T),Gn(t,A)})}return}let f=Jt(this._engine.playersByElement,t,[]);f.forEach(_=>{_.namespaceId==this.id&&_.triggerName==n&&_.queued&&_.destroy()});let p=o.matchTransition(c.value,u.value,t,u.params),g=!1;if(!p){if(!i)return;p=o.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:p,fromState:c,toState:u,player:s,isFallbackTransition:g}),g||(ln(t,dE),s.onStart(()=>{xo(t,dE)})),s.onDone(()=>{let _=this.players.indexOf(s);_>=0&&this.players.splice(_,1);let T=this._engine.playersByElement.get(t);if(T){let A=T.indexOf(s);A>=0&&T.splice(A,1)}}),this.players.push(s),f.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(n=>n.delete(t)),this._elementListeners.forEach((n,r)=>{this._elementListeners.set(r,n.filter(i=>i.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let n=this._engine.playersByElement.get(t);n&&(n.forEach(r=>r.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,n){let r=this._engine.driver.query(t,qu,!0);r.forEach(i=>{if(i[wn])return;let o=this._engine.fetchNamespacesByElement(i);o.size?o.forEach(s=>s.triggerLeaveAnimation(i,n,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>r.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(t,n,r,i){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((c,u)=>{if(s.set(u,c.value),this._triggers.has(u)){let l=this.trigger(t,u,qs,i);l&&a.push(l)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,n,s),r&&jr(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let n=this._elementListeners.get(t),r=this._engine.statesByElement.get(t);if(n&&r){let i=new Set;n.forEach(o=>{let s=o.name;if(i.has(s))return;i.add(s);let c=this._triggers.get(s).fallbackTransition,u=r.get(s)||fp,l=new Ks(qs),d=new Qs(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:c,fromState:u,toState:l,player:d,isFallbackTransition:!0})})}}removeNode(t,n){let r=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,n),this.triggerLeaveAnimation(t,n,!0))return;let i=!1;if(r.totalAnimations){let o=r.players.length?r.playersByQueriedElement.get(t):[];if(o&&o.length)i=!0;else{let s=t;for(;s=s.parentNode;)if(r.statesByElement.get(s)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)r.markElementAsRemoved(this.id,t,!1,n);else{let o=t[wn];(!o||o===AE)&&(r.afterFlush(()=>this.clearElementCache(t)),r.destroyInnerAnimations(t),r._onRemovalComplete(t,n))}}insertNode(t,n){ln(t,this._hostClassName)}drainQueuedTransitions(t){let n=[];return this._queue.forEach(r=>{let i=r.player;if(i.destroyed)return;let o=r.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==r.triggerName){let c=xp(o,r.triggerName,r.fromState.value,r.toState.value);c._data=t,Op(r.player,a.phase,c,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):n.push(r)}),this._queue=[],n.sort((r,i)=>{let o=r.transition.ast.depCount,s=i.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(r.element,i.element)?1:-1})}destroy(t){this.players.forEach(n=>n.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},Tp=class{_onRemovalComplete(t,n){this.onRemovalComplete(t,n)}constructor(t,n,r){this.bodyNode=t,this.driver=n,this._normalizer=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(n=>{n.players.forEach(r=>{r.queued&&t.push(r)})}),t}createNamespace(t,n){let r=new Mp(t,n,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,n)?this._balanceNamespaceList(r,n):(this.newHostElements.set(n,r),this.collectEnterElement(n)),this._namespaceLookup[t]=r}_balanceNamespaceList(t,n){let r=this._namespaceList,i=this.namespacesByHostElement;if(r.length-1>=0){let s=!1,a=this.driver.getParentElement(n);for(;a;){let c=i.get(a);if(c){let u=r.indexOf(c);r.splice(u+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||r.unshift(t)}else r.push(t);return i.set(n,t),t}register(t,n){let r=this._namespaceLookup[t];return r||(r=this.createNamespace(t,n)),r}registerTrigger(t,n,r){let i=this._namespaceLookup[t];i&&i.register(n,r)&&this.totalAnimations++}destroy(t,n){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let r=this._fetchNamespace(t);this.namespacesByHostElement.delete(r.hostElement);let i=this._namespaceList.indexOf(r);i>=0&&this._namespaceList.splice(i,1),r.destroy(n),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let n=new Set,r=this.statesByElement.get(t);if(r){for(let i of r.values())if(i.namespaceId){let o=this._fetchNamespace(i.namespaceId);o&&n.add(o)}}return n}trigger(t,n,r,i){if(Gu(n)){let o=this._fetchNamespace(t);if(o)return o.trigger(n,r,i),!0}return!1}insertNode(t,n,r,i){if(!Gu(n))return;let o=n[wn];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(n);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.insertNode(n,r)}i&&this.collectEnterElement(n)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,n){n?this.disabledNodes.has(t)||(this.disabledNodes.add(t),ln(t,dp)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),xo(t,dp))}removeNode(t,n,r){if(Gu(n)){let i=t?this._fetchNamespace(t):null;i?i.removeNode(n,r):this.markElementAsRemoved(t,n,!1,r);let o=this.namespacesByHostElement.get(n);o&&o.id!==t&&o.removeNode(n,r)}else this._onRemovalComplete(n,r)}markElementAsRemoved(t,n,r,i,o){this.collectedLeaveElements.push(n),n[wn]={namespaceId:t,setForRemoval:i,hasAnimation:r,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,n,r,i,o){return Gu(n)?this._fetchNamespace(t).listen(n,r,i,o):()=>{}}_buildInstruction(t,n,r,i,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,r,i,t.fromState.options,t.toState.options,n,o)}destroyInnerAnimations(t){let n=this.driver.query(t,qu,!0);n.forEach(r=>this.destroyActiveAnimationsForElement(r)),this.playersByQueriedElement.size!=0&&(n=this.driver.query(t,gp,!0),n.forEach(r=>this.finishActiveQueriedAnimationOnElement(r)))}destroyActiveAnimationsForElement(t){let n=this.playersByElement.get(t);n&&n.forEach(r=>{r.queued?r.markedForDestroy=!0:r.destroy()})}finishActiveQueriedAnimationOnElement(t){let n=this.playersByQueriedElement.get(t);n&&n.forEach(r=>r.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return jr(this.players).onDone(()=>t());t()})}processLeaveNode(t){var r;let n=t[wn];if(n&&n.setForRemoval){if(t[wn]=AE,n.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}(r=t.classList)!=null&&r.contains(dp)&&this.markElementAsDisabled(t,!1),this.driver.query(t,_P,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((r,i)=>this._balanceNamespaceList(r,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let r=0;rr()),this._flushFns=[],this._whenQuietFns.length){let r=this._whenQuietFns;this._whenQuietFns=[],n.length?jr(n).onDone(()=>{r.forEach(i=>i())}):r.forEach(i=>i())}}reportError(t){throw kN(t)}_flushAnimations(t,n){let r=new Zs,i=[],o=new Map,s=[],a=new Map,c=new Map,u=new Map,l=new Set;this.disabledNodes.forEach(x=>{l.add(x);let L=this.driver.query(x,yP,!0);for(let V=0;V{let V=wE+_++;g.set(L,V),x.forEach(ce=>ln(ce,V))});let T=[],A=new Set,q=new Set;for(let x=0;xA.add(ce)):q.add(L))}let B=new Map,he=pE(f,Array.from(A));he.forEach((x,L)=>{let V=mp+_++;B.set(L,V),x.forEach(ce=>ln(ce,V))}),t.push(()=>{p.forEach((x,L)=>{let V=g.get(L);x.forEach(ce=>xo(ce,V))}),he.forEach((x,L)=>{let V=B.get(L);x.forEach(ce=>xo(ce,V))}),T.forEach(x=>{this.processLeaveNode(x)})});let De=[],It=[];for(let x=this._namespaceList.length-1;x>=0;x--)this._namespaceList[x].drainQueuedTransitions(n).forEach(V=>{let ce=V.player,ke=V.element;if(De.push(ce),this.collectedEnterElements.length){let ut=ke[wn];if(ut&&ut.setForMove){if(ut.previousTriggersValues&&ut.previousTriggersValues.has(V.triggerName)){let Zn=ut.previousTriggersValues.get(V.triggerName),Mt=this.statesByElement.get(V.element);if(Mt&&Mt.has(V.triggerName)){let zr=Mt.get(V.triggerName);zr.value=Zn,Mt.set(V.triggerName,zr)}}ce.destroy();return}}let tn=!d||!this.driver.containsElement(d,ke),St=B.get(ke),Cn=g.get(ke),Be=this._buildInstruction(V,r,Cn,St,tn);if(Be.errors&&Be.errors.length){It.push(Be);return}if(tn){ce.onStart(()=>Si(ke,Be.fromStyles)),ce.onDestroy(()=>Gn(ke,Be.toStyles)),i.push(ce);return}if(V.isFallbackTransition){ce.onStart(()=>Si(ke,Be.fromStyles)),ce.onDestroy(()=>Gn(ke,Be.toStyles)),i.push(ce);return}let Sa=[];Be.timelines.forEach(ut=>{ut.stretchStartingKeyframe=!0,this.disabledNodes.has(ut.element)||Sa.push(ut)}),Be.timelines=Sa,r.append(ke,Be.timelines);let Ma={instruction:Be,player:ce,element:ke};s.push(Ma),Be.queriedElements.forEach(ut=>Jt(a,ut,[]).push(ce)),Be.preStyleProps.forEach((ut,Zn)=>{if(ut.size){let Mt=c.get(Zn);Mt||c.set(Zn,Mt=new Set),ut.forEach((zr,Wo)=>Mt.add(Wo))}}),Be.postStyleProps.forEach((ut,Zn)=>{let Mt=u.get(Zn);Mt||u.set(Zn,Mt=new Set),ut.forEach((zr,Wo)=>Mt.add(Wo))})});if(It.length){let x=[];It.forEach(L=>{x.push(jN(L.triggerName,L.errors))}),De.forEach(L=>L.destroy()),this.reportError(x)}let O=new Map,Ye=new Map;s.forEach(x=>{let L=x.element;r.has(L)&&(Ye.set(L,L),this._beforeAnimationBuild(x.player.namespaceId,x.instruction,O))}),i.forEach(x=>{let L=x.element;this._getPreviousPlayers(L,!1,x.namespaceId,x.triggerName,null).forEach(ce=>{Jt(O,L,[]).push(ce),ce.destroy()})});let Ft=T.filter(x=>mE(x,c,u)),_t=new Map;hE(_t,this.driver,q,u,Hn).forEach(x=>{mE(x,c,u)&&Ft.push(x)});let Yn=new Map;p.forEach((x,L)=>{hE(Yn,this.driver,new Set(x),c,Pu)}),Ft.forEach(x=>{var ce,ke;let L=_t.get(x),V=Yn.get(x);_t.set(x,new Map([...(ce=L==null?void 0:L.entries())!=null?ce:[],...(ke=V==null?void 0:V.entries())!=null?ke:[]]))});let $r=[],bn=[],Ia={};s.forEach(x=>{let{element:L,player:V,instruction:ce}=x;if(r.has(L)){if(l.has(L)){V.onDestroy(()=>Gn(L,ce.toStyles)),V.disabled=!0,V.overrideTotalTime(ce.totalTime),i.push(V);return}let ke=Ia;if(Ye.size>1){let St=L,Cn=[];for(;St=St.parentNode;){let Be=Ye.get(St);if(Be){ke=Be;break}Cn.push(St)}Cn.forEach(Be=>Ye.set(Be,ke))}let tn=this._buildAnimation(V.namespaceId,ce,O,o,Yn,_t);if(V.setRealPlayer(tn),ke===Ia)$r.push(V);else{let St=this.playersByElement.get(ke);St&&St.length&&(V.parentPlayer=jr(St)),i.push(V)}}else Si(L,ce.fromStyles),V.onDestroy(()=>Gn(L,ce.toStyles)),bn.push(V),l.has(L)&&i.push(V)}),bn.forEach(x=>{let L=o.get(x.element);if(L&&L.length){let V=jr(L);x.setRealPlayer(V)}}),i.forEach(x=>{x.parentPlayer?x.syncPlayerEvents(x.parentPlayer):x.destroy()});for(let x=0;x!tn.destroyed);ke.length?MP(this,L,ke):this.processLeaveNode(L)}return T.length=0,$r.forEach(x=>{this.players.push(x),x.onDone(()=>{x.destroy();let L=this.players.indexOf(x);this.players.splice(L,1)}),x.play()}),$r}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,n,r,i,o){let s=[];if(n){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let c=!o||o==qs;a.forEach(u=>{u.queued||!c&&u.triggerName!=i||s.push(u)})}}return(r||i)&&(s=s.filter(a=>!(r&&r!=a.namespaceId||i&&i!=a.triggerName))),s}_beforeAnimationBuild(t,n,r){let i=n.triggerName,o=n.element,s=n.isRemovalTransition?void 0:t,a=n.isRemovalTransition?void 0:i;for(let c of n.timelines){let u=c.element,l=u!==o,d=Jt(r,u,[]);this._getPreviousPlayers(u,l,s,a,n.toState).forEach(p=>{let g=p.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),p.destroy(),d.push(p)})}Si(o,n.fromStyles)}_buildAnimation(t,n,r,i,o,s){let a=n.triggerName,c=n.element,u=[],l=new Set,d=new Set,f=n.timelines.map(g=>{let _=g.element;l.add(_);let T=_[wn];if(T&&T.removedBeforeQueried)return new Pr(g.duration,g.delay);let A=_!==c,q=TP((r.get(_)||wP).map(O=>O.getRealPlayer())).filter(O=>{let Ye=O;return Ye.element?Ye.element===_:!1}),B=o.get(_),he=s.get(_),De=yE(this._normalizer,g.keyframes,B,he),It=this._buildPlayer(g,De,q);if(g.subTimeline&&i&&d.add(_),A){let O=new Qs(t,a,_);O.setRealPlayer(It),u.push(O)}return It});u.forEach(g=>{Jt(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>CP(this.playersByQueriedElement,g.element,g))}),l.forEach(g=>ln(g,iE));let p=jr(f);return p.onDestroy(()=>{l.forEach(g=>xo(g,iE)),Gn(c,n.toStyles)}),d.forEach(g=>{Jt(i,g,[]).push(p)}),p}_buildPlayer(t,n,r){return n.length>0?this.driver.animate(t.element,n,t.duration,t.delay,t.easing,r):new Pr(t.duration,t.delay)}},Qs=class{constructor(t,n,r){this.namespaceId=t,this.triggerName=n,this.element=r,this._player=new Pr,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((n,r)=>{n.forEach(i=>Op(t,r,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let n=this._player;n.triggerCallback&&t.onStart(()=>n.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,n){Jt(this._queuedCallbacks,t,[]).push(n)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let n=this._player;n.triggerCallback&&n.triggerCallback(t)}};function CP(e,t,n){let r=e.get(t);if(r){if(r.length){let i=r.indexOf(n);r.splice(i,1)}r.length==0&&e.delete(t)}return r}function IP(e){return e!=null?e:null}function Gu(e){return e&&e.nodeType===1}function SP(e){return e=="start"||e=="done"}function fE(e,t){let n=e.style.display;return e.style.display=t!=null?t:"none",n}function hE(e,t,n,r,i){let o=[];n.forEach(c=>o.push(fE(c)));let s=[];r.forEach((c,u)=>{let l=new Map;c.forEach(d=>{let f=t.computeStyle(u,d,i);l.set(d,f),(!f||f.length==0)&&(u[wn]=bP,s.push(u))}),e.set(u,l)});let a=0;return n.forEach(c=>fE(c,o[a++])),s}function pE(e,t){let n=new Map;if(e.forEach(a=>n.set(a,[])),t.length==0)return n;let r=1,i=new Set(t),o=new Map;function s(a){if(!a)return r;let c=o.get(a);if(c)return c;let u=a.parentNode;return n.has(u)?c=u:i.has(u)?c=r:c=s(u),o.set(a,c),c}return t.forEach(a=>{let c=s(a);c!==r&&n.get(c).push(a)}),n}function ln(e,t){var n;(n=e.classList)==null||n.add(t)}function xo(e,t){var n;(n=e.classList)==null||n.remove(t)}function MP(e,t,n){jr(n).onDone(()=>e.processLeaveNode(t))}function TP(e){let t=[];return OE(e,t),t}function OE(e,t){for(let n=0;ni.add(o)):t.set(e,r),n.delete(e),!0}var el=class{constructor(t,n,r){this._driver=n,this._normalizer=r,this._triggerCache={},this.onRemovalComplete=(i,o)=>{},this._transitionEngine=new Tp(t.body,n,r),this._timelineEngine=new Sp(t.body,n,r),this._transitionEngine.onRemovalComplete=(i,o)=>this.onRemovalComplete(i,o)}registerTrigger(t,n,r,i,o){let s=t+"-"+i,a=this._triggerCache[s];if(!a){let c=[],u=[],l=ME(this._driver,o,c,u);if(c.length)throw MN(i,c);u.length&&void 0,a=mP(i,l,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(n,i,a)}register(t,n){this._transitionEngine.register(t,n)}destroy(t,n){this._transitionEngine.destroy(t,n)}onInsert(t,n,r,i){this._transitionEngine.insertNode(t,n,r,i)}onRemove(t,n,r){this._transitionEngine.removeNode(t,n,r)}disableAnimations(t,n){this._transitionEngine.markElementAsDisabled(t,n)}process(t,n,r,i){if(r.charAt(0)=="@"){let[o,s]=nE(r),a=i;this._timelineEngine.command(o,n,s,a)}else this._transitionEngine.trigger(t,n,r,i)}listen(t,n,r,i,o){if(r.charAt(0)=="@"){let[s,a]=nE(r);return this._timelineEngine.listen(s,n,a,o)}return this._transitionEngine.listen(t,n,r,i,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function OP(e,t){let n=null,r=null;return Array.isArray(t)&&t.length?(n=hp(t[0]),t.length>1&&(r=hp(t[t.length-1]))):t instanceof Map&&(n=hp(t)),n||r?new xP(e,n,r):null}var xP=(()=>{let t=class t{constructor(r,i,o){this._element=r,this._startStyles=i,this._endStyles=o,this._state=0;let s=t.initialStylesByElement.get(r);s||t.initialStylesByElement.set(r,s=new Map),this._initialStyles=s}start(){this._state<1&&(this._startStyles&&Gn(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Gn(this._element,this._initialStyles),this._endStyles&&(Gn(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(Si(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Si(this._element,this._endStyles),this._endStyles=null),Gn(this._element,this._initialStyles),this._state=3)}};t.initialStylesByElement=new WeakMap;let e=t;return e})();function hp(e){let t=null;return e.forEach((n,r)=>{NP(r)&&(t=t||new Map,t.set(r,n))}),t}function NP(e){return e==="display"||e==="position"}var tl=class{constructor(t,n,r,i){this.element=t,this.keyframes=n,this.options=r,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=r.duration,this._delay=r.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;let n=()=>this._onFinish();this.domPlayer.addEventListener("finish",n),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",n)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let n=[];return t.forEach(r=>{n.push(Object.fromEntries(r))}),n}_triggerWebAnimation(t,n,r){return t.animate(this._convertKeyframesToObject(n),r)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){var t;return+((t=this.domPlayer.currentTime)!=null?t:0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((r,i)=>{i!=="offset"&&t.set(i,this._finished?r:IE(this.element,i))}),this.currentSnapshot=t}triggerCallback(t){let n=t==="start"?this._onStartFns:this._onDoneFns;n.forEach(r=>r()),n.length=0}},gE=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,n){return!1}containsElement(t,n){return _E(t,n)}getParentElement(t){return Np(t)}query(t,n,r){return DE(t,n,r)}computeStyle(t,n,r){return window.getComputedStyle(t)[n]}animate(t,n,r,i,o,s=[]){let a=i==0?"both":"forwards",c={duration:r,delay:i,fill:a};o&&(c.easing=o);let u=new Map,l=s.filter(p=>p instanceof tl);KN(r,i)&&l.forEach(p=>{p.currentSnapshot.forEach((g,_)=>u.set(_,g))});let d=qN(n).map(p=>No(p));d=QN(t,d,u);let f=OP(t,d);return new tl(t,d,c,f)}};var Wu="@",xE="@.disabled",nl=class{constructor(t,n,r,i){this.namespaceId=t,this.delegate=n,this.engine=r,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){var n,r;(r=(n=this.delegate).destroyNode)==null||r.call(n,t)}destroy(){var t;this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),(t=this._onDestroy)==null||t.call(this)}createElement(t,n){return this.delegate.createElement(t,n)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,n){this.delegate.appendChild(t,n),this.engine.onInsert(this.namespaceId,n,t,!1)}insertBefore(t,n,r,i=!0){this.delegate.insertBefore(t,n,r),this.engine.onInsert(this.namespaceId,n,t,i)}removeChild(t,n,r){this.engine.onRemove(this.namespaceId,n,this.delegate)}selectRootElement(t,n){return this.delegate.selectRootElement(t,n)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,n,r,i){this.delegate.setAttribute(t,n,r,i)}removeAttribute(t,n,r){this.delegate.removeAttribute(t,n,r)}addClass(t,n){this.delegate.addClass(t,n)}removeClass(t,n){this.delegate.removeClass(t,n)}setStyle(t,n,r,i){this.delegate.setStyle(t,n,r,i)}removeStyle(t,n,r){this.delegate.removeStyle(t,n,r)}setProperty(t,n,r){n.charAt(0)==Wu&&n==xE?this.disableAnimations(t,!!r):this.delegate.setProperty(t,n,r)}setValue(t,n){this.delegate.setValue(t,n)}listen(t,n,r){return this.delegate.listen(t,n,r)}disableAnimations(t,n){this.engine.disableAnimations(t,n)}},Ap=class extends nl{constructor(t,n,r,i,o){super(n,r,i,o),this.factory=t,this.namespaceId=n}setProperty(t,n,r){n.charAt(0)==Wu?n.charAt(1)=="."&&n==xE?(r=r===void 0?!0:!!r,this.disableAnimations(t,r)):this.engine.process(this.namespaceId,t,n.slice(1),r):this.delegate.setProperty(t,n,r)}listen(t,n,r){if(n.charAt(0)==Wu){let i=PP(t),o=n.slice(1),s="";return o.charAt(0)!=Wu&&([o,s]=RP(o)),this.engine.listen(this.namespaceId,i,o,s,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,r,a)})}return this.delegate.listen(t,n,r)}};function PP(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}function RP(e){let t=e.indexOf("."),n=e.substring(0,t),r=e.slice(t+1);return[n,r]}var vE=class{constructor(t,n,r){this.delegate=t,this.engine=n,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,n.onRemovalComplete=(i,o)=>{let s=o==null?void 0:o.parentNode(i);s&&o.removeChild(s,i)}}createRenderer(t,n){var u;let r="",i=this.delegate.createRenderer(t,n);if(!t||!((u=n==null?void 0:n.data)!=null&&u.animation)){let l=this._rendererCache,d=l.get(i);if(!d){let f=()=>l.delete(i);d=new nl(r,i,this.engine,f),l.set(i,d)}return d}let o=n.id,s=n.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,t,l.name,l)};return n.data.animation.forEach(a),new Ap(this,s,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,n,r){if(t>=0&&tn(r));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),i.push([n,r])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var FP=ie(()=>{let e={onRemovalComplete:()=>{}},t=new We(null),n=v(el,se.Optional)||e,{onRemovalComplete:r=e.onRemovalComplete}=n;return n.onRemovalComplete=(i,o)=>{t.next(i),r.call(n,i,o)},t.pipe(ee(i=>ht(0).pipe(w(()=>null),_e(i))),vt())});function NE(e,t=null){return To(e).activeElement!==e&&!e.matches(":disabled")&&!(t!=null&&t.contains(e))}function LP(e){return xe(J(e,"focusin").pipe(w(({target:t})=>t)),J(e,"focusout").pipe(ye(({target:t,relatedTarget:n})=>!!n&&NE(t)),w(({relatedTarget:t})=>t)))}var PE=ie(()=>{let e=v(FP),t=v(de),n=v(le),r=J(t,"focusout"),i=J(t,"focusin"),o=J(t,"blur"),s=J(t,"mousedown"),a=J(t,"mouseup");return xe(r.pipe(be(s),_d(()=>a),rs(e),ye(([c,u])=>NE(Fr(c),u)),w(([{relatedTarget:c}])=>c)),o.pipe(w(()=>n.activeElement),ye(c=>!!(c!=null&&c.matches("iframe")))),i.pipe(ee(c=>{let u=Fr(c),l=To(u);return l===n?M(u):LP(l).pipe(_e(u))})),s.pipe(ee(c=>{let u=Fr(c);return!n.activeElement||n.activeElement===n.body?M(u):r.pipe(Ke(1),w(()=>u),be(ht(0)))}))).pipe(Ue(),vt())}),RE=Ee([]);var FE=ie(()=>{var e,t;return(t=(e=v(le).querySelector("base"))===null||e===void 0?void 0:e.href)!==null&&t!==void 0?t:""}),TW=ie(()=>v(li).createRenderer(null,null)),kP=Ee([]);function LE(e){return{provide:kP,multi:!0,useExisting:e}}var AW=ie(()=>{var e;let t=(e=v(le).querySelector("base"))===null||e===void 0?void 0:e.href;if(t)return t;let n=v(le).createElement("a");return n.href="",n.pathname}),Js=new D("[TUI_FOCUSABLE_ITEM_ACCESSOR]");function rl(e){return{provide:Js,useExisting:e}}var OW=new D("[TUI_FONTS_READY]",{factory:()=>{var e;return Oe(((e=v(le).fonts)===null||e===void 0?void 0:e.ready)||Ae).pipe(Wt({bufferSize:1,refCount:!1}))}}),ea=ie(()=>np(v(Co))),jP=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/,VP=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/,Fp=ie(()=>jP.test(v(Xh).toLowerCase())||VP.test(v(Xh).slice(0,4).toLowerCase())),xW=ie(()=>v(Fp)&&!v(ea)),NW=ie(()=>$0(v(Co))),PW=ie(()=>!!v(de).chrome),UP=ie(()=>!!v(de).Cypress),BP=ie(Rr),RW=ie(()=>v(UP)||v(BP)),FW=ie(()=>{var e;return typeof((e=v(de))===null||e===void 0?void 0:e.mozCancelFullScreen)<"u"}),LW=ie(()=>v(de).location.host.endsWith("stackblitz.io")),kE=ie(()=>{var e;return!!(!((e=v(de))===null||e===void 0)&&e.webkitConvertPointFromNodeToPage)}),kW=Ee("web");var jW=ie(()=>BD(v(Qt))?new Range:{}),ta=ie(()=>new X(v(le).documentElement)),VW=Ee({timeout:500,threshold:30}),UW=ie(Io),BW=ie(()=>v(de).matchMedia("(any-pointer: coarse)").matches),Lp=new D("[TUI_WINDOW_SIZE]",{factory:()=>{let e=v(de);return J(e,"resize").pipe(_e(null),w(()=>{var t,n;let r=Math.max(e.innerWidth,((t=e.visualViewport)===null||t===void 0?void 0:t.width)||0),i=Math.max(e.innerHeight,((n=e.visualViewport)===null||n===void 0?void 0:n.height)||0);return{width:r,height:i,top:0,left:0,right:r,bottom:i}}),Wt({bufferSize:1,refCount:!0}))}}),HW=ie(()=>v(Lp).pipe(w(({height:e})=>e))),$W=Ee({wheelSensitivity:.01});var qe=(()=>{class e extends er{constructor(){super(1)}ngOnDestroy(){this.next(),this.complete()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),c8=(()=>{class e{constructor(n,r){this.resolver=n,this.injector=r,this.map=new Map}addComponent(n){this.map.has(n)||this.map.set(n,this.resolver.resolveComponentFactory(n).create(this.injector))}}return e.\u0275fac=function(n){return new(n||e)(I(kn),I(go))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),kp=(()=>{class e extends N{constructor({nativeElement:n},r,i){super(o=>this.focusVisible$.subscribe(o)),this.focusVisible$=Y0(n).pipe(J0(r),be(i))}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(gt),I(qe,2))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),HP="tui_",VE=(()=>{class e{generate(){return"".concat(HP).concat(e.autoId++).concat(Date.now())}}return e.autoId=0,e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),$P=(()=>{class e extends N{constructor(n,r){super(i=>this.callback$.subscribe(i)),this.callback$=Mn(()=>{let{nativeElement:i}=n,o=[r,i];for(;i.parentElement;)i=i.parentElement,o.push(i);return xe(...o.map(s=>J(s,"scroll")))})}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(de))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),u8=(()=>{class e extends N{constructor(n,{nativeElement:r},i,o,s,a){super(c=>this.obscured$.subscribe(c)),this.obscured$=xe(xe(n,Tn(o,"resize")).pipe(ts(0)),a.pipe(br(So))).pipe(w(()=>Fu(r)),_e(null),Ue(),zn(i),be(s))}}return e.\u0275fac=function(n){return new(n||e)(I($P,2),I(X),I(ue),I(de),I(qe,2),I(En))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var zP=300;function jE(e){return"scrollX"in e?e.scrollX:e.scrollLeft}function GP(e){return"scrollY"in e?e.scrollY:e.scrollTop}var l8=(()=>{class e{constructor(n,r){this.performanceRef=n,this.animationFrame$=r}scroll$(n,r,i=jE(n),o=zP){let s=GP(n),a=jE(n),c=r-s,u=i-a;return(o?Mn(()=>M(this.performanceRef.now())).pipe(ee(d=>this.animationFrame$.pipe(w(f=>f-d))),w(d=>L0(vr(d/o,0,1))),w(d=>[s+c*d,a+u*d]),ns([r,i]),be(ht(o))):M([r,i])).pipe(Ne(([d,f])=>{var p;(p=n.scrollTo)===null||p===void 0||p.call(n,f,d)}))}}return e.\u0275fac=function(n){return new(n||e)(I(I0),I(En))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),UE=(()=>{class e{constructor(n,r){this.win=n,this.platformId=r,this.cache=new Map}request(n){let r=this.cache.get(n);if(r)return r;let o=("AbortController"in this.win||Rs(this.platformId)?ap(n):Mn(()=>Oe(fetch(n)))).pipe(ee(s=>qa(this,void 0,void 0,function*(){if(s.ok)return s.text();throw new Error("Failed to load ".concat(n," (").concat(s.statusText,")"))})),Wt({bufferSize:1,refCount:!1}));return this.cache.set(n,o),o}}return e.\u0275fac=function(n){return new(n||e)(I(de),I(Qt))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var WP=["viewContainer"],qP="tui_interactive_",Vp=(()=>{class e{constructor(){this.pseudoHover=null,this.pseudoActive=null,this.pseudoFocus=null,this.focusable=!0,this.nativeId="",this.focusedChange=new et,this.focusVisibleChange=new et,this.focusVisible=!1,this.autoIdString="".concat(qP).concat(e.autoId++).concat(Date.now())}get computedDisabled(){return this.disabled}get computedFocusable(){return!this.computedDisabled&&(this.focusable||this.focused)}get computedFocused(){var n;return!this.computedDisabled&&((n=this.pseudoFocus)!==null&&n!==void 0?n:this.focused)}get computedFocusVisible(){var n;return!this.computedDisabled&&((n=this.pseudoFocus)!==null&&n!==void 0?n:this.focusVisible)}get id(){return this.nativeId||this.autoIdString}updateFocused(n){this.focusedChange.emit(n)}updateFocusVisible(n){this.focusVisible!==n&&(this.focusVisible=n,this.focusVisibleChange.emit(n))}}return e.autoId=0,e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,hostVars:7,hostBindings:function(n,r){n&2&&(at("data-focused",r.pseudoFocus),Xe("_disabled",r.computedDisabled)("_focused",r.computedFocused)("_focus-visible",r.computedFocusVisible))},inputs:{pseudoHover:"pseudoHover",pseudoActive:"pseudoActive",pseudoFocus:"pseudoFocus",focusable:"focusable",nativeId:"nativeId"},outputs:{focusedChange:"focusedChange",focusVisibleChange:"focusVisibleChange"}}),e})(),jp=class{},na=(()=>{class e extends Vp{constructor(n,r,i){super(),this.ngControl=n,this.cdr=r,this.valueTransformer=i,this.refresh$=new Te,this.onTouched=ep,this.onChange=ep,this.fallbackValue=this.getFallbackValue(),this.destroy$=new Te,this.readOnly=!1,this.pseudoInvalid=null,this.ngControl&&(this.ngControl.valueAccessor=this)}get computedInvalid(){return this.interactive&&(this.pseudoInvalid!==null?this.pseudoInvalid:this.touched&&this.invalid)}get value(){var n;return(n=this.previousInternalValue)!==null&&n!==void 0?n:this.fallbackValue}set value(n){this.updateValue(n)}get safeCurrentValue(){var n;return(n=this.rawValue)!==null&&n!==void 0?n:this.fallbackValue}get invalid(){return this.safeNgControlData(({invalid:n})=>n,!1)}get valid(){return this.safeNgControlData(({valid:n})=>n,!1)}get touched(){return this.safeNgControlData(({touched:n})=>n,!1)}get disabled(){return this.safeNgControlData(({disabled:n})=>n,!1)}get interactive(){return!this.readOnly&&!this.computedDisabled}get control(){return this.safeNgControlData(({control:n})=>n,null)}get computedName(){var n,r;return(r=(n=this.controlName)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:null}get controlName(){var n,r,i;return(i=(r=(n=this.ngControl)===null||n===void 0?void 0:n.name)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:null}get rawValue(){let{ngControl:n}=this;if(n===null)return;let r=n instanceof Nu&&this.previousInternalValue===void 0?n.viewModel:n.value;return this.fromControlValue(r)}ngOnInit(){this.refresh$.pipe(ts(0),_e(null),w(()=>{var n;return(n=this.ngControl)===null||n===void 0?void 0:n.control}),ye(wi),Ue(),ee(n=>xe(n.valueChanges,n.statusChanges)),be(this.destroy$)).subscribe(()=>{this.refreshLocalValue(this.safeCurrentValue)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}checkControlUpdate(){this.cdr.markForCheck()}registerOnChange(n){this.onChange=r=>{n(this.toControlValue(r))},this.refresh$.next()}registerOnTouched(n){this.onTouched=n}setDisabledState(){this.checkControlUpdate()}writeValue(n){let r=this.ngControl instanceof Nu&&this.previousInternalValue===void 0?this.ngControl.model:n;this.refreshLocalValue(this.fromControlValue(r))}updateFocused(n){n||this.controlMarkAsTouched(),super.updateFocused(n)}updateValue(n){this.disabled||this.valueIdenticalComparator(this.value,n)||(this.previousInternalValue=n,this.controlSetValue(n))}valueIdenticalComparator(n,r){return n===r}safeNgControlData(n,r){var i;return(i=this.ngControl&&n(this.ngControl))!==null&&i!==void 0?i:r}controlMarkAsTouched(){this.onTouched(),this.checkControlUpdate()}controlSetValue(n){this.onChange(n),this.checkControlUpdate()}refreshLocalValue(n){this.previousInternalValue=n,this.checkControlUpdate()}fromControlValue(n){return this.valueTransformer?this.valueTransformer.fromControlValue(n):n}toControlValue(n){return this.valueTransformer?this.valueTransformer.toControlValue(n):n}}return e.\u0275fac=function(n){return new(n||e)(y(Ei,8),y(gt),y(jp,8))},e.\u0275dir=$({type:e,hostVars:4,hostBindings:function(n,r){n&2&&Xe("_readonly",r.readOnly)("_invalid",r.computedInvalid)},inputs:{readOnly:"readOnly",pseudoInvalid:"pseudoInvalid"},features:[$e]}),e})();function T8(e){return{provide:na,useExisting:e}}var BE=(()=>{class e{constructor(){this.change$=new Te}ngOnChanges(){this.change$.next()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,features:[sn]}),e})(),il=(()=>{class e extends N{constructor(n){super(r=>this.dialogs$.subscribe(r)),this.idService=n,this.dialogs$=new We([])}open(n,r={}){return new N(i=>{let o=a=>{i.next(a),i.complete()},s=Object.assign(Object.assign(Object.assign({},this.defaultOptions),r),{content:n,completeWith:o,$implicit:i,component:this.component,createdAt:Date.now(),id:this.idService.generate()});return this.dialogs$.next([...this.dialogs$.value,s]),()=>{this.dialogs$.next(this.dialogs$.value.filter(a=>a!==s))}})}}return e.\u0275fac=function(n){return new(n||e)(I(VE))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var A8=(()=>{class e extends na{clear(){this.value=[]}getFallbackValue(){return[]}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,features:[$e]}),e})(),O8=(()=>{class e extends na{getFallbackValue(){return null}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,features:[$e]}),e})(),ol=(()=>{class e{get safeHost(){if(!this.host)throw new ju;return this.host}attach(n){this.host=n}add(n){return this.safeHost.addComponentChild(n)}remove({hostView:n}){n.destroyed||n.destroy()}addTemplate(n,r){return this.safeHost.addTemplateChild(n,r)}removeTemplate(n){n.destroyed||n.destroy()}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),Up=(()=>{class e{constructor(n,r,i){this.injector=n,this.el=r,i.attach(this)}get clientRect(){return this.el.nativeElement.getBoundingClientRect()}addComponentChild(n){let r=n.createInjector(this.injector),o=r.get(kn).resolveComponentFactory(n.component),s=[{provide:e,useValue:this}],a=bt.create({parent:r,providers:s}),c=this.vcr.createComponent(o,void 0,a);return c.changeDetectorRef.detectChanges(),c}addTemplateChild(n,r){return this.vcr.createEmbeddedView(n,r)}}return e.\u0275fac=function(n){return new(n||e)(y(go),y(X),y(ol))},e.\u0275dir=$({type:e,viewQuery:function(n,r){if(n&1&&yD(WP,5,Nt),n&2){let i;Th(i=Ah())&&(r.vcr=i.first)}}}),e})();function HE(e){return e!==null&&typeof e<"u"&&"".concat(e)!=="false"}var P8=(()=>{class e{transform(n,r,...i){return r(n,...i)}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275pipe=pi({name:"tuiMapper",type:e,pure:!0}),e})(),R8=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function YP(e,t){if(e&1&&(ge(0,"div",3),Le(1,"div",4),pe()),e&2){let n=me().ngIf;Xe("t-bar_has-horizontal",n[1])}}function ZP(e,t){if(e&1&&(ge(0,"div",5),Le(1,"div",6),pe()),e&2){let n=me().ngIf;Xe("t-bar_has-vertical",n[0])}}function KP(e,t){if(e&1&&(_n(0),Ce(1,YP,2,2,"div",1)(2,ZP,2,2,"div",2),Dn()),e&2){let n=t.ngIf;re(1),U("ngIf",n[0]),re(1),U("ngIf",n[1])}}var sl=24;function QP({clientY:e},{top:t,height:n}){return(e-t)/n}function XP({clientX:e},{left:t,width:n}){return(e-t)/n}var JP=(()=>{class e{constructor(n,r,i,o,s,a){this.container=o,this.doc=s,this.el=a,this.tuiScrollbar="vertical";let{nativeElement:c}=this.el,u=J(c,"mousedown"),l=J(this.doc,"mousemove"),d=J(this.doc,"mouseup"),f=J(this.wrapper,"mousedown");xe(f.pipe(w(p=>this.getScrolled(p,.5,.5))),u.pipe(X0(),ee(p=>{let g=c.getBoundingClientRect(),_=QP(p,g),T=XP(p,g);return l.pipe(w(A=>this.getScrolled(A,_,T)),be(d))}))).pipe($n(n),be(r)).subscribe(([p,g])=>{this.tuiScrollbar==="vertical"?this.element.scrollTop=p:this.element.scrollLeft=g}),xe(i.pipe(br(So)),Q0(this.element)).pipe($n(n),be(r)).subscribe(()=>{this.tuiScrollbar==="vertical"?(c.style.top="".concat(this.thumb*100,"%"),c.style.height="".concat(this.view*100,"%")):(c.style.left="".concat(this.thumb*100,"%"),c.style.width="".concat(this.view*100,"%"))})}get wrapper(){return this.el.nativeElement.parentElement}get scrolled(){let{scrollTop:n,scrollHeight:r,clientHeight:i,scrollLeft:o,scrollWidth:s,clientWidth:a}=this.element;return this.tuiScrollbar==="vertical"?n/(r-i):o/(s-a)}get compensation(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.element;return n*n/r>sl&&this.tuiScrollbar==="vertical"||i*i/o>sl&&this.tuiScrollbar==="horizontal"?0:this.tuiScrollbar==="vertical"?sl/n:sl/i}get thumb(){let n=this.compensation||this.view;return this.scrolled*(1-n)}get view(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.element;return this.tuiScrollbar==="vertical"?Math.ceil(n/r*100)/100:Math.ceil(i/o*100)/100}get element(){return this.container.nativeElement}getScrolled({clientY:n,clientX:r},i,o){let{offsetHeight:s,offsetWidth:a}=this.el.nativeElement,{top:c,left:u,width:l,height:d}=this.wrapper.getBoundingClientRect(),f=this.element.scrollHeight-d,p=this.element.scrollWidth-l,g=(n-c-s*i)/(d-s),_=(r-u-a*o)/(l-a);return[f*g,p*_]}}return e.\u0275fac=function(n){return new(n||e)(y(ue),y(qe,2),y(En),y(ta),y(le),y(X))},e.\u0275dir=$({type:e,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:"tuiScrollbar"},features:[ze([qe])]}),e})(),X8=(()=>{class e{constructor(n,r,i){this.zone=n,this.scrollRef=r,this.animationFrame$=i,this.refresh$=this.animationFrame$.pipe(br(300),w(()=>this.scrollbars),_e([!1,!1]),Ue((o,s)=>o[0]===s[0]&&o[1]===s[1]),zn(this.zone))}get scrollbars(){let{clientHeight:n,scrollHeight:r,clientWidth:i,scrollWidth:o}=this.scrollRef.nativeElement;return[Math.ceil(n/r*100)<100,Math.ceil(i/o*100)<100]}}return e.\u0275fac=function(n){return new(n||e)(y(ue),y(ta),y(En))},e.\u0275cmp=st({type:e,selectors:[["tui-scroll-controls"]],decls:2,vars:3,consts:[[4,"ngIf"],["class","t-bar t-bar_vertical",3,"t-bar_has-horizontal",4,"ngIf"],["class","t-bar t-bar_horizontal",3,"t-bar_has-vertical",4,"ngIf"],[1,"t-bar","t-bar_vertical"],["tuiScrollbar","vertical",1,"t-thumb"],[1,"t-bar","t-bar_horizontal"],["tuiScrollbar","horizontal",1,"t-thumb"]],template:function(n,r){n&1&&(Ce(0,KP,3,2,"ng-container",0),cn(1,"async")),n&2&&U("ngIf",un(1,1,r.refresh$))},dependencies:[Pt,JP,Bn],styles:["[_nghost-%COMP%]{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1;min-width:calc(100% - 1px);min-height:calc(100% - 1px);max-width:calc(100% - 1px);max-height:calc(100% - 1px);float:left;-webkit-margin-end:calc(-100% + 1px);margin-inline-end:calc(-100% + 1px);pointer-events:none}.t-bar[_ngcontent-%COMP%]{position:absolute;right:0;bottom:0;pointer-events:auto;animation:tuiFadeIn var(--tui-duration, .3s) ease-in-out}.t-bar_vertical[_ngcontent-%COMP%]{top:0;width:.875rem}.t-bar_horizontal[_ngcontent-%COMP%]{left:0;height:.875rem}.t-bar_has-horizontal[_ngcontent-%COMP%]{bottom:.5rem}.t-bar_has-vertical[_ngcontent-%COMP%]{right:.5rem}.t-thumb[_ngcontent-%COMP%]{position:absolute;border-radius:6.25rem;border:.25rem solid transparent;cursor:pointer;pointer-events:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;background:currentColor;background-clip:content-box;box-sizing:border-box;transition:all var(--tui-duration, .3s) ease-in-out;transition-property:width,height,opacity;opacity:.2}.t-thumb[_ngcontent-%COMP%]:hover{opacity:.24}.t-thumb[_ngcontent-%COMP%]:active{opacity:.48}.t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{right:0;width:.75rem;min-height:1.25rem}.t-bar_vertical[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_vertical[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{width:.875rem}.t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]{bottom:0;height:.75rem;min-width:1.25rem}.t-bar_horizontal[_ngcontent-%COMP%]:hover .t-thumb[_ngcontent-%COMP%], .t-bar_horizontal[_ngcontent-%COMP%] .t-thumb[_ngcontent-%COMP%]:active{height:.875rem}"],changeDetection:0}),e})();var J8=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=$({type:e,selectors:[["","tuiScrollRef",""]],features:[ze([{provide:ta,useExisting:X}])]}),e})(),e5=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt]]}),e})();function eR(e){let t=[],n=!1,r;return function(...o){return n&&t.length===o.length&&o.every((a,c)=>a===t[c])||(t=o,r=e.apply(this,o),n=!0),r}}function $E(e,t,n=!0){return function(){let i=e.call(this);return Object.defineProperty(this,t,{enumerable:n,value:i}),i}}function al(e,t,n){if(typeof e=="function"){let c=t;if(c.kind==="getter")return $E(e,c.name);if(c.kind==="method")return eR(e);throw new zs}let{get:r,enumerable:i,value:o}=n,s=t;if(r)return{configurable:!0,enumerable:i,get:$E(r,s,i)};if(typeof o!="function")throw new zs;let a=o;return{configurable:!0,enumerable:i,get(){let c=[],u=!1,l,d=(...f)=>(u&&c.length===f.length&&f.every((g,_)=>g===c[_])||(c=f,l=a.apply(this,f),u=!0),l);return Object.defineProperty(this,s,{configurable:!0,value:d}),d}}}var y5=(()=>{class e{constructor(n,r,i,o){var s;this.active$=n,this.zone=r,this.el=i,this.directParentActiveZone=o,this.subActiveZones=[],this.tuiActiveZoneParent=null,this.tuiActiveZoneChange=this.active$.pipe(w(a=>!!a&&this.contains(a)),_e(!1),Ue(),Ed(1),zn(this.zone)),(s=this.directParentActiveZone)===null||s===void 0||s.addSubActiveZone(this)}set tuiActiveZoneParentSetter(n){this.setZone(n)}ngOnDestroy(){var n,r;(n=this.directParentActiveZone)===null||n===void 0||n.removeSubActiveZone(this),(r=this.tuiActiveZoneParent)===null||r===void 0||r.removeSubActiveZone(this)}contains(n){return this.el.nativeElement.contains(n)||this.subActiveZones.some((r,i,o)=>o.indexOf(r)===i&&r.contains(n))}setZone(n){var r;(r=this.tuiActiveZoneParent)===null||r===void 0||r.removeSubActiveZone(this),n==null||n.addSubActiveZone(this),this.tuiActiveZoneParent=n}addSubActiveZone(n){this.subActiveZones=[...this.subActiveZones,n]}removeSubActiveZone(n){this.subActiveZones=F0(this.subActiveZones,this.subActiveZones.indexOf(n))}}return e.\u0275fac=function(n){return new(n||e)(y(PE),y(ue),y(X),y(e,12))},e.\u0275dir=$({type:e,selectors:[["","tuiActiveZone","",5,"ng-container"],["","tuiActiveZoneChange","",5,"ng-container"],["","tuiActiveZoneParent","",5,"ng-container"]],inputs:{tuiActiveZoneParentSetter:["tuiActiveZoneParent","tuiActiveZoneParentSetter"]},outputs:{tuiActiveZoneChange:"tuiActiveZoneChange"},exportAs:["tuiActiveZone"]}),Wa([al],e.prototype,"setZone",null),e})(),_5=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var zE=(()=>{class e{constructor(n,r){this.focusable=n,this.el=r}get element(){var n;return((n=this.focusable)===null||n===void 0?void 0:n.nativeFocusableElement)||this.el.nativeElement}get isTextFieldElement(){return this.element.matches("input, textarea, [contenteditable]")}}return e.\u0275fac=function(n){lh()},e.\u0275dir=$({type:e}),e})(),tR=1e3,nR=".ng-animating",rR=(()=>{class e extends zE{constructor(n,r,i){super(n,r),this.animationFrame$=i}setFocus(){this.isTextFieldElement?gd(ht(tR),this.animationFrame$.pipe(br(So),w(()=>this.element.closest(nR)),wd(Boolean),Ke(1))).subscribe(()=>this.element.focus({preventScroll:!0})):this.element.focus({preventScroll:!0})}}return e.\u0275fac=function(n){return new(n||e)(y(Js,10),y(X),y(En))},e.\u0275dir=$({type:e,features:[$e]}),e})(),iR=["type","inputMode","autocomplete","accept","min","max","step","pattern","size","maxlength"],oR=(()=>{class e extends zE{constructor(n,r,i,o,s){super(n,r),this.renderer=i,this.zone=o,this.win=s,this.patchCssStyles()}setFocus(){this.isTextFieldElement?this.zone.runOutsideAngular(()=>this.iosWebkitAutofocus()):this.element.focus({preventScroll:!0})}iosWebkitAutofocus(){var n;let r=this.makeFakeInput(),i=this.getDurationTimeBeforeFocus(),o=0,s=0,a=()=>r.focus({preventScroll:!0}),c=()=>{clearTimeout(o),o=this.win.setTimeout(()=>{clearTimeout(s),r.removeEventListener("blur",a),r.removeEventListener("focus",c),s=this.win.setTimeout(()=>{this.element.focus({preventScroll:!1}),r.remove()},i)})};r.addEventListener("blur",a,{once:!0}),r.addEventListener("focus",c),this.insideDialog()?this.win.document.body.appendChild(r):(n=this.element.parentElement)===null||n===void 0||n.appendChild(r),r.focus({preventScroll:!0})}makeFakeInput(){let n=this.renderer.createElement("input"),r=this.element.getBoundingClientRect();return this.patchFakeInputFromFocusableElement(n),n.style.height=Oo(r.height),n.style.width=Oo(r.width/2),n.style.position="fixed",n.style.zIndex="-99999999",n.style.caretColor="transparent",n.style.border="none",n.style.outline="none",n.style.color="transparent",n.style.background="transparent",n.style.cursor="none",n.style.fontSize=Oo(16),n.style.top=Oo(r.top),n.style.left=Oo(r.left),n}getDurationTimeBeforeFocus(){return parseFloat(this.win.getComputedStyle(this.element).getPropertyValue("--tui-duration"))||0}insideDialog(){return!!this.element.closest("tui-dialog")}patchCssStyles(){[this.win.document.documentElement,this.win.document.body].forEach(n=>{n.style.setProperty("overflow","auto"),n.style.setProperty("height","100%")})}patchFakeInputFromFocusableElement(n){iR.forEach(r=>{let i=this.element.getAttribute(r);wi(i)&&n.setAttribute(r,i)})}}return e.\u0275fac=function(n){return new(n||e)(y(Js,10),y(X),y(mr),y(ue),y(de))},e.\u0275dir=$({type:e,features:[$e]}),e})(),sR={delay:NaN},aR=Ee(sR);var GE=new D("[TUI_AUTOFOCUS_HANDLER]"),cR=[{provide:GE,useFactory:(e,t,n,r,i,o,s)=>s?new oR(e,t,r,i,o):new rR(e,t,n),deps:[[new fr,new ky,Js],X,En,mr,ue,de,ea]},qe],WE=(()=>{class e{constructor(n,r,i){this.handler=n,this.options=r,this.destroy$=i,this.autoFocus=!0}ngAfterViewInit(){HE(this.autoFocus)&&this.focus()}focus(){Number.isNaN(this.options.delay)?Promise.resolve().then(()=>this.handler.setFocus()):ht(this.options.delay).pipe(be(this.destroy$)).subscribe(()=>this.handler.setFocus())}}return e.\u0275fac=function(n){return new(n||e)(y(GE),y(aR),y(qe,2))},e.\u0275dir=$({type:e,selectors:[["","tuiAutoFocus",""]],inputs:{autoFocus:["tuiAutoFocus","autoFocus"]},features:[ze(cR)]}),e})(),qE=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var Bp=class{constructor(t){this.internalDirectiveInstance=t}get $implicit(){return this.internalDirectiveInstance.tuiLet}get tuiLet(){return this.internalDirectiveInstance.tuiLet}},YE=(()=>{class e{constructor(n,r){n.createEmbeddedView(r,new Bp(this))}static ngTemplateContextGuard(n,r){return!0}}return e.\u0275fac=function(n){return new(n||e)(y(Nt),y(pt))},e.\u0275dir=$({type:e,selectors:[["","tuiLet",""]],inputs:{tuiLet:"tuiLet"}}),e})(),ZE=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var J5=(()=>{class e{constructor({nativeElement:n},r,i){this.mode="scroll",J(n,"wheel",{passive:!1}).pipe(ye(()=>this.enabled),$n(r),be(i)).subscribe(o=>{this.processEvent(o,!!o.deltaY,o.deltaY?o.deltaY<0:o.deltaX<0)}),J(n,"touchstart",{passive:!0}).pipe(ee(({touches:o})=>{let{clientX:s,clientY:a}=o[0],c=0,u=0,l;return J(n,"touchmove",{passive:!1}).pipe(ye(()=>this.enabled),Ne(d=>{let f=d.changedTouches[0];c=s-f.clientX,u=a-f.clientY,s=f.clientX,a=f.clientY,l===void 0&&(l=Math.abs(u)>Math.abs(c)),this.processEvent(d,l,l?u<0:c<0)}))}),$n(r),be(i)).subscribe()}get enabled(){return this.mode!=="none"}get overscrollBehavior(){return this.enabled?"contain":null}processEvent(n,r,i){var o;let{target:s,currentTarget:a,cancelable:c}=n;if(!(!c||!Ru(s)||((o=s)===null||o===void 0?void 0:o.type)==="range")){if(this.mode==="all"&&(r&&!a.contains(Lu(s))||!r&&!a.contains(Lu(s,!1)))){n.preventDefault();return}if(r&&(i&&!Hs(s,a,!0,!1)||!i&&!Hs(s,a,!0,!0))){n.preventDefault();return}!r&&(i&&!Hs(s,a,!1,!1)||!i&&!Hs(s,a,!1,!0))&&n.preventDefault()}}}return e.\u0275fac=function(n){return new(n||e)(y(X),y(ue),y(qe,2))},e.\u0275dir=$({type:e,selectors:[["","tuiOverscroll",""]],hostVars:2,hostBindings:function(n,r){n&2&&Do("overscroll-behavior",r.overscrollBehavior)},inputs:{mode:["tuiOverscroll","mode"]},features:[ze([qe])]}),e})(),e4=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var uR=["*"],lR=(()=>{class e extends ol{}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),r4=(()=>{class e extends Up{}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275cmp=st({type:e,selectors:[["tui-dropdown-host"]],features:[ze([{provide:ol,useExisting:lR},{provide:Up,useExisting:e}]),$e],ngContentSelectors:uR,decls:3,vars:0,consts:[["viewContainer",""]],template:function(n,r){n&1&&(Vn(),zt(0),As(1,null,0))},styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block;height:100%}[_nghost-%COMP%]:before{content:"";display:block;overflow:hidden}.t-position-fixed-offset[_ngcontent-%COMP%]{position:fixed;left:0;top:0;pointer-events:none;visibility:hidden;width:100%;height:100%}'],changeDetection:0}),e})(),i4=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();var Hp=function(e){return e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday",e}(Hp||{}),dR=function(e){return e[e.January=0]="January",e[e.February=1]="February",e[e.March=2]="March",e[e.April=3]="April",e[e.May=4]="May",e[e.June=5]="June",e[e.July=6]="July",e[e.August=7]="August",e[e.September=8]="September",e[e.October=9]="October",e[e.November=10]="November",e[e.December=11]="December",e}(dR||{});var ia="?v=".concat(N0);var KE=e=>e.includes(".svg#")?e:"#".concat(e),c4=()=>Jh,$p={decimalLimit:1/0,decimalSeparator:",",thousandSeparator:x0,zeroPadding:!0,rounding:"truncate",decimal:"not-zero"},QE=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];var u4="tui-scroll-into-view";var XE="tui-icon-error",l4=["bottom-left","bottom","bottom-right","top-left","top","top-right","left-top","left","left-bottom","right-top","right","right-bottom"];var h=function(e){return e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AO="AO",e.AR="AR",e.AT="AT",e.AU="AU",e.AW="AW",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GT="GT",e.GW="GW",e.GY="GY",e.HK="HK",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IN="IN",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.US="US",e.UY="UY",e.UZ="UZ",e.VC="VC",e.VE="VE",e.VG="VG",e.VN="VN",e.VU="VU",e.WS="WS",e.XK="XK",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW",e}(h||{});var fR={cardNumber:["Number","Card number"],cardExpiry:["Expires","Valid through"]},hR={colorSelectorModeNames:["Solid color","Gradient"],toolbarTools:{undo:"Undo",redo:"Redo",font:"Font",fontStyle:"Font style",fontSize:"Font size",bold:"Bold",italic:"Italic",underline:"Underline",strikeThrough:"Strike through",justify:"Justify",justifyLeft:"Justify left",justifyCenter:"Justify center",justifyRight:"Justify right",justifyFull:"Justify full",list:"List",indent:"Indent",outdent:"Outdent",unorderedList:"Unordered list",orderedList:"Ordered list",quote:"Quote",foreColor:"Color",backColor:"Background color",hiliteColor:"Highlight color",clear:"Clear",link:"Link",attach:"Attach file",tex:"Insert TeX",code:"Code",image:"Insert image",insertHorizontalRule:"Insert horizontal rule",superscript:"Superscript",subscript:"Subscript",insertTable:"Insert table",insertGroup:"Insert group",hiliteGroup:"Hilite group",removeGroup:"Remove group",insertAnchor:"Insert anchor",mergeCells:"Merge cells",splitCells:"Split cells",rowsColumnsManaging:"Managing rows and columns",cellColor:"Cell color",setDetails:"Details",removeDetails:"Remove details"},editorEditLink:{urlExample:"example.com",anchorExample:"anchor"},editorTableCommands:[["Insert column before","Insert column after"],["Insert row before","Insert row after"],["Delete column","Delete row"]],editorCodeOptions:["Code in the text","Code in block"],editorFontOptions:{small:"Small",large:"Large",normal:"Normal",title:"Title",subtitle:"Subtitle"}},pR={previewTexts:{rotate:"Rotate"},zoomTexts:{zoomOut:"Zoom out",zoomIn:"Zoom in",reset:"Reset"}},mR={showHideText:"Show/Hide",paginationTexts:{pages:"Pages",linesPerPage:"Lines per page",of:"of"}},gR={[h.AD]:"Andorra",[h.AE]:"United Arab Emirates",[h.AF]:"Afghanistan",[h.AG]:"Antigua and Barbuda",[h.BL]:"Saint Barth\xE9lemy",[h.AI]:"Anguilla",[h.AL]:"Albania",[h.AM]:"Armenia",[h.AO]:"Angola",[h.AR]:"Argentina",[h.AT]:"Austria",[h.AU]:"Australia",[h.AW]:"Aruba",[h.AZ]:"Azerbaijan",[h.BA]:"Bosnia and Herzegovina",[h.BB]:"Barbados",[h.BD]:"Bangladesh",[h.BE]:"Belgium",[h.BF]:"Burkina Faso",[h.BG]:"Bulgaria",[h.BH]:"Bahrain",[h.BI]:"Burundi",[h.BJ]:"Benin",[h.GF]:"Guyana",[h.BM]:"Bermuda",[h.BN]:"Brunei Darussalam",[h.BO]:"Bolivia",[h.BQ]:"Bonaire, Sint Eustatius and Saba",[h.BR]:"Brazil",[h.BS]:"Bahamas",[h.BT]:"Bhutan",[h.BW]:"Botswana",[h.BY]:"Belarus",[h.BZ]:"Belize",[h.CA]:"Canada",[h.CD]:"Dem. Rep. Congo (Kinshasa)",[h.CF]:"Central African Republic",[h.CG]:"Congo (Brazzaville)",[h.CH]:"Switzerland",[h.CI]:"Ivory Coast",[h.CL]:"Chile",[h.CM]:"Cameroon",[h.CN]:"China",[h.CO]:"Colombia",[h.CR]:"Costa Rica",[h.CU]:"Cuba",[h.CV]:"Cape Verde",[h.CW]:"Cura\xE7ao",[h.CY]:"Cyprus",[h.CZ]:"Czech Republic",[h.DE]:"Germany",[h.DJ]:"Djibouti",[h.DK]:"Denmark",[h.DM]:"Dominica",[h.DO]:"Dominican Republic",[h.DZ]:"Algeria",[h.EC]:"Ecuador",[h.EE]:"Estonia",[h.EG]:"Egypt",[h.ER]:"Eritrea",[h.ES]:"Spain",[h.ET]:"Ethiopia",[h.FI]:"Finland",[h.FJ]:"Fiji",[h.FK]:"Falkland Islands",[h.FM]:"F.S. of Micronesia",[h.FR]:"France",[h.GA]:"Gabon",[h.GB]:"United Kingdom",[h.GD]:"Grenada",[h.GE]:"Georgia",[h.GP]:"Guadeloupe",[h.GH]:"Ghana",[h.GI]:"Gibraltar",[h.GL]:"Greenland",[h.GM]:"Gambia",[h.GN]:"Guinea",[h.MF]:"Saint-Martin",[h.GQ]:"Equatorial Guinea",[h.GR]:"Greece",[h.GT]:"Guatemala",[h.GW]:"Guinea-Bissau",[h.GY]:"Guyana",[h.HK]:"Hong Kong",[h.HN]:"Honduras",[h.HR]:"Croatia",[h.HT]:"Haiti",[h.HU]:"Hungary",[h.ID]:"Indonesia",[h.IE]:"Ireland",[h.IL]:"Israel",[h.IN]:"India",[h.IQ]:"Iraq",[h.IR]:"Iran",[h.IS]:"Iceland",[h.IT]:"Italy",[h.JM]:"Jamaica",[h.JO]:"Jordan",[h.JP]:"Japan",[h.KE]:"Kenya",[h.KG]:"Kyrgyzstan",[h.KH]:"Cambodia",[h.KM]:"Comoros",[h.KN]:"Saint Kitts and Nevis",[h.KP]:"Korean PDR",[h.KR]:"Rep. Korea",[h.KW]:"Kuwait",[h.KY]:"Cayman Islands",[h.KZ]:"Kazakhstan",[h.LA]:"Laos",[h.LB]:"Lebanon",[h.LC]:"Saint Lucia",[h.LI]:"Liechtenstein",[h.LK]:"Sri Lanka",[h.LR]:"Liberia",[h.LS]:"Lesotho",[h.LT]:"Lithuania",[h.LU]:"Luxembourg",[h.LV]:"Latvia",[h.LY]:"Libya",[h.MA]:"Morocco",[h.MC]:"Monaco",[h.MD]:"Moldova",[h.ME]:"Montenegro",[h.MQ]:"Martinique",[h.MG]:"Madagascar",[h.MK]:"Rep. of North Macedonia",[h.ML]:"Mali",[h.MM]:"Burma (Myanmar)",[h.MN]:"Mongolia",[h.MO]:"Macau",[h.RE]:"R\xE9union",[h.MR]:"Mauritania",[h.MS]:"Montserrat",[h.MT]:"Malta",[h.MU]:"Mauritius",[h.MV]:"Maldives",[h.MW]:"Malawi",[h.MX]:"Mexico",[h.MY]:"Malaysia",[h.MZ]:"Mozambique",[h.NA]:"Namibia",[h.NC]:"New Caledonia",[h.NE]:"Niger",[h.NG]:"Nigeria",[h.NI]:"Nicaragua",[h.NL]:"Netherlands",[h.NO]:"Norway",[h.NP]:"Nepal",[h.NZ]:"New Zealand",[h.OM]:"Oman",[h.PA]:"Panama",[h.PE]:"Peru",[h.PF]:"French Polynesia (Tahiti)",[h.PG]:"Papua New Guinea",[h.PH]:"Philippines",[h.PK]:"Pakistan",[h.PL]:"Poland",[h.PT]:"Portugal",[h.PW]:"Palau",[h.PY]:"Paraguay",[h.QA]:"Qatar",[h.YT]:"Mayotte",[h.RO]:"Romania",[h.RS]:"Serbia",[h.RU]:"Russia",[h.RW]:"Rwanda",[h.SA]:"Saudi Arabia",[h.SB]:"Solomon Islands",[h.SC]:"Seychelles",[h.SD]:"Sudan",[h.SE]:"Sweden",[h.SG]:"Singapore",[h.SH]:"Saint Helena",[h.SI]:"Slovenia",[h.SK]:"Slovakia",[h.SL]:"Sierra Leone",[h.SM]:"San Marino",[h.SN]:"Senegal",[h.SO]:"Somalia",[h.SR]:"Suriname",[h.ST]:"Sao Tome and Principe",[h.SV]:"El Salvador",[h.SX]:"Sint Maarten",[h.SY]:"Syrian Arab Republic",[h.SZ]:"Swaziland",[h.TC]:"Turks and Caicos",[h.TD]:"Chad",[h.TG]:"Togo",[h.TH]:"Thailand",[h.TJ]:"Tajikistan",[h.TL]:"East Timor",[h.TM]:"Turkmenistan",[h.TN]:"Tunisia",[h.TO]:"Tonga",[h.TR]:"Turkey",[h.TT]:"Trinidad and Tobago",[h.TW]:"Taiwan",[h.TZ]:"Tanzania",[h.UA]:"Ukraine",[h.UG]:"Uganda",[h.US]:"USA",[h.UY]:"Uruguay",[h.UZ]:"Uzbekistan",[h.VC]:"Saint Vincent and the Grenadines",[h.VE]:"Venezuela",[h.VG]:"British Virgin Islands",[h.VN]:"Vietnam",[h.VU]:"Vanuatu",[h.WS]:"Samoa",[h.XK]:"Kosovo",[h.YE]:"Yemen",[h.ZA]:"South Africa",[h.ZM]:"Zambia",[h.ZW]:"Zimbabwe"},vR={months:["January","February","March","April","May","June","July","August","September","October","November","December"],close:"Close",nothingFoundMessage:"Nothing found",defaultErrorMessage:"Value is invalid",spinTexts:["Previous","Next"],shortWeekDays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],countries:gR},yR={cancel:"Cancel",done:"Done",more:"More",otherDate:"Other date...",showAll:"Show all",hide:"Hide",mobileCalendarTexts:["Choose day","Choose range","Choose days"],range:["from","to"],countTexts:["Plus","Minus"],time:{"HH:MM":"HH:MM","HH:MM:SS":"HH:MM:SS","HH:MM:SS.MSS":"HH:MM:SS.MSS"},dateTexts:{DMY:"dd.mm.yyyy",MDY:"mm.dd.yyyy",YMD:"yyyy.mm.dd"},digitalInformationUnits:["B","KiB","MiB"],passwordTexts:["Show password","Hide password"],copyTexts:["Copy","Copied"],shortCalendarMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],pagination:["Previous page","Next page"],fileTexts:{loadingError:"Upload failed",preview:"Preview",remove:"Remove"},inputFileTexts:{defaultLabelSingle:"or drop\xA0it\xA0here",defaultLabelMultiple:"or drop\xA0them\xA0here",defaultLinkSingle:"Choose a file",defaultLinkMultiple:"Choose files",maxSizeRejectionReason:"File is too large ",formatRejectionReason:"Wrong file type",drop:"Drop file here",dropMultiple:"Drop files here"},multiSelectTexts:{all:"Select all",none:"Select none"},prompt:{yes:"Yes",no:"No"}},JE=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:"english"},vR),yR),mR),fR),hR),pR);var _R=new D("[TUI_DEFAULT_LANGUAGE]",{factory:()=>JE}),ew=new D("[TUI_LANGUAGE]",{factory:()=>M(v(_R))}),y4=new D("[TUI_LANGUAGE_LOADER]"),_4=new D("[TUI_LANGUAGE_STORAGE_KEY]",{factory:()=>"tuiLanguage"});function Mi(e){return()=>v(ew).pipe(ee(t=>ti(t)?t:M(t)),w(t=>t[e]))}function DR(e){return!e||typeof getComputedStyle>"u"?!1:getComputedStyle(e).getPropertyValue("position")==="fixed"||DR(e.parentElement)}function cl({document:e,innerWidth:t}){return Math.max(e.documentElement.clientWidth||0,t||0)}var zp='width="',Gp='height="',Wp="")));if(!(r!=null&&r.includes(zp))||!r.includes(Gp))return"".concat(n.replace(Wp,'");let i=r.indexOf(zp),o=r.indexOf(Gp),s=i+zp.length,a=o+Gp.length,c=r.slice(s,r.indexOf('"',s)),u=r.slice(a,r.indexOf('"',a));if(!u||!c||c.includes("%")||u.includes("%")||c.includes("em")||u.includes("em"))return n.replace(Wp,'').concat(n,"")}var qp=1.5,ER=2.5;function A4(e,t=!1,n=!1,r=!1,i="m"){let o=i==="s"?0:.25,s=0;return e&&(s+=qp+o),t&&(s+=qp+o),n&&(s+=qp+o),r&&(s+=ER+o),s}function ul(e){let t=e.endsWith("/")?e:"".concat(e,"/");return n=>n.startsWith("tuiIcon")?"".concat(t).concat(n,".svg").concat(ia,"#").concat(n):KE(n)}function O4(e){return e.length===1||QE.includes(e)}function x4(e,t="tui-hints-host"){var n;return!!(!((n=Fu(e))===null||n===void 0)&&n.some(r=>!r.closest(t)))}function rw(e){let t=e.trim();return t.startsWith("<")&&t.endsWith(">")}function N4(e,t){return(n,r)=>{let i=n||Object.assign({},r||t);return Object.keys(e).forEach(o=>{i[o]=e[o]}),i}}var nw={xxs:0,xs:1,s:2,m:3,l:4,xl:5,xxl:6};function iw(e,t="s"){return nw[e]>nw[t]}function ow(e,{mobile:t}){return cl(e){var e,t,n;return(n=(t=(e=v(le).defaultView)===null||e===void 0?void 0:e.matchMedia)===null||t===void 0?void 0:t.call(e,"(prefers-reduced-motion: reduce)").matches)!==null&&n!==void 0?n:!1}),CR=300,Yp=ie(()=>v(bR)?0:CR),sw=ie(()=>({value:"",params:{duration:v(Yp)}})),q4=ie(()=>AD()),IR={check:"tuiIconCheck",close:"tuiIconClose",error:"tuiIconAlertCircle",more:"tuiIconChevronRight"},ll=Ee(IR);var Y4=new D("[TUI_DATA_LIST_ACCESSOR]");var SR=new D("[TUI_DATA_LIST_HOST]");function Z4(e){return{provide:SR,useExisting:e}}var K4=Ee(e=>e.isWeekend?"weekend":"weekday"),Q4=new D("[TUI_DOCUMENT_OR_SHADOW_ROOT]"),X4=new D("[TUI_ELEMENT_REF]"),MR=Ee(Hp.Monday),J4=ie(Mi("months")),dl=ie(Mi("close")),eq=ie(Mi("nothingFoundMessage")),tq=ie(Mi("defaultErrorMessage")),nq=ie(Mi("spinTexts")),TR=ie(Mi("shortWeekDays")),fl="assets/taiga-ui/icons",Zp=Ee(fl),aw=Ee({}),cw=ie(()=>ul(v(Zp))),Kp=Ee({mobile:768,desktopSmall:1024,desktopLarge:1280}),Qp=ie(()=>{let e=v(de),t=v(Kp);return J(e,"resize").pipe(vt(),_e(null),w(()=>ow(e,t)),Ue(),zn(v(ue)))}),rq=new D("[TUI_LEGACY_MASK]"),Ro=new D("[TUI_MODE]"),AR={info:"tuiIconInfo",success:"tuiIconCheckCircle",error:"tuiIconXCircle",warning:"tuiIconAlertCircle",neutral:"tuiIconInfo"},OR={autoClose:3e3,label:"",status:"info",hasCloseButton:!0,icon:({$implicit:e})=>AR[e],size:"m",hasIcon:!0,defaultAutoCloseTime:3e3},iq=Ee(OR);var oq=Ee($p);var sq=Ee(M(Object.assign(Object.assign({},$p),{decimalLimit:NaN}))),aq=new D("[TUI_OPTION_CONTENT]");var xR=e=>{let t=e.length-1;return[e[t],...e.slice(0,t)]},cq=ie(()=>{let e=v(MR);return v(TR).pipe(w(xR),w(t=>[...t.slice(e),...t.slice(0,e)]))}),hl=new D("[TUI_SANITIZER]");var uq=ie(()=>{let e=v(le);return xe(J(e,"selectionchange"),J(e,"mouseup"),J(e,"mousedown").pipe(ee(()=>J(e,"mousemove").pipe(be(J(e,"mouseup"))))),J(e,"keydown"),J(e,"keyup")).pipe(vt())}),lq=Ee({decrement:"tuiIconChevronLeft",increment:"tuiIconChevronRight"}),uw=Ee(ku),lw=Ee(Qe),dq=Ee(oa.Textfield),NR=new D("[TUI_TEXTFIELD_HOST]");function fq(e){return{provide:NR,useExisting:e}}var hq=Ee("Taiga"),pq=new D("[TUI_VALUE_ACCESSOR]"),mq=ie(()=>{let e=v(de);return{type:"viewport",getClientRect(){return{top:0,left:0,right:e.innerWidth,bottom:e.innerHeight,width:e.innerWidth,height:e.innerHeight}}}});var pl=class extends N{};function Cq(e){return{provide:pl,multi:!0,useExisting:e}}var ml=class{};function Iq(e){return{provide:ml,multi:!0,useExisting:e}}var Sq=(()=>{class e{constructor(n,r,i){this.destroy$=n,this.drivers=r,this.vehicles=i}ngOnInit(){let n=this.vehicles.find(({type:r})=>r===this.type);xe(...this.drivers.filter(({type:r})=>r===this.type)).pipe(Ue(),be(this.destroy$)).subscribe(r=>{n==null||n.toggle(r)})}}return e.\u0275fac=function(n){return new(n||e)(y(qe,2),y(pl),y(ml))},e.\u0275dir=$({type:e}),e})(),Mq=(()=>{class e{constructor(n){this.host=n}get readOnly(){return this.host.readOnly}get disabled(){return this.host.computedDisabled}get invalid(){return this.host.computedInvalid}get focusable(){return this.host.computedFocusable}get inputMode(){return"text"}get value(){var n;return((n=this.host.value)===null||n===void 0?void 0:n.toString())||""}process(n){}}return e.\u0275fac=function(n){return new(n||e)(y(na))},e.\u0275dir=$({type:e}),e})(),Ti=class{};function Tq(e){return{provide:Ti,deps:[[new hr,Ti]],useFactory:t=>t.find(n=>n.type===e)}}function Aq(e){return{provide:Ti,multi:!0,useExisting:e}}var sa=class{};function Oq(e,t){return{provide:sa,deps:[[new hr,sa],t],useFactory:PR(e)}}function PR(e){return(t,n)=>t.find(r=>r!==n&&r.type===e)||n}function xq(e){return{provide:sa,multi:!0,useExisting:e}}var oe="primary",Ea=Symbol("RouteTitle"),nm=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n[0]:n}return null}getAll(t){if(this.has(t)){let n=this.params[t];return Array.isArray(n)?n:[n]}return[]}get keys(){return Object.keys(this.params)}};function Vo(e){return new nm(e)}function RR(e,t,n){let r=n.path.split("/");if(r.length>e.length||n.pathMatch==="full"&&(t.hasChildren()||r.lengthr[o]===i)}else return e===t}function yw(e){return e.length>0?e[e.length-1]:null}function Br(e){return ti(e)?e:xr(e)?Oe(Promise.resolve(e)):M(e)}var LR={exact:Dw,subset:Ew},_w={exact:kR,subset:jR,ignored:()=>!0};function dw(e,t,n){return LR[n.paths](e.root,t.root,n.matrixParams)&&_w[n.queryParams](e.queryParams,t.queryParams)&&!(n.fragment==="exact"&&e.fragment!==t.fragment)}function kR(e,t){return Wn(e,t)}function Dw(e,t,n){if(!Oi(e.segments,t.segments)||!yl(e.segments,t.segments,n)||e.numberOfChildren!==t.numberOfChildren)return!1;for(let r in t.children)if(!e.children[r]||!Dw(e.children[r],t.children[r],n))return!1;return!0}function jR(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>vw(e[n],t[n]))}function Ew(e,t,n){return ww(e,t,t.segments,n)}function ww(e,t,n,r){if(e.segments.length>n.length){let i=e.segments.slice(0,n.length);return!(!Oi(i,n)||t.hasChildren()||!yl(i,n,r))}else if(e.segments.length===n.length){if(!Oi(e.segments,n)||!yl(e.segments,n,r))return!1;for(let i in t.children)if(!e.children[i]||!Ew(e.children[i],t.children[i],r))return!1;return!0}else{let i=n.slice(0,e.segments.length),o=n.slice(e.segments.length);return!Oi(e.segments,i)||!yl(e.segments,i,r)||!e.children[oe]?!1:ww(e.children[oe],t,o,r)}}function yl(e,t,n){return t.every((r,i)=>_w[n](e[i].parameters,r.parameters))}var Vr=class{constructor(t=new Ie([],{}),n={},r=null){this.root=t,this.queryParams=n,this.fragment=r}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){return BR.serialize(this)}},Ie=class{constructor(t,n){this.segments=t,this.children=n,this.parent=null,Object.values(n).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _l(this)}},Ai=class{constructor(t,n){this.path=t,this.parameters=n}get parameterMap(){return this._parameterMap||(this._parameterMap=Vo(this.parameters)),this._parameterMap}toString(){return Cw(this)}};function VR(e,t){return Oi(e,t)&&e.every((n,r)=>Wn(n.parameters,t[r].parameters))}function Oi(e,t){return e.length!==t.length?!1:e.every((n,r)=>n.path===t[r].path)}function UR(e,t){let n=[];return Object.entries(e.children).forEach(([r,i])=>{r===oe&&(n=n.concat(t(i,r)))}),Object.entries(e.children).forEach(([r,i])=>{r!==oe&&(n=n.concat(t(i,r)))}),n}var Tm=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>new El)(),providedIn:"root"});let e=t;return e})(),El=class{parse(t){let n=new om(t);return new Vr(n.parseRootSegment(),n.parseQueryParams(),n.parseFragment())}serialize(t){let n="/".concat(aa(t.root,!0)),r=zR(t.queryParams),i=typeof t.fragment=="string"?"#".concat(HR(t.fragment)):"";return"".concat(n).concat(r).concat(i)}},BR=new El;function _l(e){return e.segments.map(t=>Cw(t)).join("/")}function aa(e,t){if(!e.hasChildren())return _l(e);if(t){let n=e.children[oe]?aa(e.children[oe],!1):"",r=[];return Object.entries(e.children).forEach(([i,o])=>{i!==oe&&r.push("".concat(i,":").concat(aa(o,!1)))}),r.length>0?"".concat(n,"(").concat(r.join("//"),")"):n}else{let n=UR(e,(r,i)=>i===oe?[aa(e.children[oe],!1)]:["".concat(i,":").concat(aa(r,!1))]);return Object.keys(e.children).length===1&&e.children[oe]!=null?"".concat(_l(e),"/").concat(n[0]):"".concat(_l(e),"/(").concat(n.join("//"),")")}}function bw(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function gl(e){return bw(e).replace(/%3B/gi,";")}function HR(e){return encodeURI(e)}function im(e){return bw(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Dl(e){return decodeURIComponent(e)}function fw(e){return Dl(e.replace(/\+/g,"%20"))}function Cw(e){return"".concat(im(e.path)).concat($R(e.parameters))}function $R(e){return Object.keys(e).map(t=>";".concat(im(t),"=").concat(im(e[t]))).join("")}function zR(e){let t=Object.keys(e).map(n=>{let r=e[n];return Array.isArray(r)?r.map(i=>"".concat(gl(n),"=").concat(gl(i))).join("&"):"".concat(gl(n),"=").concat(gl(r))}).filter(n=>!!n);return t.length?"?".concat(t.join("&")):""}var GR=/^[^\/()?;#]+/;function Xp(e){let t=e.match(GR);return t?t[0]:""}var WR=/^[^\/()?;=#]+/;function qR(e){let t=e.match(WR);return t?t[0]:""}var YR=/^[^=?&#]+/;function ZR(e){let t=e.match(YR);return t?t[0]:""}var KR=/^[^&#]+/;function QR(e){let t=e.match(KR);return t?t[0]:""}var om=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ie([],{}):new Ie([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let n={};this.peekStartsWith("/(")&&(this.capture("/"),n=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(t.length>0||Object.keys(n).length>0)&&(r[oe]=new Ie(t,n)),r}parseSegment(){let t=Xp(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new b(4009,!1);return this.capture(t),new Ai(Dl(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let n=qR(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let i=Xp(this.remaining);i&&(r=i,this.capture(r))}t[Dl(n)]=Dl(r)}parseQueryParam(t){let n=ZR(this.remaining);if(!n)return;this.capture(n);let r="";if(this.consumeOptional("=")){let s=QR(this.remaining);s&&(r=s,this.capture(r))}let i=fw(n),o=fw(r);if(t.hasOwnProperty(i)){let s=t[i];Array.isArray(s)||(s=[s],t[i]=s),s.push(o)}else t[i]=o}parseParens(t){let n={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=Xp(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new b(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=oe);let s=this.parseChildren();n[o]=Object.keys(s).length===1?s[oe]:new Ie([],s),this.consumeOptional("//")}return n}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new b(4011,!1)}};function Iw(e){return e.segments.length>0?new Ie([],{[oe]:e}):e}function Sw(e){let t={};for(let r of Object.keys(e.children)){let i=e.children[r],o=Sw(i);if(r===oe&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[r]=o)}let n=new Ie(e.segments,t);return XR(n)}function XR(e){if(e.numberOfChildren===1&&e.children[oe]){let t=e.children[oe];return new Ie(e.segments.concat(t.segments),t.children)}return e}function Uo(e){return e instanceof Vr}function JR(e,t,n=null,r=null){let i=Mw(e);return Tw(i,t,n,r)}function Mw(e){let t;function n(o){let s={};for(let c of o.children){let u=n(c);s[c.outlet]=u}let a=new Ie(o.url,s);return o===e&&(t=a),a}let r=n(e.root),i=Iw(r);return t!=null?t:i}function Tw(e,t,n,r){let i=e;for(;i.parent;)i=i.parent;if(t.length===0)return Jp(i,i,i,n,r);let o=eF(t);if(o.toRoot())return Jp(i,i,new Ie([],{}),n,r);let s=tF(o,i,e),a=s.processChildren?la(s.segmentGroup,s.index,o.commands):Ow(s.segmentGroup,s.index,o.commands);return Jp(i,s.segmentGroup,a,n,r)}function wl(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function ha(e){return typeof e=="object"&&e!=null&&e.outlets}function Jp(e,t,n,r,i){let o={};r&&Object.entries(r).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(l=>"".concat(l)):"".concat(u)});let s;e===t?s=n:s=Aw(e,t,n);let a=Iw(Sw(s));return new Vr(a,o,i)}function Aw(e,t,n){let r={};return Object.entries(e.children).forEach(([i,o])=>{o===t?r[i]=n:r[i]=Aw(o,t,n)}),new Ie(e.segments,r)}var bl=class{constructor(t,n,r){if(this.isAbsolute=t,this.numberOfDoubleDots=n,this.commands=r,t&&r.length>0&&wl(r[0]))throw new b(4003,!1);let i=r.find(ha);if(i&&i!==yw(r))throw new b(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function eF(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new bl(!0,0,e);let t=0,n=!1,r=e.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?n=!0:a===".."?t++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new bl(n,t,r)}var ko=class{constructor(t,n,r){this.segmentGroup=t,this.processChildren=n,this.index=r}};function tF(e,t,n){if(e.isAbsolute)return new ko(t,!0,0);if(!n)return new ko(t,!1,NaN);if(n.parent===null)return new ko(n,!0,0);let r=wl(e.commands[0])?0:1,i=n.segments.length-1+r;return nF(n,i,e.numberOfDoubleDots)}function nF(e,t,n){let r=e,i=t,o=n;for(;o>i;){if(o-=i,r=r.parent,!r)throw new b(4005,!1);i=r.segments.length}return new ko(r,!1,i-o)}function rF(e){return ha(e[0])?e[0].outlets:{[oe]:e}}function Ow(e,t,n){if(e||(e=new Ie([],{})),e.segments.length===0&&e.hasChildren())return la(e,t,n);let r=iF(e,t,n),i=n.slice(r.commandIndex);if(r.match&&r.pathIndexo!==oe)&&e.children[oe]&&e.numberOfChildren===1&&e.children[oe].segments.length===0){let o=la(e.children[oe],t,n);return new Ie(e.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=Ow(e.children[o],t,s))}),Object.entries(e.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new Ie(e.segments,i)}}function iF(e,t,n){let r=0,i=t,o={match:!1,pathIndex:0,commandIndex:0};for(;i=n.length)return o;let s=e.segments[i],a=n[r];if(ha(a))break;let c="".concat(a),u=r0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!pw(c,u,s))return o;r+=2}else{if(!pw(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function sm(e,t,n){let r=e.segments.slice(0,t),i=0;for(;i{typeof r=="string"&&(r=[r]),r!==null&&(t[n]=sm(new Ie([],{}),0,r))}),t}function hw(e){let t={};return Object.entries(e).forEach(([n,r])=>t[n]="".concat(r)),t}function pw(e,t,n){return e==n.path&&Wn(t,n.parameters)}var da="imperative",dn=class{constructor(t,n){this.id=t,this.url=n}},pa=class extends dn{constructor(t,n,r="imperative",i=null){super(t,n),this.type=0,this.navigationTrigger=r,this.restoredState=i}toString(){return"NavigationStart(id: ".concat(this.id,", url: '").concat(this.url,"')")}},xi=class extends dn{constructor(t,n,r){super(t,n),this.urlAfterRedirects=r,this.type=1}toString(){return"NavigationEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"')")}},Ur=class extends dn{constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i,this.type=2}toString(){return"NavigationCancel(id: ".concat(this.id,", url: '").concat(this.url,"')")}},Ni=class extends dn{constructor(t,n,r,i){super(t,n),this.reason=r,this.code=i,this.type=16}},ma=class extends dn{constructor(t,n,r,i){super(t,n),this.error=r,this.target=i,this.type=3}toString(){return"NavigationError(id: ".concat(this.id,", url: '").concat(this.url,"', error: ").concat(this.error,")")}},Cl=class extends dn{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=4}toString(){return"RoutesRecognized(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},am=class extends dn{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=7}toString(){return"GuardsCheckStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},cm=class extends dn{constructor(t,n,r,i,o){super(t,n),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o,this.type=8}toString(){return"GuardsCheckEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,", shouldActivate: ").concat(this.shouldActivate,")")}},um=class extends dn{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=5}toString(){return"ResolveStart(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},lm=class extends dn{constructor(t,n,r,i){super(t,n),this.urlAfterRedirects=r,this.state=i,this.type=6}toString(){return"ResolveEnd(id: ".concat(this.id,", url: '").concat(this.url,"', urlAfterRedirects: '").concat(this.urlAfterRedirects,"', state: ").concat(this.state,")")}},dm=class{constructor(t){this.route=t,this.type=9}toString(){return"RouteConfigLoadStart(path: ".concat(this.route.path,")")}},fm=class{constructor(t){this.route=t,this.type=10}toString(){return"RouteConfigLoadEnd(path: ".concat(this.route.path,")")}},hm=class{constructor(t){this.snapshot=t,this.type=11}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ChildActivationStart(path: '".concat(t,"')")}},pm=class{constructor(t){this.snapshot=t,this.type=12}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ChildActivationEnd(path: '".concat(t,"')")}},mm=class{constructor(t){this.snapshot=t,this.type=13}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ActivationStart(path: '".concat(t,"')")}},gm=class{constructor(t){this.snapshot=t,this.type=14}toString(){let t=this.snapshot.routeConfig&&this.snapshot.routeConfig.path||"";return"ActivationEnd(path: '".concat(t,"')")}};var ga=class{},va=class{constructor(t){this.url=t}};var vm=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Ol,this.attachRef=null}},Ol=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(r,i){let o=this.getOrCreateContext(r);o.outlet=i,this.contexts.set(r,o)}onChildOutletDestroyed(r){let i=this.getContext(r);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let r=this.contexts;return this.contexts=new Map,r}onOutletReAttached(r){this.contexts=r}getOrCreateContext(r){let i=this.getContext(r);return i||(i=new vm,this.contexts.set(r,i)),i}getContext(r){return this.contexts.get(r)||null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Il=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let n=this.pathFromRoot(t);return n.length>1?n[n.length-2]:null}children(t){let n=ym(t,this._root);return n?n.children.map(r=>r.value):[]}firstChild(t){let n=ym(t,this._root);return n&&n.children.length>0?n.children[0].value:null}siblings(t){let n=_m(t,this._root);return n.length<2?[]:n[n.length-2].children.map(i=>i.value).filter(i=>i!==t)}pathFromRoot(t){return _m(t,this._root).map(n=>n.value)}};function ym(e,t){if(e===t.value)return t;for(let n of t.children){let r=ym(e,n);if(r)return r}return null}function _m(e,t){if(e===t.value)return[t];for(let n of t.children){let r=_m(e,n);if(r.length)return r.unshift(t),r}return[]}var en=class{constructor(t,n){this.value=t,this.children=n}toString(){return"TreeNode(".concat(this.value,")")}};function Lo(e){let t={};return e&&e.children.forEach(n=>t[n.value.outlet]=n),t}var Sl=class extends Il{constructor(t,n){super(t),this.snapshot=n,Om(this,t)}toString(){return this.snapshot.toString()}};function xw(e,t){let n=sF(e,t),r=new We([new Ai("",{})]),i=new We({}),o=new We({}),s=new We({}),a=new We(""),c=new Bo(r,i,s,a,o,oe,t,n.root);return c.snapshot=n.root,new Sl(new en(c,[]),n)}function sF(e,t){let n={},r={},i={},o="",s=new ya([],n,i,o,r,oe,t,null,{});return new Ml("",new en(s,[]))}var Bo=class{constructor(t,n,r,i,o,s,a,c){var u,l;this.urlSubject=t,this.paramsSubject=n,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=(l=(u=this.dataSubject)==null?void 0:u.pipe(w(d=>d[Ea])))!=null?l:M(void 0),this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(w(t=>Vo(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(w(t=>Vo(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():"Future(".concat(this._futureSnapshot,")")}};function Am(e,t,n="emptyOnly"){var o,s;let r,{routeConfig:i}=e;return t!==null&&(n==="always"||(i==null?void 0:i.path)===""||!t.component&&!((o=t.routeConfig)!=null&&o.loadComponent))?r={params:R(R({},t.params),e.params),data:R(R({},t.data),e.data),resolve:R(R(R(R({},e.data),t.data),i==null?void 0:i.data),e._resolvedData)}:r={params:e.params,data:e.data,resolve:R(R({},e.data),(s=e._resolvedData)!=null?s:{})},i&&Pw(i)&&(r.resolve[Ea]=i.title),r}var ya=class{get title(){var t;return(t=this.data)==null?void 0:t[Ea]}constructor(t,n,r,i,o,s,a,c,u){this.url=t,this.params=n,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Vo(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Vo(this.queryParams)),this._queryParamMap}toString(){let t=this.url.map(r=>r.toString()).join("/"),n=this.routeConfig?this.routeConfig.path:"";return"Route(url:'".concat(t,"', path:'").concat(n,"')")}},Ml=class extends Il{constructor(t,n){super(n),this.url=t,Om(this,n)}toString(){return Nw(this._root)}};function Om(e,t){t.value._routerState=e,t.children.forEach(n=>Om(e,n))}function Nw(e){let t=e.children.length>0?" { ".concat(e.children.map(Nw).join(", ")," } "):"";return"".concat(e.value).concat(t)}function em(e){if(e.snapshot){let t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Wn(t.queryParams,n.queryParams)||e.queryParamsSubject.next(n.queryParams),t.fragment!==n.fragment&&e.fragmentSubject.next(n.fragment),Wn(t.params,n.params)||e.paramsSubject.next(n.params),FR(t.url,n.url)||e.urlSubject.next(n.url),Wn(t.data,n.data)||e.dataSubject.next(n.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Dm(e,t){let n=Wn(e.params,t.params)&&VR(e.url,t.url),r=!e.parent!=!t.parent;return n&&!r&&(!e.parent||Dm(e.parent,t.parent))}function Pw(e){return typeof e.title=="string"||e.title===null}var aF=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=oe,this.activateEvents=new et,this.deactivateEvents=new et,this.attachEvents=new et,this.detachEvents=new et,this.parentContexts=v(Ol),this.location=v(Nt),this.changeDetector=v(gt),this.environmentInjector=v(on),this.inputBinder=v(xm,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(r){if(r.name){let{firstChange:i,previousValue:o}=r.name;if(i)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){var r;this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),(r=this.inputBinder)==null||r.unsubscribeFromRouteData(this)}isTrackedInParentContexts(r){var i;return((i=this.parentContexts.getContext(r))==null?void 0:i.outlet)===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let r=this.parentContexts.getContext(this.name);r!=null&&r.route&&(r.attachRef?this.attach(r.attachRef,r.route):this.activateWith(r.route,r.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new b(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new b(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new b(4012,!1);this.location.detach();let r=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(r.instance),r}attach(r,i){var o;this.activated=r,this._activatedRoute=i,this.location.insert(r.hostView),(o=this.inputBinder)==null||o.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(r.instance)}deactivate(){if(this.activated){let r=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(r)}}activateWith(r,i){var l;if(this.isActivated)throw new b(4013,!1);this._activatedRoute=r;let o=this.location,a=r.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,u=new Em(r,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:u,environmentInjector:i!=null?i:this.environmentInjector}),this.changeDetector.markForCheck(),(l=this.inputBinder)==null||l.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=$({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[sn]});let e=t;return e})(),Em=class{constructor(t,n,r){this.route=t,this.childContexts=n,this.parent=r}get(t,n){return t===Bo?this.route:t===Ol?this.childContexts:this.parent.get(t,n)}},xm=new D("");function cF(e,t,n){let r=_a(e,t._root,n?n._root:void 0);return new Sl(r,t)}function _a(e,t,n){if(n&&e.shouldReuseRoute(t.value,n.value.snapshot)){let r=n.value;r._futureSnapshot=t.value;let i=uF(e,t,n);return new en(r,i)}else{if(e.shouldAttach(t.value)){let o=e.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>_a(e,a)),s}}let r=lF(t.value),i=t.children.map(o=>_a(e,o));return new en(r,i)}}function uF(e,t,n){return t.children.map(r=>{for(let i of n.children)if(e.shouldReuseRoute(r.value,i.value.snapshot))return _a(e,r,i);return _a(e,r)})}function lF(e){return new Bo(new We(e.url),new We(e.params),new We(e.queryParams),new We(e.fragment),new We(e.data),e.outlet,e.component,e)}var Rw="ngNavigationCancelingError";function Fw(e,t){let{redirectTo:n,navigationBehaviorOptions:r}=Uo(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,i=Lw(!1,0,t);return i.url=n,i.navigationBehaviorOptions=r,i}function Lw(e,t,n){let r=new Error("NavigationCancelingError: "+(e||""));return r[Rw]=!0,r.cancellationCode=t,n&&(r.url=n),r}function dF(e){return kw(e)&&Uo(e.url)}function kw(e){return e&&e[Rw]}var fF=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=st({type:t,selectors:[["ng-component"]],standalone:!0,features:[pD],decls:1,vars:0,template:function(i,o){i&1&&Le(0,"router-outlet")},dependencies:[aF],encapsulation:2});let e=t;return e})();function hF(e,t){var n;return e.providers&&!e._injector&&(e._injector=Ih(e.providers,t,"Route: ".concat(e.path))),(n=e._injector)!=null?n:t}function Nm(e){let t=e.children&&e.children.map(Nm),n=t?Ve(R({},e),{children:t}):R({},e);return!n.component&&!n.loadComponent&&(t||n.loadChildren)&&n.outlet&&n.outlet!==oe&&(n.component=fF),n}function qn(e){return e.outlet||oe}function pF(e,t){let n=e.filter(r=>qn(r)===t);return n.push(...e.filter(r=>qn(r)!==t)),n}function wa(e){var t;if(!e)return null;if((t=e.routeConfig)!=null&&t._injector)return e.routeConfig._injector;for(let n=e.parent;n;n=n.parent){let r=n.routeConfig;if(r!=null&&r._loadedInjector)return r._loadedInjector;if(r!=null&&r._injector)return r._injector}return null}var mF=(e,t,n,r)=>w(i=>(new wm(t,i.targetRouterState,i.currentRouterState,n,r).activate(e),i)),wm=class{constructor(t,n,r,i,o){this.routeReuseStrategy=t,this.futureState=n,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(t){let n=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(n,r,t),em(this.futureState.root),this.activateChildRoutes(n,r,t)}deactivateChildRoutes(t,n,r){let i=Lo(n);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(t,n,s.children)}else this.deactivateChildRoutes(t,n,r);else o&&this.deactivateRouteAndItsChildren(n,r)}deactivateRouteAndItsChildren(t,n){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,n):this.deactivateRouteAndOutlet(t,n)}detachAndStoreRouteSubtree(t,n){let r=n.getContext(t.value.outlet),i=r&&t.value.component?r.children:n,o=Lo(t);for(let s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,n){let r=n.getContext(t.value.outlet),i=r&&t.value.component?r.children:n,o=Lo(t);for(let s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(t,n,r){let i=Lo(n);t.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new gm(o.value.snapshot))}),t.children.length&&this.forwardEvent(new pm(t.value.snapshot))}activateRoutes(t,n,r){let i=t.value,o=n?n.value:null;if(em(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(t,n,s.children)}else this.activateChildRoutes(t,n,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),em(a.route.value),this.activateChildRoutes(t,null,s.children)}else{let a=wa(i.snapshot);s.attachRef=null,s.route=i,s.injector=a,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(t,null,s.children)}}else this.activateChildRoutes(t,null,r)}},Tl=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},jo=class{constructor(t,n){this.component=t,this.route=n}};function gF(e,t,n){let r=e._root,i=t?t._root:null;return ca(r,i,n,[r.value])}function vF(e){let t=e.routeConfig?e.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:e,guards:t}}function $o(e,t){let n=Symbol(),r=t.get(e,n);return r===n?typeof e=="function"&&!Bv(e)?e:t.get(e):r}function ca(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=Lo(t);return e.children.forEach(s=>{yF(s,o[s.value.outlet],n,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>fa(a,n.getContext(s),i)),i}function yF(e,t,n,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=e.value,s=t?t.value:null,a=n?n.getContext(e.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=_F(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new Tl(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?ca(e,t,a?a.children:null,r,i):ca(e,t,n,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new jo(a.outlet.component,s))}else s&&fa(t,a,i),i.canActivateChecks.push(new Tl(r)),o.component?ca(e,null,a?a.children:null,r,i):ca(e,null,n,r,i);return i}function _F(e,t,n){if(typeof n=="function")return n(e,t);switch(n){case"pathParamsChange":return!Oi(e.url,t.url);case"pathParamsOrQueryParamsChange":return!Oi(e.url,t.url)||!Wn(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Dm(e,t)||!Wn(e.queryParams,t.queryParams);case"paramsChange":default:return!Dm(e,t)}}function fa(e,t,n){let r=Lo(e),i=e.value;Object.entries(r).forEach(([o,s])=>{i.component?t?fa(s,t.children.getContext(o),n):fa(s,null,n):fa(s,t,n)}),i.component?t&&t.outlet&&t.outlet.isActivated?n.canDeactivateChecks.push(new jo(t.outlet.component,i)):n.canDeactivateChecks.push(new jo(null,i)):n.canDeactivateChecks.push(new jo(null,i))}function ba(e){return typeof e=="function"}function DF(e){return typeof e=="boolean"}function EF(e){return e&&ba(e.canLoad)}function wF(e){return e&&ba(e.canActivate)}function bF(e){return e&&ba(e.canActivateChild)}function CF(e){return e&&ba(e.canDeactivate)}function IF(e){return e&&ba(e.canMatch)}function jw(e){return e instanceof tr||(e==null?void 0:e.name)==="EmptyError"}var vl=Symbol("INITIAL_VALUE");function Ho(){return ee(e=>ac(e.map(t=>t.pipe(Ke(1),_e(vl)))).pipe(w(t=>{for(let n of t)if(n!==!0){if(n===vl)return vl;if(n===!1||n instanceof Vr)return n}return!0}),ye(t=>t!==vl),Ke(1)))}function SF(e,t){return Ze(n=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=n;return s.length===0&&o.length===0?M(Ve(R({},n),{guardsResult:!0})):MF(s,r,i,e).pipe(Ze(a=>a&&DF(a)?TF(r,o,e,t):M(a)),w(a=>Ve(R({},n),{guardsResult:a})))})}function MF(e,t,n,r){return Oe(e).pipe(Ze(i=>PF(i.component,i.route,n,t,r)),mn(i=>i!==!0,!0))}function TF(e,t,n,r){return Oe(t).pipe(ni(i=>Vt(OF(i.route.parent,r),AF(i.route,r),NF(e,i.path,n),xF(e,i.route,n))),mn(i=>i!==!0,!0))}function AF(e,t){return e!==null&&t&&t(new mm(e)),M(!0)}function OF(e,t){return e!==null&&t&&t(new hm(e)),M(!0)}function xF(e,t,n){let r=t.routeConfig?t.routeConfig.canActivate:null;if(!r||r.length===0)return M(!0);let i=r.map(o=>Mn(()=>{var u;let s=(u=wa(t))!=null?u:n,a=$o(o,s),c=wF(a)?a.canActivate(t,e):Ar(s,()=>a(t,e));return Br(c).pipe(mn())}));return M(i).pipe(Ho())}function NF(e,t,n){let r=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>vF(s)).filter(s=>s!==null).map(s=>Mn(()=>{let a=s.guards.map(c=>{var f;let u=(f=wa(s.node))!=null?f:n,l=$o(c,u),d=bF(l)?l.canActivateChild(r,e):Ar(u,()=>l(r,e));return Br(d).pipe(mn())});return M(a).pipe(Ho())}));return M(o).pipe(Ho())}function PF(e,t,n,r,i){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return M(!0);let s=o.map(a=>{var d;let c=(d=wa(t))!=null?d:i,u=$o(a,c),l=CF(u)?u.canDeactivate(e,t,n,r):Ar(c,()=>u(e,t,n,r));return Br(l).pipe(mn())});return M(s).pipe(Ho())}function RF(e,t,n,r){let i=t.canLoad;if(i===void 0||i.length===0)return M(!0);let o=i.map(s=>{let a=$o(s,e),c=EF(a)?a.canLoad(t,n):Ar(e,()=>a(t,n));return Br(c)});return M(o).pipe(Ho(),Vw(r))}function Vw(e){return Xr(Ne(t=>{if(Uo(t))throw Fw(e,t)}),w(t=>t===!0))}function FF(e,t,n,r){let i=t.canMatch;if(!i||i.length===0)return M(!0);let o=i.map(s=>{let a=$o(s,e),c=IF(a)?a.canMatch(t,n):Ar(e,()=>a(t,n));return Br(c)});return M(o).pipe(Ho(),Vw(r))}var Da=class{constructor(t){this.segmentGroup=t||null}},Al=class extends Error{constructor(t){super(),this.urlTree=t}};function Fo(e){return Zi(new Da(e))}function LF(e){return Zi(new b(4e3,!1))}function kF(e){return Zi(Lw(!1,3))}var bm=class{constructor(t,n){this.urlSerializer=t,this.urlTree=n}noMatchError(t){return new b(4002,!1)}lineralizeSegments(t,n){let r=[],i=n.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return M(r);if(i.numberOfChildren>1||!i.children[oe])return LF(t.redirectTo);i=i.children[oe]}}applyRedirectCommands(t,n,r){let i=this.applyRedirectCreateUrlTree(n,this.urlSerializer.parse(n),t,r);if(n.startsWith("/"))throw new Al(i);return i}applyRedirectCreateUrlTree(t,n,r,i){let o=this.createSegmentGroup(t,n.root,r,i);return new Vr(o,this.createQueryParams(n.queryParams,this.urlTree.queryParams),n.fragment)}createQueryParams(t,n){let r={};return Object.entries(t).forEach(([i,o])=>{if(typeof o=="string"&&o.startsWith(":")){let a=o.substring(1);r[i]=n[a]}else r[i]=o}),r}createSegmentGroup(t,n,r,i){let o=this.createSegments(t,n.segments,r,i),s={};return Object.entries(n.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(t,c,r,i)}),new Ie(o,s)}createSegments(t,n,r,i){return n.map(o=>o.path.startsWith(":")?this.findPosParam(t,o,i):this.findOrReturn(o,r))}findPosParam(t,n,r){let i=r[n.path.substring(1)];if(!i)throw new b(4001,!1);return i}findOrReturn(t,n){let r=0;for(let i of n){if(i.path===t.path)return n.splice(r),i;r++}return t}},Cm={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function jF(e,t,n,r,i){let o=Pm(e,t,n);return o.matched?(r=hF(t,r),FF(r,t,n,i).pipe(w(s=>s===!0?o:R({},Cm)))):M(o)}function Pm(e,t,n){var a,c;if(t.path==="")return t.pathMatch==="full"&&(e.hasChildren()||n.length>0)?R({},Cm):{matched:!0,consumedSegments:[],remainingSegments:n,parameters:{},positionalParamSegments:{}};let i=(t.matcher||RR)(n,e,t);if(!i)return R({},Cm);let o={};Object.entries((a=i.posParams)!=null?a:{}).forEach(([u,l])=>{o[u]=l.path});let s=i.consumed.length>0?R(R({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:n.slice(i.consumed.length),parameters:s,positionalParamSegments:(c=i.posParams)!=null?c:{}}}function mw(e,t,n,r){return n.length>0&&BF(e,n,r)?{segmentGroup:new Ie(t,UF(r,new Ie(n,e.children))),slicedSegments:[]}:n.length===0&&HF(e,n,r)?{segmentGroup:new Ie(e.segments,VF(e,t,n,r,e.children)),slicedSegments:n}:{segmentGroup:new Ie(e.segments,e.children),slicedSegments:n}}function VF(e,t,n,r,i){let o={};for(let s of r)if(xl(e,n,s)&&!i[qn(s)]){let a=new Ie([],{});o[qn(s)]=a}return R(R({},i),o)}function UF(e,t){let n={};n[oe]=t;for(let r of e)if(r.path===""&&qn(r)!==oe){let i=new Ie([],{});n[qn(r)]=i}return n}function BF(e,t,n){return n.some(r=>xl(e,t,r)&&qn(r)!==oe)}function HF(e,t,n){return n.some(r=>xl(e,t,r))}function xl(e,t,n){return(e.hasChildren()||t.length>0)&&n.pathMatch==="full"?!1:n.path===""}function $F(e,t,n,r){return qn(e)!==r&&(r===oe||!xl(t,n,e))?!1:e.path==="**"?!0:Pm(t,e,n).matched}function zF(e,t,n){return t.length===0&&!e.children[n]}var Im=class{};function GF(e,t,n,r,i,o,s="emptyOnly"){return new Sm(e,t,n,r,i,s,o).recognize()}var WF=31,Sm=class{constructor(t,n,r,i,o,s,a){this.injector=t,this.configLoader=n,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new bm(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new b(4002,!1)}recognize(){let t=mw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(w(n=>{let r=new ya([],Object.freeze({}),Object.freeze(R({},this.urlTree.queryParams)),this.urlTree.fragment,{},oe,this.rootComponentType,null,{}),i=new en(r,n),o=new Ml("",i),s=JR(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),this.inheritParamsAndData(o._root,null),{state:o,tree:s}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,oe).pipe(pn(r=>{if(r instanceof Al)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Da?this.noMatchError(r):r}))}inheritParamsAndData(t,n){let r=t.value,i=Am(r,n,this.paramsInheritanceStrategy);r.params=Object.freeze(i.params),r.data=Object.freeze(i.data),t.children.forEach(o=>this.inheritParamsAndData(o,r))}processSegmentGroup(t,n,r,i){return r.segments.length===0&&r.hasChildren()?this.processChildren(t,n,r):this.processSegment(t,n,r,r.segments,i,!0).pipe(w(o=>o instanceof en?[o]:[]))}processChildren(t,n,r){let i=[];for(let o of Object.keys(r.children))o==="primary"?i.unshift(o):i.push(o);return Oe(i).pipe(ni(o=>{let s=r.children[o],a=pF(n,o);return this.processSegmentGroup(t,a,s,o)}),lc((o,s)=>(o.push(...s),o)),Er(null),yd(),Ze(o=>{if(o===null)return Fo(r);let s=Uw(o);return qF(s),M(s)}))}processSegment(t,n,r,i,o,s){return Oe(n).pipe(ni(a=>{var c;return this.processSegmentAgainstRoute((c=a._injector)!=null?c:t,n,a,r,i,o,s).pipe(pn(u=>{if(u instanceof Da)return M(null);throw u}))}),mn(a=>!!a),pn(a=>{if(jw(a))return zF(r,i,o)?M(new Im):Fo(r);throw a}))}processSegmentAgainstRoute(t,n,r,i,o,s,a){return $F(r,i,o,s)?r.redirectTo===void 0?this.matchSegmentAgainstRoute(t,i,r,o,s):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,i,n,r,o,s):Fo(i):Fo(i)}expandSegmentAgainstRouteUsingRedirect(t,n,r,i,o,s){let{matched:a,consumedSegments:c,positionalParamSegments:u,remainingSegments:l}=i.path==="**"?gw(o):Pm(n,i,o);if(!a)return Fo(n);i.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>WF&&(this.allowRedirects=!1));let d=this.applyRedirects.applyRedirectCommands(c,i.redirectTo,u);return this.applyRedirects.lineralizeSegments(i,d).pipe(Ze(f=>this.processSegment(t,r,n,f.concat(l),s,!1)))}matchSegmentAgainstRoute(t,n,r,i,o){let s;return r.path==="**"?(s=M(gw(i)),n.children={}):s=jF(n,r,i,t,this.urlSerializer),s.pipe(ee(a=>{var c;return a.matched?(t=(c=r._injector)!=null?c:t,this.getChildConfig(t,r,i).pipe(ee(({routes:u})=>{var q,B,he;let l=(q=r._loadedInjector)!=null?q:t,{consumedSegments:d,remainingSegments:f,parameters:p}=a,g=new ya(d,p,Object.freeze(R({},this.urlTree.queryParams)),this.urlTree.fragment,ZF(r),qn(r),(he=(B=r.component)!=null?B:r._loadedComponent)!=null?he:null,r,KF(r)),{segmentGroup:_,slicedSegments:T}=mw(n,d,f,u);if(T.length===0&&_.hasChildren())return this.processChildren(l,u,_).pipe(w(De=>De===null?null:new en(g,De)));if(u.length===0&&T.length===0)return M(new en(g,[]));let A=qn(r)===o;return this.processSegment(l,u,_,T,A?oe:o,!0).pipe(w(De=>new en(g,De instanceof en?[De]:[])))}))):Fo(n)}))}getChildConfig(t,n,r){return n.children?M({routes:n.children,injector:t}):n.loadChildren?n._loadedRoutes!==void 0?M({routes:n._loadedRoutes,injector:n._loadedInjector}):RF(t,n,r,this.urlSerializer).pipe(Ze(i=>i?this.configLoader.loadChildren(t,n).pipe(Ne(o=>{n._loadedRoutes=o.routes,n._loadedInjector=o.injector})):kF(n))):M({routes:[],injector:t})}};function qF(e){e.sort((t,n)=>t.value.outlet===oe?-1:n.value.outlet===oe?1:t.value.outlet.localeCompare(n.value.outlet))}function YF(e){let t=e.value.routeConfig;return t&&t.path===""}function Uw(e){let t=[],n=new Set;for(let r of e){if(!YF(r)){t.push(r);continue}let i=t.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),n.add(i)):t.push(r)}for(let r of n){let i=Uw(r.children);t.push(new en(r.value,i))}return t.filter(r=>!n.has(r))}function ZF(e){return e.data||{}}function KF(e){return e.resolve||{}}function gw(e){return{matched:!0,parameters:e.length>0?yw(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function QF(e,t,n,r,i,o){return Ze(s=>GF(e,t,n,r,s.extractedUrl,i,o).pipe(w(({state:a,tree:c})=>Ve(R({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function XF(e,t){return Ze(n=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=n;if(!i.length)return M(n);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of Bw(c))s.add(u);let a=0;return Oe(s).pipe(ni(c=>o.has(c)?JF(c,r,e,t):(c.data=Am(c,c.parent,e).resolve,M(void 0))),Ne(()=>a++),Xi(1),Ze(c=>a===s.size?M(n):Ae))})}function Bw(e){let t=e.children.map(n=>Bw(n)).flat();return[e,...t]}function JF(e,t,n,r){let i=e.routeConfig,o=e._resolve;return(i==null?void 0:i.title)!==void 0&&!Pw(i)&&(o[Ea]=i.title),e1(o,e,t,r).pipe(w(s=>(e._resolvedData=s,e.data=Am(e,e.parent,n).resolve,null)))}function e1(e,t,n,r){let i=rm(e);if(i.length===0)return M({});let o={};return Oe(i).pipe(Ze(s=>t1(e[s],t,n,r).pipe(mn(),Ne(a=>{o[s]=a}))),Xi(1),es(o),pn(s=>jw(s)?Ae:Zi(s)))}function t1(e,t,n,r){var a;let i=(a=wa(t))!=null?a:r,o=$o(e,i),s=o.resolve?o.resolve(t,n):Ar(i,()=>o(t,n));return Br(s)}function tm(e){return ee(t=>{let n=e(t);return n?Oe(n).pipe(w(()=>t)):M(t)})}var Hw=(()=>{let t=class t{buildTitle(r){var s;let i,o=r.root;for(;o!==void 0;)i=(s=this.getResolvedTitleForRoute(o))!=null?s:i,o=o.children.find(a=>a.outlet===oe);return i}getResolvedTitleForRoute(r){return r.data[Ea]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(n1))(),providedIn:"root"});let e=t;return e})(),n1=(()=>{let t=class t extends Hw{constructor(r){super(),this.title=r}updateTitle(r){let i=this.buildTitle(r);i!==void 0&&this.title.setTitle(i)}};t.\u0275fac=function(i){return new(i||t)(I(Gh))},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),Rm=new D("",{providedIn:"root",factory:()=>({})}),Fm=new D("ROUTES"),r1=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=v(Oh)}loadComponent(r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return M(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Br(r.loadComponent()).pipe(w($w),Ne(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),wr(()=>{this.componentLoaders.delete(r)})),o=new Gi(i,()=>new Te).pipe(zi());return this.componentLoaders.set(r,o),o}loadChildren(r,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return M({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let s=i1(i,this.compiler,r,this.onLoadEndListener).pipe(wr(()=>{this.childrenLoaders.delete(i)})),a=new Gi(s,()=>new Te).pipe(zi());return this.childrenLoaders.set(i,a),a}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function i1(e,t,n,r){return Br(e.loadChildren()).pipe(w($w),Ze(i=>i instanceof ms||Array.isArray(i)?M(i):Oe(t.compileModuleAsync(i))),w(i=>{r&&r(e);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(n).injector,s=o.get(Fm,[],{optional:!0,self:!0}).flat()),{routes:s.map(Nm),injector:o}}))}function o1(e){return e&&typeof e=="object"&&"default"in e}function $w(e){return o1(e)?e.default:e}var Lm=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(s1))(),providedIn:"root"});let e=t;return e})(),s1=(()=>{let t=class t{shouldProcessUrl(r){return!0}extract(r){return r}merge(r,i){return r}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),a1=new D("");var c1=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Te,this.transitionAbortSubject=new Te,this.configLoader=v(r1),this.environmentInjector=v(on),this.urlSerializer=v(Tm),this.rootContexts=v(Ol),this.location=v(Ps),this.inputBindingEnabled=v(xm,{optional:!0})!==null,this.titleStrategy=v(Hw),this.options=v(Rm,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=v(Lm),this.createViewTransition=v(a1,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>M(void 0),this.rootComponentType=null;let r=o=>this.events.next(new dm(o)),i=o=>this.events.next(new fm(o));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=r}complete(){var r;(r=this.transitions)==null||r.complete()}handleNavigationRequest(r){var o;let i=++this.navigationId;(o=this.transitions)==null||o.next(Ve(R(R({},this.transitions.value),r),{id:i}))}setupNavigations(r,i,o){return this.transitions=new We({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:da,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ye(s=>s.id!==0),w(s=>Ve(R({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),ee(s=>{this.currentTransition=s;let a=!1,c=!1;return M(s).pipe(Ne(u=>{this.currentNavigation={id:u.id,initialUrl:u.rawUrl,extractedUrl:u.extractedUrl,trigger:u.source,extras:u.extras,previousNavigation:this.lastSuccessfulNavigation?Ve(R({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),ee(u=>{var f;let l=!r.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=(f=u.extras.onSameUrlNavigation)!=null?f:r.onSameUrlNavigation;if(!l&&d!=="reload"){let p="";return this.events.next(new Ni(u.id,this.urlSerializer.serialize(u.rawUrl),p,0)),u.resolve(null),Ae}if(this.urlHandlingStrategy.shouldProcessUrl(u.rawUrl))return M(u).pipe(ee(p=>{var _,T;let g=(_=this.transitions)==null?void 0:_.getValue();return this.events.next(new pa(p.id,this.urlSerializer.serialize(p.extractedUrl),p.source,p.restoredState)),g!==((T=this.transitions)==null?void 0:T.getValue())?Ae:Promise.resolve(p)}),QF(this.environmentInjector,this.configLoader,this.rootComponentType,r.config,this.urlSerializer,this.paramsInheritanceStrategy),Ne(p=>{s.targetSnapshot=p.targetSnapshot,s.urlAfterRedirects=p.urlAfterRedirects,this.currentNavigation=Ve(R({},this.currentNavigation),{finalUrl:p.urlAfterRedirects});let g=new Cl(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(g)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(u.currentRawUrl)){let{id:p,extractedUrl:g,source:_,restoredState:T,extras:A}=u,q=new pa(p,this.urlSerializer.serialize(g),_,T);this.events.next(q);let B=xw(g,this.rootComponentType).snapshot;return this.currentTransition=s=Ve(R({},u),{targetSnapshot:B,urlAfterRedirects:g,extras:Ve(R({},A),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=g,M(s)}else{let p="";return this.events.next(new Ni(u.id,this.urlSerializer.serialize(u.extractedUrl),p,1)),u.resolve(null),Ae}}),Ne(u=>{let l=new am(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(l)}),w(u=>(this.currentTransition=s=Ve(R({},u),{guards:gF(u.targetSnapshot,u.currentSnapshot,this.rootContexts)}),s)),SF(this.environmentInjector,u=>this.events.next(u)),Ne(u=>{if(s.guardsResult=u.guardsResult,Uo(u.guardsResult))throw Fw(this.urlSerializer,u.guardsResult);let l=new cm(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot,!!u.guardsResult);this.events.next(l)}),ye(u=>u.guardsResult?!0:(this.cancelNavigationTransition(u,"",3),!1)),tm(u=>{if(u.guards.canActivateChecks.length)return M(u).pipe(Ne(l=>{let d=new um(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}),ee(l=>{let d=!1;return M(l).pipe(XF(this.paramsInheritanceStrategy,this.environmentInjector),Ne({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(l,"",2)}}))}),Ne(l=>{let d=new lm(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}))}),tm(u=>{let l=d=>{var p;let f=[];(p=d.routeConfig)!=null&&p.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(Ne(g=>{d.component=g}),w(()=>{})));for(let g of d.children)f.push(...l(g));return f};return ac(l(u.targetSnapshot.root)).pipe(Er(),Ke(1))}),tm(()=>this.afterPreactivation()),ee(()=>{var f;let{currentSnapshot:u,targetSnapshot:l}=s,d=(f=this.createViewTransition)==null?void 0:f.call(this,this.environmentInjector,u.root,l.root);return d?Oe(d).pipe(w(()=>s)):M(s)}),w(u=>{let l=cF(r.routeReuseStrategy,u.targetSnapshot,u.currentRouterState);return this.currentTransition=s=Ve(R({},u),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),Ne(()=>{this.events.next(new ga)}),mF(this.rootContexts,r.routeReuseStrategy,u=>this.events.next(u),this.inputBindingEnabled),Ke(1),Ne({next:u=>{var l;a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new xi(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects))),(l=this.titleStrategy)==null||l.updateTitle(u.targetRouterState.snapshot),u.resolve(!0)},complete:()=>{a=!0}}),be(this.transitionAbortSubject.pipe(Ne(u=>{throw u}))),wr(()=>{var u;if(!a&&!c){let l="";this.cancelNavigationTransition(s,l,1)}((u=this.currentNavigation)==null?void 0:u.id)===s.id&&(this.currentNavigation=null)}),pn(u=>{var l;if(c=!0,kw(u))this.events.next(new Ur(s.id,this.urlSerializer.serialize(s.extractedUrl),u.message,u.cancellationCode)),dF(u)?this.events.next(new va(u.url)):s.resolve(!1);else{this.events.next(new ma(s.id,this.urlSerializer.serialize(s.extractedUrl),u,(l=s.targetSnapshot)!=null?l:void 0));try{s.resolve(r.errorHandler(u))}catch(d){s.reject(d)}}return Ae}))}))}cancelNavigationTransition(r,i,o){let s=new Ur(r.id,this.urlSerializer.serialize(r.extractedUrl),i,o);this.events.next(s),r.resolve(!1)}isUpdatingInternalState(){var r,i;return((r=this.currentTransition)==null?void 0:r.extractedUrl.toString())!==((i=this.currentTransition)==null?void 0:i.currentUrlTree.toString())}isUpdatedBrowserUrl(){var i,o;return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==((i=this.currentTransition)==null?void 0:i.extractedUrl.toString())&&!((o=this.currentTransition)!=null&&o.extras.skipLocationChange)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function u1(e){return e!==da}var l1=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(d1))(),providedIn:"root"});let e=t;return e})(),Mm=class{shouldDetach(t){return!1}store(t,n){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,n){return t.routeConfig===n.routeConfig}},d1=(()=>{let t=class t extends Mm{};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),zw=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:()=>(()=>v(f1))(),providedIn:"root"});let e=t;return e})(),f1=(()=>{let t=class t extends zw{constructor(){super(...arguments),this.location=v(Ps),this.urlSerializer=v(Tm),this.options=v(Rm,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=v(Lm),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Vr,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=xw(this.currentUrlTree,null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){var r,i;return this.canceledNavigationResolution!=="computed"?this.currentPageId:(i=(r=this.restoredState())==null?void 0:r.\u0275routerPageId)!=null?i:this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(r){return this.location.subscribe(i=>{i.type==="popstate"&&r(i.url,i.state)})}handleRouterEvent(r,i){if(r instanceof pa)this.stateMemento=this.createStateMemento();else if(r instanceof Ni)this.rawUrlTree=i.initialUrl;else if(r instanceof Cl){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(o,i)}}else r instanceof ga?(this.currentUrlTree=i.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl),this.routerState=i.targetRouterState,this.urlUpdateStrategy==="deferred"&&(i.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,i))):r instanceof Ur&&(r.code===3||r.code===2)?this.restoreHistory(i):r instanceof ma?this.restoreHistory(i,!0):r instanceof xi&&(this.lastSuccessfulId=r.id,this.currentPageId=this.browserPageId)}setBrowserUrl(r,i){let o=this.urlSerializer.serialize(r);if(this.location.isCurrentPathEqualTo(o)||i.extras.replaceUrl){let s=this.browserPageId,a=R(R({},i.extras.state),this.generateNgRouterState(i.id,s));this.location.replaceState(o,"",a)}else{let s=R(R({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(r,i=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===r.finalUrl&&s===0&&(this.resetState(r),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(r),this.resetUrlToCurrentUrlTree())}resetState(r){var i;this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,(i=r.finalUrl)!=null?i:this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(r,i){return this.canceledNavigationResolution==="computed"?{navigationId:r,\u0275routerPageId:i}:{navigationId:r}}};t.\u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})(),t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})(),ua=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(ua||{});function h1(e,t){e.events.pipe(ye(n=>n instanceof xi||n instanceof Ur||n instanceof ma||n instanceof Ni),w(n=>n instanceof xi||n instanceof Ni?ua.COMPLETE:(n instanceof Ur?n.code===0||n.code===1:!1)?ua.REDIRECTING:ua.FAILED),ye(n=>n!==ua.REDIRECTING),Ke(1)).subscribe(()=>{t()})}function p1(e){throw e}var m1={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},g1={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Gw=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){var r,i;this.disposed=!1,this.isNgZoneEnabled=!1,this.console=v(yu),this.stateManager=v(zw),this.options=v(Rm,{optional:!0})||{},this.pendingTasks=v(_u),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=v(c1),this.urlSerializer=v(Tm),this.location=v(Ps),this.urlHandlingStrategy=v(Lm),this._events=new Te,this.errorHandler=this.options.errorHandler||p1,this.navigated=!1,this.routeReuseStrategy=v(l1),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=(i=(r=v(Fm,{optional:!0}))==null?void 0:r.flat())!=null?i:[],this.componentInputBindingEnabled=!!v(xm,{optional:!0}),this.eventsSubscription=new rt,this.isNgZoneEnabled=v(ue)instanceof ue&&ue.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:o=>{this.console.warn(o)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let r=this.navigationTransitions.events.subscribe(i=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(i,s),i instanceof Ur&&i.code!==0&&i.code!==1)this.navigated=!0;else if(i instanceof xi)this.navigated=!0;else if(i instanceof va){let a=this.urlHandlingStrategy.merge(i.url,o.currentRawUrl),c={skipLocationChange:o.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||u1(o.source)};this.scheduleNavigation(a,da,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}y1(i)&&this._events.next(i)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(r)}resetRootComponentType(r){this.routerState.root.component=r,this.navigationTransitions.rootComponentType=r}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),da,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription||(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((r,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(r,"popstate",i)},0)}))}navigateToSyncWithBrowser(r,i,o){let s={replaceUrl:!0},a=o!=null&&o.navigationId?o:null;if(o){let u=R({},o);delete u.navigationId,delete u.\u0275routerPageId,Object.keys(u).length!==0&&(s.state=u)}let c=this.parseUrl(r);this.scheduleNavigation(c,i,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(r){this.config=r.map(Nm),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(r,i={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:u}=i,l=u?this.currentUrlTree.fragment:a,d=null;switch(c){case"merge":d=R(R({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let f;try{let p=o?o.snapshot:this.routerState.snapshot.root;f=Mw(p)}catch{(typeof r[0]!="string"||!r[0].startsWith("/"))&&(r=[]),f=this.currentUrlTree.root}return Tw(f,r,d,l!=null?l:null)}navigateByUrl(r,i={skipLocationChange:!1}){let o=Uo(r)?r:this.parseUrl(r),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,da,null,i)}navigate(r,i={skipLocationChange:!1}){return v1(r),this.navigateByUrl(this.createUrlTree(r,i),i)}serializeUrl(r){return this.urlSerializer.serialize(r)}parseUrl(r){try{return this.urlSerializer.parse(r)}catch{return this.urlSerializer.parse("/")}}isActive(r,i){let o;if(i===!0?o=R({},m1):i===!1?o=R({},g1):o=i,Uo(r))return dw(this.currentUrlTree,r,o);let s=this.parseUrl(r);return dw(this.currentUrlTree,s,o)}removeEmptyProps(r){return Object.keys(r).reduce((i,o)=>{let s=r[o];return s!=null&&(i[o]=s),i},{})}scheduleNavigation(r,i,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,u,l;a?(c=a.resolve,u=a.reject,l=a.promise):l=new Promise((f,p)=>{c=f,u=p});let d=this.pendingTasks.add();return h1(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:r,extras:s,resolve:c,reject:u,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(f=>Promise.reject(f))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=S({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();function v1(e){for(let t=0;tn.\u0275providers)])}function D1(e){return e.routerState.root}function E1(){let e=v(bt);return t=>{var o,s;let n=e.get(Nr);if(t!==n.components[0])return;let r=e.get(Gw),i=e.get(w1);e.get(b1)===1&&r.initialNavigation(),(o=e.get(C1,null,se.Optional))==null||o.setUpPreloading(),(s=e.get(_1,null,se.Optional))==null||s.init(),r.resetRootComponentType(n.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var w1=new D("",{factory:()=>new Te}),b1=new D("",{providedIn:"root",factory:()=>1});var C1=new D("");var y6=(()=>{class e extends N{constructor(n,r,i){super(o=>this.stream$.subscribe(o)),this.media=n,this.ngZone=r,this.size$=i,this.sorted=Object.values(this.media).sort((o,s)=>o-s),this.invert=Object.keys(this.media).reduce((o,s)=>Object.assign(Object.assign({},o),{[this.media[s]]:s}),{}),this.stream$=this.size$.pipe(w(({width:o})=>this.sorted.find(s=>s>o)),w(o=>this.invert[o||this.sorted[this.sorted.length-1]]),Ue(),zn(this.ngZone),Wt({bufferSize:1,refCount:!0}))}}return e.\u0275fac=function(n){return new(n||e)(I(Kp),I(ue),I(Lp))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ww=(()=>{class e{constructor(n){this.locale=n}format(n){return M(new Date(n).toLocaleTimeString(this.locale,{hour:"numeric",minute:"2-digit"}))}}return e.\u0275fac=function(n){return new(n||e)(I(xs))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),_6=(()=>{class e extends We{constructor(){super([])}add(n){this.next(this.value.concat(n))}remove(n){this.value.includes(n)&&this.next(this.value.filter(r=>r!==n))}}return e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var D6=(()=>{class e extends N{constructor(n,r,i,o){super(s=>r.pipe(w(()=>n.nativeElement.getBoundingClientRect()),w(a=>o.getPosition(a)),$n(i),wr(()=>o.getPosition(A0))).subscribe(s))}}return e.\u0275fac=function(n){return new(n||e)(I(X),I(En),I(ue),I(Ti))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})();var qw=(()=>{class e{constructor(n,r,i){this.tuiSanitizer=n,this.sanitizer=r,this.originals={},this.items$=new We(new Map),this.define(i)}define(n){let{value:r}=this.items$;Object.keys(n).forEach(i=>{this.defineIcon(i,n[i],r)}),this.items$.next(r)}getOriginal(n){return this.originals[n]||null}defineIcon(n,r,i){if(i.has(n))return;let o=this.parseSrc(n,r);o&&(i.set(n,o),this.originals=Object.assign(Object.assign({},this.originals),{[n]:r}))}parseSrc(n,r){return this.sanitize(tw(r,n))}sanitize(n){return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer?this.tuiSanitizer.sanitize(mt.HTML,n):this.sanitizer.sanitize(mt.HTML,n))||"")}}return e.\u0275fac=function(n){return new(n||e)(I(hl,8),I(js),I(aw))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),E6=(()=>{class e{constructor(n,r){this.win=n,this.isWebkit=r}correct(n){var r,i,o,s;return this.isWebkit?[n[0]+((i=(r=this.win.visualViewport)===null||r===void 0?void 0:r.offsetTop)!==null&&i!==void 0?i:0),n[1]+((s=(o=this.win.visualViewport)===null||o===void 0?void 0:o.offsetLeft)!==null&&s!==void 0?s:0)]:n}}return e.\u0275fac=function(n){return new(n||e)(I(de),I(kE))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function S1(e,t){if(e&1&&Le(0,"div",3),e&2){let n=me().tuiLet;U("innerHTML",n,vo)}}function M1(e,t){if(e&1){let n=jn();bs(),ge(0,"svg",4),nt("error",function(){Rn(n);let i=me(2);return Fn(i.onError())}),Le(1,"use"),pe()}if(e&2){let n=me(2);re(1),at("href",n.use,null,"xlink")}}function T1(e,t){if(e&1&&(_n(0),Ce(1,S1,1,1,"div",1)(2,M1,2,1,"ng-template",null,2,wD),Dn()),e&2){let n=lD(3),r=me();re(1),U("ngIf",r.isInnerHTML)("ngIfElse",n)}}var A1={tuiIconAttach:"tuiIconPaperclip",tuiIconAttention:"tuiIconAlertCircle",tuiIconBackCircle:"tuiIconArrowLeftCircle",tuiIconCall:"tuiIconPhone",tuiIconCallIn:"tuiIconPhoneIncoming",tuiIconCallOut:"tuiIconPhoneOutgoing",tuiIconCallTransfer:"tuiIconPhoneForwarded",tuiIconCancel:"tuiIconXCircle",tuiIconCancelCircle:"tuiIconSlash",tuiIconCard:"tuiIconCreditCard",tuiIconCards:"tuiIconCreditCard",tuiIconChartBar:"tuiIconBarChart",tuiIconChart:"tuiIconBarChart",tuiIconCheckList:"tuiIconClipboard",tuiIconCloseCircle:"tuiIconXCircle",tuiIconCollapse:"tuiIconMinimize",tuiIconComment:"tuiIconMessageSquare",tuiIconCommentFw:"tuiIconMessageForward",tuiIconCompany:"tuiIconBriefcase",tuiIconDefaultDoc:"tuiIconFile",tuiIconDesktop:"tuiIconMonitor",tuiIconDesktopOff:"tuiIconMonitorOff",tuiIconDislike:"tuiIconThumbsDown",tuiIconDone:"tuiIconCheckCircle",tuiIconDraft:"tuiIconEdit2",tuiIconEyeOpen:"tuiIconEye",tuiIconEyeClosed:"tuiIconEyeOff",tuiIconExpand:"tuiIconMaximize",tuiIconExternal:"tuiIconExternalLink",tuiIconFrame:"tuiIconLayout",tuiIconGeo:"tuiIconMapPin",tuiIconHeartFilled:"tuiIconHeart",tuiIconHide:"tuiIconEyeOff",tuiIconImg:"tuiIconImage",tuiIconInfoCircle:"tuiIconInfo",tuiIconLike:"tuiIconThumbsUp",tuiIconLockOpen:"tuiIconUnlock",tuiIconMobile:"tuiIconSmartphone",tuiIconMoreHor:"tuiIconMoreHorizontal",tuiIconMoreVer:"tuiIconMoreVertical",tuiIconMoreVert:"tuiIconMoreVertical",tuiIconPicture:"tuiIconImage",tuiIconPin:"tuiIconMapPin",tuiIconPrint:"tuiIconPrinter",tuiIconRefresh:"tuiIconRefreshCw",tuiIconRemove:"tuiIconX",tuiIconShow:"tuiIconEye",tuiIconSound:"tuiIconVolume",tuiIconSoundOff:"tuiIconVolumeX",tuiIconStarFilled:"tuiIconStar",tuiIconStop:"tuiIconSquare",tuiIconStructure:"tuiIconGrid",tuiIconTime:"tuiIconClock",tuiIconTooltip:"tuiIconHelpCircle",tuiIconViewList:"tuiIconList",tuiIconWifiOn:"tuiIconWifi"},O1={iconsPlace:fl,path:ul(fl),srcProcessor:Qe,contentProcessor:ku,deprecated:e=>{let t=e.replace("Large","").replace("Outline",""),n=A1[t];return n?"".concat(t,"/(Large|Outline) is deprecated, use ").concat(n,"/(Large|Outline) instead"):""}},x1=ie(()=>({iconsPlace:v(Zp),path:v(cw),deprecated:O1.deprecated,srcProcessor:v(lw),contentProcessor:v(uw)})),N1=new D("[TUI_SVG_SRC_INTERCEPTORS]");var P1="Attempted to use undefined named icon",R1="External icon is missing on the given URL",F1="Failed to load external SVG",zo=(()=>{class e{constructor(n,r,i,o,s,a,c,u,l,d){this.doc=n,this.win=r,this.options=i,this.srcInterceptors=o,this.tuiSanitizer=s,this.svgService=a,this.staticRequestService=c,this.sanitizer=u,this.el=l,this.baseHref=d,this.src$=new er(1),this.icon="",this.innerHTML$=this.src$.pipe(ee(()=>yr(this.icon)?this.isExternal?this.getExternalIcon(this.icon):M(this.getSafeHtml(this.icon)):M(this.icon)),_e(""))}set src(n){var r;let i=this.options.deprecated(String(n));this.icon=((r=this.srcInterceptors)!==null&&r!==void 0?r:[]).reduce((o,s)=>s(o,this.options),this.options.srcProcessor(n||"")),this.src$.next()}get src(){return this.icon}get use(){return yr(this.icon)?this.icon.includes(".svg#")?this.icon:this.resolveName(this.icon,this.options.path):""}get isInnerHTML(){return!yr(this.icon)||this.isSrc||this.isExternal||this.isName&&this.isShadowDOM}get isShadowDOM(){return To(this.el.nativeElement)!==this.doc}get isUse(){return this.use.replace(ia,"").includes(".svg#")}get isExternal(){return this.isUrl||this.isCrossDomain}get isUrl(){return yr(this.icon)&&this.icon.replace(ia,"").endsWith(".svg")}get isSrc(){return yr(this.icon)&&rw(this.icon)}get isName(){return!this.isUrl&&!this.isUse&&!this.isSrc}get isCrossDomain(){let{use:n,isUse:r,win:i}=this;return r&&n.startsWith("http")&&!!i.origin&&!n.startsWith(i.origin)}onError(n=R1){let{icon:r}=this,i=new CustomEvent(XE,{bubbles:!0,detail:{message:n,icon:r}});this.el.nativeElement.dispatchEvent(i)}resolveName(n,r){return r(n,this.baseHref)}getSafeHtml(n){return this.isSrc?this.sanitize(n):this.process(n)}process(n){let r=this.svgService.getOriginal(n);return this.isName&&!r&&n&&this.onError(P1),!this.isShadowDOM||!this.isName?"":this.sanitize(r||"")}sanitize(n){return n=this.options.contentProcessor(n),this.tuiSanitizer&&yr(n)?this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(mt.HTML,n)||""):n}getExternalIcon(n){let r=n.includes(".svg")?n:this.use;return this.staticRequestService.request(r).pipe(pn(()=>(this.onError(F1),M(""))),w(i=>this.sanitize(i.replace("{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,ZE]]}),e})();var W="{{duration}}ms ease-in-out",ve={params:{duration:300}},Ct=300,Zw=Ge("tuiHeightCollapse",[ae(":enter",[E({height:0}),G(W,E({height:"*"}))],ve),ae(":leave",[E({height:"*"}),G(W,E({height:0}))],ve)]),$6=Ge("tuiHeightCollapseList",[ae("* => *",[ct(":enter",[E({height:0}),yt(Ct,[G(W,E({height:"*"}))])],{optional:!0}),ct(":leave",[E({height:"*"}),yt(Ct,[G(W,E({height:0}))])],{optional:!0})],ve)]),z6=Ge("tuiWidthCollapse",[ae(":enter",[E({width:0}),G(W,E({width:"*"}))],ve),ae(":leave",[E({width:"*"}),G(W,E({width:0}))],ve)]),G6=Ge("tuiWidthCollapseList",[ae("* => *",[ct(":enter",[E({width:0}),yt(Ct,[G(W,E({width:"*"}))])],{optional:!0}),ct(":leave",[E({width:"*"}),yt(Ct,[G(W,E({width:0}))])],{optional:!0})],ve)]),Nl=Ge("tuiFadeIn",[ae(":enter",[E({opacity:0}),G(W,E({opacity:1}))],ve),ae(":leave",[E({opacity:1}),G(W,E({opacity:0}))],ve)]),W6=Ge("tuiFadeInList",[ae("* => *",[ct(":enter",[E({opacity:0}),yt(Ct,[G(W,E({opacity:1}))])],{optional:!0}),ct(":leave",[E({opacity:1}),yt(Ct,[G(W,E({opacity:0}))])],{optional:!0})],ve)]),q6=Ge("tuiFadeInTop",[ae(":enter",[E({transform:"translateY(-10px)",opacity:0}),G(W,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(W,E({transform:"translateY(-10px)",opacity:0}))],ve)]),Y6=Ge("tuiFadeInBottom",[ae(":enter",[E({transform:"translateY(10px)",opacity:0}),G(W,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(W,E({transform:"translateY(10px)",opacity:0}))],ve)]),Z6=Ge("tuiDropdownAnimation",[ae(":enter",[E({transform:"translateY(-10px)",opacity:0}),G(W,E({transform:"translateY(0)",opacity:1}))],ve),ae(":leave",[E({transform:"translateY(0)",opacity:1}),G(W,E({transform:"translateY(-10px)",opacity:0}))],ve)]),K6=Ge("tuiScaleIn",[ae(":enter",[E({transform:"scale(0)"}),G(W,E({transform:"scale(1)"}))],ve),ae(":leave",[E({transform:"scale(1)"}),G(W,E({transform:"scale(0)"}))],ve)]),Q6=Ge("tuiPop",[ae(":enter",[E({transform:"scale(0)"}),G(W,E({transform:"scale(1.1)"})),G(W,E({transform:"scale(1)"}))],ve),ae(":leave",[E({transform:"scale(1)"}),G(W,E({transform:"scale(1.1)"})),G(W,E({transform:"scale(0)"}))],ve)]),X6=Ge("tuiScaleInList",[ae("* => *",[ct(":enter",[E({transform:"scale(0)"}),yt(Ct,[G(W,E({transform:"scale(1)"}))])],{optional:!0}),ct(":leave",[E({transform:"scale(1)"}),yt(Ct,[G(W,E({transform:"scale(0)"}))])],{optional:!0})],ve)]),J6=Ge("tuiSlideIn",[ae("* => left",[E({transform:"translateX(-100%)"}),G(W,E({transform:"translateX(0)"}))],ve),ae("left => *",[E({transform:"translateX(0)"}),G(W,E({transform:"translateX(-100%)"}))],ve),ae("* => right",[E({transform:"translateX(100%)"}),G(W,E({transform:"translateX(0)"}))],ve),ae("right => *",[E({transform:"translateX(0)"}),G(W,E({transform:"translateX(100%)"}))],ve)]),eY=Ge("tuiSlideInLeft",[ae(":enter",[E({transform:"translateX(-100%)"}),G(W,E({transform:"translateX(0)"}))],ve),ae(":leave",[E({transform:"translateX(0)"}),G(W,E({transform:"translateX(-100%)"}))],ve)]),tY=Ge("tuiSlideInLeftList",[ae("* => *",[ct(":enter",[E({transform:"translateX(-100%)"}),yt(Ct,[G(W,E({transform:"translateX(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateX(0)"}),yt(Ct,[G(W,E({transform:"translateX(-100%)"}))])],{optional:!0})],ve)]),Kw=Ge("tuiSlideInRight",[ae(":enter",[E({transform:"translateX(100%)"}),G(W,E({transform:"translateX(0)"}))],ve),ae(":leave",[E({transform:"translateX(0)"}),G(W,E({transform:"translateX(100%)"}))],ve)]),nY=Ge("tuiSlideInRightList",[ae("* => *",[ct(":enter",[E({transform:"translateX(100%)"}),yt(Ct,[G(W,E({transform:"translateX(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateX(0)"}),yt(Ct,[G(W,E({transform:"translateX(100%)"}))])],{optional:!0})],ve)]),Qw=Ge("tuiSlideInTop",[ae(":enter",[E({transform:"translate3d(0,{{start}},0)"}),G(W,E({transform:"translate3d(0,{{end}},0)"}))],{params:{end:0,start:"100%",duration:300}}),ae(":leave",[E({transform:"translate3d(0,{{end}},0)"}),G(W,E({transform:"translate3d(0,{{start}},0)"}))],{params:{end:0,start:"100%",duration:300}})]),rY=Ge("tuiSlideInTopList",[ae("* => *",[ct(":enter",[E({transform:"translateY(100%)"}),yt(Ct,[G(W,E({transform:"translateY(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateY(0)"}),yt(Ct,[G(W,E({transform:"translateY(100%)"}))])],{optional:!0})],ve)]),iY=Ge("tuiSlideInBottom",[ae(":enter",[E({transform:"translateY(-100%)"}),G(W,E({transform:"translateY(0)"}))],ve),ae(":leave",[E({transform:"translateY(0)"}),G(W,E({transform:"translateY(-100%)"}))],ve)]),oY=Ge("tuiSlideInBottomList",[ae("* => *",[ct(":enter",[E({transform:"translateY(-100%)"}),yt(Ct,[G(W,E({transform:"translateY(0)"}))])],{optional:!0}),ct(":leave",[E({transform:"translateY(0)"}),yt(Ct,[G(W,E({transform:"translateY(-100%)"}))])],{optional:!0})],ve)]);var Hr=(()=>{class e extends BE{constructor(){super(...arguments),this.mode=null}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275dir=$({type:e,selectors:[["","tuiMode",""]],inputs:{mode:["tuiMode","mode"]},features:[$e]}),e})();var pY={provide:Qp,deps:[[new hr,Qp],X],useFactory:(e,{nativeElement:t})=>(t["$.class._mobile"]=e,e)},Pl={provide:Ro,deps:[[new fr,Hr],X],useFactory:(e,{nativeElement:t})=>{let n=e?e.change$.pipe(_e(null),w(()=>e.mode)):M(null);return t["$.data-mode.attr"]=n,n}};function L1(e){return e.replace(/[a-z][A-Z]/g,t=>"".concat(t[0],"-").concat(t[1].toLowerCase()))}var Dr=class{supports(t){return t.includes(this.modifier)}addGlobalEventListener(){return()=>{}}unwrap(t){return t.split(".").filter(n=>!this.modifier.includes(n)).join(".")}},k1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier="$"}addEventListener(n,r){n[r]=n[r]||Ae;let i=this.getMethod(n,r),o=this.manager.getZone().onStable,s=Vt(o.pipe(dc(()=>n[r]===Ae)),Mn(()=>n[r])).subscribe(i);return()=>s.unsubscribe()}getMethod(n,r){let[,i,o,s=""]=r.split(".");return r.endsWith(".attr")?a=>a===null?n.removeAttribute(i):n.setAttribute(i,String(a)):i==="class"?a=>n.classList.toggle(o,!!a):i==="style"?a=>n.style.setProperty(L1(o),"".concat(a).concat(s)):a=>n[i]=a}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),j1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier="capture.once.passive"}supports(n){return n.includes(".")&&!this.unwrap(n).includes(".")}addEventListener(n,r,i){return n.addEventListener(this.unwrap(r),i,{once:r.includes(".once"),passive:r.includes(".passive"),capture:r.includes(".capture")}),()=>n.removeEventListener(this.unwrap(r),i)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),V1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".prevent"}addEventListener(n,r,i){let o=s=>{s.preventDefault(),i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),U1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".self"}addEventListener(n,r,i){let o=s=>{s.target===s.currentTarget&&i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),Rl=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".silent"}addEventListener(n,r,i){return e.ngZone=this.manager.getZone(),e.ngZone.runOutsideAngular(()=>this.manager.addEventListener(n,this.unwrap(r),i))}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),B1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".stop"}addEventListener(n,r,i){let o=s=>{s.stopPropagation(),i(s)};return this.manager.addEventListener(n,this.unwrap(r),o)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),H1=(()=>{class e extends Dr{constructor(){super(...arguments),this.modifier=".init"}addEventListener(){return console.warn(".init plugin is no longer necessary as of v3.1.0"),()=>{}}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),$1=[Rl,k1,j1,V1,U1,B1,H1],z1=$1.map(e=>({provide:wo,multi:!0,useClass:e}));function _Y(e){return(t,n,r)=>{let{value:i}=r;r.value=function(...o){e.apply(this,o)&&(Rl.ngZone?Rl.ngZone.run(()=>i.apply(this,o)):i.apply(this,o))}}}var DY=(()=>{class e{constructor([n]){console.assert(!(n instanceof Rl)||e.initialized,"EventPluginsModule must come after BrowserModule in imports"),e.initialized=!0}}return e.initialized=!1,e.\u0275fac=function(n){return new(n||e)(I(wo))},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:z1}),e})();var Xw=(()=>{class e{constructor(n){this.mode$=n,this.disabled=!1,this.readOnly=!1,this.hover=null,this.active=null,this.focus=!1,this.invalid=!1,this.appearance=""}get computedInvalid(){return!this.disabled&&!this.readOnly&&this.invalid}get computedFocused(){return this.focus&&!this.disabled}get interactiveState(){return this.disabled?Po.Disabled:this.readOnly?Po.Readonly:this.active?Po.Active:this.hover?Po.Hover:null}get noHover(){return this.readOnly||this.hover===!1}get noActive(){return this.readOnly||this.active===!1}}return e.\u0275fac=function(n){return new(n||e)(y(Ro))},e.\u0275dir=$({type:e,selectors:[["","tuiWrapper",""]],hostVars:10,hostBindings:function(n,r){n&1&&nt("$.data-mode.attr",function(){return r.mode$}),n&2&&(at("data-appearance",r.appearance)("data-state",r.interactiveState),Xe("_invalid",r.computedInvalid)("_focused",r.computedFocused)("_no-hover",r.noHover)("_no-active",r.noActive))},inputs:{disabled:"disabled",readOnly:"readOnly",hover:"hover",active:"active",focus:"focus",invalid:"invalid",appearance:"appearance"},features:[ze([Pl])]}),e})(),Jw=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function W1(e,t){if(e&1&&(_n(0),Un(1),Dn()),e&2){let n=t.polymorpheusOutlet;re(1),an(" ",n," ")}}function q1(e,t){if(e&1&&(bs(),wy(),ge(0,"div",6),Ce(1,W1,2,1,"ng-container",7),pe()),e&2){let n=me(2);Xe("t-text_horizontal",n.isHorizontal),re(1),U("polymorpheusOutlet",n.textContent)}}function Y1(e,t){if(e&1&&(ge(0,"div",2),bs(),ge(1,"svg",3),Le(2,"circle",4),pe(),Ce(3,q1,2,3,"div",5),pe()),e&2){let n=me();Xe("t-loader_horizontal",n.isHorizontal)("t-loader_inherit-color",n.inheritColor),at("data-size",n.size),re(3),U("ngIf",n.hasText)}}var Z1=["*"],K1={size:"m",inheritColor:!1,overlay:!1},Q1=Ee(K1);var eb=(()=>{class e{constructor(n,r,i,o){this.doc=n,this.el=r,this.isIos=i,this.options=o,this.size=this.options.size,this.inheritColor=this.options.inheritColor,this.overlay=this.options.overlay,this.loading=!0,this.isApple=R0(this.el.nativeElement)||this.isIos}set showLoader(n){n&&this.focused&&U0(this.doc),this.loading=n}get hasOverlay(){return this.overlay&&this.loading}get hasText(){return!!this.textContent}get isHorizontal(){return!iw(this.size)}get focused(){return H0(this.el.nativeElement)}}return e.\u0275fac=function(n){return new(n||e)(y(le),y(X),y(ea),y(Q1))},e.\u0275cmp=st({type:e,selectors:[["tui-loader"]],hostVars:2,hostBindings:function(n,r){n&2&&Xe("_loading",r.loading)},inputs:{size:"size",inheritColor:"inheritColor",overlay:"overlay",textContent:"textContent",showLoader:"showLoader"},ngContentSelectors:Z1,decls:3,vars:7,consts:[[1,"t-content",3,"disabled"],["class","t-loader",3,"t-loader_horizontal","t-loader_inherit-color",4,"ngIf"],[1,"t-loader"],["automation-id","tui-loader__loader","focusable","false","viewBox","0 0 100 100","xmlns","http://www.w3.org/2000/svg",1,"t-icon"],["cx","50","cy","50","r","50","stroke-dasharray","314",1,"t-circle"],["automation-id","tui-loader__text","class","t-text",3,"t-text_horizontal",4,"ngIf"],["automation-id","tui-loader__text",1,"t-text"],[4,"polymorpheusOutlet"]],template:function(n,r){n&1&&(Vn(),ge(0,"fieldset",0),zt(1),pe(),Ce(2,Y1,4,6,"div",1)),n&2&&(Xe("t-content_has-overlay",r.hasOverlay)("t-content_loading",r.loading),U("disabled",r.loading&&!r.isApple),at("inert",r.loading||null),re(2),U("ngIf",r.loading))},dependencies:[Pt,Lr],styles:["@keyframes _ngcontent-%COMP%_tuiLoaderDashOffset{0%{stroke-dashoffset:-66}50%{stroke-dashoffset:-314}to{stroke-dashoffset:-66}}@keyframes _ngcontent-%COMP%_tuiLoaderRotate{0%{transform:rotate(0)}50%{transform:rotate(1turn)}to{transform:rotate(3turn)}}[_nghost-%COMP%]{position:relative;display:flex;min-width:1.5rem}._loading[_nghost-%COMP%]{overflow:hidden}.t-content[_ngcontent-%COMP%]{z-index:0;min-width:100%;height:100%;padding:0;margin:0;border:none}.t-content_has-overlay[_ngcontent-%COMP%]{opacity:.3}.t-content_loading[_ngcontent-%COMP%]{pointer-events:none}.t-loader[_ngcontent-%COMP%]{position:relative;left:-100%;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:100%;flex-shrink:0;align-self:center;color:var(--tui-text-01);stroke:var(--tui-primary);animation:tuiFadeIn var(--tui-duration)}.t-loader.t-loader_horizontal[_ngcontent-%COMP%]{flex-direction:row}.t-loader.t-loader_inherit-color[_ngcontent-%COMP%]{color:inherit;stroke:currentColor}.t-loader[data-size=xs][_ngcontent-%COMP%]{font-size:.75rem;stroke-width:38}.t-loader[data-size=s][_ngcontent-%COMP%]{font-size:1rem;stroke-width:25}.t-loader[data-size=m][_ngcontent-%COMP%]{font-size:1.5rem;stroke-width:17}.t-loader[data-size=l][_ngcontent-%COMP%]{font-size:2.5rem;stroke-width:15}.t-loader[data-size=xl][_ngcontent-%COMP%]{font-size:3.5rem;stroke-width:14}.t-loader[data-size=xxl][_ngcontent-%COMP%]{font-size:5rem;stroke-width:10}.t-text[_ngcontent-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1rem;color:inherit;max-width:100%;text-align:center;stroke-width:0}.t-text_horizontal[_ngcontent-%COMP%]{margin:0 0 0 1rem}.t-icon[_ngcontent-%COMP%]{display:block;min-width:1em;max-width:1em;min-height:1em;max-height:1em;margin:.25rem -.5em;border-radius:100%;overflow:hidden;transform:scaleY(-1);animation:_ngcontent-%COMP%_tuiLoaderRotate 3s linear infinite}@supports (-webkit-hyphens: none){.t-icon[_ngcontent-%COMP%]{overflow:visible}}.t-circle[_ngcontent-%COMP%]{fill:none;stroke:inherit;stroke-width:inherit;animation:_ngcontent-%COMP%_tuiLoaderDashOffset 3s linear infinite}"],changeDetection:0}),e})(),tb=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,kr]]}),e})();var J1=["tuiButton",""];function eL(e,t){e&1&&As(0)}function tL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=t.polymorpheusOutlet;U("src",n)}}function nL(e,t){if(e&1&&(ge(0,"span",6),Ce(1,tL,1,1,"tui-svg",7),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.icon)}}function rL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=t.polymorpheusOutlet;U("src",n)}}function iL(e,t){if(e&1&&(ge(0,"span",9),Ce(1,rL,1,1,"tui-svg",7),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.iconRight)}}function oL(e,t){if(e&1&&Le(0,"tui-loader",10),e&2){let n=me();U("inheritColor",!0)("size",n.loaderSize)}}var sL=["*"],aL={size:"l",shape:null,appearance:oa.Primary},km=Ee(aL);var Ca=(()=>{class e extends Vp{constructor(n,r,i){var o;super(),this.mode=n,this.el=r,this.options=i,this.mode$=((o=this.mode)===null||o===void 0?void 0:o.change$)||Ae,this.appearance=null,this.disabled=!1,this.shape=this.options.shape,this.showLoader=!1,this.size=this.options.size,this.appearance$=this.mode$.pipe(_e(null),w(()=>this.computedAppearance),Ue())}get nativeFocusableElement(){return this.nativeDisabled?null:this.el.nativeElement}get focused(){return!this.showLoader&&Ao(this.el.nativeElement)}get loaderSize(){return this.size==="l"||this.size==="xl"?"m":"s"}get computedAppearance(){var n;return(n=this.appearance)!==null&&n!==void 0?n:this.options.appearance||""}get nativeDisabled(){return this.computedDisabled||this.showLoader?"":null}get tabIndex(){return this.focusable?0:-1}onFocused(n){this.updateFocused(n)}}return e.\u0275fac=function(n){return new(n||e)(y(Hr,8),y(X),y(km))},e.\u0275cmp=st({type:e,selectors:[["button","tuiButton",""],["button","tuiIconButton",""],["a","tuiButton",""],["a","tuiIconButton",""]],hostVars:7,hostBindings:function(n,r){n&1&&nt("focusin",function(){return r.onFocused(!0)})("focusout",function(){return r.onFocused(!1)}),n&2&&(bh("tabIndex",r.tabIndex),at("data-shape",r.shape)("data-size",r.size)("data-appearance",r.computedAppearance)("disabled",r.nativeDisabled),Xe("_loading",r.showLoader))},inputs:{appearance:"appearance",disabled:"disabled",icon:"icon",iconRight:"iconRight",shape:"shape",showLoader:"showLoader",size:"size"},features:[ze([rl(e),qe]),$e],attrs:J1,ngContentSelectors:sL,decls:8,vars:10,consts:[[4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"active","appearance","disabled","hover"],[1,"t-content"],["class","t-left",4,"ngIf"],["class","t-right",4,"ngIf"],["class","t-loader",3,"inheritColor","size",4,"ngIf"],[1,"t-left"],["class","t-icon",3,"src",4,"polymorpheusOutlet"],[1,"t-icon",3,"src"],[1,"t-right"],[1,"t-loader",3,"inheritColor","size"]],template:function(n,r){n&1&&(Vn(),Ce(0,eL,1,0,"ng-container",0),cn(1,"async"),ge(2,"div",1)(3,"span",2),Ce(4,nL,2,1,"span",3),zt(5),Ce(6,iL,2,1,"span",4),pe(),Ce(7,oL,1,2,"tui-loader",5),pe()),n&2&&(U("ngIf",un(1,8,r.appearance$)),re(2),U("active",r.pseudoActive)("appearance",r.computedAppearance)("disabled",r.computedDisabled)("hover",r.pseudoHover),re(2),U("ngIf",r.icon),re(2),U("ngIf",r.iconRight),re(1),U("ngIf",r.showLoader))},dependencies:[zo,eb,Pt,Xw,Lr,Bn],styles:["[_nghost-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:inline-block;flex-shrink:0;vertical-align:top;border-radius:var(--tui-radius-m);-webkit-user-select:none;-moz-user-select:none;user-select:none;outline:none;color:inherit}[data-shape=rounded][_nghost-%COMP%]{border-radius:6.25rem}[data-size=xs][_nghost-%COMP%]{height:var(--tui-height-xs);font-weight:normal}[data-size=xs][data-shape=square][_nghost-%COMP%], [data-size=xs][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-xs)}[data-size=s][_nghost-%COMP%]{height:var(--tui-height-s);font-weight:normal}[data-size=s][data-shape=square][_nghost-%COMP%], [data-size=s][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-s)}[data-size=m][_nghost-%COMP%]{height:var(--tui-height-m);font:var(--tui-font-text-m);font-weight:bold}[data-size=m][data-shape=square][_nghost-%COMP%], [data-size=m][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-m)}[data-size=l][_nghost-%COMP%]{height:var(--tui-height-l);font:var(--tui-font-text-m);font-weight:bold}[data-size=l][data-shape=square][_nghost-%COMP%], [data-size=l][tuiIconButton][_nghost-%COMP%]{width:var(--tui-height-l)}[data-size=xl][_nghost-%COMP%]{height:3.75rem;font:var(--tui-font-text-m);font-weight:bold}[data-size=xl][data-shape=square][_nghost-%COMP%], [data-size=xl][tuiIconButton][_nghost-%COMP%]{width:3.75rem}[tuiIconButton][_nghost-%COMP%]{font-size:0!important}[tuiIconButton][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0!important}.t-loader[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;cursor:default}.t-left[_ngcontent-%COMP%]{margin-right:.5rem}[data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%]{margin-right:.375rem}[data-size=xs][_nghost-%COMP%] .t-left[_ngcontent-%COMP%]{margin-right:.25rem}.t-right[_ngcontent-%COMP%]{margin:0 -.25rem 0 .25rem}[data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0 -.25rem 0 .375rem}[data-size=xs][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{margin:0 -.125rem 0 .25rem}.t-icon[_ngcontent-%COMP%]{display:flex;max-width:100%;max-height:100%;align-items:center;justify-content:center}.t-left[_ngcontent-%COMP%], .t-right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem}[data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%], [data-size=xs][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [data-size=xs][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{width:1rem;height:1rem}[tuiIconButton][data-appearance=icon][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=icon][data-size=s][_nghost-%COMP%] .t-right[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem}.t-wrapper[_ngcontent-%COMP%]{box-sizing:border-box;cursor:pointer;isolation:isolate}[data-size=xs][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, .375rem)}[data-size=xs][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]:after{border-width:1px}[data-size=s][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, .75rem)}[data-size=m][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 1.5rem)}[data-size=l][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 2.25rem)}[data-size=xl][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0 var(--tui-padding, 2.5rem)}[data-shape=square][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%], [tuiIconButton][_nghost-%COMP%] .t-wrapper[_ngcontent-%COMP%]{padding:0}.t-content[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center;text-align:center}._loading[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{opacity:0}"],changeDetection:0}),e})(),Fl=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,kr,Jw,Go,tb]]}),e})();var uL=["tuiLink",""];function lL(e,t){if(e&1&&Le(0,"tui-svg",3),e&2){let n=me();U("src",n.icon||"")}}function dL(e,t){if(e&1&&Le(0,"tui-svg",4),e&2){let n=me();U("src",n.icon||"")}}var fL=["*"],nb=(()=>{class e{constructor(n,r,i){this.el=n,this.mode$=r,this.pseudo=!1,this.icon="",this.iconAlign="right",this.iconRotated=!1,this.mode=null,this.focusVisible=!1,this.focusedChange=xe(J(this.el.nativeElement,"focusin").pipe(w(Io)),J(this.el.nativeElement,"focusout").pipe(w(Rr))),i.subscribe(o=>{this.focusVisible=o})}get nativeFocusableElement(){return this.el.nativeElement}get focused(){return Ao(this.nativeFocusableElement)}get hasIcon(){return!!this.icon}get iconAlignLeft(){return this.hasIcon&&this.iconAlign==="left"}get iconAlignRight(){return this.hasIcon&&this.iconAlign==="right"}}return e.\u0275fac=function(n){return new(n||e)(y(X),y(Ro),y(kp))},e.\u0275cmp=st({type:e,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostVars:7,hostBindings:function(n,r){n&1&&nt("$.data-mode.attr",function(){return r.mode$}),n&2&&(at("data-host-mode",r.mode),Xe("_pseudo",r.pseudo)("_icon-rotated",r.iconRotated)("_focus-visible",r.focusVisible))},inputs:{pseudo:"pseudo",icon:"icon",iconAlign:"iconAlign",iconRotated:"iconRotated",mode:"mode"},exportAs:["tuiLink"],features:[ze([rl(e),kp,qe,Pl])],attrs:uL,ngContentSelectors:fL,decls:4,vars:2,consts:[["class","t-icon t-icon_left",3,"src",4,"ngIf"],[1,"t-content"],["class","t-icon t-icon_right",3,"src",4,"ngIf"],[1,"t-icon","t-icon_left",3,"src"],[1,"t-icon","t-icon_right",3,"src"]],template:function(n,r){n&1&&(Vn(),Ce(0,lL,1,1,"tui-svg",0),ge(1,"span",1),zt(2),pe(),Ce(3,dL,1,1,"tui-svg",2)),n&2&&(U("ngIf",r.iconAlignLeft),re(3),U("ngIf",r.iconAlignRight))},dependencies:[zo,Pt],styles:["[_nghost-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-link);text-align:left;text-transform:inherit;font-weight:inherit;cursor:pointer;outline:none}[_nghost-%COMP%]:hover{color:var(--tui-link-hover)}[_nghost-%COMP%]:disabled{opacity:var(--tui-disabled-opacity);cursor:default}[data-mode=onLight][_nghost-%COMP%]{color:var(--tui-text-02)}[data-mode=onLight][_nghost-%COMP%]:hover, [data-mode=onLight]._active[_nghost-%COMP%]{color:var(--tui-text-01)}[data-mode=onLight]._pseudo[_nghost-%COMP%]{color:var(--tui-text-01)}[data-mode=onLight]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(0,0,0,.48);text-decoration-color:#0000007a}[data-mode=onLight]._pseudo[_nghost-%COMP%]:hover, [data-mode=onLight]._pseudo._active[_nghost-%COMP%]{color:var(--tui-text-03)}[data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]{color:var(--tui-negative-night)}[data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]:hover, [data-mode=onLight][data-host-mode=negative][_nghost-%COMP%]:active, [data-mode=onLight][data-host-mode=negative]._active[_nghost-%COMP%]{color:var(--tui-negative-night-hover)}[data-mode=onDark][_nghost-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark][_nghost-%COMP%]:hover, [data-mode=onDark][_nghost-%COMP%]:active, [data-mode=onDark]._active[_nghost-%COMP%]{color:var(--tui-text-01-night)}[data-mode=onDark]._pseudo[_nghost-%COMP%]{color:var(--tui-text-01-night)}[data-mode=onDark]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(255,255,255,.48);text-decoration-color:#ffffff7a}[data-mode=onDark]._pseudo[_nghost-%COMP%]:hover, [data-mode=onDark]._pseudo[_nghost-%COMP%]:active, [data-mode=onDark]._pseudo._active[_nghost-%COMP%]{color:var(--tui-text-03-night)}[data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]{color:var(--tui-positive-night)}[data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]:hover, [data-mode=onDark][data-host-mode=positive][_nghost-%COMP%]:active, [data-mode=onDark][data-host-mode=positive]._active[_nghost-%COMP%]{color:var(--tui-positive-night-hover)}[data-host-mode=negative][_nghost-%COMP%]{color:var(--tui-negative)}[data-host-mode=negative][_nghost-%COMP%]:hover{color:var(--tui-negative-hover)}[data-host-mode=negative]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(222,76,30,.48);text-decoration-color:#de4c1e7a}[data-host-mode=positive][_nghost-%COMP%]{color:var(--tui-positive)}[data-host-mode=positive][_nghost-%COMP%]:hover{color:var(--tui-positive-hover)}[data-host-mode=positive]._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{-webkit-text-decoration-color:rgba(58,169,129,.48);text-decoration-color:#3aa9817a}._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-selection)}[data-mode=onLight]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-clear);color:var(--tui-text-01)}[data-mode=onDark]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-clear-inverse);color:var(--tui-text-01-night)}[data-host-mode=positive]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-success-bg)}[data-host-mode=negative]._focus-visible[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{background:var(--tui-error-bg)}._pseudo[_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding-bottom:.15em;-webkit-text-decoration:underline dashed rgba(51,111,238,.48);text-decoration:underline dashed rgba(51,111,238,.48);text-underline-offset:.2em;text-decoration-thickness:.7px}.t-icon[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;width:var(--tui-link-icon-size, 1.5rem);height:var(--tui-link-icon-size, 1.5rem);margin-top:-.125rem}.t-icon_left[_ngcontent-%COMP%]{margin-right:.25rem}.t-icon_right[_ngcontent-%COMP%]{margin-left:.25rem}._icon-rotated[_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}"],changeDetection:0}),e})(),rb=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({imports:[[Rt,Go]]}),e})();function hL(e,t){if(e&1&&(_n(0),Un(1),Dn()),e&2){let n=t.polymorpheusOutlet;re(1),an(" ",n," ")}}function pL(e,t){if(e&1&&(ge(0,"header",6),Ce(1,hL,2,1,"ng-container",3),pe()),e&2){let n=me();re(1),U("polymorpheusOutlet",n.header)("polymorpheusOutletContext",n.context)}}function mL(e,t){if(e&1){let n=jn();_n(0),Le(1,"div",7),ge(2,"div",8)(3,"button",9),nt("click",function(){Rn(n);let i=me();return Fn(i.context.$implicit.complete())}),Un(4),pe()(),Dn()}if(e&2){let n=t.polymorpheusOutlet,r=me(),i;re(1),U("innerHTML",n,vo),re(3),an(" ",((i=r.context.data)==null?null:i.button)||"OK"," ")}}function gL(e,t){if(e&1){let n=jn();ge(0,"div",10)(1,"button",11),nt("click",function(){Rn(n);let i=me();return Fn(i.close$.next())})("mousedown.prevent.silent",function(){return 0}),cn(2,"async"),pe()()}if(e&2){let n=me();re(1),U("appearance",n.fullscreen?"secondary":"")("icon",n.icons.close)("title",un(2,3,n.closeWord$))}}var vL={size:"m",required:!1,closeable:!0,dismissible:!0,label:"",header:""},yL=Ee(Ae),_L=Ee(vL);var DL=17,ib=(()=>{class e extends N{constructor(n,r,i){super(o=>xe(this.esc$,this.mousedown$).subscribe(o)),this.win=n,this.doc=r,this.el=i,this.esc$=J(this.doc,"keydown").pipe(ye(o=>{let s=Fr(o);return o.key==="Escape"&&!o.defaultPrevented&&(this.element.contains(s)||this.isOutside(s))})),this.mousedown$=J(this.doc,"mousedown").pipe(ye(o=>cl(this.win)-o.clientX>DL&&this.isOutside(Fr(o))),ee(()=>J(this.doc,"mouseup").pipe(Ke(1),w(Fr),ye(o=>this.isOutside(o)))))}get element(){return this.el.nativeElement}isOutside(n){return Ru(n)&&(!V0(this.element,n)||n===this.element)}}return e.\u0275fac=function(n){return new(n||e)(I(de),I(le),I(X))},e.\u0275prov=S({token:e,factory:e.\u0275fac}),e})(),EL=new Error("Required dialog was dismissed");function ob(e){return ti(e)?e:M(e)}var wL=(()=>{class e{constructor(n,r,i,o,s,a,c,u){this.duration=n,this.isMobile=r,this.context=i,this.closeWord$=c,this.icons=u,this.animation={value:"",params:{start:"40px",duration:this.duration}},this.fullscreenAnimation={value:"",params:{start:"100vh",duration:this.duration}},this.close$=new Te,xe(this.close$.pipe(ee(()=>ob(i.closeable))),s.pipe(ee(()=>ob(i.dismissible))),a.pipe(w(Io))).pipe(ye(Boolean),be(o)).subscribe(()=>{this.close()})}get size(){return this.context.size}get header(){return this.context.header}get slideInTop(){return this.fullscreen||this.isMobile?this.fullscreenAnimation:this.animation}get fullscreen(){return!this.isMobile&&(this.size==="fullscreen"||this.size==="page")}close(){this.context.required?this.context.$implicit.error(EL):this.context.$implicit.complete()}}return e.\u0275fac=function(n){return new(n||e)(y(Yp),y(Fp),y(Gs),y(qe,2),y(ib),y(yL),y(dl),y(ll))},e.\u0275cmp=st({type:e,selectors:[["tui-dialog"]],hostVars:6,hostBindings:function(n,r){n&2&&(at("data-appearance",r.context.appearance)("data-size",r.size),Os("@tuiSlideInTop",r.slideInTop)("@tuiFadeIn",r.slideInTop),Xe("_centered",r.header))},features:[ze([qe,ib])],decls:7,vars:6,consts:[["class","t-header",4,"ngIf"],[1,"t-content"],[1,"t-heading",3,"id","textContent"],[4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-filler"],["class","t-wrapper",4,"ngIf"],[1,"t-header"],[3,"innerHTML"],[1,"t-buttons"],["size","m","tuiAutoFocus","","tuiButton","","type","button",3,"click"],[1,"t-wrapper"],["automation-id","tui-dialog__close","shape","rounded","size","s","tuiIconButton","","type","button",1,"t-close",3,"appearance","icon","title","click","mousedown.prevent.silent"]],template:function(n,r){n&1&&(Ce(0,pL,2,2,"header",0),ge(1,"div",1),Le(2,"h2",2),ge(3,"section"),Ce(4,mL,5,2,"ng-container",3),pe()(),Le(5,"div",4),Ce(6,gL,3,5,"div",5)),n&2&&(U("ngIf",r.header),re(2),U("id",r.context.id)("textContent",r.context.label),re(2),U("polymorpheusOutlet",r.context.content)("polymorpheusOutletContext",r.context),re(2),U("ngIf",r.context.closeable))},dependencies:[Ca,Pt,Lr,WE,Bn],styles:['[_nghost-%COMP%]{position:relative;display:flex;font:var(--tui-font-text-m);flex-direction:column;box-sizing:border-box;margin:auto;border-radius:1rem;border:2.5rem solid transparent}[_nghost-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";border-radius:inherit;pointer-events:none;box-shadow:var(--tui-shadow-modal)}[data-size=auto][_nghost-%COMP%]{width:auto}[data-size=s][_nghost-%COMP%]{width:30rem}[data-size=s][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:1.5rem}[data-size=s][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.5rem;font:var(--tui-font-heading-5)}[data-size=m][_nghost-%COMP%]{width:42.5rem}[data-size=m][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.75rem;font:var(--tui-font-heading-4)}[data-size=l][_nghost-%COMP%]{width:55rem}[data-size=l][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:1rem}[data-size=fullscreen][_nghost-%COMP%], [data-size=page][_nghost-%COMP%]{min-width:100vw;min-height:100%;border-radius:0;border:none;background:var(--tui-elevation-01);box-shadow:0 4rem var(--tui-elevation-01)}[data-size=fullscreen][_nghost-%COMP%] .t-content[_ngcontent-%COMP%], [data-size=page][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:3rem calc(50vw - (45rem / 2))}[data-size=fullscreen][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%], [data-size=page][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:1rem}[data-size=page][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:0}._centered[_nghost-%COMP%]{text-align:center}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%]{min-width:100%;width:100%;max-width:100%;border-radius:0;border:none;margin:auto 0 0}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%] .t-content[_ngcontent-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%] .t-content[_ngcontent-%COMP%]{padding:1.5rem}[_nghost-%COMP%] tui-root._mobile[data-size][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%], tui-root._mobile [data-size][_nghost-%COMP%] .t-heading[_ngcontent-%COMP%]{margin-bottom:.5rem;font:var(--tui-font-heading-5)}.t-heading[_ngcontent-%COMP%]{margin:0;word-wrap:break-word;font:var(--tui-font-heading-3)}.t-heading[_ngcontent-%COMP%]:empty{display:none}.t-header[_ngcontent-%COMP%]{display:flex;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden}[data-size=fullscreen][_nghost-%COMP%] tui-root._mobile[_nghost-%COMP%] .t-header[_ngcontent-%COMP%], tui-root._mobile [_nghost-%COMP%] .t-header[_ngcontent-%COMP%]{flex:1}.t-content[_ngcontent-%COMP%]{border-radius:inherit;padding:2rem;background:var(--tui-elevation-01)}.t-content[_ngcontent-%COMP%]:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.t-wrapper[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;z-index:1;order:-1}.t-filler[_ngcontent-%COMP%]{flex-grow:1}.t-close[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:1.5rem;right:1.5rem;display:none;color:var(--tui-base-01)}.t-dialog:last-of-type[_nghost-%COMP%] .t-close[_ngcontent-%COMP%], .t-dialog:last-of-type [_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]:not([data-size="fullscreen"]):not([data-size="page"]) .t-close[_ngcontent-%COMP%]{animation:tuiFadeIn var(--tui-duration);background:rgba(104,104,104,.96)}[_nghost-%COMP%]:not([data-size="fullscreen"]):not([data-size="page"]) .t-close[_ngcontent-%COMP%]:hover{background:rgba(159,159,159,.86)}[_nghost-%COMP%]:not([data-size="fullscreen"]).ng-animating .t-close[_ngcontent-%COMP%]{display:none}tui-root._mobile[_nghost-%COMP%] .t-close[_ngcontent-%COMP%], tui-root._mobile [_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{position:absolute;top:0;right:0;background:transparent!important;color:var(--tui-text-01);opacity:.5}.t-buttons[_ngcontent-%COMP%]{margin-top:1.25rem;text-align:right}'],data:{animation:[Qw,Nl]}}),e})(),bL=new bi(wL),CL=(()=>{class e extends il{constructor(){super(...arguments),this.component=bL,this.defaultOptions=Object.assign(Object.assign({},v(_L)),{data:void 0})}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var LZ=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:[LE(CL)],imports:[[kr,Fl,Rt,qE]]}),e})();var sb=(()=>{class e{constructor(n){this.service=n}transform(n){return this.service.format(n.valueOf())}}return e.\u0275fac=function(n){return new(n||e)(y(Ww,16))},e.\u0275pipe=pi({name:"tuiFormatDate",type:e,pure:!0}),e})(),ab=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();function IL(e,t){if(e&1){let n=jn();ge(0,"button",10),nt("click",function(){Rn(n);let i=me();return Fn(i.close.emit())}),cn(1,"async"),pe()}if(e&2){let n=me();U("icon",n.icons.close)("title",un(1,2,n.closeWord$))}}function SL(e,t){if(e&1&&(Le(0,"span",11),cn(1,"async"),cn(2,"tuiFormatDate")),e&2){let n=me();U("textContent",un(1,1,un(2,3,n.timestamp)))}}var ML=[[["img"]],[["tui-svg"]],"*",[["","tuiButton",""]],[["","tuiLink",""]]],TL=["img","tui-svg","*","[tuiButton]","[tuiLink]"];function AL(e,t){if(e&1&&Le(0,"img",7),e&2){let n=me(2);U("src",n.context.image,D_)}}function OL(e,t){if(e&1&&Le(0,"tui-svg",8),e&2){let n=me(2);Do("color",n.context.iconColor),U("src",n.context.icon)}}function xL(e,t){if(e&1&&Le(0,"div",9),e&2){let n=t.polymorpheusOutlet;U("innerHTML",n,vo)}}function NL(e,t){if(e&1){let n=jn();ge(0,"button",10),nt("click",function(){Rn(n);let i=me(2);return Fn(i.context.$implicit.next(i.context.buttons[0]))}),Un(1),pe()}if(e&2){let n=me(2);re(1),an(" ",n.context.buttons[0]," ")}}function PL(e,t){if(e&1){let n=jn();ge(0,"button",11),nt("click",function(){Rn(n);let i=me(2);return Fn(i.context.$implicit.next(i.context.buttons[i.context.buttons.length-1]))}),Un(1),pe()}if(e&2){let n=me(2);re(1),an(" ",n.context.buttons[n.context.buttons.length-1]," ")}}function RL(e,t){if(e&1){let n=jn();ge(0,"tui-push",1),nt("close",function(){Rn(n);let i=me();return Fn(i.context.$implicit.complete())}),Ce(1,AL,1,1,"img",2)(2,OL,1,3,"tui-svg",3)(3,xL,1,1,"div",4)(4,NL,2,1,"button",5)(5,PL,2,1,"button",6),pe()}if(e&2){let n=me();U("heading",n.context.heading)("timestamp",n.context.timestamp)("type",n.context.type),re(1),U("ngIf",n.context.image),re(1),U("ngIf",n.context.icon),re(1),U("polymorpheusOutlet",n.context.content),re(1),U("ngIf",n.context.buttons.length>1),re(1),U("ngIf",n.context.buttons.length)}}var FL=(()=>{class e{constructor(n,r){this.closeWord$=n,this.icons=r,this.heading="",this.type="",this.timestamp=0,this.close=new et}get closeable(){return K0(this.close)}}return e.\u0275fac=function(n){return new(n||e)(y(dl),y(ll))},e.\u0275cmp=st({type:e,selectors:[["tui-push"]],inputs:{heading:"heading",type:"type",timestamp:"timestamp"},outputs:{close:"close"},ngContentSelectors:TL,decls:17,vars:4,consts:[[1,"t-image"],["appearance","","shape","rounded","size","xs","tuiIconButton","","type","button","class","t-close",3,"icon","title","click",4,"ngIf"],[1,"t-top"],[1,"t-icon"],["class","t-time",3,"textContent",4,"ngIf"],["automation-id","tui-push__heading",1,"t-heading"],[1,"t-content"],[1,"t-actions"],[1,"t-button"],[1,"t-link"],["appearance","","shape","rounded","size","xs","tuiIconButton","","type","button",1,"t-close",3,"icon","title","click"],[1,"t-time",3,"textContent"]],template:function(n,r){n&1&&(Vn(ML),ge(0,"div",0),zt(1),pe(),Ce(2,IL,2,4,"button",1),ge(3,"div",2)(4,"span",3),zt(5,1),pe(),Un(6),Ce(7,SL,3,5,"span",4),pe(),ge(8,"h3",5),Un(9),pe(),ge(10,"div",6),zt(11,2),pe(),ge(12,"div",7)(13,"span",8),zt(14,3),pe(),ge(15,"span",9),zt(16,4),pe()()),n&2&&(re(2),U("ngIf",r.closeable),re(4),an(" ",r.type," "),re(1),U("ngIf",r.timestamp),re(2),an(" ",r.heading,"\n"))},dependencies:[Ca,Pt,Bn,sb],styles:['[_nghost-%COMP%]{position:relative;display:block;width:22.5rem;max-width:100%;box-sizing:border-box;padding:1.25rem 1.25rem .25rem;overflow:hidden;font:var(--tui-font-text-m);border-radius:var(--tui-radius-xl);background:var(--tui-elevation-02);box-shadow:var(--tui-shadow)}.t-image[_ngcontent-%COMP%]{display:flex;flex-direction:column;max-height:10.625rem;overflow:hidden;margin:-1.25rem -1.25rem 1.25rem}.t-close[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem;color:#0000008a;background:rgba(242,242,242,.32);-webkit-backdrop-filter:blur(1rem);backdrop-filter:blur(1rem)}.t-top[_ngcontent-%COMP%]{display:flex;align-items:center;font:var(--tui-font-text-s);color:var(--tui-text-02)}.t-icon[_ngcontent-%COMP%]{height:1.25rem;margin-right:.5rem;transform:scale(.833);transform-origin:top left;color:var(--tui-link)}.t-time[_ngcontent-%COMP%]:before{content:"\\2022";display:inline-block;width:1rem;text-align:center}.t-heading[_ngcontent-%COMP%]{line-height:1.25rem;font-weight:bold;margin:.75rem 0 .25rem}.t-heading[_ngcontent-%COMP%], .t-content[_ngcontent-%COMP%]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;word-break:break-word;overflow:hidden}.t-actions[_ngcontent-%COMP%]{display:flex;align-items:center;font:var(--tui-font-text-s)}.t-button[_ngcontent-%COMP%]:not(:empty){margin:.75rem .75rem .75rem 0}.t-link[_ngcontent-%COMP%]{margin:.75rem 0}.t-link[_ngcontent-%COMP%]:empty{margin:.5rem}'],changeDetection:0}),e})(),LL=(()=>{class e extends Hr{constructor(n){var r;super(),this.modeDirective=n,this.size="s",this.shape=null,this.change$=((r=this.modeDirective)===null||r===void 0?void 0:r.change$)||new Te}get appearance(){var n;return((n=this.modeDirective)===null||n===void 0?void 0:n.mode)==="onDark"?"accent":"secondary"}}return e.\u0275fac=function(n){return new(n||e)(y(Hr,12))},e.\u0275dir=$({type:e,selectors:[["tui-push"]],features:[ze([{provide:Hr,useExisting:e},{provide:km,useExisting:e}]),$e]}),e})(),kL={heading:"",type:"",timestamp:0,image:"",icon:"",iconColor:"",buttons:[]},jL=Ee(kL);var VL=(()=>{class e extends sp{constructor(n,r,i,o){super(n,r),this.show$=new Te,this.show$.pipe(Z0(()=>o.open(this)),be(i)).subscribe()}set tuiPush(n){this.show$.next(n)}}return e.\u0275fac=function(n){return new(n||e)(y(pt),y(gt),y(qe,2),y(dr(()=>cb)))},e.\u0275dir=$({type:e,selectors:[["","tuiPush",""]],inputs:{tuiPush:"tuiPush"},features:[ze([qe]),$e]}),e})(),UL=(()=>{class e{constructor(n,r){this.animation=n,this.context=r}get isDirective(){return this.context.content instanceof VL}}return e.\u0275fac=function(n){return new(n||e)(y(sw),y(Gs))},e.\u0275cmp=st({type:e,selectors:[["tui-push-alert"]],hostAttrs:["role","alert"],hostVars:3,hostBindings:function(n,r){n&2&&Os("@tuiFadeIn",r.animation)("@tuiSlideInRight",r.animation)("@tuiHeightCollapse",r.animation)},decls:1,vars:2,consts:[[3,"heading","timestamp","type","close",4,"ngIf","ngIfElse"],[3,"heading","timestamp","type","close"],["alt","",3,"src",4,"ngIf"],[3,"src","color",4,"ngIf"],[3,"innerHTML",4,"polymorpheusOutlet"],["tuiButton","","type","button",3,"click",4,"ngIf"],["tuiLink","","type","button",3,"click",4,"ngIf"],["alt","",3,"src"],[3,"src"],[3,"innerHTML"],["tuiButton","","type","button",3,"click"],["tuiLink","","type","button",3,"click"]],template:function(n,r){n&1&&Ce(0,RL,6,8,"tui-push",0),n&2&&U("ngIf",!r.isDirective)("ngIfElse",r.context.content.template)},dependencies:[FL,zo,Ca,nb,Pt,LL,Lr],styles:["[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}"],data:{animation:[Nl,Kw,Zw]},changeDetection:0}),e})(),cb=(()=>{class e extends il{constructor(){super(...arguments),this.component=new bi(UL),this.defaultOptions=v(jL)}}return e.\u0275fac=(()=>{let t;return function(r){return(t||(t=Fe(e)))(r||e)}})(),e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),o9=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({providers:[{provide:RE,useExisting:cb,multi:!0}],imports:[[Rt,kr,Fl,rb,Go,ab]]}),e})();var lb=$b(ub());var BL=new D("Config for DOMPurify",{factory:()=>({}),providedIn:"root"}),HL=new D("Hooks for DOMPurify",{factory:()=>[],providedIn:"root"}),$L=new D("A function that sanitizes value for a CSS rule",{factory:()=>e=>e,providedIn:"root"}),zL=lb.default,h9=(()=>{class e{constructor(n,r,{defaultView:i},o){this.config=n,this.sanitizeStyle=r,this.domPurify=zL(i),o.forEach(({name:s,hook:a})=>{this.domPurify.addHook(s,a)})}sanitize(n,r,i=this.config){if(n===mt.SCRIPT)throw new Error("DOMPurify does not support SCRIPT context");return n===mt.STYLE?this.sanitizeStyle(String(r)):this.domPurify.sanitize(String(r||""),i)}}return e.\u0275fac=function(n){return new(n||e)(I(BL),I($L),I(le),I(HL))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var p9=(()=>{class e{}return e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=K({type:e}),e.\u0275inj=Z({}),e})();export{zb as a,Qe as b,N as c,Te as d,We as e,er as f,Ae as g,Wa as h,qa as i,M as j,w as k,ac as l,Tn as m,ht as n,xe as o,EC as p,ye as q,CC as r,Zg as s,Ke as t,ts as u,Ue as v,uc as w,vt as x,Ed as y,_e as z,ee as A,be as B,Ne as C,br as D,dr as E,S as F,Z as G,D as H,I,v as J,st as K,K as L,$ as M,pi as N,sn as O,Rn as P,Fn as Q,bs as R,Fe as S,fr as T,ky as U,hr as V,go as W,tS as X,bt as Y,Qt as Z,yz as _,_z as $,Dz as aa,mt as ba,vo as ca,X as da,li as ea,mr as fa,SM as ga,re as ha,y as ia,gt as ja,et as ka,ue as la,$e as ma,at as na,U as oa,Do as pa,Xe as qa,Nt as ra,Ce as sa,ge as ta,pe as ua,Le as va,_n as wa,Dn as xa,As as ya,jn as za,bh as Aa,Os as Ba,nt as Ca,me as Da,Vn as Ea,zt as Fa,lD as Ga,Un as Ha,UA as Ia,an as Ja,ze as Ka,pD as La,wz as Ma,bz as Na,cn as Oa,un as Pa,Cz as Qa,Iz as Ra,pt as Sa,Th as Ta,yD as Ua,nO as Va,Ah as Wa,wD as Xa,Nr as Ya,le as Za,Yz as _a,Zz as $a,Pt as ab,Bn as bb,Rt as cb,Rs as db,KD as eb,wG as fb,Gh as gb,bG as hb,aF as ib,t6 as jb,Kh as kb,p0 as lb,Ei as mb,BG as nb,Nu as ob,Lx as pb,Vx as qb,$G as rb,Ge as sb,E as tb,ae as ub,M0 as vb,ct as wb,Rr as xb,Io as yb,f3 as zb,h3 as Ab,A0 as Bb,p3 as Cb,m3 as Db,g3 as Eb,x0 as Fb,y3 as Gb,D3 as Hb,E3 as Ib,vr as Jb,b3 as Kb,C3 as Lb,I3 as Mb,F0 as Nb,Ee as Ob,ie as Pb,wi as Qb,T3 as Rb,V0 as Sb,Ru as Tb,Mo as Ub,Fr as Vb,N3 as Wb,P3 as Xb,R3 as Yb,F3 as Zb,L3 as _b,tp as $b,U0 as ac,B0 as bc,U3 as cc,Ao as dc,H0 as ec,Oo as fc,z0 as gc,G0 as hc,W0 as ic,eW as jc,J as kc,Z0 as lc,tW as mc,oN as nc,J0 as oc,$n as pc,zn as qc,Gs as rc,bi as sc,sp as tc,Lr as uc,kr as vc,de as wc,QG as xc,XG as yc,Xh as zc,$N as Ac,vW as Bc,pp as Cc,oE as Dc,el as Ec,gE as Fc,vE as Gc,RE as Hc,kP as Ic,Js as Jc,rl as Kc,OW as Lc,ea as Mc,Fp as Nc,xW as Oc,ta as Pc,UW as Qc,qe as Rc,c8 as Sc,kp as Tc,$P as Uc,u8 as Vc,l8 as Wc,Vp as Xc,na as Yc,T8 as Zc,BE as _c,A8 as $c,O8 as ad,P8 as bd,R8 as cd,X8 as dd,J8 as ed,e5 as fd,al as gd,y5 as hd,_5 as id,YE as jd,ZE as kd,J5 as ld,e4 as md,lR as nd,r4 as od,i4 as pd,Hp as qd,dR as rd,pl as sd,Cq as td,ml as ud,Iq as vd,Sq as wd,Mq as xd,Ti as yd,Tq as zd,Aq as Ad,sa as Bd,Oq as Cd,PR as Dd,xq as Ed,Nl as Fd,Z6 as Gd,h as Hd,Mi as Id,DR as Jd,c4 as Kd,u4 as Ld,l4 as Md,A4 as Nd,O4 as Od,x4 as Pd,N4 as Qd,iw as Rd,oa as Sd,Po as Td,wR as Ud,bR as Vd,Yp as Wd,sw as Xd,ll as Yd,Z4 as Zd,K4 as _d,MR as $d,J4 as ae,nq as be,TR as ce,Ro as de,lq as ee,dq as fe,NR as ge,fq as he,hq as ie,pq as je,mq as ke,y6 as le,_6 as me,D6 as ne,qw as oe,E6 as pe,zo as qe,Go as re,Hr as se,Pl as te,_Y as ue,DY as ve,Xw as we,Jw as xe,eb as ye,tb as ze,Ca as Ae,Fl as Be,nb as Ce,rb as De,CL as Ee,LZ as Fe,FL as Ge,LL as He,VL as Ie,o9 as Je,h9 as Ke,p9 as Le}; -//# sourceMappingURL=chunk-DRGWRVTY.js.map diff --git a/chunk-DRGWRVTY.js.map b/chunk-DRGWRVTY.js.map deleted file mode 100644 index 64170f1d..00000000 --- a/chunk-DRGWRVTY.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["node_modules/dompurify/dist/purify.js","node_modules/@angular/core/fesm2022/primitives/signals.mjs","node_modules/rxjs/dist/esm/internal/util/isFunction.js","node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","node_modules/rxjs/dist/esm/internal/util/arrRemove.js","node_modules/rxjs/dist/esm/internal/Subscription.js","node_modules/rxjs/dist/esm/internal/config.js","node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","node_modules/rxjs/dist/esm/internal/util/noop.js","node_modules/rxjs/dist/esm/internal/NotificationFactories.js","node_modules/rxjs/dist/esm/internal/util/errorContext.js","node_modules/rxjs/dist/esm/internal/Subscriber.js","node_modules/rxjs/dist/esm/internal/symbol/observable.js","node_modules/rxjs/dist/esm/internal/util/identity.js","node_modules/rxjs/dist/esm/internal/util/pipe.js","node_modules/rxjs/dist/esm/internal/Observable.js","node_modules/rxjs/dist/esm/internal/util/lift.js","node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","node_modules/rxjs/dist/esm/internal/operators/refCount.js","node_modules/rxjs/dist/esm/internal/observable/ConnectableObservable.js","node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","node_modules/rxjs/dist/esm/internal/Subject.js","node_modules/rxjs/dist/esm/internal/BehaviorSubject.js","node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","node_modules/rxjs/dist/esm/internal/ReplaySubject.js","node_modules/rxjs/dist/esm/internal/scheduler/Action.js","node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","node_modules/rxjs/dist/esm/internal/Scheduler.js","node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","node_modules/rxjs/dist/esm/internal/scheduler/async.js","node_modules/rxjs/dist/esm/internal/observable/empty.js","node_modules/rxjs/dist/esm/internal/util/isScheduler.js","node_modules/rxjs/dist/esm/internal/util/args.js","node_modules/tslib/tslib.es6.mjs","node_modules/rxjs/dist/esm/internal/util/isArrayLike.js","node_modules/rxjs/dist/esm/internal/util/isPromise.js","node_modules/rxjs/dist/esm/internal/util/isInteropObservable.js","node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js","node_modules/rxjs/dist/esm/internal/util/throwUnobservableError.js","node_modules/rxjs/dist/esm/internal/symbol/iterator.js","node_modules/rxjs/dist/esm/internal/util/isIterable.js","node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js","node_modules/rxjs/dist/esm/internal/observable/innerFrom.js","node_modules/rxjs/dist/esm/internal/util/executeSchedule.js","node_modules/rxjs/dist/esm/internal/operators/observeOn.js","node_modules/rxjs/dist/esm/internal/operators/subscribeOn.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleObservable.js","node_modules/rxjs/dist/esm/internal/scheduled/schedulePromise.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleArray.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleIterable.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduleReadableStreamLike.js","node_modules/rxjs/dist/esm/internal/scheduled/scheduled.js","node_modules/rxjs/dist/esm/internal/observable/from.js","node_modules/rxjs/dist/esm/internal/observable/of.js","node_modules/rxjs/dist/esm/internal/observable/throwError.js","node_modules/rxjs/dist/esm/internal/util/isObservable.js","node_modules/rxjs/dist/esm/internal/util/EmptyError.js","node_modules/rxjs/dist/esm/internal/util/isDate.js","node_modules/rxjs/dist/esm/internal/operators/map.js","node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","node_modules/rxjs/dist/esm/internal/util/argsArgArrayOrObject.js","node_modules/rxjs/dist/esm/internal/util/createObject.js","node_modules/rxjs/dist/esm/internal/observable/combineLatest.js","node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","node_modules/rxjs/dist/esm/internal/operators/concatAll.js","node_modules/rxjs/dist/esm/internal/observable/concat.js","node_modules/rxjs/dist/esm/internal/observable/defer.js","node_modules/rxjs/dist/esm/internal/observable/forkJoin.js","node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","node_modules/rxjs/dist/esm/internal/observable/timer.js","node_modules/rxjs/dist/esm/internal/observable/merge.js","node_modules/rxjs/dist/esm/internal/observable/never.js","node_modules/rxjs/dist/esm/internal/util/argsOrArgArray.js","node_modules/rxjs/dist/esm/internal/operators/filter.js","node_modules/rxjs/dist/esm/internal/observable/race.js","node_modules/rxjs/dist/esm/internal/operators/catchError.js","node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","node_modules/rxjs/dist/esm/internal/operators/concatMap.js","node_modules/rxjs/dist/esm/internal/operators/debounce.js","node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","node_modules/rxjs/dist/esm/internal/operators/take.js","node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","node_modules/rxjs/dist/esm/internal/operators/mapTo.js","node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","node_modules/rxjs/dist/esm/internal/operators/delay.js","node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","node_modules/rxjs/dist/esm/internal/operators/endWith.js","node_modules/rxjs/dist/esm/internal/operators/finalize.js","node_modules/rxjs/dist/esm/internal/operators/first.js","node_modules/rxjs/dist/esm/internal/operators/takeLast.js","node_modules/rxjs/dist/esm/internal/operators/last.js","node_modules/rxjs/dist/esm/internal/operators/repeat.js","node_modules/rxjs/dist/esm/internal/operators/repeatWhen.js","node_modules/rxjs/dist/esm/internal/operators/scan.js","node_modules/rxjs/dist/esm/internal/operators/share.js","node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","node_modules/rxjs/dist/esm/internal/operators/skip.js","node_modules/rxjs/dist/esm/internal/operators/skipWhile.js","node_modules/rxjs/dist/esm/internal/operators/startWith.js","node_modules/rxjs/dist/esm/internal/operators/switchMap.js","node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","node_modules/rxjs/dist/esm/internal/operators/tap.js","node_modules/rxjs/dist/esm/internal/operators/throttle.js","node_modules/rxjs/dist/esm/internal/operators/throttleTime.js","node_modules/rxjs/dist/esm/internal/operators/withLatestFrom.js","node_modules/@angular/core/fesm2022/core.mjs","node_modules/@angular/common/fesm2022/common.mjs","node_modules/@angular/common/fesm2022/http.mjs","node_modules/@angular/platform-browser/fesm2022/platform-browser.mjs","node_modules/@angular/forms/fesm2022/forms.mjs","node_modules/@ng-web-apis/common/fesm2015/ng-web-apis-common.js","node_modules/@angular/animations/fesm2022/animations.mjs","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-constants.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-browser.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-math.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-miscellaneous.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-dom.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-focus.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-format.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-os.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-svg.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-exceptions.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-observables.js","node_modules/@tinkoff/ng-polymorpheus/fesm2015/tinkoff-ng-polymorpheus.js","node_modules/rxjs/dist/esm/internal/observable/dom/fetch.js","node_modules/@angular/animations/fesm2022/browser.mjs","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-tokens.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-services.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-abstract.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-coercion.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-pipes-mapper.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-components-scroll-controls.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-decorators.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-active-zone.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-auto-focus.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-let.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-overscroll.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-components-dropdown-host.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-enums.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-constants.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-enums.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-languages-english.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-tokens.js","node_modules/@taiga-ui/i18n/fesm2015/taiga-ui-i18n-tools.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-dom.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-miscellaneous.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-utils-mobile.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-enums.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-tokens.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-abstract.js","node_modules/@angular/router/fesm2022/router.mjs","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-services.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-svg.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-animations.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-mode.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-providers.js","node_modules/@tinkoff/ng-event-plugins/fesm2015/tinkoff-ng-event-plugins.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-wrapper.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-loader.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-button.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-link.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-dialog.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-pipes-format-date.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-push.js","node_modules/@tinkoff/ng-dompurify/fesm2015/tinkoff-ng-dompurify.js"],"sourcesContent":["/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.DOMPurify = factory());\n})(this, function () {\n 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return apply(func, thisArg, args);\n };\n }\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return construct(func, args);\n };\n }\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n }\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n\n function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n newObject[property] = value;\n }\n }\n return newObject;\n }\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n return fallbackValue;\n }\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n\n const DOCTYPE_NAME = seal(/^html$/i);\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n });\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n DOMPurify.version = '3.0.6';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n let SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS),\n // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS,\n // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...text]);\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n } // Overwrite existing TrustedTypes policy.\n\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n } // If creating the internal policy succeeded sign internal variables.\n\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n const ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n const ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either or MathML\n // text integration points.\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Now let's check the element's type and name */\n\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n /* Check whether element has a valid namespace */\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ;else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ;else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if (\n // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) ||\n // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ;else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ;else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ;else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ;else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ;else if (value) {\n return false;\n } else ;\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ;else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n /* Stringify, in case dirty is an object */\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n _sanitizeAttributes(currentNode);\n }\n /* If we sanitized `dirty` in-place, return it. */\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n return purify;\n});\n","/**\n * @license Angular v17.0.5\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\n/**\n * The default equality function used for `signal` and `computed`, which uses referential equality.\n */\nfunction defaultEquals(a, b) {\n return Object.is(a, b);\n}\n\n/**\n * The currently active consumer `ReactiveNode`, if running code in a reactive context.\n *\n * Change this via `setActiveConsumer`.\n */\nlet activeConsumer = null;\nlet inNotificationPhase = false;\n/**\n * Global epoch counter. Incremented whenever a source signal is set.\n */\nlet epoch = 1;\n/**\n * Symbol used to tell `Signal`s apart from other functions.\n *\n * This can be used to auto-unwrap signals in various cases, or to auto-wrap non-signal values.\n */\nconst SIGNAL = /* @__PURE__ */Symbol('SIGNAL');\nfunction setActiveConsumer(consumer) {\n const prev = activeConsumer;\n activeConsumer = consumer;\n return prev;\n}\nfunction getActiveConsumer() {\n return activeConsumer;\n}\nfunction isInNotificationPhase() {\n return inNotificationPhase;\n}\nfunction isReactive(value) {\n return value[SIGNAL] !== undefined;\n}\nconst REACTIVE_NODE = {\n version: 0,\n lastCleanEpoch: 0,\n dirty: false,\n producerNode: undefined,\n producerLastReadVersion: undefined,\n producerIndexOfThis: undefined,\n nextProducerIndex: 0,\n liveConsumerNode: undefined,\n liveConsumerIndexOfThis: undefined,\n consumerAllowSignalWrites: false,\n consumerIsAlwaysLive: false,\n producerMustRecompute: () => false,\n producerRecomputeValue: () => {},\n consumerMarkedDirty: () => {},\n consumerOnSignalRead: () => {}\n};\n/**\n * Called by implementations when a producer's signal is read.\n */\nfunction producerAccessed(node) {\n if (inNotificationPhase) {\n throw new Error(typeof ngDevMode !== 'undefined' && ngDevMode ? `Assertion error: signal read during notification phase` : '');\n }\n if (activeConsumer === null) {\n // Accessed outside of a reactive context, so nothing to record.\n return;\n }\n activeConsumer.consumerOnSignalRead(node);\n // This producer is the `idx`th dependency of `activeConsumer`.\n const idx = activeConsumer.nextProducerIndex++;\n assertConsumerNode(activeConsumer);\n if (idx < activeConsumer.producerNode.length && activeConsumer.producerNode[idx] !== node) {\n // There's been a change in producers since the last execution of `activeConsumer`.\n // `activeConsumer.producerNode[idx]` holds a stale dependency which will be be removed and\n // replaced with `this`.\n //\n // If `activeConsumer` isn't live, then this is a no-op, since we can replace the producer in\n // `activeConsumer.producerNode` directly. However, if `activeConsumer` is live, then we need\n // to remove it from the stale producer's `liveConsumer`s.\n if (consumerIsLive(activeConsumer)) {\n const staleProducer = activeConsumer.producerNode[idx];\n producerRemoveLiveConsumerAtIndex(staleProducer, activeConsumer.producerIndexOfThis[idx]);\n // At this point, the only record of `staleProducer` is the reference at\n // `activeConsumer.producerNode[idx]` which will be overwritten below.\n }\n }\n\n if (activeConsumer.producerNode[idx] !== node) {\n // We're a new dependency of the consumer (at `idx`).\n activeConsumer.producerNode[idx] = node;\n // If the active consumer is live, then add it as a live consumer. If not, then use 0 as a\n // placeholder value.\n activeConsumer.producerIndexOfThis[idx] = consumerIsLive(activeConsumer) ? producerAddLiveConsumer(node, activeConsumer, idx) : 0;\n }\n activeConsumer.producerLastReadVersion[idx] = node.version;\n}\n/**\n * Increment the global epoch counter.\n *\n * Called by source producers (that is, not computeds) whenever their values change.\n */\nfunction producerIncrementEpoch() {\n epoch++;\n}\n/**\n * Ensure this producer's `version` is up-to-date.\n */\nfunction producerUpdateValueVersion(node) {\n if (consumerIsLive(node) && !node.dirty) {\n // A live consumer will be marked dirty by producers, so a clean state means that its version\n // is guaranteed to be up-to-date.\n return;\n }\n if (!node.dirty && node.lastCleanEpoch === epoch) {\n // Even non-live consumers can skip polling if they previously found themselves to be clean at\n // the current epoch, since their dependencies could not possibly have changed (such a change\n // would've increased the epoch).\n return;\n }\n if (!node.producerMustRecompute(node) && !consumerPollProducersForChange(node)) {\n // None of our producers report a change since the last time they were read, so no\n // recomputation of our value is necessary, and we can consider ourselves clean.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n return;\n }\n node.producerRecomputeValue(node);\n // After recomputing the value, we're no longer dirty.\n node.dirty = false;\n node.lastCleanEpoch = epoch;\n}\n/**\n * Propagate a dirty notification to live consumers of this producer.\n */\nfunction producerNotifyConsumers(node) {\n if (node.liveConsumerNode === undefined) {\n return;\n }\n // Prevent signal reads when we're updating the graph\n const prev = inNotificationPhase;\n inNotificationPhase = true;\n try {\n for (const consumer of node.liveConsumerNode) {\n if (!consumer.dirty) {\n consumerMarkDirty(consumer);\n }\n }\n } finally {\n inNotificationPhase = prev;\n }\n}\n/**\n * Whether this `ReactiveNode` in its producer capacity is currently allowed to initiate updates,\n * based on the current consumer context.\n */\nfunction producerUpdatesAllowed() {\n return activeConsumer?.consumerAllowSignalWrites !== false;\n}\nfunction consumerMarkDirty(node) {\n node.dirty = true;\n producerNotifyConsumers(node);\n node.consumerMarkedDirty?.(node);\n}\n/**\n * Prepare this consumer to run a computation in its reactive context.\n *\n * Must be called by subclasses which represent reactive computations, before those computations\n * begin.\n */\nfunction consumerBeforeComputation(node) {\n node && (node.nextProducerIndex = 0);\n return setActiveConsumer(node);\n}\n/**\n * Finalize this consumer's state after a reactive computation has run.\n *\n * Must be called by subclasses which represent reactive computations, after those computations\n * have finished.\n */\nfunction consumerAfterComputation(node, prevConsumer) {\n setActiveConsumer(prevConsumer);\n if (!node || node.producerNode === undefined || node.producerIndexOfThis === undefined || node.producerLastReadVersion === undefined) {\n return;\n }\n if (consumerIsLive(node)) {\n // For live consumers, we need to remove the producer -> consumer edge for any stale producers\n // which weren't dependencies after the recomputation.\n for (let i = node.nextProducerIndex; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate the producer tracking arrays.\n // Perf note: this is essentially truncating the length to `node.nextProducerIndex`, but\n // benchmarking has shown that individual pop operations are faster.\n while (node.producerNode.length > node.nextProducerIndex) {\n node.producerNode.pop();\n node.producerLastReadVersion.pop();\n node.producerIndexOfThis.pop();\n }\n}\n/**\n * Determine whether this consumer has any dependencies which have changed since the last time\n * they were read.\n */\nfunction consumerPollProducersForChange(node) {\n assertConsumerNode(node);\n // Poll producers for change.\n for (let i = 0; i < node.producerNode.length; i++) {\n const producer = node.producerNode[i];\n const seenVersion = node.producerLastReadVersion[i];\n // First check the versions. A mismatch means that the producer's value is known to have\n // changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n // The producer's version is the same as the last time we read it, but it might itself be\n // stale. Force the producer to recompute its version (calculating a new value if necessary).\n producerUpdateValueVersion(producer);\n // Now when we do this check, `producer.version` is guaranteed to be up to date, so if the\n // versions still match then it has not changed since the last time we read it.\n if (seenVersion !== producer.version) {\n return true;\n }\n }\n return false;\n}\n/**\n * Disconnect this consumer from the graph.\n */\nfunction consumerDestroy(node) {\n assertConsumerNode(node);\n if (consumerIsLive(node)) {\n // Drop all connections from the graph to this node.\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Truncate all the arrays to drop all connection from this node to the graph.\n node.producerNode.length = node.producerLastReadVersion.length = node.producerIndexOfThis.length = 0;\n if (node.liveConsumerNode) {\n node.liveConsumerNode.length = node.liveConsumerIndexOfThis.length = 0;\n }\n}\n/**\n * Add `consumer` as a live consumer of this node.\n *\n * Note that this operation is potentially transitive. If this node becomes live, then it becomes\n * a live consumer of all of its current producers.\n */\nfunction producerAddLiveConsumer(node, consumer, indexOfThis) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (node.liveConsumerNode.length === 0) {\n // When going from 0 to 1 live consumers, we become a live consumer to our producers.\n for (let i = 0; i < node.producerNode.length; i++) {\n node.producerIndexOfThis[i] = producerAddLiveConsumer(node.producerNode[i], node, i);\n }\n }\n node.liveConsumerIndexOfThis.push(indexOfThis);\n return node.liveConsumerNode.push(consumer) - 1;\n}\n/**\n * Remove the live consumer at `idx`.\n */\nfunction producerRemoveLiveConsumerAtIndex(node, idx) {\n assertProducerNode(node);\n assertConsumerNode(node);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && idx >= node.liveConsumerNode.length) {\n throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);\n }\n if (node.liveConsumerNode.length === 1) {\n // When removing the last live consumer, we will no longer be live. We need to remove\n // ourselves from our producers' tracking (which may cause consumer-producers to lose\n // liveness as well).\n for (let i = 0; i < node.producerNode.length; i++) {\n producerRemoveLiveConsumerAtIndex(node.producerNode[i], node.producerIndexOfThis[i]);\n }\n }\n // Move the last value of `liveConsumers` into `idx`. Note that if there's only a single\n // live consumer, this is a no-op.\n const lastIdx = node.liveConsumerNode.length - 1;\n node.liveConsumerNode[idx] = node.liveConsumerNode[lastIdx];\n node.liveConsumerIndexOfThis[idx] = node.liveConsumerIndexOfThis[lastIdx];\n // Truncate the array.\n node.liveConsumerNode.length--;\n node.liveConsumerIndexOfThis.length--;\n // If the index is still valid, then we need to fix the index pointer from the producer to this\n // consumer, and update it from `lastIdx` to `idx` (accounting for the move above).\n if (idx < node.liveConsumerNode.length) {\n const idxProducer = node.liveConsumerIndexOfThis[idx];\n const consumer = node.liveConsumerNode[idx];\n assertConsumerNode(consumer);\n consumer.producerIndexOfThis[idxProducer] = idx;\n }\n}\nfunction consumerIsLive(node) {\n return node.consumerIsAlwaysLive || (node?.liveConsumerNode?.length ?? 0) > 0;\n}\nfunction assertConsumerNode(node) {\n node.producerNode ??= [];\n node.producerIndexOfThis ??= [];\n node.producerLastReadVersion ??= [];\n}\nfunction assertProducerNode(node) {\n node.liveConsumerNode ??= [];\n node.liveConsumerIndexOfThis ??= [];\n}\n\n/**\n * Create a computed signal which derives a reactive value from an expression.\n */\nfunction createComputed(computation) {\n const node = Object.create(COMPUTED_NODE);\n node.computation = computation;\n const computed = () => {\n // Check if the value needs updating before returning it.\n producerUpdateValueVersion(node);\n // Record that someone looked at this signal.\n producerAccessed(node);\n if (node.value === ERRORED) {\n throw node.error;\n }\n return node.value;\n };\n computed[SIGNAL] = node;\n return computed;\n}\n/**\n * A dedicated symbol used before a computed value has been calculated for the first time.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst UNSET = /* @__PURE__ */Symbol('UNSET');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * is in progress. Used to detect cycles in computation chains.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst COMPUTING = /* @__PURE__ */Symbol('COMPUTING');\n/**\n * A dedicated symbol used in place of a computed signal value to indicate that a given computation\n * failed. The thrown error is cached until the computation gets dirty again.\n * Explicitly typed as `any` so we can use it as signal's value.\n */\nconst ERRORED = /* @__PURE__ */Symbol('ERRORED');\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst COMPUTED_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n value: UNSET,\n dirty: true,\n error: null,\n equal: defaultEquals,\n producerMustRecompute(node) {\n // Force a recomputation if there's no current value, or if the current value is in the\n // process of being calculated (which should throw an error).\n return node.value === UNSET || node.value === COMPUTING;\n },\n producerRecomputeValue(node) {\n if (node.value === COMPUTING) {\n // Our computation somehow led to a cyclic read of itself.\n throw new Error('Detected cycle in computations.');\n }\n const oldValue = node.value;\n node.value = COMPUTING;\n const prevConsumer = consumerBeforeComputation(node);\n let newValue;\n try {\n newValue = node.computation();\n } catch (err) {\n newValue = ERRORED;\n node.error = err;\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n if (oldValue !== UNSET && oldValue !== ERRORED && newValue !== ERRORED && node.equal(oldValue, newValue)) {\n // No change to `valueVersion` - old and new values are\n // semantically equivalent.\n node.value = oldValue;\n return;\n }\n node.value = newValue;\n node.version++;\n }\n };\n})();\nfunction defaultThrowError() {\n throw new Error();\n}\nlet throwInvalidWriteToSignalErrorFn = defaultThrowError;\nfunction throwInvalidWriteToSignalError() {\n throwInvalidWriteToSignalErrorFn();\n}\nfunction setThrowInvalidWriteToSignalError(fn) {\n throwInvalidWriteToSignalErrorFn = fn;\n}\n\n/**\n * If set, called after `WritableSignal`s are updated.\n *\n * This hook can be used to achieve various effects, such as running effects synchronously as part\n * of setting a signal.\n */\nlet postSignalSetFn = null;\n/**\n * Create a `Signal` that can be set or updated directly.\n */\nfunction createSignal(initialValue) {\n const node = Object.create(SIGNAL_NODE);\n node.value = initialValue;\n const getter = () => {\n producerAccessed(node);\n return node.value;\n };\n getter[SIGNAL] = node;\n return getter;\n}\nfunction setPostSignalSetFn(fn) {\n const prev = postSignalSetFn;\n postSignalSetFn = fn;\n return prev;\n}\nfunction signalGetFn() {\n producerAccessed(this);\n return this.value;\n}\nfunction signalSetFn(node, newValue) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n const value = node.value;\n if (Object.is(value, newValue)) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode && !node.equal(value, newValue)) {\n console.warn('Signal value equality implementations should always return `true` for' + ' values that are the same according to `Object.is` but returned `false` instead.');\n }\n } else if (!node.equal(value, newValue)) {\n node.value = newValue;\n signalValueChanged(node);\n }\n}\nfunction signalUpdateFn(node, updater) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n signalSetFn(node, updater(node.value));\n}\nfunction signalMutateFn(node, mutator) {\n if (!producerUpdatesAllowed()) {\n throwInvalidWriteToSignalError();\n }\n // Mutate bypasses equality checks as it's by definition changing the value.\n mutator(node.value);\n signalValueChanged(node);\n}\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst SIGNAL_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n equal: defaultEquals,\n value: undefined\n };\n})();\nfunction signalValueChanged(node) {\n node.version++;\n producerIncrementEpoch();\n producerNotifyConsumers(node);\n postSignalSetFn?.();\n}\nfunction createWatch(fn, schedule, allowSignalWrites) {\n const node = Object.create(WATCH_NODE);\n if (allowSignalWrites) {\n node.consumerAllowSignalWrites = true;\n }\n node.fn = fn;\n node.schedule = schedule;\n const registerOnCleanup = cleanupFn => {\n node.cleanupFn = cleanupFn;\n };\n function isWatchNodeDestroyed(node) {\n return node.fn === null && node.schedule === null;\n }\n function destroyWatchNode(node) {\n if (!isWatchNodeDestroyed(node)) {\n consumerDestroy(node); // disconnect watcher from the reactive graph\n node.cleanupFn();\n // nullify references to the integration functions to mark node as destroyed\n node.fn = null;\n node.schedule = null;\n node.cleanupFn = NOOP_CLEANUP_FN;\n }\n }\n const run = () => {\n if (node.fn === null) {\n // trying to run a destroyed watch is noop\n return;\n }\n if (isInNotificationPhase()) {\n throw new Error(`Schedulers cannot synchronously execute watches while scheduling.`);\n }\n node.dirty = false;\n if (node.hasRun && !consumerPollProducersForChange(node)) {\n return;\n }\n node.hasRun = true;\n const prevConsumer = consumerBeforeComputation(node);\n try {\n node.cleanupFn();\n node.cleanupFn = NOOP_CLEANUP_FN;\n node.fn(registerOnCleanup);\n } finally {\n consumerAfterComputation(node, prevConsumer);\n }\n };\n node.ref = {\n notify: () => consumerMarkDirty(node),\n run,\n cleanup: () => node.cleanupFn(),\n destroy: () => destroyWatchNode(node),\n [SIGNAL]: node\n };\n return node.ref;\n}\nconst NOOP_CLEANUP_FN = () => {};\n// Note: Using an IIFE here to ensure that the spread assignment is not considered\n// a side-effect, ending up preserving `COMPUTED_NODE` and `REACTIVE_NODE`.\n// TODO: remove when https://github.com/evanw/esbuild/issues/3392 is resolved.\nconst WATCH_NODE = /* @__PURE__ */(() => {\n return {\n ...REACTIVE_NODE,\n consumerIsAlwaysLive: true,\n consumerAllowSignalWrites: false,\n consumerMarkedDirty: node => {\n if (node.schedule !== null) {\n node.schedule(node.ref);\n }\n },\n hasRun: false,\n cleanupFn: NOOP_CLEANUP_FN\n };\n})();\nfunction setAlternateWeakRefImpl(impl) {\n // TODO: remove this function\n}\nexport { REACTIVE_NODE, SIGNAL, consumerAfterComputation, consumerBeforeComputation, consumerDestroy, consumerPollProducersForChange, createComputed, createSignal, createWatch, defaultEquals, getActiveConsumer, isInNotificationPhase, isReactive, producerAccessed, producerNotifyConsumers, producerUpdateValueVersion, producerUpdatesAllowed, setActiveConsumer, setAlternateWeakRefImpl, setPostSignalSetFn, setThrowInvalidWriteToSignalError, signalMutateFn, signalSetFn, signalUpdateFn };\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n","export function createErrorClass(createImpl) {\n const _super = instance => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass(_super => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}` : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const {\n _parentage\n } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n } else {\n _parentage.remove(this);\n }\n }\n const {\n initialTeardown: initialFinalizer\n } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n } catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const {\n _finalizers\n } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n } catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n } else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n } else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const {\n _parentage\n } = this;\n return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);\n }\n _addParent(parent) {\n const {\n _parentage\n } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const {\n _parentage\n } = this;\n if (_parentage === parent) {\n this._parentage = null;\n } else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const {\n _finalizers\n } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return value instanceof Subscription || value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n } else {\n finalizer.unsubscribe();\n }\n}\n","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false\n};\n","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const {\n delegate\n } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const {\n delegate\n } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined\n};\n","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const {\n onUnhandledError\n } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n } else {\n throw err;\n }\n });\n}\n","export function noop() {}\n","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error\n };\n}\n","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = {\n errorThrown: false,\n error: null\n };\n }\n cb();\n if (isRoot) {\n const {\n errorThrown,\n error\n } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n } else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n } else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n } else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n } else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n } else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n } finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n } finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const {\n partialObserver\n } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const {\n partialObserver\n } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n } catch (error) {\n handleUnhandledError(error);\n }\n } else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const {\n partialObserver\n } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n } catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined\n };\n } else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context)\n };\n } else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n } else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const {\n onStoppedNotification\n } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop\n};\n","export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n","export function identity(x) {\n return x;\n}\n","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport let Observable = /*#__PURE__*/(() => {\n class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const {\n operator,\n source\n } = this;\n subscriber.add(operator ? operator.call(subscriber, source) : source ? this._subscribe(subscriber) : this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n } catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: value => {\n try {\n next(value);\n } catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe(x => value = x, err => reject(err), () => resolve(value));\n });\n }\n }\n Observable.create = subscribe => {\n return new Observable(subscribe);\n };\n return Observable;\n})();\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);\n}\n","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return source => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n } catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext ? function (value) {\n try {\n onNext(value);\n } catch (err) {\n destination.error(err);\n }\n } : super._next;\n this._error = onError ? function (err) {\n try {\n onError(err);\n } catch (err) {\n destination.error(err);\n } finally {\n this.unsubscribe();\n }\n } : super._error;\n this._complete = onComplete ? function () {\n try {\n onComplete();\n } catch (err) {\n destination.error(err);\n } finally {\n this.unsubscribe();\n }\n } : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const {\n closed\n } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function refCount() {\n return operate((source, subscriber) => {\n let connection = null;\n source._refCount++;\n const refCounter = createOperatorSubscriber(subscriber, undefined, undefined, undefined, () => {\n if (!source || source._refCount <= 0 || 0 < --source._refCount) {\n connection = null;\n return;\n }\n const sharedConnection = source._connection;\n const conn = connection;\n connection = null;\n if (sharedConnection && (!conn || sharedConnection === conn)) {\n sharedConnection.unsubscribe();\n }\n subscriber.unsubscribe();\n });\n source.subscribe(refCounter);\n if (!refCounter.closed) {\n connection = source.connect();\n }\n });\n}\n","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { hasLift } from '../util/lift';\nexport class ConnectableObservable extends Observable {\n constructor(source, subjectFactory) {\n super();\n this.source = source;\n this.subjectFactory = subjectFactory;\n this._subject = null;\n this._refCount = 0;\n this._connection = null;\n if (hasLift(source)) {\n this.lift = source.lift;\n }\n }\n _subscribe(subscriber) {\n return this.getSubject().subscribe(subscriber);\n }\n getSubject() {\n const subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n }\n _teardown() {\n this._refCount = 0;\n const {\n _connection\n } = this;\n this._subject = this._connection = null;\n _connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();\n }\n connect() {\n let connection = this._connection;\n if (!connection) {\n connection = this._connection = new Subscription();\n const subject = this.getSubject();\n connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {\n this._teardown();\n subject.complete();\n }, err => {\n this._teardown();\n subject.error(err);\n }, () => this._teardown())));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n }\n refCount() {\n return higherOrderRefCount()(this);\n }\n}\n","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass(_super => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport let Subject = /*#__PURE__*/(() => {\n class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const {\n observers\n } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const {\n observers\n } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const {\n hasError,\n isStopped,\n observers\n } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const {\n hasError,\n thrownError,\n isStopped\n } = this;\n if (hasError) {\n subscriber.error(thrownError);\n } else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n }\n Subject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n})();\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n","import { Subject } from './Subject';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n get value() {\n return this.getValue();\n }\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n !subscription.closed && subscriber.next(this._value);\n return subscription;\n }\n getValue() {\n const {\n hasError,\n thrownError,\n _value\n } = this;\n if (hasError) {\n throw thrownError;\n }\n this._throwIfClosed();\n return _value;\n }\n next(value) {\n super.next(this._value = value);\n }\n}\n","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined\n};\n","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const {\n isStopped,\n _buffer,\n _infiniteTimeWindow,\n _timestampProvider,\n _windowTime\n } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const {\n _infiniteTimeWindow,\n _buffer\n } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const {\n _bufferSize,\n _timestampProvider,\n _buffer,\n _infiniteTimeWindow\n } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const {\n delegate\n } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const {\n delegate\n } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined\n};\n","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n } else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n } catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const {\n id,\n scheduler\n } = this;\n const {\n actions\n } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const {\n actions\n } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift());\n this._active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n","import { Observable } from '../Observable';\nexport const EMPTY = new Observable(subscriber => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(subscriber => scheduler.schedule(() => subscriber.complete()));\n}\n","import { isFunction } from './isFunction';\nexport function isScheduler(value) {\n return value && isFunction(value.schedule);\n}\n","import { isFunction } from './isFunction';\nimport { isScheduler } from './isScheduler';\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexport function popResultSelector(args) {\n return isFunction(last(args)) ? args.pop() : undefined;\n}\nexport function popScheduler(args) {\n return isScheduler(last(args)) ? args.pop() : undefined;\n}\nexport function popNumber(args, defaultValue) {\n return typeof last(args) === 'number' ? args.pop() : defaultValue;\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n};\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nexport var __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) {\n if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\");\n return f;\n }\n var kind = contextIn.kind,\n key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _,\n done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) {\n if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\");\n extraInitializers.push(accept(f || null));\n };\n var result = (0, decorators[i])(kind === \"accessor\" ? {\n get: descriptor.get,\n set: descriptor.set\n } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n } else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n}\n;\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n}\n;\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n}\n;\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", {\n configurable: true,\n value: prefix ? \"\".concat(prefix, \" \", name) : name\n });\n}\n;\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function () {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport var __createBinding = Object.create ? function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\n }\n Object.defineProperty(o, k2, desc);\n} : function (o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n};\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: false\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nvar __setModuleDefault = Object.create ? function (o, v) {\n Object.defineProperty(o, \"default\", {\n enumerable: true,\n value: v\n });\n} : function (o, v) {\n o[\"default\"] = v;\n};\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;\n}\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || typeof receiver !== \"object\" && typeof receiver !== \"function\") throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({\n value: value,\n dispose: dispose,\n async: async\n });\n } else if (async) {\n env.stack.push({\n async: true\n });\n }\n return value;\n}\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function (e) {\n fail(e);\n return next();\n });\n } catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources\n};","export const isArrayLike = x => x && typeof x.length === 'number' && typeof x !== 'function';\n","import { isFunction } from \"./isFunction\";\nexport function isPromise(value) {\n return isFunction(value === null || value === void 0 ? void 0 : value.then);\n}\n","import { observable as Symbol_observable } from '../symbol/observable';\nimport { isFunction } from './isFunction';\nexport function isInteropObservable(input) {\n return isFunction(input[Symbol_observable]);\n}\n","import { isFunction } from './isFunction';\nexport function isAsyncIterable(obj) {\n return Symbol.asyncIterator && isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]);\n}\n","export function createInvalidObservableTypeError(input) {\n return new TypeError(`You provided ${input !== null && typeof input === 'object' ? 'an invalid object' : `'${input}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`);\n}\n","export function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\n","import { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from './isFunction';\nexport function isIterable(input) {\n return isFunction(input === null || input === void 0 ? void 0 : input[Symbol_iterator]);\n}\n","import { __asyncGenerator, __await } from \"tslib\";\nimport { isFunction } from './isFunction';\nexport function readableStreamLikeToAsyncGenerator(readableStream) {\n return __asyncGenerator(this, arguments, function* readableStreamLikeToAsyncGenerator_1() {\n const reader = readableStream.getReader();\n try {\n while (true) {\n const {\n value,\n done\n } = yield __await(reader.read());\n if (done) {\n return yield __await(void 0);\n }\n yield yield __await(value);\n }\n } finally {\n reader.releaseLock();\n }\n });\n}\nexport function isReadableStreamLike(obj) {\n return isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader);\n}\n","import { __asyncValues, __awaiter } from \"tslib\";\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isPromise } from '../util/isPromise';\nimport { Observable } from '../Observable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isIterable } from '../util/isIterable';\nimport { isReadableStreamLike, readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nimport { isFunction } from '../util/isFunction';\nimport { reportUnhandledError } from '../util/reportUnhandledError';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function innerFrom(input) {\n if (input instanceof Observable) {\n return input;\n }\n if (input != null) {\n if (isInteropObservable(input)) {\n return fromInteropObservable(input);\n }\n if (isArrayLike(input)) {\n return fromArrayLike(input);\n }\n if (isPromise(input)) {\n return fromPromise(input);\n }\n if (isAsyncIterable(input)) {\n return fromAsyncIterable(input);\n }\n if (isIterable(input)) {\n return fromIterable(input);\n }\n if (isReadableStreamLike(input)) {\n return fromReadableStreamLike(input);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\nexport function fromInteropObservable(obj) {\n return new Observable(subscriber => {\n const obs = obj[Symbol_observable]();\n if (isFunction(obs.subscribe)) {\n return obs.subscribe(subscriber);\n }\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n });\n}\nexport function fromArrayLike(array) {\n return new Observable(subscriber => {\n for (let i = 0; i < array.length && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n });\n}\nexport function fromPromise(promise) {\n return new Observable(subscriber => {\n promise.then(value => {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, err => subscriber.error(err)).then(null, reportUnhandledError);\n });\n}\nexport function fromIterable(iterable) {\n return new Observable(subscriber => {\n for (const value of iterable) {\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n subscriber.complete();\n });\n}\nexport function fromAsyncIterable(asyncIterable) {\n return new Observable(subscriber => {\n process(asyncIterable, subscriber).catch(err => subscriber.error(err));\n });\n}\nexport function fromReadableStreamLike(readableStream) {\n return fromAsyncIterable(readableStreamLikeToAsyncGenerator(readableStream));\n}\nfunction process(asyncIterable, subscriber) {\n var asyncIterable_1, asyncIterable_1_1;\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n for (asyncIterable_1 = __asyncValues(asyncIterable); asyncIterable_1_1 = yield asyncIterable_1.next(), !asyncIterable_1_1.done;) {\n const value = asyncIterable_1_1.value;\n subscriber.next(value);\n if (subscriber.closed) {\n return;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (asyncIterable_1_1 && !asyncIterable_1_1.done && (_a = asyncIterable_1.return)) yield _a.call(asyncIterable_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n subscriber.complete();\n });\n}\n","export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) {\n const scheduleSubscription = scheduler.schedule(function () {\n work();\n if (repeat) {\n parentSubscription.add(this.schedule(null, delay));\n } else {\n this.unsubscribe();\n }\n }, delay);\n parentSubscription.add(scheduleSubscription);\n if (!repeat) {\n return scheduleSubscription;\n }\n}\n","import { executeSchedule } from '../util/executeSchedule';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function observeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, value => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), err => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));\n });\n}\n","import { operate } from '../util/lift';\nexport function subscribeOn(scheduler, delay = 0) {\n return operate((source, subscriber) => {\n subscriber.add(scheduler.schedule(() => source.subscribe(subscriber), delay));\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function scheduleObservable(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { observeOn } from '../operators/observeOn';\nimport { subscribeOn } from '../operators/subscribeOn';\nexport function schedulePromise(input, scheduler) {\n return innerFrom(input).pipe(subscribeOn(scheduler), observeOn(scheduler));\n}\n","import { Observable } from '../Observable';\nexport function scheduleArray(input, scheduler) {\n return new Observable(subscriber => {\n let i = 0;\n return scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n } else {\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n this.schedule();\n }\n }\n });\n });\n}\n","import { Observable } from '../Observable';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { isFunction } from '../util/isFunction';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleIterable(input, scheduler) {\n return new Observable(subscriber => {\n let iterator;\n executeSchedule(subscriber, scheduler, () => {\n iterator = input[Symbol_iterator]();\n executeSchedule(subscriber, scheduler, () => {\n let value;\n let done;\n try {\n ({\n value,\n done\n } = iterator.next());\n } catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n } else {\n subscriber.next(value);\n }\n }, 0, true);\n });\n return () => isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();\n });\n}\n","import { Observable } from '../Observable';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function scheduleAsyncIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(subscriber => {\n executeSchedule(subscriber, scheduler, () => {\n const iterator = input[Symbol.asyncIterator]();\n executeSchedule(subscriber, scheduler, () => {\n iterator.next().then(result => {\n if (result.done) {\n subscriber.complete();\n } else {\n subscriber.next(result.value);\n }\n });\n }, 0, true);\n });\n });\n}\n","import { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { readableStreamLikeToAsyncGenerator } from '../util/isReadableStreamLike';\nexport function scheduleReadableStreamLike(input, scheduler) {\n return scheduleAsyncIterable(readableStreamLikeToAsyncGenerator(input), scheduler);\n}\n","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { scheduleAsyncIterable } from './scheduleAsyncIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nimport { isAsyncIterable } from '../util/isAsyncIterable';\nimport { createInvalidObservableTypeError } from '../util/throwUnobservableError';\nimport { isReadableStreamLike } from '../util/isReadableStreamLike';\nimport { scheduleReadableStreamLike } from './scheduleReadableStreamLike';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n if (isAsyncIterable(input)) {\n return scheduleAsyncIterable(input, scheduler);\n }\n if (isIterable(input)) {\n return scheduleIterable(input, scheduler);\n }\n if (isReadableStreamLike(input)) {\n return scheduleReadableStreamLike(input, scheduler);\n }\n }\n throw createInvalidObservableTypeError(input);\n}\n","import { scheduled } from '../scheduled/scheduled';\nimport { innerFrom } from './innerFrom';\nexport function from(input, scheduler) {\n return scheduler ? scheduled(input, scheduler) : innerFrom(input);\n}\n","import { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function of(...args) {\n const scheduler = popScheduler(args);\n return from(args, scheduler);\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from '../util/isFunction';\nexport function throwError(errorOrErrorFactory, scheduler) {\n const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;\n const init = subscriber => subscriber.error(errorFactory());\n return new Observable(scheduler ? subscriber => scheduler.schedule(init, 0, subscriber) : init);\n}\n","import { Observable } from '../Observable';\nimport { isFunction } from './isFunction';\nexport function isObservable(obj) {\n return !!obj && (obj instanceof Observable || isFunction(obj.lift) && isFunction(obj.subscribe));\n}\n","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass(_super => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n","import { map } from \"../operators/map\";\nconst {\n isArray\n} = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n","const {\n isArray\n} = Array;\nconst {\n getPrototypeOf,\n prototype: objectProto,\n keys: getKeys\n} = Object;\nexport function argsArgArrayOrObject(args) {\n if (args.length === 1) {\n const first = args[0];\n if (isArray(first)) {\n return {\n args: first,\n keys: null\n };\n }\n if (isPOJO(first)) {\n const keys = getKeys(first);\n return {\n args: keys.map(key => first[key]),\n keys\n };\n }\n }\n return {\n args: args,\n keys: null\n };\n}\nfunction isPOJO(obj) {\n return obj && typeof obj === 'object' && getPrototypeOf(obj) === objectProto;\n}\n","export function createObject(keys, values) {\n return keys.reduce((result, key, i) => (result[key] = values[i], result), {});\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { from } from './from';\nimport { identity } from '../util/identity';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { popResultSelector, popScheduler } from '../util/args';\nimport { createObject } from '../util/createObject';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { executeSchedule } from '../util/executeSchedule';\nexport function combineLatest(...args) {\n const scheduler = popScheduler(args);\n const resultSelector = popResultSelector(args);\n const {\n args: observables,\n keys\n } = argsArgArrayOrObject(args);\n if (observables.length === 0) {\n return from([], scheduler);\n }\n const result = new Observable(combineLatestInit(observables, scheduler, keys ? values => createObject(keys, values) : identity));\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\nexport function combineLatestInit(observables, scheduler, valueTransform = identity) {\n return subscriber => {\n maybeSchedule(scheduler, () => {\n const {\n length\n } = observables;\n const values = new Array(length);\n let active = length;\n let remainingFirstValues = length;\n for (let i = 0; i < length; i++) {\n maybeSchedule(scheduler, () => {\n const source = from(observables[i], scheduler);\n let hasFirstValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n values[i] = value;\n if (!hasFirstValue) {\n hasFirstValue = true;\n remainingFirstValues--;\n }\n if (!remainingFirstValues) {\n subscriber.next(valueTransform(values.slice()));\n }\n }, () => {\n if (! --active) {\n subscriber.complete();\n }\n }));\n }, subscriber);\n }\n }, subscriber);\n };\n}\nfunction maybeSchedule(scheduler, execute, subscription) {\n if (scheduler) {\n executeSchedule(subscription, scheduler, execute);\n } else {\n execute();\n }\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = value => active < concurrent ? doInnerSub(value) : buffer.push(value);\n const doInnerSub = value => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, innerValue => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n } else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n } else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n } catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n } else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nexport function defer(observableFactory) {\n return new Observable(subscriber => {\n innerFrom(observableFactory()).subscribe(subscriber);\n });\n}\n","import { Observable } from '../Observable';\nimport { argsArgArrayOrObject } from '../util/argsArgArrayOrObject';\nimport { innerFrom } from './innerFrom';\nimport { popResultSelector } from '../util/args';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nimport { createObject } from '../util/createObject';\nexport function forkJoin(...args) {\n const resultSelector = popResultSelector(args);\n const {\n args: sources,\n keys\n } = argsArgArrayOrObject(args);\n const result = new Observable(subscriber => {\n const {\n length\n } = sources;\n if (!length) {\n subscriber.complete();\n return;\n }\n const values = new Array(length);\n let remainingCompletions = length;\n let remainingEmissions = length;\n for (let sourceIndex = 0; sourceIndex < length; sourceIndex++) {\n let hasValue = false;\n innerFrom(sources[sourceIndex]).subscribe(createOperatorSubscriber(subscriber, value => {\n if (!hasValue) {\n hasValue = true;\n remainingEmissions--;\n }\n values[sourceIndex] = value;\n }, () => remainingCompletions--, undefined, () => {\n if (!remainingCompletions || !hasValue) {\n if (!remainingEmissions) {\n subscriber.next(keys ? createObject(keys, values) : values);\n }\n subscriber.complete();\n }\n }));\n }\n });\n return resultSelector ? result.pipe(mapOneOrManyArgs(resultSelector)) : result;\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target) ? eventTargetMethods.map(methodName => handler => target[methodName](eventName, handler, options)) : isNodeStyleEventEmitter(target) ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName)) : isJQueryStyleEventEmitter(target) ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName)) : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap(subTarget => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable(subscriber => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return methodName => handler => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n } else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable(subscriber => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n } else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length ? EMPTY : sources.length === 1 ? innerFrom(sources[0]) : mergeAll(concurrent)(from(sources, scheduler));\n}\n","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport const NEVER = new Observable(noop);\nexport function never() {\n return NEVER;\n}\n","const {\n isArray\n} = Array;\nexport function argsOrArgArray(args) {\n return args.length === 1 && isArray(args[0]) ? args[0] : args;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n","import { Observable } from '../Observable';\nimport { innerFrom } from './innerFrom';\nimport { argsOrArgArray } from '../util/argsOrArgArray';\nimport { createOperatorSubscriber } from '../operators/OperatorSubscriber';\nexport function race(...sources) {\n sources = argsOrArgArray(sources);\n return sources.length === 1 ? innerFrom(sources[0]) : new Observable(raceInit(sources));\n}\nexport function raceInit(sources) {\n return subscriber => {\n let subscriptions = [];\n for (let i = 0; subscriptions && !subscriber.closed && i < sources.length; i++) {\n subscriptions.push(innerFrom(sources[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n if (subscriptions) {\n for (let s = 0; s < subscriptions.length; s++) {\n s !== i && subscriptions[s].unsubscribe();\n }\n subscriptions = null;\n }\n subscriber.next(value);\n })));\n }\n };\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, err => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n } else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const i = index++;\n state = hasState ? accumulator(state, value, i) : (hasState = true, value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete && (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n","import { mergeMap } from './mergeMap';\nimport { isFunction } from '../util/isFunction';\nexport function concatMap(project, resultSelector) {\n return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);\n}\n","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return source => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n subscriber.next(value);\n }, () => hasValue ? subscriber.complete() : subscriber.error(errorFactory())));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n","import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...values) {\n return source => concat(source, of(...values));\n}\n","import { operate } from '../util/lift';\nexport function finalize(callback) {\n return operate((source, subscriber) => {\n try {\n source.subscribe(subscriber);\n } finally {\n subscriber.add(callback);\n }\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeLast(count) {\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let buffer = [];\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n buffer.push(value);\n count < buffer.length && buffer.shift();\n }, () => {\n for (const value of buffer) {\n subscriber.next(value);\n }\n subscriber.complete();\n }, undefined, () => {\n buffer = null;\n }));\n });\n}\n","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return source => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { timer } from '../observable/timer';\nexport function repeat(countOrConfig) {\n let count = Infinity;\n let delay;\n if (countOrConfig != null) {\n if (typeof countOrConfig === 'object') {\n ({\n count = Infinity,\n delay\n } = countOrConfig);\n } else {\n count = countOrConfig;\n }\n }\n return count <= 0 ? () => EMPTY : operate((source, subscriber) => {\n let soFar = 0;\n let sourceSub;\n const resubscribe = () => {\n sourceSub === null || sourceSub === void 0 ? void 0 : sourceSub.unsubscribe();\n sourceSub = null;\n if (delay != null) {\n const notifier = typeof delay === 'number' ? timer(delay) : innerFrom(delay(soFar));\n const notifierSubscriber = createOperatorSubscriber(subscriber, () => {\n notifierSubscriber.unsubscribe();\n subscribeToSource();\n });\n notifier.subscribe(notifierSubscriber);\n } else {\n subscribeToSource();\n }\n };\n const subscribeToSource = () => {\n let syncUnsub = false;\n sourceSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n if (++soFar < count) {\n if (sourceSub) {\n resubscribe();\n } else {\n syncUnsub = true;\n }\n } else {\n subscriber.complete();\n }\n }));\n if (syncUnsub) {\n resubscribe();\n }\n };\n subscribeToSource();\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function repeatWhen(notifier) {\n return operate((source, subscriber) => {\n let innerSub;\n let syncResub = false;\n let completions$;\n let isNotifierComplete = false;\n let isMainComplete = false;\n const checkComplete = () => isMainComplete && isNotifierComplete && (subscriber.complete(), true);\n const getCompletionSubject = () => {\n if (!completions$) {\n completions$ = new Subject();\n innerFrom(notifier(completions$)).subscribe(createOperatorSubscriber(subscriber, () => {\n if (innerSub) {\n subscribeForRepeatWhen();\n } else {\n syncResub = true;\n }\n }, () => {\n isNotifierComplete = true;\n checkComplete();\n }));\n }\n return completions$;\n };\n const subscribeForRepeatWhen = () => {\n isMainComplete = false;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, () => {\n isMainComplete = true;\n !checkComplete() && getCompletionSubject().next();\n }));\n if (syncResub) {\n innerSub.unsubscribe();\n innerSub = null;\n syncResub = false;\n subscribeForRepeatWhen();\n }\n };\n subscribeForRepeatWhen();\n });\n}\n","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const {\n connector = () => new Subject(),\n resetOnError = true,\n resetOnComplete = true,\n resetOnRefCountZero = true\n } = options;\n return wrapperSource => {\n let connection;\n let resetConnection;\n let subject;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = subject = subject !== null && subject !== void 0 ? subject : connector();\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection && refCount > 0) {\n connection = new SafeSubscriber({\n next: value => dest.next(value),\n error: err => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n }\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n }\n });\n return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let bufferSize;\n let refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n ({\n bufferSize = Infinity,\n windowTime = Infinity,\n refCount = false,\n scheduler\n } = configOrBufferSize);\n } else {\n bufferSize = configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity;\n }\n return share({\n connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount\n });\n}\n","import { filter } from './filter';\nexport function skip(count) {\n return filter((_, index) => count <= index);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function skipWhile(predicate) {\n return operate((source, subscriber) => {\n let taking = false;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => (taking || (taking = !predicate(value, index++))) && subscriber.next(value)));\n });\n}\n","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe(innerSubscriber = createOperatorSubscriber(subscriber, innerValue => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n }));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete ? {\n next: observerOrNext,\n error,\n complete\n } : observerOrNext;\n return tapObserver ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, err => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n }) : identity;\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function throttle(durationSelector, config) {\n return operate((source, subscriber) => {\n const {\n leading = true,\n trailing = false\n } = config !== null && config !== void 0 ? config : {};\n let hasValue = false;\n let sendValue = null;\n let throttled = null;\n let isComplete = false;\n const endThrottling = () => {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n const cleanupThrottling = () => {\n throttled = null;\n isComplete && subscriber.complete();\n };\n const startThrottle = value => throttled = innerFrom(durationSelector(value)).subscribe(createOperatorSubscriber(subscriber, endThrottling, cleanupThrottling));\n const send = () => {\n if (hasValue) {\n hasValue = false;\n const value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, () => {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n}\n","import { asyncScheduler } from '../scheduler/async';\nimport { throttle } from './throttle';\nimport { timer } from '../observable/timer';\nexport function throttleTime(duration, scheduler = asyncScheduler, config) {\n const duration$ = timer(duration, scheduler);\n return throttle(() => duration$, config);\n}\n","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { identity } from '../util/identity';\nimport { noop } from '../util/noop';\nimport { popResultSelector } from '../util/args';\nexport function withLatestFrom(...inputs) {\n const project = popResultSelector(inputs);\n return operate((source, subscriber) => {\n const len = inputs.length;\n const otherValues = new Array(len);\n let hasValue = inputs.map(() => false);\n let ready = false;\n for (let i = 0; i < len; i++) {\n innerFrom(inputs[i]).subscribe(createOperatorSubscriber(subscriber, value => {\n otherValues[i] = value;\n if (!ready && !hasValue[i]) {\n hasValue[i] = true;\n (ready = hasValue.every(identity)) && (hasValue = null);\n }\n }, noop));\n }\n source.subscribe(createOperatorSubscriber(subscriber, value => {\n if (ready) {\n const values = [value, ...otherValues];\n subscriber.next(project ? project(...values) : values);\n }\n }));\n });\n}\n","/**\n * @license Angular v17.0.5\n * (c) 2010-2022 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { setActiveConsumer as setActiveConsumer$1, consumerDestroy as consumerDestroy$1, SIGNAL as SIGNAL$1, createComputed as createComputed$1, createSignal as createSignal$1, signalSetFn as signalSetFn$1, signalUpdateFn as signalUpdateFn$1, REACTIVE_NODE as REACTIVE_NODE$1, consumerBeforeComputation as consumerBeforeComputation$1, consumerAfterComputation as consumerAfterComputation$1, consumerPollProducersForChange as consumerPollProducersForChange$1, getActiveConsumer as getActiveConsumer$1, createWatch as createWatch$1, setThrowInvalidWriteToSignalError as setThrowInvalidWriteToSignalError$1 } from '@angular/core/primitives/signals';\nimport { Subject, Subscription, Observable, merge as merge$1, BehaviorSubject, of } from 'rxjs';\nimport { share, switchMap, distinctUntilChanged, first } from 'rxjs/operators';\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n for (let key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (Array.isArray(token)) {\n return '[' + token.map(stringify).join(', ') + ']';\n }\n if (token == null) {\n return '' + token;\n }\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n if (token.name) {\n return `${token.name}`;\n }\n const res = token.toString();\n if (res == null) {\n return '' + res;\n }\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n return before == null || before === '' ? after === null ? '' : after : after == null || after === '' ? before : before + ' ' + after;\n}\n/**\n * Ellipses the string in the middle when longer than the max length\n *\n * @param string\n * @param maxLength of the output string\n * @returns elispsed string with ... in the middle\n */\nfunction truncateMiddle(str, maxLength = 100) {\n if (!str || maxLength < 1 || str.length <= maxLength) return str;\n if (maxLength == 1) return str.substring(0, 1) + '...';\n const halfLimit = Math.round(maxLength / 2);\n return str.substring(0, halfLimit) + '...' + str.substring(str.length - halfLimit);\n}\nconst __forward_ref__ = /*#__PURE__*/getClosureSafeProperty({\n __forward_ref__: getClosureSafeProperty\n});\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * `forwardRef` is also used to break circularities in standalone components imports.\n *\n * @usageNotes\n * ### Circular dependency example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n *\n * ### Circular standalone reference import example\n * ```ts\n * @Component({\n * standalone: true,\n * imports: [ChildComponent],\n * selector: 'app-parent',\n * template: ``,\n * })\n * export class ParentComponent {\n * @Input() hideParent: boolean;\n * }\n *\n *\n * @Component({\n * standalone: true,\n * imports: [CommonModule, forwardRef(() => ParentComponent)],\n * selector: 'app-child',\n * template: ``,\n * })\n * export class ChildComponent {\n * @Input() hideParent: boolean;\n * }\n * ```\n *\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () {\n return stringify(this());\n };\n return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see {@link forwardRef}\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) && fn.__forward_ref__ === forwardRef;\n}\nfunction isEnvironmentProviders(value) {\n return value && !!value.ɵproviders;\n}\n\n/**\n * Base URL for the error details page.\n *\n * Keep this constant in sync across:\n * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts\n * - packages/core/src/error_details_base_url.ts\n */\nconst ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';\n/**\n * URL for the XSS security documentation.\n */\nconst XSS_SECURITY_URL = 'https://g.co/ng/security#xss';\n\n/**\n * Class that represents a runtime error.\n * Formats and outputs the error message in a consistent way.\n *\n * Example:\n * ```\n * throw new RuntimeError(\n * RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED,\n * ngDevMode && 'Injector has already been destroyed.');\n * ```\n *\n * Note: the `message` argument contains a descriptive error message as a string in development\n * mode (when the `ngDevMode` is defined). In production mode (after tree-shaking pass), the\n * `message` argument becomes `false`, thus we account for it in the typings and the runtime\n * logic.\n */\nclass RuntimeError extends Error {\n constructor(code, message) {\n super(formatRuntimeError(code, message));\n this.code = code;\n }\n}\n/**\n * Called to format a runtime error.\n * See additional info on the `message` argument type in the `RuntimeError` class description.\n */\nfunction formatRuntimeError(code, message) {\n // Error code might be a negative number, which is a special marker that instructs the logic to\n // generate a link to the error details page on angular.io.\n // We also prepend `0` to non-compile-time errors.\n const fullCode = `NG0${Math.abs(code)}`;\n let errorMessage = `${fullCode}${message ? ': ' + message : ''}`;\n if (ngDevMode && code < 0) {\n const addPeriodSeparator = !errorMessage.match(/[.,;!?\\n]$/);\n const separator = addPeriodSeparator ? '.' : '';\n errorMessage = `${errorMessage}${separator} Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/${fullCode}`;\n }\n return errorMessage;\n}\nconst NG_COMP_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵcmp: getClosureSafeProperty\n});\nconst NG_DIR_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵdir: getClosureSafeProperty\n});\nconst NG_PIPE_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵpipe: getClosureSafeProperty\n});\nconst NG_MOD_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵmod: getClosureSafeProperty\n});\nconst NG_FACTORY_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵfac: getClosureSafeProperty\n});\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = /*#__PURE__*/getClosureSafeProperty({\n __NG_ELEMENT_ID__: getClosureSafeProperty\n});\n/**\n * The `NG_ENV_ID` field on a DI token indicates special processing in the `EnvironmentInjector`:\n * getting such tokens from the `EnvironmentInjector` will bypass the standard DI resolution\n * strategy and instead will return implementation produced by the `NG_ENV_ID` factory function.\n *\n * This particular retrieval of DI tokens is mostly done to eliminate circular dependencies and\n * improve tree-shaking.\n */\nconst NG_ENV_ID = /*#__PURE__*/getClosureSafeProperty({\n __NG_ENV_ID__: getClosureSafeProperty\n});\n\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n * Check `core/test/render3/perf/render_stringify` for benchmarks and alternate implementations.\n */\nfunction renderStringify(value) {\n if (typeof value === 'string') return value;\n if (value == null) return '';\n // Use `String` so that it invokes the `toString` method of the value. Note that this\n // appears to be faster than calling `value.toString` (see `render_stringify` benchmark).\n return String(value);\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n *\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n if (typeof value === 'function') return value.name || value.toString();\n if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n return value.type.name || value.type.toString();\n }\n return renderStringify(value);\n}\n/**\n * Used to stringify a `Type` and including the file path and line number in which it is defined, if\n * possible, for better debugging experience.\n *\n * Important! This function contains a megamorphic read and should only be used for error messages.\n */\nfunction debugStringifyTypeForError(type) {\n // TODO(pmvald): Do some refactoring so that we can use getComponentDef here without creating\n // circular deps.\n let componentDef = type[NG_COMP_DEF] || null;\n if (componentDef !== null && componentDef.debugInfo) {\n return stringifyTypeFromDebugInfo(componentDef.debugInfo);\n }\n return stringifyForError(type);\n}\n// TODO(pmvald): Do some refactoring so that we can use the type ClassDebugInfo for the param\n// debugInfo here without creating circular deps.\nfunction stringifyTypeFromDebugInfo(debugInfo) {\n if (!debugInfo.filePath || !debugInfo.lineNumber) {\n return debugInfo.className;\n } else {\n return `${debugInfo.className} (at ${debugInfo.filePath}:${debugInfo.lineNumber})`;\n }\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token, path) {\n const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';\n throw new RuntimeError(-200 /* RuntimeErrorCode.CYCLIC_DI_DEPENDENCY */, `Circular dependency in DI detected for ${token}${depPath}`);\n}\nfunction throwMixedMultiProviderError() {\n throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n if (ngModuleType && providers) {\n const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}' - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`);\n } else if (isEnvironmentProviders(provider)) {\n if (provider.ɵfromNgModule) {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers from 'importProvidersFrom' present in a non-environment injector. 'importProvidersFrom' can't be used for component providers.`);\n } else {\n throw new RuntimeError(207 /* RuntimeErrorCode.PROVIDER_IN_WRONG_CONTEXT */, `Invalid providers present in a non-environment injector. 'EnvironmentProviders' can't be used for component providers.`);\n }\n } else {\n throw new Error('Invalid provider');\n }\n}\n/** Throws an error when a token is not found in DI. */\nfunction throwProviderNotFoundError(token, injectorName) {\n const injectorDetails = injectorName ? ` in ${injectorName}` : '';\n throw new RuntimeError(-201 /* RuntimeErrorCode.PROVIDER_NOT_FOUND */, ngDevMode && `No provider for ${stringifyForError(token)} found${injectorDetails}`);\n}\n\n// The functions in this file verify that the assumptions we are making\nfunction assertNumber(actual, msg) {\n if (!(typeof actual === 'number')) {\n throwError(msg, typeof actual, 'number', '===');\n }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n assertNumber(actual, 'Expected a number');\n assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n if (!(typeof actual === 'string')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n }\n}\nfunction assertFunction(actual, msg) {\n if (!(typeof actual === 'function')) {\n throwError(msg, actual === null ? 'null' : typeof actual, 'function', '===');\n }\n}\nfunction assertEqual(actual, expected, msg) {\n if (!(actual == expected)) {\n throwError(msg, actual, expected, '==');\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (!(actual != expected)) {\n throwError(msg, actual, expected, '!=');\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (!(actual === expected)) {\n throwError(msg, actual, expected, '===');\n }\n}\nfunction assertNotSame(actual, expected, msg) {\n if (!(actual !== expected)) {\n throwError(msg, actual, expected, '!==');\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (!(actual < expected)) {\n throwError(msg, actual, expected, '<');\n }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n if (!(actual <= expected)) {\n throwError(msg, actual, expected, '<=');\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (!(actual > expected)) {\n throwError(msg, actual, expected, '>');\n }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n if (!(actual >= expected)) {\n throwError(msg, actual, expected, '>=');\n }\n}\nfunction assertNotDefined(actual, msg) {\n if (actual != null) {\n throwError(msg, actual, null, '==');\n }\n}\nfunction assertDefined(actual, msg) {\n if (actual == null) {\n throwError(msg, actual, null, '!=');\n }\n}\nfunction throwError(msg, actual, expected, comparison) {\n throw new Error(`ASSERTION ERROR: ${msg}` + (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n if (!(node instanceof Node)) {\n throwError(`The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n }\n}\nfunction assertElement(node) {\n if (!(node instanceof Element)) {\n throwError(`The provided value must be an element but got ${stringify(node)}`);\n }\n}\nfunction assertIndexInRange(arr, index) {\n assertDefined(arr, 'Array must be defined.');\n const maxLen = arr.length;\n if (index < 0 || index >= maxLen) {\n throwError(`Index expected to be less than ${maxLen} but got ${index}`);\n }\n}\nfunction assertOneOf(value, ...validValues) {\n if (validValues.indexOf(value) !== -1) return true;\n throwError(`Expected value to be one of ${JSON.stringify(validValues)} but was ${JSON.stringify(value)}.`);\n}\n\n/**\n * Construct an injectable definition which defines how a token will be constructed by the DI\n * system, and in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n * with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n * provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n * The factory can call [`inject`](api/core/inject) to access the `Injector` and request injection\n * of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n return {\n token: opts.token,\n providedIn: opts.providedIn || null,\n factory: opts.factory,\n value: undefined\n };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only by generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n * either have a factory or point to a type which has a `ɵprov` static property (the\n * type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n * whose providers will also be added to the injector. Locally provided types will override\n * providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n return {\n providers: options.providers || [],\n imports: options.imports || []\n };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n return getOwnDefinition(type, NG_PROV_DEF) || getOwnDefinition(type, NG_INJECTABLE_DEF);\n}\nfunction isInjectable(type) {\n return getInjectableDef(type) !== null;\n}\n/**\n * Return definition only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n */\nfunction getOwnDefinition(type, field) {\n return type.hasOwnProperty(field) ? type[field] : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n * scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n const def = type && (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF]);\n if (def) {\n ngDevMode && console.warn(`DEPRECATED: DI is instantiating a token \"${type.name}\" that inherits its @Injectable decorator but does not provide one itself.\\n` + `This will become an error in a future version of Angular. Please add @Injectable() to the \"${type.name}\" class.`);\n return def;\n } else {\n return null;\n }\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ? type[NG_INJ_DEF] : null;\n}\nconst NG_PROV_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵprov: getClosureSafeProperty\n});\nconst NG_INJ_DEF = /*#__PURE__*/getClosureSafeProperty({\n ɵinj: getClosureSafeProperty\n});\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectableDef: getClosureSafeProperty\n});\nconst NG_INJECTOR_DEF = /*#__PURE__*/getClosureSafeProperty({\n ngInjectorDef: getClosureSafeProperty\n});\n\n/**\n * Injection flags for DI.\n *\n * @publicApi\n * @deprecated use an options object for [`inject`](api/core/inject) instead.\n */\nvar InjectFlags = /*#__PURE__*/function (InjectFlags) {\n // TODO(alxhub): make this 'const' (and remove `InternalInjectFlags` enum) when ngc no longer\n // writes exports of it into ngfactory files.\n /** Check self and check parent injector if needed */\n InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n /**\n * Specifies that an injector should retrieve a dependency from any injector until reaching the\n * host element of the current component. (Only used with Element Injector)\n */\n InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n /** Don't ascend to ancestors of the node requesting injection. */\n InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n /** Skip the node that is requesting injection. */\n InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n /** Inject `defaultValue` instead if token not found. */\n InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n return InjectFlags;\n}(InjectFlags || {});\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n * 1. `Injector` should not depend on ivy logic.\n * 2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\nfunction getInjectImplementation() {\n return _injectImplementation;\n}\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n const previous = _injectImplementation;\n _injectImplementation = impl;\n return previous;\n}\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * injectable definition.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n const injectableDef = getInjectableDef(token);\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() : injectableDef.value;\n }\n if (flags & InjectFlags.Optional) return null;\n if (notFoundValue !== undefined) return notFoundValue;\n throwProviderNotFoundError(stringify(token), 'Injector');\n}\n/**\n * Assert that `_injectImplementation` is not `fn`.\n *\n * This is useful, to prevent infinite recursion.\n *\n * @param fn Function which it should not equal to\n */\nfunction assertInjectImplementationNotEqual(fn) {\n ngDevMode && assertNotEqual(_injectImplementation, fn, 'Calling ɵɵinject would cause infinite recursion');\n}\nconst _global = globalThis;\nfunction ngDevModeResetPerfCounters() {\n const locationString = typeof location !== 'undefined' ? location.toString() : '';\n const newCounters = {\n namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n firstCreatePass: 0,\n tNode: 0,\n tView: 0,\n rendererCreateTextNode: 0,\n rendererSetText: 0,\n rendererCreateElement: 0,\n rendererAddEventListener: 0,\n rendererSetAttribute: 0,\n rendererRemoveAttribute: 0,\n rendererSetProperty: 0,\n rendererSetClassName: 0,\n rendererAddClass: 0,\n rendererRemoveClass: 0,\n rendererSetStyle: 0,\n rendererRemoveStyle: 0,\n rendererDestroy: 0,\n rendererDestroyNode: 0,\n rendererMoveNode: 0,\n rendererRemoveNode: 0,\n rendererAppendChild: 0,\n rendererInsertBefore: 0,\n rendererCreateComment: 0,\n hydratedNodes: 0,\n hydratedComponents: 0,\n dehydratedViewsRemoved: 0,\n dehydratedViewsCleanupRuns: 0,\n componentsSkippedHydration: 0\n };\n // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n * get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n // reset the counters.\n // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n // yet.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (typeof ngDevMode !== 'object') {\n ngDevModeResetPerfCounters();\n }\n return typeof ngDevMode !== 'undefined' && !!ngDevMode;\n }\n return false;\n}\n\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides an additional level of type safety.\n *\n *
\n *\n * **Important Note**: Ensure that you use the same instance of the `InjectionToken` in both the\n * provider and the injection call. Creating a new instance of `InjectionToken` in different places,\n * even with the same description, will be treated as different tokens by Angular's DI system,\n * leading to a `NullInjectorError`.\n *\n *
\n *\n * \n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the [`inject`](api/core/inject) function.\n * As you can see in the Tree-shakable InjectionToken example below.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule` (note:\n * this option is now deprecated). As mentioned above, `'root'` is the default value for\n * `providedIn`.\n *\n * The `providedIn: NgModule` and `providedIn: 'any'` options are deprecated.\n *\n * @usageNotes\n * ### Basic Examples\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nclass InjectionToken {\n /**\n * @param _desc Description for the token,\n * used only for debugging purposes,\n * it should but does not need to be unique\n * @param options Options for the token's usage, as described above\n */\n constructor(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n this.ɵprov = undefined;\n if (typeof options == 'number') {\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertLessThan(options, 0, 'Only negative numbers are supported here');\n // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n // See `InjectorMarkers`\n this.__NG_ELEMENT_ID__ = options;\n } else if (options !== undefined) {\n this.ɵprov = ɵɵdefineInjectable({\n token: this,\n providedIn: options.providedIn || 'root',\n factory: options.factory\n });\n }\n }\n /**\n * @internal\n */\n get multi() {\n return this;\n }\n toString() {\n return `InjectionToken ${this._desc}`;\n }\n}\nlet _injectorProfilerContext;\nfunction getInjectorProfilerContext() {\n !ngDevMode && throwError('getInjectorProfilerContext should never be called in production mode');\n return _injectorProfilerContext;\n}\nfunction setInjectorProfilerContext(context) {\n !ngDevMode && throwError('setInjectorProfilerContext should never be called in production mode');\n const previous = _injectorProfilerContext;\n _injectorProfilerContext = context;\n return previous;\n}\nlet injectorProfilerCallback = null;\n/**\n * Sets the callback function which will be invoked during certain DI events within the\n * runtime (for example: injecting services, creating injectable instances, configuring providers)\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setInjectorProfiler = injectorProfiler => {\n !ngDevMode && throwError('setInjectorProfiler should never be called in production mode');\n injectorProfilerCallback = injectorProfiler;\n};\n/**\n * Injector profiler function which emits on DI events executed by the runtime.\n *\n * @param event InjectorProfilerEvent corresponding to the DI event being emitted\n */\nfunction injectorProfiler(event) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n if (injectorProfilerCallback != null /* both `null` and `undefined` */) {\n injectorProfilerCallback(event);\n }\n}\n/**\n * Emits an InjectorProfilerEventType.ProviderConfigured to the injector profiler. The data in the\n * emitted event includes the raw provider, as well as the token that provider is providing.\n *\n * @param eventProvider A provider object\n */\nfunction emitProviderConfiguredEvent(eventProvider, isViewProvider = false) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n let token;\n // if the provider is a TypeProvider (typeof provider is function) then the token is the\n // provider itself\n if (typeof eventProvider === 'function') {\n token = eventProvider;\n }\n // if the provider is an injection token, then the token is the injection token.\n else if (eventProvider instanceof InjectionToken) {\n token = eventProvider;\n }\n // in all other cases we can access the token via the `provide` property of the provider\n else {\n token = resolveForwardRef(eventProvider.provide);\n }\n let provider = eventProvider;\n // Injection tokens may define their own default provider which gets attached to the token itself\n // as `ɵprov`. In this case, we want to emit the provider that is attached to the token, not the\n // token itself.\n if (eventProvider instanceof InjectionToken) {\n provider = eventProvider.ɵprov || eventProvider;\n }\n injectorProfiler({\n type: 2 /* InjectorProfilerEventType.ProviderConfigured */,\n context: getInjectorProfilerContext(),\n providerRecord: {\n token,\n provider,\n isViewProvider\n }\n });\n}\n/**\n * Emits an event to the injector profiler with the instance that was created. Note that\n * the injector associated with this emission can be accessed by using getDebugInjectContext()\n *\n * @param instance an object created by an injector\n */\nfunction emitInstanceCreatedByInjectorEvent(instance) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 1 /* InjectorProfilerEventType.InstanceCreatedByInjector */,\n context: getInjectorProfilerContext(),\n instance: {\n value: instance\n }\n });\n}\n/**\n * @param token DI token associated with injected service\n * @param value the instance of the injected service (i.e the result of `inject(token)`)\n * @param flags the flags that the token was injected with\n */\nfunction emitInjectEvent(token, value, flags) {\n !ngDevMode && throwError('Injector profiler should never be called in production mode');\n injectorProfiler({\n type: 0 /* InjectorProfilerEventType.Inject */,\n context: getInjectorProfilerContext(),\n service: {\n token,\n value,\n flags\n }\n });\n}\nfunction runInInjectorProfilerContext(injector, token, callback) {\n !ngDevMode && throwError('runInInjectorProfilerContext should never be called in production mode');\n const prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n try {\n callback();\n } finally {\n setInjectorProfilerContext(prevInjectContext);\n }\n}\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n/*\n * Name of a property (that we patch onto DI decorator), which is used as an annotation of which\n * InjectFlag this decorator represents. This allows to avoid direct references to the DI decorators\n * in the code, thus making them tree-shakable.\n */\nconst DI_DECORATOR_FLAG = '__NG_DI_FLAG__';\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction getCurrentInjector() {\n return _currentInjector;\n}\nfunction setCurrentInjector(injector) {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n if (_currentInjector === undefined) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode && `inject() must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with \\`runInInjectionContext\\`.`);\n } else if (_currentInjector === null) {\n return injectRootLimpMode(token, undefined, flags);\n } else {\n const value = _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n ngDevMode && emitInjectEvent(token, value, flags);\n return value;\n }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n return (getInjectImplementation() || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n throw new RuntimeError(202 /* RuntimeErrorCode.INVALID_FACTORY_DEPENDENCY */, ngDevMode && `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.`);\n}\n/**\n * Injects a token from the currently active injector.\n * `inject` is only supported in an [injection context](/guide/dependency-injection-context). It can\n * be used during:\n * - Construction (via the `constructor`) of a class being instantiated by the DI system, such\n * as an `@Injectable` or `@Component`.\n * - In the initializer for fields of such classes.\n * - In the factory function specified for `useFactory` of a `Provider` or an `@Injectable`.\n * - In the `factory` function specified for an `InjectionToken`.\n * - In a stackframe of a function call in a DI context\n *\n * @param token A token that represents a dependency that should be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSelf`, and `@Optional`.\n * @returns the injected value if operation is successful, `null` otherwise.\n * @throws if called outside of a supported context.\n *\n * @usageNotes\n * In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a\n * field initializer:\n *\n * ```typescript\n * @Injectable({providedIn: 'root'})\n * export class Car {\n * radio: Radio|undefined;\n * // OK: field initializer\n * spareTyre = inject(Tyre);\n *\n * constructor() {\n * // OK: constructor body\n * this.radio = inject(Radio);\n * }\n * }\n * ```\n *\n * It is also legal to call `inject` from a provider's factory:\n *\n * ```typescript\n * providers: [\n * {provide: Car, useFactory: () => {\n * // OK: a class factory\n * const engine = inject(Engine);\n * return new Car(engine);\n * }}\n * ]\n * ```\n *\n * Calls to the `inject()` function outside of the class creation context will result in error. Most\n * notably, calls to `inject()` are disallowed after a class instance was created, in methods\n * (including lifecycle hooks):\n *\n * ```typescript\n * @Component({ ... })\n * export class CarComponent {\n * ngOnInit() {\n * // ERROR: too late, the component instance was already created\n * const engine = inject(Engine);\n * engine.start();\n * }\n * }\n * ```\n *\n * @publicApi\n */\nfunction inject(token, flags = InjectFlags.Default) {\n return ɵɵinject(token, convertToBitFlags(flags));\n}\n// Converts object-based DI flags (`InjectOptions`) to bit flags (`InjectFlags`).\nfunction convertToBitFlags(flags) {\n if (typeof flags === 'undefined' || typeof flags === 'number') {\n return flags;\n }\n // While TypeScript doesn't accept it without a cast, bitwise OR with false-y values in\n // JavaScript is a no-op. We can use that for a very codesize-efficient conversion from\n // `InjectOptions` to `InjectFlags`.\n return 0 /* InternalInjectFlags.Default */ | (\n // comment to force a line break in the formatter\n flags.optional && 8 /* InternalInjectFlags.Optional */) | (flags.host && 1 /* InternalInjectFlags.Host */) | (flags.self && 2 /* InternalInjectFlags.Self */) | (flags.skipSelf && 4 /* InternalInjectFlags.SkipSelf */);\n}\n\nfunction injectArgs(types) {\n const args = [];\n for (let i = 0; i < types.length; i++) {\n const arg = resolveForwardRef(types[i]);\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new RuntimeError(900 /* RuntimeErrorCode.INVALID_DIFFER_INPUT */, ngDevMode && 'Arguments array must have arguments.');\n }\n let type = undefined;\n let flags = InjectFlags.Default;\n for (let j = 0; j < arg.length; j++) {\n const meta = arg[j];\n const flag = getInjectFlag(meta);\n if (typeof flag === 'number') {\n // Special case when we handle @Inject decorator.\n if (flag === -1 /* DecoratorFlags.Inject */) {\n type = meta.token;\n } else {\n flags |= flag;\n }\n } else {\n type = meta;\n }\n }\n args.push(ɵɵinject(type, flags));\n } else {\n args.push(ɵɵinject(arg));\n }\n }\n return args;\n}\n/**\n * Attaches a given InjectFlag to a given decorator using monkey-patching.\n * Since DI decorators can be used in providers `deps` array (when provider is configured using\n * `useFactory`) without initialization (e.g. `Host`) and as an instance (e.g. `new Host()`), we\n * attach the flag to make it available both as a static property and as a field on decorator\n * instance.\n *\n * @param decorator Provided DI decorator.\n * @param flag InjectFlag that should be applied.\n */\nfunction attachInjectFlag(decorator, flag) {\n decorator[DI_DECORATOR_FLAG] = flag;\n decorator.prototype[DI_DECORATOR_FLAG] = flag;\n return decorator;\n}\n/**\n * Reads monkey-patched property that contains InjectFlag attached to a decorator.\n *\n * @param token Token that may contain monkey-patched DI flags property.\n */\nfunction getInjectFlag(token) {\n return token[DI_DECORATOR_FLAG];\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n const tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.slice(2) : text;\n let context = stringify(obj);\n if (Array.isArray(obj)) {\n context = obj.map(stringify).join(' -> ');\n } else if (typeof obj === 'object') {\n let parts = [];\n for (let key in obj) {\n if (obj.hasOwnProperty(key)) {\n let value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = `{${parts.join(', ')}}`;\n }\n return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n ')}`;\n}\n\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n return {\n toString: fn\n }.toString();\n}\n\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy = /*#__PURE__*/function (ChangeDetectionStrategy) {\n /**\n * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n * Change detection can still be explicitly invoked.\n * This strategy applies to all child directives and cannot be overridden.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * Use the default `CheckAlways` strategy, in which change detection is automatic until\n * explicitly deactivated.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n return ChangeDetectionStrategy;\n}(ChangeDetectionStrategy || {});\n/**\n * Defines the CSS styles encapsulation policies for the {@link Component} decorator's\n * `encapsulation` option.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1 = /*#__PURE__*/function (ViewEncapsulation) {\n // TODO: consider making `ViewEncapsulation` a `const enum` instead. See\n // https://github.com/angular/angular/issues/44119 for additional information.\n /**\n * Emulates a native Shadow DOM encapsulation behavior by adding a specific attribute to the\n * component's host element and applying the same attribute to all the CSS selectors provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls}.\n *\n * This is the default option.\n */\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n /**\n * Doesn't provide any sort of CSS style encapsulation, meaning that all the styles provided\n * via {@link Component#styles styles} or {@link Component#styleUrls styleUrls} are applicable\n * to any HTML element of the application regardless of their host Component.\n */\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n /**\n * Uses the browser's native Shadow DOM API to encapsulate CSS styles, meaning that it creates\n * a ShadowRoot for the component's host element which is then used to encapsulate\n * all the Component's styling.\n */\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n return ViewEncapsulation;\n}(ViewEncapsulation$1 || {});\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && /*#__PURE__*/initNgDevMode()) {\n // These property accesses can be ignored because ngDevMode will be set to false\n // when optimizing code and the whole if statement will be dropped.\n // tslint:disable-next-line:no-toplevel-property-access\n /*#__PURE__*/Object.freeze(EMPTY_OBJ);\n // tslint:disable-next-line:no-toplevel-property-access\n /*#__PURE__*/Object.freeze(EMPTY_ARRAY);\n}\n\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n let end = className.length;\n while (true) {\n const foundIndex = className.indexOf(classToSearch, startingIndex);\n if (foundIndex === -1) return foundIndex;\n if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has leading whitespace\n const length = classToSearch.length;\n if (foundIndex + length === end || className.charCodeAt(foundIndex + length) <= 32 /* CharCode.SPACE */) {\n // Ensure that it has trailing whitespace\n return foundIndex;\n }\n }\n // False positive, keep searching from where we left off.\n startingIndex = foundIndex + 1;\n }\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n * attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n * attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n let i = 0;\n while (i < attrs.length) {\n const value = attrs[i];\n if (typeof value === 'number') {\n // only namespaces are supported. Other value types (such as style/class\n // entries) are not supported in this function.\n if (value !== 0 /* AttributeMarker.NamespaceURI */) {\n break;\n }\n // we just landed on the marker value ... therefore\n // we should skip to the next entry\n i++;\n const namespaceURI = attrs[i++];\n const attrName = attrs[i++];\n const attrVal = attrs[i++];\n ngDevMode && ngDevMode.rendererSetAttribute++;\n renderer.setAttribute(native, attrName, attrVal, namespaceURI);\n } else {\n // attrName is string;\n const attrName = value;\n const attrVal = attrs[++i];\n // Standard attributes\n ngDevMode && ngDevMode.rendererSetAttribute++;\n if (isAnimationProp(attrName)) {\n renderer.setProperty(native, attrName, attrVal);\n } else {\n renderer.setAttribute(native, attrName, attrVal);\n }\n i++;\n }\n }\n // another piece of code may iterate over the same attributes array. Therefore\n // it may be helpful to return the exact spot where the attributes array exited\n // whether by running into an unsupported marker or if all the static values were\n // iterated over.\n return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n return marker === 3 /* AttributeMarker.Bindings */ || marker === 4 /* AttributeMarker.Template */ || marker === 6 /* AttributeMarker.I18n */;\n}\n\nfunction isAnimationProp(name) {\n // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n // charCodeAt doesn't allocate memory to return a substring.\n return name.charCodeAt(0) === 64 /* CharCode.AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n if (src === null || src.length === 0) {\n // do nothing\n } else if (dst === null || dst.length === 0) {\n // We have source, but dst is empty, just make a copy.\n dst = src.slice();\n } else {\n let srcMarker = -1 /* AttributeMarker.ImplicitAttributes */;\n for (let i = 0; i < src.length; i++) {\n const item = src[i];\n if (typeof item === 'number') {\n srcMarker = item;\n } else {\n if (srcMarker === 0 /* AttributeMarker.NamespaceURI */) {\n // Case where we need to consume `key1`, `key2`, `value` items.\n } else if (srcMarker === -1 /* AttributeMarker.ImplicitAttributes */ || srcMarker === 2 /* AttributeMarker.Styles */) {\n // Case where we have to consume `key1` and `value` only.\n mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n } else {\n // Case where we have to consume `key1` only.\n mergeHostAttribute(dst, srcMarker, item, null, null);\n }\n }\n }\n }\n return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n let i = 0;\n // Assume that new markers will be inserted at the end.\n let markerInsertPosition = dst.length;\n // scan until correct type.\n if (marker === -1 /* AttributeMarker.ImplicitAttributes */) {\n markerInsertPosition = -1;\n } else {\n while (i < dst.length) {\n const dstValue = dst[i++];\n if (typeof dstValue === 'number') {\n if (dstValue === marker) {\n markerInsertPosition = -1;\n break;\n } else if (dstValue > marker) {\n // We need to save this as we want the markers to be inserted in specific order.\n markerInsertPosition = i - 1;\n break;\n }\n }\n }\n }\n // search until you find place of insertion\n while (i < dst.length) {\n const item = dst[i];\n if (typeof item === 'number') {\n // since `i` started as the index after the marker, we did not find it if we are at the next\n // marker\n break;\n } else if (item === key1) {\n // We already have same token\n if (key2 === null) {\n if (value !== null) {\n dst[i + 1] = value;\n }\n return;\n } else if (key2 === dst[i + 1]) {\n dst[i + 2] = value;\n return;\n }\n }\n // Increment counter.\n i++;\n if (key2 !== null) i++;\n if (value !== null) i++;\n }\n // insert at location.\n if (markerInsertPosition !== -1) {\n dst.splice(markerInsertPosition, 0, marker);\n i = markerInsertPosition + 1;\n }\n dst.splice(i++, 0, key1);\n if (key2 !== null) {\n dst.splice(i++, 0, key2);\n }\n if (value !== null) {\n dst.splice(i++, 0, value);\n }\n}\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n * addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n // It is strange to me that sometimes the class information comes in form of `class` attribute\n // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n // if that is the right behavior.\n ngDevMode && assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n let i = 0;\n // Indicates whether we are processing value from the implicit\n // attribute section (i.e. before the first marker in the array).\n let isImplicitAttrsSection = true;\n while (i < attrs.length) {\n let item = attrs[i++];\n if (typeof item === 'string' && isImplicitAttrsSection) {\n const value = attrs[i++];\n if (isProjectionMode && item === 'class') {\n // We found a `class` attribute in the implicit attribute section,\n // check if it matches the value of the `cssClassToMatch` argument.\n if (classIndexOf(value.toLowerCase(), cssClassToMatch, 0) !== -1) {\n return true;\n }\n }\n } else if (item === 1 /* AttributeMarker.Classes */) {\n // We found the classes section. Start searching for the class.\n while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n // while we have strings\n if (item.toLowerCase() === cssClassToMatch) return true;\n }\n return false;\n } else if (typeof item === 'number') {\n // We've came across a first marker, which indicates\n // that the implicit attribute section is over.\n isImplicitAttrsSection = false;\n }\n }\n return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n return tNode.type === 4 /* TNodeType.Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n const tagNameToCompare = tNode.type === 4 /* TNodeType.Container */ && !isProjectionMode ? NG_TEMPLATE_SELECTOR : tNode.value;\n return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n let mode = 4 /* SelectorFlags.ELEMENT */;\n const nodeAttrs = tNode.attrs || [];\n // Find the index of first attribute that has no value, only a name.\n const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n let skipToNextSelector = false;\n for (let i = 0; i < selector.length; i++) {\n const current = selector[i];\n if (typeof current === 'number') {\n // If we finish processing a :not selector and it hasn't failed, return false\n if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n return false;\n }\n // If we are skipping to the next :not() and this mode flag is positive,\n // it's a part of the current :not() selector, and we should keep skipping\n if (skipToNextSelector && isPositive(current)) continue;\n skipToNextSelector = false;\n mode = current | mode & 1 /* SelectorFlags.NOT */;\n continue;\n }\n if (skipToNextSelector) continue;\n if (mode & 4 /* SelectorFlags.ELEMENT */) {\n mode = 2 /* SelectorFlags.ATTRIBUTE */ | mode & 1 /* SelectorFlags.NOT */;\n if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) || current === '' && selector.length === 1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n } else {\n const selectorAttrValue = mode & 8 /* SelectorFlags.CLASS */ ? current : selector[++i];\n // special case for matching against classes when a tNode has been instantiated with\n // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n if (mode & 8 /* SelectorFlags.CLASS */ && tNode.attrs !== null) {\n if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n continue;\n }\n const attrName = mode & 8 /* SelectorFlags.CLASS */ ? 'class' : current;\n const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n if (attrIndexInNode === -1) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n continue;\n }\n if (selectorAttrValue !== '') {\n let nodeAttrValue;\n if (attrIndexInNode > nameOnlyMarkerIdx) {\n nodeAttrValue = '';\n } else {\n ngDevMode && assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* AttributeMarker.NamespaceURI */, 'We do not match directives on namespaced attributes');\n // we lowercase the attribute value to be able to match\n // selectors without case-sensitivity\n // (selectors are already in lowercase when generated)\n nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n }\n const compareAgainstClassName = mode & 8 /* SelectorFlags.CLASS */ ? nodeAttrValue : null;\n if (compareAgainstClassName && classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 || mode & 2 /* SelectorFlags.ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n if (isPositive(mode)) return false;\n skipToNextSelector = true;\n }\n }\n }\n }\n return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n return (mode & 1 /* SelectorFlags.NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive | NO | NO | YES | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES | YES | NO | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive | YES | YES | NO | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g ``).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n if (attrs === null) return -1;\n let i = 0;\n if (isProjectionMode || !isInlineTemplate) {\n let bindingsMode = false;\n while (i < attrs.length) {\n const maybeAttrName = attrs[i];\n if (maybeAttrName === name) {\n return i;\n } else if (maybeAttrName === 3 /* AttributeMarker.Bindings */ || maybeAttrName === 6 /* AttributeMarker.I18n */) {\n bindingsMode = true;\n } else if (maybeAttrName === 1 /* AttributeMarker.Classes */ || maybeAttrName === 2 /* AttributeMarker.Styles */) {\n let value = attrs[++i];\n // We should skip classes here because we have a separate mechanism for\n // matching classes in projection mode.\n while (typeof value === 'string') {\n value = attrs[++i];\n }\n continue;\n } else if (maybeAttrName === 4 /* AttributeMarker.Template */) {\n // We do not care about Template attributes in this scenario.\n break;\n } else if (maybeAttrName === 0 /* AttributeMarker.NamespaceURI */) {\n // Skip the whole namespaced attribute and value. This is by design.\n i += 4;\n continue;\n }\n // In binding mode there are only names, rather than name-value pairs.\n i += bindingsMode ? 1 : 2;\n }\n // We did not match the attribute\n return -1;\n } else {\n return matchTemplateAttribute(attrs, name);\n }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n for (let i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n const nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* AttributeMarker.ProjectAs */);\n // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n // (attribute names are stored at even indexes)\n if ((ngProjectAsAttrIdx & 1) === 0) {\n return nodeAttrs[ngProjectAsAttrIdx + 1];\n }\n }\n return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n for (let i = 0; i < nodeAttrs.length; i++) {\n const nodeAttr = nodeAttrs[i];\n if (isNameOnlyAttributeMarker(nodeAttr)) {\n return i;\n }\n }\n return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n let i = attrs.indexOf(4 /* AttributeMarker.Template */);\n if (i > -1) {\n i++;\n while (i < attrs.length) {\n const attr = attrs[i];\n // Return in case we checked all template attrs and are switching to the next section in the\n // attrs array (that starts with a number that represents an attribute marker).\n if (typeof attr === 'number') return -1;\n if (attr === name) return i;\n i++;\n }\n }\n return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n selectorListLoop: for (let i = 0; i < list.length; i++) {\n const currentSelectorInList = list[i];\n if (selector.length !== currentSelectorInList.length) {\n continue;\n }\n for (let j = 0; j < selector.length; j++) {\n if (selector[j] !== currentSelectorInList[j]) {\n continue selectorListLoop;\n }\n }\n return true;\n }\n return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n let result = selector[0];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n let currentChunk = '';\n let isNegativeMode = false;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode & 2 /* SelectorFlags.ATTRIBUTE */) {\n const attrValue = selector[++i];\n currentChunk += '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n } else if (mode & 8 /* SelectorFlags.CLASS */) {\n currentChunk += '.' + valueOrMarker;\n } else if (mode & 4 /* SelectorFlags.ELEMENT */) {\n currentChunk += ' ' + valueOrMarker;\n }\n } else {\n //\n // Append current chunk to the final result in case we come across SelectorFlag, which\n // indicates that the previous section of a selector is over. We need to accumulate content\n // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n // ```\n // ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n // ```\n // should be transformed to `.classA :not(.classB .classC)`.\n //\n // Note: for negative selector part, we accumulate content between flags until we find the\n // next negative flag. This is needed to support a case where `:not()` rule contains more than\n // one chunk, e.g. the following selector:\n // ```\n // ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n // ```\n // should be stringified to `:not(p.foo) :not(.bar)`\n //\n if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n currentChunk = '';\n }\n mode = valueOrMarker;\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector.\n isNegativeMode = isNegativeMode || !isPositive(mode);\n }\n i++;\n }\n if (currentChunk !== '') {\n result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n }\n return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n const attrs = [];\n const classes = [];\n let i = 1;\n let mode = 2 /* SelectorFlags.ATTRIBUTE */;\n while (i < selector.length) {\n let valueOrMarker = selector[i];\n if (typeof valueOrMarker === 'string') {\n if (mode === 2 /* SelectorFlags.ATTRIBUTE */) {\n if (valueOrMarker !== '') {\n attrs.push(valueOrMarker, selector[++i]);\n }\n } else if (mode === 8 /* SelectorFlags.CLASS */) {\n classes.push(valueOrMarker);\n }\n } else {\n // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n // extracted only for \"positive\" part of the selector, we can stop here.\n if (!isPositive(mode)) break;\n mode = valueOrMarker;\n }\n i++;\n }\n return {\n attrs,\n classes\n };\n}\n\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyComponent {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵcmp = defineComponent({\n * ...\n * });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n return noSideEffects(() => {\n // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n // See the `initNgDevMode` docstring for more information.\n (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n const baseDef = getNgDirectiveDef(componentDefinition);\n const def = {\n ...baseDef,\n decls: componentDefinition.decls,\n vars: componentDefinition.vars,\n template: componentDefinition.template,\n consts: componentDefinition.consts || null,\n ngContentSelectors: componentDefinition.ngContentSelectors,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: null,\n pipeDefs: null,\n dependencies: baseDef.standalone && componentDefinition.dependencies || null,\n getStandaloneInjector: null,\n signals: componentDefinition.signals ?? false,\n data: componentDefinition.data || {},\n encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n styles: componentDefinition.styles || EMPTY_ARRAY,\n _: null,\n schemas: componentDefinition.schemas || null,\n tView: null,\n id: ''\n };\n initFeatures(def);\n const dependencies = componentDefinition.dependencies;\n def.directiveDefs = extractDefListOrFactory(dependencies, /* pipeDef */false);\n def.pipeDefs = extractDefListOrFactory(dependencies, /* pipeDef */true);\n def.id = getComponentId(def);\n return def;\n });\n}\nfunction extractDirectiveDef(type) {\n return getComponentDef(type) || getDirectiveDef(type);\n}\nfunction nonNull(value) {\n return value !== null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n return noSideEffects(() => {\n const res = {\n type: def.type,\n bootstrap: def.bootstrap || EMPTY_ARRAY,\n declarations: def.declarations || EMPTY_ARRAY,\n imports: def.imports || EMPTY_ARRAY,\n exports: def.exports || EMPTY_ARRAY,\n transitiveCompileScopes: null,\n schemas: def.schemas || null,\n id: def.id || null\n };\n return res;\n });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n * @Input()\n * propName1: string;\n *\n * @Input('publicName2')\n * declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n * propName1: 'propName1',\n * declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n * minifiedPropName1: 'propName1',\n * minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n * 'propName1': 'minifiedPropName1',\n * 'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n * 'propName1': 'propName1',\n * 'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n if (obj == null) return EMPTY_OBJ;\n const newLookup = {};\n for (const minifiedKey in obj) {\n if (obj.hasOwnProperty(minifiedKey)) {\n let publicName = obj[minifiedKey];\n let declaredName = publicName;\n if (Array.isArray(publicName)) {\n declaredName = publicName[1];\n publicName = publicName[0];\n }\n newLookup[publicName] = minifiedKey;\n if (secondary) {\n secondary[publicName] = declaredName;\n }\n }\n }\n return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n * // Generated by Angular Template Compiler\n * // [Symbol] syntax will not be supported by TypeScript until v2.7\n * static ɵdir = ɵɵdefineDirective({\n * ...\n * });\n * }\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdefineDirective(directiveDefinition) {\n return noSideEffects(() => {\n const def = getNgDirectiveDef(directiveDefinition);\n initFeatures(def);\n return def;\n });\n}\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n * // Generated by Angular Template Compiler\n * static ɵpipe = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n return {\n type: pipeDef.type,\n name: pipeDef.name,\n factory: null,\n pure: pipeDef.pure !== false,\n standalone: pipeDef.standalone === true,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n/**\n * The following getter methods retrieve the definition from the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef$1(type) {\n return type[NG_PIPE_DEF] || null;\n}\n/**\n * Checks whether a given Component, Directive or Pipe is marked as standalone.\n * This will return false if passed anything other than a Component, Directive, or Pipe class\n * See [this guide](/guide/standalone-components) for additional information:\n *\n * @param type A reference to a Component, Directive or Pipe.\n * @publicApi\n */\nfunction isStandalone(type) {\n const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef$1(type);\n return def !== null ? def.standalone : false;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n const ngModuleDef = type[NG_MOD_DEF] || null;\n if (!ngModuleDef && throwNotFound === true) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n }\n return ngModuleDef;\n}\nfunction getNgDirectiveDef(directiveDefinition) {\n const declaredInputs = {};\n return {\n type: directiveDefinition.type,\n providersResolver: null,\n factory: null,\n hostBindings: directiveDefinition.hostBindings || null,\n hostVars: directiveDefinition.hostVars || 0,\n hostAttrs: directiveDefinition.hostAttrs || null,\n contentQueries: directiveDefinition.contentQueries || null,\n declaredInputs,\n inputTransforms: null,\n inputConfig: directiveDefinition.inputs || EMPTY_OBJ,\n exportAs: directiveDefinition.exportAs || null,\n standalone: directiveDefinition.standalone === true,\n signals: directiveDefinition.signals === true,\n selectors: directiveDefinition.selectors || EMPTY_ARRAY,\n viewQuery: directiveDefinition.viewQuery || null,\n features: directiveDefinition.features || null,\n setInput: null,\n findHostDirectiveDefs: null,\n hostDirectives: null,\n inputs: invertObject(directiveDefinition.inputs, declaredInputs),\n outputs: invertObject(directiveDefinition.outputs),\n debugInfo: null\n };\n}\nfunction initFeatures(definition) {\n definition.features?.forEach(fn => fn(definition));\n}\nfunction extractDefListOrFactory(dependencies, pipeDef) {\n if (!dependencies) {\n return null;\n }\n const defExtractor = pipeDef ? getPipeDef$1 : extractDirectiveDef;\n return () => (typeof dependencies === 'function' ? dependencies() : dependencies).map(dep => defExtractor(dep)).filter(nonNull);\n}\n/**\n * A map that contains the generated component IDs and type.\n */\nconst GENERATED_COMP_IDS = /*#__PURE__*/new Map();\n/**\n * A method can returns a component ID from the component definition using a variant of DJB2 hash\n * algorithm.\n */\nfunction getComponentId(componentDef) {\n let hash = 0;\n // We cannot rely solely on the component selector as the same selector can be used in different\n // modules.\n //\n // `componentDef.style` is not used, due to it causing inconsistencies. Ex: when server\n // component styles has no sourcemaps and browsers do.\n //\n // Example:\n // https://github.com/angular/components/blob/d9f82c8f95309e77a6d82fd574c65871e91354c2/src/material/core/option/option.ts#L248\n // https://github.com/angular/components/blob/285f46dc2b4c5b127d356cb7c4714b221f03ce50/src/material/legacy-core/option/option.ts#L32\n const hashSelectors = [componentDef.selectors, componentDef.ngContentSelectors, componentDef.hostVars, componentDef.hostAttrs, componentDef.consts, componentDef.vars, componentDef.decls, componentDef.encapsulation, componentDef.standalone, componentDef.signals, componentDef.exportAs, JSON.stringify(componentDef.inputs), JSON.stringify(componentDef.outputs),\n // We cannot use 'componentDef.type.name' as the name of the symbol will change and will not\n // match in the server and browser bundles.\n Object.getOwnPropertyNames(componentDef.type.prototype), !!componentDef.contentQueries, !!componentDef.viewQuery].join('|');\n for (const char of hashSelectors) {\n hash = Math.imul(31, hash) + char.charCodeAt(0) << 0;\n }\n // Force positive number hash.\n // 2147483647 = equivalent of Integer.MAX_VALUE.\n hash += 2147483647 + 1;\n const compId = 'c' + hash;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (GENERATED_COMP_IDS.has(compId)) {\n const previousCompDefType = GENERATED_COMP_IDS.get(compId);\n if (previousCompDefType !== componentDef.type) {\n console.warn(formatRuntimeError(-912 /* RuntimeErrorCode.COMPONENT_ID_COLLISION */, `Component ID generation collision detected. Components '${previousCompDefType.name}' and '${componentDef.type.name}' with selector '${stringifyCSSSelectorList(componentDef.selectors)}' generated the same component ID. To fix this, you can change the selector of one of those components or add an extra host attribute to force a different ID.`));\n }\n } else {\n GENERATED_COMP_IDS.set(compId, componentDef.type);\n }\n }\n return compId;\n}\n\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\n// Shared with LContainer\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst T_HOST = 5;\n// End shared with LContainer\nconst HYDRATION = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR$1 = 9;\nconst ENVIRONMENT = 10;\nconst RENDERER = 11;\nconst CHILD_HEAD = 12;\nconst CHILD_TAIL = 13;\n// FIXME(misko): Investigate if the three declarations aren't all same thing.\nconst DECLARATION_VIEW = 14;\nconst DECLARATION_COMPONENT_VIEW = 15;\nconst DECLARATION_LCONTAINER = 16;\nconst PREORDER_HOOK_FLAGS = 17;\nconst QUERIES = 18;\nconst ID = 19;\nconst EMBEDDED_VIEW_INJECTOR = 20;\nconst ON_DESTROY_HOOKS = 21;\nconst EFFECTS_TO_SCHEDULE = 22;\nconst REACTIVE_TEMPLATE_CONSUMER = 23;\n/**\n * Size of LView's header. Necessary to adjust for it when setting slots.\n *\n * IMPORTANT: `HEADER_OFFSET` should only be referred to the in the `ɵɵ*` instructions to translate\n * instruction index into `LView` index. All other indexes should be in the `LView` index space and\n * there should be no need to refer to `HEADER_OFFSET` anywhere else.\n */\nconst HEADER_OFFSET = 25;\n\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n// FLAGS, PARENT, NEXT, and T_HOST are indices 2, 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\nconst DEHYDRATED_VIEWS = 6;\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n/** Flags associated with an LContainer (saved in LContainer[FLAGS]) */\nvar LContainerFlags = /*#__PURE__*/function (LContainerFlags) {\n LContainerFlags[LContainerFlags[\"None\"] = 0] = \"None\";\n /**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`.\n */\n LContainerFlags[LContainerFlags[\"HasTransplantedViews\"] = 2] = \"HasTransplantedViews\";\n /**\n * Indicates that this LContainer has a view underneath it that needs to be refreshed during\n * change detection.\n */\n LContainerFlags[LContainerFlags[\"HasChildViewsToRefresh\"] = 4] = \"HasChildViewsToRefresh\";\n return LContainerFlags;\n}(LContainerFlags || {});\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n return (tNode.flags & 4 /* TNodeFlags.hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n return tNode.componentOffset > -1;\n}\nfunction isDirectiveHost(tNode) {\n return (tNode.flags & 1 /* TNodeFlags.isDirectiveHost */) === 1 /* TNodeFlags.isDirectiveHost */;\n}\n\nfunction isComponentDef(def) {\n return !!def.template;\n}\nfunction isRootView(target) {\n return (target[FLAGS] & 512 /* LViewFlags.IsRoot */) !== 0;\n}\nfunction isProjectionTNode(tNode) {\n return (tNode.type & 16 /* TNodeType.Projection */) === 16 /* TNodeType.Projection */;\n}\n\nfunction hasI18n(lView) {\n return (lView[FLAGS] & 32 /* LViewFlags.HasI18n */) === 32 /* LViewFlags.HasI18n */;\n}\n\nfunction isDestroyed(lView) {\n return (lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */;\n}\n\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n assertTNodeForTView(tNode, lView[TVIEW]);\n}\nfunction assertTNodeForTView(tNode, tView) {\n assertTNode(tNode);\n const tData = tView.data;\n for (let i = HEADER_OFFSET; i < tData.length; i++) {\n if (tData[i] === tNode) {\n return;\n }\n }\n throwError('This TNode does not belong to this TView.');\n}\nfunction assertTNode(tNode) {\n assertDefined(tNode, 'TNode must be defined');\n if (!(tNode && typeof tNode === 'object' && tNode.hasOwnProperty('directiveStylingLast'))) {\n throwError('Not of type TNode, got: ' + tNode);\n }\n}\nfunction assertTIcu(tIcu) {\n assertDefined(tIcu, 'Expected TIcu to be defined');\n if (!(typeof tIcu.currentCaseLViewIndex === 'number')) {\n throwError('Object is not of TIcu type.');\n }\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n if (!getComponentDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n if (!getNgModuleDef(actual)) {\n throwError(msg);\n }\n}\nfunction assertCurrentTNodeIsParent(isParent) {\n assertEqual(isParent, true, 'currentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n assertDefined(tNode, 'currentTNode should exist!');\n assertDefined(tNode.parent, 'currentTNode should have a parent');\n}\nfunction assertLContainer(value) {\n assertDefined(value, 'LContainer must be defined');\n assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n assertDefined(value, 'LView must be defined');\n assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n }\n}\nfunction assertIndexInDeclRange(tView, index) {\n assertBetween(HEADER_OFFSET, tView.bindingStartIndex, index);\n}\nfunction assertIndexInExpandoRange(lView, index) {\n const tView = lView[1];\n assertBetween(tView.expandoStartIndex, lView.length, index);\n}\nfunction assertBetween(lower, upper, index) {\n if (!(lower <= index && index < upper)) {\n throwError(`Index out of range (expecting ${lower} <= ${index} < ${upper})`);\n }\n}\nfunction assertProjectionSlots(lView, errMessage) {\n assertDefined(lView[DECLARATION_COMPONENT_VIEW], 'Component views should exist.');\n assertDefined(lView[DECLARATION_COMPONENT_VIEW][T_HOST].projection, errMessage || 'Components with projection nodes () must have projection slots defined.');\n}\nfunction assertParentView(lView, errMessage) {\n assertDefined(lView, errMessage || 'Component views should always have a parent view (component\\'s host view)');\n}\nfunction assertNoDuplicateDirectives(directives) {\n // The array needs at least two elements in order to have duplicates.\n if (directives.length < 2) {\n return;\n }\n const seenDirectives = new Set();\n for (const current of directives) {\n if (seenDirectives.has(current)) {\n throw new RuntimeError(309 /* RuntimeErrorCode.DUPLICATE_DIRECTIVE */, `Directive ${current.type.name} matches multiple times on the same element. ` + `Directives can only match an element once.`);\n }\n seenDirectives.add(current);\n }\n}\n/**\n * This is a basic sanity check that the `injectorIndex` seems to point to what looks like a\n * NodeInjector data structure.\n *\n * @param lView `LView` which should be checked.\n * @param injectorIndex index into the `LView` where the `NodeInjector` is expected.\n */\nfunction assertNodeInjector(lView, injectorIndex) {\n assertIndexInExpandoRange(lView, injectorIndex);\n assertIndexInExpandoRange(lView, injectorIndex + 8 /* NodeInjectorOffset.PARENT */);\n assertNumber(lView[injectorIndex + 0], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 1], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 2], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 3], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 4], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 5], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 6], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 7], 'injectorIndex should point to a bloom filter');\n assertNumber(lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */], 'injectorIndex should point to parent injector');\n}\nfunction getFactoryDef(type, throwNotFound) {\n const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n }\n return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\n\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see {@link OnChanges}\n *\n * @publicApi\n */\nclass SimpleChange {\n constructor(previousValue, currentValue, firstChange) {\n this.previousValue = previousValue;\n this.currentValue = currentValue;\n this.firstChange = firstChange;\n }\n /**\n * Check whether the new value is the first value assigned.\n */\n isFirstChange() {\n return this.firstChange;\n }\n}\n\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n if (definition.type.prototype.ngOnChanges) {\n definition.setInput = ngOnChangesSetInput;\n }\n return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n * it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n const simpleChangesStore = getSimpleChangesStore(this);\n const current = simpleChangesStore?.current;\n if (current) {\n const previous = simpleChangesStore.previous;\n if (previous === EMPTY_OBJ) {\n simpleChangesStore.previous = current;\n } else {\n // New changes are copied to the previous store, so that we don't lose history for inputs\n // which were not changed this time\n for (let key in current) {\n previous[key] = current[key];\n }\n }\n simpleChangesStore.current = null;\n this.ngOnChanges(current);\n }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n const declaredName = this.declaredInputs[publicName];\n ngDevMode && assertString(declaredName, 'Name of input in ngOnChanges has to be a string');\n const simpleChangesStore = getSimpleChangesStore(instance) || setSimpleChangesStore(instance, {\n previous: EMPTY_OBJ,\n current: null\n });\n const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n const previous = simpleChangesStore.previous;\n const previousChange = previous[declaredName];\n current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n return instance[SIMPLE_CHANGES_STORE] = store;\n}\nlet profilerCallback = null;\n/**\n * Sets the callback function which will be invoked before and after performing certain actions at\n * runtime (for example, before and after running change detection).\n *\n * Warning: this function is *INTERNAL* and should not be relied upon in application's code.\n * The contract of the function might be changed in any release and/or the function can be removed\n * completely.\n *\n * @param profiler function provided by the caller or null value to disable profiling.\n */\nconst setProfiler = profiler => {\n profilerCallback = profiler;\n};\n/**\n * Profiler function which wraps user code executed by the runtime.\n *\n * @param event ProfilerEvent corresponding to the execution context\n * @param instance component instance\n * @param hookOrListener lifecycle hook function or output listener. The value depends on the\n * execution context\n * @returns\n */\nconst profiler = function (event, instance, hookOrListener) {\n if (profilerCallback != null /* both `null` and `undefined` */) {\n profilerCallback(event, instance, hookOrListener);\n }\n};\nconst SVG_NAMESPACE = 'svg';\nconst MATH_ML_NAMESPACE = 'math';\n\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n * - `typeof value[TYPE] === 'object'` => `LView`\n * - This happens when we have a component at a given location\n * - `typeof value[TYPE] === true` => `LContainer`\n * - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n while (Array.isArray(value)) {\n value = value[HOST];\n }\n return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n while (Array.isArray(value)) {\n // This check is same as `isLView()` but we don't call at as we don't want to call\n // `Array.isArray()` twice and give JITer more work for inlining.\n if (typeof value[TYPE] === 'object') return value;\n value = value[HOST];\n }\n return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n ngDevMode && assertIndexInRange(lView, index);\n ngDevMode && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Expected to be past HEADER_OFFSET');\n return unwrapRNode(lView[index]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n ngDevMode && assertIndexInRange(lView, tNode.index);\n const node = unwrapRNode(lView[tNode.index]);\n return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n const index = tNode === null ? -1 : tNode.index;\n if (index !== -1) {\n ngDevMode && assertTNodeForLView(tNode, lView);\n const node = unwrapRNode(lView[index]);\n return node;\n }\n return null;\n}\n// fixme(misko): The return Type should be `TNode|null`\nfunction getTNode(tView, index) {\n ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n const tNode = tView.data[index];\n ngDevMode && tNode !== null && assertTNode(tNode);\n return tNode;\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n ngDevMode && assertIndexInRange(view, index);\n return view[index];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n ngDevMode && assertIndexInRange(hostView, nodeIndex);\n const slotValue = hostView[nodeIndex];\n const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n return lView;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n return (view[FLAGS] & 4 /* LViewFlags.CreationMode */) === 4 /* LViewFlags.CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n return (view[FLAGS] & 128 /* LViewFlags.Attached */) === 128 /* LViewFlags.Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n return isLContainer(view[PARENT]);\n}\nfunction getConstant(consts, index) {\n if (index === null || index === undefined) return null;\n ngDevMode && assertIndexInRange(consts, index);\n return consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Adds the `RefreshView` flag from the lView and updates HAS_CHILD_VIEWS_TO_REFRESH flag of\n * parents.\n */\nfunction markViewForRefresh(lView) {\n if (lView[FLAGS] & 1024 /* LViewFlags.RefreshView */) {\n return;\n }\n lView[FLAGS] |= 1024 /* LViewFlags.RefreshView */;\n if (viewAttachedToChangeDetector(lView)) {\n markAncestorsForTraversal(lView);\n }\n}\n/**\n * Walks up the LView hierarchy.\n * @param nestingLevel Number of times to walk up in hierarchy.\n * @param currentView View from which to start the lookup.\n */\nfunction walkUpViews(nestingLevel, currentView) {\n while (nestingLevel > 0) {\n ngDevMode && assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n currentView = currentView[DECLARATION_VIEW];\n nestingLevel--;\n }\n return currentView;\n}\nfunction requiresRefreshOrTraversal(lView) {\n return lView[FLAGS] & (1024 /* LViewFlags.RefreshView */ | 8192 /* LViewFlags.HasChildViewsToRefresh */) || lView[REACTIVE_TEMPLATE_CONSUMER]?.dirty;\n}\n/**\n * Updates the `HasChildViewsToRefresh` flag on the parents of the `LView` as well as the\n * parents above.\n */\nfunction updateAncestorTraversalFlagsOnAttach(lView) {\n if (!requiresRefreshOrTraversal(lView)) {\n return;\n }\n markAncestorsForTraversal(lView);\n}\n/**\n * Ensures views above the given `lView` are traversed during change detection even when they are\n * not dirty.\n *\n * This is done by setting the `HAS_CHILD_VIEWS_TO_REFRESH` flag up to the root, stopping when the\n * flag is already `true` or the `lView` is detached.\n */\nfunction markAncestorsForTraversal(lView) {\n let parent = lView[PARENT];\n while (parent !== null) {\n // We stop adding markers to the ancestors once we reach one that already has the marker. This\n // is to avoid needlessly traversing all the way to the root when the marker already exists.\n if (isLContainer(parent) && parent[FLAGS] & LContainerFlags.HasChildViewsToRefresh || isLView(parent) && parent[FLAGS] & 8192 /* LViewFlags.HasChildViewsToRefresh */) {\n break;\n }\n if (isLContainer(parent)) {\n parent[FLAGS] |= LContainerFlags.HasChildViewsToRefresh;\n } else {\n parent[FLAGS] |= 8192 /* LViewFlags.HasChildViewsToRefresh */;\n if (!viewAttachedToChangeDetector(parent)) {\n break;\n }\n }\n parent = parent[PARENT];\n }\n}\n/**\n * Stores a LView-specific destroy callback.\n */\nfunction storeLViewOnDestroy(lView, onDestroyCallback) {\n if ((lView[FLAGS] & 256 /* LViewFlags.Destroyed */) === 256 /* LViewFlags.Destroyed */) {\n throw new RuntimeError(911 /* RuntimeErrorCode.VIEW_ALREADY_DESTROYED */, ngDevMode && 'View has already been destroyed.');\n }\n if (lView[ON_DESTROY_HOOKS] === null) {\n lView[ON_DESTROY_HOOKS] = [];\n }\n lView[ON_DESTROY_HOOKS].push(onDestroyCallback);\n}\n/**\n * Removes previously registered LView-specific destroy callback.\n */\nfunction removeLViewOnDestroy(lView, onDestroyCallback) {\n if (lView[ON_DESTROY_HOOKS] === null) return;\n const destroyCBIdx = lView[ON_DESTROY_HOOKS].indexOf(onDestroyCallback);\n if (destroyCBIdx !== -1) {\n lView[ON_DESTROY_HOOKS].splice(destroyCBIdx, 1);\n }\n}\nconst instructionState = {\n lFrame: /*#__PURE__*/createLFrame(null),\n bindingsEnabled: true,\n skipHydrationRootTNode: null\n};\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n *\n * The `checkNoChanges` function is invoked only in ngDevMode=true and verifies that no unintended\n * changes exist in the change detector or its children.\n */\nlet _isInCheckNoChangesMode = false;\n/**\n * Returns true if the instruction state stack is empty.\n *\n * Intended to be called from tests only (tree shaken otherwise).\n */\nfunction specOnlyIsInstructionStateEmpty() {\n return instructionState.lFrame.parent === null;\n}\nfunction getElementDepthCount() {\n return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n return instructionState.bindingsEnabled;\n}\n/**\n * Returns true if currently inside a skip hydration block.\n * @returns boolean\n */\nfunction isInSkipHydrationBlock$1() {\n return instructionState.skipHydrationRootTNode !== null;\n}\n/**\n * Returns true if this is the root TNode of the skip hydration block.\n * @param tNode the current TNode\n * @returns boolean\n */\nfunction isSkipHydrationRootTNode(tNode) {\n return instructionState.skipHydrationRootTNode === tNode;\n}\n/**\n * Enables directive matching on elements.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n instructionState.bindingsEnabled = true;\n}\n/**\n * Sets a flag to specify that the TNode is in a skip hydration block.\n * @param tNode the current TNode\n */\nfunction enterSkipHydrationBlock(tNode) {\n instructionState.skipHydrationRootTNode = tNode;\n}\n/**\n * Disables directive matching on element.\n *\n * * Example:\n * ```\n * \n * Should match component / directive.\n * \n *
\n * \n * \n * Should not match component / directive because we are in ngNonBindable.\n * \n * \n *
\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n instructionState.bindingsEnabled = false;\n}\n/**\n * Clears the root skip hydration node when leaving a skip hydration block.\n */\nfunction leaveSkipHydrationBlock() {\n instructionState.skipHydrationRootTNode = null;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n * @returns Context of the restored OpaqueViewState instance.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n instructionState.lFrame.contextLView = viewToRestore;\n return viewToRestore[CONTEXT];\n}\n/**\n * Clears the view set in `ɵɵrestoreView` from memory. Returns the passed in\n * value so that it can be used as a return value of an instruction.\n *\n * @codeGenApi\n */\nfunction ɵɵresetView(value) {\n instructionState.lFrame.contextLView = null;\n return value;\n}\nfunction getCurrentTNode() {\n let currentTNode = getCurrentTNodePlaceholderOk();\n while (currentTNode !== null && currentTNode.type === 64 /* TNodeType.Placeholder */) {\n currentTNode = currentTNode.parent;\n }\n return currentTNode;\n}\nfunction getCurrentTNodePlaceholderOk() {\n return instructionState.lFrame.currentTNode;\n}\nfunction getCurrentParentTNode() {\n const lFrame = instructionState.lFrame;\n const currentTNode = lFrame.currentTNode;\n return lFrame.isParent ? currentTNode : currentTNode.parent;\n}\nfunction setCurrentTNode(tNode, isParent) {\n ngDevMode && tNode && assertTNodeForTView(tNode, instructionState.lFrame.tView);\n const lFrame = instructionState.lFrame;\n lFrame.currentTNode = tNode;\n lFrame.isParent = isParent;\n}\nfunction isCurrentTNodeParent() {\n return instructionState.lFrame.isParent;\n}\nfunction setCurrentTNodeAsNotParent() {\n instructionState.lFrame.isParent = false;\n}\nfunction getContextLView() {\n const contextLView = instructionState.lFrame.contextLView;\n ngDevMode && assertDefined(contextLView, 'contextLView must be defined.');\n return contextLView;\n}\nfunction isInCheckNoChangesMode() {\n !ngDevMode && throwError('Must never be called in production mode');\n return _isInCheckNoChangesMode;\n}\nfunction setIsInCheckNoChangesMode(mode) {\n !ngDevMode && throwError('Must never be called in production mode');\n _isInCheckNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n const lFrame = instructionState.lFrame;\n let index = lFrame.bindingRootIndex;\n if (index === -1) {\n index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n }\n return index;\n}\nfunction getBindingIndex() {\n return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n const lFrame = instructionState.lFrame;\n const index = lFrame.bindingIndex;\n lFrame.bindingIndex = lFrame.bindingIndex + count;\n return index;\n}\nfunction isInI18nBlock() {\n return instructionState.lFrame.inI18n;\n}\nfunction setInI18nBlock(isInI18nBlock) {\n instructionState.lFrame.inI18n = isInI18nBlock;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n * whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n const lFrame = instructionState.lFrame;\n lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * Returns a `TNode` of the location where the current `LView` is declared at.\n *\n * @param lView an `LView` that we want to find parent `TNode` for.\n */\nfunction getDeclarationTNode(lView) {\n const tView = lView[TVIEW];\n // Return the declaration parent for embedded views\n if (tView.type === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n }\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n // Falling back to `T_HOST` in case we cross component boundary.\n if (tView.type === 1 /* TViewType.Component */) {\n return lView[T_HOST];\n }\n // Remaining TNode type is `TViewType.Root` which doesn't have a parent TNode.\n return null;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n *\n * @param lView `LView` location of the DI context.\n * @param tNode `TNode` for DI context\n * @param flags DI context flags. if `SkipSelf` flag is set than we walk up the declaration\n * tree from `tNode` until we find parent declared `TElementNode`.\n * @returns `true` if we have successfully entered DI associated with `tNode` (or with declared\n * `TNode` if `flags` has `SkipSelf`). Failing to enter DI implies that no associated\n * `NodeInjector` can be found and we should instead use `ModuleInjector`.\n * - If `true` than this call must be fallowed by `leaveDI`\n * - If `false` than this call failed and we should NOT call `leaveDI`\n */\nfunction enterDI(lView, tNode, flags) {\n ngDevMode && assertLViewOrUndefined(lView);\n if (flags & InjectFlags.SkipSelf) {\n ngDevMode && assertTNodeForTView(tNode, lView[TVIEW]);\n let parentTNode = tNode;\n let parentLView = lView;\n while (true) {\n ngDevMode && assertDefined(parentTNode, 'Parent TNode should be defined');\n parentTNode = parentTNode.parent;\n if (parentTNode === null && !(flags & InjectFlags.Host)) {\n parentTNode = getDeclarationTNode(parentLView);\n if (parentTNode === null) break;\n // In this case, a parent exists and is definitely an element. So it will definitely\n // have an existing lView as the declaration view, which is why we can assume it's defined.\n ngDevMode && assertDefined(parentLView, 'Parent LView should be defined');\n parentLView = parentLView[DECLARATION_VIEW];\n // In Ivy there are Comment nodes that correspond to ngIf and NgFor embedded directives\n // We want to skip those and look only at Elements and ElementContainers to ensure\n // we're looking at true parent nodes, and not content or other types.\n if (parentTNode.type & (2 /* TNodeType.Element */ | 8 /* TNodeType.ElementContainer */)) {\n break;\n }\n } else {\n break;\n }\n }\n if (parentTNode === null) {\n // If we failed to find a parent TNode this means that we should use module injector.\n return false;\n } else {\n tNode = parentTNode;\n lView = parentLView;\n }\n }\n ngDevMode && assertTNodeForLView(tNode, lView);\n const lFrame = instructionState.lFrame = allocLFrame();\n lFrame.currentTNode = tNode;\n lFrame.lView = lView;\n return true;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @returns the previously active lView;\n */\nfunction enterView(newView) {\n ngDevMode && assertNotEqual(newView[0], newView[1], '????');\n ngDevMode && assertLViewOrUndefined(newView);\n const newLFrame = allocLFrame();\n if (ngDevMode) {\n assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n }\n const tView = newView[TVIEW];\n instructionState.lFrame = newLFrame;\n ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);\n newLFrame.currentTNode = tView.firstChild;\n newLFrame.lView = newView;\n newLFrame.tView = tView;\n newLFrame.contextLView = newView;\n newLFrame.bindingIndex = tView.bindingStartIndex;\n newLFrame.inI18n = false;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n const currentLFrame = instructionState.lFrame;\n const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n return newLFrame;\n}\nfunction createLFrame(parent) {\n const lFrame = {\n currentTNode: null,\n isParent: true,\n lView: null,\n tView: null,\n selectedIndex: -1,\n contextLView: null,\n elementDepthCount: 0,\n currentNamespace: null,\n currentDirectiveIndex: -1,\n bindingRootIndex: -1,\n bindingIndex: -1,\n currentQueryIndex: 0,\n parent: parent,\n child: null,\n inI18n: false\n };\n parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `currentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n const oldLFrame = instructionState.lFrame;\n instructionState.lFrame = oldLFrame.parent;\n oldLFrame.currentTNode = null;\n oldLFrame.lView = null;\n return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n const oldLFrame = leaveViewLight();\n oldLFrame.isParent = true;\n oldLFrame.tView = null;\n oldLFrame.selectedIndex = -1;\n oldLFrame.contextLView = null;\n oldLFrame.elementDepthCount = 0;\n oldLFrame.currentDirectiveIndex = -1;\n oldLFrame.currentNamespace = null;\n oldLFrame.bindingRootIndex = -1;\n oldLFrame.bindingIndex = -1;\n oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n const contextLView = instructionState.lFrame.contextLView = walkUpViews(level, instructionState.lFrame.contextLView);\n return contextLView[CONTEXT];\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n ngDevMode && index !== -1 && assertGreaterThanOrEqual(index, HEADER_OFFSET, 'Index must be past HEADER_OFFSET (or -1).');\n ngDevMode && assertLessThan(index, instructionState.lFrame.lView.length, 'Can\\'t set index passed end of LView');\n instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n const lFrame = instructionState.lFrame;\n return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace$1() {\n return instructionState.lFrame.currentNamespace;\n}\nlet _wasLastNodeCreated = true;\n/**\n * Retrieves a global flag that indicates whether the most recent DOM node\n * was created or hydrated.\n */\nfunction wasLastNodeCreated() {\n return _wasLastNodeCreated;\n}\n/**\n * Sets a global flag to indicate whether the most recent DOM node\n * was created or hydrated.\n */\nfunction lastNodeWasCreated(flag) {\n _wasLastNodeCreated = flag;\n}\n\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n ngDevMode && assertFirstCreatePass(tView);\n const {\n ngOnChanges,\n ngOnInit,\n ngDoCheck\n } = directiveDef.type.prototype;\n if (ngOnChanges) {\n const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n (tView.preOrderHooks ??= []).push(directiveIndex, wrappedOnChanges);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, wrappedOnChanges);\n }\n if (ngOnInit) {\n (tView.preOrderHooks ??= []).push(0 - directiveIndex, ngOnInit);\n }\n if (ngDoCheck) {\n (tView.preOrderHooks ??= []).push(directiveIndex, ngDoCheck);\n (tView.preOrderCheckHooks ??= []).push(directiveIndex, ngDoCheck);\n }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n ngDevMode && assertFirstCreatePass(tView);\n // It's necessary to loop through the directives at elementEnd() (rather than processing in\n // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n // hooks for projected components and directives must be called *before* their hosts.\n for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n const directiveDef = tView.data[i];\n ngDevMode && assertDefined(directiveDef, 'Expecting DirectiveDef');\n const lifecycleHooks = directiveDef.type.prototype;\n const {\n ngAfterContentInit,\n ngAfterContentChecked,\n ngAfterViewInit,\n ngAfterViewChecked,\n ngOnDestroy\n } = lifecycleHooks;\n if (ngAfterContentInit) {\n (tView.contentHooks ??= []).push(-i, ngAfterContentInit);\n }\n if (ngAfterContentChecked) {\n (tView.contentHooks ??= []).push(i, ngAfterContentChecked);\n (tView.contentCheckHooks ??= []).push(i, ngAfterContentChecked);\n }\n if (ngAfterViewInit) {\n (tView.viewHooks ??= []).push(-i, ngAfterViewInit);\n }\n if (ngAfterViewChecked) {\n (tView.viewHooks ??= []).push(i, ngAfterViewChecked);\n (tView.viewCheckHooks ??= []).push(i, ngAfterViewChecked);\n }\n if (ngOnDestroy != null) {\n (tView.destroyHooks ??= []).push(i, ngOnDestroy);\n }\n }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the array\n * They are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n callHooks(lView, hooks, 3 /* InitPhaseState.InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n if ((lView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n callHooks(lView, hooks, initPhase, nodeIndex);\n }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n ngDevMode && assertNotEqual(initPhase, 3 /* InitPhaseState.InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n let flags = lView[FLAGS];\n if ((flags & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n flags &= 16383 /* LViewFlags.IndexWithinInitPhaseReset */;\n flags += 1 /* LViewFlags.InitPhaseStateIncrementer */;\n lView[FLAGS] = flags;\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n ngDevMode && assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');\n const startIndex = currentNodeIndex !== undefined ? currentView[PREORDER_HOOK_FLAGS] & 65535 /* PreOrderHookFlags.IndexOfTheNextPreOrderHookMaskMask */ : 0;\n const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n const max = arr.length - 1; // Stop the loop at length - 1, because we look for the hook at i + 1\n let lastNodeIndexFound = 0;\n for (let i = startIndex; i < max; i++) {\n const hook = arr[i + 1];\n if (typeof hook === 'number') {\n lastNodeIndexFound = arr[i];\n if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n break;\n }\n } else {\n const isInitHook = arr[i] < 0;\n if (isInitHook) {\n currentView[PREORDER_HOOK_FLAGS] += 65536 /* PreOrderHookFlags.NumberOfInitHooksCalledIncrementer */;\n }\n\n if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n callHook(currentView, initPhase, arr, i);\n currentView[PREORDER_HOOK_FLAGS] = (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* PreOrderHookFlags.NumberOfInitHooksCalledMask */) + i + 2;\n }\n i++;\n }\n }\n}\n/**\n * Executes a single lifecycle hook, making sure that:\n * - it is called in the non-reactive context;\n * - profiling data are registered.\n */\nfunction callHookInternal(directive, hook) {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, directive, hook);\n const prevConsumer = setActiveConsumer$1(null);\n try {\n hook.call(directive);\n } finally {\n setActiveConsumer$1(prevConsumer);\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, directive, hook);\n }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n const isInitHook = arr[i] < 0;\n const hook = arr[i + 1];\n const directiveIndex = isInitHook ? -arr[i] : arr[i];\n const directive = currentView[directiveIndex];\n if (isInitHook) {\n const indexWithintInitPhase = currentView[FLAGS] >> 14 /* LViewFlags.IndexWithinInitPhaseShift */;\n // The init phase state must be always checked here as it may have been recursively updated.\n if (indexWithintInitPhase < currentView[PREORDER_HOOK_FLAGS] >> 16 /* PreOrderHookFlags.NumberOfInitHooksCalledShift */ && (currentView[FLAGS] & 3 /* LViewFlags.InitPhaseStateMask */) === initPhase) {\n currentView[FLAGS] += 16384 /* LViewFlags.IndexWithinInitPhaseIncrementer */;\n callHookInternal(directive, hook);\n }\n } else {\n callHookInternal(directive, hook);\n }\n}\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array {\n *\n * // Cumulative bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Cumulative bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Cumulative bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Cumulative bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Cumulative bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Cumulative bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Cumulative bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Cumulative bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // We need to store a reference to the injector's parent so DI can keep looking up\n * // the injector tree until it finds the dependency it's looking for.\n * [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array {\n *\n * // Shared node bloom for directive IDs 0-31 (IDs are % BLOOM_SIZE)\n * [0]: number;\n *\n * // Shared node bloom for directive IDs 32-63\n * [1]: number;\n *\n * // Shared node bloom for directive IDs 64-95\n * [2]: number;\n *\n * // Shared node bloom for directive IDs 96-127\n * [3]: number;\n *\n * // Shared node bloom for directive IDs 128-159\n * [4]: number;\n *\n * // Shared node bloom for directive IDs 160 - 191\n * [5]: number;\n *\n * // Shared node bloom for directive IDs 192 - 223\n * [6]: number;\n *\n * // Shared node bloom for directive IDs 224 - 255\n * [7]: number;\n *\n * // Necessary to find directive indices for a particular node.\n * [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n * }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n constructor(\n /**\n * Factory to invoke in order to create a new instance.\n */\n factory,\n /**\n * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n */\n isViewProvider, injectImplementation) {\n this.factory = factory;\n /**\n * Marker set to true during factory invocation to see if we get into recursive loop.\n * Recursive loop causes an error to be displayed.\n */\n this.resolving = false;\n ngDevMode && assertDefined(factory, 'Factory not specified');\n ngDevMode && assertEqual(typeof factory, 'function', 'Expected factory function.');\n this.canSeeViewProviders = isViewProvider;\n this.injectImpl = injectImplementation;\n }\n}\nfunction isFactory(obj) {\n return obj instanceof NodeInjectorFactory;\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nfunction toTNodeTypeAsString(tNodeType) {\n let text = '';\n tNodeType & 1 /* TNodeType.Text */ && (text += '|Text');\n tNodeType & 2 /* TNodeType.Element */ && (text += '|Element');\n tNodeType & 4 /* TNodeType.Container */ && (text += '|Container');\n tNodeType & 8 /* TNodeType.ElementContainer */ && (text += '|ElementContainer');\n tNodeType & 16 /* TNodeType.Projection */ && (text += '|Projection');\n tNodeType & 32 /* TNodeType.Icu */ && (text += '|IcuContainer');\n tNodeType & 64 /* TNodeType.Placeholder */ && (text += '|Placeholder');\n return text.length > 0 ? text.substring(1) : text;\n}\n/**\n * Helper function to detect if a given value matches a `TNode` shape.\n *\n * The logic uses the `insertBeforeIndex` and its possible values as\n * a way to differentiate a TNode shape from other types of objects\n * within the `TView.data`. This is not a perfect check, but it can\n * be a reasonable differentiator, since we control the shapes of objects\n * within `TView.data`.\n */\nfunction isTNodeShape(value) {\n return value != null && typeof value === 'object' && (value.insertBeforeIndex === null || typeof value.insertBeforeIndex === 'number' || Array.isArray(value.insertBeforeIndex));\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n *
\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n return (tNode.flags & 8 /* TNodeFlags.hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n *
\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n * @Input()\n * class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n return (tNode.flags & 16 /* TNodeFlags.hasStyleInput */) !== 0;\n}\nfunction assertTNodeType(tNode, expectedTypes, message) {\n assertDefined(tNode, 'should be called with a TNode');\n if ((tNode.type & expectedTypes) === 0) {\n throwError(message || `Expected [${toTNodeTypeAsString(expectedTypes)}] but got ${toTNodeTypeAsString(tNode.type)}.`);\n }\n}\nfunction assertPureTNodeType(type) {\n if (!(type === 2 /* TNodeType.Element */ ||\n //\n type === 1 /* TNodeType.Text */ ||\n //\n type === 4 /* TNodeType.Container */ ||\n //\n type === 8 /* TNodeType.ElementContainer */ ||\n //\n type === 32 /* TNodeType.Icu */ ||\n //\n type === 16 /* TNodeType.Projection */ ||\n //\n type === 64 /* TNodeType.Placeholder */)) {\n throwError(`Expected TNodeType to have only a single type selected, but got ${toTNodeTypeAsString(type)}.`);\n }\n}\n\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n ngDevMode && assertNumber(parentLocation, 'Number expected');\n ngDevMode && assertNotEqual(parentLocation, -1, 'Not a valid state.');\n const parentInjectorIndex = parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n ngDevMode && assertGreaterThan(parentInjectorIndex, HEADER_OFFSET, 'Parent injector must be pointing past HEADER_OFFSET.');\n return parentLocation & 32767 /* RelativeInjectorLocationFlags.InjectorIndexMask */;\n}\n\nfunction getParentInjectorViewOffset(parentLocation) {\n return parentLocation >> 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n let viewOffset = getParentInjectorViewOffset(location);\n let parentView = startView;\n // For most cases, the parent injector can be found on the host node (e.g. for component\n // or container), but we must keep the loop here to support the rarer case of deeply nested\n // tags or inline views, where the parent injector might live many views\n // above the child injector.\n while (viewOffset > 0) {\n parentView = parentView[DECLARATION_VIEW];\n viewOffset--;\n }\n return parentView;\n}\n\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n * constructor(public value: String) {}\n * }\n *\n * @Component({\n * providers: [\n * MyService,\n * {provide: String, value: 'providers' }\n * ]\n * viewProviders: [\n * {provide: String, value: 'viewProviders'}\n * ]\n * })\n * class MyComponent {\n * constructor(myService: MyService, value: String) {\n * // We expect that Component can see into `viewProviders`.\n * expect(value).toEqual('viewProviders');\n * // `MyService` was not declared in `viewProviders` hence it can't see it.\n * expect(myService.value).toEqual('providers');\n * }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n const oldValue = includeViewProviders;\n includeViewProviders = v;\n return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/**\n * The number of bits that is represented by a single bloom bucket. JS bit operations are 32 bits,\n * so each bucket represents 32 distinct tokens which accounts for log2(32) = 5 bits of a bloom hash\n * number.\n */\nconst BLOOM_BUCKET_BITS = 5;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/** Value used when something wasn't found by an injector. */\nconst NOT_FOUND = {};\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n let id;\n if (typeof type === 'string') {\n id = type.charCodeAt(0) || 0;\n } else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n id = type[NG_ELEMENT_ID];\n }\n // Set a unique ID on the directive type, so if something tries to inject the directive,\n // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n if (id == null) {\n id = type[NG_ELEMENT_ID] = nextNgElementId++;\n }\n // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n const bloomHash = id & BLOOM_MASK;\n // Create a mask that targets the specific bit associated with the directive.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `tData` represents `BLOOM_BUCKET_BITS` number of bits of `bloomHash`.\n // Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset that the mask\n // should be written to.\n tView.data[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)] |= mask;\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param lView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, lView) {\n const existingInjectorIndex = getInjectorIndex(tNode, lView);\n if (existingInjectorIndex !== -1) {\n return existingInjectorIndex;\n }\n const tView = lView[TVIEW];\n if (tView.firstCreatePass) {\n tNode.injectorIndex = lView.length;\n insertBloom(tView.data, tNode); // foundation for node bloom\n insertBloom(lView, null); // foundation for cumulative bloom\n insertBloom(tView.blueprint, null);\n }\n const parentLoc = getParentInjectorLocation(tNode, lView);\n const injectorIndex = tNode.injectorIndex;\n // If a parent injector can't be found, its location is set to -1.\n // In that case, we don't need to set up a cumulative bloom\n if (hasParentInjector(parentLoc)) {\n const parentIndex = getParentInjectorIndex(parentLoc);\n const parentLView = getParentInjectorView(parentLoc, lView);\n const parentData = parentLView[TVIEW].data;\n // Creates a cumulative bloom filter that merges the parent's bloom filter\n // and its own cumulative bloom (which contains tokens for all ancestors)\n for (let i = 0; i < 8 /* NodeInjectorOffset.BLOOM_SIZE */; i++) {\n lView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n }\n }\n lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */] = parentLoc;\n return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, lView) {\n if (tNode.injectorIndex === -1 ||\n // If the injector index is the same as its parent's injector index, then the index has been\n // copied down from the parent node. No injector has been created yet on this node.\n tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex ||\n // After the first template pass, the injector index might exist but the parent values\n // might not have been calculated yet for this instance\n lView[tNode.injectorIndex + 8 /* NodeInjectorOffset.PARENT */] === null) {\n return -1;\n } else {\n ngDevMode && assertIndexInRange(lView, tNode.injectorIndex);\n return tNode.injectorIndex;\n }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * @returns Returns a number that is the combination of the number of LViews that we have to go up\n * to find the LView containing the parent inject AND the index of the injector within that LView.\n */\nfunction getParentInjectorLocation(tNode, lView) {\n if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n // If we have a parent `TNode` and there is an injector associated with it we are done, because\n // the parent injector is within the current `LView`.\n return tNode.parent.injectorIndex; // ViewOffset is 0\n }\n // When parent injector location is computed it may be outside of the current view. (ie it could\n // be pointing to a declared parent location). This variable stores number of declaration parents\n // we need to walk up in order to find the parent injector location.\n let declarationViewOffset = 0;\n let parentTNode = null;\n let lViewCursor = lView;\n // The parent injector is not in the current `LView`. We will have to walk the declared parent\n // `LView` hierarchy and look for it. If we walk of the top, that means that there is no parent\n // `NodeInjector`.\n while (lViewCursor !== null) {\n parentTNode = getTNodeFromLView(lViewCursor);\n if (parentTNode === null) {\n // If we have no parent, than we are done.\n return NO_PARENT_INJECTOR;\n }\n ngDevMode && parentTNode && assertTNodeForLView(parentTNode, lViewCursor[DECLARATION_VIEW]);\n // Every iteration of the loop requires that we go to the declared parent.\n declarationViewOffset++;\n lViewCursor = lViewCursor[DECLARATION_VIEW];\n if (parentTNode.injectorIndex !== -1) {\n // We found a NodeInjector which points to something.\n return parentTNode.injectorIndex | declarationViewOffset << 16 /* RelativeInjectorLocationFlags.ViewOffsetShift */;\n }\n }\n\n return NO_PARENT_INJECTOR;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n * at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n * constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * \n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n ngDevMode && assertTNodeType(tNode, 12 /* TNodeType.AnyContainer */ | 3 /* TNodeType.AnyRNode */);\n ngDevMode && assertDefined(tNode, 'expecting tNode');\n if (attrNameToInject === 'class') {\n return tNode.classes;\n }\n if (attrNameToInject === 'style') {\n return tNode.styles;\n }\n const attrs = tNode.attrs;\n if (attrs) {\n const attrsLength = attrs.length;\n let i = 0;\n while (i < attrsLength) {\n const value = attrs[i];\n // If we hit a `Bindings` or `Template` marker then we are done.\n if (isNameOnlyAttributeMarker(value)) break;\n // Skip namespaced attributes\n if (value === 0 /* AttributeMarker.NamespaceURI */) {\n // we skip the next two values\n // as namespaced attributes looks like\n // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n // 'existValue', ...]\n i = i + 2;\n } else if (typeof value === 'number') {\n // Skip to the first value of the marked attribute.\n i++;\n while (i < attrsLength && typeof attrs[i] === 'string') {\n i++;\n }\n } else if (value === attrNameToInject) {\n return attrs[i + 1];\n } else {\n i = i + 2;\n }\n }\n }\n return null;\n}\nfunction notFoundValueOrThrow(notFoundValue, token, flags) {\n if (flags & InjectFlags.Optional || notFoundValue !== undefined) {\n return notFoundValue;\n } else {\n throwProviderNotFoundError(token, 'NodeInjector');\n }\n}\n/**\n * Returns the value associated to the given token from the ModuleInjector or throws exception\n *\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector or throws an exception\n */\nfunction lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {\n if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n // This must be set or the NullInjector will throw for optional deps\n notFoundValue = null;\n }\n if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n const moduleInjector = lView[INJECTOR$1];\n // switch to `injectInjectorOnly` implementation for module injector, since module injector\n // should not have access to Component/Directive DI scope (that may happen through\n // `directiveInject` implementation)\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n if (moduleInjector) {\n return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n } else {\n return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n }\n } finally {\n setInjectImplementation(previousInjectImplementation);\n }\n }\n return notFoundValueOrThrow(notFoundValue, token, flags);\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n if (tNode !== null) {\n // If the view or any of its ancestors have an embedded\n // view injector, we have to look it up there first.\n if (lView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ &&\n // The token must be present on the current node injector when the `Self`\n // flag is set, so the lookup on embedded view injector(s) can be skipped.\n !(flags & InjectFlags.Self)) {\n const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);\n if (embeddedInjectorValue !== NOT_FOUND) {\n return embeddedInjectorValue;\n }\n }\n // Otherwise try the node injector.\n const value = lookupTokenUsingNodeInjector(tNode, lView, token, flags, NOT_FOUND);\n if (value !== NOT_FOUND) {\n return value;\n }\n }\n // Finally, fall back to the module injector.\n return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n}\n/**\n * Returns the value associated to the given token from the node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {\n const bloomHash = bloomHashBitOrFactory(token);\n // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n // so just call the factory function to create it.\n if (typeof bloomHash === 'function') {\n if (!enterDI(lView, tNode, flags)) {\n // Failed to enter DI, try module injector instead. If a token is injected with the @Host\n // flag, the module injector is not searched for that token in Ivy.\n return flags & InjectFlags.Host ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);\n }\n try {\n let value;\n if (ngDevMode) {\n runInInjectorProfilerContext(new NodeInjector(getCurrentTNode(), getLView()), token, () => {\n value = bloomHash(flags);\n if (value != null) {\n emitInstanceCreatedByInjectorEvent(value);\n }\n });\n } else {\n value = bloomHash(flags);\n }\n if (value == null && !(flags & InjectFlags.Optional)) {\n throwProviderNotFoundError(token);\n } else {\n return value;\n }\n } finally {\n leaveDI();\n }\n } else if (typeof bloomHash === 'number') {\n // A reference to the previous injector TView that was found while climbing the element\n // injector tree. This is used to know if viewProviders can be accessed on the current\n // injector.\n let previousTView = null;\n let injectorIndex = getInjectorIndex(tNode, lView);\n let parentLocation = NO_PARENT_INJECTOR;\n let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n // If we should skip this injector, or if there is no injector on this node, start by\n // searching the parent injector.\n if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) : lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation === NO_PARENT_INJECTOR || !shouldSearchParent(flags, false)) {\n injectorIndex = -1;\n } else {\n previousTView = lView[TVIEW];\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n }\n }\n // Traverse up the injector tree until we find a potential match or until we know there\n // *isn't* a match.\n while (injectorIndex !== -1) {\n ngDevMode && assertNodeInjector(lView, injectorIndex);\n // Check the current injector. If it matches, see if it contains token.\n const tView = lView[TVIEW];\n ngDevMode && assertTNodeForLView(tView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */], lView);\n if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n // At this point, we have an injector which *may* contain the token, so we step through\n // the providers and directives associated with the injector's corresponding node to get\n // the instance.\n const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n if (instance !== NOT_FOUND) {\n return instance;\n }\n }\n parentLocation = lView[injectorIndex + 8 /* NodeInjectorOffset.PARENT */];\n if (parentLocation !== NO_PARENT_INJECTOR && shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */] === hostTElementNode) && bloomHasToken(bloomHash, injectorIndex, lView)) {\n // The def wasn't found anywhere on this node, so it was a false positive.\n // Traverse up the tree and continue searching.\n previousTView = tView;\n injectorIndex = getParentInjectorIndex(parentLocation);\n lView = getParentInjectorView(parentLocation, lView);\n } else {\n // If we should not search parent OR If the ancestor bloom filter value does not have the\n // bit corresponding to the directive we can give up on traversing up to find the specific\n // injector.\n injectorIndex = -1;\n }\n }\n }\n return notFoundValue;\n}\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n const currentTView = lView[TVIEW];\n const tNode = currentTView.data[injectorIndex + 8 /* NodeInjectorOffset.TNODE */];\n // First, we need to determine if view providers can be accessed by the starting element.\n // There are two possibilities\n const canAccessViewProviders = previousTView == null ?\n // 1) This is the first invocation `previousTView == null` which means that we are at the\n // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n // to look into the ViewProviders is if:\n // - we are on a component\n // - AND the injector set `includeViewProviders` to true (implying that the token can see\n // ViewProviders because it is the Component or a Service which itself was declared in\n // ViewProviders)\n isComponentHost(tNode) && includeViewProviders :\n // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n // In such a case we are only allowed to look into the ViewProviders if:\n // - We just crossed from child View to Parent View `previousTView != currentTView`\n // - AND the parent TNode is an Element.\n // This means that we just came from the Component's View and therefore are allowed to see\n // into the ViewProviders.\n previousTView != currentTView && (tNode.type & 3 /* TNodeType.AnyRNode */) !== 0;\n // This special case happens when there is a @host on the inject and when we are searching\n // on the host element node.\n const isHostSpecialCase = flags & InjectFlags.Host && hostTElementNode === tNode;\n const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n if (injectableIdx !== null) {\n return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n } else {\n return NOT_FOUND;\n }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n const nodeProviderIndexes = tNode.providerIndexes;\n const tInjectables = tView.data;\n const injectablesStart = nodeProviderIndexes & 1048575 /* TNodeProviderIndexes.ProvidersStartIndexMask */;\n const directivesStart = tNode.directiveStart;\n const directiveEnd = tNode.directiveEnd;\n const cptViewProvidersCount = nodeProviderIndexes >> 20 /* TNodeProviderIndexes.CptViewProvidersCountShift */;\n const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n // When the host special case applies, only the viewProviders and the component are visible\n const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n for (let i = startingIndex; i < endIndex; i++) {\n const providerTokenOrDef = tInjectables[i];\n if (i < directivesStart && token === providerTokenOrDef || i >= directivesStart && providerTokenOrDef.type === token) {\n return i;\n }\n }\n if (isHostSpecialCase) {\n const dirDef = tInjectables[directivesStart];\n if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n return directivesStart;\n }\n }\n return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n let value = lView[index];\n const tData = tView.data;\n if (isFactory(value)) {\n const factory = value;\n if (factory.resolving) {\n throwCyclicDependencyError(stringifyForError(tData[index]));\n }\n const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n factory.resolving = true;\n let prevInjectContext;\n if (ngDevMode) {\n // tData indexes mirror the concrete instances in its corresponding LView.\n // lView[index] here is either the injectable instace itself or a factory,\n // therefore tData[index] is the constructor of that injectable or a\n // definition object that contains the constructor in a `.type` field.\n const token = tData[index].type || tData[index];\n const injector = new NodeInjector(tNode, lView);\n prevInjectContext = setInjectorProfilerContext({\n injector,\n token\n });\n }\n const previousInjectImplementation = factory.injectImpl ? setInjectImplementation(factory.injectImpl) : null;\n const success = enterDI(lView, tNode, InjectFlags.Default);\n ngDevMode && assertEqual(success, true, 'Because flags do not contain \\`SkipSelf\\' we expect this to always succeed.');\n try {\n value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n ngDevMode && emitInstanceCreatedByInjectorEvent(value);\n // This code path is hit for both directives and providers.\n // For perf reasons, we want to avoid searching for hooks on providers.\n // It does no harm to try (the hooks just won't exist), but the extra\n // checks are unnecessary and this is a hot path. So we check to see\n // if the index of the dependency is in the directive range for this\n // tNode. If it's not, we know it's a provider and skip hook registration.\n if (tView.firstCreatePass && index >= tNode.directiveStart) {\n ngDevMode && assertDirectiveDef(tData[index]);\n registerPreOrderHooks(index, tData[index], tView);\n }\n } finally {\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n previousInjectImplementation !== null && setInjectImplementation(previousInjectImplementation);\n setIncludeViewProviders(previousIncludeViewProviders);\n factory.resolving = false;\n leaveDI();\n }\n }\n return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n * When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n ngDevMode && assertDefined(token, 'token must be defined');\n if (typeof token === 'string') {\n return token.charCodeAt(0) || 0;\n }\n const tokenId =\n // First check with `hasOwnProperty` so we don't get an inherited ID.\n token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n // Negative token IDs are used for special objects such as `Injector`\n if (typeof tokenId === 'number') {\n if (tokenId >= 0) {\n return tokenId & BLOOM_MASK;\n } else {\n ngDevMode && assertEqual(tokenId, -1 /* InjectorMarkers.Injector */, 'Expecting to get Special Injector Id');\n return createNodeInjector;\n }\n } else {\n return tokenId;\n }\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n // Create a mask that targets the specific bit associated with the directive we're looking for.\n // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n // to bit positions 0 - 31 in a 32 bit integer.\n const mask = 1 << bloomHash;\n // Each bloom bucket in `injectorView` represents `BLOOM_BUCKET_BITS` number of bits of\n // `bloomHash`. Any bits in `bloomHash` beyond `BLOOM_BUCKET_BITS` indicate the bucket offset\n // that should be used.\n const value = injectorView[injectorIndex + (bloomHash >> BLOOM_BUCKET_BITS)];\n // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n // this injector is a potential match.\n return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nfunction getNodeInjectorLView(nodeInjector) {\n return nodeInjector._lView;\n}\nfunction getNodeInjectorTNode(nodeInjector) {\n return nodeInjector._tNode;\n}\nclass NodeInjector {\n constructor(_tNode, _lView) {\n this._tNode = _tNode;\n this._lView = _lView;\n }\n get(token, notFoundValue, flags) {\n return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);\n }\n}\n/** Creates a `NodeInjector` for the current node. */\nfunction createNodeInjector() {\n return new NodeInjector(getCurrentTNode(), getLView());\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n return noSideEffects(() => {\n const ownConstructor = type.prototype.constructor;\n const ownFactory = ownConstructor[NG_FACTORY_DEF] || getFactoryOf(ownConstructor);\n const objectPrototype = Object.prototype;\n let parent = Object.getPrototypeOf(type.prototype).constructor;\n // Go up the prototype until we hit `Object`.\n while (parent && parent !== objectPrototype) {\n const factory = parent[NG_FACTORY_DEF] || getFactoryOf(parent);\n // If we hit something that has a factory and the factory isn't the same as the type,\n // we've found the inherited factory. Note the check that the factory isn't the type's\n // own factory is redundant in most cases, but if the user has custom decorators on the\n // class, this lookup will start one level down in the prototype chain, causing us to\n // find the own factory first and potentially triggering an infinite loop downstream.\n if (factory && factory !== ownFactory) {\n return factory;\n }\n parent = Object.getPrototypeOf(parent);\n }\n // There is no factory defined. Either this was improper usage of inheritance\n // (no Angular decorator on the superclass) or there is no constructor at all\n // in the inheritance chain. Since the two cases cannot be distinguished, the\n // latter has to be assumed.\n return t => new t();\n });\n}\nfunction getFactoryOf(type) {\n if (isForwardRef(type)) {\n return () => {\n const factory = getFactoryOf(resolveForwardRef(type));\n return factory && factory();\n };\n }\n return getFactoryDef(type);\n}\n/**\n * Returns a value from the closest embedded or node injector.\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {\n let currentTNode = tNode;\n let currentLView = lView;\n // When an LView with an embedded view injector is inserted, it'll likely be interlaced with\n // nodes who may have injectors (e.g. node injector -> embedded view injector -> node injector).\n // Since the bloom filters for the node injectors have already been constructed and we don't\n // have a way of extracting the records from an injector, the only way to maintain the correct\n // hierarchy when resolving the value is to walk it node-by-node while attempting to resolve\n // the token at each level.\n while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 /* LViewFlags.HasEmbeddedViewInjector */ && !(currentLView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n ngDevMode && assertTNodeForLView(currentTNode, currentLView);\n // Note that this lookup on the node injector is using the `Self` flag, because\n // we don't want the node injector to look at any parent injectors since we\n // may hit the embedded view injector first.\n const nodeInjectorValue = lookupTokenUsingNodeInjector(currentTNode, currentLView, token, flags | InjectFlags.Self, NOT_FOUND);\n if (nodeInjectorValue !== NOT_FOUND) {\n return nodeInjectorValue;\n }\n // Has an explicit type due to a TS bug: https://github.com/microsoft/TypeScript/issues/33191\n let parentTNode = currentTNode.parent;\n // `TNode.parent` includes the parent within the current view only. If it doesn't exist,\n // it means that we've hit the view boundary and we need to go up to the next view.\n if (!parentTNode) {\n // Before we go to the next LView, check if the token exists on the current embedded injector.\n const embeddedViewInjector = currentLView[EMBEDDED_VIEW_INJECTOR];\n if (embeddedViewInjector) {\n const embeddedViewInjectorValue = embeddedViewInjector.get(token, NOT_FOUND, flags);\n if (embeddedViewInjectorValue !== NOT_FOUND) {\n return embeddedViewInjectorValue;\n }\n }\n // Otherwise keep going up the tree.\n parentTNode = getTNodeFromLView(currentLView);\n currentLView = currentLView[DECLARATION_VIEW];\n }\n currentTNode = parentTNode;\n }\n return notFoundValue;\n}\n/** Gets the TNode associated with an LView inside of the declaration view. */\nfunction getTNodeFromLView(lView) {\n const tView = lView[TVIEW];\n const tViewType = tView.type;\n // The parent pointer differs based on `TView.type`.\n if (tViewType === 2 /* TViewType.Embedded */) {\n ngDevMode && assertDefined(tView.declTNode, 'Embedded TNodes should have declaration parents.');\n return tView.declTNode;\n } else if (tViewType === 1 /* TViewType.Component */) {\n // Components don't have `TView.declTNode` because each instance of component could be\n // inserted in different location, hence `TView.declTNode` is meaningless.\n return lView[T_HOST];\n }\n return null;\n}\n\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n return injectAttributeImpl(getCurrentTNode(), attrNameToInject);\n}\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function DecoratorFactory(...args) {\n if (this instanceof DecoratorFactory) {\n metaCtor.call(this, ...args);\n return this;\n }\n const annotationInstance = new DecoratorFactory(...args);\n return function TypeDecorator(cls) {\n if (typeFn) typeFn(cls, ...args);\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const annotations = cls.hasOwnProperty(ANNOTATIONS) ? cls[ANNOTATIONS] : Object.defineProperty(cls, ANNOTATIONS, {\n value: []\n })[ANNOTATIONS];\n annotations.push(annotationInstance);\n if (additionalProcessing) additionalProcessing(cls);\n return cls;\n };\n }\n if (parentClass) {\n DecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n DecoratorFactory.prototype.ngMetadataName = name;\n DecoratorFactory.annotationCls = DecoratorFactory;\n return DecoratorFactory;\n });\n}\nfunction makeMetadataCtor(props) {\n return function ctor(...args) {\n if (props) {\n const values = props(...args);\n for (const propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory(...args) {\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const annotationInstance = new ParamDecoratorFactory(...args);\n ParamDecorator.annotation = annotationInstance;\n return ParamDecorator;\n function ParamDecorator(cls, unusedKey, index) {\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n const parameters = cls.hasOwnProperty(PARAMETERS) ? cls[PARAMETERS] : Object.defineProperty(cls, PARAMETERS, {\n value: []\n })[PARAMETERS];\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n (parameters[index] = parameters[index] || []).push(annotationInstance);\n return cls;\n }\n }\n if (parentClass) {\n ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n ParamDecoratorFactory.prototype.ngMetadataName = name;\n ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n return ParamDecoratorFactory;\n });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n return noSideEffects(() => {\n const metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory(...args) {\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n const decoratorInstance = new PropDecoratorFactory(...args);\n function PropDecorator(target, name) {\n // target is undefined with standard decorators. This case is not supported and will throw\n // if this decorator is used in JIT mode with standard decorators.\n if (target === undefined) {\n throw new Error('Standard Angular field decorators are not supported in JIT mode.');\n }\n const constructor = target.constructor;\n // Use of Object.defineProperty is important because it creates a non-enumerable property\n // which prevents the property from being copied during subclassing.\n const meta = constructor.hasOwnProperty(PROP_METADATA) ? constructor[PROP_METADATA] : Object.defineProperty(constructor, PROP_METADATA, {\n value: {}\n })[PROP_METADATA];\n meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n meta[name].unshift(decoratorInstance);\n if (additionalProcessing) additionalProcessing(target, name, ...args);\n }\n return PropDecorator;\n }\n if (parentClass) {\n PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n }\n PropDecoratorFactory.prototype.ngMetadataName = name;\n PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n return PropDecoratorFactory;\n });\n}\n\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = /*#__PURE__*/makeParamDecorator('Attribute', attributeName => ({\n attributeName,\n __NG_ELEMENT_ID__: () => ɵɵinjectAttribute(attributeName)\n}));\n\n// Stores the default value of `emitDistinctChangesOnly` when the `emitDistinctChangesOnly` is not\n// explicitly set.\nconst emitDistinctChangesOnlyDefaultValue = true;\n/**\n * Base class for query metadata.\n *\n * @see {@link ContentChildren}\n * @see {@link ContentChild}\n * @see {@link ViewChildren}\n * @see {@link ViewChild}\n *\n * @publicApi\n */\nclass Query {}\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = /*#__PURE__*/makePropDecorator('ContentChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: false,\n descendants: false,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = /*#__PURE__*/makePropDecorator('ContentChild', (selector, data = {}) => ({\n selector,\n first: true,\n isViewQuery: false,\n descendants: true,\n ...data\n}), Query);\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = /*#__PURE__*/makePropDecorator('ViewChildren', (selector, data = {}) => ({\n selector,\n first: false,\n isViewQuery: true,\n descendants: true,\n emitDistinctChangesOnly: emitDistinctChangesOnlyDefaultValue,\n ...data\n}), Query);\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = /*#__PURE__*/makePropDecorator('ViewChild', (selector, data) => ({\n selector,\n first: true,\n isViewQuery: true,\n descendants: true,\n ...data\n}), Query);\nvar FactoryTarget = /*#__PURE__*/function (FactoryTarget) {\n FactoryTarget[FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n FactoryTarget[FactoryTarget[\"Component\"] = 1] = \"Component\";\n FactoryTarget[FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n FactoryTarget[FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n FactoryTarget[FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n return FactoryTarget;\n}(FactoryTarget || {});\nvar R3TemplateDependencyKind = /*#__PURE__*/function (R3TemplateDependencyKind) {\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Directive\"] = 0] = \"Directive\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"Pipe\"] = 1] = \"Pipe\";\n R3TemplateDependencyKind[R3TemplateDependencyKind[\"NgModule\"] = 2] = \"NgModule\";\n return R3TemplateDependencyKind;\n}(R3TemplateDependencyKind || {});\nvar ViewEncapsulation = /*#__PURE__*/function (ViewEncapsulation) {\n ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n // Historically the 1 value was for `Native` encapsulation which has been removed as of v11.\n ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n return ViewEncapsulation;\n}(ViewEncapsulation || {});\nfunction getCompilerFacade(request) {\n const globalNg = _global['ng'];\n if (globalNg && globalNg.ɵcompilerFacade) {\n return globalNg.ɵcompilerFacade;\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Log the type as an error so that a developer can easily navigate to the type from the\n // console.\n console.error(`JIT compilation failed for ${request.kind}`, request.type);\n let message = `The ${request.kind} '${request.type.name}' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.\\n\\n`;\n if (request.usage === 1 /* JitCompilerUsage.PartialDeclaration */) {\n message += `The ${request.kind} is part of a library that has been partially compiled.\\n`;\n message += `However, the Angular Linker has not processed the library such that JIT compilation is used as fallback.\\n`;\n message += '\\n';\n message += `Ideally, the library is processed using the Angular Linker to become fully AOT compiled.\\n`;\n } else {\n message += `JIT compilation is discouraged for production use-cases! Consider using AOT mode instead.\\n`;\n }\n message += `Alternatively, the JIT compiler should be loaded by bootstrapping using '@angular/platform-browser-dynamic' or '@angular/platform-server',\\n`;\n message += `or manually provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`;\n throw new Error(message);\n } else {\n throw new Error('JIT compiler unavailable');\n }\n}\n\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * Determines if the contents of two arrays is identical\n *\n * @param a first array\n * @param b second array\n * @param identityAccessor Optional function for extracting stable object identity from a value in\n * the array.\n */\nfunction arrayEquals(a, b, identityAccessor) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n let valueA = a[i];\n let valueB = b[i];\n if (identityAccessor) {\n valueA = identityAccessor(valueA);\n valueB = identityAccessor(valueB);\n }\n if (valueB !== valueA) {\n return false;\n }\n }\n return true;\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list) {\n return list.flat(Number.POSITIVE_INFINITY);\n}\nfunction deepForEach(input, fn) {\n input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n // perf: array.push is faster than array.splice!\n if (index >= arr.length) {\n arr.push(value);\n } else {\n arr.splice(index, 0, value);\n }\n}\nfunction removeFromArray(arr, index) {\n // perf: array.pop is faster than array.splice!\n if (index >= arr.length - 1) {\n return arr.pop();\n } else {\n return arr.splice(index, 1)[0];\n }\n}\nfunction newArray(size, value) {\n const list = [];\n for (let i = 0; i < size; i++) {\n list.push(value);\n }\n return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n const length = array.length - count;\n while (index < length) {\n array[index] = array[index + count];\n index++;\n }\n while (count--) {\n array.pop(); // shrink the array\n }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n while (end > index) {\n const previousEnd = end - 1;\n array[end] = array[previousEnd];\n end = previousEnd;\n }\n array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n let end = array.length;\n if (end == index) {\n // inserting at the end.\n array.push(value1, value2);\n } else if (end === 1) {\n // corner case when we have less items in array than we have items to insert.\n array.push(value2, array[0]);\n array[0] = value1;\n } else {\n end--;\n array.push(array[end - 1], array[end]);\n while (end > index) {\n const previousEnd = end - 2;\n array[end] = array[previousEnd];\n end--;\n }\n array[index] = value1;\n array[index + 1] = value2;\n }\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * located)\n */\nfunction arrayIndexOfSorted(array, value) {\n return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n let index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it set it.\n keyValueArray[index | 1] = value;\n } else {\n index = ~index;\n arrayInsert2(keyValueArray, index, key, value);\n }\n return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it retrieve it.\n return keyValueArray[index | 1];\n }\n return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n * - positive (even) index if key found.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n * - positive (even) index if key found and deleted.\n * - negative index if key not found. (`~index` (even) to get the index where it should have\n * been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n const index = keyValueArrayIndexOf(keyValueArray, key);\n if (index >= 0) {\n // if we found it remove it.\n arraySplice(keyValueArray, index, 2);\n }\n return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n * - `0` means look at every location\n * - `1` means only look at every other (even) location (the odd locations are to be ignored as\n * they are values.)\n * @returns index of the value.\n * - positive index if value found.\n * - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n let start = 0;\n let end = array.length >> shift;\n while (end !== start) {\n const middle = start + (end - start >> 1); // find the middle.\n const current = array[middle << shift];\n if (value === current) {\n return middle << shift;\n } else if (current > value) {\n end = middle;\n } else {\n start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n }\n }\n\n return ~(end << shift);\n}\n\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * downleveled to ES5 with `downlevelIteration` for TypeScript < 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * or downleveled to ES5 with `downlevelIteration` for TypeScript >= 4.2:\n * ```\n * function MyClass() {\n * var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|(?:[^()]+\\(\\[\\],)?[^()]+\\(arguments\\).*)\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{[^}]*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n return ES5_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) || ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr);\n}\nclass ReflectionCapabilities {\n constructor(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n factory(t) {\n return (...args) => new t(...args);\n }\n /** @internal */\n _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n let result;\n if (typeof paramTypes === 'undefined') {\n result = newArray(paramAnnotations.length);\n } else {\n result = newArray(paramTypes.length);\n }\n for (let i = 0; i < result.length; i++) {\n // TS outputs Object for parameters without types, while Traceur omits\n // the annotations. For now we preserve the Traceur behavior to aid\n // migration, but this can be revisited.\n if (typeof paramTypes === 'undefined') {\n result[i] = [];\n } else if (paramTypes[i] && paramTypes[i] != Object) {\n result[i] = [paramTypes[i]];\n } else {\n result[i] = [];\n }\n if (paramAnnotations && paramAnnotations[i] != null) {\n result[i] = result[i].concat(paramAnnotations[i]);\n }\n }\n return result;\n }\n _ownParameters(type, parentCtor) {\n const typeStr = type.toString();\n // If we have no decorators, we only have function.length as metadata.\n // In that case, to detect whether a child class declared an own constructor or not,\n // we need to look inside of that constructor to check whether it is\n // just calling the parent.\n // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n // that sets 'design:paramtypes' to []\n // if a class inherits from another class but has no ctor declared itself.\n if (isDelegateCtor(typeStr)) {\n return null;\n }\n // Prefer the direct API.\n if (type.parameters && type.parameters !== parentCtor.parameters) {\n return type.parameters;\n }\n // API of tsickle for lowering decorators to properties on the class.\n const tsickleCtorParams = type.ctorParameters;\n if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n // Newer tsickle uses a function closure\n // Retain the non-function case for compatibility with older tsickle\n const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n const paramTypes = ctorParameters.map(ctorParam => ctorParam && ctorParam.type);\n const paramAnnotations = ctorParameters.map(ctorParam => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // API for metadata created by invoking the decorators.\n const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n const paramTypes = this._reflect && this._reflect.getOwnMetadata && this._reflect.getOwnMetadata('design:paramtypes', type);\n if (paramTypes || paramAnnotations) {\n return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n }\n // If a class has no decorators, at least create metadata\n // based on function.length.\n // Note: We know that this is a real constructor as we checked\n // the content of the constructor above.\n return newArray(type.length);\n }\n parameters(type) {\n // Note: only report metadata if we have at least one class decorator\n // to stay in sync with the static reflector.\n if (!isType(type)) {\n return [];\n }\n const parentCtor = getParentCtor(type);\n let parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n }\n _ownAnnotations(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n let annotations = typeOrFunc.annotations;\n if (typeof annotations === 'function' && annotations.annotations) {\n annotations = annotations.annotations;\n }\n return annotations;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n return typeOrFunc[ANNOTATIONS];\n }\n return null;\n }\n annotations(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n }\n _ownPropMetadata(typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata && typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n let propMetadata = typeOrFunc.propMetadata;\n if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n propMetadata = propMetadata.propMetadata;\n }\n return propMetadata;\n }\n // API of tsickle for lowering decorators to properties on the class.\n if (typeOrFunc.propDecorators && typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n const propDecorators = typeOrFunc.propDecorators;\n const propMetadata = {};\n Object.keys(propDecorators).forEach(prop => {\n propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n });\n return propMetadata;\n }\n // API for metadata created by invoking the decorators.\n if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n return typeOrFunc[PROP_METADATA];\n }\n return null;\n }\n propMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n const parentCtor = getParentCtor(typeOrFunc);\n const propMetadata = {};\n if (parentCtor !== Object) {\n const parentPropMetadata = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata).forEach(propName => {\n propMetadata[propName] = parentPropMetadata[propName];\n });\n }\n const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(propName => {\n const decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push(...propMetadata[propName]);\n }\n decorators.push(...ownPropMetadata[propName]);\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n }\n ownPropMetadata(typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n }\n hasLifecycleHook(type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(decoratorInvocation => {\n const decoratorType = decoratorInvocation.type;\n const annotationCls = decoratorType.annotationCls;\n const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new annotationCls(...annotationArgs);\n });\n}\nfunction getParentCtor(ctor) {\n const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n const parentCtor = parentProto ? parentProto.constructor : null;\n // Note: We always use `Object` as the null value\n // to simplify checking later on.\n return parentCtor || Object;\n}\n\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = /*#__PURE__*/attachInjectFlag(\n/*#__PURE__*/\n// Disable tslint because `DecoratorFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nmakeParamDecorator('Inject', token => ({\n token\n})), -1 /* DecoratorFlags.Inject */);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Optional'), 8 /* InternalInjectFlags.Optional */);\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Self'), 2 /* InternalInjectFlags.Self */);\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('SkipSelf'), 4 /* InternalInjectFlags.SkipSelf */);\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host =\n/*#__PURE__*/\n// Disable tslint because `InternalInjectFlags` is a const enum which gets inlined.\n// tslint:disable-next-line: no-toplevel-property-access\nattachInjectFlag( /*#__PURE__*/makeParamDecorator('Host'), 1 /* InternalInjectFlags.Host */);\n\nlet _reflect = null;\nfunction getReflect() {\n return _reflect = _reflect || new ReflectionCapabilities();\n}\nfunction reflectDependencies(type) {\n return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n return deps.map(dep => reflectDependency(dep));\n}\nfunction reflectDependency(dep) {\n const meta = {\n token: null,\n attribute: null,\n host: false,\n optional: false,\n self: false,\n skipSelf: false\n };\n if (Array.isArray(dep) && dep.length > 0) {\n for (let j = 0; j < dep.length; j++) {\n const param = dep[j];\n if (param === undefined) {\n // param may be undefined if type of dep is not set by ngtsc\n continue;\n }\n const proto = Object.getPrototypeOf(param);\n if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n meta.optional = true;\n } else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n meta.skipSelf = true;\n } else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n meta.self = true;\n } else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n meta.host = true;\n } else if (param instanceof Inject) {\n meta.token = param.token;\n } else if (param instanceof Attribute) {\n if (param.attributeName === undefined) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Attribute name must be defined.`);\n }\n meta.attribute = param.attributeName;\n } else {\n meta.token = param;\n }\n }\n } else if (dep === undefined || Array.isArray(dep) && dep.length === 0) {\n meta.token = null;\n } else {\n meta.token = dep;\n }\n return meta;\n}\n\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n * selector: 'my-comp',\n * templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n * // After resolution all URLs have been converted into `template` strings.\n * renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n // Store all promises which are fetching the resources.\n const componentResolved = [];\n // Cache so that we don't fetch the same resource more than once.\n const urlMap = new Map();\n function cachedResourceResolve(url) {\n let promise = urlMap.get(url);\n if (!promise) {\n const resp = resourceResolver(url);\n urlMap.set(url, promise = resp.then(unwrapResponse));\n }\n return promise;\n }\n componentResourceResolutionQueue.forEach((component, type) => {\n const promises = [];\n if (component.templateUrl) {\n promises.push(cachedResourceResolve(component.templateUrl).then(template => {\n component.template = template;\n }));\n }\n const styles = typeof component.styles === 'string' ? [component.styles] : component.styles || [];\n component.styles = styles;\n if (component.styleUrl && component.styleUrls?.length) {\n throw new Error('@Component cannot define both `styleUrl` and `styleUrls`. ' + 'Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple');\n } else if (component.styleUrls?.length) {\n const styleOffset = component.styles.length;\n const styleUrls = component.styleUrls;\n component.styleUrls.forEach((styleUrl, index) => {\n styles.push(''); // pre-allocate array.\n promises.push(cachedResourceResolve(styleUrl).then(style => {\n styles[styleOffset + index] = style;\n styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n if (styleUrls.length == 0) {\n component.styleUrls = undefined;\n }\n }));\n });\n } else if (component.styleUrl) {\n promises.push(cachedResourceResolve(component.styleUrl).then(style => {\n styles.push(style);\n component.styleUrl = undefined;\n }));\n }\n const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n componentResolved.push(fullyResolved);\n });\n clearResolutionOfComponentResourcesQueue();\n return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = /*#__PURE__*/new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = /*#__PURE__*/new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n if (componentNeedsResolution(metadata)) {\n componentResourceResolutionQueue.set(type, metadata);\n componentDefPendingResolution.add(type);\n }\n}\nfunction isComponentDefPendingResolution(type) {\n return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n return !!(component.templateUrl && !component.hasOwnProperty('template') || component.styleUrls && component.styleUrls.length || component.styleUrl);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n const old = componentResourceResolutionQueue;\n componentResourceResolutionQueue = new Map();\n return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n componentDefPendingResolution.clear();\n queue.forEach((_, type) => componentDefPendingResolution.add(type));\n componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n componentDefPendingResolution.delete(type);\n}\n\n/**\n * A multi-provider token for initialization functions that will run upon construction of an\n * environment injector.\n *\n * @publicApi\n */\nconst ENVIRONMENT_INITIALIZER = /*#__PURE__*/new InjectionToken('ENVIRONMENT_INITIALIZER');\n\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR = /*#__PURE__*/new InjectionToken('INJECTOR',\n// Disable tslint because this is const enum which gets inlined not top level prop access.\n// tslint:disable-next-line: no-toplevel-property-access\n-1 /* InjectorMarkers.Injector */);\n\nconst INJECTOR_DEF_TYPES = /*#__PURE__*/new InjectionToken('INJECTOR_DEF_TYPES');\nclass NullInjector {\n get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n if (notFoundValue === THROW_IF_NOT_FOUND) {\n const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n error.name = 'NullInjectorError';\n throw error;\n }\n return notFoundValue;\n }\n}\n\n/**\n * Wrap an array of `Provider`s into `EnvironmentProviders`, preventing them from being accidentally\n * referenced in `@Component` in a component injector.\n */\nfunction makeEnvironmentProviders(providers) {\n return {\n ɵproviders: providers\n };\n}\n/**\n * Collects providers from all NgModules and standalone components, including transitively imported\n * ones.\n *\n * Providers extracted via `importProvidersFrom` are only usable in an application injector or\n * another environment injector (such as a route injector). They should not be used in component\n * providers.\n *\n * More information about standalone components can be found in [this\n * guide](guide/standalone-components).\n *\n * @usageNotes\n * The results of the `importProvidersFrom` call can be used in the `bootstrapApplication` call:\n *\n * ```typescript\n * await bootstrapApplication(RootComponent, {\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ]\n * });\n * ```\n *\n * You can also use the `importProvidersFrom` results in the `providers` field of a route, when a\n * standalone component is used:\n *\n * ```typescript\n * export const ROUTES: Route[] = [\n * {\n * path: 'foo',\n * providers: [\n * importProvidersFrom(NgModuleOne, NgModuleTwo)\n * ],\n * component: YourStandaloneComponent\n * }\n * ];\n * ```\n *\n * @returns Collected providers from the specified list of types.\n * @publicApi\n */\nfunction importProvidersFrom(...sources) {\n return {\n ɵproviders: internalImportProvidersFrom(true, sources),\n ɵfromNgModule: true\n };\n}\nfunction internalImportProvidersFrom(checkForStandaloneCmp, ...sources) {\n const providersOut = [];\n const dedup = new Set(); // already seen types\n let injectorTypesWithProviders;\n const collectProviders = provider => {\n providersOut.push(provider);\n };\n deepForEach(sources, source => {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && checkForStandaloneCmp) {\n const cmpDef = getComponentDef(source);\n if (cmpDef?.standalone) {\n throw new RuntimeError(800 /* RuntimeErrorCode.IMPORT_PROVIDERS_FROM_STANDALONE */, `Importing providers supports NgModule or ModuleWithProviders but got a standalone component \"${stringifyForError(source)}\"`);\n }\n }\n // Narrow `source` to access the internal type analogue for `ModuleWithProviders`.\n const internalSource = source;\n if (walkProviderTree(internalSource, collectProviders, [], dedup)) {\n injectorTypesWithProviders ||= [];\n injectorTypesWithProviders.push(internalSource);\n }\n });\n // Collect all providers from `ModuleWithProviders` types.\n if (injectorTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(injectorTypesWithProviders, collectProviders);\n }\n return providersOut;\n}\n/**\n * Collects all providers from the list of `ModuleWithProviders` and appends them to the provided\n * array.\n */\nfunction processInjectorTypesWithProviders(typesWithProviders, visitor) {\n for (let i = 0; i < typesWithProviders.length; i++) {\n const {\n ngModule,\n providers\n } = typesWithProviders[i];\n deepForEachProvider(providers, provider => {\n ngDevMode && validateProvider(provider, providers || EMPTY_ARRAY, ngModule);\n visitor(provider, ngModule);\n });\n }\n}\n/**\n * The logic visits an `InjectorType`, an `InjectorTypeWithProviders`, or a standalone\n * `ComponentType`, and all of its transitive providers and collects providers.\n *\n * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n * the function will return \"true\" to indicate that the providers of the type definition need\n * to be processed. This allows us to process providers of injector types after all imports of\n * an injector definition are processed. (following View Engine semantics: see FW-1349)\n */\nfunction walkProviderTree(container, visitor, parents, dedup) {\n container = resolveForwardRef(container);\n if (!container) return false;\n // The actual type which had the definition. Usually `container`, but may be an unwrapped type\n // from `InjectorTypeWithProviders`.\n let defType = null;\n let injDef = getInjectorDef(container);\n const cmpDef = !injDef && getComponentDef(container);\n if (!injDef && !cmpDef) {\n // `container` is not an injector type or a component type. It might be:\n // * An `InjectorTypeWithProviders` that wraps an injector type.\n // * A standalone directive or pipe that got pulled in from a standalone component's\n // dependencies.\n // Try to unwrap it as an `InjectorTypeWithProviders` first.\n const ngModule = container.ngModule;\n injDef = getInjectorDef(ngModule);\n if (injDef) {\n defType = ngModule;\n } else {\n // Not a component or injector type, so ignore it.\n return false;\n }\n } else if (cmpDef && !cmpDef.standalone) {\n return false;\n } else {\n defType = container;\n }\n // Check for circular dependencies.\n if (ngDevMode && parents.indexOf(defType) !== -1) {\n const defName = stringify(defType);\n const path = parents.map(stringify);\n throwCyclicDependencyError(defName, path);\n }\n // Check for multiple imports of the same module\n const isDuplicate = dedup.has(defType);\n if (cmpDef) {\n if (isDuplicate) {\n // This component definition has already been processed.\n return false;\n }\n dedup.add(defType);\n if (cmpDef.dependencies) {\n const deps = typeof cmpDef.dependencies === 'function' ? cmpDef.dependencies() : cmpDef.dependencies;\n for (const dep of deps) {\n walkProviderTree(dep, visitor, parents, dedup);\n }\n }\n } else if (injDef) {\n // First, include providers from any imports.\n if (injDef.imports != null && !isDuplicate) {\n // Before processing defType's imports, add it to the set of parents. This way, if it ends\n // up deeply importing itself, this can be detected.\n ngDevMode && parents.push(defType);\n // Add it to the set of dedups. This way we can detect multiple imports of the same module\n dedup.add(defType);\n let importTypesWithProviders;\n try {\n deepForEach(injDef.imports, imported => {\n if (walkProviderTree(imported, visitor, parents, dedup)) {\n importTypesWithProviders ||= [];\n // If the processed import is an injector type with providers, we store it in the\n // list of import types with providers, so that we can process those afterwards.\n importTypesWithProviders.push(imported);\n }\n });\n } finally {\n // Remove it from the parents set when finished.\n ngDevMode && parents.pop();\n }\n // Imports which are declared with providers (TypeWithProviders) need to be processed\n // after all imported modules are processed. This is similar to how View Engine\n // processes/merges module imports in the metadata resolver. See: FW-1349.\n if (importTypesWithProviders !== undefined) {\n processInjectorTypesWithProviders(importTypesWithProviders, visitor);\n }\n }\n if (!isDuplicate) {\n // Track the InjectorType and add a provider for it.\n // It's important that this is done after the def's imports.\n const factory = getFactoryDef(defType) || (() => new defType());\n // Append extra providers to make more info available for consumers (to retrieve an injector\n // type), as well as internally (to calculate an injection scope correctly and eagerly\n // instantiate a `defType` when an injector is created).\n // Provider to create `defType` using its factory.\n visitor({\n provide: defType,\n useFactory: factory,\n deps: EMPTY_ARRAY\n }, defType);\n // Make this `defType` available to an internal logic that calculates injector scope.\n visitor({\n provide: INJECTOR_DEF_TYPES,\n useValue: defType,\n multi: true\n }, defType);\n // Provider to eagerly instantiate `defType` via `INJECTOR_INITIALIZER`.\n visitor({\n provide: ENVIRONMENT_INITIALIZER,\n useValue: () => ɵɵinject(defType),\n multi: true\n }, defType);\n }\n // Next, include providers listed on the definition itself.\n const defProviders = injDef.providers;\n if (defProviders != null && !isDuplicate) {\n const injectorType = container;\n deepForEachProvider(defProviders, provider => {\n ngDevMode && validateProvider(provider, defProviders, injectorType);\n visitor(provider, injectorType);\n });\n }\n } else {\n // Should not happen, but just in case.\n return false;\n }\n return defType !== container && container.providers !== undefined;\n}\nfunction validateProvider(provider, providers, containerType) {\n if (isTypeProvider(provider) || isValueProvider(provider) || isFactoryProvider(provider) || isExistingProvider(provider)) {\n return;\n }\n // Here we expect the provider to be a `useClass` provider (by elimination).\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (!classRef) {\n throwInvalidProviderError(containerType, providers, provider);\n }\n}\nfunction deepForEachProvider(providers, fn) {\n for (let provider of providers) {\n if (isEnvironmentProviders(provider)) {\n provider = provider.ɵproviders;\n }\n if (Array.isArray(provider)) {\n deepForEachProvider(provider, fn);\n } else {\n fn(provider);\n }\n }\n}\nconst USE_VALUE$1 = /*#__PURE__*/getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isValueProvider(value) {\n return value !== null && typeof value == 'object' && USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n return !!value.useClass;\n}\n\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = /*#__PURE__*/new InjectionToken('Set Injector scope.');\n\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR === undefined) {\n NULL_INJECTOR = new NullInjector();\n }\n return NULL_INJECTOR;\n}\n/**\n * An `Injector` that's part of the environment injector hierarchy, which exists outside of the\n * component tree.\n */\nclass EnvironmentInjector {}\nclass R3Injector extends EnvironmentInjector {\n /**\n * Flag indicating that this injector was previously destroyed.\n */\n get destroyed() {\n return this._destroyed;\n }\n constructor(providers, parent, source, scopes) {\n super();\n this.parent = parent;\n this.source = source;\n this.scopes = scopes;\n /**\n * Map of tokens to records which contain the instances of those tokens.\n * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n * to prevent further searches.\n */\n this.records = new Map();\n /**\n * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n */\n this._ngOnDestroyHooks = new Set();\n this._onDestroyHooks = [];\n this._destroyed = false;\n // Start off by creating Records for every provider.\n forEachSingleProvider(providers, provider => this.processProvider(provider));\n // Make sure the INJECTOR token provides this injector.\n this.records.set(INJECTOR, makeRecord(undefined, this));\n // And `EnvironmentInjector` if the current injector is supposed to be env-scoped.\n if (scopes.has('environment')) {\n this.records.set(EnvironmentInjector, makeRecord(undefined, this));\n }\n // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n // any injectable scoped to APP_ROOT_SCOPE.\n const record = this.records.get(INJECTOR_SCOPE);\n if (record != null && typeof record.value === 'string') {\n this.scopes.add(record.value);\n }\n this.injectorDefTypes = new Set(this.get(INJECTOR_DEF_TYPES, EMPTY_ARRAY, InjectFlags.Self));\n }\n /**\n * Destroy the injector and release references to every instance or provider associated with it.\n *\n * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n * hook was found.\n */\n destroy() {\n this.assertNotDestroyed();\n // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n this._destroyed = true;\n try {\n // Call all the lifecycle hooks.\n for (const service of this._ngOnDestroyHooks) {\n service.ngOnDestroy();\n }\n const onDestroyHooks = this._onDestroyHooks;\n // Reset the _onDestroyHooks array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n this._onDestroyHooks = [];\n for (const hook of onDestroyHooks) {\n hook();\n }\n } finally {\n // Release all references.\n this.records.clear();\n this._ngOnDestroyHooks.clear();\n this.injectorDefTypes.clear();\n }\n }\n onDestroy(callback) {\n this.assertNotDestroyed();\n this._onDestroyHooks.push(callback);\n return () => this.removeOnDestroy(callback);\n }\n runInContext(fn) {\n this.assertNotDestroyed();\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n return fn();\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n this.assertNotDestroyed();\n if (token.hasOwnProperty(NG_ENV_ID)) {\n return token[NG_ENV_ID](this);\n }\n flags = convertToBitFlags(flags);\n // Set the injection context.\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: token\n });\n }\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & InjectFlags.SkipSelf)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n let record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an injectable\n // def with a scope matching this injector.\n const def = couldBeInjectableType(token) && getInjectableDef(token);\n if (def && this.injectableDefInScope(def)) {\n // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n // all along.\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n emitProviderConfiguredEvent(token);\n });\n }\n record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n } else {\n record = null;\n }\n this.records.set(token, record);\n }\n // If a record was found, get the instance for it and return it.\n if (record != null /* NOT null || undefined */) {\n return this.hydrate(token, record);\n }\n }\n // Select the next injector based on the Self flag - if self is set, the next injector is\n // the NullInjector, otherwise it's the parent.\n const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n // is undefined, the value is null, otherwise it's the notFoundValue.\n notFoundValue = flags & InjectFlags.Optional && notFoundValue === THROW_IF_NOT_FOUND ? null : notFoundValue;\n return nextInjector.get(token, notFoundValue);\n } catch (e) {\n if (e.name === 'NullInjectorError') {\n const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(stringify(token));\n if (previousInjector) {\n // We still have a parent injector, keep throwing\n throw e;\n } else {\n // Format & throw the final error message when we don't have any previous injector\n return catchInjectorError(e, token, 'R3InjectorError', this.source);\n }\n } else {\n throw e;\n }\n } finally {\n // Lastly, restore the previous injection context.\n setInjectImplementation(previousInjectImplementation);\n setCurrentInjector(previousInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n /** @internal */\n resolveInjectorInitializers() {\n const previousInjector = setCurrentInjector(this);\n const previousInjectImplementation = setInjectImplementation(undefined);\n let prevInjectContext;\n if (ngDevMode) {\n prevInjectContext = setInjectorProfilerContext({\n injector: this,\n token: null\n });\n }\n try {\n const initializers = this.get(ENVIRONMENT_INITIALIZER, EMPTY_ARRAY, InjectFlags.Self);\n if (ngDevMode && !Array.isArray(initializers)) {\n throw new RuntimeError(-209 /* RuntimeErrorCode.INVALID_MULTI_PROVIDER */, 'Unexpected type of the `ENVIRONMENT_INITIALIZER` token value ' + `(expected an array, but got ${typeof initializers}). ` + 'Please check that the `ENVIRONMENT_INITIALIZER` token is configured as a ' + '`multi: true` provider.');\n }\n for (const initializer of initializers) {\n initializer();\n }\n } finally {\n setCurrentInjector(previousInjector);\n setInjectImplementation(previousInjectImplementation);\n ngDevMode && setInjectorProfilerContext(prevInjectContext);\n }\n }\n toString() {\n const tokens = [];\n const records = this.records;\n for (const token of records.keys()) {\n tokens.push(stringify(token));\n }\n return `R3Injector[${tokens.join(', ')}]`;\n }\n assertNotDestroyed() {\n if (this._destroyed) {\n throw new RuntimeError(205 /* RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED */, ngDevMode && 'Injector has already been destroyed.');\n }\n }\n /**\n * Process a `SingleProvider` and add it.\n */\n processProvider(provider) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n // Construct a `Record` for the provider.\n const record = providerToRecord(provider);\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n // Emit InjectorProfilerEventType.Create if provider is a value provider because\n // these are the only providers that do not go through the value hydration logic\n // where this event would normally be emitted from.\n if (isValueProvider(provider)) {\n emitInstanceCreatedByInjectorEvent(provider.useValue);\n }\n emitProviderConfiguredEvent(provider);\n });\n }\n if (!isTypeProvider(provider) && provider.multi === true) {\n // If the provider indicates that it's a multi-provider, process it specially.\n // First check whether it's been defined already.\n let multiRecord = this.records.get(token);\n if (multiRecord) {\n // It has. Throw a nice error if\n if (ngDevMode && multiRecord.multi === undefined) {\n throwMixedMultiProviderError();\n }\n } else {\n multiRecord = makeRecord(undefined, NOT_YET, true);\n multiRecord.factory = () => injectArgs(multiRecord.multi);\n this.records.set(token, multiRecord);\n }\n token = provider;\n multiRecord.multi.push(provider);\n } else {\n const existing = this.records.get(token);\n if (ngDevMode && existing && existing.multi !== undefined) {\n throwMixedMultiProviderError();\n }\n }\n this.records.set(token, record);\n }\n hydrate(token, record) {\n if (ngDevMode && record.value === CIRCULAR) {\n throwCyclicDependencyError(stringify(token));\n } else if (record.value === NOT_YET) {\n record.value = CIRCULAR;\n if (ngDevMode) {\n runInInjectorProfilerContext(this, token, () => {\n record.value = record.factory();\n emitInstanceCreatedByInjectorEvent(record.value);\n });\n } else {\n record.value = record.factory();\n }\n }\n if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n this._ngOnDestroyHooks.add(record.value);\n }\n return record.value;\n }\n injectableDefInScope(def) {\n if (!def.providedIn) {\n return false;\n }\n const providedIn = resolveForwardRef(def.providedIn);\n if (typeof providedIn === 'string') {\n return providedIn === 'any' || this.scopes.has(providedIn);\n } else {\n return this.injectorDefTypes.has(providedIn);\n }\n }\n removeOnDestroy(callback) {\n const destroyCBIdx = this._onDestroyHooks.indexOf(callback);\n if (destroyCBIdx !== -1) {\n this._onDestroyHooks.splice(destroyCBIdx, 1);\n }\n }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n const injectableDef = getInjectableDef(token);\n const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n if (factory !== null) {\n return factory;\n }\n // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n // If it's missing that, it's an error.\n if (token instanceof InjectionToken) {\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Token ${stringify(token)} is missing a ɵprov definition.`);\n }\n // Undecorated types can sometimes be created if they have no constructor arguments.\n if (token instanceof Function) {\n return getUndecoratedInjectableFactory(token);\n }\n // There was no way to resolve a factory for this token.\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && 'unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n const paramLength = token.length;\n if (paramLength > 0) {\n const args = newArray(paramLength, '?');\n throw new RuntimeError(204 /* RuntimeErrorCode.INVALID_INJECTION_TOKEN */, ngDevMode && `Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n }\n // The constructor function appears to have no parameters.\n // This might be because it inherits from a super-class. In which case, use an injectable\n // def from an ancestor if there is one.\n // Otherwise this really is a simple class with no dependencies, so return a factory that\n // just instantiates the zero-arg constructor.\n const inheritedInjectableDef = getInheritedInjectableDef(token);\n if (inheritedInjectableDef !== null) {\n return () => inheritedInjectableDef.factory(token);\n } else {\n return () => new token();\n }\n}\nfunction providerToRecord(provider) {\n if (isValueProvider(provider)) {\n return makeRecord(undefined, provider.useValue);\n } else {\n const factory = providerToFactory(provider);\n return makeRecord(factory, NOT_YET);\n }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n let factory = undefined;\n if (ngDevMode && isEnvironmentProviders(provider)) {\n throwInvalidProviderError(undefined, providers, provider);\n }\n if (isTypeProvider(provider)) {\n const unwrappedProvider = resolveForwardRef(provider);\n return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n } else {\n if (isValueProvider(provider)) {\n factory = () => resolveForwardRef(provider.useValue);\n } else if (isFactoryProvider(provider)) {\n factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n } else if (isExistingProvider(provider)) {\n factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n } else {\n const classRef = resolveForwardRef(provider && (provider.useClass || provider.provide));\n if (ngDevMode && !classRef) {\n throwInvalidProviderError(ngModuleType, providers, provider);\n }\n if (hasDeps(provider)) {\n factory = () => new classRef(...injectArgs(provider.deps));\n } else {\n return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n }\n }\n }\n return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined\n };\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return value !== null && typeof value === 'object' && typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n return typeof value === 'function' || typeof value === 'object' && value instanceof InjectionToken;\n}\nfunction forEachSingleProvider(providers, fn) {\n for (const provider of providers) {\n if (Array.isArray(provider)) {\n forEachSingleProvider(provider, fn);\n } else if (provider && isEnvironmentProviders(provider)) {\n forEachSingleProvider(provider.ɵproviders, fn);\n } else {\n fn(provider);\n }\n }\n}\n\n/**\n * Runs the given function in the [context](guide/dependency-injection-context) of the given\n * `Injector`.\n *\n * Within the function's stack frame, [`inject`](api/core/inject) can be used to inject dependencies\n * from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in\n * any asynchronous callbacks or after any `await` points.\n *\n * @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`\n * is executing\n * @param fn the closure to be run in the context of `injector`\n * @returns the return value of the function, if any\n * @publicApi\n */\nfunction runInInjectionContext(injector, fn) {\n if (injector instanceof R3Injector) {\n injector.assertNotDestroyed();\n }\n let prevInjectorProfilerContext;\n if (ngDevMode) {\n prevInjectorProfilerContext = setInjectorProfilerContext({\n injector,\n token: null\n });\n }\n const prevInjector = setCurrentInjector(injector);\n const previousInjectImplementation = setInjectImplementation(undefined);\n try {\n return fn();\n } finally {\n setCurrentInjector(prevInjector);\n ngDevMode && setInjectorProfilerContext(prevInjectorProfilerContext);\n setInjectImplementation(previousInjectImplementation);\n }\n}\n/**\n * Asserts that the current stack frame is within an [injection\n * context](guide/dependency-injection-context) and has access to `inject`.\n *\n * @param debugFn a reference to the function making the assertion (used for the error message).\n *\n * @publicApi\n */\nfunction assertInInjectionContext(debugFn) {\n // Taking a `Function` instead of a string name here prevents the unminified name of the function\n // from being retained in the bundle regardless of minification.\n if (!getInjectImplementation() && !getCurrentInjector()) {\n throw new RuntimeError(-203 /* RuntimeErrorCode.MISSING_INJECTION_CONTEXT */, ngDevMode && debugFn.name + '() can only be used within an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`');\n }\n}\n\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n 'ɵɵdefineInjectable': ɵɵdefineInjectable,\n 'ɵɵdefineInjector': ɵɵdefineInjector,\n 'ɵɵinject': ɵɵinject,\n 'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n 'resolveForwardRef': resolveForwardRef\n};\n\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, meta) {\n let ngInjectableDef = null;\n let ngFactoryDef = null;\n // if NG_PROV_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_PROV_DEF)) {\n Object.defineProperty(type, NG_PROV_DEF, {\n get: () => {\n if (ngInjectableDef === null) {\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'injectable',\n type\n });\n ngInjectableDef = compiler.compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, meta));\n }\n return ngInjectableDef;\n }\n });\n }\n // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n Object.defineProperty(type, NG_FACTORY_DEF, {\n get: () => {\n if (ngFactoryDef === null) {\n const compiler = getCompilerFacade({\n usage: 0 /* JitCompilerUsage.Decorator */,\n kind: 'injectable',\n type\n });\n ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n name: type.name,\n type,\n typeArgumentCount: 0,\n deps: reflectDependencies(type),\n target: compiler.FactoryTarget.Injectable\n });\n }\n return ngFactoryDef;\n },\n // Leave this configurable so that the factories from directives or pipes can take precedence.\n configurable: true\n });\n }\n}\nconst USE_VALUE = /*#__PURE__*/getClosureSafeProperty({\n provide: String,\n useValue: getClosureSafeProperty\n});\nfunction isUseClassProvider(meta) {\n return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n return USE_VALUE in meta;\n}\nfunction isUseFactoryProvider(meta) {\n return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n const meta = srcMeta || {\n providedIn: null\n };\n const compilerMeta = {\n name: type.name,\n type: type,\n typeArgumentCount: 0,\n providedIn: meta.providedIn\n };\n if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n compilerMeta.deps = convertDependencies(meta.deps);\n }\n // Check to see if the user explicitly provided a `useXxxx` property.\n if (isUseClassProvider(meta)) {\n compilerMeta.useClass = meta.useClass;\n } else if (isUseValueProvider(meta)) {\n compilerMeta.useValue = meta.useValue;\n } else if (isUseFactoryProvider(meta)) {\n compilerMeta.useFactory = meta.useFactory;\n } else if (isUseExistingProvider(meta)) {\n compilerMeta.useExisting = meta.useExisting;\n }\n return compilerMeta;\n}\n\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = /*#__PURE__*/makeDecorator('Injectable', undefined, undefined, undefined, (type, meta) => compileInjectable(type, meta));\n\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType`s.\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n injector.resolveInjectorInitializers();\n return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name, scopes = new Set()) {\n const providers = [additionalProviders || EMPTY_ARRAY, importProvidersFrom(defType)];\n name = name || (typeof defType === 'object' ? undefined : stringify(defType));\n return new R3Injector(providers, parent || getNullInjector(), name || null, scopes);\n}\n\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see {@link StaticProvider}\n *\n * @usageNotes\n *\n * The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nlet Injector = /*#__PURE__*/(() => {\n class Injector {\n static {\n this.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\n }\n static {\n this.NULL = /* @__PURE__ */new NullInjector();\n }\n static create(options, parent) {\n if (Array.isArray(options)) {\n return createInjector({\n name: ''\n }, parent, options, '');\n } else {\n const name = options.name ?? '';\n return createInjector({\n name\n }, options.parent, options.providers, name);\n }\n }\n /** @nocollapse */\n static {\n this.ɵprov = ɵɵdefineInjectable({\n token: Injector,\n providedIn: 'any',\n factory: () => ɵɵinject(INJECTOR)\n });\n }\n /**\n * @internal\n * @nocollapse\n */\n static {\n this.__NG_ELEMENT_ID__ = -1 /* InjectorMarkers.Injector */;\n }\n }\n return Injector;\n})();\n/**\n * @module\n * @description\n * The `di` module provides dependency injection container services.\n */\n/**\n * This file should not be necessary because node resolution should just default to `./di/index`!\n *\n * However it does not seem to work and it breaks:\n * - //packages/animations/browser/test:test_web_chromium-local\n * - //packages/compiler-cli/test:extract_i18n\n * - //packages/compiler-cli/test:ngc\n * - //packages/compiler-cli/test:perform_watch\n * - //packages/compiler-cli/test/diagnostics:check_types\n * - //packages/compiler-cli/test/transformers:test\n * - //packages/compiler/test:test\n * - //tools/public_api_guard:core_api\n *\n * Remove this file once the above is solved or wait until `ngc` is deleted and then it should be\n * safe to delete this file.\n */\nfunction isModuleWithProviders(value) {\n return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n return !!getNgModuleDef(value);\n}\nfunction isPipe(value) {\n return !!getPipeDef$1(value);\n}\nfunction isDirective(value) {\n return !!getDirectiveDef(value);\n}\nfunction isComponent(value) {\n return !!getComponentDef(value);\n}\nfunction getDependencyTypeForError(type) {\n if (getComponentDef(type)) return 'component';\n if (getDirectiveDef(type)) return 'directive';\n if (getPipeDef$1(type)) return 'pipe';\n return 'type';\n}\nfunction verifyStandaloneImport(depType, importingType) {\n if (isForwardRef(depType)) {\n depType = resolveForwardRef(depType);\n if (!depType) {\n throw new Error(`Expected forwardRef function, imported from \"${stringifyForError(importingType)}\", to return a standalone entity or NgModule but got \"${stringifyForError(depType) || depType}\".`);\n }\n }\n if (getNgModuleDef(depType) == null) {\n const def = getComponentDef(depType) || getDirectiveDef(depType) || getPipeDef$1(depType);\n if (def != null) {\n // if a component, directive or pipe is imported make sure that it is standalone\n if (!def.standalone) {\n throw new Error(`The \"${stringifyForError(depType)}\" ${getDependencyTypeForError(depType)}, imported from \"${stringifyForError(importingType)}\", is not standalone. Did you forget to add the standalone: true flag?`);\n }\n } else {\n // it can be either a module with provider or an unknown (not annotated) type\n if (isModuleWithProviders(depType)) {\n throw new Error(`A module with providers was imported from \"${stringifyForError(importingType)}\". Modules with providers are not supported in standalone components imports.`);\n } else {\n throw new Error(`The \"${stringifyForError(depType)}\" type, imported from \"${stringifyForError(importingType)}\", must be a standalone component / directive / pipe or an NgModule. Did you forget to add the required @Component / @Directive / @Pipe or @NgModule annotation?`);\n }\n }\n }\n}\n\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser` and `Server`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n if (DOCUMENT !== undefined) {\n return DOCUMENT;\n } else if (typeof document !== 'undefined') {\n return document;\n }\n throw new RuntimeError(210 /* RuntimeErrorCode.MISSING_DOCUMENT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `The document object is not available in this context. Make sure the DOCUMENT injection token is provided.`);\n // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n // the current platform is not a browser. Since this is not a supported scenario at the moment\n // this should not happen in Angular apps.\n // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n // public API.\n}\n\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated} is being used.\n *\n * The token is needed in cases when multiple applications are bootstrapped on a page\n * (for example, using `bootstrapApplication` calls). In this case, ensure that those applications\n * have different `APP_ID` value setup. For example:\n *\n * ```\n * bootstrapApplication(ComponentA, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-a' },\n * // ... other providers ...\n * ]\n * });\n *\n * bootstrapApplication(ComponentB, {\n * providers: [\n * { provide: APP_ID, useValue: 'app-b' },\n * // ... other providers ...\n * ]\n * });\n * ```\n *\n * By default, when there is only one application bootstrapped, you don't need to provide the\n * `APP_ID` token (the `ng` will be used as an app ID).\n *\n * @publicApi\n */\nconst APP_ID = /*#__PURE__*/new InjectionToken('AppId', {\n providedIn: 'root',\n factory: () => DEFAULT_APP_ID\n});\n/** Default value of the `APP_ID` token. */\nconst DEFAULT_APP_ID = 'ng';\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = /*#__PURE__*/new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = /*#__PURE__*/new InjectionToken('Platform ID', {\n providedIn: 'platform',\n factory: () => 'unknown' // set a default platform name, when none set explicitly\n});\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n * @deprecated\n */\nconst PACKAGE_ROOT_URL = /*#__PURE__*/new InjectionToken('Application Packages Root URL');\n// We keep this token here, rather than the animations package, so that modules that only care\n// about which animations module is loaded (e.g. the CDK) can retrieve it without having to\n// include extra dependencies. See #44970 for more context.\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates which animations\n * module has been loaded.\n * @publicApi\n */\nconst ANIMATION_MODULE_TYPE = /*#__PURE__*/new InjectionToken('AnimationModuleType');\n// TODO(crisbeto): link to CSP guide here.\n/**\n * Token used to configure the [Content Security Policy](https://web.dev/strict-csp/) nonce that\n * Angular will apply when inserting inline styles. If not provided, Angular will look up its value\n * from the `ngCspNonce` attribute of the application root node.\n *\n * @publicApi\n */\nconst CSP_NONCE = /*#__PURE__*/new InjectionToken('CSP nonce', {\n providedIn: 'root',\n factory: () => {\n // Ideally we wouldn't have to use `querySelector` here since we know that the nonce will be on\n // the root node, but because the token value is used in renderers, it has to be available\n // *very* early in the bootstrapping process. This should be a fairly shallow search, because\n // the app won't have been added to the DOM yet. Some approaches that were considered:\n // 1. Find the root node through `ApplicationRef.components[i].location` - normally this would\n // be enough for our purposes, but the token is injected very early so the `components` array\n // isn't populated yet.\n // 2. Find the root `LView` through the current `LView` - renderers are a prerequisite to\n // creating the `LView`. This means that no `LView` will have been entered when this factory is\n // invoked for the root component.\n // 3. Have the token factory return `() => string` which is invoked when a nonce is requested -\n // the slightly later execution does allow us to get an `LView` reference, but the fact that\n // it is a function means that it could be executed at *any* time (including immediately) which\n // may lead to weird bugs.\n // 4. Have the `ComponentFactory` read the attribute and provide it to the injector under the\n // hood - has the same problem as #1 and #2 in that the renderer is used to query for the root\n // node and the nonce value needs to be available when the renderer is created.\n return getDocument().body?.querySelector('[ngCspNonce]')?.getAttribute('ngCspNonce') || null;\n }\n});\nconst IMAGE_CONFIG_DEFAULTS = {\n breakpoints: [16, 32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n disableImageSizeWarning: false,\n disableImageLazyLoadWarning: false\n};\n/**\n * Injection token that configures the image optimized image functionality.\n * See {@link ImageConfig} for additional information about parameters that\n * can be used.\n *\n * @see {@link NgOptimizedImage}\n * @see {@link ImageConfig}\n * @publicApi\n */\nconst IMAGE_CONFIG = /*#__PURE__*/new InjectionToken('ImageConfig', {\n providedIn: 'root',\n factory: () => IMAGE_CONFIG_DEFAULTS\n});\n\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n return element.ownerDocument.defaultView;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n return element.ownerDocument;\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n return element.ownerDocument.body;\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n if (value instanceof Function) {\n return value();\n } else {\n return value;\n }\n}\n/**\n * Detects whether the code is invoked in a browser.\n * Later on, this check should be replaced with a tree-shakable\n * flag (e.g. `!isServer`).\n */\nfunction isPlatformBrowser(injector) {\n return (injector ?? inject(Injector)).get(PLATFORM_ID) === 'browser';\n}\n\n/**\n * Indicates whether to use the runtime dependency tracker for scope calculation in JIT compilation.\n * The value \"false\" means the old code path based on patching scope info into the types will be\n * used.\n *\n * @deprecated For migration purposes only, to be removed soon.\n */\nconst USE_RUNTIME_DEPS_TRACKER_FOR_JIT = true;\n/**\n * An implementation of DepsTrackerApi which will be used for JIT and local compilation.\n */\nclass DepsTracker {\n constructor() {\n this.ownerNgModule = new Map();\n this.ngModulesWithSomeUnresolvedDecls = new Set();\n this.ngModulesScopeCache = new Map();\n this.standaloneComponentsScopeCache = new Map();\n }\n /**\n * Attempts to resolve ng module's forward ref declarations as much as possible and add them to\n * the `ownerNgModule` map. This method normally should be called after the initial parsing when\n * all the forward refs are resolved (e.g., when trying to render a component)\n */\n resolveNgModulesDecls() {\n if (this.ngModulesWithSomeUnresolvedDecls.size === 0) {\n return;\n }\n for (const moduleType of this.ngModulesWithSomeUnresolvedDecls) {\n const def = getNgModuleDef(moduleType);\n if (def?.declarations) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n if (isComponent(decl)) {\n this.ownerNgModule.set(decl, moduleType);\n }\n }\n }\n }\n this.ngModulesWithSomeUnresolvedDecls.clear();\n }\n /** @override */\n getComponentDependencies(type, rawImports) {\n this.resolveNgModulesDecls();\n const def = getComponentDef(type);\n if (def === null) {\n throw new Error(`Attempting to get component dependencies for a type that is not a component: ${type}`);\n }\n if (def.standalone) {\n const scope = this.getStandaloneComponentScope(type, rawImports);\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes, ...scope.compilation.ngModules]\n };\n } else {\n if (!this.ownerNgModule.has(type)) {\n // This component is orphan! No need to handle the error since the component rendering\n // pipeline (e.g., view_container_ref) will check for this error based on configs.\n return {\n dependencies: []\n };\n }\n const scope = this.getNgModuleScope(this.ownerNgModule.get(type));\n if (scope.compilation.isPoisoned) {\n return {\n dependencies: []\n };\n }\n return {\n dependencies: [...scope.compilation.directives, ...scope.compilation.pipes]\n };\n }\n }\n /**\n * @override\n * This implementation does not make use of param scopeInfo since it assumes the scope info is\n * already added to the type itself through methods like {@link ɵɵsetNgModuleScope}\n */\n registerNgModule(type, scopeInfo) {\n if (!isNgModule(type)) {\n throw new Error(`Attempting to register a Type which is not NgModule as NgModule: ${type}`);\n }\n // Lazily process the NgModules later when needed.\n this.ngModulesWithSomeUnresolvedDecls.add(type);\n }\n /** @override */\n clearScopeCacheFor(type) {\n this.ngModulesScopeCache.delete(type);\n this.standaloneComponentsScopeCache.delete(type);\n }\n /** @override */\n getNgModuleScope(type) {\n if (this.ngModulesScopeCache.has(type)) {\n return this.ngModulesScopeCache.get(type);\n }\n const scope = this.computeNgModuleScope(type);\n this.ngModulesScopeCache.set(type, scope);\n return scope;\n }\n /** Compute NgModule scope afresh. */\n computeNgModuleScope(type) {\n const def = getNgModuleDef(type, true);\n const scope = {\n exported: {\n directives: new Set(),\n pipes: new Set()\n },\n compilation: {\n directives: new Set(),\n pipes: new Set()\n }\n };\n // Analyzing imports\n for (const imported of maybeUnwrapFn(def.imports)) {\n if (isNgModule(imported)) {\n const importedScope = this.getNgModuleScope(imported);\n // When this module imports another, the imported module's exported directives and pipes\n // are added to the compilation scope of this module.\n addSet(importedScope.exported.directives, scope.compilation.directives);\n addSet(importedScope.exported.pipes, scope.compilation.pipes);\n } else if (isStandalone(imported)) {\n if (isDirective(imported) || isComponent(imported)) {\n scope.compilation.directives.add(imported);\n } else if (isPipe(imported)) {\n scope.compilation.pipes.add(imported);\n } else {\n // The standalone thing is neither a component nor a directive nor a pipe ... (what?)\n throw new RuntimeError(1000 /* RuntimeErrorCode.RUNTIME_DEPS_INVALID_IMPORTED_TYPE */, 'The standalone imported type is neither a component nor a directive nor a pipe');\n }\n } else {\n // The import is neither a module nor a module-with-providers nor a standalone thing. This\n // is going to be an error. So we short circuit.\n scope.compilation.isPoisoned = true;\n break;\n }\n }\n // Analyzing declarations\n if (!scope.compilation.isPoisoned) {\n for (const decl of maybeUnwrapFn(def.declarations)) {\n // Cannot declare another NgModule or a standalone thing\n if (isNgModule(decl) || isStandalone(decl)) {\n scope.compilation.isPoisoned = true;\n break;\n }\n if (isPipe(decl)) {\n scope.compilation.pipes.add(decl);\n } else {\n // decl is either a directive or a component. The component may not yet have the ɵcmp due\n // to async compilation.\n scope.compilation.directives.add(decl);\n }\n }\n }\n // Analyzing exports\n for (const exported of maybeUnwrapFn(def.exports)) {\n if (isNgModule(exported)) {\n // When this module exports another, the exported module's exported directives and pipes\n // are added to both the compilation and exported scopes of this module.\n const exportedScope = this.getNgModuleScope(exported);\n // Based on the current logic there is no way to have poisoned exported scope. So no need to\n // check for it.\n addSet(exportedScope.exported.directives, scope.exported.directives);\n addSet(exportedScope.exported.pipes, scope.exported.pipes);\n // Some test toolings which run in JIT mode depend on this behavior that the exported scope\n // should also be present in the compilation scope, even though AoT does not support this\n // and it is also in odds with NgModule metadata definitions. Without this some tests in\n // Google will fail.\n addSet(exportedScope.exported.directives, scope.compilation.directives);\n addSet(exportedScope.exported.pipes, scope.compilation.pipes);\n } else if (isPipe(exported)) {\n scope.exported.pipes.add(exported);\n } else {\n scope.exported.directives.add(exported);\n }\n }\n return scope;\n }\n /** @override */\n getStandaloneComponentScope(type, rawImports) {\n if (this.standaloneComponentsScopeCache.has(type)) {\n return this.standaloneComponentsScopeCache.get(type);\n }\n const ans = this.computeStandaloneComponentScope(type, rawImports);\n this.standaloneComponentsScopeCache.set(type, ans);\n return ans;\n }\n computeStandaloneComponentScope(type, rawImports) {\n const ans = {\n compilation: {\n // Standalone components are always able to self-reference.\n directives: new Set([type]),\n pipes: new Set(),\n ngModules: new Set()\n }\n };\n for (const rawImport of flatten(rawImports ?? [])) {\n const imported = resolveForwardRef(rawImport);\n try {\n verifyStandaloneImport(imported, type);\n } catch (e) {\n // Short-circuit if an import is not valid\n ans.compilation.isPoisoned = true;\n return ans;\n }\n if (isNgModule(imported)) {\n ans.compilation.ngModules.add(imported);\n const importedScope = this.getNgModuleScope(imported);\n // Short-circuit if an imported NgModule has corrupted exported scope.\n if (importedScope.exported.isPoisoned) {\n ans.compilation.isPoisoned = true;\n return ans;\n }\n addSet(importedScope.exported.directives, ans.compilation.directives);\n addSet(importedScope.exported.pipes, ans.compilation.pipes);\n } else if (isPipe(imported)) {\n ans.compilation.pipes.add(imported);\n } else if (isDirective(imported) || isComponent(imported)) {\n ans.compilation.directives.add(imported);\n } else {\n // The imported thing is not module/pipe/directive/component, so we error and short-circuit\n // here\n ans.compilation.isPoisoned = true;\n return ans;\n }\n }\n return ans;\n }\n /** @override */\n isOrphanComponent(cmp) {\n const def = getComponentDef(cmp);\n if (!def || def.standalone) {\n return false;\n }\n this.resolveNgModulesDecls();\n return !this.ownerNgModule.has(cmp);\n }\n}\nfunction addSet(sourceSet, targetSet) {\n for (const m of sourceSet) {\n targetSet.add(m);\n }\n}\n/** The deps tracker to be used in the current Angular app in dev mode. */\nconst depsTracker = /*#__PURE__*/new DepsTracker();\nconst TEST_ONLY = {\n DepsTracker\n};\n\n/**\n * Map of module-id to the corresponding NgModule.\n */\nconst modules = /*#__PURE__*/new Map();\n/**\n * Whether to check for duplicate NgModule registrations.\n *\n * This can be disabled for testing.\n */\nlet checkForDuplicateNgModules = true;\nfunction assertSameOrNotExisting(id, type, incoming) {\n if (type && type !== incoming && checkForDuplicateNgModules) {\n throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n }\n}\n/**\n * Adds the given NgModule type to Angular's NgModule registry.\n *\n * This is generated as a side-effect of NgModule compilation. Note that the `id` is passed in\n * explicitly and not read from the NgModule definition. This is for two reasons: it avoids a\n * megamorphic read, and in JIT there's a chicken-and-egg problem where the NgModule may not be\n * fully resolved when it's registered.\n *\n * @codeGenApi\n */\nfunction registerNgModuleType(ngModuleType, id) {\n const existing = modules.get(id) || null;\n assertSameOrNotExisting(id, existing, ngModuleType);\n modules.set(id, ngModuleType);\n}\nfunction clearModulesForTest() {\n modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n return modules.get(id);\n}\n/**\n * Control whether the NgModule registration system enforces that each NgModule type registered has\n * a unique id.\n *\n * This is useful for testing as the NgModule registry cannot be properly reset between tests with\n * Angular's current API.\n */\nfunction setAllowDuplicateNgModuleIdsForTest(allowDuplicates) {\n checkForDuplicateNgModules = !allowDuplicates;\n}\n\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * This schema allows you to ignore the errors related to any unknown elements or properties in a\n * template. The usage of this schema is generally discouraged because it prevents useful validation\n * and may hide real errors in your template. Consider using the `CUSTOM_ELEMENTS_SCHEMA` instead.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nlet shouldThrowErrorOnUnknownElement = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown elements,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownElementStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownElement = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownElementStrictMode() {\n return shouldThrowErrorOnUnknownElement;\n}\nlet shouldThrowErrorOnUnknownProperty = false;\n/**\n * Sets a strict mode for JIT-compiled components to throw an error on unknown properties,\n * instead of just logging the error.\n * (for AOT-compiled ones this check happens at build time).\n */\nfunction ɵsetUnknownPropertyStrictMode(shouldThrow) {\n shouldThrowErrorOnUnknownProperty = shouldThrow;\n}\n/**\n * Gets the current value of the strict mode.\n */\nfunction ɵgetUnknownPropertyStrictMode() {\n return shouldThrowErrorOnUnknownProperty;\n}\n/**\n * Validates that the element is known at runtime and produces\n * an error if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The element is considered known if either:\n * - it's a known HTML element\n * - it's a known custom element\n * - the element matches any directive\n * - the element is allowed by one of the schemas\n *\n * @param element Element to validate\n * @param lView An `LView` that represents a current component that is being rendered\n * @param tagName Name of the tag to check\n * @param schemas Array of schemas\n * @param hasDirectives Boolean indicating that the element matches any directive\n */\nfunction validateElementIsKnown(element, lView, tagName, schemas, hasDirectives) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return;\n // If the element matches any directive, it's considered as valid.\n if (!hasDirectives && tagName !== null) {\n // The element is unknown if it's an instance of HTMLUnknownElement, or it isn't registered\n // as a custom element. Note that unknown elements with a dash in their name won't be instances\n // of HTMLUnknownElement in browsers that support web components.\n const isUnknown =\n // Note that we can't check for `typeof HTMLUnknownElement === 'function'` because\n // Domino doesn't expose HTMLUnknownElement globally.\n typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement && element instanceof HTMLUnknownElement || typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 && !customElements.get(tagName);\n if (isUnknown && !matchingSchemas(schemas, tagName)) {\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n let message = `'${tagName}' is not a known element${templateLocation}:\\n`;\n message += `1. If '${tagName}' is an Angular component, then verify that it is ${isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared'}.\\n`;\n if (tagName && tagName.indexOf('-') > -1) {\n message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas} of this component to suppress this message.`;\n } else {\n message += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas} of this component.`;\n }\n if (shouldThrowErrorOnUnknownElement) {\n throw new RuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message);\n } else {\n console.error(formatRuntimeError(304 /* RuntimeErrorCode.UNKNOWN_ELEMENT */, message));\n }\n }\n }\n}\n/**\n * Validates that the property of the element is known at runtime and returns\n * false if it's not the case.\n * This check is relevant for JIT-compiled components (for AOT-compiled\n * ones this check happens at build time).\n *\n * The property is considered known if either:\n * - it's a known property of the element\n * - the element is allowed by one of the schemas\n * - the property is used for animations\n *\n * @param element Element to validate\n * @param propName Name of the property to check\n * @param tagName Name of the tag hosting the property\n * @param schemas Array of schemas\n */\nfunction isPropertyValid(element, propName, tagName, schemas) {\n // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n // execute the check below.\n if (schemas === null) return true;\n // The property is considered valid if the element matches the schema, it exists on the element,\n // or it is synthetic.\n if (matchingSchemas(schemas, tagName) || propName in element || isAnimationProp(propName)) {\n return true;\n }\n // Note: `typeof Node` returns 'function' in most browsers, but is undefined with domino.\n return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\n/**\n * Logs or throws an error that a property is not supported on an element.\n *\n * @param propName Name of the invalid property\n * @param tagName Name of the tag hosting the property\n * @param nodeType Type of the node hosting the property\n * @param lView An `LView` that represents a current component\n */\nfunction handleUnknownPropertyError(propName, tagName, nodeType, lView) {\n // Special-case a situation when a structural directive is applied to\n // an `` element, for example: ``.\n // In this case the compiler generates the `ɵɵtemplate` instruction with\n // the `null` as the tagName. The directive matching logic at runtime relies\n // on this effect (see `isInlineTemplate`), thus using the 'ng-template' as\n // a default value of the `tNode.value` is not feasible at this moment.\n if (!tagName && nodeType === 4 /* TNodeType.Container */) {\n tagName = 'ng-template';\n }\n const isHostStandalone = isHostComponentStandalone(lView);\n const templateLocation = getTemplateLocationDetails(lView);\n let message = `Can't bind to '${propName}' since it isn't a known property of '${tagName}'${templateLocation}.`;\n const schemas = `'${isHostStandalone ? '@Component' : '@NgModule'}.schemas'`;\n const importLocation = isHostStandalone ? 'included in the \\'@Component.imports\\' of this component' : 'a part of an @NgModule where this component is declared';\n if (KNOWN_CONTROL_FLOW_DIRECTIVES.has(propName)) {\n // Most likely this is a control flow directive (such as `*ngIf`) used in\n // a template, but the directive or the `CommonModule` is not imported.\n const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(propName);\n message += `\\nIf the '${propName}' is an Angular control flow directive, ` + `please make sure that either the '${correspondingImport}' directive or the 'CommonModule' is ${importLocation}.`;\n } else {\n // May be an Angular component, which is not imported/declared?\n message += `\\n1. If '${tagName}' is an Angular component and it has the ` + `'${propName}' input, then verify that it is ${importLocation}.`;\n // May be a Web Component?\n if (tagName && tagName.indexOf('-') > -1) {\n message += `\\n2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' ` + `to the ${schemas} of this component to suppress this message.`;\n message += `\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n } else {\n // If it's expected, the error can be suppressed by the `NO_ERRORS_SCHEMA` schema.\n message += `\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to ` + `the ${schemas} of this component.`;\n }\n }\n reportUnknownPropertyError(message);\n}\nfunction reportUnknownPropertyError(message) {\n if (shouldThrowErrorOnUnknownProperty) {\n throw new RuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message);\n } else {\n console.error(formatRuntimeError(303 /* RuntimeErrorCode.UNKNOWN_BINDING */, message));\n }\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode and also it relies on the constructor function being available.\n *\n * Gets a reference to the host component def (where a current component is declared).\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getDeclarationComponentDef(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const declarationLView = lView[DECLARATION_COMPONENT_VIEW];\n const context = declarationLView[CONTEXT];\n // Unable to obtain a context.\n if (!context) return null;\n return context.constructor ? getComponentDef(context.constructor) : null;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Checks if the current component is declared inside of a standalone component template.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction isHostComponentStandalone(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const componentDef = getDeclarationComponentDef(lView);\n // Treat host component as non-standalone if we can't obtain the def.\n return !!componentDef?.standalone;\n}\n/**\n * WARNING: this is a **dev-mode only** function (thus should always be guarded by the `ngDevMode`)\n * and must **not** be used in production bundles. The function makes megamorphic reads, which might\n * be too slow for production mode.\n *\n * Constructs a string describing the location of the host component template. The function is used\n * in dev mode to produce error messages.\n *\n * @param lView An `LView` that represents a current component that is being rendered.\n */\nfunction getTemplateLocationDetails(lView) {\n !ngDevMode && throwError('Must never be called in production mode');\n const hostComponentDef = getDeclarationComponentDef(lView);\n const componentClassName = hostComponentDef?.type?.name;\n return componentClassName ? ` (used in the '${componentClassName}' component template)` : '';\n}\n/**\n * The set of known control flow directives and their corresponding imports.\n * We use this set to produce a more precises error message with a note\n * that the `CommonModule` should also be included.\n */\nconst KNOWN_CONTROL_FLOW_DIRECTIVES = /*#__PURE__*/new Map([['ngIf', 'NgIf'], ['ngFor', 'NgFor'], ['ngSwitchCase', 'NgSwitchCase'], ['ngSwitchDefault', 'NgSwitchDefault']]);\n/**\n * Returns true if the tag name is allowed by specified schemas.\n * @param schemas Array of schemas\n * @param tagName Name of the tag\n */\nfunction matchingSchemas(schemas, tagName) {\n if (schemas !== null) {\n for (let i = 0; i < schemas.length; i++) {\n const schema = schemas[i];\n if (schema === NO_ERRORS_SCHEMA || schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * The name of an attribute that can be added to the hydration boundary node\n * (component host node) to disable hydration for the content within that boundary.\n */\nconst SKIP_HYDRATION_ATTR_NAME = 'ngSkipHydration';\n/** Lowercase name of the `ngSkipHydration` attribute used for case-insensitive comparisons. */\nconst SKIP_HYDRATION_ATTR_NAME_LOWER_CASE = 'ngskiphydration';\n/**\n * Helper function to check if a given TNode has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnTNode(tNode) {\n const attrs = tNode.mergedAttrs;\n if (attrs === null) return false;\n // only ever look at the attribute name and skip the values\n for (let i = 0; i < attrs.length; i += 2) {\n const value = attrs[i];\n // This is a marker, which means that the static attributes section is over,\n // so we can exit early.\n if (typeof value === 'number') return false;\n if (typeof value === 'string' && value.toLowerCase() === SKIP_HYDRATION_ATTR_NAME_LOWER_CASE) {\n return true;\n }\n }\n return false;\n}\n/**\n * Helper function to check if a given RElement has the 'ngSkipHydration' attribute.\n */\nfunction hasSkipHydrationAttrOnRElement(rNode) {\n return rNode.hasAttribute(SKIP_HYDRATION_ATTR_NAME);\n}\n/**\n * Checks whether a TNode has a flag to indicate that it's a part of\n * a skip hydration block.\n */\nfunction hasInSkipHydrationBlockFlag(tNode) {\n return (tNode.flags & 128 /* TNodeFlags.inSkipHydrationBlock */) === 128 /* TNodeFlags.inSkipHydrationBlock */;\n}\n/**\n * Helper function that determines if a given node is within a skip hydration block\n * by navigating up the TNode tree to see if any parent nodes have skip hydration\n * attribute.\n */\nfunction isInSkipHydrationBlock(tNode) {\n if (hasInSkipHydrationBlockFlag(tNode)) {\n return true;\n }\n let currentTNode = tNode.parent;\n while (currentTNode) {\n if (hasInSkipHydrationBlockFlag(tNode) || hasSkipHydrationAttrOnTNode(currentTNode)) {\n return true;\n }\n currentTNode = currentTNode.parent;\n }\n return false;\n}\n\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2 = /*#__PURE__*/function (RendererStyleFlags2) {\n // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n /**\n * Marks a style as important.\n */\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n /**\n * Marks a style as using dash case naming (this-is-dash-case).\n */\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n return RendererStyleFlags2;\n}(RendererStyleFlags2 || {});\n/**\n * Disallowed strings in the comment.\n *\n * see: https://html.spec.whatwg.org/multipage/syntax.html#comments\n */\nconst COMMENT_DISALLOWED = /^>|^->||--!>|)/g;\nconst COMMENT_DELIMITER_ESCAPED = '\\u200B$1\\u200B';\n/**\n * Escape the content of comment strings so that it can be safely inserted into a comment node.\n *\n * The issue is that HTML does not specify any way to escape comment end text inside the comment.\n * Consider: `\" or\n * \"--!>\" at the end. -->`. Above the `\"-->\"` is meant to be text not an end to the comment. This\n * can be created programmatically through DOM APIs. (`` or `--!>`) the\n * text it will render normally but it will not cause the HTML parser to close/open the comment.\n *\n * @param value text to make safe for comment node by escaping the comment open/close character\n * sequence.\n */\nfunction escapeCommentText(value) {\n return value.replace(COMMENT_DISALLOWED, text => text.replace(COMMENT_DELIMITER, COMMENT_DELIMITER_ESCAPED));\n}\n\n// Keeps track of the currently-active LViews.\nconst TRACKED_LVIEWS = /*#__PURE__*/new Map();\n// Used for generating unique IDs for LViews.\nlet uniqueIdCounter = 0;\n/** Gets a unique ID that can be assigned to an LView. */\nfunction getUniqueLViewId() {\n return uniqueIdCounter++;\n}\n/** Starts tracking an LView. */\nfunction registerLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'LView must have an ID in order to be registered');\n TRACKED_LVIEWS.set(lView[ID], lView);\n}\n/** Gets an LView by its unique ID. */\nfunction getLViewById(id) {\n ngDevMode && assertNumber(id, 'ID used for LView lookup must be a number');\n return TRACKED_LVIEWS.get(id) || null;\n}\n/** Stops tracking an LView. */\nfunction unregisterLView(lView) {\n ngDevMode && assertNumber(lView[ID], 'Cannot stop tracking an LView that does not have an ID');\n TRACKED_LVIEWS.delete(lView[ID]);\n}\n\n/**\n * The internal view context which is specific to a given DOM element, directive or\n * component instance. Each value in here (besides the LView and element node details)\n * can be present, null or undefined. If undefined then it implies the value has not been\n * looked up yet, otherwise, if null, then a lookup was executed and nothing was found.\n *\n * Each value will get filled when the respective value is examined within the getContext\n * function. The component, element and each directive instance will share the same instance\n * of the context.\n */\nclass LContext {\n /** Component's parent view data. */\n get lView() {\n return getLViewById(this.lViewId);\n }\n constructor(\n /**\n * ID of the component's parent view data.\n */\n lViewId,\n /**\n * The index instance of the node.\n */\n nodeIndex,\n /**\n * The instance of the DOM node that is attached to the lNode.\n */\n native) {\n this.lViewId = lViewId;\n this.nodeIndex = nodeIndex;\n this.native = native;\n }\n}\n\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n let mpValue = readPatchedData(target);\n if (mpValue) {\n // only when it's an array is it considered an LView instance\n // ... otherwise it's an already constructed LContext instance\n if (isLView(mpValue)) {\n const lView = mpValue;\n let nodeIndex;\n let component = undefined;\n let directives = undefined;\n if (isComponentInstance(target)) {\n nodeIndex = findViaComponent(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided component was not found in the application');\n }\n component = target;\n } else if (isDirectiveInstance(target)) {\n nodeIndex = findViaDirective(lView, target);\n if (nodeIndex == -1) {\n throw new Error('The provided directive was not found in the application');\n }\n directives = getDirectivesAtNodeIndex(nodeIndex, lView);\n } else {\n nodeIndex = findViaNativeElement(lView, target);\n if (nodeIndex == -1) {\n return null;\n }\n }\n // the goal is not to fill the entire context full of data because the lookups\n // are expensive. Instead, only the target data (the element, component, container, ICU\n // expression or directive details) are filled into the context. If called multiple times\n // with different target values then the missing target data will be filled in.\n const native = unwrapRNode(lView[nodeIndex]);\n const existingCtx = readPatchedData(native);\n const context = existingCtx && !Array.isArray(existingCtx) ? existingCtx : createLContext(lView, nodeIndex, native);\n // only when the component has been discovered then update the monkey-patch\n if (component && context.component === undefined) {\n context.component = component;\n attachPatchData(context.component, context);\n }\n // only when the directives have been discovered then update the monkey-patch\n if (directives && context.directives === undefined) {\n context.directives = directives;\n for (let i = 0; i < directives.length; i++) {\n attachPatchData(directives[i], context);\n }\n }\n attachPatchData(context.native, context);\n mpValue = context;\n }\n } else {\n const rElement = target;\n ngDevMode && assertDomNode(rElement);\n // if the context is not found then we need to traverse upwards up the DOM\n // to find the nearest element that has already been monkey patched with data\n let parent = rElement;\n while (parent = parent.parentNode) {\n const parentContext = readPatchedData(parent);\n if (parentContext) {\n const lView = Array.isArray(parentContext) ? parentContext : parentContext.lView;\n // the edge of the app was also reached here through another means\n // (maybe because the DOM was changed manually).\n if (!lView) {\n return null;\n }\n const index = findViaNativeElement(lView, rElement);\n if (index >= 0) {\n const native = unwrapRNode(lView[index]);\n const context = createLContext(lView, index, native);\n attachPatchData(native, context);\n mpValue = context;\n break;\n }\n }\n }\n }\n return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n return new LContext(lView[ID], nodeIndex, native);\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n let patchedData = readPatchedData(componentInstance);\n let lView;\n if (isLView(patchedData)) {\n const contextLView = patchedData;\n const nodeIndex = findViaComponent(contextLView, componentInstance);\n lView = getComponentLViewByIndex(nodeIndex, contextLView);\n const context = createLContext(contextLView, nodeIndex, lView[HOST]);\n context.component = componentInstance;\n attachPatchData(componentInstance, context);\n attachPatchData(context.native, context);\n } else {\n const context = patchedData;\n const contextLView = context.lView;\n ngDevMode && assertLView(contextLView);\n lView = getComponentLViewByIndex(context.nodeIndex, contextLView);\n }\n return lView;\n}\n/**\n * This property will be monkey-patched on elements, components and directives.\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n ngDevMode && assertDefined(target, 'Target expected');\n // Only attach the ID of the view in order to avoid memory leaks (see #41047). We only do this\n // for `LView`, because we have control over when an `LView` is created and destroyed, whereas\n // we can't know when to remove an `LContext`.\n if (isLView(data)) {\n target[MONKEY_PATCH_KEY_NAME] = data[ID];\n registerLView(data);\n } else {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n ngDevMode && assertDefined(target, 'Target expected');\n const data = target[MONKEY_PATCH_KEY_NAME];\n return typeof data === 'number' ? getLViewById(data) : data || null;\n}\nfunction readPatchedLView(target) {\n const value = readPatchedData(target);\n if (value) {\n return isLView(value) ? value : value.lView;\n }\n return null;\n}\nfunction isComponentInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n const tView = lView[TVIEW];\n for (let i = HEADER_OFFSET; i < tView.bindingStartIndex; i++) {\n if (unwrapRNode(lView[i]) === target) {\n return i;\n }\n }\n return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n if (tNode.child) {\n return tNode.child;\n } else if (tNode.next) {\n return tNode.next;\n } else {\n // Let's take the following template:
text
\n // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n // in this case the parent `div`, so that we can find the component.\n while (tNode.parent && !tNode.parent.next) {\n tNode = tNode.parent;\n }\n return tNode.parent && tNode.parent.next;\n }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n const componentIndices = lView[TVIEW].components;\n if (componentIndices) {\n for (let i = 0; i < componentIndices.length; i++) {\n const elementComponentIndex = componentIndices[i];\n const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n if (componentView[CONTEXT] === componentInstance) {\n return elementComponentIndex;\n }\n }\n } else {\n const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n const rootComponent = rootComponentView[CONTEXT];\n if (rootComponent === componentInstance) {\n // we are dealing with the root element here therefore we know that the\n // element is the very first element after the HEADER data in the lView\n return HEADER_OFFSET;\n }\n }\n return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n // if a directive is monkey patched then it will (by default)\n // have a reference to the LView of the current view. The\n // element bound to the directive being search lives somewhere\n // in the view data. We loop through the nodes and check their\n // list of directives for the instance.\n let tNode = lView[TVIEW].firstChild;\n while (tNode) {\n const directiveIndexStart = tNode.directiveStart;\n const directiveIndexEnd = tNode.directiveEnd;\n for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n if (lView[i] === directiveInstance) {\n return tNode.index;\n }\n }\n tNode = traverseNextElement(tNode);\n }\n return -1;\n}\n/**\n * Returns a list of directives applied to a node at a specific index. The list includes\n * directives matched by selector and any host directives, but it excludes components.\n * Use `getComponentAtNodeIndex` to find the component applied to a node.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode.directiveStart === 0) return EMPTY_ARRAY;\n const results = [];\n for (let i = tNode.directiveStart; i < tNode.directiveEnd; i++) {\n const directiveInstance = lView[i];\n if (!isComponentInstance(directiveInstance)) {\n results.push(directiveInstance);\n }\n }\n return results;\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n const tNode = lView[TVIEW].data[nodeIndex];\n const {\n directiveStart,\n componentOffset\n } = tNode;\n return componentOffset > -1 ? lView[directiveStart + componentOffset] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n const tNode = lView[TVIEW].data[nodeIndex];\n if (tNode && tNode.localNames) {\n const result = {};\n let localIndex = tNode.index + 1;\n for (let i = 0; i < tNode.localNames.length; i += 2) {\n result[tNode.localNames[i]] = lView[localIndex];\n localIndex++;\n }\n return result;\n }\n return null;\n}\nlet _icuContainerIterate;\n/**\n * Iterator which provides ability to visit all of the `TIcuContainerNode` root `RNode`s.\n */\nfunction icuContainerIterate(tIcuContainerNode, lView) {\n return _icuContainerIterate(tIcuContainerNode, lView);\n}\n/**\n * Ensures that `IcuContainerVisitor`'s implementation is present.\n *\n * This function is invoked when i18n instruction comes across an ICU. The purpose is to allow the\n * bundler to tree shake ICU logic and only load it if ICU instruction is executed.\n */\nfunction ensureIcuContainerVisitorLoaded(loader) {\n if (_icuContainerIterate === undefined) {\n // Do not inline this function. We want to keep `ensureIcuContainerVisitorLoaded` light, so it\n // can be inlined into call-site.\n _icuContainerIterate = loader();\n }\n}\n\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n ngDevMode && assertLView(lView);\n const parent = lView[PARENT];\n return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n ngDevMode && assertDefined(componentOrLView, 'component');\n let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n while (lView && !(lView[FLAGS] & 512 /* LViewFlags.IsRoot */)) {\n lView = getLViewParent(lView);\n }\n ngDevMode && assertLView(lView);\n return lView;\n}\n/**\n * Returns the context information associated with the application where the target is situated. It\n * does this by walking the parent views until it gets to the root view, then getting the context\n * off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n const rootView = getRootView(viewOrComponent);\n ngDevMode && assertDefined(rootView[CONTEXT], 'Root view has no context. Perhaps it is disconnected?');\n return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n viewOrContainer = viewOrContainer[NEXT];\n }\n return viewOrContainer;\n}\n\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n // won't be created until i18nApply() in the update block, so this node should be skipped.\n // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n // in `i18n_spec.ts`.\n if (lNodeToHandle != null) {\n let lContainer;\n let isComponent = false;\n // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n // it has LContainer so that we can process all of those cases appropriately.\n if (isLContainer(lNodeToHandle)) {\n lContainer = lNodeToHandle;\n } else if (isLView(lNodeToHandle)) {\n isComponent = true;\n ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n lNodeToHandle = lNodeToHandle[HOST];\n }\n const rNode = unwrapRNode(lNodeToHandle);\n if (action === 0 /* WalkTNodeTreeAction.Create */ && parent !== null) {\n if (beforeNode == null) {\n nativeAppendChild(renderer, parent, rNode);\n } else {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n }\n } else if (action === 1 /* WalkTNodeTreeAction.Insert */ && parent !== null) {\n nativeInsertBefore(renderer, parent, rNode, beforeNode || null, true);\n } else if (action === 2 /* WalkTNodeTreeAction.Detach */) {\n nativeRemoveNode(renderer, rNode, isComponent);\n } else if (action === 3 /* WalkTNodeTreeAction.Destroy */) {\n ngDevMode && ngDevMode.rendererDestroyNode++;\n renderer.destroyNode(rNode);\n }\n if (lContainer != null) {\n applyContainer(renderer, action, lContainer, parent, beforeNode);\n }\n }\n}\nfunction createTextNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateTextNode++;\n ngDevMode && ngDevMode.rendererSetText++;\n return renderer.createText(value);\n}\nfunction updateTextNode(renderer, rNode, value) {\n ngDevMode && ngDevMode.rendererSetText++;\n renderer.setValue(rNode, value);\n}\nfunction createCommentNode(renderer, value) {\n ngDevMode && ngDevMode.rendererCreateComment++;\n return renderer.createComment(escapeCommentText(value));\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param renderer A renderer to use\n * @param name the tag name\n * @param namespace Optional namespace for element.\n * @returns the element created\n */\nfunction createElementNode(renderer, name, namespace) {\n ngDevMode && ngDevMode.rendererCreateElement++;\n return renderer.createElement(name, namespace);\n}\n/**\n * Removes all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to remove all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param lView The view from which elements should be added or removed\n */\nfunction removeViewFromDOM(tView, lView) {\n const renderer = lView[RENDERER];\n applyView(tView, lView, renderer, 2 /* WalkTNodeTreeAction.Detach */, null, null);\n lView[HOST] = null;\n lView[T_HOST] = null;\n}\n/**\n * Adds all DOM elements associated with a view.\n *\n * Because some root nodes of the view may be containers, we sometimes need\n * to propagate deeply into the nested containers to add all elements in the\n * views beneath it.\n *\n * @param tView The `TView' of the `LView` from which elements should be added or removed\n * @param parentTNode The `TNode` where the `LView` should be attached to.\n * @param renderer Current renderer to use for DOM manipulations.\n * @param lView The view from which elements should be added or removed\n * @param parentNativeNode The parent `RElement` where it should be inserted into.\n * @param beforeNode The node before which elements should be added, if insert mode\n */\nfunction addViewToDOM(tView, parentTNode, renderer, lView, parentNativeNode, beforeNode) {\n lView[HOST] = parentNativeNode;\n lView[T_HOST] = parentTNode;\n applyView(tView, lView, renderer, 1 /* WalkTNodeTreeAction.Insert */, parentNativeNode, beforeNode);\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction detachViewFromDOM(tView, lView) {\n applyView(tView, lView, lView[RENDERER], 2 /* WalkTNodeTreeAction.Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n * - Because it's used for onDestroy calls, it needs to be bottom-up.\n * - Must process containers instead of their views to avoid splicing\n * when views are destroyed and re-added.\n * - Using a while loop because it's faster than recursion\n * - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n * @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n // If the view has no children, we can clean it up and return early.\n let lViewOrLContainer = rootView[CHILD_HEAD];\n if (!lViewOrLContainer) {\n return cleanUpView(rootView[TVIEW], rootView);\n }\n while (lViewOrLContainer) {\n let next = null;\n if (isLView(lViewOrLContainer)) {\n // If LView, traverse down to child.\n next = lViewOrLContainer[CHILD_HEAD];\n } else {\n ngDevMode && assertLContainer(lViewOrLContainer);\n // If container, traverse down to its first LView.\n const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n if (firstView) next = firstView;\n }\n if (!next) {\n // Only clean up view when moving to the side or up, as destroy hooks\n // should be called in order from the bottom up.\n while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n lViewOrLContainer = lViewOrLContainer[PARENT];\n }\n if (lViewOrLContainer === null) lViewOrLContainer = rootView;\n if (isLView(lViewOrLContainer)) {\n cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n }\n next = lViewOrLContainer && lViewOrLContainer[NEXT];\n }\n lViewOrLContainer = next;\n }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n ngDevMode && assertLView(lView);\n ngDevMode && assertLContainer(lContainer);\n const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n const containerLength = lContainer.length;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n lContainer[indexInContainer - 1][NEXT] = lView;\n }\n if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n lView[NEXT] = lContainer[indexInContainer];\n addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n } else {\n lContainer.push(lView);\n lView[NEXT] = null;\n }\n lView[PARENT] = lContainer;\n // track views where declaration and insertion points are different\n const declarationLContainer = lView[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n trackMovedView(declarationLContainer, lView);\n }\n // notify query that a new view has been added\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.insertView(tView);\n }\n updateAncestorTraversalFlagsOnAttach(lView);\n // Sets the attached flag\n lView[FLAGS] |= 128 /* LViewFlags.Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n ngDevMode && assertDefined(lView, 'LView required');\n ngDevMode && assertLContainer(declarationContainer);\n const movedViews = declarationContainer[MOVED_VIEWS];\n const insertedLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertedLContainer);\n const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n if (declaredComponentLView !== insertedComponentLView) {\n // At this point the declaration-component is not same as insertion-component; this means that\n // this is a transplanted view. Mark the declared lView as having transplanted views so that\n // those views can participate in CD.\n declarationContainer[FLAGS] |= LContainerFlags.HasTransplantedViews;\n }\n if (movedViews === null) {\n declarationContainer[MOVED_VIEWS] = [lView];\n } else {\n movedViews.push(lView);\n }\n}\nfunction detachMovedView(declarationContainer, lView) {\n ngDevMode && assertLContainer(declarationContainer);\n ngDevMode && assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n const movedViews = declarationContainer[MOVED_VIEWS];\n const declarationViewIndex = movedViews.indexOf(lView);\n const insertionLContainer = lView[PARENT];\n ngDevMode && assertLContainer(insertionLContainer);\n movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n if (lContainer.length <= CONTAINER_HEADER_OFFSET) return;\n const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n const viewToDetach = lContainer[indexInContainer];\n if (viewToDetach) {\n const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n detachMovedView(declarationLContainer, viewToDetach);\n }\n if (removeIndex > 0) {\n lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n }\n const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n removeViewFromDOM(viewToDetach[TVIEW], viewToDetach);\n // notify query that a view has been removed\n const lQueries = removedLView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(removedLView[TVIEW]);\n }\n viewToDetach[PARENT] = null;\n viewToDetach[NEXT] = null;\n // Unsets the attached flag\n viewToDetach[FLAGS] &= ~128 /* LViewFlags.Attached */;\n }\n\n return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* LViewFlags.Destroyed */)) {\n const renderer = lView[RENDERER];\n lView[REACTIVE_TEMPLATE_CONSUMER] && consumerDestroy$1(lView[REACTIVE_TEMPLATE_CONSUMER]);\n if (renderer.destroyNode) {\n applyView(tView, lView, renderer, 3 /* WalkTNodeTreeAction.Destroy */, null, null);\n }\n destroyViewTree(lView);\n }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n if (!(lView[FLAGS] & 256 /* LViewFlags.Destroyed */)) {\n // Usually the Attached flag is removed when the view is detached from its parent, however\n // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n lView[FLAGS] &= ~128 /* LViewFlags.Attached */;\n // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n // really more of an \"afterDestroy\" hook if you think about it.\n lView[FLAGS] |= 256 /* LViewFlags.Destroyed */;\n executeOnDestroys(tView, lView);\n processCleanups(tView, lView);\n // For component views only, the local renderer is destroyed at clean up time.\n if (lView[TVIEW].type === 1 /* TViewType.Component */) {\n ngDevMode && ngDevMode.rendererDestroy++;\n lView[RENDERER].destroy();\n }\n const declarationContainer = lView[DECLARATION_LCONTAINER];\n // we are dealing with an embedded view that is still inserted into a container\n if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n // and this is a projected view\n if (declarationContainer !== lView[PARENT]) {\n detachMovedView(declarationContainer, lView);\n }\n // For embedded views still attached to a container: remove query result from this view.\n const lQueries = lView[QUERIES];\n if (lQueries !== null) {\n lQueries.detachView(tView);\n }\n }\n // Unregister the view once everything else has been cleaned up.\n unregisterLView(lView);\n }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction processCleanups(tView, lView) {\n const tCleanup = tView.cleanup;\n const lCleanup = lView[CLEANUP];\n if (tCleanup !== null) {\n for (let i = 0; i < tCleanup.length - 1; i += 2) {\n if (typeof tCleanup[i] === 'string') {\n // This is a native DOM listener. It will occupy 4 entries in the TCleanup array (hence i +=\n // 2 at the end of this block).\n const targetIdx = tCleanup[i + 3];\n ngDevMode && assertNumber(targetIdx, 'cleanup target must be a number');\n if (targetIdx >= 0) {\n // unregister\n lCleanup[targetIdx]();\n } else {\n // Subscription\n lCleanup[-targetIdx].unsubscribe();\n }\n i += 2;\n } else {\n // This is a cleanup function that is grouped with the index of its context\n const context = lCleanup[tCleanup[i + 1]];\n tCleanup[i].call(context);\n }\n }\n }\n if (lCleanup !== null) {\n lView[CLEANUP] = null;\n }\n const destroyHooks = lView[ON_DESTROY_HOOKS];\n if (destroyHooks !== null) {\n // Reset the ON_DESTROY_HOOKS array before iterating over it to prevent hooks that unregister\n // themselves from mutating the array during iteration.\n lView[ON_DESTROY_HOOKS] = null;\n for (let i = 0; i < destroyHooks.length; i++) {\n const destroyHooksFn = destroyHooks[i];\n ngDevMode && assertFunction(destroyHooksFn, 'Expecting destroy hook to be a function.');\n destroyHooksFn();\n }\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n let destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n for (let i = 0; i < destroyHooks.length; i += 2) {\n const context = lView[destroyHooks[i]];\n // Only call the destroy hook if the context has been requested.\n if (!(context instanceof NodeInjectorFactory)) {\n const toCall = destroyHooks[i + 1];\n if (Array.isArray(toCall)) {\n for (let j = 0; j < toCall.length; j += 2) {\n const callContext = context[toCall[j]];\n const hook = toCall[j + 1];\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, callContext, hook);\n try {\n hook.call(callContext);\n } finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, callContext, hook);\n }\n }\n } else {\n profiler(4 /* ProfilerEvent.LifecycleHookStart */, context, toCall);\n try {\n toCall.call(context);\n } finally {\n profiler(5 /* ProfilerEvent.LifecycleHookEnd */, context, toCall);\n }\n }\n }\n }\n }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n * insertion because the content of a component will be projected.\n * `delayed due to projection`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n * parent container, which itself is disconnected. For example the parent container is part\n * of a View which has not be inserted or is made for projection but has not been inserted\n * into destination.\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve render parent.\n * @param lView: Current `LView`.\n */\nfunction getParentRElement(tView, tNode, lView) {\n return getClosestRElement(tView, tNode.parent, lView);\n}\n/**\n * Get closest `RElement` or `null` if it can't be found.\n *\n * If `TNode` is `TNodeType.Element` => return `RElement` at `LView[tNode.index]` location.\n * If `TNode` is `TNodeType.ElementContainer|IcuContain` => return the parent (recursively).\n * If `TNode` is `null` then return host `RElement`:\n * - return `null` if projection\n * - return `null` if parent container is disconnected (we have no parent.)\n *\n * @param tView: Current `TView`.\n * @param tNode: `TNode` for which we wish to retrieve `RElement` (or `null` if host element is\n * needed).\n * @param lView: Current `LView`.\n * @returns `null` if the `RElement` can't be determined at this time (no parent / projection)\n */\nfunction getClosestRElement(tView, tNode, lView) {\n let parentTNode = tNode;\n // Skip over element and ICU containers as those are represented by a comment node and\n // can't be used as a render parent.\n while (parentTNode !== null && parentTNode.type & (8 /* TNodeType.ElementContainer */ | 32 /* TNodeType.Icu */)) {\n tNode = parentTNode;\n parentTNode = tNode.parent;\n }\n // If the parent tNode is null, then we are inserting across views: either into an embedded view\n // or a component view.\n if (parentTNode === null) {\n // We are inserting a root element of the component view into the component host element and\n // it should always be eager.\n return lView[HOST];\n } else {\n ngDevMode && assertTNodeType(parentTNode, 3 /* TNodeType.AnyRNode */ | 4 /* TNodeType.Container */);\n const {\n componentOffset\n } = parentTNode;\n if (componentOffset > -1) {\n ngDevMode && assertTNodeForLView(parentTNode, lView);\n const {\n encapsulation\n } = tView.data[parentTNode.directiveStart + componentOffset];\n // We've got a parent which is an element in the current view. We just need to verify if the\n // parent element is not a component. Component's content nodes are not inserted immediately\n // because they will be projected, and so doing insert at this point would be wasteful.\n // Since the projection would then move it to its final destination. Note that we can't\n // make this assumption when using the Shadow DOM, because the native projection placeholders\n // ( or ) have to be in place as elements are being inserted.\n if (encapsulation === ViewEncapsulation$1.None || encapsulation === ViewEncapsulation$1.Emulated) {\n return null;\n }\n }\n return getNativeByTNode(parentTNode, lView);\n }\n}\n/**\n * Inserts a native node before another native node for a given parent.\n * This is a utility function that can be used when native nodes were determined.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode, isMove) {\n ngDevMode && ngDevMode.rendererInsertBefore++;\n renderer.insertBefore(parent, child, beforeNode, isMove);\n}\nfunction nativeAppendChild(renderer, parent, child) {\n ngDevMode && ngDevMode.rendererAppendChild++;\n ngDevMode && assertDefined(parent, 'parent node must be defined');\n renderer.appendChild(parent, child);\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode, isMove) {\n if (beforeNode !== null) {\n nativeInsertBefore(renderer, parent, child, beforeNode, isMove);\n } else {\n nativeAppendChild(renderer, parent, child);\n }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n renderer.removeChild(parent, child, isHostElement);\n}\n/** Checks if an element is a `