1import{$ as S,$a as Jr,$b as ni,A as Gr,Aa as od,Ab as Ot,B as Yt,Ba as Rn,Bb as j,C as Xc,Ca as sd,Cb as Qr,D as Js,Da as ut,Db as yd,E as Kr,Ea as Pe,Eb as wd,F as he,Fa as kn,Fb as xd,G as Xs,Ga as Mi,Gb as Ue,H as Di,Ha as Pi,Hb as Ne,I as St,Ia as ad,Ib as Ed,J as Qs,Ja as ld,Jb as eo,K as ea,Ka as cd,Kb as Cd,L as Me,La as dd,Lb as to,M as Qc,Ma as ud,Mb as io,N as ta,Na as hd,Nb as ca,O as Zt,Oa as fd,Ob as no,P as It,Pa as Xt,Pb as da,Q as ia,Qa as et,Qb as ua,R as ed,Ra as md,Rb as Li,S as td,Sa as pd,Sb as ro,T as Yr,Ta as gd,Tb as Sd,U as lt,Ua as On,Ub as it,V as ke,Va as ie,Vb as Id,W as ct,Wa as w,Wb as Ad,X as be,Xa as Fi,Xb as Ye,Y as q,Ya as Dn,Yb as ii,Z as At,Za as bd,Zb as Ze,_ as Sn,_a as Zr,_b as Rd,a as _,aa as L,ab as Xr,ac as kd,b as W,ba as id,bb as Ni,bc as Od,ca as O,cb as sa,cc as N,d as xp,da as na,db as Qt,dc as Dd,e as qt,ea as v,eb as xe,ec as ha,f as Ep,fa as x,fb as ht,fc as Td,g as Cp,ga as ra,gb as vd,gc as Md,h as ki,ha as nd,hb as aa,hc as ft,i as h,ia as In,ib as Ee,ic as oo,j as Gt,ja as te,jb as la,jc as so,k as Zc,ka as V,kb as Rt,kc as Vi,l as Kt,la as J,lb as Fe,lc as Pd,m as Ks,ma as Ti,mb as ce,mc as ao,n as Ys,na as rd,nb as Ie,nc as Fd,o as z,oa as dt,ob as _d,oc as Nd,p as Re,pa as Ve,pb as A,pc as lo,q as Qe,qa as Ke,qb as R,qc as jd,r as _e,ra as se,rb as Y,rc as co,s as D,sa as ae,sb as tt,t as Cn,ta as Jt,tb as ji,u as qr,ua as fe,ub as F,v as Jc,va as An,vb as de,w as $,wa as le,wb as Tn,x as Oi,xa as P,xb as ei,y as Te,ya as oa,yb as ti,z as Zs,za as H,zb as kt}from"./chunk-T3EJ22S7.js";var si={};Ep(si,{__addDisposableResource:()=>yh,__assign:()=>Lo,__asyncDelegator:()=>hh,__asyncGenerator:()=>uh,__asyncValues:()=>fh,__await:()=>Qi,__awaiter:()=>C,__classPrivateFieldGet:()=>bh,__classPrivateFieldIn:()=>_h,__classPrivateFieldSet:()=>vh,__createBinding:()=>Uo,__decorate:()=>Qu,__disposeResources:()=>wh,__esDecorate:()=>th,__exportStar:()=>ah,__extends:()=>Xu,__generator:()=>sh,__importDefault:()=>gh,__importStar:()=>
vendor: 9,720 bytes, line 1
1ph,__makeTemplateObject:()=>mh,__metadata:()=>oh,__param:()=>eh,__propKey:()=>nh,__read:()=>bl,__rest:()=>vt,__rewriteRelativeImportExtension:()=>xh,__runInitializers:()=>ih,__setFunctionName:()=>rh,__spread:()=>lh,__spreadArray:()=>dh,__spreadArrays:()=>ch,__values:()=>Vo,default:()=>wv});function Xu(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");pl(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function vt(n,t){var e={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(e[i[r]]=n[i[r]]);return e}function Qu(n,t,e,i){var r=arguments.length,o=r<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,t,e,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}function eh(n,t){return function(e,i){t(e,i,n)}}function th(n,t,e,i,r,o){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=i.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!t&&n?i.static?n:n.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,i.name):{}),u,m=!1,f=e.length-1;f>=0;f--){var g={};for(var p in i)g[p]=p==="access"?{}:i[p];for(var p in i.access)g.access[p]=i.access[p];g.addInitializer=function(y){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(y||null))};var b=(0,e[f])(a==="accessor"?{get:d.get,set:d.set}:d[l],g);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(u=s(b.get))&&(d.get=u),(u=s(b.set))&&(d.set=u),(u=s(b.init))&&r.unshift(u)}else(u=s(b))&&(a==="field"?r.unshift(u):d[l]=u)}c&&Object.defineProperty(c,i.name,d),m=!0}function ih(n,t,e){for(var i=arguments.length>2,r=0;r<t.length;r++)e=i?t[r].call(n,e):t[r].call(n);return i?e:void 0}function nh(n){return typeof n=="symbol"?n:"".concat(n)}function rh(n,t,e){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(n,"name",{configurable:!0,value:e?"".concat(e," ",t):t})}function oh(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function C(n,t,e,i){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(i.next(d))}catch(u){s(u)}}function l(d){try{c(i.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((i=i.apply(n,t||[])).next())})}function sh(n,t){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(e=0)),e;)try{if(i=1,r&&(o=c[0]&2?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return e.label++,{value:c[1],done:!1};case 5:e.label++,r=c[1],c=[0];continue;case 7:c=e.ops.pop(),e.trys.pop();continue;default:if(o=e.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){e.label=c[1];break}if(c[0]===6&&e.label<o[1]){e.label=o[1],o=c;break}if(o&&e.label<o[2]){e.label=o[2],e.ops.push(c);break}o[2]&&e.ops.pop(),e.trys.pop();continue}c=t.call(n,e)}catch(d){c=[6,d],r=0}finally{i=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ah(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&Uo(t,n,e)}function Vo(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function bl(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var i=e.call(n),r,o=[],s;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(s)throw s.error}}return o}function lh(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(bl(arguments[t]));return n}function ch(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var i=Array(n),r=0,t=0;t<e;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}function dh(n,t,e){if(e||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return n.concat(o||Array.prototype.slice.call(t))}function Qi(n){return this instanceof Qi?(this.v=n,this):new Qi(n)}function uh(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(f){return function(g){return Promise.resolve(g).then(f,u)}}function a(f,g){i[f]&&(r[f]=function(p){return new Promise(function(b,y){o.push([f,p,b,y])>1||l(f,p)})},g&&(r[f]=g(r[f])))}function l(f,g){try{c(i[f](g))}catch(p){m(o[0][3],p)}}function c(f){f.value instanceof Qi?Promise.resolve(f.value.v).then(d,u):m(o[0][2],f)}function d(f){l("next",f)}function u(f){l("throw",f)}function m(f,g){f(g),o.shift(),o.length&&l(o[0][0],o[0][1])}}function hh(n){var t,e;return t={},i("next"),i("throw",function(r){throw r}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(r,o){t[r]=n[r]?function(s){return(e=!e)?{value:Qi(n[r](s)),done:!1}:o?o(s):s}:o}}function fh(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Vo=="function"?Vo(n):n[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}function mh(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}function ph(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e=gl(n),i=0;i<e.length;i++)e[i]!=="default"&&Uo(t,n,e[i]);return _v(t,n),t}function gh(n){return n&&n.__esModule?n:{default:n}}function bh(n,t,e,i){if(e==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?i:e==="a"?i.call(n):i?i.value:t.get(n)}function vh(n,t,e,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(n,e):r?r.value=e:t.set(n,e),e}function _h(n,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?t===n:n.has(t)}function yh(n,t,e){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,r;if(e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],e&&(r=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(o){return Promise.reject(o)}}),n.stack.push({value:t,dispose:i,async:e})}else e&&n.stack.push({async:!0});return t}function wh(n){function t(o){n.error=n.hasError?new yv(o,n.error,"An error was suppressed during disposal."):o,n.hasError=!0}var e,i=0;function r(){for(;e=n.stack.pop();)try{if(!e.async&&i===1)return i=0,n.stack.push(e),Promise.resolve().then(r);if(e.dispose){var o=e.dispose.call(e.value);if(e.async)return i|=2,Promise.resolve(o).then(r,function(s){return t(s),r()})}else i|=1}catch(s){t(s)}if(i===1)return n.hasError?Promise.reject(n.error):Promise.resolve();if(n.hasError)throw n.error}return r()}function xh(n,t){return typeof n=="string"&&/^\.\.?\//.test(n)?n.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,i,r,o,s){return i?t?".jsx":".js":r&&(!o||!s)?e:r+o+"."+s.toLowerCase()+"js"}):n}var pl,Lo,Uo,_v,gl,yv,wv,re=xp(()=>{"use strict";pl=function(n,t){return pl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},pl(n,t)};Lo=function(){return Lo=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++){e=arguments[i];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Lo.apply(this,arguments)};Uo=Object.create?function(n,t,e,i){i===void 0&&(i=e);var r=Object.getOwnPropertyDescriptor(t,e);
1(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,i,r)}:function(n,t,e,i){i===void 0&&(i=e),n[i]=t[e]};_v=Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t},gl=function(n){return gl=Object.getOwnPropertyNames||function(t){var e=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[e.length]=i);return e},gl(n)};yv=typeof SuppressedError=="function"?SuppressedError:function(n,t,e){var i=new Error(e);return i.name="SuppressedError",i.error=n,i.suppressed=t,i};wv={__extends:Xu,__assign:Lo,__rest:vt,__decorate:Qu,__param:eh,__esDecorate:th,__runInitializers:ih,__propKey:nh,__setFunctionName:rh,__metadata:oh,__awaiter:C,__generator:sh,__createBinding:Uo,__exportStar:ah,__values:Vo,__read:bl,__spread:lh,__spreadArrays:ch,__spreadArray:dh,__await:Qi,__asyncGenerator:uh,__asyncDelegator:hh,__asyncValues:fh,__makeTemplateObject:mh,__importStar:ph,__importDefault:gh,__classPrivateFieldGet:bh,__classPrivateFieldSet:vh,__classPrivateFieldIn:_h,__addDisposableResource:yh,__disposeResources:wh,__rewriteRelativeImportExtension:xh}});var wl=qt(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});var _l=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
1de=t.code}};yl.default=_l});var Cl=qt(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var xv=(re(),ki(si)),Ev=xv.__importDefault(wl()),xl=class{constructor(t){var e,i;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(i=t.isMaybeSingle)!==null&&i!==void 0?i:!1,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}then(t,e){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");let i=this.fetch,r=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(o=>h(this,null,function*(){var s,a,l,c;let d=null,u=null,m=null,f=o.status,g=o.statusText;if(o.ok){if(this.method!=="HEAD"){let M=yield o.text();M===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((s=this.headers.get("Accept"))===null||s===void 0)&&s.includes("application/vnd.pgrst.plan+text"))?u=M:u=JSON.parse(M))}let b=(a=this.headers.get("Prefer"))===null||a===void 0?void 0:a.match(/count=(exact|planned|estimated)/),y=(l=o.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");b&&y&&y.length>1&&(m=parseInt(y[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(d={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,m=null,f=406,g="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{let b=yield o.text();try{d=JSON.parse(b),Array.isArray(d)&&o.status===404&&(u=[],d=null,f=200,g="OK")}catch{o.status===404&&b===""?(f=204,g="No Content"):d={message:b}}if(d&&this.isMaybeSingle&&(!((c=d?.details)===null||c===void 0)&&c.includes("0 rows"))&&(d=null,f=200,g="OK"),d&&this.shouldThrowOnError)throw new Ev.default(d)}return{error:d,data:u,count:m,status:f,statusText:g}}));return this.shouldThrowOnError||(r=r.catch(o=>{var s,a,l,c,d,u;let m="",f=o?.cause;if(f){let g=(s=f?.message)!==null&&s!==void 0?s:"",p=(a=f?.code)!==null&&a!==void 0?a:"";m=`${(l=o?.name)!==null&&l!==void 0?l:"FetchError"}: ${o?.message}`,m+=` 2 3Caused by: ${(c=f?.name)!==null&&c!==void 0?c:"Error"}: ${g}`,p&&(m+=` (${p})`),f?.stack&&(m+=` 4${f.stack}`)}else m=(d=o?.stack)!==null&&d!==void 0?d:"";return{error:{message:`${(u=o?.name)!==null&&u!==void 0?u:"FetchError"}: ${o?.message}`,details:m,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),r.then(t,e)}returns(){return this}overrideTypes(){return this}};El.default=xl});var Al=qt(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var Cv=(re(),ki(si)),Sv=Cv.__importDefault(Cl()),Sl=class extends Sv.default{select(t){let e=!1,i=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:i,foreignTable:r,referencedTable:o=r}={}){let s=o?`${o}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${t}.${e?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:i=e}={}){let r=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:i,referencedTable:r=i}={}){let o=typeof r>"u"?"offset":`${r}.offset`,s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(o,`${t}`),this.url.searchParams.set(s,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
4explain({analyze:t=!1,verbose:e=!1,settings:i=!1,buffers:r=!1,wal:o=!1,format:s="text"}={}){var a;let l=[t?"analyze":null,e?"verbose":null,i?"settings":null,r?"buffers":null,o?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${c}"; options=${l};`),s==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};Il.default=Sl});var zo=qt(kl=>{"use strict";Object.defineProperty(kl,"__esModule",{value:!0});var Iv=(re(),ki(si)),Av=Iv.__importDefault(Al()),Rv=new RegExp("[,()]"),Rl=class extends Av.default{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){let i=Array.from(new Set(e)).map(r=>typeof r=="string"&&Rv.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${i})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:i,type:r}={}){let o="";r==="plain"?o="pl":r==="phrase"?o="ph":r==="websearch"&&(o="w");let s=i===void 0?"":`(${i})`;return this.url.searchParams.append(t,`${o}fts${s}.${e}`),this}match(t){return Object.entries(t).forEach(([e,i])=>{this.url.searchParams.append(e,`eq.${i}`)}),this}not(t,e,i){return this.url.searchParams.append(t,`not.${e}.${i}`),this}or(t,{foreignTable:e,referencedTable:i=e}={}){let r=i?`${i}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,i){return this.url.searchParams.append(t,`${e}.${i}`),this}};kl.default=Rl});var Tl=qt(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});var kv=(re(),ki(si)),hr=kv.__importDefault(zo()),Ol=class{constructor(t,{headers:e={},schema:i,fetch:r}){this.url=t,this.headers=new Headers(e),this.schema=i,this.fetch=r}select(t,e){let{head:i=!1,count:r}=e??{},o=i?"HEAD":"GET",s=!1,a=(t??"*").split("").map(l=>/\s/.test(l)&&!s?"":(l==='"'&&(s=!s),l)).join("");return this.url.searchParams.set("select",a),r&&this.headers.append("Prefer",`count=${r}`),new hr.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(t,{count:e,defaultToNull:i=!0}={}){var r;let o="POST";if(e&&this.headers.append("Prefer",`count=${e}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(t)){let s=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(s.length>
40){let a=[...new Set(s)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new hr.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch})}upsert(t,{onConflict:e,ignoreDuplicates:i=!1,count:r,defaultToNull:o=!0}={}){var s;let a="POST";if(this.headers.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),e!==void 0&&this.url.searchParams.set("on_conflict",e),r&&this.headers.append("Prefer",`count=${r}`),o||this.headers.append("Prefer","missing=default"),Array.isArray(t)){let l=t.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){let c=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new hr.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}update(t,{count:e}={}){var i;let r="PATCH";return e&&this.headers.append("Prefer",`count=${e}`),new hr.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}delete({count:t}={}){var e;let i="DELETE";return t&&this.headers.append("Prefer",`count=${t}`),new hr.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch})}};Dl.default=Ol});var Sh=qt(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});var Ch=(re(),ki(si)),Ov=Ch.__importDefault(Tl()),Dv=Ch.__importDefault(zo()),Ml=class n{constructor(t,{headers:e={},schema:i,fetch:r}={}){this.url=t,this.headers=new Headers(e),this.schemaName=i,this.fetch=r}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");let e=new URL(`${this.url}/${t}`);return new Ov.default(e,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new n(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,e={},{head:i=!1,get:r=!1,count:o}={}){var s;let a,l=new URL(`${this.url}/rpc/${t}`),c;i||r?(a=i?"HEAD":"GET",Object.entries(e).filter(([u,m])=>m!==void 0).map(([u,m])=>[u,Array.isArray(m)?`{${m.join(",")}}`:`${m}`]).forEach(([u,m])=>{l.searchParams.append(u,m)})):(a="POST",c=e);let d=new Headers(this.headers);return o&&d.set("Prefer",`count=${o}`),new Dv.default({method:a,url:l,headers:d,schema:this.schemaName,body:c,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}};Pl.default=Ml});var Th=qt(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.PostgrestError=Ae.PostgrestBuilder=Ae.PostgrestTransformBuilder=Ae.PostgrestFilterBuilder=Ae.PostgrestQueryBuilder=Ae.PostgrestClient=void 0;var en=(re(),ki(si)),Ih=en.__importDefault(Sh());Ae.PostgrestClient=Ih.default;var Ah=en.__importDefault(Tl());Ae.PostgrestQueryBuilder=Ah.default;var Rh=en.__importDefault(zo());Ae.PostgrestFilterBuilder=Rh.default;var kh=en.__importDefault(Al());Ae.PostgrestTransformBuilder=kh.default;var Oh=en.__importDefault(Cl());Ae.PostgrestBuilder=Oh.default;var Dh=en.__importDefault(wl());Ae.PostgrestError=Dh.default;Ae.default={PostgrestClient:Ih.default,PostgrestQueryBuilder:Ah.default,PostgrestFilterBuilder:Rh.default,PostgrestTransformBuilder:kh.default,PostgrestBuilder:Oh.default,PostgrestError:Dh.default}});var Pn=class{},ho=class{},mt=class n{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(` 5`).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,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((e,i)=>{this.setHeaderEntries(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}: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 n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}
vendor: 5,010 bytes, line 5
5copyFrom(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 n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?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 i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var ma=class{encodeKey(t){return Ld(t)}encodeValue(t){return Ld(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function Ip(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var Ap=/%(\d[a-f0-9])/gi,Rp={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Ld(n){return encodeURIComponent(n).replace(Ap,(t,e)=>Rp[e]??t)}function uo(n){return`${n}`}var Tt=class n{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new ma,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Ip(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(uo):[uo(i)];this.map.set(e,r)})):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(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,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(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({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(uo(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=this.map.get(t.param)||[],r=i.indexOf(uo(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var pa=class{constructor(){this.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 kp(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Vd(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function Ud(n){return typeof Blob<"u"&&n instanceof Blob}function Bd(n){return typeof FormData<"u"&&n instanceof FormData}function Op(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Mn=class n{constructor(t,e,i,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let o;if(kp(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,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 mt,this.context??=new pa,!this.params)this.params=new Tt,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="str
5ing"||Vd(this.body)||Ud(this.body)||Bd(this.body)||Op(this.body)?this.body:this.body instanceof Tt?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||Bd(this.body)?null:Ud(this.body)?this.body.type||null:Vd(this.body)?null:typeof this.body=="string"?"text/plain":this.body instanceof Tt?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?"application/json":null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=t.transferCache??this.transferCache,s=t.body!==void 0?t.body:this.body,a=t.withCredentials??this.withCredentials,l=t.reportProgress??this.reportProgress,c=t.headers||this.headers,d=t.params||this.params,u=t.context??this.context;return t.setHeaders!==void 0&&(c=Object.keys(t.setHeaders).reduce((m,f)=>m.set(f,t.setHeaders[f]),c)),t.setParams&&(d=Object.keys(t.setParams).reduce((m,f)=>m.set(f,t.setParams[f]),d)),new n(e,i,s,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},Mt=function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n}(Mt||{}),Fn=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new mt,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},fo=class n extends Fn{constructor(t={}){super(t),this.type=Mt.ResponseHeader}clone(t={}){return new n({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})}},Nn=class n extends Fn{constructor(t={}){super(t),this.type=Mt.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new n({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})}},Dt=class extends Fn{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,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}},qd=200,Dp=204;function fa(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,transferCache:n.transferCache}}var va=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Mn)o=e;else{let l;r.headers instanceof mt?l=r.headers:l=new mt(r.headers);let c;r.params&&(r.params instanceof Tt?c=r.params:c=new Tt({fromObject:r.params})),o=new Mn(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}let s=D(o).pipe(St(l=>this.handler.handle(l)));if(e instanceof Mn||r.observe==="events")return s;let a=s.pipe(he(l=>l instanceof Nn));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe($(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe($(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe($(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return a.pipe($(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}
5){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new Tt().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,fa(r,i))}post(e,i,r={}){return this.request("POST",e,fa(r,i))}put(e,i,r={}){return this.request("PUT",e,fa(r,i))}static{this.\u0275fac=function(i){return new(i||n)(v(Pn))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),Tp=/^\)\]\}',?\n/,Mp="X-Request-URL";function zd(n){if(n.url)return n.url;let t=Mp.toLocaleLowerCase();return n.headers.get(t)}var Pp=(()=>{class n{constructor(){this.fetchImpl=x(ga,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e)),this.ngZone=x(P)}handle(e){return new Kt(i=>{let r=new AbortController;return this.doRequest(e,r.signal,i).then(ba,o=>i.error(new Dt({error:o}))),()=>r.abort()})}doRequest(e,i,r){return h(this,null,function*(){let o=this.createRequestInit(e),s;try{let f=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,_({signal:i},o)));Fp(f),r.next({type:Mt.Sent}),s=yield f}catch(f){r.error(new Dt({error:f,status:f.status??0,statusText:f.statusText,url:e.urlWithParams,headers:f.headers}));return}let a=new mt(s.headers),l=s.statusText,c=zd(s)??e.urlWithParams,d=s.status,u=null;if(e.reportProgress&&r.next(new fo({headers:a,status:d,statusText:l,url:c})),s.body){let f=s.headers.get("content-length"),g=[],p=s.body.getReader(),b=0,y,M,E=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>h(this,null,function*(){for(;;){let{done:B,value:we}=yield p.read();if(B)break;if(g.push(we),b+=we.length,e.reportProgress){M=e.responseType==="text"?(M??"")+(y??=new TextDecoder).decode(we,{stream:!0}):void 0;let K=()=>r.next({type:Mt.DownloadProgress,total:f?+f:void 0,loaded:b,partialText:M});E?E.run(K):K()}}}));let I=this.concatChunks(g,b);try{let B=s.headers.get("Content-Type")??"";u=this.parseBody(e,I,B)}catch(B){r.error(new Dt({error:B,headers:new mt(s.headers),status:s.status,statusText:s.statusText,url:zd(s)??e.urlWithParams}));return}}d===0&&(d=u?qd:0),d>=200&&d<300?(r.next(new Nn({body:u,headers:a,status:d,statusText:l,url:c})),r.complete()):r.error(new Dt({error:u,headers:a,status:d,statusText:l,url:c}))})}parseBody(e,i,r){switch(e.responseType){case"json":let o=new TextDecoder().decode(i).replace(Tp,"");return o===""?null:JSON.parse(o);case"text":return new TextDecoder().decode(i);case"blob":return new Blob([i],{type:r});case"arraybuffer":return i.buffer}}createRequestInit(e){let i={},r=e.withCredentials?"include":void 0;if(e.headers.forEach((o,s)=>i[o]=s.join(",")),e.headers.has("Accept")||(i.Accept="application/json, text/plain, */*"),!e.headers.has("Content-Type")){let o=e.detectContentTypeHeader();o!==null&&(i["Content-Type"]=o)}return{body:e.serializeBody(),method:e.method,headers:i,credentials:r}}concatChunks(e,i){let r=new Uint8Array(i),o=0;for(let s of e)r.set(s,o),o+=s.length;return r}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),ga=class{};function ba(){}function Fp(n){n.then(ba,ba)}function Gd(n,t){return t(n)}function Np(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}function jp(n,t,e){return(i,r)=>Ve(e,()=>t(i,o=>n(o,r)))}var Lp=new O(""),_a=new O(""),Vp=new O(""),Kd=new O("",{providedIn:"root",factory:()=>!0});function Up(){let n=null;return(t,e)=>{n===null&&(n=(x(Lp,{optional:!0})??[]).reduceRight(Np,Gd));let i=x(An);if(x(Kd)){let o=i.add();return n(t,e).pipe(Zt(()=>i.remove(o)))}else return n(t,e)}}var $d=(()=>{class n extends Pn{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null,this.pendingTasks=x(An),this.contributeToStability=x(Kd)}handle(e){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(_a),...this.injector.get(Vp,[])]));this.chain=i.reduceRight((r,o)=>jp(r,o,this.injector),Gd)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(Zt(()=>this.pendingTasks.remove(i)))}else return this.chain(e,i=>this.backend.handle(i))}static{this.\u0275fac=function(i){return new(i||n)(v(ho),v(dt))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})();var Bp=/^\)\]\}',?\n/;function zp(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}var Hd=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new q(-2800,!1);let i=this.xhrFactory;return(i.\u0275loadImpl?_e(i.\u0275loadImpl()):D(null)).pipe(ke(()=>new Kt(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEac
5h((p,b)=>s.setRequestHeader(p,b.join(","))),e.headers.has("Accept")||s.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let p=e.detectContentTypeHeader();p!==null&&s.setRequestHeader("Content-Type",p)}if(e.responseType){let p=e.responseType.toLowerCase();s.responseType=p!=="json"?p:"text"}let a=e.serializeBody(),l=null,c=()=>{if(l!==null)return l;let p=s.statusText||"OK",b=new mt(s.getAllResponseHeaders()),y=zp(s)||e.url;return l=new fo({headers:b,status:s.status,statusText:p,url:y}),l},d=()=>{let{headers:p,status:b,statusText:y,url:M}=c(),E=null;b!==Dp&&(E=typeof s.response>"u"?s.responseText:s.response),b===0&&(b=E?qd:0);let I=b>=200&&b<300;if(e.responseType==="json"&&typeof E=="string"){let B=E;E=E.replace(Bp,"");try{E=E!==""?JSON.parse(E):null}catch(we){E=B,I&&(I=!1,E={error:we,text:E})}}I?(o.next(new Nn({body:E,headers:p,status:b,statusText:y,url:M||void 0})),o.complete()):o.error(new Dt({error:E,headers:p,status:b,statusText:y,url:M||void 0}))},u=p=>{let{url:b}=c(),y=new Dt({error:p,status:s.status||0,statusText:s.statusText||"Unknown Error",url:b||void 0});o.error(y)},m=!1,f=p=>{m||(o.next(c()),m=!0);let b={type:Mt.DownloadProgress,loaded:p.loaded};p.lengthComputable&&(b.total=p.total),e.responseType==="text"&&s.responseText&&(b.partialText=s.responseText),o.next(b)},g=p=>{let b={type:Mt.UploadProgress,loaded:p.loaded};p.lengthComputable&&(b.total=p.total),o.next(b)};return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",u),s.addEventListener("abort",u),e.reportProgress&&(s.addEventListener("progress",f),a!==null&&s.upload&&s.upload.addEventListener("progress",g)),s.send(a),o.next({type:Mt.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",u),e.reportProgress&&(s.removeEventListener("progress",f),a!==null&&s.upload&&s.upload.removeEventListener("progress",g)),s.readyState!==s.DONE&&s.abort()}})))}static{this.\u0275fac=function(i){return new(i||n)(v(co))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),Yd=new O(""),$p="XSRF-TOKEN",Hp=new O("",{providedIn:"root",factory:()=>$p}),Wp="X-XSRF-TOKEN",qp=new O("",{providedIn:"root",factory:()=>Wp}),mo=class{},Gp=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=oo(e,this.cookieName),this.lastCookieString=e),this.lastToken}static{this.\u0275fac=function(i){return new(i||n)(v(N),v(ut),v(Hp))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})();function Kp(n,t){let e=n.url.toLowerCase();if(!x(Yd)||n.method==="GET"||n.method==="HEAD"||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=x(mo).getToken(),r=x(qp);return i!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var Zd=function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n}(Zd||{});function Yp(n,t){return{\u0275kind:n,\u0275providers:t}}function Jd(...n){let t=[va,Hd,$d,{provide:Pn,useExisting:$d},{provide:ho,useFactory:()=>x(Pp,{optional:!0})??x(Hd)},{provide:_a,useValue:Kp,multi:!0},{provide:Yd,useValue:!0},{provide:mo,useClass:Gp}];for(let e of n)t.push(...e.\u0275providers);return Ti(t)}var Wd=new O("");function Xd(){return Yp(Zd.LegacyInterceptors,[{provide:Wd,useFactory:Up},{provide:_a,useExisting:Wd,multi:!0}])}var xa=class extends Od{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Ea=class n extends xa{static makeCurrent(){kd(new n)}onAndCancel(t,e,i){return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}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=Xp();return e==null?null:Qp(e)}resetBaseElement(){Ln=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return oo(document.cookie,t)}},Ln=null;function Xp(){return Ln=Ln||document.querySelector("base"),Ln?Ln.getAttribute("href"):null}function Qp(n){return new URL(n,document.baseURI).pathname}var Ca=class{addToWindow(t){At.getAngularTestability=(i,r=!0)=>{let o=t.findTestabilityInTree(i,r);if(o==null)throw new q(5103,!1);return o},At.getAllAngularTestabilities=()=>t.getAllTestabilities(),At.getAllAngularRootElements=()=>t.getAllRootElements();let e=i=>{let r=At.getAllAngularTestabilities(),o=r.length,s=function(){o--,o==0&&i()};r.forEach(a=>{a.whenStable(s)})};At.frameworkStabilizers||(At.frameworkStabilizers=[]),At.frameworkStabilizers.push(e)}findTestabilityInTree(t,e,i){if(e==null)return null;let r=t.getTestability(e);return r??(i?ni().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},eg=(()=>{class n{build(){return new XMLHttpRequest}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),Sa=new O(""),tu=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(o=>o.supports(e)),!i)throw new q(5101,!1);return this._eventNameToPlugin.set(e,i),i}static{this.\u0275fac=function(i){return new(i||n)(v(Sa),v(P))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),po=class{constructor(t){this._doc=t}},ya="ng-app-id",iu=(()=>{class n{constructor(e,i,r,o={}){this.doc=e,this.appId=i,this.nonce=r,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=lo(o),this.resetHostNodes()}
5addStyles(e){for(let i of e)this.changeUsageCount(i,1)===1&&this.onStyleAdded(i)}removeStyles(e){for(let i of e)this.changeUsageCount(i,-1)<=0&&this.onStyleRemoved(i)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(i=>i.remove()),e.clear());for(let i of this.getAllStyles())this.onStyleRemoved(i);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){let i=this.styleRef;i.get(e)?.elements?.forEach(r=>r.remove()),i.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${ya}="${this.appId}"]`);if(e?.length){let i=new Map;return e.forEach(r=>{r.textContent!=null&&i.set(r.textContent,r)}),i}return null}changeUsageCount(e,i){let r=this.styleRef;if(r.has(e)){let o=r.get(e);return o.usage+=i,o.usage}return r.set(e,{usage:i,elements:[]}),i}getStyleElement(e,i){let r=this.styleNodesInDOM,o=r?.get(i);if(o?.parentNode===e)return r.delete(i),o.removeAttribute(ya),o;{let s=this.doc.createElement("style");return this.nonce&&s.setAttribute("nonce",this.nonce),s.textContent=i,this.platformIsServer&&s.setAttribute(ya,this.appId),e.appendChild(s),s}}addStyleToHost(e,i){let r=this.getStyleElement(e,i),o=this.styleRef,s=o.get(i)?.elements;s?s.push(r):o.set(i,{elements:[r],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(i){return new(i||n)(v(N),v(Rn),v(kn,8),v(ut))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),wa={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"},Ra=/%COMP%/g,nu="%COMP%",tg=`_nghost-${nu}`,ig=`_ngcontent-${nu}`,ng=!0,rg=new O("",{providedIn:"root",factory:()=>ng});function og(n){return ig.replace(Ra,n)}function sg(n){return tg.replace(Ra,n)}function ru(n,t){return t.map(e=>e.replace(Ra,n))}var go=(()=>{class n{constructor(e,i,r,o,s,a,l,c=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=lo(a),this.defaultRenderer=new Vn(e,s,l,this.platformIsServer)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;this.platformIsServer&&i.encapsulation===In.ShadowDom&&(i=W(_({},i),{encapsulation:In.Emulated}));let r=this.getOrCreateRenderer(e,i);return r instanceof bo?r.applyToHost(e):r instanceof Un&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.platformIsServer;switch(i.encapsulation){case In.Emulated:o=new bo(l,c,i,this.appId,d,s,a,u);break;case In.ShadowDom:return new Ia(l,c,e,i,s,a,this.nonce,u);default:o=new Un(l,c,i,d,s,a,u);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(i){return new(i||n)(v(tu),v(iu),v(Rn),v(rg),v(N),v(ut),v(P),v(kn))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),Vn=class{constructor(t,e,i,r){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(wa[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(Qd(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Qd(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new q(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=wa[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=wa[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(On.DashCase|On.Important)?t.style.setProperty(e,i,r&On.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&On.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i){if(typeof t=="string"&&(t=ni().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(i))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function Qd(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Ia=class extends Vn{constructor(t,e,i,r,o,s,a,l){super(t,o,s,l),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=ru(r.id,r.styles);for(let d of c){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Un=class extends Vn{constructor(t,e,i,r,o,s,a,l){super(t,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=l?ru(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},bo=class extends Un{constructor(t,e,i,r,o,s,a,l){let c=r+"-"+i.id;super(t,e,i,o,s,a,l,c),this.contentAttr=og(c),this.hostAttr=sg(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},ag=(()=>{class n extends po{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}static{this.\u0275fac=function(i){return new(i||n)(v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),eu=["alt","control","meta","shift"],lg={"\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"},cg={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},dg=(()=>{class n extends po{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r){let o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ni().onAndCancel(e,o.domEventName,s))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),eu.forEach(c=>{let d=i.indexOf(c);d>-1&&(i.splice(d,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=lg[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),eu.forEach(s=>{if(s!==r){let a=cg[s];a(e)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(i){return new(i||n)(v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})();function ug(){Ea.makeCurrent()}function hg(){return new oa}function fg(){return od(document),document}var mg=[{provide:ut,useValue:Fd},{provide:sd,useValue:ug,multi:!0},{provide:N,useFactory:fg,deps:[]}],ou=Sd(Id,"browser",mg),pg=new O(""),gg=[{provide:to,useClass:Ca,deps:[]},{provide:Cd,useClass:io,deps:[P,ca,to]},{provide:io,useClass:io,deps:[P,ca,to]}],bg=[{provide:rd,useValue:"root"},{provide:oa,useFactory:hg,deps:[]},{provide:Sa,useClass:ag,multi:!0,deps:[N,P,ut]},{provide:Sa,useClass:dg,multi:!0,deps:[N]},go,iu,tu,{provide:Jr,useExisting:go},{provide:co,useClass:eg,deps:[]},[]],su=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:Rn,useValue:e.appId}]}}static{this.\u0275fac=function(i){return new(i||n)(v(pg,12))}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({providers:[...bg,...gg],imports:[ao,Ad]})}}return n})();var au=(()=>{class n{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(i){return new(i||n)(v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var ka=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=v(vg),r},providedIn:"root"})}}return n})(),vg=(()=>{class n extends ka{constructor(e){super(),this._doc=e}sanitize(e,i){if(i==null)return null;switch(e){case Xt.NONE:return i;case Xt.HTML:return Pi(i,"HTML")?Mi(i):fd(this._doc,String(i)).toString();case Xt.STYLE:return Pi(i,"Style")?Mi(i):i;case Xt.SCRIPT:if(Pi(i,"Script"))return Mi(i);throw new q(5200,!1);case Xt.URL:return Pi(i,"URL")?Mi(i):hd(String(i));case Xt.RESOURCE_URL:if(Pi(i,"ResourceURL"))return Mi(i);throw new q(5201,!1);default:throw new q(5202,!1)}}bypassSecurityTrustHtml(e){return ad(e)}bypassSecurityTrustStyle(e){return ld(e)}bypassSecurityTrustScript(e){return cd(e)}bypassSecurityTrustUrl(e){return dd(e)}bypassSecurityTrustResourceUrl(e){return ud(e)}static{this.\u0275fac=function(i){return new(i||n)(v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var U="primary",tr=Symbol("RouteTitle"),Fa=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function Wi(n){return new Fa(n)}function wg(n,t,e){let i=e.path.split("/");if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.length<n.length))return null;let r={};for(let o=0;o<i.length;o++){let s=i[o],a=n[o];if(s[0]===":")r[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:n.slice(0,i.length),posParams:r}}function xg(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;++e)if(!nt(n[e],t[e]))return!1;return!0}function nt(n,t){let e=n?Na(n):void 0,i=t?Na(t):void 0;if(!e||!i||e.length!=i.length)return!1;let r;for(let o=0;o<e.length;o++)if(r=e[o],!vu(n[r],t[r]))return!1;return!0}function Na(n){return[...Object.keys(n),...Object.getOwnPropertySymbols(n)]}function vu(n,t){if(Array.isArray(n)&&Array.isArray(t)){if(n.length!==t.length)return!1;let e=[...n].sort(),i=[...t].sort();return e.every((r,o)=>i[o]===r)}else return n===t}function _u(n){return n.length>0?n[n.length-1]:null}function Ft(n){return qr(n)?n:no(n)?_e(Promise.resolve(n)):D(n)}var Eg={exact:wu,subset:xu},yu={exact:Cg,subset:Sg,ignored:()=>!0};function lu(n,t,e){return Eg[e.paths](n.root,t.root,e.matrixParams)&&yu[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function Cg(n,t){return nt(n,t)}function wu(n,t,e){if(!oi(n.segments,t.segments)||!yo(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!wu(n.children[i],t.children[i],e))return!1;return!0}function Sg(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>vu(n[e],t[e]))}function xu(n,t,e){return Eu(n,t,t.segments,e)}function Eu(n,t,e,i){if(n.segments.length>e.length){let r=n.segments.slice(0,e.length);
vendor: 11,637 bytes, line 5
5return!(!oi(r,e)||t.hasChildren()||!yo(r,e,i))}else if(n.segments.length===e.length){if(!oi(n.segments,e)||!yo(n.segments,e,i))return!1;for(let r in t.children)if(!n.children[r]||!xu(n.children[r],t.children[r],i))return!1;return!0}else{let r=e.slice(0,n.segments.length),o=e.slice(n.segments.length);return!oi(n.segments,r)||!yo(n.segments,r,i)||!n.children[U]?!1:Eu(n.children[U],t,o,i)}}function yo(n,t,e){return t.every((i,r)=>yu[e](n[r].parameters,i.parameters))}var gt=class{constructor(t=new G([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Wi(this.queryParams),this._queryParamMap}toString(){return Rg.serialize(this)}},G=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return wo(this)}},ri=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=Wi(this.parameters),this._parameterMap}toString(){return Su(this)}};function Ig(n,t){return oi(n,t)&&n.every((e,i)=>nt(e.parameters,t[i].parameters))}function oi(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function Ag(n,t){let e=[];return Object.entries(n.children).forEach(([i,r])=>{i===U&&(e=e.concat(t(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==U&&(e=e.concat(t(r,i)))}),e}var ir=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:()=>new qi,providedIn:"root"})}}return n})(),qi=class{parse(t){let e=new La(t);return new gt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Bn(t.root,!0)}`,i=Dg(t.queryParams),r=typeof t.fragment=="string"?`#${kg(t.fragment)}`:"";return`${e}${i}${r}`}},Rg=new qi;function wo(n){return n.segments.map(t=>Su(t)).join("/")}function Bn(n,t){if(!n.hasChildren())return wo(n);if(t){let e=n.children[U]?Bn(n.children[U],!1):"",i=[];return Object.entries(n.children).forEach(([r,o])=>{r!==U&&i.push(`${r}:${Bn(o,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=Ag(n,(i,r)=>r===U?[Bn(n.children[U],!1)]:[`${r}:${Bn(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[U]!=null?`${wo(n)}/${e[0]}`:`${wo(n)}/(${e.join("//")})`}}function Cu(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function vo(n){return Cu(n).replace(/%3B/gi,";")}function kg(n){return encodeURI(n)}function ja(n){return Cu(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function xo(n){return decodeURIComponent(n)}function cu(n){return xo(n.replace(/\+/g,"%20"))}function Su(n){return`${ja(n.path)}${Og(n.parameters)}`}function Og(n){return Object.entries(n).map(([t,e])=>`;${ja(t)}=${ja(e)}`).join("")}function Dg(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(r=>`${vo(e)}=${vo(r)}`).join("&"):`${vo(e)}=${vo(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var Tg=/^[^\/()?;#]+/;function Da(n){let t=n.match(Tg);return t?t[0]:""}var Mg=/^[^\/()?;=#]+/;function Pg(n){let t=n.match(Mg);return t?t[0]:""}var Fg=/^[^=?&#]+/;function Ng(n){let t=n.match(Fg);return t?t[0]:""}var jg=/^[^&#]+/;function Lg(n){let t=n.match(jg);return t?t[0]:""}var La=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new G([],{}):new G([],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 e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[U]=new G(t,e)),i}parseSegment(){let t=Da(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new q(4009,!1);return this.capture(t),new ri(xo(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=Pg(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let r=Da(this.remaining);r&&(i=r,this.capture(i))}t[xo(e)]=xo(i)}parseQueryParam(t){let e=Ng(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let s=Lg(this.remaining);s&&(i=s,this.capture(i))}let r=cu(e),o=cu(i);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Da(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new q(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=U);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[U]:new G([],s),this.consumeOptional("//")}return e}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 q(4011,!1)}};function Iu(n){return n.segments.length>0?new G([],{[U]:n}):n}function Au(n){let t={};for(let[i,r]of Object.entries(n.children)){let o=Au(r);if(i===U&&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[i]=o)}let e=new G(n.segments,t);return Vg(e)}function Vg(n){if(n.numberOfChildren===1&&n.children[U]){let t=n.children[U];return new G(n.segments.concat(t.segments),t.children)}return n}function Gn(n){return n instanceof gt}function Ug(n,t,e=null,i=null){let r=Ru(n);return ku(r,t,e,i)}function Ru(n){let t;function e(o){let s={};for(let l of o.children){let c=e(l);s[l.outlet]=c}let a=new G(o.url,s);return o===n&&(t=a),a}let i=e(n.root),r=Iu(i);return t??r}function ku(n,t,e,i){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return Ta(r,r,r,e,i);let o=Bg(t);if(o.toRoot())return Ta(r,r,new G([],{}),e,i);let s=zg(o,r,n),a=s.processChildren?Hn(s.segmentGroup,s.index,o.commands):Du(s.segmentGroup,s.index,o.commands);return Ta(r,s.segmentGroup,a,e,i)}function Eo(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Kn(n){return typeof n=="object"&&n!=null&&n.outlets}function Ta(n,t,e,i,r){let o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;n===t?s=e:s=Ou(n,t,e);let a=Iu(Au(s));return new gt(a,o,r)}function Ou(n,t,e){let i={};return Object.entries(n.children).forEach(([r,o])=>{o===t?i[r]=e:i[r]=Ou(o,t,e)}),new G(n.segments,i)}var Co=class{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Eo(i[0]))throw new q(4003,!1);let r=i.find(Kn);if(r&&r!==_u(i))throw new q(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Bg(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new Co(!0,0,n);let t=0,e=!1,i=n.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new Co(e,t,i)}var zi=class{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function zg(n,t,e){if(n.isAbsolute)return new zi(t,!0,0);if(!e)return new zi(t,!1,NaN);if(e.parent===null)return new zi(e,!0,0);let i=Eo(n.commands[0])?0:1,r=e.segments.length-1+i;return $g(e,r,n.numberOfDoubleDots)}function $g(n,t,e){let i=n,r=t,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new q(4005,!1);r=i.segments.length}return new zi(i,!1,r-o)}function Hg(n){return Kn(n[0])?n[0].outlets:{[U]:n}}function Du(n,t,e){if(n??=new G([],{}),n.segments.length===0&&n.hasChildren())return Hn(n,t,e);let i=Wg(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex<n.segments.length){let o=new G(n.segments.slice(0,i.pathIndex),{});return o.children[U]=new G(n.segments.slice(i.pathIndex),n.children),Hn(o,0,r)}else return i.match&&r.length===0?new G(n.segments,{}):i.match&&!n.hasChildren()?Va(n,t,e):i.match?Hn(n,0,r):Va(n,t,e)}function Hn(n,t,e){if(e.length===0)return new G(n.segments,{});{let i=Hg(e),r={};if(Object.keys(i).some(o=>o!==U)&&n.children[U]&&n.numberOfChildren===1&&n.children[U].segments.length===0){let o=Hn(n.children[U],t,e);return new G(n.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=Du(n.children[o],t,s))}),Object.entries(n.children).forEach(([o,s])=>{i[o]===void 0&&(r[o]=s)}),new G(n.segments,r)}}function Wg(n,t,e){let i=0,r=t,o={match:!1,pathIndex:0,commandIndex:0};for(;r<n.segments.length;){if(i>=e.length)return o;let s=n.segments[r],a=e[i];if(Kn(a))break;let l=`${a}`,c=i<e.length-1?e[i+1]:null;if(r>0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!uu(l,c,s))return o;i+=2}else{if(!uu(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function Va(n,t,e){let i=n.segments.slice(0,t),r=0;for(;r<e.length;){let o=e[r];if(Kn(o)){let l=qg(o.outlets);return new G(i,l)}if(r===0&&Eo(e[0])){let l=n.segments[t];i.push(new ri(l.path,du(e[0]))),r++;continue}let s=Kn(o)?o.outlets[U]:`${o}`,a=r<e.length-1?e[r+1]:null;s&&a&&Eo(a)?(i.push(new ri(s,du(a))),r+=2):(i.push(new ri(s,{})),r++)}return new G(i,{})}function qg(n){let t={};return Object.entries(n).forEach(([e,i])=>{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=Va(new G([],{}),0,i))}),t}function du(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function uu(n,t,e){return n==e.path&&nt(t,e.parameters)}var Wn="imperative",ve=function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n}(ve||{}),Be=class{constructor(t,e){this.id=t,this.url=e}},Gi=class extends Be{constructor(t,e,i="imperative",r=null){super(t,e),this.type=ve.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},bt=class extends Be{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=ve.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Le=function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromRe
5solver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n}(Le||{}),So=function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n}(So||{}),pt=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ve.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Pt=class extends Be{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=ve.NavigationSkipped}},Yn=class extends Be{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=ve.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},Io=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ve.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ua=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ve.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ba=class extends Be{constructor(t,e,i,r,o){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=ve.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},za=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ve.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},$a=class extends Be{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=ve.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ha=class{constructor(t){this.route=t,this.type=ve.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Wa=class{constructor(t){this.route=t,this.type=ve.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},qa=class{constructor(t){this.snapshot=t,this.type=ve.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ga=class{constructor(t){this.snapshot=t,this.type=ve.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ka=class{constructor(t){this.snapshot=t,this.type=ve.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ya=class{constructor(t){this.snapshot=t,this.type=ve.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ao=class{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=ve.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},Zn=class{},Ki=class{constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function Gg(n,t){return n.providers&&!n._injector&&(n._injector=aa(n.providers,t,`Route: ${n.path}`)),n._injector??t}function Je(n){return n.outlet||U}function Kg(n,t){let e=n.filter(i=>Je(i)===t);return e.push(...n.filter(i=>Je(i)!==t)),e}function nr(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Za=class{get injector(){return nr(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new rr(this.rootInjector),this.attachRef=null}},rr=(()=>{class n{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,i){let r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){let i=this.getContext(e);
vendor: 14,205 bytes, line 5
5i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new Za(this.rootInjector),this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}static{this.\u0275fac=function(i){return new(i||n)(v(dt))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Ro=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=Ja(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=Ja(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=Xa(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return Xa(t,this._root).map(e=>e.value)}};function Ja(n,t){if(n===t.value)return t;for(let e of t.children){let i=Ja(n,e);if(i)return i}return null}function Xa(n,t){if(n===t.value)return[t];for(let e of t.children){let i=Xa(n,e);if(i.length)return i.unshift(t),i}return[]}var je=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function Bi(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var ko=class extends Ro{constructor(t,e){super(t),this.snapshot=e,al(this,t)}toString(){return this.snapshot.toString()}};function Tu(n){let t=Yg(n),e=new Re([new ri("",{})]),i=new Re({}),r=new Re({}),o=new Re({}),s=new Re(""),a=new Yi(e,i,o,s,r,U,n,t.root);return a.snapshot=t.root,new ko(new je(a,[]),t)}function Yg(n){let t={},e={},i={},r="",o=new $i([],t,i,r,e,U,n,null,{});return new Do("",new je(o,[]))}var Yi=class{constructor(t,e,i,r,o,s,a,l){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe($(c=>c[tr]))??D(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=r,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.params.pipe($(t=>Wi(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe($(t=>Wi(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Oo(n,t,e="emptyOnly"){let i,{routeConfig:r}=n;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:_(_({},t.params),n.params),data:_(_({},t.data),n.data),resolve:_(_(_(_({},n.data),t.data),r?.data),n._resolvedData)}:i={params:_({},n.params),data:_({},n.data),resolve:_(_({},n.data),n._resolvedData??{})},r&&Pu(r)&&(i.resolve[tr]=r.title),i}var $i=class{get title(){return this.data?.[tr]}constructor(t,e,i,r,o,s,a,l,c){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}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??=Wi(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Wi(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},Do=class extends Ro{constructor(t,e){super(e),this.url=t,al(this,e)}toString(){return Mu(this._root)}};function al(n,t){t.value._routerState=n,t.children.forEach(e=>al(n,e))}function Mu(n){let t=n.children.length>0?` { ${n.children.map(Mu).join(", ")} } `:"";return`${n.value}${t}`}function Ma(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,nt(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),nt(t.params,e.params)||n.paramsSubject.next(e.params),xg(t.url,e.url)||n.urlSubject.next(e.url),nt(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function Qa(n,t){let e=nt(n.params,t.params)&&Ig(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||Qa(n.parent,t.parent))}function Pu(n){return typeof n.title=="string"||n.title===null}var ll=(()=>{class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=U,this.activateEvents=new le,this.deactivateEvents=new le,this.attachEvents=new le,this.detachEvents=new le,this.parentContexts=x(rr),this.location=x(Ni),this.changeDetector=x(it),this.inputBinder=x(No,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){let{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new q(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new q(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new q(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new q(4013,!1);this._activatedRoute=e;let r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new el(e,a,r.injector);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=J({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Ke]})}}return n})(),el=class n{__ngOutletInjector(t){return new n(this.route,this.childContexts,t)}constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Yi?this.route:t===rr?this.childContexts:this.parent.get(t,e)}},No=new O(""),hu=(()=>{class n{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(e){this.unsubscribeFromRouteData(e),this.subscribeToRouteData(e)}unsubscribeFromRouteData(e){this.outletDataSubscriptions.get(e)?.unsubscribe(),this.outletDataSubscriptions.delete(e)}subscribeToRouteData(e){let{activatedRoute:i}=e,r=Oi([i.queryParams,i.params,i.data]).pipe(ke(([o,s,a],l)=>(a=_(_(_({},o),s),a),l===0?D(a):Promise.resolve(a)))).subscribe(o=>{if(!e.isActivated||!e.activatedComponentRef||e.activatedRoute!==i||i.component===null){this.unsubscribeFromRouteData(e);return}let s=Rd(i.component);if(!s){this.unsubscribeFromRouteData(e);return}for(let{templateName:a}of s.inputs)e.activatedComponentRef.setInput(a,o[a])});this.outletDataSubscriptions.set(e,r)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})();function Zg(n,t,e){let i=Jn(n,t._root,e?e._root:void 0);return new ko(i,t)}function Jn(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let r=Jg(n,t,e);return new je(i,r)}else{if(n.shouldAttach(t.value)){let o=n.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>Jn(n,a)),s}}let i=Xg(t.value),r=t.children.map(o=>Jn(n,o));return new je(i,r)}}function Jg(n,t,e){return t.children.map(i=>{for(let r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Jn(n,i,r);return Jn(n,i)})}function Xg(n){return new Yi(new Re(n.url),new Re(n.params),new Re(n.queryParams),new Re(n.fragment),new Re(n.data),n.outlet,n.component,n)}var Xn=class{constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},Fu="ngNavigationCancelingError";function To(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=Gn(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=Nu(!1,Le.Redirect);return r.url=e,r.navigationBehaviorOptions=i,r}function Nu(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[Fu]=!0,e.cancellationCode=t,e}function Qg(n){return ju(n)&&Gn(n.url)}function ju(n){return!!n&&n[Fu]}var eb=(n,t,e,i)=>$(r=>(new tl(t,r.targetRouterState,r.currentRouterState,e,i).activate(n),r)),tl=class{constructor(t,e,i,r,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),Ma(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let r=Bi(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(t,e,i){let r=t.value,o=e?e.value:null;if(r===o)if(r.component){let s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=Bi(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){let s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,o=Bi(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let r=Bi(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new Ya(o.value.snapshot))}),t.children.length&&this.forwardEvent(new Ga(t.value.snapshot))}activateRoutes(t,e,i){let r=t.value,o=e?e.value:null;if(Ma(r),r===o)if(r.component){let s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,i);else if(r.component){let s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.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),Ma(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,i)}},Mo=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},Hi=class{constructor(t,e){this.component=t,this.route=e}};function tb(n,t,e){let i=n._root,r=t?t._root:null;return zn(i,r,e,[i.value])}function ib(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Ji(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!id(n)?n:t.get(n):i}function zn(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Bi(t);return n.children.forEach(s=>{nb(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>qn(a,e.getContext(s),r)),r}function nb(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=n.value,s=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=rb(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Mo(i)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?zn(n,t,a?a.children:null,i,r):zn(n,t,e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Hi(a.outlet.component,s))}else s&&qn(t,a,r),r.canActivateChecks.push(new Mo(i)),o.component?zn(n,null,a?a.children:null,i,r):zn(n,null,e,i,r);return r}function rb(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!oi(n.url,t.url);case"pathParamsOrQueryParamsChange":return!oi(n.url,t.url)||!nt(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Qa(n,t)||!nt(n.queryParams,t.queryParams);case"paramsChange":default:return!Qa(n,t)}}function qn(n,t,e){let i=Bi(n),r=n.value;
5Object.entries(i).forEach(([o,s])=>{r.component?t?qn(s,t.children.getContext(o),e):qn(s,null,e):qn(s,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new Hi(t.outlet.component,r)):e.canDeactivateChecks.push(new Hi(null,r)):e.canDeactivateChecks.push(new Hi(null,r))}function or(n){return typeof n=="function"}function ob(n){return typeof n=="boolean"}function sb(n){return n&&or(n.canLoad)}function ab(n){return n&&or(n.canActivate)}function lb(n){return n&&or(n.canActivateChild)}function cb(n){return n&&or(n.canDeactivate)}function db(n){return n&&or(n.canMatch)}function Lu(n){return n instanceof Jc||n?.name==="EmptyError"}var _o=Symbol("INITIAL_VALUE");function Zi(){return ke(n=>Oi(n.map(t=>t.pipe(Me(1),lt(_o)))).pipe($(t=>{for(let e of t)if(e!==!0){if(e===_o)return _o;if(e===!1||ub(e))return e}return!0}),he(t=>t!==_o),Me(1)))}function ub(n){return Gn(n)||n instanceof Xn}function hb(n,t){return Te(e=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?D(W(_({},e),{guardsResult:!0})):fb(s,i,r,n).pipe(Te(a=>a&&ob(a)?mb(i,o,n,t):D(a)),$(a=>W(_({},e),{guardsResult:a})))})}function fb(n,t,e,i){return _e(n).pipe(Te(r=>_b(r.component,r.route,e,t,i)),It(r=>r!==!0,!0))}function mb(n,t,e,i){return _e(t).pipe(St(r=>Gr(gb(r.route.parent,i),pb(r.route,i),vb(n,r.path,e),bb(n,r.route,e))),It(r=>r!==!0,!0))}function pb(n,t){return n!==null&&t&&t(new Ka(n)),D(!0)}function gb(n,t){return n!==null&&t&&t(new qa(n)),D(!0)}function bb(n,t,e){let i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||i.length===0)return D(!0);let r=i.map(o=>Yt(()=>{let s=nr(t)??e,a=Ji(o,s),l=ab(a)?a.canActivate(t,n):Ve(s,()=>a(t,n));return Ft(l).pipe(It())}));return D(r).pipe(Zi())}function vb(n,t,e){let i=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>ib(s)).filter(s=>s!==null).map(s=>Yt(()=>{let a=s.guards.map(l=>{let c=nr(s.node)??e,d=Ji(l,c),u=lb(d)?d.canActivateChild(i,n):Ve(c,()=>d(i,n));return Ft(u).pipe(It())});return D(a).pipe(Zi())}));return D(o).pipe(Zi())}function _b(n,t,e,i,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return D(!0);let s=o.map(a=>{let l=nr(t)??r,c=Ji(a,l),d=cb(c)?c.canDeactivate(n,t,e,i):Ve(l,()=>c(n,t,e,i));return Ft(d).pipe(It())});return D(s).pipe(Zi())}function yb(n,t,e,i){let r=t.canLoad;if(r===void 0||r.length===0)return D(!0);let o=r.map(s=>{let a=Ji(s,n),l=sb(a)?a.canLoad(t,e):Ve(n,()=>a(t,e));return Ft(l)});return D(o).pipe(Zi(),Vu(i))}function Vu(n){return Zc(be(t=>{if(typeof t!="boolean")throw To(n,t)}),$(t=>t===!0))}function wb(n,t,e,i){let r=t.canMatch;if(!r||r.length===0)return D(!0);let o=r.map(s=>{let a=Ji(s,n),l=db(a)?a.canMatch(t,e):Ve(n,()=>a(t,e));return Ft(l)});return D(o).pipe(Zi(),Vu(i))}var Qn=class{constructor(t){this.segmentGroup=t||null}},er=class extends Error{constructor(t){super(),this.urlTree=t}};function Ui(n){return Cn(new Qn(n))}function xb(n){return Cn(new q(4e3,!1))}function Eb(n){return Cn(Nu(!1,Le.GuardRejected))}var il=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return D(i);if(r.numberOfChildren>1||!r.children[U])return xb(`${t.redirectTo}`);r=r.children[U]}}applyRedirectCommands(t,e,i,r,o){if(typeof e!="string"){let a=e,{queryParams:l,fragment:c,routeConfig:d,url:u,outlet:m,params:f,data:g,title:p}=r,b=Ve(o,()=>a({params:f,data:g,queryParams:l,fragment:c,routeConfig:d,url:u,outlet:m,title:p}));if(b instanceof gt)throw new er(b);e=b}let s=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i);if(e[0]==="/")throw new er(s);return s}applyRedirectCreateUrlTree(t,e,i,r){let o=this.createSegmentGroup(t,e.root,i,r);return new gt(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);i[r]=e[a]}else i[r]=o}),i}createSegmentGroup(t,e,i,r){let o=this.createSegments(t,e.segments,i,r),s={};
5return Object.entries(e.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(t,l,i,r)}),new G(o,s)}createSegments(t,e,i,r){return e.map(o=>o.path[0]===":"?this.findPosParam(t,o,r):this.findOrReturn(o,i))}findPosParam(t,e,i){let r=i[e.path.substring(1)];if(!r)throw new q(4001,!1);return r}findOrReturn(t,e){let i=0;for(let r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}},nl={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Cb(n,t,e,i,r){let o=Uu(n,t,e);return o.matched?(i=Gg(t,i),wb(i,t,e,r).pipe($(s=>s===!0?o:_({},nl)))):D(o)}function Uu(n,t,e){if(t.path==="**")return Sb(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?_({},nl):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||wg)(e,n,t);if(!r)return _({},nl);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?_(_({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function Sb(n){return{matched:!0,parameters:n.length>0?_u(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function fu(n,t,e,i){return e.length>0&&Rb(n,e,i)?{segmentGroup:new G(t,Ab(i,new G(e,n.children))),slicedSegments:[]}:e.length===0&&kb(n,e,i)?{segmentGroup:new G(n.segments,Ib(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new G(n.segments,n.children),slicedSegments:e}}function Ib(n,t,e,i){let r={};for(let o of e)if(jo(n,t,o)&&!i[Je(o)]){let s=new G([],{});r[Je(o)]=s}return _(_({},i),r)}function Ab(n,t){let e={};e[U]=t;for(let i of n)if(i.path===""&&Je(i)!==U){let r=new G([],{});e[Je(i)]=r}return e}function Rb(n,t,e){return e.some(i=>jo(n,t,i)&&Je(i)!==U)}function kb(n,t,e){return e.some(i=>jo(n,t,i))}function jo(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Ob(n,t,e){return t.length===0&&!n.children[e]}var rl=class{};function Db(n,t,e,i,r,o,s="emptyOnly"){return new ol(n,t,e,i,r,s,o).recognize()}var Tb=31,ol=class{constructor(t,e,i,r,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new il(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new q(4002,`'${t.segmentGroup}'`)}recognize(){let t=fu(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe($(({children:e,rootSnapshot:i})=>{let r=new je(i,e),o=new Do("",r),s=Ug(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){let e=new $i([],Object.freeze({}),Object.freeze(_({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),U,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,U,e).pipe($(i=>({children:i,rootSnapshot:e})),Di(i=>{if(i instanceof er)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Qn?this.noMatchError(i):i}))}processSegmentGroup(t,e,i,r,o){return i.segments.length===0&&i.hasChildren()?this.processChildren(t,e,i,o):this.processSegment(t,e,i,i.segments,r,!0,o).pipe($(s=>s instanceof je?[s]:[]))}processChildren(t,e,i,r){let o=[];for(let s of Object.keys(i.children))s==="primary"?o.unshift(s):o.push(s);return _e(o).pipe(St(s=>{let a=i.children[s],l=Kg(e,s);return this.processSegmentGroup(t,l,a,s,r)}),td((s,a)=>(s.push(...a),s)),ea(null),ed(),Te(s=>{if(s===null)return Ui(i);let a=Bu(s);return Mb(a),D(a)}))}processSegment(t,e,i,r,o,s,a){return _e(e).pipe(St(l=>this.processSegmentAgainstRoute(l._injector??t,e,l,i,r,o,s,a).pipe(Di(c=>{if(c instanceof Qn)return D(null);throw c}))),It(l=>!!l),Di(l=>{if(Lu(l))return Ob(i,r,o)?D(new rl):Ui(i);throw l}))}processSegmentAgainstRoute(t,e,i,r,o,s,a,l){return Je(i)!==s&&(s===U||!jo(r,o,i))?Ui(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,i,o,s,l):Ui(r)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:m}=Uu(e,r,o);if(!l)return Ui(e);
5typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Tb&&(this.allowRedirects=!1));let f=new $i(o,c,Object.freeze(_({},this.urlTree.queryParams)),this.urlTree.fragment,mu(r),Je(r),r.component??r._loadedComponent??null,r,pu(r)),g=Oo(f,a,this.paramsInheritanceStrategy);f.params=Object.freeze(g.params),f.data=Object.freeze(g.data);let p=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,f,t);return this.applyRedirects.lineralizeSegments(r,p).pipe(Te(b=>this.processSegment(t,i,e,b.concat(m),s,!1,a)))}matchSegmentAgainstRoute(t,e,i,r,o,s){let a=Cb(e,i,r,t,this.urlSerializer);return i.path==="**"&&(e.children={}),a.pipe(ke(l=>l.matched?(t=i._injector??t,this.getChildConfig(t,i,r).pipe(ke(({routes:c})=>{let d=i._loadedInjector??t,{parameters:u,consumedSegments:m,remainingSegments:f}=l,g=new $i(m,u,Object.freeze(_({},this.urlTree.queryParams)),this.urlTree.fragment,mu(i),Je(i),i.component??i._loadedComponent??null,i,pu(i)),p=Oo(g,s,this.paramsInheritanceStrategy);g.params=Object.freeze(p.params),g.data=Object.freeze(p.data);let{segmentGroup:b,slicedSegments:y}=fu(e,m,f,c);if(y.length===0&&b.hasChildren())return this.processChildren(d,c,b,g).pipe($(E=>new je(g,E)));if(c.length===0&&y.length===0)return D(new je(g,[]));let M=Je(i)===o;return this.processSegment(d,c,b,y,M?U:o,!0,g).pipe($(E=>new je(g,E instanceof je?[E]:[])))}))):Ui(e)))}getChildConfig(t,e,i){return e.children?D({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?D({routes:e._loadedRoutes,injector:e._loadedInjector}):yb(t,e,i,this.urlSerializer).pipe(Te(r=>r?this.configLoader.loadChildren(t,e).pipe(be(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):Eb(e))):D({routes:[],injector:t})}};function Mb(n){n.sort((t,e)=>t.value.outlet===U?-1:e.value.outlet===U?1:t.value.outlet.localeCompare(e.value.outlet))}function Pb(n){let t=n.value.routeConfig;return t&&t.path===""}function Bu(n){let t=[],e=new Set;for(let i of n){if(!Pb(i)){t.push(i);continue}let r=t.find(o=>i.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...i.children),e.add(r)):t.push(i)}for(let i of e){let r=Bu(i.children);t.push(new je(i.value,r))}return t.filter(i=>!e.has(i))}function mu(n){return n.data||{}}function pu(n){return n.resolve||{}}function Fb(n,t,e,i,r,o){return Te(s=>Db(n,t,e,i,s.extractedUrl,r,o).pipe($(({state:a,tree:l})=>W(_({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function Nb(n,t){return Te(e=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return D(e);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of zu(l))s.add(c);let a=0;return _e(s).pipe(St(l=>o.has(l)?jb(l,i,n,t):(l.data=Oo(l,l.parent,n).resolve,D(void 0))),be(()=>a++),ia(1),Te(l=>a===s.size?D(e):Qe))})}function zu(n){let t=n.children.map(e=>zu(e)).flat();return[n,...t]}function jb(n,t,e,i){let r=n.routeConfig,o=n._resolve;return r?.title!==void 0&&!Pu(r)&&(o[tr]=r.title),Lb(o,n,t,i).pipe($(s=>(n._resolvedData=s,n.data=Oo(n,n.parent,e).resolve,null)))}function Lb(n,t,e,i){let r=Na(n);if(r.length===0)return D({});let o={};return _e(r).pipe(Te(s=>Vb(n[s],t,e,i).pipe(It(),be(a=>{if(a instanceof Xn)throw To(new qi,a);o[s]=a}))),ia(1),Qc(o),Di(s=>Lu(s)?Qe:Cn(s)))}function Vb(n,t,e,i){let r=nr(t)??i,o=Ji(n,r),s=o.resolve?o.resolve(t,e):Ve(r,()=>o(t,e));return Ft(s)}function Pa(n){return ke(t=>{let e=n(t);return e?_e(e).pipe($(()=>t)):D(t)})}var $u=(()=>{class n{buildTitle(e){let i,r=e.root;for(;r!==void 0;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===U);return i}getResolvedTitleForRoute(e){return e.data[tr]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:()=>x(Ub),providedIn:"root"})}}return n})(),Ub=(()=>{class n extends $u{constructor(e){super(),this.title=e}updateTitle(e){let i=this.buildTitle(e);i!==void 0&&this.title.setTitle(i)}static{this.\u0275fac=function(i){return new(i||n)(v(au))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),sr=new O("",{providedIn:"root",factory:()=>({})}),Bb=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=te({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ne],decls:1,vars:0,template:function(i,r){i&1&&Y(0,"router-outlet")},dependencies:[ll],encapsulation:2})}}return n})();function cl(n){let t=n.children&&n.children.map(cl),e=t?W(_({},n),{children:t}):_({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==U&&(e.component=Bb),e}var Po=new O(""),dl=(()=>{class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=x(ro)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return D(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let i=Ft(e.loadComponent()).pipe($(Hu),be(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),Zt(()=>{this.componentLoaders.delete(e)})),r=new Ys(i,()=>new z).pipe(Ks());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return D({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);let o=zb(i,this.compiler,e,this.onLoadEndListener).pipe(Zt(()=>{this.childrenLoaders.delete(i)})),s=new Ys(o,()=>new z).pipe(Ks());return this.childrenLoaders.set(i,s),s}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function zb(n,t,e,i){return Ft(n.loadChildren()).pipe($(Hu),Te(r=>r instanceof vd||Array.isArray(r)?D(r):_e(t.compileModuleAsync(r))),$(r=>{i&&i(n);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(e).injector,s=o.get(Po,[],{optional:!0,self:!0}).flat()),{routes:s.map(cl),injector:o}}))}function $b(n){return n&&typeof n=="object"&&"default"in n}function Hu(n){return $b(n)?n.default:n}var ul=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:()=>x(Hb),providedIn:"root"})}}return n})(),Hb=(()=>{class n{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Wu=new O(""),qu=new O("");function Wb(n,t,e){let i=n.get(qu),r=n.get(N);return n.get(P).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),qb(n))),{onViewTransitionCreated:l}=i;return l&&Ve(n,()=>l({transition:a,from:t,to:e})),s})}function qb(n){return new Promise(t=>{Rt({read:()=>setTimeout(t)},{injector:n})})}var Gb=new O(""),hl=(()=>{class n{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new z,this.transitionAbortSubject=ne
5w z,this.configLoader=x(dl),this.environmentInjector=x(dt),this.urlSerializer=x(ir),this.rootContexts=x(rr),this.location=x(ft),this.inputBindingEnabled=x(No,{optional:!0})!==null,this.titleStrategy=x($u),this.options=x(sr,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=x(ul),this.createViewTransition=x(Wu,{optional:!0}),this.navigationErrorHandler=x(Gb,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>D(void 0),this.rootComponentType=null;let e=r=>this.events.next(new Ha(r)),i=r=>this.events.next(new Wa(r));this.configLoader.onLoadEndListener=i,this.configLoader.onLoadStartListener=e}complete(){this.transitions?.complete()}handleNavigationRequest(e){let i=++this.navigationId;this.transitions?.next(W(_(_({},this.transitions.value),e),{id:i}))}setupNavigations(e,i,r){return this.transitions=new Re({id:0,currentUrlTree:i,currentRawUrl:i,extractedUrl:this.urlHandlingStrategy.extract(i),urlAfterRedirects:this.urlHandlingStrategy.extract(i),rawUrl:i,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Wn,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(he(o=>o.id!==0),$(o=>W(_({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),ke(o=>{let s=!1,a=!1;return D(o).pipe(ke(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Le.SupersededByNewNavigation),Qe;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?W(_({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=l.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&d!=="reload"){let u="";return this.events.next(new Pt(l.id,this.urlSerializer.serialize(l.rawUrl),u,So.IgnoredSameUrlNavigation)),l.resolve(!1),Qe}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return D(l).pipe(ke(u=>{let m=this.transitions?.getValue();return this.events.next(new Gi(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),m!==this.transitions?.getValue()?Qe:Promise.resolve(u)}),Fb(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),be(u=>{o.targetSnapshot=u.targetSnapshot,o.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation=W(_({},this.currentNavigation),{finalUrl:u.urlAfterRedirects});let m=new Io(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(m)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:u,extractedUrl:m,source:f,restoredState:g,extras:p}=l,b=new Gi(u,this.urlSerializer.serialize(m),f,g);this.events.next(b);let y=Tu(this.rootComponentType).snapshot;return this.currentTransition=o=W(_({},l),{targetSnapshot:y,urlAfterRedirects:m,extras:W(_({},p),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=m,D(o)}else{let u="";return this.events.next(new Pt(l.id,this.urlSerializer.serialize(l.extractedUrl),u,So.IgnoredByUrlHandlingStrategy)),l.resolve(!1),Qe}}),be(l=>{let c=new Ua(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),$(l=>(this.currentTransition=o=W(_({},l),{guards:tb(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),o)),hb(this.environmentInjector,l=>this.events.next(l)),be(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw To(this.urlSerializer,l.guardsResult);let c=new Ba(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(c)}),he(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",Le.GuardRejected),!1)),Pa(l=>{if(l.guards.canActivateChecks.length)return D(l).pipe(be(c=>{let d=new za(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),ke(c=>{let d=!1;return D(c).pipe(Nb(this.paramsInheritanceStrategy,this.environmentInjector),be({next:()=>d=!0,complete:()=>
5{d||this.cancelNavigationTransition(c,"",Le.NoDataFromResolver)}}))}),be(c=>{let d=new $a(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}))}),Pa(l=>{let c=d=>{let u=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&u.push(this.configLoader.loadComponent(d.routeConfig).pipe(be(m=>{d.component=m}),$(()=>{})));for(let m of d.children)u.push(...c(m));return u};return Oi(c(l.targetSnapshot.root)).pipe(ea(null),Me(1))}),Pa(()=>this.afterPreactivation()),ke(()=>{let{currentSnapshot:l,targetSnapshot:c}=o,d=this.createViewTransition?.(this.environmentInjector,l.root,c.root);return d?_e(d).pipe($(()=>o)):D(o)}),$(l=>{let c=Zg(e.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o=W(_({},l),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),be(()=>{this.events.next(new Zn)}),eb(this.rootContexts,e.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),Me(1),be({next:l=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new bt(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{s=!0}}),ct(this.transitionAbortSubject.pipe(be(l=>{throw l}))),Zt(()=>{!s&&!a&&this.cancelNavigationTransition(o,"",Le.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Di(l=>{if(a=!0,ju(l))this.events.next(new pt(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),Qg(l)?this.events.next(new Ki(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{let c=new Yn(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{let d=Ve(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(d instanceof Xn){let{message:u,cancellationCode:m}=To(this.urlSerializer,d);this.events.next(new pt(o.id,this.urlSerializer.serialize(o.extractedUrl),u,m)),this.events.next(new Ki(d.redirectTo,d.navigationBehaviorOptions))}else{this.events.next(c);let u=e.errorHandler(l);o.resolve(!!u)}}catch(d){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(d)}}return Qe}))}))}cancelNavigationTransition(e,i,r){let o=new pt(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),i=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==i?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Kb(n){return n!==Wn}var Yb=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:()=>x(Zb),providedIn:"root"})}}return n})(),sl=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},Zb=(()=>{class n extends sl{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Jt(n)))(r||n)}})()}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Gu=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:()=>x(Jb),providedIn:"root"})}}return n})(),Jb=(()=>{class n extends Gu{constructor(){super(...arguments),this.location=x(ft),this.urlSerializer=x(ir),this.options=x(sr,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=x(ul),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new gt,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Tu(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(i=>{i.type==="popstate"&&e(i.url,i.state)})}handleRouterEvent(e,i){if(e instanceof Gi)this.stateMemento=this.createStateMemento();else if(e instanceof Pt)this.rawUrlTree=i.initialUrl;
5else if(e instanceof Io){if(this.urlUpdateStrategy==="eager"&&!i.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(i.finalUrl,i.initialUrl);this.setBrowserUrl(i.targetBrowserUrl??r,i)}}else e instanceof Zn?(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(i.targetBrowserUrl??this.rawUrlTree,i)):e instanceof pt&&(e.code===Le.GuardRejected||e.code===Le.NoDataFromResolver)?this.restoreHistory(i):e instanceof Yn?this.restoreHistory(i,!0):e instanceof bt&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,i){let r=e instanceof gt?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){let o=this.browserPageId,s=_(_({},i.extras.state),this.generateNgRouterState(i.id,o));this.location.replaceState(r,"",s)}else{let o=_(_({},i.extras.state),this.generateNgRouterState(i.id,this.browserPageId+1));this.location.go(r,"",o)}}restoreHistory(e,i=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.currentUrlTree===e.finalUrl&&o===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Jt(n)))(r||n)}})()}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),$n=function(n){return n[n.COMPLETE=0]="COMPLETE",n[n.FAILED=1]="FAILED",n[n.REDIRECTING=2]="REDIRECTING",n}($n||{});function Ku(n,t){n.events.pipe(he(e=>e instanceof bt||e instanceof pt||e instanceof Yn||e instanceof Pt),$(e=>e instanceof bt||e instanceof Pt?$n.COMPLETE:(e instanceof pt?e.code===Le.Redirect||e.code===Le.SupersededByNewNavigation:!1)?$n.REDIRECTING:$n.FAILED),he(e=>e!==$n.REDIRECTING),Me(1)).subscribe(()=>{t()})}function Xb(n){throw n}var Qb={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},ev={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},me=(()=>{class n{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=x(eo),this.stateManager=x(Gu),this.options=x(sr,{optional:!0})||{},this.pendingTasks=x(An),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=x(hl),this.urlSerializer=x(ir),this.location=x(ft),this.urlHandlingStrategy=x(ul),this._events=new z,this.errorHandler=this.options.errorHandler||Xb,this.navigated=!1,this.routeReuseStrategy=x(Yb),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=x(Po,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!x(No,{optional:!0}),this.eventsSubscription=new Gt,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(i=>{try{let r=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(i,o),i instanceof pt&&i.code!==Le.Redirect&&i.code!==Le.SupersededByNewNavigation)this.navigated=!0;else if(i instanceof bt)this.navigated=!0;else if(i instanceof Ki){let s=i.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(i.url,r.currentRawUrl),l=_({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Kb(r.source)},s);this.scheduleNavigation(a,Wn,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}iv(i)&&this._events.next(i)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Wn,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,i)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",i)},0)})}navigateToSyncWithBrowser(e,i,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=_({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(cl),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(e,i={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=_(_({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let u;
5try{let m=r?r.snapshot:this.routerState.snapshot.root;u=Ru(m)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),u=this.currentUrlTree.root}return ku(u,e,d,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){let r=Gn(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Wn,null,i)}navigate(e,i={skipLocationChange:!1}){return tv(e),this.navigateByUrl(this.createUrlTree(e,i),i)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,i){let r;if(i===!0?r=_({},Qb):i===!1?r=_({},ev):r=i,Gn(e))return lu(this.currentUrlTree,e,r);let o=this.parseUrl(e);return lu(this.currentUrlTree,o,r)}removeEmptyProps(e){return Object.entries(e).reduce((i,[r,o])=>(o!=null&&(i[r]=o),i),{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((u,m)=>{a=u,l=m});let d=this.pendingTasks.add();return Ku(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(u=>Promise.reject(u))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function tv(n){for(let t=0;t<n.length;t++)if(n[t]==null)throw new q(4008,!1)}function iv(n){return!(n instanceof Zn)&&!(n instanceof Ki)}var Fo=class{};var nv=(()=>{class n{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(he(e=>e instanceof bt),St(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){let r=[];for(let o of i){o.providers&&!o._injector&&(o._injector=aa(o.providers,e,`Route: ${o.path}`));let s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return _e(r).pipe(Zs())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;i.loadChildren&&i.canLoad===void 0?r=this.loader.loadChildren(e,i):r=D(null);let o=r.pipe(Te(s=>s===null?D(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));if(i.loadComponent&&!i._loadedComponent){let s=this.loader.loadComponent(i);return _e([o,s]).pipe(Zs())}else return o})}static{this.\u0275fac=function(i){return new(i||n)(v(me),v(ro),v(dt),v(Fo),v(dl))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Yu=new O(""),rv=(()=>{class n{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration||="disabled",s.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Gi?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof bt?(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment)):e instanceof Pt&&e.code===So.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof Ao&&(e.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(e.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Ao(e,this.lastSource==="popstate"?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static{this.\u0275fac=function(i){Fi()}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})();function ov(n){return n.routerState.root}function ar(n,t){return{\u0275kind:n,\u0275providers:t}}function sv(){let n=x(fe);return t=>{let e=n.get(Li);if(t!==e.components[0])return;let i=n.get(me),r=n.get(Zu);n.get(fl)===1&&i.initialNavigation(),n.get(Ju,null,na.Optional)?.setUpPreloading(),n.get(Yu,null,na.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Zu=new O("",{factory:()=>new z}),fl=new O("",{providedIn:"root",factory:()=>1});function av(){return ar(2,[{provide:fl,useValue:0},{provide:da,multi:!0,deps:[fe],useFactory:t=>{let e=t.get(Dd,Promise.resolve());return()=>e.then(()=>new Promise(i=>{let r=t.get(me),o=t.get(Zu);Ku(r,()=>{i(!0)}),t.get(hl).afterPreactivation=()=>(i(!0),o.closed?D(void 0):o),r.initialNavigation()}))}}])}function lv(){return ar(3,[{provide:da,multi:!0,useFactory:()=>{let t=x(me);return()=>{t.setUpLocationChangeListener()}}},{provide:fl,useValue:2}])}var Ju=new O("");function cv(n){return ar(0,[{provide:Ju,useExisting:nv},{provide:Fo,useExisting:n}])}function dv(){return ar(8,[hu,{provide:No,useExisting:hu}])}function uv(n){let t=[{provide:Wu,useValue:Wb},{provide:qu,useValue:_({skipNextTransition:!!n?.skipInitialTransition},n)}];return ar(9,t)}var gu=new O("ROUTER_FORROOT_GUARD"),hv=[ft,{provide:ir,useClass:qi},me,rr,{provide:Yi,useFactory:ov,deps:[me]},dl,[]],ml=(()=>{class n{constructor(e){}static forRoot(e,i){return{ngModule:n,providers:[hv,[],{provide:Po,multi:!0,useValue:e},{provide:gu,useFactory:gv,deps:[[me,new ra,new nd]]},{provide:sr,useValue:i||{}},i?.useHash?mv():pv(),fv(),i?.preloadingStrategy?cv(i.preloadingStrategy).\u0275providers:[],i?.initialNavigation?bv(i):[],i?.bindToComponentInputs?dv().\u0275providers:[],i?.enableViewTransitions?uv(
5).\u0275providers:[],vv()]}}static forChild(e){return{ngModule:n,providers:[{provide:Po,multi:!0,useValue:e}]}}static{this.\u0275fac=function(i){return new(i||n)(v(gu,8))}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})();function fv(){return{provide:Yu,useFactory:()=>{let n=x(jd),t=x(P),e=x(sr),i=x(hl),r=x(ir);return e.scrollOffset&&n.setOffset(e.scrollOffset),new rv(r,i,n,t,e)}}}function mv(){return{provide:ha,useClass:Md}}function pv(){return{provide:ha,useClass:Td}}function gv(n){return"guarded"}function bv(n){return[n.initialNavigation==="disabled"?lv().\u0275providers:[],n.initialNavigation==="enabledBlocking"?av().\u0275providers:[]]}var bu=new O("");function vv(){return[{provide:bu,useFactory:sv},{provide:ua,multi:!0,useExisting:bu}]}re();var Eh=n=>n?(...t)=>n(...t):(...t)=>fetch(...t);var lr=class extends Error{constructor(t,e="FunctionsError",i){super(t),this.name=e,this.context=i}},Bo=class extends lr{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}},cr=class extends lr{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}},dr=class extends lr{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}},vl=function(n){return n.Any="any",n.ApNortheast1="ap-northeast-1",n.ApNortheast2="ap-northeast-2",n.ApSouth1="ap-south-1",n.ApSoutheast1="ap-southeast-1",n.ApSoutheast2="ap-southeast-2",n.CaCentral1="ca-central-1",n.EuCentral1="eu-central-1",n.EuWest1="eu-west-1",n.EuWest2="eu-west-2",n.EuWest3="eu-west-3",n.SaEast1="sa-east-1",n.UsEast1="us-east-1",n.UsWest1="us-west-1",n.UsWest2="us-west-2",n}(vl||{});var ur=class{constructor(t,{headers:e={},customFetch:i,region:r=vl.Any}={}){this.url=t,this.headers=e,this.region=r,this.fetch=Eh(i)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return C(this,arguments,void 0,function*(e,i={}){var r;let o,s;try{let{headers:a,method:l,body:c,signal:d,timeout:u}=i,m={},{region:f}=i;f||(f=this.region);let g=new URL(`${this.url}/${e}`);f&&f!=="any"&&(m["x-region"]=f,g.searchParams.set("forceFunctionRegion",f));let p;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",p=c):typeof c=="string"?(m["Content-Type"]="text/plain",p=c):typeof FormData<"u"&&c instanceof FormData?p=c:(m["Content-Type"]="application/json",p=JSON.stringify(c)):p=c;let b=d;u&&(s=new AbortController,o=setTimeout(()=>s.abort(),u),d?(b=s.signal,d.addEventListener("abort",()=>s.abort())):b=s.signal);let y=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),a),body:p,signal:b}).catch(B=>{throw new Bo(B)}),M=y.headers.get("x-relay-error");if(M&&M==="true")throw new cr(y);if(!y.ok)throw new dr(y);let E=((r=y.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),I;return E==="application/json"?I=yield y.json():E==="application/octet-stream"||E==="application/pdf"?I=yield y.blob():E==="text/event-stream"?I=y:E==="multipart/form-data"?I=yield y.formData():I=yield y.text(),{data:I,error:null,response:y}}catch(a){return{data:null,error:a,response:a instanceof dr||a instanceof cr?a.context:void 0}}finally{o&&clearTimeout(o)}})}};var Fl=Cp(Th(),1),{PostgrestClient:Mh,PostgrestQueryBuilder:Qw,PostgrestFilterBuilder:ex,PostgrestTransformBuilder:tx,PostgrestBuilder:ix,PostgrestError:Tv}=Fl.default||Fl;var Nl=class{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){let e=process.versions;if(e&&e.node){let i=e.node,r=parseInt(i.replace(/^v/,"").split(".")[0]);return r>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${r} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${r} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 6import ws from "ws" 7new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let t=this.detectEnvironment();if(t.constructor)return t.constructor;let e=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(e+=` 8 9Suggested solution: ${t.workaround}`),new Error(e)}static createWebSocket(t,e){let i=this.getWebSocketConstructor();return new i(t,e)}static isWebSocketSupported(){try{let t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}},jl=Nl;var Ph="2.86.0";var Fh=`realtime-js/${Ph}`,Ll="1.0.0",Nh="2.0.0",Vl=Ll;
9var fr=1e4,jh=1e3,Lh=100,ai=function(n){return n[n.connecting=0]="connecting",n[n.open=1]="open",n[n.closing=2]="closing",n[n.closed=3]="closed",n}(ai||{}),pe=function(n){return n.closed="closed",n.errored="errored",n.joined="joined",n.joining="joining",n.leaving="leaving",n}(pe||{}),ze=function(n){return n.close="phx_close",n.error="phx_error",n.join="phx_join",n.reply="phx_reply",n.leave="phx_leave",n.access_token="access_token",n}(ze||{}),Ul=function(n){return n.websocket="websocket",n}(Ul||{}),li=function(n){return n.Connecting="connecting",n.Open="open",n.Closing="closing",n.Closed="closed",n}(li||{});var $o=class{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,e){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return e(this._binaryEncodeUserBroadcastPush(t));let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(t){var e;return this._isArrayBuffer((e=t.payload)===null||e===void 0?void 0:e.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var e,i;let r=(i=(e=t.payload)===null||e===void 0?void 0:e.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,r)}_encodeJsonUserBroadcastPush(t){var e,i;let r=(i=(e=t.payload)===null||e===void 0?void 0:e.payload)!==null&&i!==void 0?i:{},s=new TextEncoder().encode(JSON.stringify(r)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(t,e,i){var r,o;let s=t.topic,a=(r=t.ref)!==null&&r!==void 0?r:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",c=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},u=Object.keys(d).length===0?"":JSON.stringify(d);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`metadata length ${u.length} exceeds maximum of 255`);let m=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+s.length+c.length+u.length,f=new ArrayBuffer(this.HEADER_LENGTH+m),g=new DataView(f),p=0;g.setUint8(p++,this.KINDS.userBroadcastPush),g.setUint8(p++,l.length),g.setUint8(p++,a.length),g.setUint8(p++,s.length),g.setUint8(p++,c.length),g.setUint8(p++,u.length),g.setUint8(p++,e),Array.from(l,y=>g.setUint8(p++,y.charCodeAt(0))),Array.from(a,y=>g.setUint8(p++,y.charCodeAt(0))),Array.from(s,y=>g.setUint8(p++,y.charCodeAt(0))),Array.from(c,y=>g.setUint8(p++,y.charCodeAt(0))),Array.from(u,y=>g.setUint8(p++,y.charCodeAt(0)));var b=new Uint8Array(f.byteLength+i.byteLength);return b.set(new Uint8Array(f),0),b.set(new Uint8Array(i),f.byteLength),b.buffer}decode(t,e){if(this._isArrayBuffer(t)){let i=this._binaryDecode(t);return e(i)}if(typeof t=="string"){let i=JSON.parse(t),[r,o,s,a,l]=i;return e({join_ref:r,ref:o,topic:s,event:a,payload:l})}return e({})}_binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),r=new TextDecoder;switch(i){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,e,r)}}_decodeUserBroadcast(t,e,i){let r=e.getUint8(1),o=e.getUint8(2),s=e.getUint8(3),a=e.getUint8(4),l=this.HEADER_LENGTH+4,c=i.decode(t.slice(l,l+r));l=l+r;let d=i.decode(t.slice(l,l+o));l=l+o;let u=i.decode(t.slice(l,l+s));l=l+s;let m=t.slice(l,t.byteLength),f=a===this.JSON_ENCODING?JSON.parse(i.decode(m)):m,g={type:this.BROADCAST_EVENT,event:d,payload:f};return s>0&&(g.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var e;return t instanceof ArrayBuffer||((e=t?.constructor)===null||e===void 0?void 0:e.name)==="ArrayBuffer"}_pick(t,e){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([i])=>e.includes(i)))}};var tn=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=e}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}};var ee=function(n){return n.abstime="abstime",n.bool="bool",n.date="date",n.daterange="daterange",n.float4="float4",n.float8="float8",n.int2="int2",n.int4="int4",n.int4range="int4range",n.int8="int8",n.int8range="int8range",n.json="json",n.jsonb="jsonb",n.money="money",n.numeric="numeric",n.oid="oid",n.reltime="reltime",n.text="text",n.time="time",n.timestamp="timestamp",n.timestamptz="timestamptz",n.timetz="timetz",n.tsrange="tsrange",n.tstzrange="tstzrange",n}(ee||{}),zl=(n,t,e={})=>{var i;let r=(i=e.skipTypes)!==null&&i!==void 0?i:[];return t?Object.keys(t).reduce((o,s)=>(o[s]=Mv(s,n,t,r),o),{}):{}},Mv=(n,t,e,i)=>{let r=t.find(a=>a.name===n),o=r?.type,s=e[n];return o&&!i.includes(o)?Vh(o,s):Bl(s)},Vh=(n,t)=>{if(n.charAt(0)==="_"){let e=n.slice(1,n.length);return jv(t,e)}switch(n){case ee.bool:return Pv(t);case ee.float4:case ee.float8:case ee.int2:case ee.int4:case ee.int8:case ee.numeric:case ee.oid:return Fv(t);case ee.json:case ee.jsonb:return Nv(t);case ee.timestamp:return Lv(t);case ee.abstime:case ee.date:case ee.daterange:case ee.int4range:case ee.int8range:case ee.money:case ee.reltime:case ee.text:case ee.time:case ee.timestamptz:case ee.timetz:case ee.tsrange:case ee.tstzrange:return Bl(t);default:return Bl(t)}},Bl=n=>n,Pv=n=>{switch(n){case"t":return!0;case"f":return!1;default:return n}},Fv=n=>{if(typeof n=="string"){let t=parseFloat(n);if(!Number.isNaN(t))return t}return n},Nv=n=>{if(typeof n=="string")try{return JSON.parse(n)}catch(t){return console.log(`JSON parse error: ${t}`),n}return n},jv=(n,t)=>
vendor: 4,891 bytes, line 9
9{if(typeof n!="string")return n;let e=n.length-1,i=n[e];if(n[0]==="{"&&i==="}"){let o,s=n.slice(1,e);try{o=JSON.parse("["+s+"]")}catch{o=s?s.split(","):[]}return o.map(a=>Vh(t,a))}return n},Lv=n=>typeof n=="string"?n.replace(" ","T"):n,Ho=n=>{let t=new URL(n);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var nn=class{constructor(t,e,i={},r=fr){this.channel=t,this.event=e,this.payload=i,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,e){var i;return this._hasReceived(t)&&e((i=this.receivedResp)===null||i===void 0?void 0:i.response),this.recHooks.push({status:t,callback:e}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);let t=e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,e){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:e})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:e}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(e))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}};var mr=class n{constructor(t,e){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let i=e?.events||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},r=>{let{onJoin:o,onLeave:s,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=n.syncState(this.state,r,o,s),this.pendingDiffs.forEach(l=>{this.state=n.syncDiff(this.state,l,o,s)}),this.pendingDiffs=[],a()}),this.channel._on(i.diff,{},r=>{let{onJoin:o,onLeave:s,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(r):(this.state=n.syncDiff(this.state,r,o,s),a())}),this.onJoin((r,o,s)=>{this.channel._trigger("presence",{event:"join",key:r,currentPresences:o,newPresences:s})}),this.onLeave((r,o,s)=>{this.channel._trigger("presence",{event:"leave",key:r,currentPresences:o,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,e,i,r){let o=this.cloneDeep(t),s=this.transformState(e),a={},l={};return this.map(o,(c,d)=>{s[c]||(l[c]=d)}),this.map(s,(c,d)=>{let u=o[c];if(u){let m=d.map(b=>b.presence_ref),f=u.map(b=>b.presence_ref),g=d.filter(b=>f.indexOf(b.presence_ref)<0),p=u.filter(b=>m.indexOf(b.presence_ref)<0);g.length>0&&(a[c]=g),p.length>0&&(l[c]=p)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},i,r)}static syncDiff(t,e,i,r){let{joins:o,leaves:s}={joins:this.transformState(e.joins),leaves:this.transformState(e.leaves)};return i||(i=()=>{}),r||(r=()=>{}),this.map(o,(a,l)=>{var c;let d=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),d.length>0){let u=t[a].map(f=>f.presence_ref),m=d.filter(f=>u.indexOf(f.presence_ref)<0);t[a].unshift(...m)}i(a,d,l)}),this.map(s,(a,l)=>{let c=t[a];if(!c)return;let d=l.map(u=>u.presence_ref);c=c.filter(u=>d.indexOf(u.presence_ref)<0),t[a]=c,r(a,c,l),c.length===0&&delete t[a]}),t}static map(t,e){return Object.getOwnPropertyNames(t).map(i=>e(i,t[i]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((e,i)=>{let r=t[i];return"metas"in r?e[i]=r.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):e[i]=r,e},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}};var pr=function(n){return n.BROADCAST="broadcast",n.PRESENCE="presence",n.POSTGRES_CHANGES="postgres_changes",n.SYSTEM="system",n}(pr||{}),_t=function(n){return n.SUBSCRIBED="SUBSCRIBED",n.TIMED_OUT="TIMED_OUT",n.CLOSED="CLOSED",n.CHANNEL_ERROR="CHANNEL_ERROR",n}(_t||{});var gr=class n{constructor(t,e={config:{}},i){var r,o;
9if(this.topic=t,this.params=e,this.socket=i,this.bindings={},this.state=pe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config),this.timeout=this.socket.timeout,this.joinPush=new nn(this,ze.join,this.params,this.timeout),this.rejoinTimer=new tn(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=pe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=pe.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=pe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=pe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=pe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(ze.reply,{},(s,a)=>{this._trigger(this._replyEventName(a),s)}),this.presence=new mr(this),this.broadcastEndpointURL=Ho(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(r=this.params.config)===null||r===void 0?void 0:r.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,e=this.timeout){var i,r,o;if(this.socket.isConnected()||this.socket.connect(),this.state==pe.closed){let{config:{broadcast:s,presence:a,private:l}}=this.params,c=(r=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(f=>f.filter))!==null&&r!==void 0?r:[],d=!!this.bindings[pr.PRESENCE]&&this.bindings[pr.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,u={},m={broadcast:s,presence:Object.assign(Object.assign({},a),{enabled:d}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(u.access_token=this.socket.accessTokenValue),this._onError(f=>t?.(_t.CHANNEL_ERROR,f)),this._onClose(()=>t?.(_t.CLOSED)),this.updateJoinPayload(Object.assign({config:m},u)),this.joinedOnce=!0,this._rejoin(e),this.joinPush.receive("ok",g=>h(this,[g],function*({postgres_changes:f}){var p;if(this.socket.setAuth(),f===void 0){t?.(_t.SUBSCRIBED);return}else{let b=this.bindings.postgres_changes,y=(p=b?.length)!==null&&p!==void 0?p:0,M=[];for(let E=0;E<y;E++){let I=b[E],{filter:{event:B,schema:we,table:K,filter:ue}}=I,Ct=f&&f[E];if(Ct&&Ct.event===B&&Ct.schema===we&&Ct.table===K&&Ct.filter===ue)M.push(Object.assign(Object.assign({},I),{id:Ct.id}));else{this.unsubscribe(),this.state=pe.errored,t?.(_t.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=M,t&&t(_t.SUBSCRIBED);return}})).receive("error",f=>{this.state=pe.errored,t?.(_t.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t?.(_t.TIMED_OUT)})}return this}presenceState(){return this.presence.state}track(i){return h(this,arguments,function*(t,e={}){return yield this.send({type:"presence",event:"track",payload:t},e.timeout||this.timeout)})}untrack(){return h(this,arguments,function*(t={}){return yield this.send({type:"presence",event:"untrack"},t)})}on(t,e,i){return this.state===pe.joined&&t===pr.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(t,e,i)}httpSend(r,o){return h(this,arguments,function*(t,e,i={}){var s;let a=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(e==null)return Promise.reject("Payload is required for httpSend()");let l={method:"POST",headers:{Authorization:a,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:e,private:this.private}]})},c=yield this._fetchWithTimeout(this.broadcastEndpointURL,l,(s=i.timeout)!==null&&s!==void 0?s:this.timeout);if(c.status===202)return{success:!0};let d=c.statusText;
9try{let u=yield c.json();d=u.error||u.message||d}catch{}return Promise.reject(new Error(d))})}send(i){return h(this,arguments,function*(t,e={}){var r,o;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");let{event:s,payload:a}=t,c={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{let d=yield this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=e.timeout)!==null&&r!==void 0?r:this.timeout);return yield(o=d.body)===null||o===void 0?void 0:o.cancel(),d.ok?"ok":"error"}catch(d){return d.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var a,l,c;let d=this._push(t.type,t,e.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(a=this.params)===null||a===void 0?void 0:a.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&s("ok"),d.receive("ok",()=>s("ok")),d.receive("error",()=>s("error")),d.receive("timeout",()=>s("timed out"))})})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=pe.leaving;let e=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(ze.close,"leave",this._joinRef())};this.joinPush.destroy();let i=null;return new Promise(r=>{i=new nn(this,ze.leave,{},t),i.receive("ok",()=>{e(),r("ok")}).receive("timeout",()=>{e(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})}).finally(()=>{i?.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=pe.closed,this.bindings={}}_fetchWithTimeout(t,e,i){return h(this,null,function*(){let r=new AbortController,o=setTimeout(()=>r.abort(),i),s=yield this.socket.fetch(t,Object.assign(Object.assign({},e),{signal:r.signal}));return clearTimeout(o),s})}_push(t,e,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new nn(this,t,e,i);return this._canPush()?r.send():this._addToPushBuffer(r),r}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>Lh){let e=this.pushBuffer.shift();e&&(e.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${e.event}`,e.payload))}}_onMessage(t,e,i){return e}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,e,i){var r,o;let s=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=ze;if(i&&[a,l,c,d].indexOf(s)>=0&&i!==this._joinRef())return;let m=this._onMessage(s,e,i);if(e&&!m)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(r=this.bindings.postgres_changes)===null||r===void 0||r.filter(f=>{var g,p,b;return((g=f.filter)===null||g===void 0?void 0:g.event)==="*"||((b=(p=f.filter)===null||p===void 0?void 0:p.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===s}).map(f=>f.callback(m,i)):(o=this.bindings[s])===null||o===void 0||o.filter(f=>{var g,p,b,y,M,E;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in f){let I=f.id,B=(g=f.filter)===null||g===void 0?void 0:g.event;return I&&((p=e.ids)===null||p===void 0?void 0:p.includes(I))&&(B==="*"||B?.toLocaleLowerCase()===((b=e.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{let I=(M=(y=f?.filter)===null||y===void 0?void 0:y.event)===null||M===void 0?void 0:M.toLocaleLowerCase();return I==="*"||I===((E=e?.event)===null||E===void 0?void 0:E.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===s}).map(f=>{if(typeof m=="object"&&"ids"in m){let g=m.data,{schema:p,table:b,commit_timestamp:y,type:M,errors:E}=g;m=Object.assign(Object.assign({},{schema:p,table:b,commit_timestamp:y,eventType:M,new:{},old:{},errors:E}),this._getPayloadRecords(g))}f.callback(m,i)})}_isClosed(){return this.state===pe.closed}_isJoined(){return this.state===pe.joined}_isJoining(){return this.state===pe.joining}_isLeaving(){return this.state===pe.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,e,i){let r=t.toLocaleLowerCase(),o={type:r,filter:e,callback:i};return this.bindings[r]?this.bindings[r].push(o):this.bindings[r]=[o],this}_off(t,e){let i=t.toLocaleLowerCase();return this.bindings[i]&&(this.bindings[i]=this.bindings[i].filter(r=>{var o;return!(((o=r.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===i&&n.isEqual(r.filter,e))})),this}static isEqual(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(let i in t)if(t[i]!==e[i])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(ze.close,{},t)}_onError(t){this._on(ze.error,{},e=>t(e))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=pe.joining,this.joinPush.resend(t))}_getPayloadRecords(t){let e={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(e.new=zl(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(e.old=zl(t.columns,t.old_record)),e}};var $l=()=>{},Wo={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Uv=[1e3,2e3,5e3,1e4],Bv=1e4,zv=` 10 addEventListener("message", (e) => { 11 if (e.data.event === "start") { 12 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 13 } 14 });`,br=class{constructor(t,e){var i;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=fr,this.transport=null,this.heartbeatIntervalMs=Wo.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=$l,this.ref=0,this.reconnectTimer=null,this.vsn=Vl,this.logger=$l,this.conn=null,this.sendBuffer=[],this.serializer
14=new $o,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=r=>r?(...o)=>r(...o):(...o)=>fetch(...o),!(!((i=e?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=e.params.apikey,this.endPoint=`${t}/${Ul.websocket}`,this.httpEndpoint=Ho(t),this._initializeOptions(e),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(e?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=jl.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");let e=t.message;throw e.includes("Node.js")?new Error(`${e} 15 16To use Realtime in Node.js, you need to provide a WebSocket implementation: 17 18Option 1: Use Node.js 22+ which has native WebSocket support 19Option 2: Install and provide the "ws" package: 20 21 npm install ws 22 23 import ws from "ws" 24 const client = new RealtimeClient(url, { 25 ...options, 26 transport: ws 27 })`):new Error(`WebSocket not available: ${e}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,e){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){let i=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(i),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,e??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}removeChannel(t){return h(this,null,function*(){let e=yield t.unsubscribe();return this.channels.length===0&&this.disconnect(),e})}removeAllChannels(){return h(this,null,function*(){let t=yield Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),t})}log(t,e,i){this.logger(t,e,i)}connectionState(){switch(this.conn&&this.conn.readyState){case ai.connecting:return li.Connecting;case ai.open:return li.Open;case ai.closing:return li.Closing;default:return li.Closed}}isConnected(){return this.connectionState()===li.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,e={config:{}}){let i=`realtime:${t}`,r=this.getChannels().find(o=>o.topic===i);if(r)return r;{let o=new gr(`realtime:${t}`,e,this);return this.channels.push(o),o}}push(t){let{topic:e,event:i,payload:r,ref:o}=t,s=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${e} ${i} (${o})`,r),this.isConnected()?s():this.sendBuffer.push(s)}setAuth(t=null){return h(this,null,function*(){this._authPromise=this._performAuth(t);try{yield this._authPromise}finally{this._authPromise=null}})}sendHeartbeat(){return h(this,null,function*(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(jh,"heartbeat timeout"),setTimeout(()=>{var e;this.isConnected()||(e=this.reconnectTimer)===null||e===void 0||e.scheduleTimeout()},Wo.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this._setAuthSafely("heartbeat")})}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let e=this.channels.find(i=>i.topic===t&&(i._isJoined()||i._isJoining()));e&&(this.log("transport",`leaving duplicate topic "${t}"`),e.unsubscribe())}_remove(t){this.channels=this.channels.filter(e=>e.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,e=>{if(e.topic==="phoenix"&&e.event==="phx_reply")try{this.heartbeatCallback(e.payload.status==="ok"?"ok":"error")}catch(c){this.log("error","error in heartbeat callback",c)}e.ref&&e.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);let{topic:i,event:r,payload:o,ref:s}=e,a=s?`(${s})`:"",l=o.status||"";this.log("receive",`${l} ${i} ${r} ${a}`.trim(),o),this.channels.filter(c=>
27c._isMember(i)).forEach(c=>c._trigger(r,o,s)),this._triggerStateCallbacks("message",e)})}_clearTimer(t){var e;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((e=this.reconnectTimer)===null||e===void 0||e.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){if(this.conn){if(this.conn.readyState===ai.open||this.conn.readyState===ai.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(e=>{this.log("error","error waiting for auth on connect",e),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");let t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{e.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var e;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(e=this.reconnectTimer)===null||e===void 0||e.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(ze.error))}_appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?",r=new URLSearchParams(e);return`${t}${i}${r}`}_workerObjectUrl(t){let e;if(t)e=t;else{let i=new Blob([zv],{type:"application/javascript"});e=URL.createObjectURL(i)}return e}_setConnectionState(t,e=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=e)}_performAuth(t=null){return h(this,null,function*(){let e;t?e=t:this.accessToken?e=yield this.accessToken():e=this.accessTokenValue,this.accessTokenValue!=e&&(this.accessTokenValue=e,this.channels.forEach(i=>{let r={access_token:e,version:Fh};e&&i.updateJoinPayload(r),i.joinedOnce&&i._isJoined()&&i._push(ze.access_token,{access_token:e})}))})}_waitForAuthIfNeeded(){return h(this,null,function*(){this._authPromise&&(yield this._authPromise)})}_setAuthSafely(t="general"){this.setAuth().catch(e=>{this.log("error",`error setting auth in ${t}`,e)})}_triggerStateCallbacks(t,e){try{this.stateChangeCallbacks[t].forEach(i=>{try{i(e)}catch(r){this.log("error",`error in ${t} callback`,r)}})}catch(i){this.log("error",`error triggering ${t} callbacks`,i)}}_setupReconnectionTimer(){this.reconnectTimer=new tn(()=>h(this,null,function*(){setTimeout(()=>h(this,null,function*(){yield this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}),Wo.RECONNECT_DELAY)}),this.reconnectAfterMs)}_initializeOptions(t){var e,i,r,o,s,a,l,c,d,u,m,f;switch(this.transport=(e=t?.transport)!==null&&e!==void 0?e:null,this.timeout=(i=t?.timeout)!==null&&i!==void 0?i:fr,this.heartbeatIntervalMs=(r=t?.heartbeatIntervalMs)!==null&&r!==void 0?r:Wo.HEARTBEAT_INTERVAL,this.worker=(o=t?.
27worker)!==null&&o!==void 0?o:!1,this.accessToken=(s=t?.accessToken)!==null&&s!==void 0?s:null,this.heartbeatCallback=(a=t?.heartbeatCallback)!==null&&a!==void 0?a:$l,this.vsn=(l=t?.vsn)!==null&&l!==void 0?l:Vl,t?.params&&(this.params=t.params),t?.logger&&(this.logger=t.logger),(t?.logLevel||t?.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t?.reconnectAfterMs)!==null&&c!==void 0?c:g=>Uv[g-1]||Bv,this.vsn){case Ll:this.encode=(d=t?.encode)!==null&&d!==void 0?d:(g,p)=>p(JSON.stringify(g)),this.decode=(u=t?.decode)!==null&&u!==void 0?u:(g,p)=>p(JSON.parse(g));break;case Nh:this.encode=(m=t?.encode)!==null&&m!==void 0?m:this.serializer.encode.bind(this.serializer),this.decode=(f=t?.decode)!==null&&f!==void 0?f:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t?.workerUrl}}};re();var Nt=class extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}};function Z(n){return typeof n=="object"&&n!==null&&"__isStorageError"in n}var qo=class extends Nt{constructor(t,e,i){super(t),this.name="StorageApiError",this.status=e,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},ci=class extends Nt{constructor(t,e){super(t),this.name="StorageUnknownError",this.originalError=e}};re();var rn=n=>n?(...t)=>n(...t):(...t)=>fetch(...t),Uh=()=>Response,Go=n=>{if(Array.isArray(n))return n.map(e=>Go(e));if(typeof n=="function"||n!==Object(n))return n;let t={};return Object.entries(n).forEach(([e,i])=>{let r=e.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[r]=Go(i)}),t},Bh=n=>{if(typeof n!="object"||n===null)return!1;let t=Object.getPrototypeOf(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)},zh=n=>!n||typeof n!="string"||n.length===0||n.length>100||n.trim()!==n||n.includes("/")||n.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(n);var Hl=n=>{var t;return n.msg||n.message||n.error_description||(typeof n.error=="string"?n.error:(t=n.error)===null||t===void 0?void 0:t.message)||JSON.stringify(n)},$v=(n,t,e)=>C(void 0,void 0,void 0,function*(){let i=yield Uh();n instanceof i&&!e?.noResolveJson?n.json().then(r=>{let o=n.status||500,s=r?.statusCode||o+"";t(new qo(Hl(r),o,s))}).catch(r=>{t(new ci(Hl(r),r))}):t(new ci(Hl(n),n))}),Hv=(n,t,e,i)=>{let r={method:n,headers:t?.headers||{}};return n==="GET"||!i?r:(Bh(i)?(r.headers=Object.assign({"Content-Type":"application/json"},t?.headers),r.body=JSON.stringify(i)):r.body=i,t?.duplex&&(r.duplex=t.duplex),Object.assign(Object.assign({},r),e))};function vr(n,t,e,i,r,o){return C(this,void 0,void 0,function*(){return new Promise((s,a)=>{n(e,Hv(t,i,r,o)).then(l=>{if(!l.ok)throw l;return i?.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>$v(l,a,i))})})}function jt(n,t,e,i){return C(this,void 0,void 0,function*(){return vr(n,"GET",t,e,i)})}function Oe(n,t,e,i,r){return C(this,void 0,void 0,function*(){return vr(n,"POST",t,i,r,e)})}function _r(n,t,e,i,r){return C(this,void 0,void 0,function*(){return vr(n,"PUT",t,i,r,e)})}function $h(n,t,e,i){return C(this,void 0,void 0,function*(){return vr(n,"HEAD",t,Object.assign(Object.assign({},e),{noResolveJson:!0}),i)})}function on(n,t,e,i,r){return C(this,void 0,void 0,function*(){return vr(n,"DELETE",t,i,r,e)})}re();re();var Ko=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}execute(){return C(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Z(t))return{data:null,error:t};throw t}})}};var Hh,Wl=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[Hh]="BlobDownloadBuilder",this.promise=null}asStream(){return new Ko(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return C(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Z(t))return{data:null,error:t};throw t}})}};Hh=Symbol.toStringTag;var Wh=Wl;var Wv={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},qh={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1},Yo=class{constructor(t,e={},i,r){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.bucketId=i,this.fetch=rn(r)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,e,i,r){return C(this,void 0,void 0,function*(){try{let o,s=Object.assign(Object.assign({},qh),r),a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)}),l=s.metadata;typeof Blob<"u"&&i instanceof Blob?(o=new FormData,o.append("cacheControl",s.cacheControl),l&&o.append("metadata",this.encodeMetadata(l)),o.append("",i)):typeof FormData<"u"&&i instanceof FormData?(o=i,o.has("cacheControl")||o.append("cacheControl",s.cacheControl),l&&!o.has("metadata")&&o.append("metadata",this.encodeMetadata(l))):(o=i,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!s.duplex&&(s.duplex="half")),r?.headers&&(a=Object.assign(Object.assign({},a),r.headers));let c=this._removeEmptyFolders(e),d=this._getFinalPath(c),u=yield(t=="PUT"?_r:Oe)(this.fetch,`${this.url}/object/${d}`,o,Object.assign({headers:a},s?.duplex?{duplex:s.duplex}:{}));return{data:{path:c,id:u.Id,fullPath:u.Key},error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Z(o))return{data:null,error:o};throw o}})}upload(t,e,i){return C(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,e,i)})}uploadToSignedUrl(t,e,i,r){return C(this,void 0,void 0,function*(){let o=this._removeEmptyFolders(t),s=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",e);try{let l,c=Object.assign({upsert:qh.upsert},r),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&i instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",i)):typeof FormData<"u"&&i instanceof FormData?(l=i,l.append("cacheControl",c.cacheControl)):(l=i,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType);let u=yield _r(this.fetch,a.toString(),l,{headers:d});return{data:{path:o,fullPath:u.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Z(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,e){return C(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),r=Object.assign({},this.headers);e?.upsert&&(r["x-upsert"]="true");let o=yield Oe(this.fetch,`${this.url}/object/upload/sign/${i}`,{},{headers:r}),s=new URL(this.url+o.url),a=s.searchParams.get("token");if(!a)throw new Nt("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:a},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Z(i))return{data:null,error:i};throw i}})}update(t,e,i){return C(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,e,i)})}move(t,e,i){return C(this,void 0,void 0,function*(){try{return{data:yield Oe(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i?.destinationBucket},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}
27copy(t,e,i){return C(this,void 0,void 0,function*(){try{return{data:{path:(yield Oe(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:e,destinationBucket:i?.destinationBucket},{headers:this.headers})).Key},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}createSignedUrl(t,e,i){return C(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t),o=yield Oe(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:e},i?.transform?{transform:i.transform}:{}),{headers:this.headers}),s=i?.download?`&download=${i.download===!0?"":i.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${s}`)},{data:o,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}createSignedUrls(t,e,i){return C(this,void 0,void 0,function*(){try{let r=yield Oe(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:e,paths:t},{headers:this.headers}),o=i?.download?`&download=${i.download===!0?"":i.download}`:"";return{data:r.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${o}`):null})),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}download(t,e){let r=typeof e?.transform<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString(e?.transform||{}),s=o?`?${o}`:"",a=this._getFinalPath(t),l=()=>jt(this.fetch,`${this.url}/${r}/${a}${s}`,{headers:this.headers,noResolveJson:!0});return new Wh(l,this.shouldThrowOnError)}info(t){return C(this,void 0,void 0,function*(){let e=this._getFinalPath(t);try{let i=yield jt(this.fetch,`${this.url}/object/info/${e}`,{headers:this.headers});return{data:Go(i),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Z(i))return{data:null,error:i};throw i}})}exists(t){return C(this,void 0,void 0,function*(){let e=this._getFinalPath(t);try{return yield $h(this.fetch,`${this.url}/object/${e}`,{headers:this.headers}),{data:!0,error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Z(i)&&i instanceof ci){let r=i.originalError;if([400,404].includes(r?.status))return{data:!1,error:i}}throw i}})}getPublicUrl(t,e){let i=this._getFinalPath(t),r=[],o=e?.download?`download=${e.download===!0?"":e.download}`:"";o!==""&&r.push(o);let a=typeof e?.transform<"u"?"render/image":"object",l=this.transformOptsToQueryString(e?.transform||{});l!==""&&r.push(l);let c=r.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${i}${c}`)}}}remove(t){return C(this,void 0,void 0,function*(){try{return{data:yield on(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}list(t,e,i){return C(this,void 0,void 0,function*(){try{let r=Object.assign(Object.assign(Object.assign({},Wv),e),{prefix:t||""});return{data:yield Oe(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},i),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}listV2(t,e){return C(this,void 0,void 0,function*(){try{let i=Object.assign({},t);return{data:yield Oe(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,i,{headers:this.headers},e),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Z(i))return{data:null,error:i};throw i}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){let e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}};re();var Zo="2.86.0";var Jo={"X-Client-Info":`storage-js/${Zo}`};var Xo=class{constructor(t,e={},i,r){this.shouldThrowOnError=!1;let o=new URL(t);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase.")),this.url=o.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Jo),e),this.fetch=rn(i)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return C(this,void 0,void 0,function*(){try{let e=this.listBucketOptionsToQueryString(t);return{data:yield jt(this.fetch,`${this.url}/bucket${e}`,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}getBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield jt(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}createBucket(t){return C(this,arguments,void 0,function*(e,i={public:!1}){try{return{data:yield Oe(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:i.type,public:i.public,file_size_limit:i.fileSizeLimit,allowed_mime_types:i.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Z(r))return{data:null,error:r};throw r}})}updateBucket(t,e){return C(this,void 0,void 0,function*(){try{return{data:yield _r(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Z(i))return{data:null,error:i};throw i}})}emptyBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield Oe(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}deleteBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield on(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}listBucketOptionsToQueryString(t){let e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}};re();
27var yr=class extends Error{constructor(n,t){super(n),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&t.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function qv(n,t,e){let i=new URL(t,n);if(e)for(let[r,o]of Object.entries(e))o!==void 0&&i.searchParams.set(r,o);return i.toString()}function Gv(n){return h(this,null,function*(){return!n||n.type==="none"?{}:n.type==="bearer"?{Authorization:`Bearer ${n.token}`}:n.type==="header"?{[n.name]:n.value}:n.type==="custom"?yield n.getHeaders():{}})}function Kv(n){let t=n.fetchImpl??globalThis.fetch;return{request(l){return h(this,arguments,function*({method:i,path:r,query:o,body:s,headers:a}){let c=qv(n.baseUrl,r,o),d=yield Gv(n.auth),u=yield t(c,{method:i,headers:_(_(_({},s?{"Content-Type":"application/json"}:{}),d),a),body:s?JSON.stringify(s):void 0}),m=yield u.text(),f=(u.headers.get("content-type")||"").includes("application/json"),g=f&&m?JSON.parse(m):m;if(!u.ok){let p=f?g:void 0,b=p?.error;throw new yr(b?.message??`Request failed with status ${u.status}`,{status:u.status,icebergType:b?.type,icebergCode:b?.code,details:p})}return{status:u.status,headers:u.headers,data:g}})}}}function Qo(n){return n.join("�")}var Yv=class{constructor(n,t=""){this.client=n,this.prefix=t}listNamespaces(n){return h(this,null,function*(){let t=n?{parent:Qo(n.namespace)}:void 0;return(yield this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(i=>({namespace:i}))})}createNamespace(n,t){return h(this,null,function*(){let e={namespace:n.namespace,properties:t?.properties};return(yield this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:e})).data})}dropNamespace(n){return h(this,null,function*(){yield this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Qo(n.namespace)}`})})}loadNamespaceMetadata(n){return h(this,null,function*(){return{properties:(yield this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Qo(n.namespace)}`})).data.properties}})}namespaceExists(n){return h(this,null,function*(){try{return yield this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Qo(n.namespace)}`}),!0}catch(t){if(t instanceof yr&&t.status===404)return!1;throw t}})}createNamespaceIfNotExists(n,t){return h(this,null,function*(){try{return yield this.createNamespace(n,t)}catch(e){if(e instanceof yr&&e.status===409)return;throw e}})}};function sn(n){return n.join("�")}var Zv=class{constructor(n,t="",e){this.client=n,this.prefix=t,this.accessDelegation=e}listTables(n){return h(this,null,function*(){return(yield this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables`})).data.identifiers})}createTable(n,t){return h(this,null,function*(){let e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(yield this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables`,body:t,headers:e})).data.metadata})}updateTable(n,t){return h(this,null,function*(){let e=yield this.client.request({method:"POST",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables/${n.name}`,body:t});return{"metadata-location":e.data["metadata-location"],metadata:e.data.metadata}})}dropTable(n,t){return h(this,null,function*(){yield this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables/${n.name}`,query:{purgeRequested:String(t?.purge??!1)}})})}loadTable(n){return h(this,null,function*(){let t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(yield this.client.request({method:"GET",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables/${n.name}`,headers:t})).data.metadata})}tableExists(n){return h(this,null,function*(){let t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return yield this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${sn(n.namespace)}/tables/${n.name}`,headers:t}),!0}catch(e){if(e instanceof yr&&e.status===404)return!1;throw e}})}createTableIfNotExists(n,t){return h(this,null,function*(){try{return yield this.createTable(n,t)}catch(e){if(e instanceof yr&&e.status===409)return yield this.loadTable({namespace:n.namespace,name:t.name});throw e}})}},Gh=class{constructor(n){let t="v1";n.catalogName&&(t+=`/${n.catalogName}`);let e=n.baseUrl.endsWith("/")?n.baseUrl:`${n.baseUrl}/`;this.client=Kv({baseUrl:e,auth:n.auth,fetchImpl:n.fetch}),this.accessDelegation=n.accessDelegation?.join(","),this.namespaceOps=new Yv(this.client,t),this.tableOps=new Zv(this.client,t,this.accessDelegation)}listNamespaces(n){return h(this,null,function*(){return this.namespaceOps.listNamespaces(n)})}createNamespace(n,t){return h(this,null,function*(){return this.namespaceOps.createNamespace(n,t)})}dropNamespace(n){return h(this,null,function*(){yield this.namespaceOps.dropNamespace(n)})}loadNamespaceMetadata(n){return h(this,null,function*(){return this.namespaceOps.loadNamespaceMetadata(n)})}listTables(n){return h(this,null,function*(){return this.tableOps.listTables(n)})}createTable(n,t){return h(this,null,function*(){return this.tableOps.
27createTable(n,t)})}updateTable(n,t){return h(this,null,function*(){return this.tableOps.updateTable(n,t)})}dropTable(n,t){return h(this,null,function*(){yield this.tableOps.dropTable(n,t)})}loadTable(n){return h(this,null,function*(){return this.tableOps.loadTable(n)})}namespaceExists(n){return h(this,null,function*(){return this.namespaceOps.namespaceExists(n)})}tableExists(n){return h(this,null,function*(){return this.tableOps.tableExists(n)})}createNamespaceIfNotExists(n,t){return h(this,null,function*(){return this.namespaceOps.createNamespaceIfNotExists(n,t)})}createTableIfNotExists(n,t){return h(this,null,function*(){return this.tableOps.createTableIfNotExists(n,t)})}};var es=class{constructor(t,e={},i){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Jo),e),this.fetch=rn(i)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield Oe(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}listBuckets(t){return C(this,void 0,void 0,function*(){try{let e=new URLSearchParams;t?.limit!==void 0&&e.set("limit",t.limit.toString()),t?.offset!==void 0&&e.set("offset",t.offset.toString()),t?.sortColumn&&e.set("sortColumn",t.sortColumn),t?.sortOrder&&e.set("sortOrder",t.sortOrder),t?.search&&e.set("search",t.search);let i=e.toString(),r=i?`${this.url}/bucket?${i}`:`${this.url}/bucket`;return{data:yield jt(this.fetch,r,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}deleteBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield on(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Z(e))return{data:null,error:e};throw e}})}from(t){if(!zh(t))throw new Nt("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");return new Gh({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:()=>C(this,void 0,void 0,function*(){return this.headers})},fetch:this.fetch})}};re();re();var an={"X-Client-Info":`storage-js/${Zo}`,"Content-Type":"application/json"};var ts=class extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}};function Ce(n){return typeof n=="object"&&n!==null&&"__isStorageVectorsError"in n}var ln=class extends ts{constructor(t,e,i){super(t),this.name="StorageVectorsApiError",this.status=e,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},is=class extends ts{constructor(t,e){super(t),this.name="StorageVectorsUnknownError",this.originalError=e}};re();var cn=n=>n?(...t)=>n(...t):(...t)=>fetch(...t);var Kh=n=>{if(typeof n!="object"||n===null)return!1;let t=Object.getPrototypeOf(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)};var Yh=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),Jv=(n,t,e)=>C(void 0,void 0,void 0,function*(){if(n&&typeof n=="object"&&"status"in n&&"ok"in n&&typeof n.status=="number"&&!e?.noResolveJson){let r=n.status||500,o=n;if(typeof o.json=="function")o.json().then(s=>{let a=s?.statusCode||s?.code||r+"";t(new ln(Yh(s),r,a))}).catch(()=>{let s=r+"",a=o.statusText||`HTTP ${r} error`;t(new ln(a,r,s))});else{let s=r+"",a=o.statusText||`HTTP ${r} error`;t(new ln(a,r,s))}}else t(new is(Yh(n),n))}),Xv=(n,t,e,i)=>{let r={method:n,headers:t?.headers||{}};return n==="GET"||!i?r:(Kh(i)?(r.headers=Object.assign({"Content-Type":"application/json"},t?.headers),r.body=JSON.stringify(i)):r.body=i,Object.assign(Object.assign({},r),e))};function Qv(n,t,e,i,r,o){return C(this,void 0,void 0,function*(){return new Promise((s,a)=>{n(e,Xv(t,i,r,o)).then(l=>{if(!l.ok)throw l;if(i?.noResolveJson)return l;let c=l.headers.get("content-type");return!c||!c.includes("application/json")?{}:l.json()}).then(l=>s(l)).catch(l=>Jv(l,a,i))})})}function Se(n,t,e,i,r){return C(this,void 0,void 0,function*(){return Qv(n,"POST",t,i,r,e)})}var ns=class{constructor(t,e={},i){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},an),e),this.fetch=cn(i)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return C(this,void 0,void 0,function*(){try{return{data:(yield Se(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}getIndex(t,e){return C(this,void 0,void 0,function*(){try{return{data:yield Se(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:this.headers}),error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ce(i))return{data:null,error:i};throw i}})}listIndexes(t){return C(this,void 0,void 0,function*(){try{return{data:yield Se(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}deleteIndex(t,e){return C(this,void 0,void 0,function*(){try{return{data:(yield Se(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:this.headers}))||{},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Ce(i))return{data:null,error:i};throw i}})}};re();var rs=class{constructor(t,e={},i){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},an),e),this.fetch=cn(i)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return C(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield Se(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}getVectors(t){return C(this,void 0,void 0,function*(){try{return{data:yield Se(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}listVectors(t){return C(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
27if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield Se(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}queryVectors(t){return C(this,void 0,void 0,function*(){try{return{data:yield Se(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}deleteVectors(t){return C(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield Se(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}};re();var os=class{constructor(t,e={},i){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},an),e),this.fetch=cn(i)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return C(this,void 0,void 0,function*(){try{return{data:(yield Se(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}getBucket(t){return C(this,void 0,void 0,function*(){try{return{data:yield Se(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}listBuckets(){return C(this,arguments,void 0,function*(t={}){try{return{data:yield Se(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}deleteBucket(t){return C(this,void 0,void 0,function*(){try{return{data:(yield Se(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Ce(e))return{data:null,error:e};throw e}})}};var wr=class extends os{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new ss(this.url,this.headers,t,this.fetch)}createBucket(t){let e=Object.create(null,{createBucket:{get:()=>super.createBucket}});return C(this,void 0,void 0,function*(){return e.createBucket.call(this,t)})}getBucket(t){let e=Object.create(null,{getBucket:{get:()=>super.getBucket}});return C(this,void 0,void 0,function*(){return e.getBucket.call(this,t)})}listBuckets(){let t=Object.create(null,{listBuckets:{get:()=>super.listBuckets}});return C(this,arguments,void 0,function*(e={}){return t.listBuckets.call(this,e)})}deleteBucket(t){let e=Object.create(null,{deleteBucket:{get:()=>super.deleteBucket}});return C(this,void 0,void 0,function*(){return e.deleteBucket.call(this,t)})}},ss=class extends ns{constructor(t,e,i,r){super(t,e,r),this.vectorBucketName=i}createIndex(t){let e=Object.create(null,{createIndex:{get:()=>super.createIndex}});return C(this,void 0,void 0,function*(){return e.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){let t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return C(this,arguments,void 0,function*(e={}){return t.listIndexes.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){let e=Object.create(null,{getIndex:{get:()=>super.getIndex}});return C(this,void 0,void 0,function*(){return e.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){let e=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return C(this,void 0,void 0,function*(){return e.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new as(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},as=class extends rs{constructor(t,e,i,r,o){super(t,e,o),this.vectorBucketName=i,this.indexName=r}putVectors(t){let e=Object.create(null,{putVectors:{get:()=>super.putVectors}});return C(this,void 0,void 0,function*(){return e.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){let e=Object.create(null,{getVectors:{get:()=>super.getVectors}});return C(this,void 0,void 0,function*(){return e.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){let t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return C(this,arguments,void 0,function*(e={}){return t.listVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){let e=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return C(this,void 0,void 0,function*(){return e.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){let e=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return C(this,void 0,void 0,function*(){return e.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}};var xr=class extends Xo{constructor(t,e={},i,r){super(t,e,i,r)}from(t){return new Yo(this.url,this.headers,t,this.fetch)}get vectors(){return new wr(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new es(this.url+"/iceberg",this.headers,this.fetch)}};var Zh="2.86.0";var Er="";typeof Deno<"u"?Er="deno":typeof document<"u"?Er="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Er="react-native":Er="node";var e_={"X-Client-Info":`supabase-js-${Er}/${Zh}`},Jh={headers:e_},Xh={schema:"public"},Qh={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ef={};var t_=n=>n?(...t)=>n(...t):(...t)=>fetch(...t),i_=()=>Headers,tf=(n,t,e)=>{let i=t_(e),r=i_();return(o,s)=>h(void 0,null,function*(){var a;let l=(a=yield t())!==null&&a!==void 0?a:n,c=new r(s?.headers);return c.has("apikey")||c.set("apikey",n),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),i(o,Object.assign(Object.assign({},s),{headers:c}))})};function n_(n){return n.endsWith("/")?n:n+"/"}function nf(n,t){var e,i;let{db:r,auth:o,realtime:s,global:a}=n,{db:l,auth:c,realtime:d,global:u}=t,m={db:Object.assign(Object.assign({},l),r),auth:Object.assign(Object.assign({},c),o),realtime:Object.assign(Object.assign({},d),s),storage:{},global:Object.assign(Object.assign(Object.assign({},u),a),{headers:Object.assign(Object.assign({},(e=u?.headers)!==null&&e!==void 0?e:{}),(i=a?.headers)!==null&&i!==void 0?i:{})}),accessToken:()=>h(this,null,function*(){return""})};return n.accessToken?m.accessToken=n.accessToken:delete m.accessToken,m}function rf(n){let t=n?.trim();if(!t)throw new Error("supabaseUrl is required.");
27if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(n_(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}re();re();var ls="2.86.0";var di=30*1e3,cs=3,ds=cs*di,of="http://localhost:9999",sf="supabase.auth.token";var af={"X-Client-Info":`gotrue-js/${ls}`};var Cr="X-Supabase-Api-Version",ql={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},lf=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,cf=10*60*1e3;var Lt=class extends Error{constructor(t,e,i){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=e,this.code=i}};function k(n){return typeof n=="object"&&n!==null&&"__isAuthError"in n}var us=class extends Lt{constructor(t,e,i){super(t,e,i),this.name="AuthApiError",this.status=e,this.code=i}};function df(n){return k(n)&&n.name==="AuthApiError"}var $e=class extends Lt{constructor(t,e){super(t),this.name="AuthUnknownError",this.originalError=e}},rt=class extends Lt{constructor(t,e,i,r){super(t,i,r),this.name=e,this.status=i}},ye=class extends rt{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}};function uf(n){return k(n)&&n.name==="AuthSessionMissingError"}var yt=class extends rt{constructor(){super("Auth session or user missing","AuthInvalidToken
27ResponseError",500,void 0)}},ui=class extends rt{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}},hi=class extends rt{constructor(t,e=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=e}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};function hf(n){return k(n)&&n.name==="AuthImplicitGrantRedirectError"}var Sr=class extends rt{constructor(t,e=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=e}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}},dn=class extends rt{constructor(t,e){super(t,"AuthRetryableFetchError",e,void 0)}};function hs(n){return k(n)&&n.name==="AuthRetryableFetchError"}var Ir=class extends rt{constructor(t,e,i){super(t,"AuthWeakPasswordError",e,"weak_password"),this.reasons=i}};var fi=class extends rt{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}};var fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),ff=` 28\r=`.split(""),r_=(()=>{let n=new Array(128);for(let t=0;t<n.length;t+=1)n[t]=-1;for(let t=0;t<ff.length;t+=1)n[ff[t].charCodeAt(0)]=-2;for(let t=0;t<fs.length;t+=1)n[fs[t].charCodeAt(0)]=t;return n})();function mf(n,t,e){if(n!==null)for(t.queue=t.queue<<8|n,t.queuedBits+=8;t.queuedBits>=6;){let i=t.queue>>t.queuedBits-6&63;e(fs[i]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){let i=t.queue>>t.queuedBits-6&63;e(fs[i]),t.queuedBits-=6}}function pf(n,t,e){let i=r_[n];if(i>-1)for(t.queue=t.queue<<6|i,t.queuedBits+=6;t.queuedBits>=8;)e(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(n)}"`)}}function Gl(n){let t=[],e=s=>{t.push(String.fromCodePoint(s))},i={utf8seq:0,codepoint:0},r={queue:0,queuedBits:0},o=s=>{a_(s,i,e)};for(let s=0;s<n.length;s+=1)pf(n.charCodeAt(s),r,o);return t.join("")}function o_(n,t){if(n<=127){t(n);return}else if(n<=2047){t(192|n>>6),t(128|n&63);return}else if(n<=65535){t(224|n>>12),t(128|n>>6&63),t(128|n&63);return}else if(n<=1114111){t(240|n>>18),t(128|n>>12&63),t(128|n>>6&63),t(128|n&63);return}throw new Error(`Unrecognized Unicode codepoint: ${n.toString(16)}`)}function s_(n,t){for(let e=0;e<n.length;e+=1){let i=n.charCodeAt(e);if(i>55295&&i<=56319){let r=(i-55296)*1024&65535;i=(n.charCodeAt(e+1)-56320&65535|r)+65536,e+=1}o_(i,t)}}function a_(n,t,e){if(t.utf8seq===0){if(n<=127){e(n);return}for(let i=1;i<6;i+=1)if(!(n>>7-i&1)){t.utf8seq=i;break}if(t.utf8seq===2)t.codepoint=n&31;else if(t.utf8seq===3)t.codepoint=n&15;else if(t.utf8seq===4)t.codepoint=n&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(n<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|n&63,t.utf8seq-=1,t.utf8seq===0&&e(t.codepoint)}}function Vt(n){let t=[],e={queue:0,queuedBits:0},i=r=>{t.push(r)};for(let r=0;r<n.length;r+=1)pf(n.charCodeAt(r),e,i);return new Uint8Array(t)}function gf(n){let t=[];return s_(n,e=>t.push(e)),new Uint8Array(t)}function wt(n){let t=[],e={queue:0,queuedBits:0},i=r=>{t.push(r)};return n.forEach(r=>mf(r,e,i)),mf(null,e,i),t.join("")}function bf(n){return Math.round(Date.now()/1e3)+n}function vf(){return Symbol("auth-callback")}var ge=()=>typeof window<"u"&&typeof document<"u",mi={tested:!1,writable:!1},ms=()=>{if(!ge())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(mi.tested)return mi.writable;let n=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(n,n),globalThis.localStorage.removeItem(n),mi.tested=!0,mi.writable=!0}catch{mi.tested=!0,mi.writable=!1}return mi.writable};function _f(n){let t={},e=new URL(n);if(e.hash&&e.hash[0]==="#")try{new URLSearchParams(e.hash.substring(1)).forEach((r,o)=>{t[o]=r})}catch{}return e.searchParams.forEach((i,r)=>{t[r]=i}),t}var ps=n=>n?(...t)=>n(...t):(...t)=>fetch(...t),yf=n=>typeof n=="object"&&n!==null&&"status"in n&&"ok"in n&&"json"in n&&typeof n.json=="function",pi=(n,t,e)=>h(void 0,null,function*(){yield n.setItem(t,JSON.stringify(e))}),Ut=(n,t)=>h(void 0,null,function*(){let e=yield n.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch{return e}}),xt=(n,t)=>h(void 0,null,function*(){yield n.removeItem(t)}),Ar=class n{constructor(){this.promise=new n.promiseConstructor((t,e)=>{this.resolve=t,this.reject=e})}};Ar.promiseConstructor=Promise;function gs(n){let t=n.split(".");if(t.length!==3)throw new fi("Invalid JWT structure");for(let i=0;i<t.length;i++)if(!lf.test(t[i]))throw new fi("JWT not in base64url format");
28return{header:JSON.parse(Gl(t[0])),payload:JSON.parse(Gl(t[1])),signature:Vt(t[2]),raw:{header:t[0],payload:t[1]}}}function wf(n){return h(this,null,function*(){return yield new Promise(t=>{setTimeout(()=>t(null),n)})})}function xf(n,t){return new Promise((i,r)=>{h(this,null,function*(){for(let o=0;o<1/0;o++)try{let s=yield n(o);if(!t(o,null,s)){i(s);return}}catch(s){if(!t(o,s)){r(s);return}}})})}function l_(n){return("0"+n.toString(16)).substr(-2)}function c_(){let t=new Uint32Array(56);if(typeof crypto>"u"){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=e.length,r="";for(let o=0;o<56;o++)r+=e.charAt(Math.floor(Math.random()*i));return r}return crypto.getRandomValues(t),Array.from(t,l_).join("")}function d_(n){return h(this,null,function*(){let e=new TextEncoder().encode(n),i=yield crypto.subtle.digest("SHA-256",e),r=new Uint8Array(i);return Array.from(r).map(o=>String.fromCharCode(o)).join("")})}function u_(n){return h(this,null,function*(){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),n;let e=yield d_(n);return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")})}function gi(n,t,e=!1){return h(this,null,function*(){let i=c_(),r=i;e&&(r+="/PASSWORD_RECOVERY"),yield pi(n,`${t}-code-verifier`,r);let o=yield u_(i);return[o,i===o?"plain":"s256"]})}var h_=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Ef(n){let t=n.headers.get(Cr);if(!t||!t.match(h_))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Cf(n){if(!n)throw new Error("Missing exp claim");let t=Math.floor(Date.now()/1e3);if(n<=t)throw new Error("JWT has expired")}function Sf(n){switch(n){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}var f_=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function bi(n){if(!f_.test(n))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function bs(){let n={};return new Proxy(n,{get:(t,e)=>{if(e==="__isUserNotAvailableProxy")return!0;if(typeof e=="symbol"){let i=e.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${e}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,e)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${e}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,e)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${e}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function If(n,t){return new Proxy(n,{get:(e,i,r)=>{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){let o=i.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(e,i,r)}return!t.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(e,i,r)}})}function Kl(n){return JSON.parse(JSON.stringify(n))}var vi=n=>n.msg||n.message||n.error_description||n.error||JSON.stringify(n),m_=[502,503,504];function Af(n){return h(this,null,function*(){var t;
28if(!yf(n))throw new dn(vi(n),0);if(m_.includes(n.status))throw new dn(vi(n),n.status);let e;try{e=yield n.json()}catch(o){throw new $e(vi(o),o)}let i,r=Ef(n);if(r&&r.getTime()>=ql["2024-01-01"].timestamp&&typeof e=="object"&&e&&typeof e.code=="string"?i=e.code:typeof e=="object"&&e&&typeof e.error_code=="string"&&(i=e.error_code),i){if(i==="weak_password")throw new Ir(vi(e),n.status,((t=e.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(i==="session_not_found")throw new ye}else if(typeof e=="object"&&e&&typeof e.weak_password=="object"&&e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.reasons.reduce((o,s)=>o&&typeof s=="string",!0))throw new Ir(vi(e),n.status,e.weak_password.reasons);throw new us(vi(e),n.status||500,i)})}var p_=(n,t,e,i)=>{let r={method:n,headers:t?.headers||{}};return n==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t?.headers),r.body=JSON.stringify(i),Object.assign(Object.assign({},r),e))};function T(n,t,e,i){return h(this,null,function*(){var r;let o=Object.assign({},i?.headers);o[Cr]||(o[Cr]=ql["2024-01-01"].name),i?.jwt&&(o.Authorization=`Bearer ${i.jwt}`);let s=(r=i?.query)!==null&&r!==void 0?r:{};i?.redirectTo&&(s.redirect_to=i.redirectTo);let a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=yield g_(n,t,e+a,{headers:o,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(l):{data:Object.assign({},l),error:null}})}function g_(n,t,e,i,r,o){return h(this,null,function*(){let s=p_(t,i,r,o),a;try{a=yield n(e,Object.assign({},s))}catch(l){throw console.error(l),new dn(vi(l),0)}if(a.ok||(yield Af(a)),i?.noResolveJson)return a;try{return yield a.json()}catch(l){yield Af(l)}})}function He(n){var t;let e=null;b_(n)&&(e=Object.assign({},n),n.expires_at||(e.expires_at=bf(n.expires_in)));let i=(t=n.user)!==null&&t!==void 0?t:n;return{data:{session:e,user:i},error:null}}function Yl(n){let t=He(n);return!t.error&&n.weak_password&&typeof n.weak_password=="object"&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.message&&typeof n.weak_password.message=="string"&&n.weak_password.reasons.reduce((e,i)=>e&&typeof i=="string",!0)&&(t.data.weak_password=n.weak_password),t}function ot(n){var t;return{data:{user:(t=n.user)!==null&&t!==void 0?t:n},error:null}}function Rf(n){return{data:n,error:null}}function kf(n){let{action_link:t,email_otp:e,hashed_token:i,redirect_to:r,verification_type:o}=n,s=vt(n,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:e,hashed_token:i,redirect_to:r,verification_type:o},l=Object.assign({},s);return{data:{properties:a,user:l},error:null}}function Zl(n){return n}function b_(n){return n.access_token&&n.refresh_token&&n.expires_in}var vs=["global","local","others"];var un=class{constructor({url:t="",headers:e={},fetch:i}){this.url=t,this.headers=e,this.fetch=ps(i),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}signOut(i){return h(this,arguments,function*(t,e=vs[0]){if(vs.indexOf(e)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${vs.join(", ")}`);try{return yield T(this.fetch,"POST",`${this.url}/logout?scope=${e}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(k(r))return{data:null,error:r};throw r}})}inviteUserByEmail(i){return h(this,arguments,function*(t,e={}){try{return yield T(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:e.data},headers:this.headers,redirectTo:e.redirectTo,xform:ot})}catch(r){if(k(r))return{data:{user:null},error:r};throw r}})}generateLink(t){return h(this,null,function*(){try{let{options:e}=t,i=vt(t,["options"]),r=Object.assign(Object.assign({},i),e);return"newEmail"in i&&(r.new_email=i?.newEmail,delete r.newEmail),yield T(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:kf,redirectTo:e?.redirectTo})}catch(e){if(k(e))return{data:{properties:null,user:null},error:e};throw e}})}createUser(t){return h(this,null,function*(){try{return yield T(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:ot})}catch(e){if(k(e))return{data:{user:null},error:e};throw e}})}listUsers(t){return h(this,null,function*(){var e,i,r,o,s,a,l;try{let c={nextPage:null,lastPage:0,total:0},d=yield T(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(e=t?.page)===null||e===void 0?void 0:e.toString())!==null&&i!==void 0?i:"",per_page:(o=(r=t?.perPage)===null||r===void 0?void 0:r.toString())!==null&&o!==void 0?o:""},xform:Zl});if(d.error)throw d.error;let u=yield d.json(),m=(s=d.headers.get("x-total-count"))!==null&&s!==void 0?s:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(g=>{let p=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(g.split(";")[1].split("=")[1]);c[`${b}Page`]=p}),c.total=parseInt(m)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(k(c))return{data:{users:[]},error:c};throw c}})}getUserById(t){return h(this,null,function*(){bi(t);try{return yield T(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ot})}catch(e){if(k(e))return{data:{user:null},error:e};throw e}})}updateUserById(t,e){return h(this,null,function*(){bi(t);try{return yield T(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:e,headers:this.headers,xform:ot})}catch(i){if(k(i))return{data:{user:null},error:i};throw i}})}deleteUser(t,e=!1){return h(this,null,function*(){bi(t);
28try{return yield T(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:e},xform:ot})}catch(i){if(k(i))return{data:{user:null},error:i};throw i}})}_listFactors(t){return h(this,null,function*(){bi(t.userId);try{let{data:e,error:i}=yield T(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:r=>({data:{factors:r},error:null})});return{data:e,error:i}}catch(e){if(k(e))return{data:null,error:e};throw e}})}_deleteFactor(t){return h(this,null,function*(){bi(t.userId),bi(t.id);try{return{data:yield T(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(e){if(k(e))return{data:null,error:e};throw e}})}_listOAuthClients(t){return h(this,null,function*(){var e,i,r,o,s,a,l;try{let c={nextPage:null,lastPage:0,total:0},d=yield T(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(e=t?.page)===null||e===void 0?void 0:e.toString())!==null&&i!==void 0?i:"",per_page:(o=(r=t?.perPage)===null||r===void 0?void 0:r.toString())!==null&&o!==void 0?o:""},xform:Zl});if(d.error)throw d.error;let u=yield d.json(),m=(s=d.headers.get("x-total-count"))!==null&&s!==void 0?s:0,f=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(g=>{let p=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(g.split(";")[1].split("=")[1]);c[`${b}Page`]=p}),c.total=parseInt(m)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(k(c))return{data:{clients:[]},error:c};throw c}})}_createOAuthClient(t){return h(this,null,function*(){try{return yield T(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(k(e))return{data:null,error:e};throw e}})}_getOAuthClient(t){return h(this,null,function*(){try{return yield T(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(k(e))return{data:null,error:e};throw e}})}_updateOAuthClient(t,e){return h(this,null,function*(){try{return yield T(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:e,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(k(i))return{data:null,error:i};throw i}})}_deleteOAuthClient(t){return h(this,null,function*(){try{return yield T(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(k(e))return{data:null,error:e};throw e}})}_regenerateOAuthClientSecret(t){return h(this,null,function*(){try{return yield T(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(k(e))return{data:null,error:e};throw e}})}};function Jl(n={}){return{getItem:t=>n[t]||null,setItem:(t,e)=>{n[t]=e},removeItem:t=>{delete n[t]}}}var _i={debug:!!(globalThis&&ms()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")},Rr=class extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}},_s=class extends Rr{};function Xl(n,t,e){return h(this,null,function*(){_i.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",n,t);let i=new globalThis.AbortController;return t>0&&setTimeout(()=>{i.abort(),_i.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",n)},t),yield Promise.resolve().then(()=>globalThis.navigator.locks.request(n,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},r=>h(this,null,function*(){if(r){_i.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",n,r.name);try{return yield e()}finally{_i.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",n,r.name)}}else{if(t===0)throw _i.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",n),new _s(`Acquiring an exclusive Navigator LockManager lock "${n}" immediately failed`);if(_i.debug)try{let o=yield globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),yield e()}})))})}function Of(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Ql(n){if(!/^0x[a-fA-F0-9]{40}$/.test(n))throw new Error(`@supabase/auth-js: Address "${n}
28" is invalid.`);return n.toLowerCase()}function Df(n){return parseInt(n,16)}function Tf(n){let t=new TextEncoder().encode(n);return"0x"+Array.from(t,i=>i.toString(16).padStart(2,"0")).join("")}function Mf(n){var t;let{chainId:e,domain:i,expirationTime:r,issuedAt:o=new Date,nonce:s,notBefore:a,requestId:l,resources:c,scheme:d,uri:u,version:m}=n;{if(!Number.isInteger(e))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${e}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!u)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(m!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${m}`);if(!((t=n.statement)===null||t===void 0)&&t.includes(` 29`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${n.statement}`)}let f=Ql(n.address),g=d?`${d}://${i}`:i,p=n.statement?`${n.statement} 30`:"",b=`${g} wants you to sign in with your Ethereum account: 31${f} 32 33${p}`,y=`URI: ${u} 34Version: ${m} 35Chain ID: ${e}${s?` 36Nonce: ${s}`:""} 37Issued At: ${o.toISOString()}`;if(r&&(y+=` 38Expiration Time: ${r.toISOString()}`),a&&(y+=` 39Not Before: ${a.toISOString()}`),l&&(y+=` 40Request ID: ${l}`),c){let M=` 41Resources:`;for(let E of c){if(!E||typeof E!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${E}`);M+=` 42- ${E}`}y+=M}return`${b} 43${y}`}re();var ne=class extends Error{constructor({message:t,code:e,cause:i,name:r}){var o;super(t,{cause:i}),this.__isWebAuthnError=!0,this.name=(o=r??(i instanceof Error?i.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=e}},yi=class extends ne{constructor(t,e){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e,message:t}),this.name="WebAuthnUnknownError",this.originalError=e}};function Pf({error:n,options:t}){var e,i,r;let{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(n.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:n})}else if(n.name==="ConstraintError"){if(((e=o.authenticatorSelection)===null||e===void 0?void 0:e.requireResidentKey)===!0)return new ne({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:n});if(t.mediation==="conditional"&&((i=o.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new ne({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:n});if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new ne({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:n})}else{if(n.name==="InvalidStateError")return new ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:n});if(n.name==="NotAllowedError")return new ne({message:n.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n});if(n.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:n}):new ne({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:n});if(n.name==="SecurityError"){let s=window.location.hostname;if(ec(s)){if(o.rp.id!==s)return new ne({message:`The RP ID "${o.rp.id}
43" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:n})}else return new ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:n})}else if(n.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new ne({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:n})}else if(n.name==="UnknownError")return new ne({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:n})}return new ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n})}function Ff({error:n,options:t}){let{publicKey:e}=t;if(!e)throw Error("options was missing required publicKey property");if(n.name==="AbortError"){if(t.signal instanceof AbortSignal)return new ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:n})}else{if(n.name==="NotAllowedError")return new ne({message:n.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n});if(n.name==="SecurityError"){let i=window.location.hostname;if(ec(i)){if(e.rpId!==i)return new ne({message:`The RP ID "${e.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:n})}else return new ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:n})}else if(n.name==="UnknownError")return new ne({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:n})}return new ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n})}var tc=class{createNewAbortSignal(){if(this.controller){let e=new Error("Cancelling existing WebAuthn API call for new one");e.name="AbortError",this.controller.abort(e)}let t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){let t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}},v_=new tc;function jf(n){if(!n)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(n);let{challenge:t,user:e,excludeCredentials:i}=n,r=vt(n,["challenge","user","excludeCredentials"]),o=Vt(t).buffer,s=Object.assign(Object.assign({},e),{id:Vt(e.id).buffer}),a=Object.assign(Object.assign({},r),{challenge:o,user:s});if(i&&i.length>0){a.excludeCredentials=new Array(i.length);for(let l=0;l<i.length;l++){let c=i[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Vt(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function Lf(n){if(!n)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(n);let{challenge:t,allowCredentials:e}=n,i=vt(n,["challenge","allowCredentials"]),r=Vt(t).buffer,o=Object.assign(Object.assign({},i),{challenge:r});if(e&&e.length>0){o.allowCredentials=new Array(e.length);for(let s=0;s<e.length;s++){let a=e[s];o.allowCredentials[s]=Object.assign(Object.assign({},a),{id:Vt(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function Vf(n){var t;if("toJSON"in n&&typeof n.toJSON=="function")return n.toJSON();let e=n;return{id:n.id,rawId:n.id,response:{attestationObject:wt(new Uint8Array(n.response.attestationObject)),clientDataJSON:wt(new Uint8Array(n.response.clientDataJSON))},type:"public-key",clientExtensionResults:n.getClientExtensionResults(),authenticatorAttachment:(t=e.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Uf(n){var t;if("toJSON"in n&&typeof n.toJSON=="function")return n.toJSON();let e=n,i=n.getClientExtensionResults(),r=n.response;return{id:n.id,rawId:n.id,response:{authenticatorData:wt(new Uint8Array(r.authenticatorData)),clientDataJSON:wt(new Uint8Array(r.clientDataJSON)),signature:wt(new Uint8Array(r.signature)),userHandle:r.userHandle?wt(new
43Uint8Array(r.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(t=e.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ec(n){return n==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(n)}function Nf(){var n,t;return!!(ge()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((n=navigator?.credentials)===null||n===void 0?void 0:n.create)=="function"&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.get)=="function")}function __(n){return h(this,null,function*(){try{let t=yield navigator.credentials.create(n);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new yi("Browser returned unexpected credential type",t)}:{data:null,error:new yi("Empty credential response",t)}}catch(t){return{data:null,error:Pf({error:t,options:n})}}})}function y_(n){return h(this,null,function*(){try{let t=yield navigator.credentials.get(n);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new yi("Browser returned unexpected credential type",t)}:{data:null,error:new yi("Empty credential response",t)}}catch(t){return{data:null,error:Ff({error:t,options:n})}}})}var w_={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},x_={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function ys(...n){let t=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e=r=>r instanceof ArrayBuffer||ArrayBuffer.isView(r),i={};for(let r of n)if(r)for(let o in r){let s=r[o];if(s!==void 0)if(Array.isArray(s))i[o]=s;else if(e(s))i[o]=s;else if(t(s)){let a=i[o];t(a)?i[o]=ys(a,s):i[o]=ys(s)}else i[o]=s}return i}function E_(n,t){return ys(w_,n,t||{})}function C_(n,t){return ys(x_,n,t||{})}var ws=class{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}_enroll(t){return h(this,null,function*(){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))})}_challenge(s,a){return h(this,arguments,function*({factorId:t,webauthn:e,friendlyName:i,signal:r},o){try{let{data:l,error:c}=yield this.client.mfa.challenge({factorId:t,webauthn:e});if(!l)return{data:null,error:c};let d=r??v_.createNewAbortSignal();if(l.webauthn.type==="create"){let{user:u}=l.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${i}`),u.displayName||(u.displayName=u.name)}switch(l.webauthn.type){case"create":{let u=E_(l.webauthn.credential_options.publicKey,o?.create),{data:m,error:f}=yield __({publicKey:u,signal:d});return m?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:m}},error:null}:{data:null,error:f}}case"request":{let u=C_(l.webauthn.credential_options.publicKey,o?.request),{data:m,error:f}=yield y_(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:u,signal:d}));return m?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:m}},error:null}:{data:null,error:f}}}}catch(l){return k(l)?{data:null,error:l}:{data:null,error:new $e("Unexpected error in challenge",l)}}})}_verify(r){return h(this,arguments,function*({challengeId:t,factorId:e,webauthn:i}){return this.client.mfa.verify({factorId:e,challengeId:t,webauthn:i})})}_authenticate(s,a){return h(this,arguments,function*({factorId:t,webauthn:{rpId:e=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:r}={}},o){if(!e)return{data:null,error:new Lt("rpId is required for WebAuthn authentication")};try{if(!Nf())return{data:null,error:new $e("Browser does not support WebAuthn",null)};let{data:l,error:c}=yield this.challenge({factorId:t,webauthn:{rpId:e,rpOrigins:i},signal:r},{request:o});if(!l)return{data:null,error:c};let{webauthn:d}=l;return this._verify({factorId:t,challengeId:l.challengeId,webauthn:{type:d.type,rpId:e,rpOrigins:i,credential_response:d.credential_response}})}catch(l){return k(l)?{data:null,error:l}:{data:null,error:new $e("Unexpected error in authenticate",l)}
43}})}_register(s,a){return h(this,arguments,function*({friendlyName:t,webauthn:{rpId:e=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:r}={}},o){if(!e)return{data:null,error:new Lt("rpId is required for WebAuthn registration")};try{if(!Nf())return{data:null,error:new $e("Browser does not support WebAuthn",null)};let{data:l,error:c}=yield this._enroll({friendlyName:t});if(!l)return yield this.client.mfa.listFactors().then(m=>{var f;return(f=m.data)===null||f===void 0?void 0:f.all.find(g=>g.factor_type==="webauthn"&&g.friendly_name===t&&g.status!=="unverified")}).then(m=>m?this.client.mfa.unenroll({factorId:m?.id}):void 0),{data:null,error:c};let{data:d,error:u}=yield this._challenge({factorId:l.id,friendlyName:l.friendly_name,webauthn:{rpId:e,rpOrigins:i},signal:r},{create:o});return d?this._verify({factorId:l.id,challengeId:d.challengeId,webauthn:{rpId:e,rpOrigins:i,type:d.webauthn.type,credential_response:d.webauthn.credential_response}}):{data:null,error:u}}catch(l){return k(l)?{data:null,error:l}:{data:null,error:new $e("Unexpected error in register",l)}}})}};Of();var S_={url:of,storageKey:sf,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:af,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};function Bf(n,t,e){return h(this,null,function*(){return yield e()})}var hn={},I_=(()=>{class n{get jwks(){var e,i;return(i=(e=hn[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&i!==void 0?i:{keys:[]}}set jwks(e){hn[this.storageKey]=Object.assign(Object.assign({},hn[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,i;return(i=(e=hn[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&i!==void 0?i:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){hn[this.storageKey]=Object.assign(Object.assign({},hn[this.storageKey]),{cachedAt:e})}constructor(e){var i,r,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let s=Object.assign(Object.assign({},S_),e);if(this.storageKey=s.storageKey,this.instanceID=(i=n.nextInstanceID[this.storageKey])!==null&&i!==void 0?i:0,n.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&ge()){let a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.admin=new un({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=ps(s.fetch),this.lock=s.lock||Bf,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,s.lock?this.lock=s.lock:ge()&&(!((r=globalThis?.navigator)===null||r===void 0)&&r.locks)?this.lock=Xl:this.lock=Bf,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new ws(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:ms()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Jl(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Jl(this.memoryStorage)),ge()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",a=>h(this,null,function*(){this._debug("received broadcast notification from other tab or client",a),yield this._notifyAllSubscribers(a.data.event,a.data.session,!1)}))}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ls}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}initialize(){return h(this,null,function*(){return this.initializePromise?yield this.initializePromise:(this.initializePromise=h(this,null,function*(){return yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._initialize()}))}),yield this.initializePromise)})}_initialize(){return h(this,null,function*(){var e;try{let i={},r="none";if(ge()&&(i=_f(window.location.href),this._isImplicitGrantCallback(i)?r="implicit":(yield this._isPKCECallback(i))&&(r="pkce")),ge()&&this.detectSessionInUrl&&r!=="none"){let{data:o,error:s}=yield this._getSessionFromURL(i,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),hf(s)){let c=(e=s.details)===null||e===void 0?void 0:e.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:s}}return yield this._removeSession(),{error:s}}let{session:a,redirectType:l}=o;return this._debug("#_initialize()","detected session in URL",a,"redirect type",l),yield this._saveSession(a),setTimeout(()=>h(this,null,function*(){l==="recovery"?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",a):yield this._notifyAllSubscribers("SIGNED_IN",a)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(i){return k(i)?this._returnResult({error:i}):this._returnResult({error:new $e("Unexpected error during initialization",i)})}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(e){return h(this,null,function*(){var i,r,o;try{let s=yield T(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(i=e?.options)===null||i===void 0?void 0:i.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(o=e?.options)===null||o===void 0?void 0:o.captchaToken}},xform:He}),{data:a,error:l}=s;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});let c=a.session,d=a.user;return a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(s){if(k(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}signUp(e){return h(this,null,function*(){var i,r,o;try{let s;if("email"in e){let{email:u,password:m,options:f}=e,g=null,p=null;this.flowType==="pkce"&&([g,p]=yield gi(this.storage,this.storageKey)),s=yield T(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f?.emailRedirectTo,body:{email:u,password:m,data:(i=f?.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:f?.captchaToken},code_challenge:g,code_challenge_method:p},xform:He})}else if("phone"in e){let{phone:u,password:m,options:f}=e;s=yield T(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:m,data:(r=f?.data)!==null&&r!==void 0?r:{},channel:(o=f?.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:He})}else throw new ui("You must provide either an email or phone number and a password");let{data:a,error:l}=s;if(l||!a)return this._returnResult({data:{user:null,session:null},error:l});let c=a.session,d=a.user;return a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(s){if(k(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}signInWithPassword(e){return h(this,null,function*(){try{let i;if("email"in e){let{email:s,password:a,options:l}=e;i=yield T(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:a,gotrue_meta_security:{captcha_token:l?.captchaToken}},xform:Yl})}else if("phone"in e){let{phone:s,password:a,options:l}=e;i=yield T(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:a,gotrue_meta_security:{captcha_token:l?.captchaToken}},xform:Yl})}else throw new ui("You must provide either an email or phone number and a password");let{data:r,error:o}=i;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!r||!r.session||!r.user){let s=new yt;return this._returnResult({data:{user:null,session:null},error:s})}return r.session&&(yield this._saveSession(r.session),yield this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:o})}catch(i){if(k(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}signInWithOAuth(e){return h(this,null,function*(){var i,r,o,s;return yield this._handleProviderSignIn(e.provider,{redirectTo:(i=e.options)===null||i===void 0?void 0:i.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(o=e.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(s=e.options)===null||s===void 0?void 0:s.skipBrowserRedirect})})}exchangeCodeForSession(e){return h(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>h(this,null,function*(){return this._exchangeCodeForSession(e)}))})}signInWithWeb3(e){return h(this,null,function*(){let{chain:i}=e;switch(i){case"ethereum":return yield this.signInWithEthereum(e);case"solana":return yield this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${i}"`)}})}signInWithEthereum(e){return h(this,null,function*(){var i,r,o,s,a,l,c,d,u,m,f;let g,p;if("message"in e)g=e.message,p=e.signature;else{let{chain:b,wallet:y,statement:M,options:E}=e,I;if(ge())if(typeof y=="object")I=y;else{let at=window;if("ethereum"in at&&typeof at.ethereum=="object"&&"request"in at.ethereum&&typeof at.ethereum.request=="function")I=at.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!E?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");I=y}let B=new URL((i=E?.url)!==null&&i!==void 0?i:window.location.href),we=yield I.request({method:"eth_requestAccounts"}).then(at=>at).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!we||we.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");let K=Ql(we[0]),ue=(r=E?.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!ue){let at=yield I.request({method:"eth_chainId"});ue=Df(at)}let Ct={domain:B.host,address:K,statement:M,uri:B.href,version:"1",chainId:ue,nonce:(o=E?.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(a=(s=E?.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(l=E?.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=E?.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(d=E?.signInWithEthereum)===null||d===void 0?void 0:d.requestId,resources:(u=E?.signInWithEthereum)===null||u===void 0?void 0:u.resources};g=Mf(Ct),p=yield I.request({method:"personal_sign",params:[Tf(g),K]})}try{let{data:b,error:y}=yield T(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:g,signature:p},!((m=e.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:He});if(y)throw y;if(!b||!b.session||!b.user){let M=new yt;return this._returnResult({data:{user:null,session:null},error:M})}return b.session&&(yield this._saveSession(b.session),yield this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:y})}catch(b){if(k(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}})}signInWithSolana(e){return h(this,null,function*(){var i,r,o,s,a,l,c,d,u,m,f,g;let p,b;if("message"in e)p=e.message,b=e.signature;else{let{chain:y,wallet:M,statement:E,options:I}=e,B;if(ge())if(typeof M=="object")B=M;else{let K=window;if("solana"in K&&typeof K.solana=="object"&&("signIn"in K.solana&&typeof K.solana.signIn=="function"||"signMessage"in K.solana&&typeof K.solana.signMessage=="function"))B=K.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof M!="object"||!I?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");B=M}let we=new URL((i=I?.url)!==null&&i!==void 0?i:window.location.href);if("signIn"in B&&B.signIn){let K=yield B.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},I?.signInWithSolana),{version:"1",domain:we.host,uri:we.href}),E?{statement:E}:null)),ue;if(Array.isArray(K)&&K[0]&&typeof K[0]=="object")ue=K[0];else if(K&&typeof K=="object"&&"signedMessage"in K&&"signature"in K)ue=K;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in ue&&"signature"in ue&&(typeof ue.signedMessage=="string"||ue.signedMessage instanceof Uint8Array)&&ue.signature instanceof Uint8Array)p=typeof ue.signedMessage=="string"?ue.signedMessage:new TextDecoder().decode(ue.signedMessage),b=ue.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in B)||typeof B.signMessage!="function"||!("publicKey"in B)||typeof B!="object"||!B.publicKey||!("toBase58"in B.publicKey)||typeof B.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");p=[`${we.host} wants you to sign in with your Solana account:`,B.publicKey.toBase58(),...E?["",E,""]:[""],"Version: 1",`URI: ${we.href}`,`Issued At: ${(o=(r=I?.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((s=I?.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${I.signInWithSolana.notBefore}`]:[],...!((a=I?.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${I.signInWithSolana.expirationTime}`]:[],...!((l=I?.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${I.signInWithSolana.chainId}`]:[],...!((c=I?.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${I.signInWithSolana.nonce}`]:[],...!((d=I?.signInWithSolana)===null||d===void 0)&&d.requestId?[`Request ID: ${I.signInWithSolana.requestId}`]:[],...!((m=(u=I?.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||m===void 0)&&m.length?["Resources",...I.signInWithSolana.resources.m
43ap(ue=>`- ${ue}`)]:[]].join(` 44`);let K=yield B.signMessage(new TextEncoder().encode(p),"utf8");if(!K||!(K instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");b=K}}try{let{data:y,error:M}=yield T(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:p,signature:wt(b)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(g=e.options)===null||g===void 0?void 0:g.captchaToken}}:null),xform:He});if(M)throw M;if(!y||!y.session||!y.user){let E=new yt;return this._returnResult({data:{user:null,session:null},error:E})}return y.session&&(yield this._saveSession(y.session),yield this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:M})}catch(y){if(k(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}})}_exchangeCodeForSession(e){return h(this,null,function*(){let i=yield Ut(this.storage,`${this.storageKey}-code-verifier`),[r,o]=(i??"").split("/");try{let{data:s,error:a}=yield T(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:He});if(yield xt(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!s||!s.session||!s.user){let l=new yt;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return s.session&&(yield this._saveSession(s.session),yield this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:o??null}),error:a})}catch(s){if(k(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}})}signInWithIdToken(e){return h(this,null,function*(){try{let{options:i,provider:r,token:o,access_token:s,nonce:a}=e,l=yield T(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:o,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:He}),{data:c,error:d}=l;if(d)return this._returnResult({data:{user:null,session:null},error:d});if(!c||!c.session||!c.user){let u=new yt;return this._returnResult({data:{user:null,session:null},error:u})}return c.session&&(yield this._saveSession(c.session),yield this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:d})}catch(i){if(k(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}signInWithOtp(e){return h(this,null,function*(){var i,r,o,s,a;try{if("email"in e){let{email:l,options:c}=e,d=null,u=null;this.flowType==="pkce"&&([d,u]=yield gi(this.storage,this.storageKey));let{error:m}=yield T(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(i=c?.data)!==null&&i!==void 0?i:{},create_user:(r=c?.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c?.captchaToken},code_challenge:d,code_challenge_method:u},redirectTo:c?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:m})}if("phone"in e){let{phone:l,options:c}=e,{data:d,error:u}=yield T(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(o=c?.data)!==null&&o!==void 0?o:{},create_user:(s=c?.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:c?.captchaToken},channel:(a=c?.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:d?.message_id},error:u})}throw new ui("You must provide either an email or phone number.")}catch(l){if(k(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}verifyOtp(e){return h(this,null,function*(){var i,r;try{let o,s;"options"in e&&(o=(i=e.options)===null||i===void 0?void 0:i.redirectTo,s=(r=e.options)===null||r===void 0?void 0:r.captchaToken);let{data:a,error:l}=yield T(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:o,xform:He});if(l)throw l;if(!a)throw new Error("An error occurred on token verification.");let c=a.session,d=a.user;return c?.access_token&&(yield this._saveSession(c),yield this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:d,session:c},error:null})}catch(o){if(k(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}signInWithSSO(e){return h(this,null,function*(){var i,r,o,s,a;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=yield gi(this.storage,this.storageKey));let d=yield T(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(i=e.options)===null||i===void 0?void 0:i.redirectTo)!==null&&r!==void 0?r:void 0}),!((o=e?.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:Rf});return!((s=d.data)===null||s===void 0)&&s.url&&ge()&&!(!((a=e.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(d.data.url),this._returnResult(d)}catch(l){if(k(l))return this._returnResult({data:null,error:l});throw l}})}reauthenticate(){return h(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return h(this,null,function*(){try{return yield this._useSession(e=>h(this,null,function*(){let{data:{session:i},error:r}=e;if(r)throw r;if(!i)throw new ye;let{error:o}=yield T(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:i.access_token});return this._returnResult({data:{user:null,session:null},error:o})}))}catch(e){if(k(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}resend(e){return h(this,null,function*(){try{let i=`${this.url}/resend`;if("email"in e){let{email:r,type:o,options:s}=e,{error:a}=yield T(this.fetch,"POST",i,{headers:this.headers,body:{email:r,type:o,gotrue_meta_security:{captcha_token:s?.captchaToken}},redirectTo:s?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if("phone"in e){let{phone:r,type:o,options:s}=e,{data:a,error:l}=yield T(this.fetch,"POST",i,{headers:this.headers,body:{phone:r,type:o,gotrue_meta_security:{captcha_token:s?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:l})}throw new ui("You must provide either an email or phone number and a type")}catch(i){if(k(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}getSession(){return h(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return this._useSession(i=>h(this,null,function*(){return i}))}))})}_acquireLock(e,i){return h(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=h(this,null,function*(){return yield r,yield i()});return this.pendingInLock.push(h(this,null,function*(){try{yield o}catch{}})),o}return yield this.lock(`lock:${this.storageKey}`,e,()=>h(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let r=i();for(this.pendingInLock.push(h(this,null,function*(){try{yield r}catch{}})),yield r;this.pendingInLock.length;){let o=[...this.pendingInLock];yield Promise.all(o),this.pendingInLock.splice(0,o.length)}return yield r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return h(this,null,function*(){this._debug("#_useSession","begin");try{let i=yield this.__loadSession();return yield e(i)}finally{this._debug("#_useSession","end")}})}__loadSession(){return h(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null,i=yield Ut(this.storage,this.storageKey);
44if(this._debug("#getSession()","session from storage",i),i!==null&&(this._isValidSession(i)?e=i:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};let r=e.expires_at?e.expires_at*1e3-Date.now()<ds:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){let a=yield Ut(this.userStorage,this.storageKey+"-user");a?.user?e.user=a.user:e.user=bs()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let a={value:this.suppressGetSessionWarning};e.user=If(e.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:o,error:s}=yield this._callRefreshToken(e.refresh_token);return s?this._returnResult({data:{session:null},error:s}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}})}getUser(e){return h(this,null,function*(){return e?yield this._getUser(e):(yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._getUser()})))})}_getUser(e){return h(this,null,function*(){try{return e?yield T(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ot}):yield this._useSession(i=>h(this,null,function*(){var r,o,s;let{data:a,error:l}=i;if(l)throw l;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ye}:yield T(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(o=a.session)===null||o===void 0?void 0:o.access_token)!==null&&s!==void 0?s:void 0,xform:ot})}))}catch(i){if(k(i))return uf(i)&&(yield this._removeSession(),yield xt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:i});throw i}})}updateUser(r){return h(this,arguments,function*(e,i={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._updateUser(e,i)}))})}_updateUser(r){return h(this,arguments,function*(e,i={}){try{return yield this._useSession(o=>h(this,null,function*(){let{data:s,error:a}=o;if(a)throw a;if(!s.session)throw new ye;let l=s.session,c=null,d=null;this.flowType==="pkce"&&e.email!=null&&([c,d]=yield gi(this.storage,this.storageKey));let{data:u,error:m}=yield T(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:i?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:c,code_challenge_method:d}),jwt:l.access_token,xform:ot});if(m)throw m;return l.user=u.user,yield this._saveSession(l),yield this._notifyAllSubscribers("USER_UPDATED",l),this._returnResult({data:{user:l.user},error:null})}))}catch(o){if(k(o))return this._returnResult({data:{user:null},error:o});throw o}})}setSession(e){return h(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return h(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new ye;let i=Date.now()/1e3,r=i,o=!0,s=null,{payload:a}=gs(e.access_token);if(a.exp&&(r=a.exp,o=r<=i),o){let{data:l,error:c}=yield this._callRefreshToken(e.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};s=l}else{let{data:l,error:c}=yield this._getUser(e.access_token);if(c)throw c;s={access_token:e.access_token,refresh_token:e.refresh_token,user:l.user,token_type:"bearer",expires_in:r-i,expires_at:r},yield this._saveSession(s),yield this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(i){if(k(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}})}refreshSession(e){return h(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r;if(!e){let{data:a,error:l}=i;if(l)throw l;e=(r=a.session)!==null&&r!==void 0?r:void 0}if(!e?.refresh_token)throw new ye;let{data:o,error:s}=yield this._callRefreshToken(e.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})}))}catch(i){if(k(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}_getSessionFromURL(e,i){return h(this,null,function*(){try{if(!ge())throw new hi("No browser detected.");
44if(e.error||e.error_description||e.error_code)throw new hi(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(i){case"implicit":if(this.flowType==="pkce")throw new Sr("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new hi("Not a valid implicit grant flow url.");break;default:}if(i==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Sr("No code detected.");let{data:E,error:I}=yield this._exchangeCodeForSession(e.code);if(I)throw I;let B=new URL(window.location.href);return B.searchParams.delete("code"),window.history.replaceState(window.history.state,"",B.toString()),{data:{session:E.session,redirectType:null},error:null}}let{provider_token:r,provider_refresh_token:o,access_token:s,refresh_token:a,expires_in:l,expires_at:c,token_type:d}=e;if(!s||!l||!a||!d)throw new hi("No session defined in URL");let u=Math.round(Date.now()/1e3),m=parseInt(l),f=u+m;c&&(f=parseInt(c));let g=f-u;g*1e3<=di&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${g}s, should have been closer to ${m}s`);let p=f-m;u-p>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",p,f,u):u-p<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",p,f,u);let{data:b,error:y}=yield this._getUser(s);if(y)throw y;let M={provider_token:r,provider_refresh_token:o,access_token:s,expires_in:m,expires_at:f,refresh_token:a,token_type:d,user:b.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:M,redirectType:e.type},error:null})}catch(r){if(k(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}})}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}_isPKCECallback(e){return h(this,null,function*(){let i=yield Ut(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&i)})}signOut(){return h(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return h(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(i=>h(this,null,function*(){var r;let{data:o,error:s}=i;if(s)return this._returnResult({error:s});let a=(r=o.session)===null||r===void 0?void 0:r.access_token;if(a){let{error:l}=yield this.admin.signOut(a,e);if(l&&!(df(l)&&(l.status===404||l.status===401||l.status===403)))return this._returnResult({error:l})}return e!=="others"&&(yield this._removeSession(),yield xt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})}))})}onAuthStateChange(e){let i=vf(),r={id:i,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",i),this.stateChangeEmitters.delete(i)}};return this._debug("#onAuthStateChange()","registered callback with id",i),this.stateChangeEmitters.set(i,r),h(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){this._emitInitialSession(i)}))}),{data:{subscription:r}}}_emitInitialSession(e){return h(this,null,function*(){return yield this._useSession(i=>h(this,null,function*(){var r,o;try{let{data:{session:s},error:a}=i;if(a)throw a;yield(r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s),this._debug("INITIAL_SESSION","callback id",e,"session",s)}catch(s){yield(o=this.stateChangeEmitters.get(e))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",s),console.error(s)}}))})}resetPasswordForEmail(r){return h(this,arguments,function*(e,i={}){let o=null,s=null;this.flowType==="pkce"&&([o,s]=yield gi(this.storage,this.storageKey,!0));try{return yield T(this.fetch,"POST",`${this.url}
44/recover`,{body:{email:e,code_challenge:o,code_challenge_method:s,gotrue_meta_security:{captcha_token:i.captchaToken}},headers:this.headers,redirectTo:i.redirectTo})}catch(a){if(k(a))return this._returnResult({data:null,error:a});throw a}})}getUserIdentities(){return h(this,null,function*(){var e;try{let{data:i,error:r}=yield this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=i.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}linkIdentity(e){return h(this,null,function*(){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)})}linkIdentityOAuth(e){return h(this,null,function*(){var i;try{let{data:r,error:o}=yield this._useSession(s=>h(this,null,function*(){var a,l,c,d,u;let{data:m,error:f}=s;if(f)throw f;let g=yield this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(l=e.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=e.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return yield T(this.fetch,"GET",g,{headers:this.headers,jwt:(u=(d=m.session)===null||d===void 0?void 0:d.access_token)!==null&&u!==void 0?u:void 0})}));if(o)throw o;return ge()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(r?.url),this._returnResult({data:{provider:e.provider,url:r?.url},error:null})}catch(r){if(k(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}})}linkIdentityIdToken(e){return h(this,null,function*(){return yield this._useSession(i=>h(this,null,function*(){var r;try{let{error:o,data:{session:s}}=i;if(o)throw o;let{options:a,provider:l,token:c,access_token:d,nonce:u}=e,m=yield T(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=s?.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:d,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:a?.captchaToken}},xform:He}),{data:f,error:g}=m;return g?this._returnResult({data:{user:null,session:null},error:g}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new yt}):(f.session&&(yield this._saveSession(f.session),yield this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:g}))}catch(o){if(k(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}))})}unlinkIdentity(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r,o;let{data:s,error:a}=i;if(a)throw a;return yield T(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(o=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&o!==void 0?o:void 0})}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}_refreshAccessToken(e){return h(this,null,function*(){let i=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(i,"begin");try{let r=Date.now();return yield xf(o=>h(this,null,function*(){return o>0&&(yield wf(200*Math.pow(2,o-1))),this._debug(i,"refreshing attempt",o),yield T(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:He})}),(o,s)=>{let a=200*Math.pow(2,o);return s&&hs(s)&&Date.now()+a-r<di})}catch(r){if(this._debug(i,"error",r),k(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(i,"end")}})}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}_handleProviderSignIn(e,i){return h(this,null,function*(){let r=yield this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:i.redirectTo,scopes:i.scopes,queryParams:i.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",i,"url",r),ge()&&!i.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}})}_recoverAndRefresh(){return h(this,null,function*(){var e,i;let r="#_recoverAndRefresh()";this._debug(r,"begin");try{let o=yield Ut(this.storage,this.storageKey);if(o&&this.userStorage){let a=yield Ut(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:o.user},yield pi(this.userStorage,this.storageKey+"-user",a)),o.user=(e=a?.user)!==null&&e!==void 0?e:bs()}else if(o&&!o.user&&!o.user){let a=yield Ut(this.storage,this.storageKey+"-user");a&&a?.user?(o.user=a.user,yield xt(this.storage,this.storageKey+"-user"),yield pi(this.storage,this.storageKey,o)):o.user=bs()}if(this._debug(r,"session from storage",o),!this._isValidSession(o)){this._debug(r,"session is not val
44id"),o!==null&&(yield this._removeSession());return}let s=((i=o.expires_at)!==null&&i!==void 0?i:1/0)*1e3-Date.now()<ds;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${ds}s`),s){if(this.autoRefreshToken&&o.refresh_token){let{error:a}=yield this._callRefreshToken(o.refresh_token);a&&(console.error(a),hs(a)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",a),yield this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{let{data:a,error:l}=yield this._getUser(o.access_token);!l&&a?.user?(o.user=a.user,yield this._saveSession(o),yield this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else yield this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(r,"error",o),console.error(o);return}finally{this._debug(r,"end")}})}_callRefreshToken(e){return h(this,null,function*(){var i,r;if(!e)throw new ye;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let o=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new Ar;let{data:s,error:a}=yield this._refreshAccessToken(e);if(a)throw a;if(!s.session)throw new ye;yield this._saveSession(s.session),yield this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);let l={data:s.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(s){if(this._debug(o,"error",s),k(s)){let a={data:null,error:s};return hs(s)||(yield this._removeSession()),(i=this.refreshingDeferred)===null||i===void 0||i.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(o,"end")}})}_notifyAllSubscribers(e,i,r=!0){return h(this,null,function*(){let o=`#_notifyAllSubscribers(${e})`;this._debug(o,"begin",i,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:i});let s=[],a=Array.from(this.stateChangeEmitters.values()).map(l=>h(this,null,function*(){try{yield l.callback(e,i)}catch(c){s.push(c)}}));if(yield Promise.all(a),s.length>0){for(let l=0;l<s.length;l+=1)console.error(s[l]);throw s[0]}}finally{this._debug(o,"end")}})}_saveSession(e){return h(this,null,function*(){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;let i=Object.assign({},e),r=i.user&&i.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&i.user&&(yield pi(this.userStorage,this.storageKey+"-user",{user:i.user}));let o=Object.assign({},i);delete o.user;let s=Kl(o);yield pi(this.storage,this.storageKey,s)}else{let o=Kl(i);yield pi(this.storage,this.storageKey,o)}})}_removeSession(){return h(this,null,function*(){this._debug("#_removeSession()"),yield xt(this.storage,this.storageKey),yield xt(this.storage,this.storageKey+"-code-verifier"),yield xt(this.storage,this.storageKey+"-user"),this.userStorage&&(yield xt(this.userStorage,this.storageKey+"-user")),yield this._notifyAllSubscribers("SIGNED_OUT",null)})}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&ge()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(i){console.error("removing visibilitychange callback failed",i)}}_startAutoRefresh(){return h(this,null,function*(){yield this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),di);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(()=>h(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return h(this,null,function*(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return h(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return h(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return h(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>h(this,null,function*(){try{let e=Date.now();try{return yield this._useSession(i=>h(this,null,function*(){let{data:{session:r}}=i;
44if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let o=Math.floor((r.expires_at*1e3-e)/di);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${di}ms, refresh threshold is ${cs} ticks`),o<=cs&&(yield this._callRefreshToken(r.refresh_token))}))}catch(i){console.error("Auto refresh tick failed with error. This is likely a transient error.",i)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(e.isAcquireTimeout||e instanceof Rr)this._debug("auto refresh token tick lock not available");else throw e}})}_handleVisibilityChange(){return h(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!ge()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>h(this,null,function*(){return yield this._onVisibilityChanged(!1)}),window?.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}})}_onVisibilityChanged(e){return h(this,null,function*(){let i=`#_onVisibilityChanged(${e})`;this._debug(i,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>h(this,null,function*(){if(document.visibilityState!=="visible"){this._debug(i,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}yield this._recoverAndRefresh()})))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,i,r){return h(this,null,function*(){let o=[`provider=${encodeURIComponent(i)}`];if(r?.redirectTo&&o.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r?.scopes&&o.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){let[s,a]=yield gi(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(a)}`});o.push(l.toString())}if(r?.queryParams){let s=new URLSearchParams(r.queryParams);o.push(s.toString())}return r?.skipBrowserRedirect&&o.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${o.join("&")}`})}_unenroll(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r;let{data:o,error:s}=i;return s?this._returnResult({data:null,error:s}):yield T(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=o?.session)===null||r===void 0?void 0:r.access_token})}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}_enroll(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r,o;let{data:s,error:a}=i;if(a)return this._returnResult({data:null,error:a});let l=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:c,error:d}=yield T(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=s?.session)===null||r===void 0?void 0:r.access_token});return d?this._returnResult({data:null,error:d}):(e.factorType==="totp"&&c.type==="totp"&&(!((o=c?.totp)===null||o===void 0)&&o.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}_verify(e){return h(this,null,function*(){return this._acquireLock(-1,()=>h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r;let{data:o,error:s}=i;if(s)return this._returnResult({data:null,error:s});let a=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?Vf(e.webauthn.credential_response):Uf(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=yield T(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:a,headers:this.headers,jwt:(r=o?.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}}))})}_challenge(e){return h(this,null,function*(){return this._acquireLock(-1,()=>h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){var r;let{data:o,error:s}=i;if(s)return this._returnResult({data:null,error:s});let a=yield T(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(r=o?.session)===null||r===void 0?void 0:r.access_token});if(a.error)return a;let{data:l}=a;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:jf(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Lf(l.webauthn.credential_options.publicKey)})})}),error:null}}}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}}))})}_challengeAndVerify(e){return h(this,null,function*(){let{data:i,error:r}=yield this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):yield this._verify({factorId:e.factorId,challengeId:i.id,code:e.code})})}_listFactors(){return h(this,null,function*(){var e;let{data:{user:i},error:r}=yield this.getUser();if(r)return{data:null,error:r};let o={all:[],phone:[],totp:[],webauthn:[]};for(let s of(e=i?.factors)!==null&&e!==void 0?e:[])o.all.push(s),s.status==="verified"&&o[s.factor_type].push(s);return{data:o,error:null}})}_getAuthenticatorAssuranceLevel(){return h(this,null,function*(){var e,i;let{data:{session:r},error:o}
44=yield this.getSession();if(o)return this._returnResult({data:null,error:o});if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:s}=gs(r.access_token),a=null;s.aal&&(a=s.aal);let l=a;((i=(e=r.user.factors)===null||e===void 0?void 0:e.filter(u=>u.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(l="aal2");let d=s.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}})}_getAuthorizationDetails(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){let{data:{session:r},error:o}=i;return o?this._returnResult({data:null,error:o}):r?yield T(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new ye})}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}_approveAuthorization(e,i){return h(this,null,function*(){try{return yield this._useSession(r=>h(this,null,function*(){let{data:{session:o},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!o)return this._returnResult({data:null,error:new ye});let a=yield T(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&ge()&&!i?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a}))}catch(r){if(k(r))return this._returnResult({data:null,error:r});throw r}})}_denyAuthorization(e,i){return h(this,null,function*(){try{return yield this._useSession(r=>h(this,null,function*(){let{data:{session:o},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!o)return this._returnResult({data:null,error:new ye});let a=yield T(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return a.data&&a.data.redirect_url&&ge()&&!i?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a}))}catch(r){if(k(r))return this._returnResult({data:null,error:r});throw r}})}_listOAuthGrants(){return h(this,null,function*(){try{return yield this._useSession(e=>h(this,null,function*(){let{data:{session:i},error:r}=e;return r?this._returnResult({data:null,error:r}):i?yield T(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ye})}))}catch(e){if(k(e))return this._returnResult({data:null,error:e});throw e}})}_revokeOAuthGrant(e){return h(this,null,function*(){try{return yield this._useSession(i=>h(this,null,function*(){let{data:{session:r},error:o}=i;return o?this._returnResult({data:null,error:o}):r?(yield T(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ye})}))}catch(i){if(k(i))return this._returnResult({data:null,error:i});throw i}})}fetchJwk(r){return h(this,arguments,function*(e,i={keys:[]}){let o=i.keys.find(c=>c.kid===e);if(o)return o;let s=Date.now();if(o=this.jwks.keys.find(c=>c.kid===e),o&&this.jwks_cached_at+cf>s)return o;let{data:a,error:l}=yield T(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(l)throw l;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=s,o=a.keys.find(c=>c.kid===e),!o)?null:o})}getClaims(r){return h(this,arguments,function*(e,i={}){try{let o=e;if(!o){let{data:p,error:b}=yield this.getSession();if(b||!p.session)return this._returnResult({data:null,error:b});o=p.session.access_token}let{header:s,payload:a,signature:l,raw:{header:c,payload:d}}=gs(o);i?.allowExpired||Cf(a.exp);let u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:yield this.fetchJwk(s.kid,i?.keys?{keys:i.keys}:i?.jwks);if(!u){let{error:p}=yield this.getUser(o);if(p)throw p;return{data:{claims:a,header:s,signature:l},error:null}}let m=Sf(s.alg),f=yield crypto.subtle.importKey("jwk",u,m,!0,["verify"]);if(!(yield crypto.subtle.verify(m,f,l,gf(`${c}.${d}
44`))))throw new fi("Invalid JWT signature");return{data:{claims:a,header:s,signature:l},error:null}}catch(o){if(k(o))return this._returnResult({data:null,error:o});throw o}})}}return n.nextInstanceID={},n})(),ic=I_;var A_=ic,nc=A_;var xs=class extends nc{constructor(t){super(t)}};var Es=class{constructor(t,e,i){var r,o,s;this.supabaseUrl=t,this.supabaseKey=e;let a=rf(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);let l=`sb-${a.hostname.split(".")[0]}-auth-token`,c={db:Xh,realtime:ef,auth:Object.assign(Object.assign({},Qh),{storageKey:l}),global:Jh},d=nf(i??{},c);this.storageKey=(r=d.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(o=d.global.headers)!==null&&o!==void 0?o:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(u,m)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(m)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=d.auth)!==null&&s!==void 0?s:{},this.headers,d.global.fetch),this.fetch=tf(e,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.accessToken&&this.accessToken().then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new Mh(new URL("rest/v1",a).href,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),this.storage=new xr(this.storageUrl.href,this.headers,this.fetch,i?.storage),d.accessToken||this._listenForAuthEvents()}get functions(){return new ur(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},i={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,i)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){return h(this,null,function*(){var t,e;if(this.accessToken)return yield this.accessToken();let{data:i}=yield this.auth.getSession();return(e=(t=i.session)===null||t===void 0?void 0:t.access_token)!==null&&e!==void 0?e:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:r,userStorage:o,storageKey:s,flowType:a,lock:l,debug:c,throwOnError:d},u,m){let f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new xs({url:this.authUrl.href,headers:Object.assign(Object.assign({},f),u),storageKey:s,autoRefreshToken:t,persistSession:e,detectSessionInUrl:i,storage:r,userStorage:o,flowType:a,lock:l,debug:c,throwOnError:d,fetch:m,hasCustomAuthorizationHeader:Object.keys(this.headers).some(g=>g.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new br(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,i)=>{this._handleTokenChanged(e,"CLIENT",i?.access_token)})}_handleTokenChanged(t,e,i){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==i?(this.changedAccessToken=i,this.realtime.setAuth(i)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};var zf=(n,t,e)=>new Es(n,t,e);function R_(){if(typeof window<"u"||typeof process>"u")return!1;let n=process.version;if(n==null)return!1;let t=n.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}R_()&&console.warn("\u26A0\uFE0F Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");var k_="https://wlzjjwoawqfixjqwdrfc.supabase.co";var O_="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Indsempqd29hd3FmaXhqcXdkcmZjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ1MDY1NjUsImV4cCI6MjA4MDA4MjU2NX0.zMJlHWJ1XZ1hfr_7FaDHaboF1FrOJgM_9Rbg3e6OR1I",st=zf(k_,O_,{auth:{persistSession:!1,detectSessionInUrl:!1}});function D_(n,t){if(n&1){let e=tt();A(0,"div",11),F("click",function(){let r=se(e).index,o=de();return ae(o.openLightbox(r))}),Y(1,"img",12),R()}if(n&2){let e=t.$implicit,i=t.index;ie(),ce("src",e.url,et)("alt","Gallery Image "+(i+1))}}function T_(n,t){if(n&1){let e=tt();A(0,"div",13),F("click",function(){se(e);let r=de();return ae(r.closeLightbox())}),A(1,"div",14),F("click",function(r){return se(e),ae(r.stopPropagation())}),A(2,"button",15),F("click",function(){se(e);let r=de();return ae(r.closeLightbox())}),j(3,"\xD7"),R(),A(4,"button",16),F("click",function(){se(e);let r=de();return ae(r.prevLightboxImage())}),j(5,"\u276E"),R(),Y(6,"img",12),A(7,"button",17),F("click",function(){se(e);let r=de();return ae(r.nextLightboxImage())}),j(8,"\u276F"),R(),A(9,"div",18),j(10),R()()()}if(n&2){let e=de();ie(6),ce("src",e.images[e.currentLightboxImage],et)("alt","Gallery Image "+(e.currentLightboxImage+1)),ie(4),Qr("",e.currentLightboxImage+1," / ",e.images.length,"")}}var $f=(()=>{class n{constructor(e,i){this.router=e,this.elementRef=i,this.images=[{name:"logo1.jpg",url:"assets/img/logo1.jpg"},{name:"unnamed (14).jpg",url:"assets/img/unnamed (14).jpg"}],this.currentImage=0,this.lightboxOpen=!1,this.currentLightboxImage=0}ngOnInit(){this.loadAllImages(),console.log("second component load all images called")}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor=""}loadAllImages(){return h(this,null,function*(){try{let{data:e,error:i}=yield st.storage.from("images").list("",{limit:1e3,offset:0});if(i){console.error("Failed to list images:",i);return}if(!e){console.error("No files returned.");return}this.images=e.filter(r=>!r.name.endsWith("/")).map(r=>{let{data:o}=st.storage.from("images").getPublicUrl(r.name);return{name:r.name,url:o.publicUrl}}),console.log("Loaded images:",this.images)}catch(e){console.error("Error loading images:",e)}})}goHome(){console.log("home"),this.router.navigate(["/home"])}goLogin(){console.log("login"),this.router.navigate(["/login"])}prevImage(){this.currentImage=(this.currentImage-1+this.images.length)%this.images.length}nextImage(){this.currentImage=(this.currentImage+1)%this.images.length}openLightbox(e){this.currentLightboxImage=e,this.lightboxOpen=!0,document.body.style.overflow="hidden"}closeLightbox(){this.lightboxOpen=!1,document.body.style.overflow="auto"}prevLightboxImage(){this.currentLightboxImage=(this.currentLightboxImage-1+this.images.length)%this.images.length}nextLightboxImage(){this.currentLightboxImage=(this.currentLightboxImage+1)%this.images.length}static{this.\u0275fac=function(i){return new(i||n)(w(me),w(H))}}static{this.\u0275cmp=te({type:n,selectors:[["app-second"]],decls:16,vars:2,consts:[["lang","en"],["charset","UTF-8"],["name","viewport","content","width=device-width, initial-scale=1.0"],[1,"gallery-container"],[1,"gallery-header"],[1,"home-button",3,"click"],[1,"gallery-grid"],["class","gallery-item",3,"click",4,"ngFor","ngForOf"],["class","lightbox-overlay",3,"click",4,"ngIf"],[1,"secretish-button"],["src","assets/img/logo1.jpg","alt","secret",1,"secret-button-image",3,"click"],[1,"gallery-item",3,"click"],[3,"src","alt"],[1,"lightbox-overlay",3,"click"],[1,"lightbox-content",3,"click"],[1,"lightbox-close",3,"click"],[1,"lightbox-arrow","lightbox-prev",3,"click"],[1,"lightbox-arrow","lightbox-next",3,"click"],[1,"lightbox-counter"]],template:function(i,r){i&1&&(A(0,"html",0)(1,"head"),Y(2,"meta",1)(3,"meta",2),A(4,"title"),j(5,"Gallery"),R()(),A(6,"body")(7,"div",3)(8,"div",4)(9,"button",5),F("click",function(){return r.goHome()}),j(10,"Home"),R()(),A(11,"div",6),Ee(12,D_,2,2,"div",7),R(),Ee(13,T_,11,4,"div",8),R(),A(14,"div",9)(15,"img",10),F("click",function(){return r.goLogin()}),R()()()()),i&2&&(ie(12),ce("ngForOf",r.images),ie(),ce("ngIf",r.lightboxOpen))},dependencies:[so,Vi],styles:[`html{margin:0;padding:0;height:100%;background-color:#e6b3e6}.gallery-container{background-color:#e6b3e6;color:#fff;text-align:center;min-height:100vh;padding:20px;box-sizing:border-box}.gallery-header{margin-bottom:30px}.home-button{background-color:#e6b3e6;color:#700;text-align:center;padding:10px 90px;border-radius:5px;border:none;font-size:3em;cursor:pointer}.home-button:hover{color:#e0189e}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;max-width:1200px;margin:0 auto;padding:0 20px}.gallery-item{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;cursor:pointer;transition:transform .3s ease,box-shadow .3s ease;background-color:#ffffff1a}.gallery-item:hover{transform:scale(1.05);box-shadow:0 8px 25px #0000004d}.gallery-item img{width:100%;height:100%;object-fit:cover;object-position:center;transition:opacity .3s ease}.gallery-item:hover img{opacity:.9}.lightbox-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000000e6;display:flex;justify-content:center;align-items:center;z-index:1000;cursor:pointer}.lightbox-content{position:relative;max-width:90vw;max-height:90vh;cursor:default}.lightbox-content img{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px}.lightbox-close{position:absolute;top:-40px;right:0;background:none;border:none;color:#fff;font-size:40px;cursor:pointer;z-index:1001;line-height:1;padding:0;width:40px;height:40px}.lightbox-close:hover{color:#ccc}.lightbox-arrow{position:absolute;top:50%;transform:translateY(-50%);background:#000000b3;border:none;color:#fff;font-size:30px;padding:15px 20px;cursor:pointer;border-radius:5px;transition:background-color .3s ease;z-index:1001}.lightbox-arrow:hover{background:#000000e6}.lightbox-prev{left:-80px}.lightbox-next{right:-80px}.lightbox-counter{position:absolute;bottom:-40px;left:50%;transform:translate(-50%);color:#fff;font-size:16px;background:#000000b3;padding:5px 15px;border-radius:20px}.secretish-button{position:fixed;bottom:.5em;right:.5em;z-index:100}.secret-button-image{width:2em;height:auto;cursor:pointer;opacity:.25;transition:opacity .2s ease}@media (max-width: 768px){.secretish-button{bottom:.5em;right:.5em}.secret-button-image{width:1.5em}.gallery-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:15px;padding:0 10px}.home-button{font-size:2em;padding:8px 60px}.lightbox-prev{left:10px}.lightbox-next{right:10px}.lightbox-arrow{font-size:24px;padding:10px 15px}.lightbox-close{top:10px;right:10px;font-size:30px}.lightbox-counter{bottom:10px;font-size:14px}} 45`,`
46 /* Set the pink fairy cursor globally for all elements */ 47 HTML, BODY { 48 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/fairypink3.ani"), 49 url("https://downloads.totallyfreecursors.com/thumbnails/fairypink3.gif"), auto; 50 } 51 52 /* Ensure buttons and other interactive elements also have the custom cursor when hovered */ 53 button, a { 54 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/fairypink3.ani"), 55 url("https://downloads.totallyfreecursors.com/thumbnails/fairypink3.gif"), auto; 56 } 57 `],encapsulation:2})}}return n})();var M_=(n,t)=>({top:n,left:t});function P_(n,t){if(n&1&&Y(0,"a",33),n&2){let e=de();ce("href",e.youtubeAppUrl,et)}}var rc=(()=>{class n{constructor(e,i,r,o){this.router=e,this.elementRef=i,this.http=r,this.sanitizer=o,this.language="en",this.gifPosition={x:0,y:0},this.min_image_distance=5,this.smoothing_value=.04,this.cursorPosition={x:0,y:0},this.imageSrc="assets/img/sadheart.png",this.happy_heart_distance=100,this.isScrolled=!1,this.latest_vid_id=null,this.apiKey="AIzaSyCjl0sbUvHxIu-knW8y1TVMxa-OD6bp3Mg",this.channelId="UCTuJgiePkL7vmi1W8J00Jfg",this.tempish_vid_id="BAp5qps9vGI?si=5JNotkQNbyfZJ5Tk;",this.isMobile=!1,this.youtubeAppUrl=""}ngOnInit(){this.intervalId=setInterval(()=>this.updateGifPosition(),16),console.log("Version 4.8.1 on gh branch: ep1 -> dev ->..."),console.log("Note: this branch was deployed with ghpages branch (or something directly modified with it)."),console.log("The steps are to make a local branch, run ng deploy -- base-href=quote/quote, that creates ghpages branch,"),console.log("then modify ghpages branch to manually make index.html href = /, then deploy that on the ui with gh pages."),console.log("initial latest_vid_id:",this.latest_vid_id),this.zfetchLatestVideo(),console.log("fetched latest_vid_id:",this.latest_vid_id),this.videoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(`https://www.youtube.com/embed/${this.tempish_vid_id}`),this.isMobile=/iphone|ipad|ipod|android/i.test(navigator.userAgent),this.youtubeAppUrl=`youtube://${this.tempish_vid_id}`}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId)}zfetchLatestVideo(){console.log("ai slop for youtube api w error handling");let e=`https://www.googleapis.com/youtube/v3/channels?part=contentDetails&id=${this.channelId}&key=${this.apiKey}`;this.http.get(e).subscribe({next:i=>{if(console.log("\u{1F50D} Channel API raw response:",i),!i.items||i.items.length===0){console.error("No items returned \u2014 YouTube API error?");return}let o=`https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=${i.items[0].contentDetails.relatedPlaylists.uploads}&maxResults=1&key=${this.apiKey}`;this.http.get(o).subscribe({next:s=>{if(console.log("\u{1F3AC} Playlist API raw response:",s),!s.items||s.items.length===0){console.error("Playlist returned no videos");return}this.latest_vid_id=s.items[0].snippet.resourceId.videoId,console.log("Latest vid id:",this.latest_vid_id),this.tempish_vid_id=s.items[0].snippet.resourceId.videoId,this.youtubeAppUrl=`youtube://${this.tempish_vid_id}`,this.videoUrl=this.sanitizer.bypassSecurityTrustResourceUrl(`https://www.youtube.com/embed/${this.tempish_vid_id}`)},error:s=>console.error("Playlist API error:",s)})},error:i=>console.error("Channel API error:",i.error||i)})}upload_image(){console.log("upload_image")}onMouseMove(e){this.cursorPosition.x=e.clientX+window.scrollX,this.cursorPosition.y=e.clientY+window.scrollY}onWindowScroll(){this.isScrolled=window.scrollY>50}updateGifPosition(){let e=this.cursorPosition.x-this.gifPosition.x,i=this.cursorPosition.y-this.gifPosition.y,r=Math.sqrt(e*e+i*i);r>this.min_image_distance&&(this.gifPosition.x+=e*this.smoothing_value,this.gifPosition.y+=i*this.smoothing_value),r<this.happy_heart_distance?this.imageSrc="assets/img/heart.png":this.imageSrc="assets/img/sadheart.png"}second(){console.log("gallery1"),console.log("yuh yeet"),this.router.navigate(["/second"])}shop(){window.open("https://bedrumor.bandcamp.com/merch","_blank")}guestbook_function(){window.open("https://bedrumor.atabook.org/","_blank")}game(){console.log("game"),window.open("https://poki.com/en/g/the-impossible-quiz-2","_blank")}openYouTubeLink(e,i){this.isMobile&&(i.preventDefault(),window.location.href=`youtube://${e}`)}toggleLangugae(){console.log("toggleLangugae"),this.language==="en"?this.language="sp":this.language="en"}static{this.\u0275fac=function(i){return new(i||n)(w(me),w(H),w(va),w(ka))}}static{this.\u0275cmp=te({type:n,selectors:[["app-home"]],hostBindings:function(i,r){i&1&&F("mousemove",function(s){return r.onMouseMove(s)})("scroll",function(s){return r.onWindowScroll(s)},!1,gd)},decls:54,vars:10,consts:[["lang","en"],["charset","UTF-8"],["name","viewport","content","width=device-width, initial-scale=1.0"],[3,"mousemove"],[1,"curs
57or-follow-gif",3,"src","ngStyle"],[1,"page-container"],[1,"sticky-header"],[1,"menu-button","rainbow_text_animated_menu",3,"click"],[1,"album-container"],[1,"album-title"],[1,"album-wrapper"],["href","https://bedrumor.bandcamp.com/album/almost-normal-ep","target","_blank"],["src","assets/img/almostnormal.PNG","alt","New EP Album Cover",1,"album-image"],[1,"album-links"],["href","https://open.spotify.com/album/6TjhZBF4MKIPszmD0mzbf0?si=JGSoxNo8QBeSNjK--Wkq9w","target","_blank"],["href","https://music.apple.com/us/album/almost-normal-ep/1860430937","target","_blank"],["target","_blank",3,"click","href"],[1,"title-video-container"],[1,"title-section"],["src","assets/img/teal-butterfly.gif","alt","Logo",1,"teal-btrfly"],[1,"video-container"],[1,"mother-hands-title"],[1,"video-wrapper"],["title","YouTube video player","frameborder","0","allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture","allowfullscreen","",3,"src"],["class","mobile-youtube-overlay",3,"href",4,"ngIf"],[1,"divider-butterfly"],["src","assets/img/butterfly-div.gif","alt","Logo",1,"butterfly-div"],[1,"socials-container"],[1,"rainbow_text_animated"],[1,"socials-links"],["href","https://www.instagram.com/bedrumor/","target","_blank"],["href","https://open.spotify.com/artist/7xQaQxlrXaBtgGcq4rsrHI?si=80NQobWpQXOEyWKPkfhArw","target","_blank"],["href","https://music.apple.com/us/artist/bedrumor/1779628604","target","_blank"],[1,"mobile-youtube-overlay",3,"href"]],template:function(i,r){i&1&&(A(0,"html",0)(1,"head"),Y(2,"meta",1)(3,"meta",2),A(4,"title"),j(5,"Bedrumor"),R()(),A(6,"body",3),F("mousemove",function(s){return r.onMouseMove(s)}),Y(7,"img",4),A(8,"div",5)(9,"header",6)(10,"button",7),F("click",function(){return r.shop()}),j(11,"merch"),R(),A(12,"button",7),F("click",function(){return r.second()}),j(13,"gallery"),R(),A(14,"button",7),F("click",function(){return r.game()}),j(15,"game"),R(),A(16,"button",7),F("click",function(){return r.guestbook_function()}),j(17,"guestbook"),R()(),A(18,"div",8)(19,"div",9),j(20,"check out our new ep!"),R(),A(21,"div",9),j(22,"almost normal"),R(),A(23,"div",10)(24,"a",11),Y(25,"img",12),R()(),A(26,"div",13)(27,"a",14),j(28,"spotify"),R(),A(29,"a",15),j(30,"apple music"),R(),A(31,"a",16),F("click",function(s){return r.openYouTubeLink("duJyQX8hQm8",s)}),j(32,"youtube"),R()()(),A(33,"div",17)(34,"div",18),Y(35,"img",19),R(),A(36,"div",20)(37,"div",21),j(38,"latest video"),R(),A(39,"div",22),Y(40,"iframe",23),Ee(41,P_,1,1,"a",24),R()()(),A(42,"div",25),Y(43,"img",26),R(),A(44,"div",27)(45,"h1",28),j(46,"check out our socials"),R(),A(47,"div",29)(48,"a",30),j(49,"instagram"),R(),A(50,"a",31),j(51,"spotify"),R(),A(52,"a",32),j(53,"apple music"),R()()()()()()),i&2&&(ie(7),ce("src",r.imageSrc,et)("ngStyle",Ed(7,M_,r.gifPosition.y+"px",r.gifPosition.x+"px")),ie(2),Ie("scrolled",r.isScrolled),ie(22),ce("href",r.isMobile?"javascript:void(0)":"https://www.youtube.com/watch?v=duJyQX8hQm8",et),ie(9),ce("src",r.videoUrl,md),ie(),ce("ngIf",r.isMobile))},dependencies:[Vi,Pd],styles:["*[_ngcontent-%COMP%]{margin:0;padding:0;box-sizing:border-box}body[_ngcontent-%COMP%], html[_ngcontent-%COMP%]{font-family:Times New Roman,serif;overflow-x:hidden;max-width:100vw}.sticky-header[_ngcontent-%COMP%]{position:fixed;top:0;left:-2vw;width:104vw;height:10vh;color:#fff;display:flex;justify-content:center;z-index:5;transition:background-color .3s ease,backdrop-filter .3s ease}.sticky-header.scrolled[_ngcontent-%COMP%]{background:#000c;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.menu-button[_ngcontent-%COMP%]{background:none;border:none;font-size:2rem;color:#fff;margin:0;padding:0;line-height:1;display:inline-block}.menu-button[_ngcontent-%COMP%]:hover{color:#e0189e}.page-container[_ngcontent-%COMP%]{background:none;max-width:100vw;overflow-x:hidden;padding-top:12vh}.title-video-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;margin:5vh auto;width:90%;gap:4vh;position:relative}.title-section[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%}.title[_ngcontent-%COMP%]{font-size:6rem;font-weight:700;color:#793773;margin-right:32%}.teal-btrfly[_ngcontent-%COMP%]{width:60vw;height:auto;max-width:500px}.video-container[_ngcontent-%COMP%]{width:90%;max-width:800px}.video-container[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:450px;display:block;margin:0 auto}.mother-hands-title[_ngcontent-%COMP%]{text-align:center;padding:0;margin-bottom:4vh;font-size:4rem;font-weight:lighter;color:#793773}.about-title[_ngcontent-%COMP%]{text-align:right;padding-right:24%;padding-top:.625vh;font-size:2rem;font-weight:lighter;color:#793773}.bio-text[_ngcontent-%COMP%]{width:100%}.bio-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:53%;float:right;border:#dd99da;border-style:groove;border-width:1.25vw;border-radius:.625vw;padding:.5vw}.divider-butterfly[_ngcontent-%COMP%]{text-align:center;margin:5vh auto;padding:0}.butterfly-div[_ngcontent-%COMP%]{width:50vw;height:auto;max-width:400px}.album-container[_ngcontent-%COMP%]{width:90%;max-width:800px;margin:5vh auto;text-align:center}.album-title[_ngcontent-%COMP%]{text-align:center;padding:0;margin-bottom:4vh;font-size:4rem;font-weight:lighter;color:#793773}.album-wrapper[_ngcontent-%COMP%]{position:relative;width:100%;display:flex;justify-content:center;margin-bottom:2vh}.album-image[_ngcontent-%COMP%]{width:100%;height:auto;max-height:450px;display:block;margin:0 auto;object-fit:contain;cursor:pointer}.album-links[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:3vw;margin-top:3vh}.album-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#85c1e9;text-decoration:none;margin:0;font-size:2rem}.album-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.socials-container[_ngcontent-%COMP%]{text-align:center;margin:5vh auto;padding:0}
57.socials-links[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:3vw}.socials-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#85c1e9;text-decoration:none;margin:0;font-size:2rem}.socials-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.upcoming-events-container[_ngcontent-%COMP%]{text-align:center;margin:5vh auto;padding:0}.calendar[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:80vw;height:60vh;max-width:800px}.cursor-follow-gif[_ngcontent-%COMP%]{position:absolute;pointer-events:none;width:3.5vw;height:3.5vw;transition:top .1s,left .1s}.rainbow[_ngcontent-%COMP%]{text-align:center;text-decoration:underline;font-size:32px;font-family:monospace;letter-spacing:5px}.rainbow_text_animated[_ngcontent-%COMP%]{background:linear-gradient(to right,#66f,#09f,#0f0,#f39,#66f);-webkit-background-clip:text;background-clip:text;color:transparent;animation:_ngcontent-%COMP%_rainbow_animation 6s ease-in-out infinite;background-size:400% 100%}.rainbow_text_animated_menu[_ngcontent-%COMP%]{background:linear-gradient(to right,#66f,#09f,#0f0,#f39,#66f);-webkit-background-clip:text;background-clip:text;color:transparent;animation:_ngcontent-%COMP%_rainbow_animation 6s ease-in-out infinite;background-size:400% 100%;font-size:4rem;margin:0 4.5vw;padding:0;line-height:.0001}@keyframes _ngcontent-%COMP%_rainbow_animation{0%,to{background-position:0 0}50%{background-position:100% 0}}.video-wrapper[_ngcontent-%COMP%]{position:relative}.mobile-youtube-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:block;z-index:999;cursor:pointer}@media (max-width: 768px){.sticky-header[_ngcontent-%COMP%]{left:0;width:100vw;height:auto;min-height:8vh;padding:1.5vh 2vw;flex-wrap:wrap;justify-content:center;align-items:center;gap:1vh 3vw}.menu-button[_ngcontent-%COMP%]{font-size:1rem;padding:.5vh 1vw;white-space:nowrap}.rainbow_text_animated_menu[_ngcontent-%COMP%]{font-size:1.25rem;margin:0;line-height:1.2}.page-container[_ngcontent-%COMP%]{background:none;padding-top:12vh}.title-video-container[_ngcontent-%COMP%]{flex-direction:column;align-items:center;text-align:center;width:95%;margin:5vh auto;gap:3vh;min-height:auto}.title-section[_ngcontent-%COMP%]{flex-direction:column;align-items:center;width:100%}.title[_ngcontent-%COMP%]{font-size:2.5rem;margin-right:0;margin-bottom:2vh;text-align:center}.teal-btrfly[_ngcontent-%COMP%]{width:80vw;height:auto;max-width:350px}.bio-text[_ngcontent-%COMP%]{width:100%;order:2}.about-title[_ngcontent-%COMP%]{text-align:center;padding-right:0;font-size:1.5rem;margin-bottom:2vh}.bio-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{width:90%;float:none;margin:0 auto;border-width:.5vh;border-radius:1vh;padding:4vw;text-align:left;font-size:1rem}.video-container[_ngcontent-%COMP%]{width:95%;order:3}.mother-hands-title[_ngcontent-%COMP%]{text-align:center;padding-right:0;font-size:1.5rem;margin-bottom:2vh}.video-container[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:100%;height:56.25vw;max-height:350px;display:block;margin:0 auto}.divider-butterfly[_ngcontent-%COMP%]{text-align:center;padding-right:0;margin:4vh auto}.butterfly-div[_ngcontent-%COMP%]{width:70vw;height:auto;max-width:250px}.album-container[_ngcontent-%COMP%]{width:95%;margin:4vh auto}.album-title[_ngcontent-%COMP%]{text-align:center;padding-right:0;font-size:1.5rem;margin-bottom:2vh}.album-wrapper[_ngcontent-%COMP%]{width:100%}.album-image[_ngcontent-%COMP%]{width:100%;height:auto;max-height:350px;display:block;margin:0 auto}.album-links[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:3vw;margin-top:2vh;flex-wrap:wrap}.album-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:block;margin:0;font-size:1.2rem}.socials-container[_ngcontent-%COMP%]{text-align:center;padding-right:0;margin:4vh auto}.socials-links[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:3vw;flex-wrap:wrap}.socials-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:block;margin:0;font-size:1.5rem}.upcoming-events-container[_ngcontent-%COMP%]{text-align:center;padding-left:0;margin:5vh auto;width:95%}
57.calendar[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{width:90vw;height:50vh;max-width:100%}.cursor-follow-gif[_ngcontent-%COMP%]{width:10vw;height:10vw;max-width:50px;max-height:50px}.rainbow_text_animated[_ngcontent-%COMP%]{font-size:1.5rem;letter-spacing:2px}}",` 58 59 HTML[_ngcontent-%COMP%], BODY[_ngcontent-%COMP%] { 60 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/guitarpink.ani"), 61 url("https://downloads.totallyfreecursors.com/thumbnails/guitarpink.gif"), auto; 62 } 63 64 65 66 .cursor-follow-gif[_ngcontent-%COMP%] { 67 position: absolute; 68 pointer-events: none; 69 width: 3.5vw; 70 height: 3.5vw; 71 } 72 73 74 75 button[_ngcontent-%COMP%], a[_ngcontent-%COMP%] { 76 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/guitarpink.ani"), 77 url("https://downloads.totallyfreecursors.com/thumbnails/guitarpink.gif"), auto; 78 }`,` 79 80 .video-wrapper[_ngcontent-%COMP%] { 81 position: relative; 82 } 83 84 .mobile-youtube-overlay[_ngcontent-%COMP%] { 85 position: absolute; 86 top: 0; 87 bottom: 0; 88 left: 0; 89 right: 0; 90 display: block; 91 z-index: 999; 92 }`]})}}return n})();var Hf=(()=>{class n{constructor(e){this.router=e}goHome(){console.log("home"),this.router.navigate(["/home"])}static{this.\u0275fac=function(i){return new(i||n)(w(me))}}static{this.\u0275cmp=te({type:n,selectors:[["app-shop"]],decls:4,vars:0,consts:[[1,"home-button",3,"click"]],template:function(i,r){i&1&&(A(0,"p"),j(1,"shop works!"),R(),A(2,"button",0),F("click",function(){return r.goHome()}),j(3,"Home"),R())}})}}return n})();var Wf=(()=>{class n{constructor(e){this.router=e,this.isJumping=!1,this.gameRunning=!1,this.gameOver=!1}goHome(){console.log("home"),this.router.navigate(["/home"])}startGame(){this.gameRunning=!0,this.gameOver=!1,this.obstacleInterval=setInterval(()=>{this.checkCollision()},10)}jump(){this.isJumping||(this.isJumping=!0,setTimeout(()=>{this.isJumping=!1},500))}checkCollision(){let e=document.querySelector(".dino"),i=document.querySelector(".obstacle"),r=e.getBoundingClientRect(),o=i.getBoundingClientRect();r.left<o.left+o.width&&r.left+r.width>o.left&&r.top<o.top+o.height&&r.height+r.top>o.top&&this.endGame()}endGame(){this.gameRunning=!1,this.gameOver=!0,clearInterval(this.obstacleInterval)}resetGame(){this.startGame()}static{this.\u0275fac=function(i){return new(i||n)(w(me))}}static{this.\u0275cmp=te({type:n,selectors:[["app-game"]],decls:13,vars:0,consts:[["lang","en"],["charset","UTF-8"],["name","viewport","content","width=device-width, initial-scale=1.0"],[1,"home-button",3,"click"],[1,"scratch-game-container"],["src",pd`https://scratch.mit.edu/projects/51462212/embed`,"width","100%","height","100%"]],template:function(i,r){i&1&&(A(0,"html",0)(1,"head"),Y(2,"meta",1)(3,"meta",2),A(4,"title"),j(5,"CONNECT LAZ TO RYAN"),R()(),A(6,"body")(7,"h1"),j(8,"CONNECT LAZ TO RYAN"),R(),A(9,"button",3),F("click",function(){return r.goHome()}),j(10,"Home"),R(),A(11,"div",4),Y(12,"iframe",5),R()()())},styles:[".game-container[_ngcontent-%COMP%]{position:relative;width:100%;max-width:600px;height:200px;background-color:#f7f7f7;border:2px solid #333;overflow:hidden;margin:20px auto}.scratch-game-container[_ngcontent-%COMP%]{position:absolute;width:90%;max-width:90%;height:70%;background-color:#f7f7f7;border:2px solid #333;overflow:hidden;margin:20px auto}.dino[_ngcontent-%COMP%]{position:absolute;bottom:0;width:40px;height:40px;background-color:green;transition:bottom .1s ease}.jump[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_jump .5s ease}@keyframes _ngcontent-%COMP%_jump{0%{bottom:0}50%{bottom:80px}to{bottom:0}}.obstacle[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0;width:20px;height:40px;background-color:red;animation:_ngcontent-%COMP%_obstacleMove 2s linear infinite}@keyframes _ngcontent-%COMP%_obstacleMove{0%{right:0}to{right:100%}}",` 93 94 HTML[_ngcontent-%COMP%], BODY[_ngcontent-%COMP%] { 95 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/iloveryan.ani"), 96 url("https://downloads.totallyfreecursors.com/thumbnails/iloveryan.gif"), auto; 97 } 98 99 100 101 button[_ngcontent-%COMP%], a[_ngcontent-%COMP%] { 102 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/iloveryan.ani"), 103 url("https://downloads.totallyfreecursors.com/thumbnails/iloveryan.gif"), auto; 104 }`]})}}return n})();function kr(n){return n!=null&&`${n}`!="false"}function fn(n,t=0){return F_(n)?Number(n):arguments.length===2?t:0}function F_(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function mn(n){return Array.isArray(n)?n:[n]}function oe(n){return n==null?"":typeof n=="string"?n:`${n}px`}function We(n){return n instanceof H?n.nativeElement:n}var sc;try{sc=typeof Intl<"u"&&Intl.v8BreakIterator}catch{sc=!1}var Q=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?Nd(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(m
104sie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||sc)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(i){return new(i||n)(v(ut))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var pn,qf=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function ac(){if(pn)return pn;if(typeof document!="object"||!document)return pn=new Set(qf),pn;let n=document.createElement("input");return pn=new Set(qf.filter(t=>(n.setAttribute("type",t),n.type===t))),pn}var Or;function N_(){if(Or==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Or=!0}))}finally{Or=Or||!1}return Or}function Bt(n){return N_()?n:!!n.capture}var wi;function Gf(){if(wi==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return wi=!1,wi;if("scrollBehavior"in document.documentElement.style)wi=!0;else{let n=Element.prototype.scrollTo;n?wi=!/\{\s*\[native code\]\s*\}/.test(n.toString()):wi=!1}}return wi}var oc;function j_(){if(oc==null){let n=typeof document<"u"?document.head:null;oc=!!(n&&(n.createShadowRoot||n.attachShadow))}return oc}function Kf(n){if(j_()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function Dr(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){let t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function qe(n){return n.composedPath?n.composedPath()[0]:n.target}function Tr(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var L_=new O("cdk-dir-doc",{providedIn:"root",factory:V_});function V_(){return x(N)}var U_=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function B_(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?U_.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Mr=(()=>{class n{constructor(e){if(this.value="ltr",this.change=new le,e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.value=B_(i||r||"ltr")}}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(i){return new(i||n)(v(L_,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var $t=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})();var $_=20,Zf=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new z,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=$_){return this._platform.isBrowser?new Kt(i=>{this._globalSubscription||this._addGlobalListener();let r=e>0?this._scrolled.pipe(Xs(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):D()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(he(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];
104return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=We(i),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let e=this._getWindow();return Js(e.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(i){return new(i||n)(v(P),v(Q),v(N,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var H_=20,lc=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new z,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),s=-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(e=H_){return e>0?this._change.pipe(Xs(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(i){return new(i||n)(v(Q),v(P),v(N,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Yf=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})(),cc=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[$t,Yf,$t,Yf]})}}return n})();var Pr=class{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},gn=class extends Pr{constructor(t,e,i,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}},bn=class extends Pr{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},dc=class extends Pr{constructor(t){super(),this.element=t instanceof H?t.nativeElement:t}},vn=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof gn)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof bn)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof dc)return this._attachedPortal=t,this.attachDomPortal(t)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}
104_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var Cs=class extends vn{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(t){let i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),r;return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||fe.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);r!==-1&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var Fr=(()=>{class n extends vn{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new le,this.attachDomPortal=o=>{this._document;let s=o.element;s.parentNode;let a=this._document.createComment("dom-portal");o.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=o,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=i.createComponent(o,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static{this.\u0275fac=function(i){return new(i||n)(w(Zr),w(Ni),w(N))}}static{this.\u0275dir=J({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[xe]})}}return n})();var xi=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})();function Ss(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}var Jf=Gf(),uc=class{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=oe(-this._previousScrollPosition.left),t.style.top=oe(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,i=t.style,r=e.style,o=i.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),Jf&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Jf&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}};var hc=class{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler
104=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(he(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Is=class{enable(){}disable(){}attach(){}};function fc(n,t){return t.some(e=>{let i=n.bottom<e.top,r=n.top>e.bottom,o=n.right<e.left,s=n.left>e.right;return i||r||o||s})}function Xf(n,t){return t.some(e=>{let i=n.top<e.top,r=n.bottom>e.bottom,o=n.left<e.left,s=n.right>e.right;return i||r||o||s})}var mc=class{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();fc(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},q_=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new Is,this.close=s=>new hc(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new uc(this._viewportRuler,this._document),this.reposition=s=>new mc(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}static{this.\u0275fac=function(i){return new(i||n)(v(Zf),v(lc),v(P),v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Nr=class{constructor(t){if(this.scrollStrategy=new Is,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){let e=Object.keys(t);for(let i of e)t[i]!==void 0&&(this[i]=t[i])}}};var pc=class{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var rm=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(i){return new(i||n)(v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),G_=(()=>{class n extends rm{constructor(e,i){super(e),this._ngZone=i,this._key
104downListener=r=>{let o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){let a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(i){return new(i||n)(v(N),v(P,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),K_=(()=>{class n extends rm{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=qe(o)},this._clickListener=o=>{let s=qe(o),a=o.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(Qf(d.overlayElement,s)||Qf(d.overlayElement,a))break;let u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(e){if(super.add(e),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(i){return new(i||n)(v(N),v(Q),v(P,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Qf(n,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,i=t;for(;i;){if(i===n)return!0;i=e&&i instanceof ShadowRoot?i.host:i.parentNode}return!1}var _n=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||Tr()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let i=this._document.createElement("div");i.classList.add(e),Tr()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}static{this.\u0275fac=function(i){return new(i||n)(v(N),v(Q))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Et=class{constructor(t,e,i,r,o,s,a,l,c,d=!1,u){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._injector=u,this._backdropElement=null,this._backdropClick=new z,this._attachments=new z,this._detachments=new z,this._locationChanges=Gt.EMPTY,this._backdropClickHandler=m=>this._backdropClick.next(m),this._backdropTransitionendHandler=m=>{this._disposeBackdrop(m.target)},this._keydownEvents=new z,this._outsidePointerEvents=new z,this._renders=new z,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=Ze(()=>la(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=Rt(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dis
104pose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=_(_({},this._config),t),this._updateElementSize()}setDirection(t){this._config=W(_({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=oe(this._config.width),t.height=oe(this._config.height),t.minWidth=oe(this._config.minWidth),t.minHeight=oe(this._config.minHeight),t.maxWidth=oe(this._config.maxWidth),t.maxHeight=oe(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){if(this._animationsDisabled){this._disposeBackdrop(t);return}t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){let r=mn(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe(ct(Kr(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},em="cdk-overlay-connected-position-bounding-box",Y_=/([A-Za-z%]+)$/,gc=class{get positions(){return this._preferredPositions}
vendor: 10,801 bytes, line 104
104constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new z,this._resizeSubscription=Gt.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(em),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,i,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,i)){o.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:e})}if(o.length){let a=null,l=-1;for(let c of o){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Ei(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(em),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r;if(i.originX=="center")r=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r=i.originX=="start"?s:a}e.left<0&&(r-=e.left);let o;return i.originY=="center"?o=t.top+t.height/2:o=i.originY=="top"?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r;i.overlayX=="center"?r=-e.width/2:i.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let o;return i.overlayY=="center"?o=-e.height/2:o=i.overlayY=="top"?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){let o=im(e),{x:s,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-i.width,m=0-a,f=a+o.height-i.height,g=this._subtractOverflows(o.width,d,u),p=this._subtractOverflows(o.height,m,f),b=g*p;return{visibleArea:b,isCompletelyWithinViewport:o.width*o.height===b,fitsInViewportVertically:p===o.height,fitsInViewportHorizontally:g==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let r=i.bottom-e.y,o=i.right-e.x,s=tm(this._overlayRef.getConfig().minHeight),a=tm(this._overlayRef.getConfig().minWidth),l=t.fitsInViewportVertically||s!=null&&s<=r,c=t.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=im(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),l=Math.max(o.top-i.top-t.y,0),c=Math.max(o.left-i.left-t.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=t.x<this._viewportMargin?o.left-i.left-t.x:0,r.height<=o.height?u=l||-a:u=t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:d,y:u},{x:t.x+d,y:t.y+u}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._positionChanges.observers.length){let i=this._getScrollVisibility();if(t!==this._lastPosition||!this._lastScrollVisibility||!Z_(this._lastScrollVisibility,i)){let r=new pc(t,i);this._positionChanges.next(r)}this._lastScrollVisibility=i}this._lastPosition=t,this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let e=this._boundingBox.querySelectorAll(this._transformOriginSelector),i,r=t.overlayY;t.overlayX==="center"?i="center":this._isRtl()?i=t.overlayX==="start"?"right":"left":i=t.overlayX==="start"?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${i} ${r}`}_calculateBoundingBoxRect(t,e){let i=this._viewportRect,r=this._isRtl(),o,s,a;if(e.overlayY==="top")s=t.y,o=i.height-s+this._viewportMargin;else if(e.overlayY==="bottom")a=i.height-t.y+this._viewportMargin*2,o=i.height-a+this._viewportMargin;else{let f=Math.min(i.bottom-t.y+i.top,t.y),g=this._lastBoundingBoxSize.height;o=f*2,s=t.y-f,o>g&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-g/2)}let l=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,c=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,d,u,m;if(c)m=i.width-t.x+this._viewportMargin*2,d=t.x-this._viewportMargin;else if(l)u=t.x,d=i.right-t.x;else{let f=Math.min(i.right-t.x+i.left,t.x),g=this._lastBoundingBoxSize.width;d=f*2,u=t.x-f,d>g&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-g/2)}return{top:s,left:u,bottom:a,right:m,width:d,height:o}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=oe(i.height),r.top=oe(i.top),r.bottom=oe(i.bottom),r.width=oe(i.width),r.left=oe(i.left),r.right=oe(i.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=oe(o)),s&&(r.maxWidth=oe(s))}this._lastBoundingBoxSize=i,Ei(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Ei(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Ei(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();Ei(i,this._getExactOverlayY(e,t,d)),Ei(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=oe(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=oe(s.maxWidth):o&&(i.maxWidth="")),Ei(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),t.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=oe(o.y);return r}_getExactOverlayX(t,e,i){let r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i));let s;if(this._isRtl()?s=t.overlayX==="end"?"left":"right":s=t.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=oe(o.x);return r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Xf(t,i),isOriginOutsideView:fc(t,i),isOverlayClipped:Xf(e,i),isOverlayOutsideView:fc(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}
104_addPanelClasses(t){this._pane&&mn(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof H)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}};function Ei(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function tm(n){if(typeof n!="number"&&n!=null){let[t,e]=n.split(Y_);return!e||e==="px"?parseFloat(t):null}return n||null}function im(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}function Z_(n,t){return n===t?!0:n.isOriginClipped===t.isOriginClipped&&n.isOriginOutsideView===t.isOriginOutsideView&&n.isOverlayClipped===t.isOverlayClipped&&n.isOverlayOutsideView===t.isOverlayOutsideView}var nm="cdk-global-overlay-wrapper",bc=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(nm),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=i,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,m=this._overlayRef.getConfig().direction==="rtl",f="",g="",p="";l?p="flex-start":d==="center"?(p="center",m?g=u:f=u):m?d==="left"||d==="end"?(p="flex-end",f=u):(d==="right"||d==="start")&&(p="flex-start",g=u):d==="left"||d==="start"?(p="flex-start",f=u):(d==="right"||d==="end")&&(p="flex-end",g=u),t.position=this._cssPosition,t.marginLeft=l?"0":f,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":g,e.justifyContent=p,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(nm),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},J_=(()=>{class n{constructor(e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new bc}flexibleConnectedTo(e){return new gc(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(i){return new(i||n)(v(lc),v(N),v(Q),v(_n))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),X_=0,Xe=(()=>{class n{constructor(e,i,r,o,s,a,l,c,d,u,m,f){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=u,this._outsideClickDispatcher=m,this._animationsModuleType=f}create(e){let i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),s=new Nr(e);return s.direction=s.direction||this._directionality.value,new Et(o,i,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(dt))}position(){return this._positionBuilder}_createPaneElement(e){let i=this._document.createElement("div");return i.id=`cdk-overlay-${X_++}`,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(Li)),new Cs(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(i){return new(i||n)(v(q_),v(_n),v(Zr),v(J_),v(G_),v(fe),v(P),v(N),v(Mr),v(ft),v(K_),v(Pe,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Q_=new O("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let n=x(Xe);return()=>n.scrollStrategies.reposition()}});function ey(n){return()=>n.scrollStrategies.reposition()}var ty={provide:Q_,deps:[Xe],useFactory:ey},As=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({providers:[Xe,ty],imports:[$t,xi,cc,cc]})}}return n})();var iy=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Rs=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({providers:[iy]})}}return n})();var sm=new Set,Ci,ny=(()=>{class n{constructor(e,i){this._platform=e,this._nonce=i,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):oy}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&ry(e,this._nonce),this._matchMedia(e)}static{this.\u0275fac=function(i){return new(i||n)(v(Q),v(kn,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function ry(n,t){if(!sm.has(n))try{Ci||(Ci=document.createElement("style"),t&&Ci.setAttribute("nonce",t),Ci.setAttribute("type","text/css"),document.head.appendChild(Ci)),Ci.sheet&&(Ci.sheet.insertRule(`@media ${n} {body{ }}`,0),sm.add(n))}catch(e){console.error(e)}}function oy(n){return{matches:n==="all"||n==="",media:n,addListener:()=>{},removeListener:()=>{}}}var lm=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=ne
104w z}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return am(mn(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let r=am(mn(e)).map(s=>this._registerQuery(s).observable),o=Oi(r);return o=Gr(o.pipe(Me(1)),o.pipe(Yr(1),Qs(0))),o.pipe($(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),o={observable:new Kt(s=>{let a=l=>this._zone.run(()=>s.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(lt(i),$(({matches:s})=>({query:e,matches:s})),ct(this._destroySubject)),mql:i};return this._queries.set(e,o),o}static{this.\u0275fac=function(i){return new(i||n)(v(ny),v(P))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function am(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}var jr=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return ay(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=sy(py(e));if(i&&(cm(i)===-1||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=cm(e);return e.hasAttribute("contenteditable")?o!==-1:r==="iframe"||r==="object"||this._platform.WEBKIT&&this._platform.IOS&&!fy(e)?!1:r==="audio"?e.hasAttribute("controls")?o!==-1:!1:r==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,i){return my(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}static{this.\u0275fac=function(i){return new(i||n)(v(Q))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function sy(n){try{return n.frameElement}catch{return null}}function ay(n){return!!(n.offsetWidth||n.offsetHeight||typeof n.getClientRects=="function"&&n.getClientRects().length)}function ly(n){let t=n.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function cy(n){return uy(n)&&n.type=="hidden"}function dy(n){return hy(n)&&n.hasAttribute("href")}function uy(n){return n.nodeName.toLowerCase()=="input"}function hy(n){return n.nodeName.toLowerCase()=="a"}function hm(n){if(!n.hasAttribute("tabindex")||n.tabIndex===void 0)return!1;let t=n.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function cm(n){if(!hm(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function fy(n){let t=n.nodeName.toLowerCase(),e=t==="input"&&n.type;return e==="text"||e==="password"||t==="select"||t==="textarea"}function my(n){return cy(n)?!1:ly(n)||dy(n)||n.hasAttribute("contenteditable")||hm(n)}function py(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}var _c=class{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,i,r,o=!1,s){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._injector=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=0;i<e.length;i++){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=e.length-1;i>=0;i--){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?Rt(t,{injector:this._injector}):setTimeout(t)}},Ds=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._injector=x(fe),this._document=r}create(e,i=!1){return new _c(e,this._checker,this._ngZone,this._document,i,this._injector)}static{this.\u0275fac=function(i){return new(i||n)(v(jr),v(P),v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function yc(n){return n.buttons===0||n.detail===0}function wc(n){let t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];
104return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var gy=new O("cdk-input-modality-detector-options"),by={ignoreKeys:[18,17,224,91,16]},fm=650,yn=Bt({passive:!0,capture:!0}),vy=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new Re(null),this._lastTouchMs=0,this._onKeydown=s=>{this._options?.ignoreKeys?.some(a=>a===s.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=qe(s))},this._onMousedown=s=>{Date.now()-this._lastTouchMs<fm||(this._modality.next(yc(s)?"keyboard":"mouse"),this._mostRecentTarget=qe(s))},this._onTouchstart=s=>{if(wc(s)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=qe(s)},this._options=_(_({},by),o),this.modalityDetected=this._modality.pipe(Yr(1)),this.modalityChanged=this.modalityDetected.pipe(ta()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,yn),r.addEventListener("mousedown",this._onMousedown,yn),r.addEventListener("touchstart",this._onTouchstart,yn)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,yn),document.removeEventListener("mousedown",this._onMousedown,yn),document.removeEventListener("touchstart",this._onTouchstart,yn))}static{this.\u0275fac=function(i){return new(i||n)(v(Q),v(P),v(N),v(gy,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Os=function(n){return n[n.IMMEDIATE=0]="IMMEDIATE",n[n.EVENTUAL=1]="EVENTUAL",n}(Os||{}),_y=new O("cdk-focus-monitor-default-options"),ks=Bt({passive:!0,capture:!0}),wn=(()=>{class n{constructor(e,i,r,o,s){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new z,this._rootNodeFocusAndBlurListener=a=>{let l=qe(a);for(let c=l;c;c=c.parentElement)a.type==="focus"?this._onFocus(a,c):this._onBlur(a,c)},this._document=o,this._detectionMode=s?.detectionMode||Os.IMMEDIATE}monitor(e,i=!1){let r=We(e);if(!this._platform.isBrowser||r.nodeType!==1)return D();let o=Kf(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;let a={checkChildren:i,subject:new z,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let i=We(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){let o=We(e),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),typeof o.focus=="function"&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Os.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused",i==="touch"),e.classList.toggle("cdk-keyboard-focused",i==="keyboard"),e.classList.toggle("cdk-mouse-focused",i==="mouse"),e.classList.toggle("cdk-program-focused",i==="program")}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&i,this._detectionMode===Os.IM
104MEDIATE){clearTimeout(this._originTimeoutId);let r=this._originFromTouchInteraction?fm:1;this._originTimeoutId=setTimeout(()=>this._origin=null,r)}})}_onFocus(e,i){let r=this._elementInfo.get(i),o=qe(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){let r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,ks),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,ks)}),this._rootNodeFocusListenerCount.set(i,r+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ct(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,ks),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,ks),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if(r!=="mouse"||!i||i===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let o=e.labels;if(o){for(let s=0;s<o.length;s++)if(o[s].contains(i))return!0}return!1}static{this.\u0275fac=function(i){return new(i||n)(v(P),v(Q),v(vy),v(N,8),v(_y,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Si=function(n){return n[n.NONE=0]="NONE",n[n.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",n[n.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",n}(Si||{}),dm="cdk-high-contrast-black-on-white",um="cdk-high-contrast-white-on-black",vc="cdk-high-contrast-active",xc=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=x(lm).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Si.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Si.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Si.BLACK_ON_WHITE}return Si.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(vc,dm,um),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();i===Si.BLACK_ON_WHITE?e.add(vc,dm):i===Si.WHITE_ON_BLACK&&e.add(vc,um)}}static{this.\u0275fac=function(i){return new(i||n)(v(Q),v(N))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),mm=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}static{this.\u0275fac=function(i){return new(i||n)(v(xc))}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[Rs]})}}return n})();function yy(n,t){}var Ii=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var Ic=(()=>{class n extends vn{constructor(e,i,r,o,s,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._platform=x(Q),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=x(it),this._injector=x(fe),this._isDestroyed=!1,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();let u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._document=r,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let i=this._ariaLabelledByQueue.indexOf(e);i>-1&&(this._ariaLabelledByQueue.splice(i,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){this._isDestroyed||Rt(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,i=null;if(typeof e=="string"?i=this._document.querySelector(e):typeof e=="boolean"?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&typeof i.focus=="function"){let r=Dr(),o=this._elementRef.nativeElement;
104(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,i=Dr();return e===i||e.contains(i)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Dr()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static{this.\u0275fac=function(i){return new(i||n)(w(H),w(Ds),w(N,8),w(Ii),w(jr),w(P),w(Et),w(wn))}}static{this.\u0275cmp=te({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(i,r){if(i&1&&ti(Fr,7),i&2){let o;kt(o=Ot())&&(r._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(i,r){i&2&&Fe("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[xe,Ne],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(i,r){i&1&&Ee(0,yy,0,0,"ng-template",0)},dependencies:[Fr],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}}return n})(),Lr=class{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new z,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{i.keyCode===27&&!this.disableClose&&!Ss(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(t,e){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},wy=new O("DialogScrollStrategy",{providedIn:"root",factory:()=>{let n=x(Xe);return()=>n.scrollStrategies.block()}}),xy=new O("DialogData"),Ey=new O("DefaultDialogConfig");var Cy=0,Ac=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,o,s,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new z,this._afterOpenedAtThisLevel=new z,this._ariaHiddenElements=new Map,this.afterAllClosed=Yt(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(lt(void 0))),this._scrollStrategy=a}open(e,i){let r=this._defaultOptions||new Ii;i=_(_({},r),i),i.id=i.id||`cdk-dialog-${Cy++}`,i.id&&this.getDialogById(i.id);let o=this._getOverlayConfig(i),s=this._overlay.create(o),a=new Lr(s,i),l=this._attachContainer(s,a,i);return a.containerInstance=l,this._attachDialogContent(e,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){Cc(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){Cc(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),Cc(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Nr({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){let o=r.injector||r.viewContainerRef?.injector,s=[{provide:Ii,useValue:r},{provide:Lr,useValue:i},{provide:Et,useValue:e}],a;r.container?typeof r.container=="function"?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=Ic;let l=new gn(a,r.viewContainerRef,fe.create({parent:o||this._injector,providers:s}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,i,r,o){if(e instanceof Dn){let s=this._createInjector(o,i,r,void 0),a={$implicit:o.data,dialogRef:i};o.templateContext&&(a=_(_({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),r.attachTemplatePortal(new bn(e,null,a,s))}else{let s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new gn(e,o.viewContainerRef,s,o.componentFactoryResolver));i.componentRef=a,i.componentInstance=a.instance}}_createInjector(e,i,r,o){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:xy,useValue:e.data},{provide:Lr,useValue:i}];return e.providers&&(typeof e.providers=="function"?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(Mr,null,{optional:!0}))&&a.push({provide:Mr,useValue:{value:e.direction,change:D()}}),fe.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEac
104h((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){let o=i[r];o!==e&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static{this.\u0275fac=function(i){return new(i||n)(v(Xe),v(fe),v(Ey,8),v(n,12),v(_n),v(wy))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Cc(n,t){let e=n.length;for(;e--;)t(n[e])}var pm=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({providers:[Ac],imports:[As,xi,mm,xi]})}}return n})();function Iy(){return!0}var Ay=new O("mat-sanity-checks",{providedIn:"root",factory:Iy}),De=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return Tr()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[e]}static{this.\u0275fac=function(i){return new(i||n)(v(xc),v(Ay,8),v(N))}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[$t,$t]})}}return n})();var Ms=class{constructor(t,e,i,r,o){this._defaultMatcher=t,this.ngControl=e,this._parentFormGroup=i,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){let t=this.errorState,e=this._parentFormGroup||this._parentForm,i=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=i?.isErrorState(r,e)??!1;o!==t&&(this.errorState=o,this._stateChanges.next())}};var Cm=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=function(n){return n[n.FADING_IN=0]="FADING_IN",n[n.VISIBLE=1]="VISIBLE",n[n.FADING_OUT=2]="FADING_OUT",n[n.HIDDEN=3]="HIDDEN",n}(Ge||{}),Oc=class{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=Ge.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},gm=Bt({passive:!0,capture:!0}),Dc=class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=qe(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,i,r){let o=this._events.get(e);if(o){let s=o.get(i);s?s.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,gm)})}removeHandler(t,e,i){let r=this._events.get(t);if(!r)return;let o=r.get(e);o&&(o.delete(i),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,gm)))}},bm={enterDuration:225,exitDuration:150},Ry=800,vm=Bt({passive:!0,capture:!0}),_m=["mousedown","touchstart"],ym=["mouseup","mouseleave","touchend","touchcancel"],Tc=class n{static{this._eventManager=new Dc}constructor(t,e,i,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=We(i))}fadeInRipple(t,e,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=_(_({},bm),i.animation);i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=i.radius||ky(t,e,r),a=t-r.left,l=e-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${l-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,i.color!=null&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),m=u.transitionProperty,f=u.transitionDuration,g=m==="none"||f==="0s"||f==="0s, 0s"||r.width===0&&r.height===0,p=new Oc(this,d,i,g);d.style.transform="scale3d(1, 1, 1)",p.state=Ge.FADING_IN,i.persistent||(this._mostRecentTransientRipple=p);let b=null;return!g&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let y=()=>{b&&(b.fallbackTimer=null),clearTimeout(E),this._finishRippleTransition(p)},M=()=>
104this._destroyRipple(p),E=setTimeout(M,c+100);d.addEventListener("transitionend",y),d.addEventListener("transitioncancel",M),b={onTransitionEnd:y,onTransitionCancel:M,fallbackTimer:E}}),this._activeRipples.set(p,b),(g||!c)&&this._finishRippleTransition(p),p}fadeOutRipple(t){if(t.state===Ge.FADING_OUT||t.state===Ge.HIDDEN)return;let e=t.element,i=_(_({},bm),t.config.animation);e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=Ge.FADING_OUT,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=We(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,_m.forEach(i=>{n._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{ym.forEach(e=>{this._triggerElement.addEventListener(e,this,vm)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===Ge.FADING_IN?this._startFadeOutTransition(t):t.state===Ge.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=Ge.VISIBLE,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=Ge.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),t.element.remove()}_onMousedown(t){let e=yc(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Ry;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!wc(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===Ge.VISIBLE||t.config.terminateOnPointerUp&&t.state===Ge.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(_m.forEach(e=>n._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(ym.forEach(e=>t.removeEventListener(e,this,vm)),this._pointerUpEventsRegistered=!1))}};function ky(n,t,e){let i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}var Sm=new O("mat-ripple-global-options"),Oy=(()=>{class n{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(e,i,r,o,s){this._elementRef=e,this._animationMode=s,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new Tc(this,i,e,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:_(_(_({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,i,_(_({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,_(_({},this.rippleConfig),e))}static{this.\u0275fac=function(i){return new(i||n)(w(H),w(P),w(Q),w(Sm,8),w(Pe,8))}}static{this.\u0275dir=J({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(i,r){i&2&&Ie("mat-ripple-unbounded",r.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}}return n})(),Im=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[De,De]})}}return n})();var wm={capture:!0}
104,xm=["focus","mousedown","mouseenter","touchstart"],Rc="mat-ripple-loader-uninitialized",kc="mat-ripple-loader-class-name",Em="mat-ripple-loader-centered",Ts="mat-ripple-loader-disabled",Am=(()=>{class n{constructor(){this._document=x(N,{optional:!0}),this._animationMode=x(Pe,{optional:!0}),this._globalRippleOptions=x(Sm,{optional:!0}),this._platform=x(Q),this._ngZone=x(P),this._hosts=new Map,this._onInteraction=e=>{let i=qe(e);if(i instanceof HTMLElement){let r=i.closest(`[${Rc}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}},this._ngZone.runOutsideAngular(()=>{for(let e of xm)this._document?.addEventListener(e,this._onInteraction,wm)})}ngOnDestroy(){let e=this._hosts.keys();for(let i of e)this.destroyRipple(i);for(let i of xm)this._document?.removeEventListener(i,this._onInteraction,wm)}configureRipple(e,i){e.setAttribute(Rc,this._globalRippleOptions?.namespace??""),(i.className||!e.hasAttribute(kc))&&e.setAttribute(kc,i.className||""),i.centered&&e.setAttribute(Em,""),i.disabled&&e.setAttribute(Ts,"")}getRipple(e){return this._hosts.get(e)||this._createRipple(e)}setDisabled(e,i){let r=this._hosts.get(e);if(r){r.disabled=i;return}i?e.setAttribute(Ts,""):e.removeAttribute(Ts)}_createRipple(e){if(!this._document)return;let i=this._hosts.get(e);if(i)return i;e.querySelector(".mat-ripple")?.remove();let r=this._document.createElement("span");r.classList.add("mat-ripple",e.getAttribute(kc)),e.append(r);let o=new Oy(new H(r),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return o._isInitialized=!0,o.trigger=e,o.centered=e.hasAttribute(Em),o.disabled=e.hasAttribute(Ts),this.attachRipple(e,o),o}attachRipple(e,i){e.removeAttribute(Rc),this._hosts.set(e,i)}destroyRipple(e){let i=this._hosts.get(e);i&&(i.ngOnDestroy(),this._hosts.delete(e))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function Ty(n,t){}var Vr=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},Mc="mdc-dialog--open",Rm="mdc-dialog--opening",km="mdc-dialog--closing",My=150,Py=75,Fy=(()=>{class n extends Ic{constructor(e,i,r,o,s,a,l,c,d){super(e,i,r,o,s,a,l,d),this._animationMode=c,this._animationStateChanged=new le,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Dm(this._config.enterAnimationDuration)??My:0,this._exitAnimationDuration=this._animationsEnabled?Dm(this._config.exitAnimationDuration)??Py:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Om,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Rm,Mc)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Mc),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Mc),this._animationsEnabled?(this._hostElement.style.setProperty(Om,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(km)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Rm,km)}_waitForAnimationToComplete(e,i){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let i=super.attachComponentPortal(e);return i.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),i}static{this.\u0275fac=function(i){return new(i||n)(w(H),w(Ds),w(N,8),w(Vr),w(jr),w(P),w(Et),w(Pe,8),w(wn))}}static{this.\u0275cmp=te({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(i,r){i&2&&(ji("id",r._config.id),Fe("aria-modal",r._config.ariaModal)("role",r._
vendor: 5,392 bytes, line 104
104config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),Ie("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[xe,Ne],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(i,r){i&1&&(A(0,"div",0)(1,"div",1),Ee(2,Ty,0,0,"ng-template",2),R()())},dependencies:[Fr],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, var(--mat-app-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-app-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-app-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-app-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-app-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-app-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-app-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-app-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-app-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-app-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-app-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-app-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-app-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-app-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}
104.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2})}}return n})(),Om="--mat-dialog-transition-duration";function Dm(n){return n==null?null:typeof n=="number"?n:n.endsWith("ms")?fn(n.substring(0,n.length-2)):n.endsWith("s")?fn(n.substring(0,n.length-1))*1e3:n==="0"?0:null}var Ps=function(n){return n[n.OPEN=0]="OPEN",n[n.CLOSING=1]="CLOSING",n[n.CLOSED=2]="CLOSED",n}(Ps||{}),Ur=class{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new z,this._beforeClosed=new z,this._state=Ps.OPEN,this.disableClose=e.disableClose,this.id=t.id,t.addPanelClass("mat-mdc-dialog-panel"),i._animationStateChanged.pipe(he(r=>r.state==="opened"),Me(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(he(r=>r.state==="closed"),Me(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Kr(this.backdropClick(),this.keydownEvents().pipe(he(r=>r.keyCode===27&&!this.disableClose&&!Ss(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Ny(this,r.type==="keydown"?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(he(e=>e.state==="closing"),Me(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=Ps.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=Ps.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Ny(n,t,e){return n._closeInteractionType=t,n.close(e)}var jy=new O("MatMdcDialogData"),Ly=new O("mat-mdc-dialog-default-options"),Vy=new O("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let n=x(Xe);return()=>n.scrollStrategies.block()}});var Uy=0,Pc=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,i,r,o,s,a,l,c){this._overlay=e,this._defaultOptions=o,this._scrollStrategy=s,this._parentDialog=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new z,this._afterOpenedAtThisLevel=new z,this.dialogConfigClass=Vr,this.afterAllClosed=Yt(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(lt(void 0))),this._dialog=i.get(Ac),this._dialogRefConstructor=Ur,this._dialogContainerType=Fy,this._dialogDataToken=jy}open(e,i){let r;i=_(_({},this._defaultOptions||new Vr),i),i.id=i.id||`mat-mdc-dialog-${Uy++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,W(_({},i),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Ii,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,l)=>
104(r=new this._dialogRefConstructor(s,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentRef=o.componentRef,r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}static{this.\u0275fac=function(i){return new(i||n)(v(Xe),v(fe),v(ft,8),v(Ly,8),v(Vy),v(n,12),v(_n),v(Pe,8))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Tm=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({providers:[Pc],imports:[pm,As,xi,De,De]})}}return n})();var Um=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(i){return new(i||n)(w(Xr),w(H))}}static{this.\u0275dir=J({type:n})}}return n})(),zy=(()=>{class n extends Um{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Jt(n)))(r||n)}})()}static{this.\u0275dir=J({type:n,features:[xe]})}}return n})(),Bm=new O("");var $y={provide:Bm,useExisting:Sn(()=>Ws),multi:!0};function Hy(){let n=ni()?ni().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Wy=new O(""),Ws=(()=>{class n extends Um{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!Hy())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(i){return new(i||n)(w(Xr),w(H),w(Wy,8))}}static{this.\u0275dir=J({type:n,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,r){i&1&&F("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},features:[Ue([$y]),xe]})}}return n})();function Ht(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function zm(n){return n!=null&&typeof n.length=="number"}var Vc=new O(""),Uc=new O(""),qy=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ns=class{static min(t){return Gy(t)}static max(t){return Ky(t)}static required(t){return Yy(t)}static requiredTrue(t){return Zy(t)}static email(t){return Jy(t)}static minLength(t){return Xy(t)}static maxLength(t){return Qy(t)}static pattern(t){return e0(t)}static nullValidator(t){return $m(t)}static compose(t){return Ym(t)}static composeAsync(t){return Zm(t)}};function Gy(n){return t=>{if(Ht(t.value)||Ht(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ky(n){return t=>{if(Ht(t.value)||Ht(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Yy(n){return Ht(n.value)?{required:!0}:null}function Zy(n){return n.value===!0?null:{required:!0}}function Jy(n){return Ht(n.value)||qy.test(n.value)?null:{email:!0}}function Xy(n){return t=>Ht(t.value)||!zm(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function Qy(n){return t=>zm(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}
104function e0(n){if(!n)return $m;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ht(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function $m(n){return null}function Hm(n){return n!=null}function Wm(n){return no(n)?_e(n):n}function qm(n){let t={};return n.forEach(e=>{t=e!=null?_(_({},t),e):t}),Object.keys(t).length===0?null:t}function Gm(n,t){return t.map(e=>e(n))}function t0(n){return!n.validate}function Km(n){return n.map(t=>t0(t)?t:e=>t.validate(e))}function Ym(n){if(!n)return null;let t=n.filter(Hm);return t.length==0?null:function(e){return qm(Gm(e,t))}}function Bc(n){return n!=null?Ym(Km(n)):null}function Zm(n){if(!n)return null;let t=n.filter(Hm);return t.length==0?null:function(e){let i=Gm(e,t).map(Wm);return Xc(i).pipe($(qm))}}function zc(n){return n!=null?Zm(Km(n)):null}function Mm(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Jm(n){return n._rawValidators}function Xm(n){return n._rawAsyncValidators}function Fc(n){return n?Array.isArray(n)?n:[n]:[]}function js(n,t){return Array.isArray(n)?n.includes(t):n===t}function Pm(n,t){let e=Fc(t);return Fc(n).forEach(r=>{js(e,r)||e.push(r)}),e}function Fm(n,t){return Fc(t).filter(e=>!js(n,e))}var Ls=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=Bc(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=zc(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,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},Ai=class extends Ls{get formDirective(){return null}get path(){return null}},Ri=class extends Ls{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Nc=class{constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},i0={"[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"},lk=W(_({},i0),{"[class.ng-submitted]":"isSubmitted"}),Qm=(()=>{class n extends Nc{constructor(e){super(e)}static{this.\u0275fac=function(i){return new(i||n)(w(Ri,2))}}static{this.\u0275dir=J({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Ie("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[xe]})}}return n})();var Br="VALID",Fs="INVALID",xn="PENDING",zr="DISABLED",Wt=class{},Vs=class extends Wt{constructor(t,e){super(),this.value=t,this.source=e}},Hr=class extends Wt{constructor(t,e){super(),this.pristine=t,this.source=e}},Wr=class extends Wt{constructor(t,e){super(),this.touched=t,this.source=e}},En=class extends Wt{constructor(t,e){super(),this.status=t,this.source=e}},jc=class extends Wt{constructor(t){super(),this.source=t}},Lc=class extends Wt{constructor(t){super(),this.source=t}};function ep(n){return(qs(n)?n.validators:n)||null}function n0(n){return Array.isArray(n)?Bc(n):n||null}function tp(n,t){return(qs(t)?t.asyncValidators:n)||null}function r0(n){return Array.isArray(n)?zc(n):n||null}function qs(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function o0(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new q(1e3,"");if(!i[e])throw new q(1001,"")}
104function s0(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new q(1002,"")})}var Us=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=ii(()=>this.statusReactive()),this.statusReactive=Qt(void 0),this._pristine=ii(()=>this.pristineReactive()),this.pristineReactive=Qt(!0),this._touched=ii(()=>this.touchedReactive()),this.touchedReactive=Qt(!1),this._events=new z,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}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 status(){return Ze(this.statusReactive)}set status(t){Ze(()=>this.statusReactive.set(t))}get valid(){return this.status===Br}get invalid(){return this.status===Fs}get pending(){return this.status==xn}get disabled(){return this.status===zr}get enabled(){return this.status!==zr}get pristine(){return Ze(this.pristineReactive)}set pristine(t){Ze(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return Ze(this.touchedReactive)}set touched(t){Ze(()=>this.touchedReactive.set(t))}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(Pm(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Pm(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Fm(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Fm(t,this._rawAsyncValidators))}hasValidator(t){return js(this._rawValidators,t)}hasAsyncValidator(t){return js(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(W(_({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new Wr(!0,i))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new Wr(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(W(_({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new Hr(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new Hr(!0,i))}markAsPending(t={}){this.status=xn;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new En(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(W(_({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=zr,this.errors=null,this._forEachChild(r=>{r.disable(W(_({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Vs(this.value,i)),this._events.next(new En(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(W(_({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);
vendor: 4,193 bytes, line 104
104this.status=Br,this._forEachChild(i=>{i.enable(W(_({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(W(_({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Br||this.status===xn)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Vs(this.value,e)),this._events.next(new En(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(W(_({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?zr:Br}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=xn,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let i=Wm(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new En(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new le,this.statusChanges=new le}_calculateStatus(){return this._allControlsDisabled()?zr:this.errors?Fs:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(xn)?xn:this._anyControlsHaveStatus(Fs)?Fs:Br}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new Hr(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new Wr(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){qs(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=n0(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=r0(this._rawAsyncValidators)}},Bs=class extends Us{constructor(t,e,i){super(ep(e),tp(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}
vendor: 4,340 bytes, line 104
104){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){s0(this,!0,t),Object.keys(t).forEach(i=>{o0(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Gs=new O("CallSetDisabledState",{providedIn:"root",factory:()=>$c}),$c="always";function a0(n,t){return[...t.path,n]}function zs(n,t,e=$c){Hc(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),c0(n,t),u0(n,t),d0(n,t),l0(n,t)}function Nm(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Hs(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function $s(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function l0(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function Hc(n,t){let e=Jm(n);t.validator!==null?n.setValidators(Mm(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=Xm(n);t.asyncValidator!==null?n.setAsyncValidators(Mm(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();$s(t._rawValidators,r),$s(t._rawAsyncValidators,r)}function Hs(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=Jm(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=Xm(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return $s(t._rawValidators,i),$s(t._rawAsyncValidators,i),e}function c0(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&ip(n,t)})}function d0(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&ip(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function ip(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function u0(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)}
104)}function np(n,t){n==null,Hc(n,t)}function h0(n,t){return Hs(n,t)}function f0(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function m0(n){return Object.getPrototypeOf(n.constructor)===zy}function rp(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function p0(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===Ws?e=o:m0(o)?i=o:r=o}),r||i||e||null}function g0(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var b0={provide:Ai,useExisting:Sn(()=>Wc)},$r=Promise.resolve(),Wc=(()=>{class n extends Ai{get submitted(){return Ze(this.submittedReactive)}constructor(e,i,r){super(),this.callSetDisabledState=r,this._submitted=ii(()=>this.submittedReactive()),this.submittedReactive=Qt(!1),this._directives=new Set,this.ngSubmit=new le,this.form=new Bs({},Bc(e),zc(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){$r.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),zs(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}
104removeControl(e){$r.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){$r.then(()=>{let i=this._findContainer(e.path),r=new Bs({});np(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){$r.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){$r.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),rp(this.form,this._directives),this.ngSubmit.emit(e),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static{this.\u0275fac=function(i){return new(i||n)(w(Vc,10),w(Uc,10),w(Gs,8))}}static{this.\u0275dir=J({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&F("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ue([b0]),xe]})}}return n})();function jm(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Lm(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var op=class extends Us{constructor(t=null,e,i){super(ep(e),tp(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),qs(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Lm(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){jm(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){jm(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){Lm(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 v0=n=>n instanceof op;var _0={provide:Ri,useExisting:Sn(()=>qc)},Vm=Promise.resolve(),qc=(()=>{class n extends Ri{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new op,this._registered=!1,this.name="",this.update=new le,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=p0(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),f0(e,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(e){this.viewModel=e,this.update.emit(e)}_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(){zs(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(e){Vm.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&Ye(i);Vm.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?a0(e,this._parent):[e]}static{this.\u0275fac=function(i){return new(i||n)(w(Ai,9),w(Vc,10),w(Uc,10),w(Bm,10),w(it,8),w(Gs,8))}}static{this.\u0275dir=J({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ue([_0]),xe,Ke]})}}return n})();var y0={provide:Ai,useExisting:Sn(()=>Gc)},Gc=(()=>{class n extends Ai{get submitted(){return Ze(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,i,r){super(),this.callSetDisabledState=r,this._submitted=ii(()=>this._submittedReactive()),this._submittedReactive=Qt(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new le,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateV
104alidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Hs(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return zs(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Nm(e.control||null,e,!1),g0(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this._submittedReactive.set(!0),rp(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new jc(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new Lc(this.form))}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(Nm(i||null,e),v0(r)&&(zs(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);np(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&h0(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Hc(this.form,this),this._oldForm&&Hs(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(i){return new(i||n)(w(Vc,10),w(Uc,10),w(Gs,8))}}static{this.\u0275dir=J({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&F("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ue([y0]),xe,Ke]})}}return n})();var w0=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})();var sp=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Gs,useValue:e.callSetDisabledState??$c}]}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[w0]})}}return n})();var lp=Bt({passive:!0}),cp=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Qe;let i=We(e),r=this._monitoredElements.get(i);if(r)return r.subject;let o=new z,s="cdk-text-field-autofilled",a=l=>{l.animationName==="cdk-text-field-autofill-start"&&!i.classList.contains(s)?(i.classList.add(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!0}))):l.animationName==="cdk-text-field-autofill-end"&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!1})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,lp),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",a,lp)}}),o}stopMonitoring(e){let i=We(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}static{this.\u0275fac=function(i){return new(i||n)(v(Q),v(P))}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var dp=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({})}}return n})();var up=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275dir=J({type:n})}}return n})();var hp=new O("MatFormField");var Kc=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[De,ao,Rs,De]})}}return n})();var E0=new O("MAT_INPUT_VALUE_ACCESSOR"),C0=["button","checkbox","file","hidden","image","radio","range","reset","submit"],S0=0,fp=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=kr(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(Ns.required)??!1}set required(e){this._required=kr(e)}get type(){return this._type}
104set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&ac().has(this._type)&&(this._elementRef.nativeElement.type=this._type),this._ensureWheelDefaultBehavior()}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=kr(e)}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(e,i,r,o,s,a,l,c,d,u){this._elementRef=e,this._platform=i,this.ngControl=r,this._autofillMonitor=c,this._ngZone=d,this._formField=u,this._uid=`mat-input-${S0++}`,this._webkitBlinkWheelListenerAttached=!1,this.focused=!1,this.stateChanges=new z,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(g=>ac().has(g)),this._iOSKeyupListener=g=>{let p=g.target;!p.value&&p.selectionStart===0&&p.selectionEnd===0&&(p.setSelectionRange(1,1),p.setSelectionRange(0,0))},this._webkitBlinkWheelListener=()=>{};let m=this._elementRef.nativeElement,f=m.nodeName.toLowerCase();this._inputValueAccessor=l||m,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new Ms(a,r,s,o,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=f==="select",this._isTextarea=f==="textarea",this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=m.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener),this._webkitBlinkWheelListenerAttached&&this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){C0.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}else return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_ensureWheelDefaultBehavior(){!this._webkitBlinkWheelListenerAttached&&this._type==="number"&&(this._platform.BLINK||this._platform.WEBKIT)&&(this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("wheel",this._webkitBlinkWheelListener)}),this._webkitBlinkWheelListenerAttached=!0),this._webkitBlinkWheelListenerAttached&&this._type!=="number"&&(this._elementRef.nativeElement.removeEventListener("wheel",this._webkitBlinkWheelListener),this._webkitBlinkWheelListenerAttached=!0)}static{this.\u0275fac=function(i){return new(i||n)(w(H),w(Q),w(Ri,10),w(Wc,8),w(Gc,8),w(Cm),w(E0,10),w(cp),w(P),w(hp,8))}}static{this.\u0275dir=J({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(i,r){i&1&&F("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),i&2&&(ji("id",r.id)("disabled",r.disabled)("required",r.required),Fe("name",r.name||null)("readonly",r.readonly&&!r._isNativeSelect||null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),Ie("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[Ue([{provide:up,useExisting:n}]),Ke]})}}return n})(),mp=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[De,Kc,Kc,dp,De]})}}return n})();var A0=["mat-button",""],R0=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],k0=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var O0=new O("MAT_BUTTON_CONFIG");var D0=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],T0=(()=>{class n{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(e){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,e)}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}constructor(e,i,r,o){this._elementRef=e,this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=x(wn),this._rippleLoader=x(Am),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;let s=x(O0,{optional:!0}),a=e.nativeElement,l=a.classList;this.disabledInteractive=s?.disabledInteractive??!1,this.color=s?.color??null,this._rippleLoader?.configureRipple(a,{className:"mat-mdc-button-ripple"});for(let{attribute:c,mdcClasses:d}of D0)a.hasAttribute(c)&&l.add(...d)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}
104_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static{this.\u0275fac=function(i){Fi()}}static{this.\u0275dir=J({type:n,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",Ye],disabled:[2,"disabled","disabled",Ye],ariaDisabled:[2,"aria-disabled","ariaDisabled",Ye],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ye]},features:[ht]})}}return n})();var pp=(()=>{class n extends T0{constructor(e,i,r,o){super(e,i,r,o)}static{this.\u0275fac=function(i){return new(i||n)(w(H),w(Q),w(P),w(Pe,8))}}static{this.\u0275cmp=te({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(i,r){i&2&&(Fe("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),_d(r.color?"mat-"+r.color:""),Ie("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._animationMode==="NoopAnimations")("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[xe,Ne],attrs:A0,ngContentSelectors:k0,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(i,r){i&1&&(Tn(R0),Y(0,"span",0),ei(1),A(2,"span",1),ei(3,1),R(),ei(4,2),Y(5,"span",2)(6,"span",3)),i&2&&Ie("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-app-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}
104.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-app-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-app-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-app-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-app-level1));height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-app-label-large-weight))}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-app-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-app-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-app-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-app-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-app-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-app-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-app-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-app-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-app-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-app-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-app-corner-full));border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-app-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-app-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-app-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-app-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-app-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-app-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-app-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}
104.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}}return n})();var gp=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[De,Im,De]})}}return n})();var P0=["fileInput"];function F0(n,t){if(n&1){let e=tt();A(0,"button",3),F("click",function(){se(e);let r=de();return ae(r.genupload())}),j(1,"UPLOAD IMAGE"),R()}}function N0(n,t){if(n&1){let e=tt();A(0,"div",9),F("click",function(){let r=se(e).index,o=de();return ae(o.openLightbox(r))}),Y(1,"img",10),R()}if(n&2){let e=t.$implicit;ie(),ce("src",e.url,et)("alt",e.name)}}function j0(n,t){if(n&1){let e=tt();A(0,"div",18)(1,"button",3),F("click",function(){se(e);let r=de(2);return ae(r.deleteImage(r.images[r.currentLightboxImage].name))}),j(2," DELETE "),R()()}}function L0(n,t){if(n&1){let e=tt();A(0,"div",11),F("click",function(){se(e);let r=de();return ae(r.closeLightbox())}),A(1,"div",12),F("click",function(r){return se(e),ae(r.stopPropagation())}),Ee(2,j0,3,0,"div",13),A(3,"button",14),F("click",function(){se(e);let r=de();return ae(r.closeLightbox())}),j(4,"\xD7"),R(),A(5,"button",15),F("click",function(){se(e);let r=de();return ae(r.prevLightboxImage())}),j(6,"\u276E"),R(),Y(7,"img",10),A(8,"button",16),F("click",function(){se(e);let r=de();return ae(r.nextLightboxImage())}),j(9,"\u276F"),R(),A(10,"div",17),j(11),R()()()}if(n&2){let e=de();ie(2),ce("ngIf",e.isLoggedIn),ie(5),ce("src",e.images[e.currentLightboxImage].url,et)("alt",e.images[e.currentLightboxImage].name),ie(4),Qr(" ",e.currentLightboxImage+1," / ",e.images.length," ")}}var bp=(()=>{class n{constructor(e,i,r){this.router=e,this.elementRef=i,this.dialog=r,this.isLoggedIn=!1,this.password="fp",this.temppassword="fp",this.images=[{name:"logo1.jpg",url:"assets/img/logo1.jpg"},{name:"unnamed (14).jpg",url:"assets/img/unnamed (14).jpg"}],this.currentImage=0,this.lightboxOpen=!1,this.currentLightboxImage=0,this.selectedFile=null}ngOnInit(){this.loadAllImages(),this.loadPassword()}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor=""}goHome(){this.router.navigate(["/home"])}goLogin(){this.router.navigate(["/login"])}loadAllImages(){return h(this,null,function*(){try{let{data:e,error:i}=yield st.storage.from("images").list("",{limit:1e3,offset:0});if(i){console.error("Failed to list images:",i);return}if(!e){console.error("No files returned.");return}this.images=e.filter(r=>!r.name.endsWith("/")).map(r=>{let{data:o}=st.storage.from("images").getPublicUrl(r.name);return console.log("Public URL data:",o.publicUrl),{name:r.name,url:o.publicUrl}}),console.log("Loaded images:",this.images)}catch(e){console.error("Error loading images:",e)}})}loadPassword(){return h(this,null,function*(){try{let{data:i,error:r}=yield st.storage.from("fp").list("",{limit:1e3,offset:0});if(r)return console.error("Failed to list password:",r),null;if(!i)return console.error("No files returned for password."),null;var e=i.filter(o=>!o.name.endsWith("/")).map(o=>h(this,null,function*(){let{data:s,error:a}=yield st.storage.from("fp").createSignedUrl(o.name,60);if(a)return console.error("Failed to create signed URL:",a),null;let l=s.signedUrl,u=(yield(yield fetch(l)).text()).trim();return console.log("PASSWORD LOADED:",u),u}));return e}catch(i){return console.error("Error loading password:",i),null}})}genupload(){this.fileInput.nativeElement.click()}onFileSelected(e){let i=e.target;if(!i.files||i.files.length===0){console.log("No file selected");return}this.selectedFile=i.files[0],console.log("Selected file:",this.selectedFile),this.generalUpload()}generalUpload(){return h(this,null,function*(){try{if(!this.selectedFile){console.error("No file selected");return}let e=this.selectedFile,i=e.name,{data:r,error:o}=yield st.storage.from("images").upload(i,e,{upsert:!0});if(o){console.error("Upload failed:",o);return}console.log("Upload success:",r),yield this.loadAllImages()}catch(e){console.error("Error uploading:",e)}})}deleteImage(e){return h(this,null,function*(){try{let{error:i}=yield st.storage.from("images").remove([e]);if(i){console.error("Delete failed:",i);return}console.log("Deleted:",e),yield this.loadAllImages(),this.closeLightbox()}catch(i){console.error("Error deleting image:",i)}})}prevImage(){this.currentImage=(this.currentImage-1+this.images.length)%this.images.length}nextImage(){this.currentImage=(this.currentImage+1)%this.images.length}openLightbox(e){this.currentLightboxImage=e,this.lightboxOpen=!0,document.body.style.overflow="hidden"}closeLightbox(){this.lightboxOpen=!1,document.body.style.overflow="auto"}prevLightboxImage(){this.currentLightboxImage=(this.currentLightboxImage-1+this.images.length)%this.images.length}nextLightboxImage(){this.currentLightboxImage=(this.currentLightboxImage+1)%this.images.length}openPasswordDialog(){this.dialog.open(V0,{width:"300px"}).afterClosed().subscribe(i=>{i&&(i===this.password?(this.isLoggedIn=!0,alert("Login successful!")):alert("Incorrect password."))})}static{this.\u0275fac=function(i){return new(i||n)(w(me),w(H),w(Pc))}}static{this.\u0275cmp=te({type:n,selectors:[["app-login"]],viewQuery:function(i,r){if(i&1&&ti(P0,5),i&2){let o;kt(o=Ot())&&(r.fileInput=o.first)}},decls:14,vars:3,consts:[["fileInput",""],[1,"gallery-container"],[1,"gallery-header"],[1,"home-button",3,"click"],["class","home-button",3,"click",4,"ngIf"],["type","file","accept","image/*",2,"display","none",3,"change"],[1,"gallery-grid"],["class","gallery-item",3,"click",4,"ngFor","ngForOf"],["class","lightbox-overlay",3,"click",4,"ngIf"],[1,"gallery-item",3,"click"],[3,"src","alt"],[1,"lightbox-overlay",3,"click"],[1,"lightbox-content",3,"click"],["class","delete-button-container",4,"ngIf"],[1,"lightbox-close",3,"click"],[1,"lightbox-arrow","lightbox-prev",3,"click"],[1,"lightbox-arrow","lightbox-next",3,"click"],[1,"lightbox-counter"],[1,"delete-button-container"]],template:function(i,r){if(i&1){let o=tt();A(0,"div",1)(1,"div",2)(2,"button",3),F("click",function(){return se(o),ae(r.goHome())}),j(3,"Home"),R()(),A(4,"div",2)(5,"button",3),F("click",function(){return se(o),ae(r.openPasswordDialog())}),j(6,"Login"),R()(),A(7,"div",2),Ee(8,F0,2,0,"button",4),A(9,"input",5,0),F("change",function(a){return se(o),ae(r.onFileSelected(a))}),R()(),A(11,"div",6),Ee(12,N0,2,2,"div",7),R(),Ee(13,L0,12,5,"div",8),R()}i&2&&(ie(8),ce("ngIf",r.isLoggedIn),ie(4),ce("ngForOf",r.images),ie(),ce("ngIf",r.lightboxOpen))},dependencies:[so,Vi],styles:[`html{margin:0;padding:0;height:100%;background-color:#e6b3e6}.gallery-container{background-color:#e6b3e6;color:#fff;text-align:center;min-height:100vh;padding:20px;box-sizing:border-box}.gallery-header{margin-bottom:30px}.home-button{background-color:#e6b3e6;color:#700;text-align:center;padding:10px 90px;border-radius:5px;border:none;font-size:3em;cursor:pointer}.home-button:hover{color:#e0189e}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;max-width:1200px;margin:0 auto;padding:0 20px}.gallery-item{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;cursor:pointer;transition:transform .3s ease,box-shadow .3s ease;background-color:#ffffff1a}.gallery-item:hover{transform:scale(1.05);box-shadow:0 8px 25px #0000004d}.gallery-item img{width:100%;height:100%;object-fit:cover;object-position:center;transition:opacity .3s ease}.gallery-item:hover img{opacity:.9}.lightbox-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#000000e6;display:flex;justify-content:center;align-items:center;z-index:1000;cursor:pointer}.lightbox-content{position:relative;max-width:90vw;max-height:90vh;cursor:default}.lightbox-content img{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px}.lightbox-close{position:absolute;top:-40px;right:0;background:none;border:none;color:#fff;font-size:40px;cursor:pointer;z-index:1001;line-height:1;padding:0;width:40px;height:40px}.lightbox-close:hover{color:#ccc}.lightbox-arrow{position:absolute;top:50%;transform:translateY(-50%);background:#000000b3;border:none;color:#fff;font-size:30px;padding:15px 20px;cursor:pointer;border-radius:5px;transition:background-color .3s ease;z-index:1001}.lightbox-arrow:hover{background:#000000e6}.lightbox-prev{left:-80px}.lightbox-next{right:-80px}.lightbox-counter{position:absolute;bottom:-40px;left:50%;transform:translate(-50%);color:#fff;font-size:16px;background:#000000b3;padding:5px 15px;border-radius:20px}.delete-button-container{position:absolute;top:10px;right:10px;z-index:1100;transform:none}@media (max-width: 768px){.gallery-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:15px;padding:0 10px}.home-button{font-size:2em;padding:8px 60px}.lightbox-prev{left:10px}.lightbox-next{right:10px}.lightbox-arrow{font-size:24px;padding:10px 15px}.lightbox-close{top:10px;right:10px;font-size:30px}.lightbox-counter{bottom:10px;font-size:14px}} 105`,` 106 HTML, BODY { 107 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/fairypink3.ani"), 108 url("https://downloads.totallyfreecursors.com/thumbnails/fairypink3.gif"), auto; 109 } 110 111 button, a { 112 cursor: url("https://downloads.totallyfreecursors.com/cursor_files/fairypink3.ani"), 113 url("https://downloads.totallyfreecursors.com/thumbnails/fairypink3.gif"), auto; 114 } 115`],encapsulation:2})}}return n})(),V0=(()=>{class n{constructor(){this.password="",this.ref=x(Ur)}close(){this.ref.close(this.password)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=te({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ne],decls:6,vars:1,consts:[["matInput","","type","password","autofocus","",3,"ngModelChange","ngModel"],[2,"margin-top","16px","text-align","right"],["mat-button","",3,"click"]],template:function(i,r){i&1&&(A(0,"h3"),j(1,"Enter Password"),R(),A(2,"input",0),xd("ngModelChange",function(s){return wd(r.password,s)||(r.password=s),s}),R(),A(3,"div",1)(4,"button",2),F("click",function(){return r.close()}),j(5,"OK"),R()()),i&2&&(ie(2),yd("ngModel",r.password))},dependencies:[Tm,mp,fp,gp,pp,sp,Ws,Qm,qc],encapsulation:2})}}return n})();var U0=[{path:"",component:rc},{path:"second",component:$f},{path:"home",component:rc},{path:"shop",component:Hf},{path:"game",component:Wf},{path:"login",component:bp}],vp=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n})}static{this.\u0275inj=L({imports:[ml.forRoot(U0),ml]})}}return n})();var _p=(()=>{class n{constructor(e){this.router=e,this.title="bedrumor"}ayyo(){console.log("ayyo"),this.router.navigate(["/second"])}static{this.\u0275fac=function(i){return new(i||n)(w(me))}}static{this.\u0275cmp=te({type:n,selectors:[["app-root"]],decls:1,vars:0,template:function(i,r){i&1&&Y(0,"router-outlet")},dependencies:[ll]})}}return n})();var B0="@",z0=(()=>{class n{constructor(e,i,r,o,s){this.doc=e,this.delegate=i,this.zone=r,this.animationType=o,this.moduleImpl=s,this._rendererFactoryPromise=null,this.scheduler
115=x(bd,{optional:!0}),this.loadingSchedulerFn=x($0,{optional:!0})}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-H6ZRCINX.js").then(r=>r),i;return this.loadingSchedulerFn?i=this.loadingSchedulerFn(e):i=e(),i.catch(r=>{throw new q(5300,!1)}).then(({\u0275createEngine:r,\u0275AnimationRendererFactory:o})=>{this._engine=r(this.animationType,this.doc);let s=new o(this.delegate,this._engine,this.zone);return this.delegate=s,s})}createRenderer(e,i){let r=this.delegate.createRenderer(e,i);if(r.\u0275type===0)return r;typeof r.throwOnSyntheticProps=="boolean"&&(r.throwOnSyntheticProps=!1);let o=new Yc(r);return i?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(s=>{let a=s.createRenderer(e,i);o.use(a),this.scheduler?.notify(10)}).catch(s=>{o.use(r)}),o}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}static{this.\u0275fac=function(i){Fi()}}static{this.\u0275prov=S({token:n,factory:n.\u0275fac})}}return n})(),Yc=class{constructor(t){this.delegate=t,this.replay=[],this.\u0275type=1}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}get destroyNode(){return this.delegate.destroyNode}appendChild(t,e){this.delegate.appendChild(t,e)}insertBefore(t,e,i,r){this.delegate.insertBefore(t,e,i,r)}removeChild(t,e,i){this.delegate.removeChild(t,e,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){this.shouldReplay(e)&&this.replay.push(r=>r.setProperty(t,e,i)),this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.shouldReplay(e)&&this.replay.push(r=>r.listen(t,e,i)),this.delegate.listen(t,e,i)}shouldReplay(t){return this.replay!==null&&t.startsWith(B0)}},$0=new O("");function yp(n="animations"){return sa("NgAsyncAnimations"),Ti([{provide:Jr,useFactory:(t,e,i)=>new z0(t,e,i,n),deps:[N,go,P]},{provide:Pe,useValue:n==="noop"?"NoopAnimations":"BrowserAnimations"}])}var wp=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=V({type:n,bootstrap:[_p]})}static{this.\u0275inj=L({providers:[Jd(Xd()),yp()],imports:[su,vp]})}}return n})();ou().bootstrapModule(wp,{ngZoneEventCoalescing:!0}).catch(n=>console.error(n));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.