homebridge-config-ui-x
Version:
A web based management, configuration and control platform for Homebridge.
3 lines (2 loc) • 30.5 kB
JavaScript
import{$ as Fe,Ab as K,Ba as ye,Bb as Te,Ga as He,H as je,Ha as ge,Ia as $e,Ja as F,L as Ue,La as ve,Ma as Ee,Na as I,Oa as N,Oc as tt,Pa as Xe,Pc as nt,Qa as Ge,Ra as Je,S as fe,Sa as Ye,Ta as We,Tc as C,Ua as Ze,Uc as rt,Va as qe,Vc as st,Wa as O,a as j,ab as B,da as m,db as Ke,ea as M,ga as y,ha as W,ja as g,k as Le,ka as l,kd as ot,la as R,ld as Q,ma as pe,mb as Z,md as ee,oa as Be,od as it,pa as ze,q as xe,qa as Ve,qd as at,r as he,sb as Qe,ub as D,va as E,x as U,xa as me,yb as et,zb as q}from"./chunk-QSPBB6EE.js";var L=class{},z=class{},S=class r{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
`).forEach(e=>{let n=e.indexOf(":");if(n>0){let s=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(s,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof r?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(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new r;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof r?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let s=(t.op==="a"?this.headers.get(e):void 0)||[];s.push(...n),this.headers.set(e,s);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>o.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),s=t.toLowerCase();this.headers.set(s,n),this.maybeSetNormalizedName(t,s)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var ne=class{encodeKey(t){return ct(t)}encodeValue(t){return ct(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function kt(r,t){let e=new Map;return r.length>0&&r.replace(/^\?/,"").split("&").forEach(s=>{let o=s.indexOf("="),[i,c]=o==-1?[t.decodeKey(s),""]:[t.decodeKey(s.slice(0,o)),t.decodeValue(s.slice(o+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Lt=/%(\d[a-f0-9])/gi,xt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function ct(r){return encodeURIComponent(r).replace(Lt,(t,e)=>xt[e]??t)}function te(r){return`${r}`}var b=class r{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new ne,t.fromString){if(t.fromObject)throw new m(2805,!1);this.map=kt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],s=Array.isArray(n)?n.map(te):[te(n)];this.map.set(e,s)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let s=t[n];Array.isArray(s)?s.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:s,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new r({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(te(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],s=n.indexOf(te(t.value));s!==-1&&n.splice(s,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var re=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function jt(r){switch(r){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function lt(r){return typeof ArrayBuffer<"u"&&r instanceof ArrayBuffer}function dt(r){return typeof Blob<"u"&&r instanceof Blob}function ut(r){return typeof FormData<"u"&&r instanceof FormData}function Ut(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}var ht="Content-Type",ft="Accept",mt="X-Request-URL",yt="text/plain",gt="application/json",Ft=`${gt}, ${yt}, */*`,k=class r{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;keepalive=!1;responseType="json";method;params;urlWithParams;transferCache;constructor(t,e,n,s){this.url=e,this.method=t.toUpperCase();let o;if(jt(this.method)||s?(this.body=n!==void 0?n:null,o=s):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new S,this.context??=new re,!this.params)this.params=new b,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||lt(this.body)||dt(this.body)||ut(this.body)||Ut(this.body)?this.body:this.body instanceof b?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||ut(this.body)?null:dt(this.body)?this.body.type||null:lt(this.body)?null:typeof this.body=="string"?yt:this.body instanceof b?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?gt:null}clone(t={}){let e=t.method||this.method,n=t.url||this.url,s=t.responseType||this.responseType,o=t.keepalive??this.keepalive,i=t.transferCache??this.transferCache,c=t.body!==void 0?t.body:this.body,a=t.withCredentials??this.withCredentials,d=t.reportProgress??this.reportProgress,u=t.headers||this.headers,p=t.params||this.params,T=t.context??this.context;return t.setHeaders!==void 0&&(u=Object.keys(t.setHeaders).reduce((w,_)=>w.set(_,t.setHeaders[_]),u)),t.setParams&&(p=Object.keys(t.setParams).reduce((w,_)=>w.set(_,t.setParams[_]),p)),new r(e,n,c,{params:p,headers:u,context:T,reportProgress:d,responseType:s,withCredentials:a,transferCache:i,keepalive:o})}},A=function(r){return r[r.Sent=0]="Sent",r[r.UploadProgress=1]="UploadProgress",r[r.ResponseHeader=2]="ResponseHeader",r[r.DownloadProgress=3]="DownloadProgress",r[r.Response=4]="Response",r[r.User=5]="User",r}(A||{}),x=class{headers;status;statusText;url;ok;type;constructor(t,e=200,n="OK"){this.headers=t.headers||new S,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},se=class r extends x{constructor(t={}){super(t)}type=A.ResponseHeader;clone(t={}){return new r({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})}},V=class r extends x{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=A.Response;clone(t={}){return new r({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})}},H=class extends x{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},Bt=200,zt=204;function we(r,t){return{body:t,headers:r.headers,context:r.context,observe:r.observe,params:r.params,reportProgress:r.reportProgress,responseType:r.responseType,withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive}}var vt=(()=>{class r{handler;constructor(e){this.handler=e}request(e,n,s={}){let o;if(e instanceof k)o=e;else{let a;s.headers instanceof S?a=s.headers:a=new S(s.headers);let d;s.params&&(s.params instanceof b?d=s.params:d=new b({fromObject:s.params})),o=new k(e,n,s.body!==void 0?s.body:null,{headers:a,context:s.context,params:d,reportProgress:s.reportProgress,responseType:s.responseType||"json",withCredentials:s.withCredentials,transferCache:s.transferCache,keepalive:s.keepalive})}let i=he(o).pipe(Ue(a=>this.handler.handle(a)));if(e instanceof k||s.observe==="events")return i;let c=i.pipe(je(a=>a instanceof V));switch(s.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new m(2806,!1);return a.body}));case"blob":return c.pipe(U(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new m(2807,!1);return a.body}));case"text":return c.pipe(U(a=>{if(a.body!==null&&typeof a.body!="string")throw new m(2808,!1);return a.body}));case"json":default:return c.pipe(U(a=>a.body))}case"response":return c;default:throw new m(2809,!1)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new b().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,s={}){return this.request("PATCH",e,we(s,n))}post(e,n,s={}){return this.request("POST",e,we(s,n))}put(e,n,s={}){return this.request("PUT",e,we(s,n))}static \u0275fac=function(n){return new(n||r)(l(L))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})();var Vt=new g("");function Et(r,t){return t(r)}function Ht(r,t){return(e,n)=>t.intercept(e,{handle:s=>r(s,n)})}function $t(r,t,e){return(n,s)=>Ve(e,()=>t(n,o=>r(o,s)))}var Tt=new g(""),be=new g(""),wt=new g(""),_e=new g("",{providedIn:"root",factory:()=>!0});function Xt(){let r=null;return(t,e)=>{r===null&&(r=(R(Tt,{optional:!0})??[]).reduceRight(Ht,Et));let n=R(ye);if(R(_e)){let o=n.add();return r(t,e).pipe(fe(o))}else return r(t,e)}}var oe=(()=>{class r extends L{backend;injector;chain=null;pendingTasks=R(ye);contributeToStability=R(_e);constructor(e,n){super(),this.backend=e,this.injector=n}handle(e){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(be),...this.injector.get(wt,[])]));this.chain=n.reduceRight((s,o)=>$t(s,o,this.injector),Et)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(e,s=>this.backend.handle(s)).pipe(fe(n))}else return this.chain(e,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||r)(l(z),l(ze))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})();var Gt=/^\)\]\}',?\n/,Jt=RegExp(`^${mt}:`,"m");function Yt(r){return"responseURL"in r&&r.responseURL?r.responseURL:Jt.test(r.getAllResponseHeaders())?r.getResponseHeader(mt):null}var Re=(()=>{class r{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new m(-2800,!1);e.keepalive;let n=this.xhrFactory;return(n.\u0275loadImpl?xe(n.\u0275loadImpl()):he(null)).pipe(Fe(()=>new Le(o=>{let i=n.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((h,f)=>i.setRequestHeader(h,f.join(","))),e.headers.has(ft)||i.setRequestHeader(ft,Ft),!e.headers.has(ht)){let h=e.detectContentTypeHeader();h!==null&&i.setRequestHeader(ht,h)}if(e.responseType){let h=e.responseType.toLowerCase();i.responseType=h!=="json"?h:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let h=i.statusText||"OK",f=new S(i.getAllResponseHeaders()),P=Yt(i)||e.url;return a=new se({headers:f,status:i.status,statusText:h,url:P}),a},u=()=>{let{headers:h,status:f,statusText:P,url:ke}=d(),v=null;f!==zt&&(v=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=v?Bt:0);let ue=f>=200&&f<300;if(e.responseType==="json"&&typeof v=="string"){let Nt=v;v=v.replace(Gt,"");try{v=v!==""?JSON.parse(v):null}catch(Ct){v=Nt,ue&&(ue=!1,v={error:Ct,text:v})}}ue?(o.next(new V({body:v,headers:h,status:f,statusText:P,url:ke||void 0})),o.complete()):o.error(new H({error:v,headers:h,status:f,statusText:P,url:ke||void 0}))},p=h=>{let{url:f}=d(),P=new H({error:h,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});o.error(P)},T=!1,w=h=>{T||(o.next(d()),T=!0);let f={type:A.DownloadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),o.next(f)},_=h=>{let f={type:A.UploadProgress,loaded:h.loaded};h.lengthComputable&&(f.total=h.total),o.next(f)};return i.addEventListener("load",u),i.addEventListener("error",p),i.addEventListener("timeout",p),i.addEventListener("abort",p),e.reportProgress&&(i.addEventListener("progress",w),c!==null&&i.upload&&i.upload.addEventListener("progress",_)),i.send(c),o.next({type:A.Sent}),()=>{i.removeEventListener("error",p),i.removeEventListener("abort",p),i.removeEventListener("load",u),i.removeEventListener("timeout",p),e.reportProgress&&(i.removeEventListener("progress",w),c!==null&&i.upload&&i.upload.removeEventListener("progress",_)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(n){return new(n||r)(l(ee))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),Rt=new g(""),Wt="XSRF-TOKEN",Zt=new g("",{providedIn:"root",factory:()=>Wt}),qt="X-XSRF-TOKEN",Kt=new g("",{providedIn:"root",factory:()=>qt}),$=class{},Qt=(()=>{class r{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,n){this.doc=e,this.cookieName=n}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Q(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(n){return new(n||r)(l(E),l(Zt))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})();function en(r,t){let e=r.url.toLowerCase();if(!R(Rt)||r.method==="GET"||r.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(r);let n=R($).getToken(),s=R(Kt);return n!=null&&!r.headers.has(s)&&(r=r.clone({headers:r.headers.set(s,n)})),t(r)}var De=function(r){return r[r.Interceptors=0]="Interceptors",r[r.LegacyInterceptors=1]="LegacyInterceptors",r[r.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",r[r.NoXsrfProtection=3]="NoXsrfProtection",r[r.JsonpSupport=4]="JsonpSupport",r[r.RequestsMadeViaParent=5]="RequestsMadeViaParent",r[r.Fetch=6]="Fetch",r}(De||{});function tn(r,t){return{\u0275kind:r,\u0275providers:t}}function nn(...r){let t=[vt,Re,oe,{provide:L,useExisting:oe},{provide:z,useFactory:()=>R(Vt,{optional:!0})??R(Re)},{provide:be,useValue:en,multi:!0},{provide:Rt,useValue:!0},{provide:$,useClass:Qt}];for(let e of r)t.push(...e.\u0275providers);return pe(t)}var pt=new g("");function rn(){return tn(De.LegacyInterceptors,[{provide:pt,useFactory:Xt},{provide:be,useExisting:pt,multi:!0}])}var ce=new g(""),Pe=(()=>{class r{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,n){this._zone=n,e.forEach(s=>{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s,o){return this._findPluginFor(n).addEventListener(e,n,s,o)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new m(5101,!1);return this._eventNameToPlugin.set(e,n),n}static \u0275fac=function(n){return new(n||r)(l(ce),l(D))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),X=class{_doc;constructor(t){this._doc=t}manager},ie="ng-app-id";function Mt(r){for(let t of r)t.remove()}function bt(r,t){let e=t.createElement("style");return e.textContent=r,e}function sn(r,t,e,n){let s=r.head?.querySelectorAll(`style[${ie}="${t}"],link[${ie}="${t}"]`);if(s)for(let o of s)o.removeAttribute(ie),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function Oe(r,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",r),e}var Ie=(()=>{class r{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;isServer;constructor(e,n,s,o={}){this.doc=e,this.appId=n,this.nonce=s,this.isServer=at(o),sn(e,n,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,n){for(let s of e)this.addUsage(s,this.inline,bt);n?.forEach(s=>this.addUsage(s,this.external,Oe))}removeStyles(e,n){for(let s of e)this.removeUsage(s,this.inline);n?.forEach(s=>this.removeUsage(s,this.external))}addUsage(e,n,s){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,s(e,this.doc)))})}removeUsage(e,n){let s=n.get(e);s&&(s.usage--,s.usage<=0&&(Mt(s.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])Mt(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:s}]of this.inline)s.push(this.addElement(e,bt(n,this.doc)));for(let[n,{elements:s}]of this.external)s.push(this.addElement(e,Oe(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(ie,this.appId),e.appendChild(n)}static \u0275fac=function(n){return new(n||r)(l(E),l(ge),l(ve,8),l(F))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),Se={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/Math/MathML"},Ne=/%COMP%/g;var Dt="%COMP%",on=`_nghost-${Dt}`,an=`_ngcontent-${Dt}`,cn=!0,ln=new g("",{providedIn:"root",factory:()=>cn});function dn(r){return an.replace(Ne,r)}function un(r){return on.replace(Ne,r)}function St(r,t){return t.map(e=>e.replace(Ne,r))}var Ce=(()=>{class r{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,n,s,o,i,c,a,d=null,u=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestroy=o,this.doc=i,this.platformId=c,this.ngZone=a,this.nonce=d,this.tracingService=u,this.platformIsServer=!1,this.defaultRenderer=new G(e,i,a,this.platformIsServer,this.tracingService)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;let s=this.getOrCreateRenderer(e,n);return s instanceof ae?s.applyToHost(e):s instanceof J&&s.applyStyles(),s}getOrCreateRenderer(e,n){let s=this.rendererByCompId,o=s.get(n.id);if(!o){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,p=this.platformIsServer,T=this.tracingService;switch(n.encapsulation){case Ee.Emulated:o=new ae(a,d,n,this.appId,u,i,c,p,T);break;case Ee.ShadowDom:return new Ae(a,d,e,n,i,c,this.nonce,p,T);default:o=new J(a,d,n,u,i,c,p,T);break}s.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(n){return new(n||r)(l(Pe),l(Ie),l(ge),l(ln),l(E),l(F),l(D),l(ve),l(Qe,8))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),G=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,n,s,o){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=s,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Se[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(_t(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(_t(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new m(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,s){if(s){e=s+":"+e;let o=Se[s];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let s=Se[n];s?t.removeAttributeNS(s,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,s){s&(B.DashCase|B.Important)?t.style.setProperty(e,n,s&B.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&B.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n,s){if(typeof t=="string"&&(t=C().getGlobalEventTarget(this.doc,t),!t))throw new m(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,s)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function _t(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var Ae=class extends G{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,n,s,o,i,c,a,d){super(t,o,i,a,d),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let u=s.styles;u=St(s.id,u);for(let T of u){let w=document.createElement("style");c&&w.setAttribute("nonce",c),w.textContent=T,this.shadowRoot.appendChild(w)}let p=s.getExternalStyles?.();if(p)for(let T of p){let w=Oe(T,o);c&&w.setAttribute("nonce",c),this.shadowRoot.appendChild(w)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},J=class extends G{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,n,s,o,i,c,a,d){super(t,o,i,c,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=s;let u=n.styles;this.styles=d?St(d,u):u,this.styleUrls=n.getExternalStyles?.(d)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ae=class extends J{contentAttr;hostAttr;constructor(t,e,n,s,o,i,c,a,d){let u=s+"-"+n.id;super(t,e,n,o,i,c,a,d,u),this.contentAttr=dn(u),this.hostAttr=un(u)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}};var le=class r extends st{supportsDOMEvents=!0;static makeCurrent(){rt(new r)}onAndCancel(t,e,n,s){return t.addEventListener(e,n,s),()=>{t.removeEventListener(e,n,s)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.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,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=hn();return e==null?null:fn(e)}resetBaseElement(){Y=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Q(document.cookie,t)}},Y=null;function hn(){return Y=Y||document.head.querySelector("base"),Y?Y.getAttribute("href"):null}function fn(r){return new URL(r,document.baseURI).pathname}var de=class{addToWindow(t){M.getAngularTestability=(n,s=!0)=>{let o=t.findTestabilityInTree(n,s);if(o==null)throw new m(5103,!1);return o},M.getAllAngularTestabilities=()=>t.getAllTestabilities(),M.getAllAngularRootElements=()=>t.getAllRootElements();let e=n=>{let s=M.getAllAngularTestabilities(),o=s.length,i=function(){o--,o==0&&n()};s.forEach(c=>{c.whenStable(i)})};M.frameworkStabilizers||(M.frameworkStabilizers=[]),M.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,n){if(e==null)return null;let s=t.getTestability(e);return s??(n?C().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},pn=(()=>{class r{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||r)};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),At=(()=>{class r extends X{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s,o){return e.addEventListener(n,s,o),()=>this.removeEventListener(e,n,s,o)}removeEventListener(e,n,s,o){return e.removeEventListener(n,s,o)}static \u0275fac=function(n){return new(n||r)(l(E))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})(),Ot=["alt","control","meta","shift"],mn={"\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"},yn={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Pt=(()=>{class r extends X{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,n,s,o){let i=r.parseEventName(n),c=r.eventCallback(i.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>C().onAndCancel(e,i.domEventName,c,o))}static parseEventName(e){let n=e.toLowerCase().split("."),s=n.shift();if(n.length===0||!(s==="keydown"||s==="keyup"))return null;let o=r._normalizeKey(n.pop()),i="",c=n.indexOf("code");if(c>-1&&(n.splice(c,1),i="code."),Ot.forEach(d=>{let u=n.indexOf(d);u>-1&&(n.splice(u,1),i+=d+".")}),i+=o,n.length!=0||o.length===0)return null;let a={};return a.domEventName=s,a.fullKey=i,a}static matchEventFullKeyCode(e,n){let s=mn[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(s=e.code,o="code."),s==null||!s?!1:(s=s.toLowerCase(),s===" "?s="space":s==="."&&(s="dot"),Ot.forEach(i=>{if(i!==s){let c=yn[i];c(e)&&(o+=i+".")}}),o+=s,o===n)}static eventCallback(e,n,s){return o=>{r.matchEventFullKeyCode(o,e)&&s.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(n){return new(n||r)(l(E))};static \u0275prov=y({token:r,factory:r.\u0275fac})}return r})();function gn(r,t){return nt(j({rootComponent:r},vn(t)))}function vn(r){return{appProviders:[...It,...r?.providers??[]],platformProviders:Rn}}function En(){le.makeCurrent()}function Tn(){return new me}function wn(){return He(document),document}var Rn=[{provide:F,useValue:it},{provide:$e,useValue:En,multi:!0},{provide:E,useFactory:wn}];var Mn=[{provide:q,useClass:de},{provide:et,useClass:K,deps:[D,Te,q]},{provide:K,useClass:K,deps:[D,Te,q]}],It=[{provide:Be,useValue:"root"},{provide:me,useFactory:Tn},{provide:ce,useClass:At,multi:!0,deps:[E]},{provide:ce,useClass:Pt,multi:!0,deps:[E]},Ce,Ie,Pe,{provide:Ke,useExisting:Ce},{provide:ee,useClass:pn},[]],bn=(()=>{class r{constructor(){}static \u0275fac=function(n){return new(n||r)};static \u0275mod=Z({type:r});static \u0275inj=W({providers:[...It,...Mn],imports:[ot,tt]})}return r})();var Gr=(()=>{class r{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(n){return new(n||r)(l(E))};static \u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var Dn=(()=>{class r{static \u0275fac=function(n){return new(n||r)};static \u0275prov=y({token:r,factory:function(n){let s=null;return n?s=new(n||r):s=l(Sn),s},providedIn:"root"})}return r})(),Sn=(()=>{class r extends Dn{_doc;constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case O.NONE:return n;case O.HTML:return N(n,"HTML")?I(n):qe(this._doc,String(n)).toString();case O.STYLE:return N(n,"Style")?I(n):n;case O.SCRIPT:if(N(n,"Script"))return I(n);throw new m(5200,!1);case O.URL:return N(n,"URL")?I(n):Ze(String(n));case O.RESOURCE_URL:if(N(n,"ResourceURL"))return I(n);throw new m(5201,!1);default:throw new m(5202,!1)}}bypassSecurityTrustHtml(e){return Xe(e)}bypassSecurityTrustStyle(e){return Ge(e)}bypassSecurityTrustScript(e){return Je(e)}bypassSecurityTrustUrl(e){return Ye(e)}bypassSecurityTrustResourceUrl(e){return We(e)}static \u0275fac=function(n){return new(n||r)(l(E))};static \u0275prov=y({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{z as a,b,A as c,V as d,vt as e,Tt as f,nn as g,rn as h,Ce as i,gn as j,bn as k,Gr as l,Dn as m};