vendor: 18,829 bytes, line 1
1var b_=Object.defineProperty;var T_=(n,e,t)=>e in n?b_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var J=(n,e,t)=>T_(n,typeof e!="symbol"?e+"":e,t);import{j as O}from"./jsx-runtime-C-_spy54.js";import{r as W,B as E_,v as C_,R as qp,t as P_,u as x_,C as Hp,D as $p}from"./chunk-WWGJGFF6-C0XKGKIP.js";import{w as A_,x as S_,P as zp,q as R_,M as Wp,r as I_,y as Kp,z as Gp,B as D_,u as Yp,D as O_,t as Pr,E as V_,G as M_,J as k_,A as Ju,K as N_,N as Qp,O as L_,Q as F_,R as j_,S as ba,H as U_,U as B_,V as ah,W as q_,X as uh,Y as H_,_ as $_,Z as z_,$ as lh,a0 as W_,a1 as K_,a2 as bn,a3 as G_,a4 as Y_,a5 as Q_,a6 as X_,a7 as J_,a8 as Xp,a9 as Z_,aa as ev,ab as tv,ac as nv,ad as rv,ae as iv,af as sv}from"./hubspot-form-config-B5cTzcrc.js";import{g as ov,s as rt,m as Ft,c as Pi,b as Tn,r as av,d as uv,S as ce,T as ge}from"./Stack-D3GO8Xhv.js";import{B as Se}from"./Box-biwfKzby.js";import{a as lv,u as jt,b as cv}from"./useTheme-CSXbV86t.js";import{G as hv,g as xi,a as Bs,c as Gn,t as Is,J as ch,e as we,T as dv}from"./createTheme-BeHZTnLh.js";import{B as Jl,b as vo}from"./ButtonBase-Cd-IeK6P.js";import{u as Ai,k as qs,c as Hs,r as fv}from"./DefaultPropsProvider-DmzZhaO2.js";function Zl(n,e){n.indexOf(e)===-1&&n.push(e)}function ec(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const En=(n,e,t)=>t>e?e:t<n?n:t;let Da=()=>{};const Cn={},Jp=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),Zp=n=>/^0[^.\s]+$/u.test(n);function tc(n){let e;return()=>(e===void 0&&(e=n()),e)}const $t=n=>n,pv=(n,e)=>t=>e(n(t)),$s=(...n)=>n.reduce(pv),Ds=(n,e,t)=>{const r=e-n;return r===0?1:(t-n)/r};class nc{constructor(){this.subscriptions=[]}add(e){return Zl(this.subscriptions,e),()=>ec(this.subscriptions,e)}notify(e,t,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,t,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,t,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const dn=n=>n*1e3,Ht=n=>n/1e3;function em(n,e){return e?n*(1e3/e):0}const tm=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,mv=1e-7,gv=12;function yv(n,e,t,r,i){let s,o,u=0;do o=e+(t-e)/2,s=tm(o,r,i)-n,s>0?t=o:e=o;while(Math.abs(s)>mv&&++u<gv);return o}function zs(n,e,t,r){if(n===e&&t===r)return $t;const i=s=>yv(s,0,1,n,t);return s=>s===0||s===1?s:tm(i(s),e,r)}const nm=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,rm=n=>e=>1-n(1-e),im=zs(.33,1.53,.69,.99),rc=rm(im),sm=nm(rc),om=n=>(n*=2)<1?.5*rc(n):.5*(2-Math.pow(2,-10*(n-1))),ic=n=>1-Math.sin(Math.acos(n)),am=rm(ic),um=nm(ic),_v=zs(.42,0,1,1),vv=zs(0,0,.58,1),lm=zs(.42,0,.58,1),wv=n=>Array.isArray(n)&&typeof n[0]!="number",cm=n=>Array.isArray(n)&&typeof n[0]=="number",hh={linear:$t,easeIn:_v,easeInOut:lm,easeOut:vv,circIn:ic,circInOut:um,circOut:am,backIn:rc,backInOut:sm,backOut:im,anticipate:om},bv=n=>typeof n=="string",dh=n=>{if(cm(n)){Da(n.length===4);const[e,t,r,i]=n;return zs(e,t,r,i)}else if(bv(n))return Da(hh[n]!==void 0),hh[n];return n},wo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Tv(n,e){let t=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(h){o.has(h)&&(c.schedule(h),n()),h(u)}const c={schedule:(h,p=!1,g=!1)=>{const P=g&&i?t:r;return p&&o.add(h),P.has(h)||P.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(u=h,i){s=!0;return}i=!0,[t,r]=[r,t],t.forEach(l),t.clear(),i=!1,s&&(s=!1,c.process(h))}};return c}const Ev=40;function hm(n,e){let t=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>t=!0,o=wo.reduce((B,q)=>(B[q]=Tv(s),B),{}),{setup:u,read:l,resolveKeyframes:c,preUpdate:h,update:p,preRender:g,render:v,postRender:P}=o,A=()=>{const B=Cn.useManualTiming?i.timestamp:performance.now();t=!1,Cn.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(B-i.timestamp,Ev),1)),i.timestamp=B,i.isProcessing=!0,u.process(i),l.process(i),c.process(i),h.process(i),p.process(i),g.process(i),v.process(i),P.process(i),i.isProcessing=!1,t&&e&&(r=!1,n(A))},D=()=>{t=!0,r=!0,i.isProcessing||n(A)};return{schedule:wo.reduce((B,q)=>{const H=o[q];return B[q]=(K,x=!1,b=!1)=>(t||D(),H.schedule(K,x,b)),B},{}),cancel:B=>{for(let q=0;q<wo.length;q++)o[wo[q]].cancel(B)},state:i,steps:o}}const{schedule:Ve,cancel:Yn,state:yt,steps:Tu}=hm(typeof requestAnimationFrame<"u"?requestAnimationFrame:$t,!0);let Ta;function Cv(){Ta=void 0}const It={now:()=>(Ta===void 0&&It.set(yt.isProcessing||Cn.useManualTiming?yt.timestamp:performance.now()),Ta),set:n=>{Ta=n,queueMicrotask(Cv)}},dm=n=>e=>typeof e=="string"&&e.startsWith(n),fm=dm("--"),Pv=dm("var(--"),sc=n=>Pv(n)?xv.test(n.split("/*")[0].trim()):!1,xv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Si={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Os={...Si,transform:n=>En(0,1,n)},bo={...Si,default:1},bs=n=>Math.round(n*1e5)/1e5,oc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Av(n){return n==null}const Sv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ac=(n,e)=>t=>!!(typeof t=="string"&&Sv.test(t)&&t.startsWith(n)||e&&!Av(t)&&Object.prototype.hasOwnProperty.call(t,e)),pm=(n,e,t)=>r=>{if(typeof r!="string")return r;const[i,s,o,u]=r.match(oc);return{[n]:parseFloat(i),[e]:parseFloat(s),[t]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}},Rv=n=>En(0,255,n),Eu={...Si,transform:n=>Math.round(Rv(n))},Ir={test:ac("rgb","red"),parse:pm("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:r=1})=>"rgba("+Eu.transform(n)+", "+Eu.transform(e)+", "+Eu.transform(t)+", "+bs(Os.transform(r))+")"};function Iv(n){let e="",t="",r="",i="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),r=n.substring(5,7),i=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),r=n.substring(3,4),i=n.substring(4,5),e+=e,t+=t,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Zu={test:ac("#"),parse:Iv,transform:Ir.transform},Ws=n=>({test:e=>typeof e=="string"&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),Bn=Ws("deg"),fn=Ws("%"),ae=Ws("px"),Dv=Ws("vh"),Ov=Ws("vw"),fh={...fn,parse:n=>fn.parse(n)/100,transform:n=>fn.transform(n*100)},ai={test:ac("hsl","hue"),parse:pm("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:r=1})=>"hsla("+Math.round(n)+", "+fn.transform(bs(e))+", "+fn.transform(bs(t))+", "+bs(Os.transform(r))+")"},Ze={test:n=>Ir.test(n)||Zu.test(n)||ai.test(n),parse:n=>Ir.test(n)?Ir.parse(n):ai.test(n)?ai.parse(n):Zu.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ir.transform(n):ai.transform(n),getAnimatableNone:n=>{const e=Ze.parse(n);return e.alpha=0,Ze.transform(e)}},Vv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Mv(n){var e,t;return isNaN(n)&&typeof n=="string"&&(((e=n.match(oc))==null?void 0:e.length)||0)+(((t=n.match(Vv))==null?void 0:t.length)||0)>0}const mm="number",gm="color",kv="var",Nv="var(",ph="${}",Lv=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Vs(n){const e=n.toString(),t=[],r={color:[],number:[],var:[]},i=[];let s=0;const u=e.replace(Lv,l=>(Ze.test(l)?(r.color.push(s),i.push(gm),t.push(Ze.parse(l))):l.startsWith(Nv)?(r.var.push(s),i.push(kv),t.push(l)):(r.number.push(s),i.push(mm),t.push(parseFloat(l))),++s,ph)).split(ph);return{values:t,split:u,indexes:r,types:i}}function ym(n){return Vs(n).values}function _m(n){const{split:e,types:t}=Vs(n),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const u=t[o];u===mm?s+=bs(i[o]):u===gm?s+=Ze.transform(i[o]):s+=i[o]}return s}}const Fv=n=>typeof n=="number"?0:Ze.test(n)?Ze.getAnimatableNone(n):n;function jv(n){const e=ym(n);return _m(n)(e.map(Fv))}const Qn={test:Mv,parse:ym,createTransformer:_m,getAnimatableNone:jv};function Cu(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function Uv({hue:n,saturation:e,lightness:t,alpha:r}){n/=360,e/=100,t/=100;let i=0,s=0,o=0;if(!e)i=s=o=t;else{const u=t<.5?t*(1+e):t+e-t*e,l=2*t-u;i=Cu(l,u,n+1/3),s=Cu(l,u,n),o=Cu(l,u,n-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Oa(n,e){return t=>t>0?e:n}const Le=(n,e,t)=>n+(e-n)*t,Pu=(n,e,t)=>{const r=n*n,i=t*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Bv=[Zu,Ir,ai],qv=n=>Bv.find(e=>e.test(n));function mh(n){const e=qv(n);if(!e)return!1;let t=e.parse(n);return e===ai&&(t=Uv(t)),t}const gh=(n,e)=>{const t=mh(n),r=mh(e);if(!t||!r)return Oa(n,e);const i={...t};return s=>(i.red=Pu(t.red,r.red,s),i.green=Pu(t.green,r.green,s),i.blue=Pu(t.blue,r.blue,s),i.alpha=Le(t.alpha,r.alpha,s),Ir.transform(i))},el=new Set(["none","hidden"]);function Hv(n,e){return el.has(n)?t=>t<=0?n:e:t=>t>=1?e:n}function $v(n,e){return t=>Le(n,e,t)}function uc(n){return typeof n=="number"?$v:typeof n=="string"?sc(n)?Oa:Ze.test(n)?gh:Kv:Array.isArray(n)?vm:typeof n=="object"?Ze.test(n)?gh:zv:Oa}function vm(n,e){const t=[...n],r=t.length,i=n.map((s,o)=>uc(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)t[o]=i[o](s);return t}}function zv(n,e){const t={...n,...e},r={};for(const i in t)n[i]!==void 0&&e[i]!==void 0&&(r[i]=uc(n[i])(n[i],e[i]));return i=>{for(const s in r)t[s]=r[s](i);return t}}function Wv(n,e){const t=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=n.indexes[s][r[s]],u=n.values[o]??0;t[i]=u,r[s]++}return t}const Kv=(n,e)=>{const t=Qn.createTransformer(e),r=Vs(n),i=Vs(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?el.has(n)&&!i.values.length||el.has(e)&&!r.values.length?Hv(n,e):$s(vm(Wv(r,i),i.values),t):Oa(n,e)};function wm(n,e,t){return typeof n=="number"&&typeof e=="number"&&typeof t=="number"?Le(n,e,t):uc(n)(n,e)}const Gv=n=>{const e=({timestamp:t})=>n(t);return{start:(t=!0)=>Ve.update(e,t),stop:()=>Yn(e),now:()=>yt.isProcessing?yt.timestamp:It.now()}},bm=(n,e,t=10)=>{let r="";const i=Math.max(Math.round(e/t),2);for(let s=0;s<i;s++)r+=Math.round(n(s/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Va=2e4;function lc(n){let e=0;const t=50;let r=n.next(e);for(;!r.done&&e<Va;)e+=t,r=n.next(e);return e>=Va?1/0:e}function Yv(n,e=100,t){const r=t({...n,keyframes:[0,e]}),i=Math.min(lc(r),Va);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:Ht(i)}}const Qv=5;function Tm(n,e,t){const r=Math.max(e-Qv,0);return em(t-n(r),e-r)}const We={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},yh=.001;function Xv({duration:n=We.duration,bounce:e=We.bounce,velocity:t=We.velocity,mass:r=We.mass}){let i,s,o=1-e;o=En(We.minDamping,We.maxDamping,o),n=En(We.minDuration,We.maxDuration,Ht(n)),o<1?(i=c=>{const h=c*o,p=h*n,g=h-t,v=tl(c,o),P=Math.exp(-p);return yh-g/v*P},s=c=>{const p=c*o*n,g=p*t+t,v=Math.pow(o,2)*Math.pow(c,2)*n,P=Math.exp(-p),A=tl(Math.pow(c,2),o);return(-i(c)+yh>0?-1:1)*((g-v)*P)/A}):(i=c=>{const h=Math.exp(-c*n),p=(c-t)*n+1;return-.001+h*p},s=c=>{const h=Math.exp(-c*n),p=(t-c)*(n*n);return h*p});const u=5/n,l=Zv(i,s,u);if(n=dn(n),isNaN(l))return{stiffness:We.stiffness,damping:We.damping,duration:n};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:n}}}const Jv=12;function Zv(n,e,t){let r=t;for(let i=1;i<Jv;i++)r=r-n(r)/e(r);return r}function tl(n,e){return n*Math.sqrt(1-e*e)}const e0=["duration","bounce"],t0=["stiffness","damping","mass"];function _h(n,e){return e.some(t=>n[t]!==void 0)}function n0(n){let e={velocity:We.velocity,stiffness:We.stiffness,damping:We.damping,mass:We.mass,isResolvedFromDuration:!1,...n};if(!_h(n,t0)&&_h(n,e0))if(n.visualDuration){const t=n.visualDuration,r=2*Math.PI/(t*1.2),i=r*r,s=2*En(.05,1,1-(n.bounce||0))*Math.sqrt(i);e={...e,mass:We.mass,stiffness:i,damping:s}}else{const t=Xv(n);e={...e,...t,mass:We.mass},e.isResolvedFromDuration=!0}return e}function Ma(n=We.visualDuration,e=We.bounce){const t=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:e}:n;let{restSpeed:r,restDelta:i}=t;const s=t.keyframes[0],o=t.keyframes[t.keyframes.length-1],u={done:!1,value:s},{stiffness:l,damping:c,mass:h,duration:p,velocity:g,isResolvedFromDuration:v}=n0({...t,velocity:-Ht(t.velocity||0)}),P=g||0,A=c/(2*Math.sqrt(l*h)),D=o-s,M=Ht(Math.sqrt(l/h)),U=Math.abs(D)<5;r||(r=U?We.restSpeed.granular:We.restSpeed.default),i||(i=U?We.restDelta.granular:We.restDelta.default);let B;if(A<1){const H=tl(M,A);B=K=>{const x=Math.exp(-A*M*K);return o-x*((P+A*M*D)/H*Math.sin(H*K)+D*Math.cos(H*K))}}else if(A===1)B=H=>o-Math.exp(-M*H)*(D+(P+M*D)*H);else{const H=M*Math.sqrt(A*A-1);B=K=>{const x=Math.exp(-A*M*K),b=Math.min(H*K,300);return o-x*((P+A*M*D)*Math.sinh(b)+H*D*Math.cosh(b))/H}}const q={calculatedDuration:v&&p||null,next:H=>{const K=B(H);if(v)u.done=H>=p;else{let x=H===0?P:0;A<1&&(x=H===0?dn(P):Tm(B,H,K));const b=Math.abs(x)<=r,E=Math.abs(o-K)<=i;u.done=b&&E}return u.value=u.done?o:K,u},toString:()=>{const H=Math.min(lc(q),Va),K=bm(x=>q.next(H*x).value,H,30);return H+"ms "+K},toTransition:()=>{}};return q}Ma.applyToOptions=n=>{const e=Yv(n,100,Ma);return n.ease=e.ease,n.duration=dn(e.duration),n.type="keyframes",n};function nl({keyframes:n,velocity:e=0,power:t=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:u,max:l,restDelta:c=.5,restSpeed:h}){const p=n[0],g={done:!1,value:p},v=b=>u!==void 0&&b<u||l!==void 0&&b>l,P=b=>u===void 0?l:l===void 0||Math.abs(u-b)<Math.abs(l-b)?u:l;let A=t*e;const D=p+A,M=o===void 0?D:o(D);M!==D&&(A=M-p);const U=b=>-A*Math.exp(-b/r),B=b=>M+U(b),q=b=>{const E=U(b),I=B(b);g.done=Math.abs(E)<=c,g.value=g.done?M:I};let H,K;const x=b=>{v(g.value)&&(H=b,K=Ma({keyframes:[g.value,P(g.value)],velocity:Tm(B,b,g.value),damping:i,stiffness:s,restDelta:c,restSpeed:h}))};return x(0),{calculatedDuration:null,next:b=>{let E=!1;return!K&&H===void 0&&(E=!0,q(b),x(b)),H!==void 0&&b>=H?K.next(b-H):(!E&&q(b),g)}}}function r0(n,e,t){const r=[],i=t||Cn.mix||wm,s=n.length-1;for(let o=0;o<s;o++){let u=i(n[o],n[o+1]);if(e){const l=Array.isArray(e)?e[o]||$t:e;u=$s(l,u)}r.push(u)}return r}function i0(n,e,{clamp:t=!0,ease:r,mixer:i}={}){const s=n.length;if(Da(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=n[0]===n[1];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const u=r0(e,r,i),l=u.length,c=h=>{if(o&&h<n[0])return e[0];let p=0;if(l>1)for(;p<n.length-2&&!(h<n[p+1]);p++);const g=Ds(n[p],n[p+1],h);return u[p](g)};return t?h=>c(En(n[0],n[s-1],h)):c}function s0(n,e){const t=n[n.length-1];for(let r=1;r<=e;r++){const i=Ds(0,e,r);n.push(Le(t,1,i))}}function o0(n){const e=[0];return s0(e,n.length-1),e}function a0(n,e){return n.map(t=>t*e)}function u0(n,e){return n.map(()=>e||lm).splice(0,n.length-1)}function Ts({duration:n=300,keyframes:e,times:t,ease:r="easeInOut"}){const i=wv(r)?r.map(dh):dh(r),s={done:!1,value:e[0]},o=a0(t&&t.length===e.length?t:o0(e),n),u=i0(o,e,{ease:Array.isArray(i)?i:u0(e,i)});return{calculatedDuration:n,next:l=>(s.value=u(l),s.done=l>=n,s)}}const l0=n=>n!==null;function cc(n,{repeat:e,repeatType:t="loop"},r,i=1){const s=n.filter(l0),u=i<0||e&&t!=="loop"&&e%2===1?0:s.length-1;return!u||r===void 0?s[u]:r}const c0={decay:nl,inertia:nl,tween:Ts,keyframes:Ts,spring:Ma};function Em(n){typeof n.type=="string"&&(n.type=c0[n.type])}class hc{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const h0=n=>n/100;class dc extends hc{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:t}=this.options;t&&t.updatedAt!==It.now()&&this.tick(It.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Em(e);const{type:t=Ts,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:u}=e;const l=t||Ts;l!==Ts&&typeof u[0]!="number"&&(this.mixKeyframes=$s(h0,wm(u[0],u[1])),u=[0,100]);const c=l({...e,keyframes:u});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...u].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=lc(c));const{calculatedDuration:h}=c;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=c}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:h,repeat:p,repeatType:g,repeatDelay:v,type:P,onUpdate:A,finalKeyframe:D}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const M=this.currentTime-c*(this.playbackSpeed>=0?1:-1),U=this.playbackSpeed>=0?M<0:M>i;this.currentTime=Math.max(M,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let B=this.currentTime,q=r;if(p){const b=Math.min(this.currentTime,i)/u;let E=Math.floor(b),I=b%1;!I&&b>=1&&(I=1),I===1&&E--,E=Math.min(E,p+1),!!(E%2)&&(g==="reverse"?(I=1-I,v&&(I-=v/u)):g==="mirror"&&(q=o)),B=En(0,1,I)*u}const H=U?{done:!1,value:h[0]}:q.next(B);s&&(H.value=s(H.value));let{done:K}=H;!U&&l!==null&&(K=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const x=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&K);return x&&P!==nl&&(H.value=cc(h,this.options,D,this.speed)),A&&A(H.value),x&&this.finish(),H}then(e,t){return this.finished.then(e,t)}get duration(){return Ht(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ht(e)}get time(){return Ht(this.currentTime)}set time(e){var t;e=dn(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(It.now());const t=this.playbackSpeed!==e;
1this.playbackSpeed=e,t&&(this.time=Ht(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=Gv,startTime:t}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=t??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(It.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}}function d0(n){for(let e=1;e<n.length;e++)n[e]??(n[e]=n[e-1])}const Dr=n=>n*180/Math.PI,rl=n=>{const e=Dr(Math.atan2(n[1],n[0]));return il(e)},f0={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:rl,rotateZ:rl,skewX:n=>Dr(Math.atan(n[1])),skewY:n=>Dr(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},il=n=>(n=n%360,n<0&&(n+=360),n),vh=rl,wh=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),bh=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),p0={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wh,scaleY:bh,scale:n=>(wh(n)+bh(n))/2,rotateX:n=>il(Dr(Math.atan2(n[6],n[5]))),rotateY:n=>il(Dr(Math.atan2(-n[2],n[0]))),rotateZ:vh,rotate:vh,skewX:n=>Dr(Math.atan(n[4])),skewY:n=>Dr(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function sl(n){return n.includes("scale")?1:0}function ol(n,e){if(!n||n==="none")return sl(e);const t=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(t)r=p0,i=t;else{const u=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=f0,i=u}if(!i)return sl(e);const s=r[e],o=i[1].split(",").map(g0);return typeof s=="function"?s(o):o[s]}const m0=(n,e)=>{const{transform:t="none"}=getComputedStyle(n);return ol(t,e)};function g0(n){return parseFloat(n.trim())}const Ri=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ii=new Set(Ri),Th=n=>n===Si||n===ae,y0=new Set(["x","y","z"]),_0=Ri.filter(n=>!y0.has(n));function v0(n){const e=[];return _0.forEach(t=>{const r=n.getValue(t);r!==void 0&&(e.push([t,r.get()]),r.set(t.startsWith("scale")?1:0))}),e}const Vr={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:(n,{transform:e})=>ol(e,"x"),y:(n,{transform:e})=>ol(e,"y")};Vr.translateX=Vr.x;Vr.translateY=Vr.y;const Mr=new Set;let al=!1,ul=!1,ll=!1;function Cm(){if(ul){const n=Array.from(Mr).filter(r=>r.needsMeasurement),e=new Set(n.map(r=>r.element)),t=new Map;e.forEach(r=>{const i=v0(r);i.length&&(t.set(r,i),r.render())}),n.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=t.get(r);i&&i.forEach(([s,o])=>{var u;(u=r.getValue(s))==null||u.set(o)})}),n.forEach(r=>r.measureEndState()),n.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ul=!1,al=!1,Mr.forEach(n=>n.complete(ll)),Mr.clear()}function Pm(){Mr.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ul=!0)})}function w0(){ll=!0,Pm(),Cm(),ll=!1}class fc{constructor(e,t,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Mr.add(this),al||(al=!0,Ve.read(Pm),Ve.resolveKeyframes(Cm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&t){const u=r.readValue(t,o);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}d0(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Mr.delete(this)}cancel(){this.state==="scheduled"&&(Mr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const b0=n=>n.startsWith("--");function T0(n,e,t){b0(e)?n.style.setProperty(e,t):n.style[e]=t}const E0=tc(()=>window.ScrollTimeline!==void 0),C0={};function P0(n,e){const t=tc(n);return()=>C0[e]??t()}const xm=P0(()=>{try{document.createElement("div").animate({opacity:0}
1,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ms=([n,e,t,r])=>`cubic-bezier(${n}, ${e}, ${t}, ${r})`,Eh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ms([0,.65,.55,1]),circOut:ms([.55,0,1,.45]),backIn:ms([.31,.01,.66,-.59]),backOut:ms([.33,1.53,.69,.99])};function Am(n,e){if(n)return typeof n=="function"?xm()?bm(n,e):"ease-out":cm(n)?ms(n):Array.isArray(n)?n.map(t=>Am(t,e)||Eh.easeOut):Eh[n]}function x0(n,e,t,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:u="easeOut",times:l}={},c=void 0){const h={[e]:t};l&&(h.offset=l);const p=Am(u,i);Array.isArray(p)&&(h.easing=p);const g={delay:r,duration:i,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return c&&(g.pseudoElement=c),n.animate(h,g)}function Sm(n){return typeof n=="function"&&"applyToOptions"in n}function A0({type:n,...e}){return Sm(n)&&xm()?n.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class S0 extends hc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:u,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,Da(typeof e.type!="string");const c=A0(e);this.animation=x0(t,r,i,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=cc(i,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(h):T0(t,r,h),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var t,r;const e=((r=(t=this.animation.effect)==null?void 0:t.getComputedTiming)==null?void 0:r.call(t).duration)||0;return Ht(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ht(e)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=dn(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&E0()?(this.animation.timeline=e,$t):t(this)}}const Rm={anticipate:om,backInOut:sm,circInOut:um};function R0(n){return n in Rm}function I0(n){typeof n.ease=="string"&&R0(n.ease)&&(n.ease=Rm[n.ease])}const Ch=10;class D0 extends S0{constructor(e){I0(e),Em(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const u=new dc({...o,autoplay:!1}),l=dn(this.finishedTime??this.time);t.setWithVelocity(u.sample(l-Ch).value,u.sample(l).value,Ch),u.stop()}}const Ph=(n,e)=>e==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Qn.test(n)||n==="0")&&!n.startsWith("url("));function O0(n){const e=n[0];if(n.length===1)return!0;for(let t=0;t<n.length;t++)if(n[t]!==e)return!0}function V0(n,e,t,r){const i=n[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=n[n.length-1],o=Ph(i,e),u=Ph(s,e);return!o||!u?!1:O0(n)||(t==="spring"||Sm(t))&&r}function cl(n){n.duration=0,n.type="keyframes"}const M0=new Set(["opacity","clipPath","filter","transform"]),k0=tc(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function N0(n){var h;const{motionValue:e,name:t,repeatDelay:r,repeatType:i,damping:s,type:o}=n;
1if(!(((h=e==null?void 0:e.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return k0()&&t&&M0.has(t)&&(t!=="transform"||!c)&&!l&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const L0=40;class F0 extends hc{constructor({autoplay:e=!0,delay:t=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:u,name:l,motionValue:c,element:h,...p}){var P;super(),this.stop=()=>{var A,D;this._animation&&(this._animation.stop(),(A=this.stopTimeline)==null||A.call(this)),(D=this.keyframeResolver)==null||D.cancel()},this.createdAt=It.now();const g={autoplay:e,delay:t,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:c,element:h,...p},v=(h==null?void 0:h.KeyframeResolver)||fc;this.keyframeResolver=new v(u,(A,D,M)=>this.onKeyframesResolved(A,D,g,!M),l,c,h),(P=this.keyframeResolver)==null||P.scheduleResolve()}onKeyframesResolved(e,t,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:u,delay:l,isHandoff:c,onUpdate:h}=r;this.resolvedAt=It.now(),V0(e,s,o,u)||((Cn.instantAnimations||!l)&&(h==null||h(cc(e,r,t))),e[0]=e[e.length-1],cl(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>L0?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...r,keyframes:e},v=!c&&N0(g)?new D0({...g,element:g.motionValue.owner.current}):new dc(g);v.finished.then(()=>this.notifyFinished()).catch($t),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),w0()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const j0=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function U0(n){const e=j0.exec(n);if(!e)return[,];const[,t,r,i]=e;return[`--${t??r}`,i]}function Im(n,e,t=1){const[r,i]=U0(n);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return Jp(o)?parseFloat(o):o}return sc(i)?Im(i,e,t+1):i}function pc(n,e){return(n==null?void 0:n[e])??(n==null?void 0:n.default)??n}const Dm=new Set(["width","height","top","left","right","bottom",...Ri]),B0={test:n=>n==="auto",parse:n=>n},Om=n=>e=>e.test(n),Vm=[Si,ae,fn,Bn,Ov,Dv,B0],xh=n=>Vm.find(Om(n));function q0(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Zp(n):!0}const H0=new Set(["brightness","contrast","saturate","opacity"]);function $0(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[r]=t.match(oc)||[];if(!r)return n;const i=t.replace(r,"");let s=H0.has(e)?1:0;return r!==t&&(s*=100),e+"("+s+i+")"}const z0=/\b([a-z-]*)\(.*?\)/gu,hl={...Qn,getAnimatableNone:n=>{const e=n.match(z0);return e?e.map($0).join(" "):n}},Ah={...Si,transform:Math.round},W0={rotate:Bn,rotateX:Bn,rotateY:Bn,rotateZ:Bn,scale:bo,scaleX:bo,scaleY:bo,scaleZ:bo,skew:Bn,skewX:Bn,skewY:Bn,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Os,originX:fh,originY:fh,originZ:ae},mc={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,backgroundPositionX:ae,backgroundPositionY:ae,...W0,zIndex:Ah,fillOpacity:Os,strokeOpacity:Os,numOctaves:Ah},K0={...mc,color:Ze,backgroundColor:Ze,outlineColor:Ze,fill:Ze,stroke:Ze,borderColor:Ze,borderTopColor:Ze,borderRightColor:Ze,borderBottomColor:Ze,borderLeftColor:Ze,filter:hl,WebkitFilter:hl},Mm=n=>K0[n];function km(n,e){let t=Mm(n);return t!==hl&&(t=Qn),t.getAnimatableNone?t.getAnimatableNone(e):void 0}
vendor: 10,486 bytes, line 1
1const G0=new Set(["auto","none","0"]);function Y0(n,e,t){let r=0,i;for(;r<n.length&&!i;){const s=n[r];typeof s=="string"&&!G0.has(s)&&Vs(s).values.length&&(i=n[r]),r++}if(i&&t)for(const s of e)n[s]=km(t,i)}class Q0 extends fc{constructor(e,t,r,i,s){super(e,t,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:r}=this;if(!t||!t.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),sc(c))){const h=Im(c,t.current);h!==void 0&&(e[l]=h),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Dm.has(r)||e.length!==2)return;const[i,s]=e,o=xh(i),u=xh(s);if(o!==u)if(Th(o)&&Th(u))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Vr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||q0(e[i]))&&r.push(i);r.length&&Y0(e,r,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vr[r](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var u;const{element:e,name:t,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Vr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function X0(n,e,t){if(n instanceof EventTarget)return[n];if(typeof n=="string"){let r=document;const i=(t==null?void 0:t[n])??r.querySelectorAll(n);return i?Array.from(i):[]}return Array.from(n)}const Nm=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Sh=30,J0=n=>!isNaN(parseFloat(n));class Z0{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;const i=It.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=It.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=J0(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new nc);const r=this.events[e].add(t);return e==="change"?()=>{r(),Ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,r){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=It.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Sh)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,Sh);return em(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mi(n,e){return new Z0(n,e)}const{schedule:gc,cancel:MR}=hm(queueMicrotask,!1),Qt={x:!1,y:!1};function Lm(){return Qt.x||Qt.y}function ew(n){return n==="x"||n==="y"?Qt[n]?null:(Qt[n]=!0,()=>{Qt[n]=!1}):Qt.x||Qt.y?null:(Qt.x=Qt.y=!0,()=>{Qt.x=Qt.y=!1})}function Fm(n,e){const t=X0(n),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[t,i,()=>r.abort()]}function Rh(n){return!(n.pointerType==="touch"||Lm())}function tw(n,e,t={}){const[r,i,s]=Fm(n,t),o=u=>{if(!Rh(u))return;const{target:l}=u,c=e(l,u);if(typeof c!="function"||!l)return;const h=p=>{Rh(p)&&(c(p),l.removeEventListener("pointerleave",h))};l.addEventListener("pointerleave",h,i)};return r.forEach(u=>{u.addEventListener("pointerenter",o,i)}),s}const jm=(n,e)=>e?n===e?!0:jm(n,e.parentElement):!1,yc=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,nw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function rw(n){return nw.has(n.tagName)||n.tabIndex!==-1}const Ea=new WeakSet;function Ih(n){return e=>{e.key==="Enter"&&n(e)}}function xu(n,e){n.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const iw=(n,e)=>{const t=n.currentTarget;if(!t)return;const r=Ih(()=>{if(Ea.has(t))return;xu(t,"down");const i=Ih(()=>{xu(t,"up")}),s=()=>xu(t,"cancel");t.addEventListener("keyup",i,e),t.addEventListener("blur",s,e)});t.addEventListener("keydown",r,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",r),e)};function Dh(n){return yc(n)&&!Lm()}function sw(n,e,t={}){const[r,i,s]=Fm(n,t),o=u=>{const l=u.currentTarget;if(!Dh(u))return;Ea.add(l);const c=e(l,u),h=(v,P)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),Ea.has(l)&&Ea.delete(l),Dh(v)&&typeof c=="function"&&c(v,{success:P})},p=v=>{h(v,l===window||l===document||t.useGlobalTarget||jm(l,v.target))},g=v=>{h(v,!1)};window.addEventListener("pointerup",p,i),window.addEventListener("pointercancel",g,i)};return r.forEach(u=>{(t.useGlobalTarget?window:u).addEventListener("pointerdown",o,i),A_(u)&&(u.addEventListener("focus",c=>iw(c,i)),!rw(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),s}function Um(n){return S_(n)&&"ownerSVGElement"in n}function ow(n){return Um(n)&&n.tagName==="svg"}const Et=n=>!!(n&&n.getVelocity),aw=[...Vm,Ze,Qn],uw=n=>aw.find(Om(n)),Bm=W.createContext({strict:!1}),Oh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gi={};for(const n in Oh)gi[n]={isEnabled:e=>Oh[n].some(t=>!!e[t])};function lw(n){for(const e in n)gi[e]={...gi[e],...n[e]}}const cw=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ka(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||cw.has(n)}let qm=n=>!ka(n);function hw(n){typeof n=="function"&&(qm=e=>e.startsWith("on")?!ka(e):n(e))}try{hw(require("@emotion/is-prop-valid").default)}catch{}function dw(n,e,t){const r={};for(const i in n)i==="values"&&typeof n.values=="object"||(qm(i)||t===!0&&ka(i)||!e&&!ka(i)||n.draggable&&i.startsWith("onDrag"))&&(r[i]=n[i]);return r}const Ga=W.createContext({});function Ya(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Ms(n){return typeof n=="string"||Array.isArray(n)}const _c=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vc=["initial",..._c];function Qa(n){return Ya(n.animate)||vc.some(e=>Ms(n[e]))}function Hm(n){return!!(Qa(n)||n.variants)}function fw(n,e){if(Qa(n)){const{initial:t,animate:r}=n;return{initial:t===!1||Ms(t)?t:void 0,animate:Ms(r)?r:void 0}}return n.inherit!==!1?e:{}}function pw(n){const{initial:e,animate:t}=fw(n,W.useContext(Ga));return W.useMemo(()=>({initial:e,animate:t}),[Vh(e),Vh(t)])}function Vh(n){return Array.isArray(n)?n.join(" "):n}function Mh(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const as={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(ae.test(n))n=parseFloat(n);else return n;const t=Mh(n,e.target.x),r=Mh(n,e.target.y);return`${t}% ${r}%`}},mw={correct:(n,{treeScale:e,projectionDelta:t})=>{const r=n,i=Qn.parse(n);if(i.length>5)return r;const s=Qn.createTransformer(n),o=typeof i[0]!="number"?1:0,u=t.x.scale*e.x,l=t.y.scale*e.y;i[0+o]/=u,i[1+o]/=l;const c=Le(u,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}},dl={borderRadius:{...as,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:as,borderTopRightRadius:as,borderBottomLeftRadius:as,borderBottomRightRadius:as,boxShadow:mw};function $m(n,{layout:e,layoutId:t}){return Ii.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!dl[n]||n==="opacity")}const gw={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},yw=Ri.length;function _w(n,e,t){let r="",i=!0;for(let s=0;s<yw;s++){const o=Ri[s],u=n[o];if(u===void 0)continue;let l=!0;if(typeof u=="number"?l=u===(o.startsWith("scale")?1:0):l=parseFloat(u)===0,!l||t){const c=Nm(u,mc[o]);if(!l){i=!1;const h=gw[o]||o;r+=`${h}(${c}) `}t&&(e[o]=c)}}return r=r.trim(),t?r=t(e,i?"":r):i&&(r="none"),r}function wc(n,e,t){const{style:r,vars:i,transformOrigin:s}=n;let o=!1,u=!1;for(const l in e){const c=e[l];
1if(Ii.has(l)){o=!0;continue}else if(fm(l)){i[l]=c;continue}else{const h=Nm(c,mc[l]);l.startsWith("origin")?(u=!0,s[l]=h):r[l]=h}}if(e.transform||(o||t?r.transform=_w(e,n.transform,t):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:c="50%",originZ:h=0}=s;r.transformOrigin=`${l} ${c} ${h}`}}const bc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zm(n,e,t){for(const r in e)!Et(e[r])&&!$m(r,t)&&(n[r]=e[r])}function vw({transformTemplate:n},e){return W.useMemo(()=>{const t=bc();return wc(t,e,n),Object.assign({},t.vars,t.style)},[e])}function ww(n,e){const t=n.style||{},r={};return zm(r,t,n),Object.assign(r,vw(n,e)),r}function bw(n,e){const t={},r=ww(n,e);return n.drag&&n.dragListener!==!1&&(t.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(t.tabIndex=0),t.style=r,t}const Tw={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ew={offset:"strokeDashoffset",array:"strokeDasharray"};function Cw(n,e,t=1,r=0,i=!0){n.pathLength=1;const s=i?Tw:Ew;n[s.offset]=ae.transform(-r);const o=ae.transform(e),u=ae.transform(t);n[s.array]=`${o} ${u}`}function Wm(n,{attrX:e,attrY:t,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...u},l,c,h){if(wc(n,u,c),l){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:p,style:g}=n;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete p.transformBox),e!==void 0&&(p.x=e),t!==void 0&&(p.y=t),r!==void 0&&(p.scale=r),i!==void 0&&Cw(p,i,s,o,!1)}const Km=()=>({...bc(),attrs:{}}),Gm=n=>typeof n=="string"&&n.toLowerCase()==="svg";function Pw(n,e,t,r){const i=W.useMemo(()=>{const s=Km();return Wm(s,e,Gm(r),n.transformTemplate,n.style),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};zm(s,n.style,n),i.style={...s,...i.style}}return i}const xw=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Tc(n){return typeof n!="string"||n.includes("-")?!1:!!(xw.indexOf(n)>-1||/[A-Z]/u.test(n))}function Aw(n,e,t,{latestValues:r},i,s=!1){const u=(Tc(n)?Pw:bw)(e,r,i,n),l=dw(e,typeof n=="string",s),c=n!==W.Fragment?{...l,...u,ref:t}:{},{children:h}=e,p=W.useMemo(()=>Et(h)?h.get():h,[h]);return W.createElement(n,{...c,children:p})}function kh(n){const e=[{},{}];return n==null||n.values.forEach((t,r)=>{e[0][r]=t.get(),e[1][r]=t.getVelocity()}),e}function Ec(n,e,t,r){if(typeof e=="function"){const[i,s]=kh(r);e=e(t!==void 0?t:n.custom,i,s)}if(typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"){const[i,s]=kh(r);e=e(t!==void 0?t:n.custom,i,s)}return e}function Ca(n){return Et(n)?n.get():n}function Sw({scrapeMotionValuesFromProps:n,createRenderState:e},t,r,i){return{latestValues:Rw(t,r,i,n),renderState:e()}}function Rw(n,e,t,r){const i={},s=r(n,{});for(const g in s)i[g]=Ca(s[g]);let{initial:o,animate:u}=n;const l=Qa(n),c=Hm(n);e&&c&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),u===void 0&&(u=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const p=h?u:o;if(p&&typeof p!="boolean"&&!Ya(p)){const g=Array.isArray(p)?p:[p];for(let v=0;v<g.length;v++){const P=Ec(n,g[v]);if(P){const{transitionEnd:A,transition:D,...M}=P;for(const U in M){let B=M[U];if(Array.isArray(B)){const q=h?B.length-1:0;B=B[q]}B!==null&&(i[U]=B)}for(const U in A)i[U]=A[U]}}}return i}const Ym=n=>(e,t)=>{const r=W.useContext(Ga),i=W.useContext(zp),s=()=>Sw(n,e,r,i);return t?s():R_(s)};function Cc(n,e,t){var s;const{style:r}=n,i={};for(const o in r)(Et(r[o])||e.style&&Et(e.style[o])||$m(o,n)||((s=t==null?void 0:t.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Iw=Ym({scrapeMotionValuesFromProps:Cc,createRenderState:bc});function Qm(n,e,t){const r=Cc(n,e,t);for(const i in n)if(Et(n[i])||Et(e[i])){const s=Ri.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=n[i]}return r}const Dw=Ym({scrapeMotionValuesFromProps:Qm,createRenderState:Km}),Ow=Symbol.for("motionComponentSymbol");function ui(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function Vw(n,e,t){return W.useCallback(r=>{r&&n.onMount&&n.onMount(r),e&&(r?e.mount(r):e.unmount()),t&&(typeof t=="function"?t(r):ui(t)&&(t.current=r))},[e])}const Pc=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Mw="framerAppearId",Xm="data-"+Pc(Mw),Jm=W.createContext({});function kw(n,e,t,r,i){var A,D;const{visualElement:s}=W.useContext(Ga),o=W.useContext(Bm),u=W.useContext(zp),l=W.useContext(Wp).reducedMotion,c=W.useRef(null);r=r||o.renderer,!c.current&&r&&(c.current=r(n,{visualState:e,parent:s,props:t,presenceContext:u,blockInitialAnimation:u?u.
1initial===!1:!1,reducedMotionConfig:l}));const h=c.current,p=W.useContext(Jm);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Nw(c.current,t,i,p);const g=W.useRef(!1);W.useInsertionEffect(()=>{h&&g.current&&h.update(t,u)});const v=t[Xm],P=W.useRef(!!v&&!((A=window.MotionHandoffIsComplete)!=null&&A.call(window,v))&&((D=window.MotionHasOptimisedAnimation)==null?void 0:D.call(window,v)));return I_(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),P.current&&h.animationState&&h.animationState.animateChanges())}),W.useEffect(()=>{h&&(!P.current&&h.animationState&&h.animationState.animateChanges(),P.current&&(queueMicrotask(()=>{var M;(M=window.MotionHandoffMarkAsComplete)==null||M.call(window,v)}),P.current=!1),h.enteringChildren=void 0)}),h}function Nw(n,e,t,r){const{layoutId:i,layout:s,drag:o,dragConstraints:u,layoutScroll:l,layoutRoot:c,layoutCrossfade:h}=e;n.projection=new t(n.latestValues,e["data-framer-portal-id"]?void 0:Zm(n.parent)),n.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||u&&ui(u),visualElement:n,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:c})}function Zm(n){if(n)return n.options.allowProjection!==!1?n.projection:Zm(n.parent)}function Au(n,{forwardMotionProps:e=!1}={},t,r){t&&lw(t);const i=Tc(n)?Dw:Iw;function s(u,l){let c;const h={...W.useContext(Wp),...u,layoutId:Lw(u)},{isStatic:p}=h,g=pw(u),v=i(u,p);if(!p&&Kp){Fw();const P=jw(h);c=P.MeasureLayout,g.visualElement=kw(n,v,h,r,P.ProjectionNode)}return O.jsxs(Ga.Provider,{value:g,children:[c&&g.visualElement?O.jsx(c,{visualElement:g.visualElement,...h}):null,Aw(n,u,Vw(v,g.visualElement,l),v,p,e)]})}s.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const o=W.forwardRef(s);return o[Ow]=n,o}function Lw({layoutId:n}){const e=W.useContext(Gp).id;return e&&n!==void 0?e+"-"+n:n}function Fw(n,e){W.useContext(Bm).strict}function jw(n){const{drag:e,layout:t}=gi;if(!e&&!t)return{};const r={...e,...t};return{MeasureLayout:e!=null&&e.isEnabled(n)||t!=null&&t.isEnabled(n)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Uw(n,e){if(typeof Proxy>"u")return Au;const t=new Map,r=(s,o)=>Au(s,o,n,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(t.has(o)||t.set(o,Au(o,void 0,n,e)),t.get(o))})}function eg({top:n,left:e,right:t,bottom:r}){return{x:{min:e,max:t},y:{min:n,max:r}}}function Bw({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function qw(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),r=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:r.y,right:r.x}}function Su(n){return n===void 0||n===1}function fl({scale:n,scaleX:e,scaleY:t}){return!Su(n)||!Su(e)||!Su(t)}function Sr(n){return fl(n)||tg(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function tg(n){return Nh(n.x)||Nh(n.y)}function Nh(n){return n&&n!=="0%"}function Na(n,e,t){const r=n-t,i=e*r;return t+i}function Lh(n,e,t,r,i){return i!==void 0&&(n=Na(n,i,r)),Na(n,t,r)+e}function pl(n,e=0,t=1,r,i){n.min=Lh(n.min,e,t,r,i),n.max=Lh(n.max,e,t,r,i)}function ng(n,{x:e,y:t}){pl(n.x,e.translate,e.scale,e.originPoint),pl(n.y,t.translate,t.scale,t.originPoint)}const Fh=.999999999999,jh=1.0000000000001;function Hw(n,e,t,r=!1){const i=t.length;if(!i)return;e.x=e.y=1;let s,o;for(let u=0;u<i;u++){s=t[u],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ci(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,ng(n,o)),r&&Sr(s.latestValues)&&ci(n,s.latestValues))}e.x<jh&&e.x>Fh&&(e.x=1),e.y<jh&&e.y>Fh&&(e.y=1)}function li(n,e){n.min=n.min+e,n.max=n.max+e}function Uh(n,e,t,r,i=.5){const s=Le(n.min,n.max,i);pl(n,e,t,s,r)}function ci(n,e){Uh(n.x,e.x,e.scaleX,e.scale,e.originX),Uh(n.y,e.y,e.scaleY,e.scale,e.originY)}function rg(n,e){return eg(qw(n.getBoundingClientRect(),e))}function $w(n,e,t){const r=rg(n,t),{scroll:i}=e;return i&&(li(r.x,i.offset.x),li(r.y,i.offset.y)),r}const Bh=()=>({translate:0,scale:1,origin:0,originPoint:0}),hi=()=>({x:Bh(),y:Bh()}),qh=()=>({min:0,max:0}),ot=()=>({x:qh(),y:qh()}),La={current:null},xc={current:!1};function ig(){if(xc.current=!0,!!Kp)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>La.current=n.matches;n.addEventListener("change",e),e()}else La.current=!1}const zw=new WeakMap;function Ww(n,e,t){for(const r in e){const i=e[r],s=t[r];
vendor: 5,052 bytes, line 1
1if(Et(i))n.addValue(r,i);else if(Et(s))n.addValue(r,mi(i,{owner:n}));else if(s!==i)if(n.hasValue(r)){const o=n.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=n.getStaticValue(r);n.addValue(r,mi(o!==void 0?o:i,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const Hh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Kw{scrapeMotionValuesFromProps(e,t,r){return{}}constructor({parent:e,props:t,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=fc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=It.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ve.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=Qa(t),this.isVariantNode=Hm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...p}=this.scrapeMotionValuesFromProps(t,{},this);for(const g in p){const v=p[g];l[g]!==void 0&&Et(v)&&v.set(l[g])}}mount(e){var t;this.current=e,zw.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),xc.current||ig(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:La.current,(t=this.parent)==null||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Yn(this.notifyUpdate),Yn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ii.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in gi){const t=gi[e];if(!t)continue;const{isEnabled:r,Feature:i}=t;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ot()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let r=0;r<Hh.length;r++){const i=Hh[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Ww(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
1addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const r=this.values.get(e);t!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&t!==void 0&&(r=mi(t===null?void 0:t,{owner:this}),this.addValue(e,r)),r}readValue(e,t){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Jp(r)||Zp(r))?r=parseFloat(r):!uw(r)&&Qn.test(t)&&(r=km(e,t)),this.setBaseTarget(e,Et(r)?r.get():r)),Et(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var s;const{initial:t}=this.props;let r;if(typeof t=="string"||typeof t=="object"){const o=Ec(this.props,t,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(t&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Et(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new nc),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){gc.render(this.render)}}class sg extends Kw{constructor(){super(...arguments),this.KeyframeResolver=Q0}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:r}){delete t[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Et(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function og(n,{style:e,vars:t},r,i){const s=n.style;let o;for(o in e)s[o]=e[o];i==null||i.applyProjectionStyles(s,r);for(o in t)s.setProperty(o,t[o])}function Gw(n){return window.getComputedStyle(n)}class Yw extends sg{constructor(){super(...arguments),this.type="html",this.renderInstance=og}readValueFromInstance(e,t){var r;if(Ii.has(t))return(r=this.projection)!=null&&r.isProjecting?sl(t):m0(e,t);{const i=Gw(e),s=(fm(t)?i.getPropertyValue(t):i[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return rg(e,t)}build(e,t,r){wc(e,t,r.transformTemplate)}scrapeMotionValuesFromProps(e,t,r){return Cc(e,t,r)}}const ag=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Qw(n,e,t,r){og(n,e,void 0,r);for(const i in e.attrs)n.setAttribute(ag.has(i)?i:Pc(i),e.attrs[i])}class Xw extends sg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ot}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ii.has(t)){const r=Mm(t);return r&&r.default||0}return t=ag.has(t)?t:Pc(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,r){return Qm(e,t,r)}build(e,t,r){Wm(e,t,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,t,r,i){Qw(e,t,r,i)}mount(e){this.isSVGTag=Gm(e.tagName),super.mount(e)}}const Jw=(n,e)=>Tc(n)?new Xw(e):new Yw(e,{allowProjection:n!==W.Fragment});function di(n,e,t){const r=n.getProps();return Ec(r,e,t!==void 0?t:r.custom,n)}const ml=n=>Array.isArray(n);function Zw(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,mi(t))}function eb(n){return ml(n)?n[n.length-1]||0:n}function tb(n,e){const t=di(n,e);let{transitionEnd:r={},transition:i={},...s}=t||{};s={...s,...r};for(const o in s){const u=eb(s[o]);Zw(n,o,u)}}function nb(n){return!!(Et(n)&&n.add)}function gl(n,e){const t=n.getValue("willChange");if(nb(t))return t.add(e);
vendor: 11,854 bytes, line 1
1if(!t&&Cn.WillChange){const r=new Cn.WillChange("auto");n.addValue("willChange",r),r.add(e)}}function ug(n){return n.props[Xm]}const rb=n=>n!==null;function ib(n,{repeat:e,repeatType:t="loop"},r){const i=n.filter(rb),s=e&&t!=="loop"&&e%2===1?0:i.length-1;return i[s]}const sb={type:"spring",stiffness:500,damping:25,restSpeed:10},ob=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),ab={type:"keyframes",duration:.8},ub={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lb=(n,{keyframes:e})=>e.length>2?ab:Ii.has(n)?n.startsWith("scale")?ob(e[1]):sb:ub;function cb({when:n,delay:e,delayChildren:t,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:u,from:l,elapsed:c,...h}){return!!Object.keys(h).length}const Ac=(n,e,t,r={},i,s)=>o=>{const u=pc(r,n)||{},l=u.delay||r.delay||0;let{elapsed:c=0}=r;c=c-dn(l);const h={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...u,delay:-c,onUpdate:g=>{e.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{o(),u.onComplete&&u.onComplete()},name:n,motionValue:e,element:s?void 0:i};cb(u)||Object.assign(h,lb(n,h)),h.duration&&(h.duration=dn(h.duration)),h.repeatDelay&&(h.repeatDelay=dn(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let p=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(cl(h),h.delay===0&&(p=!0)),(Cn.instantAnimations||Cn.skipAnimations)&&(p=!0,cl(h),h.delay=0),h.allowFlatten=!u.type&&!u.ease,p&&!s&&e.get()!==void 0){const g=ib(h.keyframes,u);if(g!==void 0){Ve.update(()=>{h.onUpdate(g),h.onComplete()});return}}return u.isSync?new dc(h):new F0(h)};function hb({protectedKeys:n,needsAnimating:e},t){const r=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,r}function lg(n,e,{delay:t=0,transitionOverride:r,type:i}={}){let{transition:s=n.getDefaultTransition(),transitionEnd:o,...u}=e;r&&(s=r);const l=[],c=i&&n.animationState&&n.animationState.getState()[i];for(const h in u){const p=n.getValue(h,n.latestValues[h]??null),g=u[h];if(g===void 0||c&&hb(c,h))continue;const v={delay:t,...pc(s||{},h)},P=p.get();if(P!==void 0&&!p.isAnimating&&!Array.isArray(g)&&g===P&&!v.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const M=ug(n);if(M){const U=window.MotionHandoffAnimation(M,h,Ve);U!==null&&(v.startTime=U,A=!0)}}gl(n,h),p.start(Ac(h,p,g,n.shouldReduceMotion&&Dm.has(h)?{type:!1}:v,n,A));const D=p.animation;D&&l.push(D)}return o&&Promise.all(l).then(()=>{Ve.update(()=>{o&&tb(n,o)})}),l}function cg(n,e,t,r=0,i=1){const s=Array.from(n).sort((c,h)=>c.sortNodePosition(h)).indexOf(e),o=n.size,u=(o-1)*r;return typeof t=="function"?t(s,o):i===1?s*r:u-s*r}function yl(n,e,t={}){var l;const r=di(n,e,t.type==="exit"?(l=n.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=n.getDefaultTransition()||{}}=r||{};t.transitionOverride&&(i=t.transitionOverride);const s=r?()=>Promise.all(lg(n,r,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(c=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:g}=i;return db(n,e,c,h,p,g,t)}:()=>Promise.resolve(),{when:u}=i;if(u){const[c,h]=u==="beforeChildren"?[s,o]:[o,s];return c().then(()=>h())}else return Promise.all([s(),o(t.delay)])}function db(n,e,t=0,r=0,i=0,s=1,o){const u=[];for(const l of n.variantChildren)l.notify("AnimationStart",e),u.push(yl(l,e,{...o,delay:t+(typeof r=="function"?0:r)+cg(n.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(u)}function fb(n,e,t={}){n.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>yl(n,s,t));r=Promise.all(i)}else if(typeof e=="string")r=yl(n,e,t);else{const i=typeof e=="function"?di(n,e,t.custom):e;r=Promise.all(lg(n,i,t))}return r.then(()=>{n.notify("AnimationComplete",e)})}function hg(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let r=0;r<t;r++)if(e[r]!==n[r])return!1;return!0}const pb=vc.length;function dg(n){if(!n)return;if(!n.isControllingVariants){const t=n.parent?dg(n.parent)||{}:{};return n.props.initial!==void 0&&(t.initial=n.props.initial),t}const e={};for(let t=0;t<pb;t++){const r=vc[t],i=n.props[r];(Ms(i)||i===!1)&&(e[r]=i)}return e}const mb=[..._c].reverse(),gb=_c.length;function yb(n){return e=>Promise.all(e.map(({animation:t,options:r})=>fb(n,t,r)))}function _b(n){let e=yb(n),t=$h(),r=!0;const i=l=>(c,h)=>{var g;const p=di(n,h,l==="exit"?(g=n.presenceContext)==null?void 0:g.custom:void 0);if(p){const{transition:v,transitionEnd:P,...A}=p;c={...c,...A,...P}}return c};function s(l){e=l(n)}function o(l){const{props:c}=n,h=dg(n.parent)||{},p=[],g=new Set;let v={},P=1/0;for(let D=0;D<gb;D++){const M=mb[D],U=t[M],B=c[M]!==void 0?c[M]:h[M],q=Ms(B),H=M===l?U.isActive:null;H===!1&&(P=D);let K=B===h[M]&&B!==c[M]&&q;if(K&&r&&n.manuallyAnimateOnMount&&(K=!1),U.protectedKeys={...v},!U.isActive&&H===null||!B&&!U.prevProp||Ya(B)||typeof B=="boolean")continue;const x=vb(U.prevProp,B);let b=x||M===l&&U.isActive&&!K&&q||D>P&&q,E=!1;const I=Array.isArray(B)?B:[B];let S=I.reduce(i(M),{});H===!1&&(S={});const{prevResolvedValues:V={}}=U,C={...V,...S},Pe=fe=>{b=!0,g.has(fe)&&(E=!0,g.delete(fe)),U.needsAnimating[fe]=!0;const Ue=n.getValue(fe);Ue&&(Ue.liveStyle=!1)};for(const fe in C){const Ue=S[fe],it=V[fe];if(v.hasOwnProperty(fe))continue;let Dt=!1;ml(Ue)&&ml(it)?Dt=!hg(Ue,it):Dt=Ue!==it,Dt?Ue!=null?Pe(fe):g.add(fe):Ue!==void 0&&g.has(fe)?Pe(fe):U.protectedKeys[fe]=!0}U.prevProp=B,U.prevResolvedValues=S,U.isActive&&(v={...v,...S}),r&&n.blockInitialAnimation&&(b=!1);const Re=K&&x;b&&(!Re||E)&&p.push(...I.map(fe=>{const Ue={type:M};if(typeof fe=="string"&&r&&!Re&&n.manuallyAnimateOnMount&&n.parent){const{parent:it}=n,Dt=di(it,fe);if(it.enteringChildren&&Dt){const{delayChildren:pe}=Dt.transition||{};Ue.delay=cg(it.enteringChildren,n,pe)}}return{animation:fe,options:Ue}}))}if(g.size){const D={};if(typeof c.initial!="boolean"){const M=di(n,Array.isArray(c.initial)?c.initial[0]:c.initial);M&&M.transition&&(D.transition=M.transition)}g.forEach(M=>{const U=n.getBaseTarget(M),B=n.getValue(M);B&&(B.liveStyle=!0),D[M]=U??null}),p.push({animation:D})}let A=!!p.length;return r&&(c.initial===!1||c.initial===c.animate)&&!n.manuallyAnimateOnMount&&(A=!1),r=!1,A?e(p):Promise.resolve()}function u(l,c){var p;if(t[l].isActive===c)return Promise.resolve();(p=n.variantChildren)==null||p.forEach(g=>{var v;return(v=g.animationState)==null?void 0:v.setActive(l,c)}),t[l].isActive=c;const h=o(l);for(const g in t)t[g].protectedKeys={};return h}return{animateChanges:o,setActive:u,setAnimateFunction:s,getState:()=>t,reset:()=>{t=$h()}}}function vb(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!hg(e,n):!1}function xr(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $h(){return{animate:xr(!0),whileInView:xr(),whileHover:xr(),whileTap:xr(),whileDrag:xr(),whileFocus:xr(),exit:xr()}}class ir{constructor(e){this.isMounted=!1,this.node=e}update(){}}class wb extends ir{constructor(e){super(e),e.animationState||(e.animationState=_b(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ya(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let bb=0;class Tb extends ir{constructor(){super(...arguments),this.id=bb++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Eb={animation:{Feature:wb},exit:{Feature:Tb}};function ks(n,e,t,r={passive:!0}){return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t)}function Ks(n){return{point:{x:n.pageX,y:n.pageY}}}const Cb=n=>e=>yc(e)&&n(e,Ks(e));function Es(n,e,t,r){return ks(n,e,Cb(t),r)}const fg=1e-4,Pb=1-fg,xb=1+fg,pg=.01,Ab=0-pg,Sb=0+pg;function xt(n){return n.max-n.min}function Rb(n,e,t){return Math.abs(n-e)<=t}function zh(n,e,t,r=.5){n.origin=r,n.originPoint=Le(e.min,e.max,n.origin),n.scale=xt(t)/xt(e),n.translate=Le(t.min,t.max,n.origin)-n.originPoint,(n.scale>=Pb&&n.scale<=xb||isNaN(n.scale))&&(n.scale=1),(n.translate>=Ab&&n.translate<=Sb||isNaN(n.translate))&&(n.translate=0)}function Cs(n,e,t,r){zh(n.x,e.x,t.x,r?r.originX:void 0),zh(n.y,e.y,t.y,r?r.originY:void 0)}function Wh(n,e,t){n.min=t.min+e.min,n.max=n.min+xt(e)}function Ib(n,e,t){Wh(n.x,e.x,t.x),Wh(n.y,e.y,t.y)}function Kh(n,e,t){n.min=e.min-t.min,n.max=n.min+xt(e)}function Fa(n,e,t){Kh(n.x,e.x,t.x),Kh(n.y,e.y,t.y)}function qt(n){return[n("x"),n("y")]}const mg=({current:n})=>n?n.ownerDocument.defaultView:null,Gh=(n,e)=>Math.abs(n-e);function Db(n,e){const t=Gh(n.x,e.x),r=Gh(n.y,e.y);return Math.sqrt(t**2+r**2)}class gg{constructor(e,t,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Iu(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,P=Db(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!P)return;const{point:A}=g,{timestamp:D}=yt;this.history.push({...A,timestamp:D});const{onStart:M,onMove:U}=this.handlers;v||(M&&M(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),U&&U(this.lastMoveEvent,g)},this.handlePointerMove=(g,v)=>{this.lastMoveEvent=g,this.lastMoveEventInfo=Ru(v,this.transformPagePoint),Ve.update(this.updatePoint,!0)},this.handlePointerUp=(g,v)=>{this.end();const{onEnd:P,onSessionEnd:A,resumeAnimation:D}=this.handlers;if(this.dragSnapToOrigin&&D&&D(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=Iu(g.type==="pointercancel"?this.lastMoveEventInfo:Ru(v,this.transformPagePoint),this.history);this.startEvent&&P&&P(g,M),A&&A(g,M)},!yc(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const u=Ks(e),l=Ru(u,this.transformPagePoint),{point:c}=l,{timestamp:h}=yt;this.history=[{...c,timestamp:h}];const{onSessionStart:p}=t;p&&p(e,Iu(l,this.history)),this.removeListeners=$s(Es(this.contextWindow,"pointermove",this.handlePointerMove),Es(this.contextWindow,"pointerup",this.handlePointerUp),Es(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Yn(this.updatePoint)}}function Ru(n,e){return e?{point:e(n.point)}:n}function Yh(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Iu({point:n},e){return{point:n,delta:Yh(n,yg(e)),offset:Yh(n,Ob(e)),velocity:Vb(e,.1)}}function Ob(n){return n[0]}function yg(n){return n[n.length-1]}function Vb(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,r=null;const i=yg(n);for(;t>=0&&(r=n[t],!(i.timestamp-r.timestamp>dn(e)));)t--;if(!r)return{x:0,y:0};const s=Ht(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Mb(n,{min:e,max:t},r){return e!==void 0&&n<e?n=r?Le(e,n,r.min):Math.max(n,e):t!==void 0&&n>t&&(n=r?Le(t,n,r.max):Math.min(n,t)),n}function Qh(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function kb(n,{top:e,left:t,bottom:r,right:i}){return{x:Qh(n.x,t,i),y:Qh(n.y,e,r)}}function Xh(n,e){let t=e.min-n.min,r=e.max-n.max;return e.max-e.min<n.max-n.min&&([t,r]=[r,t]),{min:t,max:r}}function Nb(n,e){return{x:Xh(n.x,e.x),y:Xh(n.y,e.y)}}
vendor: 8,830 bytes, line 1
1function Lb(n,e){let t=.5;const r=xt(n),i=xt(e);return i>r?t=Ds(e.min,e.max-r,n.min):r>i&&(t=Ds(n.min,n.max-i,e.min)),En(0,1,t)}function Fb(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const _l=.35;function jb(n=_l){return n===!1?n=0:n===!0&&(n=_l),{x:Jh(n,"left","right"),y:Jh(n,"top","bottom")}}function Jh(n,e,t){return{min:Zh(n,e),max:Zh(n,t)}}function Zh(n,e){return typeof n=="number"?n:n[e]||0}const Ub=new WeakMap;class Bb{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ot(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=p=>{const{dragSnapToOrigin:g}=this.getProps();g?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Ks(p).point)},o=(p,g)=>{const{drag:v,dragPropagation:P,onDragStart:A}=this.getProps();if(v&&!P&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ew(v),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qt(M=>{let U=this.getAxisMotionValue(M).get()||0;if(fn.test(U)){const{projection:B}=this.visualElement;if(B&&B.layout){const q=B.layout.layoutBox[M];q&&(U=xt(q)*(parseFloat(U)/100))}}this.originPoint[M]=U}),A&&Ve.postRender(()=>A(p,g)),gl(this.visualElement,"transform");const{animationState:D}=this.visualElement;D&&D.setActive("whileDrag",!0)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:v,dragDirectionLock:P,onDirectionLock:A,onDrag:D}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:M}=g;if(P&&this.currentDirection===null){this.currentDirection=qb(M),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",g.point,M),this.updateAxis("y",g.point,M),this.visualElement.render(),D&&D(p,g)},l=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>qt(p=>{var g;return this.getAnimationState(p)==="paused"&&((g=this.getAxisMotionValue(p).animation)==null?void 0:g.play())}),{dragSnapToOrigin:h}=this.getProps();this.panSession=new gg(e,{onSessionStart:s,onStart:o,onMove:u,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:mg(this.visualElement)})}stop(e,t){const r=e||this.latestPointerEvent,i=t||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:u}=this.getProps();u&&Ve.postRender(()=>u(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,r){const{drag:i}=this.getProps();if(!r||!To(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=Mb(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:t}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&ui(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=kb(r.layoutBox,e):this.constraints=!1,this.elastic=jb(t),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&qt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Fb(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ui(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=$w(r,i.root,this.visualElement.getTransformPagePoint());let o=Nb(i.layout.layoutBox,s);if(t){const u=t(Bw(o));this.hasMutatedConstraints=!!u,u&&(o=eg(u))}return o}startAnimation(e){const{drag:t,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:u}=this.getProps(),l=this.constraints||{},c=qt(h=>{if(!To(h,t,this.currentDirection))return;let p=l[h]||{};o&&(p={min:0,max:0});const g=i?200:1e6,v=i?40:1e7,P={type:"inertia",velocity:r?e[h]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(h,P)});return Promise.all(c).then(u)}startAxisValueAnimation(e,t){const r=this.getAxisMotionValue(e);return gl(this.visualElement,e),r.start(Ac(e,r,0,t,this.visualElement,!1))}stopAnimation(){qt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){qt(e=>{var t;return(t=this.getAxisMotionValue(e).animation)==null?void 0:t.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)==null?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[t];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){qt(t=>{const{drag:r}=this.getProps();if(!To(t,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(t);if(i&&i.layout){const{min:o,max:u}=i.layout.layoutBox[t];s.set(e[t]-Le(o,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:r}=this.visualElement;if(!ui(t)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qt(o=>{const u=this.getAxisMotionValue(o);if(u&&this.constraints!==!1){const l=u.get();i[o]=Lb({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),qt(o=>{if(!To(o,e,null))return;const u=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];u.set(Le(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ub.set(this.visualElement,this);const e=this.visualElement.current,t=Es(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps();c&&h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ui(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ve.read(r);const o=ks(window,"resize",()=>this.scalePositionWithinConstraints()),u=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(qt(h=>{const p=this.getAxisMotionValue(h);p&&(this.originPoint[h]+=l[h].translate,p.set(p.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),u&&u()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=_l,dragMomentum:u=!0}=e;return{...e,drag:t,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:u}}}function To(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function qb(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class Hb extends ir{constructor(e){super(e),this.removeGroupControls=$t,this.removeListeners=$t,this.controls=new Bb(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$t}unmount(){this.removeGroupControls(),this.removeListeners()}}const ed=n=>(e,t)=>{n&&Ve.postRender(()=>n(e,t))};class $b extends ir{constructor(){super(...arguments),this.removePointerDownListener=$t}onPointerDown(e){this.session=new gg(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mg(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ed(e),onStart:ed(t),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Ve.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Es(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Pa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};
vendor: 17,402 bytes, line 1
1let Du=!1;class zb extends W.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;s&&(t.group&&t.group.add(s),r&&r.register&&i&&r.register(s),Du&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Pa.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Du=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Ve.postRender(()=>{const u=o.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),gc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:r}=this.props,{projection:i}=e;Du=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function _g(n){const[e,t]=D_(),r=W.useContext(Gp);return O.jsx(zb,{...n,layoutGroup:r,switchLayoutGroup:W.useContext(Jm),isPresent:e,safeToRemove:t})}function Wb(n,e,t){const r=Et(n)?n:mi(n);return r.start(Ac("",r,e,t)),r.animation}const Kb=(n,e)=>n.depth-e.depth;class Gb{constructor(){this.children=[],this.isDirty=!1}add(e){Zl(this.children,e),this.isDirty=!0}remove(e){ec(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Kb),this.isDirty=!1,this.children.forEach(e)}}function Yb(n,e){const t=It.now(),r=({timestamp:i})=>{const s=i-t;s>=e&&(Yn(r),n(s-e))};return Ve.setup(r,!0),()=>Yn(r)}const vg=["TopLeft","TopRight","BottomLeft","BottomRight"],Qb=vg.length,td=n=>typeof n=="string"?parseFloat(n):n,nd=n=>typeof n=="number"||ae.test(n);function Xb(n,e,t,r,i,s){i?(n.opacity=Le(0,t.opacity??1,Jb(r)),n.opacityExit=Le(e.opacity??1,0,Zb(r))):s&&(n.opacity=Le(e.opacity??1,t.opacity??1,r));for(let o=0;o<Qb;o++){const u=`border${vg[o]}Radius`;let l=rd(e,u),c=rd(t,u);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||nd(l)===nd(c)?(n[u]=Math.max(Le(td(l),td(c),r),0),(fn.test(c)||fn.test(l))&&(n[u]+="%")):n[u]=c}(e.rotate||t.rotate)&&(n.rotate=Le(e.rotate||0,t.rotate||0,r))}function rd(n,e){return n[e]!==void 0?n[e]:n.borderRadius}const Jb=wg(0,.5,am),Zb=wg(.5,.95,$t);function wg(n,e,t){return r=>r<n?0:r>e?1:t(Ds(n,e,r))}function id(n,e){n.min=e.min,n.max=e.max}function Gt(n,e){id(n.x,e.x),id(n.y,e.y)}function sd(n,e){n.translate=e.translate,n.scale=e.scale,n.originPoint=e.originPoint,n.origin=e.origin}function od(n,e,t,r,i){return n-=e,n=Na(n,1/t,r),i!==void 0&&(n=Na(n,1/i,r)),n}function eT(n,e=0,t=1,r=.5,i,s=n,o=n){if(fn.test(e)&&(e=parseFloat(e),e=Le(o.min,o.max,e/100)-o.min),typeof e!="number")return;let u=Le(s.min,s.max,r);n===s&&(u-=e),n.min=od(n.min,e,t,u,i),n.max=od(n.max,e,t,u,i)}function ad(n,e,[t,r,i],s,o){eT(n,e[t],e[r],e[i],e.scale,s,o)}const tT=["x","scaleX","originX"],nT=["y","scaleY","originY"];function ud(n,e,t,r){ad(n.x,e,tT,t?t.x:void 0,r?r.x:void 0),ad(n.y,e,nT,t?t.y:void 0,r?r.y:void 0)}function ld(n){return n.translate===0&&n.scale===1}function bg(n){return ld(n.x)&&ld(n.y)}function cd(n,e){return n.min===e.min&&n.max===e.max}function rT(n,e){return cd(n.x,e.x)&&cd(n.y,e.y)}function hd(n,e){return Math.round(n.min)===Math.round(e.min)&&Math.round(n.max)===Math.round(e.max)}function Tg(n,e){return hd(n.x,e.x)&&hd(n.y,e.y)}function dd(n){return xt(n.x)/xt(n.y)}function fd(n,e){return n.translate===e.translate&&n.scale===e.scale&&n.originPoint===e.originPoint}class iT{constructor(){this.members=[]}add(e){Zl(this.members,e),e.scheduleRender()}remove(e){if(ec(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(i=>e===i);if(t===0)return!1;let r;for(let i=t;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,t){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:r}=e;t.onExitComplete&&t.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function sT(n,e,t){let r="";const i=n.x.translate/e.x,s=n.y.translate/e.y,o=(t==null?void 0:t.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:c,rotate:h,rotateX:p,rotateY:g,skewX:v,skewY:P}=t;c&&(r=`perspective(${c}px) ${r}`),h&&(r+=`rotate(${h}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),v&&(r+=`skewX(${v}deg) `),P&&(r+=`skewY(${P}deg) `)}const u=n.x.scale*e.x,l=n.y.scale*e.y;return(u!==1||l!==1)&&(r+=`scale(${u}, ${l})`),r||"none"}const Ou=["","X","Y","Z"],oT=1e3;let aT=0;function Vu(n,e,t,r){const{latestValues:i}=e;i[n]&&(t[n]=i[n],e.setStaticValue(n,0),r&&(r[n]=0))}function Eg(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:e}=n.options;if(!e)return;const t=ug(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:i,layoutId:s}=n.options;window.MotionCancelOptimisedAnimation(t,"transform",Ve,!(i||s))}const{parent:r}=n;r&&!r.hasCheckedOptimisedAppear&&Eg(r)}function Cg({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},u=e==null?void 0:e()){this.id=aT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(cT),this.nodes.forEach(pT),this.nodes.forEach(mT),this.nodes.forEach(hT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Gb)}addEventListener(o,u){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new nc),this.eventHandlers.get(o).add(u)}notifyListeners(o,...u){const l=this.eventHandlers.get(o);l&&l.notify(...u)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Um(o)&&!ow(o),this.instance=o;const{layoutId:u,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||u)&&(this.isLayoutDirty=!0),n){let h,p=0;const g=()=>this.root.updateBlockedByResize=!1;Ve.read(()=>{p=window.innerWidth}),n(o,()=>{const v=window.innerWidth;v!==p&&(p=v,this.root.updateBlockedByResize=!0,h&&h(),h=Yb(g,250),Pa.hasAnimatedSinceResize&&(Pa.hasAnimatedSinceResize=!1,this.nodes.forEach(gd)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&c&&(u||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=this.options.transition||c.getDefaultTransition()||wT,{onLayoutAnimationStart:A,onLayoutAnimationComplete:D}=c.getProps(),M=!this.targetLayout||!Tg(this.targetLayout,v),U=!p&&g;if(this.options.layoutRoot||this.resumeFrom||U||p&&(M||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const B={...pc(P,"layout"),onPlay:A,onComplete:D};(c.shouldReduceMotion||this.options.layoutRoot)&&(B.delay=0,B.type=!1),this.startAnimation(B),this.setAnimationOrigin(h,U)}else p||gd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Yn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gT),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Eg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const p=this.path[h];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:l}=this.options;if(u===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(pd);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(md);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fT),this.nodes.forEach(uT),this.nodes.forEach(lT)):this.nodes.forEach(md),this.clearAllSnapshots();const u=It.now();yt.delta=En(0,1e3/60,u-yt.timestamp),yt.timestamp=u,yt.isProcessing=!0,Tu.update.process(yt),Tu.preRender.process(yt),Tu.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(dT),this.sharedNodes.forEach(yT)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xt(this.snapshot.measuredBox.x)&&!xt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=ot(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(u=!1),u&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!bg(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,h=c!==this.prevTransformTemplateValue;o&&this.instance&&(u||Sr(this.latestValues)||h)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const u=this.measurePageBox();let l=this.removeElementScroll(u);return o&&(l=this.removeTransform(l)),bT(l),{animationId:this.root.animationId,measuredBox:u,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:o}=this.options;if(!o)return ot();const u=o.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(TT))){const{scroll:h}=this.root;h&&(li(u.x,h.offset.x),li(u.y,h.offset.y))}return u}removeElementScroll(o){var l;const u=ot();if(Gt(u,o),(l=this.scroll)!=null&&l.wasRoot)return u;for(let c=0;c<this.path.length;c++){const h=this.path[c],{scroll:p,options:g}=h;h!==this.root&&p&&g.layoutScroll&&(p.wasRoot&&Gt(u,o),li(u.x,p.offset.x),li(u.y,p.offset.y))}return u}applyTransform(o,u=!1){const l=ot();Gt(l,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];!u&&h.options.layoutScroll&&h.scroll&&h!==h.root&&ci(l,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Sr(h.latestValues)&&ci(l,h.latestValues)}return Sr(this.latestValues)&&ci(l,this.latestValues),l}removeTransform(o){const u=ot();Gt(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Sr(c.latestValues))continue;fl(c.latestValues)&&c.updateSnapshot();const h=ot(),p=c.measurePageBox();Gt(h,p),ud(u,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,h)}return Sr(this.latestValues)&&ud(u,this.latestValues),u}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var v;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==u;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:p}=this.options;if(!this.layout||!(h||p))return;this.resolvedRelativeTargetAt=yt.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ot(),this.targetWithTransforms=ot()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ib(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gt(this.target,this.layout.layoutBox),ng(this.target,this.targetDelta)):Gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||fl(this.parent.latestValues)||tg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,u,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ot(),this.relativeTargetOrigin=ot(),Fa(this.relativeTargetOrigin,u,l),Gt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var P;const o=this.getLead(),u=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(P=this.parent)!=null&&P.isProjectionDirty)&&
vendor: 5,271 bytes, line 1
1(l=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;Gt(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;Hw(this.layoutCorrected,this.treeScale,this.path,u),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ot());const{target:v}=o;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sd(this.prevProjectionDelta.x,this.projectionDelta.x),sd(this.prevProjectionDelta.y,this.projectionDelta.y)),Cs(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!fd(this.projectionDelta.x,this.prevProjectionDelta.x)||!fd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hi(),this.projectionDelta=hi(),this.projectionDeltaWithTransform=hi()}setAnimationOrigin(o,u=!1){const l=this.snapshot,c=l?l.latestValues:{},h={...this.latestValues},p=hi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const g=ot(),v=l?l.source:void 0,P=this.layout?this.layout.source:void 0,A=v!==P,D=this.getStack(),M=!D||D.members.length<=1,U=!!(A&&!M&&this.options.crossfade===!0&&!this.path.some(vT));this.animationProgress=0;let B;this.mixTargetDelta=q=>{const H=q/1e3;yd(p.x,o.x,H),yd(p.y,o.y,H),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fa(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_T(this.relativeTarget,this.relativeTargetOrigin,g,H),B&&rT(this.relativeTarget,B)&&(this.isProjectionDirty=!1),B||(B=ot()),Gt(B,this.relativeTarget)),A&&(this.animationValues=h,Xb(h,c,this.latestValues,H,U,M)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var u,l,c;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Yn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ve.update(()=>{Pa.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=mi(0)),this.currentAnimation=Wb(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(oT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:u,target:l,layout:c,latestValues:h}=o;if(!(!u||!l||!c)){if(this!==o&&this.layout&&c&&Pg(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ot();const p=xt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+p;const g=xt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+g}Gt(u,l),ci(u,h),Cs(this.projectionDeltaWithTransform,this.layoutCorrected,u,h)}}registerSharedNode(o,u){this.sharedNodes.has(o)||this.sharedNodes.set(o,new iT),this.sharedNodes.get(o).add(u);const c=u.options.initialPromotionConfig;u.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(u):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var u;const{layoutId:o}=this.options;return o?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:o}=this.options;return o?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:u,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}
vendor: 4,211 bytes, line 1
1resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let u=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(u=!0),!u)return;const c={};l.z&&Vu("z",o,c,this.animationValues);for(let h=0;h<Ou.length;h++)Vu(`rotate${Ou[h]}`,o,c,this.animationValues),Vu(`skew${Ou[h]}`,o,c,this.animationValues);o.render();for(const h in c)o.setStaticValue(h,c[h]),this.animationValues&&(this.animationValues[h]=c[h]);o.scheduleRender()}applyProjectionStyles(o,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Ca(u==null?void 0:u.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Ca(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Sr(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const h=c.animationValues||c.latestValues;this.applyTransformsToTarget();let p=sT(this.projectionDeltaWithTransform,this.treeScale,h);l&&(p=l(h,p)),o.transform=p;const{x:g,y:v}=this.projectionDelta;o.transformOrigin=`${g.origin*100}% ${v.origin*100}% 0`,c.animationValues?o.opacity=c===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:o.opacity=c===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const P in dl){if(h[P]===void 0)continue;const{correct:A,applyTo:D,isCSSVariable:M}=dl[P],U=p==="none"?h[P]:A(h[P],c);if(D){const B=D.length;for(let q=0;q<B;q++)o[D[q]]=U}else M?this.options.visualElement.renderState.vars[P]=U:o[P]=U}this.options.layoutId&&(o.pointerEvents=c===this?Ca(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var u;return(u=o.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(pd),this.root.sharedNodes.clear()}}}function uT(n){n.updateLayout()}function lT(n){var t;const e=((t=n.resumeFrom)==null?void 0:t.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&e&&n.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=n.layout,{animationType:s}=n.options,o=e.source!==n.layout.source;s==="size"?qt(p=>{const g=o?e.measuredBox[p]:e.layoutBox[p],v=xt(g);g.min=r[p].min,g.max=g.min+v}):Pg(s,e.layoutBox,r)&&qt(p=>{const g=o?e.measuredBox[p]:e.layoutBox[p],v=xt(r[p]);g.max=g.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[p].max=n.relativeTarget[p].min+v)});const u=hi();Cs(u,r,e.layoutBox);const l=hi();o?Cs(l,n.applyTransform(i,!0),e.measuredBox):Cs(l,r,e.layoutBox);const c=!bg(u);let h=!1;if(!n.resumeFrom){const p=n.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:g,layout:v}=p;if(g&&v){const P=ot();Fa(P,e.layoutBox,g.layoutBox);const A=ot();Fa(A,r,v.layoutBox),Tg(P,A)||(h=!0),p.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=P,n.relativeParent=p)}}}n.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:u,hasLayoutChanged:c,hasRelativeLayoutChanged:h})}else if(n.isLead()){const{onExitComplete:r}=n.options;r&&r()}n.options.transition=void 0}function cT(n){n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function hT(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function dT(n){n.clearSnapshot()}function pd(n){n.clearMeasurements()}function md(n){n.isLayoutDirty=!1}function fT(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function gd(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function pT(n){n.resolveTargetDelta()}function mT(n){n.calcProjection()}
1function gT(n){n.resetSkewAndRotation()}function yT(n){n.removeLeadSnapshot()}function yd(n,e,t){n.translate=Le(e.translate,0,t),n.scale=Le(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function _d(n,e,t,r){n.min=Le(e.min,t.min,r),n.max=Le(e.max,t.max,r)}function _T(n,e,t,r){_d(n.x,e.x,t.x,r),_d(n.y,e.y,t.y,r)}function vT(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const wT={duration:.45,ease:[.4,0,.1,1]},vd=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),wd=vd("applewebkit/")&&!vd("chrome/")?Math.round:$t;function bd(n){n.min=wd(n.min),n.max=wd(n.max)}function bT(n){bd(n.x),bd(n.y)}function Pg(n,e,t){return n==="position"||n==="preserve-aspect"&&!Rb(dd(e),dd(t),.2)}function TT(n){var e;return n!==n.root&&((e=n.scroll)==null?void 0:e.wasRoot)}const ET=Cg({attachResizeListener:(n,e)=>ks(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Mu={current:void 0},xg=Cg({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Mu.current){const n=new ET({});n.mount(window),n.setOptions({layoutScroll:!0}),Mu.current=n}return Mu.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),CT={pan:{Feature:$b},drag:{Feature:Hb,ProjectionNode:xg,MeasureLayout:_g}};function Td(n,e,t){const{props:r}=n;n.animationState&&r.whileHover&&n.animationState.setActive("whileHover",t==="Start");const i="onHover"+t,s=r[i];s&&Ve.postRender(()=>s(e,Ks(e)))}class PT extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=tw(e,(t,r)=>(Td(this.node,r,"Start"),i=>Td(this.node,i,"End"))))}unmount(){}}class xT extends ir{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$s(ks(this.node.current,"focus",()=>this.onFocus()),ks(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ed(n,e,t){const{props:r}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&r.whileTap&&n.animationState.setActive("whileTap",t==="Start");const i="onTap"+(t==="End"?"":t),s=r[i];s&&Ve.postRender(()=>s(e,Ks(e)))}class AT extends ir{mount(){const{current:e}=this.node;e&&(this.unmount=sw(e,(t,r)=>(Ed(this.node,r,"Start"),(i,{success:s})=>Ed(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const vl=new WeakMap,ku=new WeakMap,ST=n=>{const e=vl.get(n.target);e&&e(n)},RT=n=>{n.forEach(ST)};function IT({root:n,...e}){const t=n||document;ku.has(t)||ku.set(t,{});const r=ku.get(t),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(RT,{root:n,...e})),r[i]}function DT(n,e,t){const r=IT(e);return vl.set(n,t),r.observe(n),()=>{vl.delete(n),r.unobserve(n)}}const OT={some:0,all:1};class VT extends ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:r,amount:i="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:OT[i]},u=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:h,onViewportLeave:p}=this.node.getProps(),g=c?h:p;g&&g(l)};return DT(this.node.current,o,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(MT(e,t))&&this.startObserver()}unmount(){}}function MT({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const kT={inView:{Feature:VT},tap:{Feature:AT},focus:{Feature:xT},hover:{Feature:PT}},NT={layout:{ProjectionNode:xg,MeasureLayout:_g}},LT={...Eb,...kT,...CT,...NT},Fr=Uw(LT,Jw);function FT(){!xc.current&&ig();const[n]=W.useState(La.current);return n}function jT(n,e,t,r,i){const[s,o]=W.useState(()=>i&&t?t(n).matches:r?r(n).matches:e);return lv(()=>{if(!t)return;const u=t(n),l=()=>{o(u.matches)};return l(),u.addEventListener("change",l),()=>{u.removeEventListener("change",l)}},[n,t]),s}const UT={...E_},Ag=UT.useSyncExternalStore;function BT(n,e,t,r,i){const s=W.useCallback(()=>e,[e]),o=W.useMemo(()=>
1{if(i&&t)return()=>t(n).matches;if(r!==null){const{matches:h}=r(n);return()=>h}return s},[s,n,r,i,t]),[u,l]=W.useMemo(()=>{if(t===null)return[s,()=>()=>{}];const h=t(n);return[()=>h.matches,p=>(h.addEventListener("change",p),()=>{h.removeEventListener("change",p)})]},[s,t,n]);return Ag(l,u,o)}function qT(n={}){const{themeId:e}=n;return function(r,i={}){let s=hv();s&&e&&(s=s[e]||s);const o=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:u=!1,matchMedia:l=o?window.matchMedia:null,ssrMatchMedia:c=null,noSsr:h=!1}=ov({name:"MuiUseMediaQuery",props:i,theme:s});let p=typeof r=="function"?r(s):r;return p=p.replace(/^@media( ?)/m,""),p.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(` 2`)),(Ag!==void 0?BT:jT)(p,u,l,c,h)}}function HT(n){return Bs("MuiPaper",n)}xi("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const $T=n=>{const{square:e,elevation:t,variant:r,classes:i}=n,s={root:["root",r,!e&&"rounded",r==="elevation"&&`elevation${t}`]};return Pi(s,HT,i)},zT=rt("div",{name:"MuiPaper",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,e[t.variant],!t.square&&e.rounded,t.variant==="elevation"&&e[`elevation${t.elevation}`]]}})(Ft(({theme:n})=>({backgroundColor:(n.vars||n).palette.background.paper,color:(n.vars||n).palette.text.primary,transition:n.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:n.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(n.vars||n).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),WT=W.forwardRef(function(e,t){var v;const r=Ai({props:e,name:"MuiPaper"}),i=jt(),{className:s,component:o="div",elevation:u=1,square:l=!1,variant:c="elevation",...h}=r,p={...r,component:o,elevation:u,square:l,variant:c},g=$T(p);return O.jsx(zT,{as:o,ownerState:p,className:Gn(g.root,s),ref:t,...h,style:{...c==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[u],...i.vars&&{"--Paper-overlay":(v=i.vars.overlays)==null?void 0:v[u]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Is("#fff",ch(u))}, ${Is("#fff",ch(u))})`}},...h.style}})});function KT(n){return Bs("MuiCircularProgress",n)}xi("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Yt=44,wl=qs` 3 0% { 4 transform: rotate(0deg); 5 } 6 7 100% { 8 transform: rotate(360deg); 9 } 10`,bl=qs` 11 0% { 12 stroke-dasharray: 1px, 200px; 13 stroke-dashoffset: 0; 14 } 15 16 50% { 17 stroke-dasharray: 100px, 200px; 18 stroke-dashoffset: -15px; 19 } 20 21 100% { 22 stroke-dasharray: 1px, 200px; 23 stroke-dashoffset: -126px; 24 } 25`,GT=typeof wl!="string"?Hs` 26 animation: ${wl} 1.4s linear infinite; 27 `:null,YT=typeof bl!="string"?Hs` 28 animation: ${bl} 1.4s ease-in-out infinite; 29 `:null,QT=n=>{const{classes:e,variant:t,color:r,disableShrink:i}=n,s={root:["root",t,`color${we(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${we(t)}`,i&&"circleDisableShrink"]};return Pi(s,KT,e)},XT=rt("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,e[t.variant],e[`color${we(t.color)}`]]}})(Ft(({theme:n})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:n.transitions.create("transform")}},{props:{variant:"indeterminate"},style:GT||{animation:`${wl} 1.4s linear infinite`}},...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{color:(n.vars||n).palette[e].main}}))]}))),JT=rt("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),ZT=rt("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(n,e)=>{const{ownerState:t}=n;
29return[e.circle,e[`circle${we(t.variant)}`],t.disableShrink&&e.circleDisableShrink]}})(Ft(({theme:n})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:n.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:YT||{animation:`${bl} 1.4s ease-in-out infinite`}}]}))),eE=rt("circle",{name:"MuiCircularProgress",slot:"Track"})(Ft(({theme:n})=>({stroke:"currentColor",opacity:(n.vars||n).palette.action.activatedOpacity}))),Sg=W.forwardRef(function(e,t){const r=Ai({props:e,name:"MuiCircularProgress"}),{className:i,color:s="primary",disableShrink:o=!1,enableTrackSlot:u=!1,size:l=40,style:c,thickness:h=3.6,value:p=0,variant:g="indeterminate",...v}=r,P={...r,color:s,disableShrink:o,size:l,thickness:h,value:p,variant:g,enableTrackSlot:u},A=QT(P),D={},M={},U={};if(g==="determinate"){const B=2*Math.PI*((Yt-h)/2);D.strokeDasharray=B.toFixed(3),U["aria-valuenow"]=Math.round(p),D.strokeDashoffset=`${((100-p)/100*B).toFixed(3)}px`,M.transform="rotate(-90deg)"}return O.jsx(XT,{className:Gn(A.root,i),style:{width:l,height:l,...M,...c},ownerState:P,ref:t,role:"progressbar",...U,...v,children:O.jsxs(JT,{className:A.svg,ownerState:P,viewBox:`${Yt/2} ${Yt/2} ${Yt} ${Yt}`,children:[u?O.jsx(eE,{className:A.track,ownerState:P,cx:Yt,cy:Yt,r:(Yt-h)/2,fill:"none",strokeWidth:h,"aria-hidden":"true"}):null,O.jsx(ZT,{className:A.circle,style:D,ownerState:P,cx:Yt,cy:Yt,r:(Yt-h)/2,fill:"none",strokeWidth:h})]})})});function tE(n){return Bs("MuiIconButton",n)}const Cd=xi("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),nE=n=>{const{classes:e,disabled:t,color:r,edge:i,size:s,loading:o}=n,u={root:["root",o&&"loading",t&&"disabled",r!=="default"&&`color${we(r)}`,i&&`edge${we(i)}`,`size${we(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Pi(u,tE,e)},rE=rt(Jl,{name:"MuiIconButton",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,t.loading&&e.loading,t.color!=="default"&&e[`color${we(t.color)}`],t.edge&&e[`edge${we(t.edge)}`],e[`size${we(t.size)}`]]}})(Ft(({theme:n})=>({textAlign:"center",flex:"0 0 auto",fontSize:n.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(n.vars||n).palette.action.active,transition:n.transitions.create("background-color",{duration:n.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":n.alpha((n.vars||n).palette.action.active,(n.vars||n).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ft(({theme:n})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{color:(n.vars||n).palette[e].main}})),...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":n.alpha((n.vars||n).palette[e].main,(n.vars||n).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:n.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:n.typography.pxToRem(28)}}],[`&.${Cd.disabled}`]:{backgroundColor:"transparent",color:(n.vars||n).palette.action.disabled},[`&.${Cd.loading}`]:{color:"transparent"}}))),iE=rt("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:n})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(n.vars||n).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Pd=W.forwardRef(function(e,t){const r=Ai({props:e,name:"MuiIconButton"}),{edge:i=!1,children:s,className:o,color:u="default",disabled:l=!1,disableFocusRipple:c=!1,size:h="medium",id:p,loading:g=null,loadingIndicator:v,...P}=r,A=Yp(p),D=v??O.jsx(Sg,{"aria-labelledby":A,color:"inherit",size:16}),M={...r,edge:i,color:u,disabled:l,disableFocusRipple:c,loading:g,loadingIndicator:D,size:h},U=nE(M);return O.jsxs(rE,{id:g?A:p,className:Gn(U.root,o),centerRipple:!0,focusRipple:!c,disabled:l||g,ref:t,...P,ownerState:M,children:[typeof g=="boolean"&&O.jsx("span",{className:U.loadingWrapper,style:{display:"contents"},children:O.jsx(iE,{className:U.loadingIndicator,ownerState:M,children:g&&D})}),s]})}),sE=W.createContext({}),oE=W.createContext(void 0),aE=n=>{const{color:e,disableElevation:t,fullWidth:r,size:i,variant:s,loading:o,loadingPosition:u,classes:l}=n,c={root:["root",o&&"loading",s,`${s}${we(e)}`,`size${we(i)}`,`${s}Size${we(i)}`,`color${we(e)}`,t&&"disableElevation",r&&"fullWidth",o&&`loadingPosition${we(u)}`],startIcon:["icon","startIcon",`iconSize${we(i)}`],endIcon:["icon","endIcon",`iconSize${we(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},h=Pi(c,O_,l);return{...l,...h}},Rg=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],uE=rt(Jl,{shouldForwardProp:n=>av(n)||n==="classes",name:"MuiButton",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,e[t.variant],e[`${t.variant}${we(t.color)}`],e[`size${we(t.size)}`],e[`${t.variant}Size${we(t.size)}`],t.color==="inherit"&&e.colorInherit,t.disableElevation&&e.disableElevation,t.fullWidth&&e.fullWidth,t.loading&&e.loading]}})(Ft(({theme:n})=>{const e=n.palette.mode==="light"?n.palette.grey[300]:n.palette.grey[800],t=n.palette.mode==="light"?n.palette.grey.A100:n.palette.grey[700];return{...n.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(n.vars||n).shape.borderRadius,transition:n.transitions.create(["background-color","box-shadow","border-color","color"],{duration:n.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Pr.disabled}`]:{color:(n.vars||n).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(n.vars||n).shadows[2],"&:hover":{boxShadow:(n.vars||n).shadows[4],"@media (hover: none)":{boxShadow:(n.vars||n).shadows[2]}},"&:active":{boxShadow:(n.vars||n).shadows[8]}
vendor: 5,001 bytes, line 29
29,[`&.${Pr.focusVisible}`]:{boxShadow:(n.vars||n).shadows[6]},[`&.${Pr.disabled}`]:{color:(n.vars||n).palette.action.disabled,boxShadow:(n.vars||n).shadows[0],backgroundColor:(n.vars||n).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Pr.disabled}`]:{border:`1px solid ${(n.vars||n).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(n.palette).filter(Tn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(n.vars||n).palette[r].main,"--variant-outlinedColor":(n.vars||n).palette[r].main,"--variant-outlinedBorder":n.alpha((n.vars||n).palette[r].main,.5),"--variant-containedColor":(n.vars||n).palette[r].contrastText,"--variant-containedBg":(n.vars||n).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(n.vars||n).palette[r].dark,"--variant-textBg":n.alpha((n.vars||n).palette[r].main,(n.vars||n).palette.action.hoverOpacity),"--variant-outlinedBorder":(n.vars||n).palette[r].main,"--variant-outlinedBg":n.alpha((n.vars||n).palette[r].main,(n.vars||n).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":n.vars?n.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":n.vars?n.vars.palette.Button.inheritContainedHoverBg:t,"--variant-textBg":n.alpha((n.vars||n).palette.text.primary,(n.vars||n).palette.action.hoverOpacity),"--variant-outlinedBg":n.alpha((n.vars||n).palette.text.primary,(n.vars||n).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:n.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:n.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:n.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:n.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:n.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:n.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Pr.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Pr.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),[`&.${Pr.loading}`]:{color:"transparent"}}}]}})),lE=rt("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.startIcon,t.loading&&e.startIconLoadingStart,e[`iconSize${we(t.size)}`]]}})(({theme:n})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Rg]})),cE=rt("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.endIcon,t.loading&&e.endIconLoadingEnd,e[`iconSize${we(t.size)}`]]}})(({theme:n})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Rg]})),hE=rt("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:n})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(n.vars||n).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),xd=rt("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Sc=W.forwardRef(function(e,t){const r=W.useContext(sE),i=W.useContext(oE),s=fv(r,e),o=A
29i({props:s,name:"MuiButton"}),{children:u,color:l="primary",component:c="button",className:h,disabled:p=!1,disableElevation:g=!1,disableFocusRipple:v=!1,endIcon:P,focusVisibleClassName:A,fullWidth:D=!1,id:M,loading:U=null,loadingIndicator:B,loadingPosition:q="center",size:H="medium",startIcon:K,type:x,variant:b="text",...E}=o,I=Yp(M),S=B??O.jsx(Sg,{"aria-labelledby":I,color:"inherit",size:16}),V={...o,color:l,component:c,disabled:p,disableElevation:g,disableFocusRipple:v,fullWidth:D,loading:U,loadingIndicator:S,loadingPosition:q,size:H,type:x,variant:b},C=aE(V),Pe=(K||U&&q==="start")&&O.jsx(lE,{className:C.startIcon,ownerState:V,children:K||O.jsx(xd,{className:C.loadingIconPlaceholder,ownerState:V})}),Re=(P||U&&q==="end")&&O.jsx(cE,{className:C.endIcon,ownerState:V,children:P||O.jsx(xd,{className:C.loadingIconPlaceholder,ownerState:V})}),Jt=i||"",fe=typeof U=="boolean"?O.jsx("span",{className:C.loadingWrapper,style:{display:"contents"},children:U&&O.jsx(hE,{className:C.loadingIndicator,ownerState:V,children:S})}):null;return O.jsxs(uE,{ownerState:V,className:Gn(r.className,C.root,h,Jt),component:c,disabled:p||U,focusRipple:!v,focusVisibleClassName:Gn(C.focusVisible,A),ref:t,type:x,id:U?I:M,...E,classes:C,children:[Pe,q!=="end"&&fe,u,q==="end"&&fe,Re]})});function dE(n){return Bs("MuiLinearProgress",n)}xi("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const Tl=4,El=qs` 30 0% { 31 left: -35%; 32 right: 100%; 33 } 34 35 60% { 36 left: 100%; 37 right: -90%; 38 } 39 40 100% { 41 left: 100%; 42 right: -90%; 43 } 44`,fE=typeof El!="string"?Hs` 45 animation: ${El} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; 46 `:null,Cl=qs` 47 0% { 48 left: -200%; 49 right: 100%; 50 } 51 52 60% { 53 left: 107%; 54 right: -8%; 55 } 56 57 100% { 58 left: 107%; 59 right: -8%; 60 } 61`,pE=typeof Cl!="string"?Hs` 62 animation: ${Cl} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; 63 `:null,Pl=qs` 64 0% { 65 opacity: 1; 66 background-position: 0 -23px; 67 } 68 69 60% { 70 opacity: 0; 71 background-position: 0 -23px; 72 } 73 74 100% { 75 opacity: 1; 76 background-position: -200px -23px; 77 } 78`,mE=typeof Pl!="string"?Hs` 79 animation: ${Pl} 3s infinite linear; 80 `:null,gE=n=>{const{classes:e,variant:t,color:r}=n,i={root:["root",`color${we(r)}`,t],dashed:["dashed",`dashedColor${we(r)}`],bar1:["bar","bar1",`barColor${we(r)}`,(t==="indeterminate"||t==="query")&&"bar1Indeterminate",t==="determinate"&&"bar1Determinate",t==="buffer"&&"bar1Buffer"],bar2:["bar","bar2",t!=="buffer"&&`barColor${we(r)}`,t==="buffer"&&`color${we(r)}`,(t==="indeterminate"||t==="query")&&"bar2Indeterminate",t==="buffer"&&"bar2Buffer"]};return Pi(i,dE,e)},Rc=(n,e)=>n.vars?n.vars.palette.LinearProgress[`${e}Bg`]:n.palette.mode==="light"?n.lighten(n.palette[e].main,.62):n.darken(n.palette[e].main,.5),yE=rt("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,e[`color${we(t.color)}`],e[t.variant]]}})(Ft(({theme:n})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{backgroundColor:Rc(n,e)}})),{props:({ownerState:e})=>e.color==="inherit"&&e.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),_E=rt("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.dashed,e[`dashedColor${we(t.color)}`]]}})(Ft(({theme:n})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(n.palette).filter(Tn()).map(([e])=>{const t=Rc(n,e);return{props:{color:e},style:{backgroundImage:`radial-gradient(${t} 0%, ${t} 16%, transparent 42%)`}}})]})),mE||{animation:`${Pl} 3s infinite linear`}),vE=rt("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.bar,e.bar1,e[`barColor${we(t.color)}`],(t.variant==="indeterminate"||t.variant==="query")&&e.bar1Indeterminate,t.variant==="determinate"&&e.bar1Determinate,t.variant==="buffer"&&e.bar1Buffer]}})(Ft(({theme:n})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{backgroundColor:(n.vars||n).palette[e].main}})),{props:{variant:"determinate"},style:{transition:`transform .${Tl}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${Tl}s linear`}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:{width:"auto"}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:fE||{animation:`${El} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),wE=rt("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.bar,e.bar2,e[`barColor${we(t.color)}`],(t.variant==="indeterminate"||t.variant==="query")&&e.bar2Indeterminate,t.variant==="buffer"&&e.bar2Buffer]}})(Ft(({theme:n})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e},style:{"--LinearProgressBar2-barColor":(n.vars||n).palette[e].main}})),{props:({ownerState:e})=>e.variant!=="buffer"&&e.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>e.variant!=="buffer"&&e.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(n.palette).filter(Tn()).map(([e])=>({props:{color:e,variant:"buffer"},style:{backgroundColor:Rc(n,e),transition:`transform .${Tl}s linear`}})),{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:{width:"auto"}},{props:({ownerState:e})=>e.variant==="indeterminate"||e.variant==="query",style:pE||{animation:`${Cl} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),bE=W.forwardRef(function(e,t){const r=Ai({props:e,name:"MuiLinearProgress"}),{className:i,color:s="primary",value:o,valueBuffer:u,variant:l="indeterminate",...c}=r,h={...r,color:s,variant:l},p=gE(h),g=cv(),v={},P={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&o!==void 0){v["aria-valuenow"]=Math.round(o),v["aria-valuemin"]=0,v["aria-valuemax"]=100;let A=o-100;g&&(A=-A),P.bar1.transform=`translateX(${A}%)`}if(l==="buffer"&&u!==void 0){let A=(u||0)-100;g&&(A=-A),P.bar2.transform=`translateX(${A}%)`}return O.jsxs(yE,{className:Gn(p.root,i),ownerState:h,role:"progressbar",...v,ref:t,...c,children:[l==="buffer"?O.jsx(_E,{className:p.dashed,ownerState:h}):null,O.jsx(vE,{className:p.bar1,ownerState:h,style:P.bar1}),l==="determinate"?null:O.jsx(wE,{className:p.bar2,ownerState:h,style:P.bar2})]})});function TE(n){return Bs("MuiMobileStepper",n)}const Ad=xi("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]),EE=n=>{const{classes:e,position:t}=n,r={root:["root",`position${we(t)}`],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return Pi(r,TE,e)}
80,CE=rt(WT,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:t}=n;return[e.root,e[`position${we(t.position)}`]]}})(Ft(({theme:n})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:(n.vars||n).palette.background.default,padding:8,variants:[{props:({position:e})=>e==="top"||e==="bottom",style:{position:"fixed",left:0,right:0,zIndex:(n.vars||n).zIndex.mobileStepper}},{props:{position:"top"},style:{top:0}},{props:{position:"bottom"},style:{bottom:0}}]}))),PE=rt("div",{name:"MuiMobileStepper",slot:"Dots"})({variants:[{props:{variant:"dots"},style:{display:"flex",flexDirection:"row"}}]}),xE=rt("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:n=>uv(n)&&n!=="dotActive",overridesResolver:(n,e)=>{const{dotActive:t}=n;return[e.dot,t&&e.dotActive]}})(Ft(({theme:n})=>({variants:[{props:{variant:"dots"},style:{transition:n.transitions.create("background-color",{duration:n.transitions.duration.shortest}),backgroundColor:(n.vars||n).palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"}},{props:{variant:"dots",dotActive:!0},style:{backgroundColor:(n.vars||n).palette.primary.main}}]}))),AE=rt(bE,{name:"MuiMobileStepper",slot:"Progress"})({variants:[{props:{variant:"progress"},style:{width:"50%"}}]}),SE=W.forwardRef(function(e,t){const r=Ai({props:e,name:"MuiMobileStepper"}),{activeStep:i=0,backButton:s,className:o,LinearProgressProps:u,nextButton:l,position:c="bottom",steps:h,variant:p="dots",slots:g={},slotProps:v={},...P}=r,A={...r,activeStep:i,position:c,variant:p};let D;p==="progress"&&(h===1?D=100:D=Math.ceil(i/(h-1)*100));const M=EE(A),U={slots:g,slotProps:{progress:u,...v}},[B,q]=vo("root",{ref:t,elementType:CE,shouldForwardComponentProp:!0,className:Gn(M.root,o),externalForwardedProps:{...U,...P},ownerState:A,additionalProps:{square:!0,elevation:0}}),[H,K]=vo("dots",{className:M.dots,elementType:PE,externalForwardedProps:U,ownerState:A}),[x,b]=vo("dot",{elementType:xE,externalForwardedProps:U,ownerState:A}),[E,I]=vo("progress",{className:M.progress,elementType:AE,shouldForwardComponentProp:!0,externalForwardedProps:U,ownerState:A,additionalProps:{value:D,variant:"determinate"}});return O.jsxs(B,{...q,children:[s,p==="text"&&O.jsxs(W.Fragment,{children:[i+1," / ",h]}),p==="dots"&&O.jsx(H,{...K,children:[...new Array(h)].map((S,V)=>O.jsx(x,{...b,className:Gn(M.dot,b.className,V===i&&M.dotActive),dotActive:V===i},V))}),p==="progress"&&O.jsx(E,{...I}),l]})}),RE=qT({themeId:dv}),Me=(n,e)=>xi(`omk-${n}`,e),Ig=6048e5,IE=864e5,DE=6e4,OE=36e5,VE=1e3,Sd=Symbol.for("constructDateFrom");function dt(n,e){return typeof n=="function"?n(e):n&&typeof n=="object"&&Sd in n?n[Sd](e):n instanceof Date?new n.constructor(e):new Date(e)}function nt(n,e){return dt(e||n,n)}function Dg(n,e,t){const r=nt(n,t==null?void 0:t.in);return isNaN(e)?dt((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}let ME={};function Di(){return ME}function Xn(n,e){var u,l,c,h;const t=Di(),r=(e==null?void 0:e.weekStartsOn)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.weekStartsOn)??t.weekStartsOn??((h=(c=t.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??0,i=nt(n,e==null?void 0:e.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function yi(n,e){return Xn(n,{...e,weekStartsOn:1})}function Og(n,e){const t=nt(n,e==null?void 0:e.in),r=t.getFullYear(),i=dt(t,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=yi(i),o=dt(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=yi(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=u.getTime()?r:r-1}function ja(n){const e=nt(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function kE(n,...e){const t=dt.bind(null,e.find(r=>typeof r=="object"));return e.map(t)}function Rd(n,e){const t=nt(n,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function NE(n,e,t){const[r,i]=kE(t==null?void 0:t.in,n,e),s=Rd(r),o=Rd(i),u=+s-ja(s),l=+o-ja(o);return Math.round((u-l)/IE)}function LE(n,e){const t=Og(n,e),r=dt(n,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),yi(r)}function FE(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function xl(n){return!(!FE(n)&&typeof n!="number"||isNaN(+nt(n)))}function jE(n,e){const t=nt(n,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const UE={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},BE=(n,e,t)=>{let r;const i=UE[n];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function Nu(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const qE={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},HE={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$E={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zE={date:Nu({formats:qE,defaultWidth:"full"}),time:Nu({formats:HE,defaultWidth:"full"}),dateTime:Nu({formats:$E,defaultWidth:"full"})},WE={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},KE=(n,e,t,r)=>WE[n];function us(n){return(e,t)=>{const r=t!=null&&t.context?String(t.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const o=n.defaultFormattingWidth||n.defaultWidth,u=t!=null&&t.width?String(t.width):o;i=n.formattingValues[u]||n.formattingValues[o]}else{const o=n.defaultWidth,u=t!=null&&t.width?String(t.width):n.defaultWidth;i=n.values[u]||n.values[o]}const s=n.argumentCallback?n.argumentCallback(e):e;return i[s]}}const GE={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YE={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QE={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XE={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
80ay","Saturday"]},JE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},e1=(n,e)=>{const t=Number(n),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},t1={ordinalNumber:e1,era:us({values:GE,defaultWidth:"wide"}),quarter:us({values:YE,defaultWidth:"wide",argumentCallback:n=>n-1}),month:us({values:QE,defaultWidth:"wide"}),day:us({values:XE,defaultWidth:"wide"}),dayPeriod:us({values:JE,defaultWidth:"wide",formattingValues:ZE,defaultFormattingWidth:"wide"})};function ls(n){return(e,t={})=>{const r=t.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=e.match(i);if(!s)return null;const o=s[0],u=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(u)?r1(u,p=>p.test(o)):n1(u,p=>p.test(o));let c;c=n.valueCallback?n.valueCallback(l):l,c=t.valueCallback?t.valueCallback(c):c;const h=e.slice(o.length);return{value:c,rest:h}}}function n1(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function r1(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function i1(n){return(e,t={})=>{const r=e.match(n.matchPattern);if(!r)return null;const i=r[0],s=e.match(n.parsePattern);if(!s)return null;let o=n.valueCallback?n.valueCallback(s[0]):s[0];o=t.valueCallback?t.valueCallback(o):o;const u=e.slice(i.length);return{value:o,rest:u}}}const s1=/^(\d+)(th|st|nd|rd)?/i,o1=/\d+/i,a1={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},u1={any:[/^b/i,/^(a|c)/i]},l1={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},c1={any:[/1/i,/2/i,/3/i,/4/i]},h1={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},d1={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},f1={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},p1={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},m1={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},g1={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},y1={ordinalNumber:i1({matchPattern:s1,parsePattern:o1,valueCallback:n=>parseInt(n,10)}),era:ls({matchPatterns:a1,defaultMatchWidth:"wide",parsePatterns:u1,defaultParseWidth:"any"}),quarter:ls({matchPatterns:l1,defaultMatchWidth:"wide",parsePatterns:c1,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ls({matchPatterns:h1,defaultMatchWidth:"wide",parsePatterns:d1,defaultParseWidth:"any"}),day:ls({matchPatterns:f1,defaultMatchWidth:"wide",parsePatterns:p1,defaultParseWidth:"any"}),dayPeriod:ls({matchPatterns:m1,defaultMatchWidth:"any",parsePatterns:g1,defaultParseWidth:"any"})},Vg={code:"en-US",formatDistance:BE,formatLong:zE,formatRelative:KE,localize:t1,match:y1,options:{weekStartsOn:0,firstWeekContainsDate:1}};function _1(n,e){const t=nt(n,e==null?void 0:e.in);return NE(t,jE(t))+1}function Mg(n,e){const t=nt(n,e==null?void 0:e.in),r=+yi(t)-+LE(t);return Math.round(r/Ig)+1}function Ic(n,e){var h,p,g,v;const t=nt(n,e==null?void 0:e.in),r=t.getFullYear(),i=Di(),s=(e==null?void 0:e.firstWeekContainsDate)??((p=(h=e==null?void 0:e.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(g=i.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,o=dt((e==null?void 0:e.in)||n,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const u=Xn(o,e),l=dt((e==null?void 0:e.in)||n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Xn(l,e);return+t>=+u?r+1:+t>=+c?r:r-1}function v1(n,e){var u,l,c,h;const t=Di(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:l.firstWeekContainsDate)??t.firstWeekContainsDate??((h=(c=t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,i=Ic(n,e),s=dt((e==null?void 0:e.in)||n,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Xn(s,e)}function kg(n,e){const t=nt(n,e==null?void 0:e.in),r=+Xn(t,e)-+v1(t,e);return Math.round(r/Ig)+1}function Ce(n,e){const t=n<0?"-":"",r=Math.abs(n).toString().padStart(e,"0");return t+r}const Un={y(n,e){const t=n.getFullYear(),r=t>0?t:1-t;return Ce(e==="yy"?r%100:r,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):Ce(t+1,2)},d(n,e){return Ce(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return Ce(n.getHours()%12||12,e.length)},H(n,e){return Ce(n.getHours(),e.length)},m(n,e){return Ce(n.getMinutes(),e.length)},s(n,e){return Ce(n.getSeconds(),e.length)},S(n,e){const t=e.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,t-3));return Ce(i,e.length)}},Zr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Id={G:function(n,e,t){const r=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return t.ordinalNumber(i,{unit:"year"})}return Un.y(n,e)},Y:function(n,e,t,r){const i=Ic(n,r),s=i>0?i:1-i;if(e==="YY"){const o=s%100;return Ce(o,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Ce(s,e.length)},R:function(n,e){const t=Og(n);return Ce(t,e.length)},u:function(n,e){const t=n.getFullYear();return Ce(t,e.length)},Q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Ce(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,e,t){const r=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Ce(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,e,t){const r=n.getMonth();switch(e){case"M":case"MM":return Un.M(n,e);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(n,e,t){const r=n.getMonth();switch(e){case"L":return String(r+1);case"LL":return Ce(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(n,e,t,r){const i=kg(n,r);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Ce(i,e.length)},I:function(n,e,t){const r=Mg(n);return e==="Io"?t.ordinalNumber(r,{unit:"week"}):Ce(r,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):Un.d(n,e)},D:function(n,e,t){const r=_1(n);return e==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):Ce(r,e.length)},E:function(n,e,t){const r=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(n,e,t,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ce(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(n,e,t,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ce(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(n,e,t){const r=n.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return Ce(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(n,e,t){const i=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,e,t){const r=n.getHours();let i;switch(r===12?i=Zr.noon:r===0?i=Zr.midnight:i=r/12>
vendor: 4,316 bytes, line 80
80=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,e,t){const r=n.getHours();let i;switch(r>=17?i=Zr.evening:r>=12?i=Zr.afternoon:r>=4?i=Zr.morning:i=Zr.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let r=n.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return Un.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):Un.H(n,e)},K:function(n,e,t){const r=n.getHours()%12;return e==="Ko"?t.ordinalNumber(r,{unit:"hour"}):Ce(r,e.length)},k:function(n,e,t){let r=n.getHours();return r===0&&(r=24),e==="ko"?t.ordinalNumber(r,{unit:"hour"}):Ce(r,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):Un.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):Un.s(n,e)},S:function(n,e){return Un.S(n,e)},X:function(n,e,t){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Od(r);case"XXXX":case"XX":return Rr(r);case"XXXXX":case"XXX":default:return Rr(r,":")}},x:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"x":return Od(r);case"xxxx":case"xx":return Rr(r);case"xxxxx":case"xxx":default:return Rr(r,":")}},O:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Dd(r,":");case"OOOO":default:return"GMT"+Rr(r,":")}},z:function(n,e,t){const r=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Dd(r,":");case"zzzz":default:return"GMT"+Rr(r,":")}},t:function(n,e,t){const r=Math.trunc(+n/1e3);return Ce(r,e.length)},T:function(n,e,t){return Ce(+n,e.length)}};function Dd(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),s=r%60;return s===0?t+String(i):t+String(i)+e+Ce(s,2)}function Od(n,e){return n%60===0?(n>0?"-":"+")+Ce(Math.abs(n)/60,2):Rr(n,e)}function Rr(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),i=Ce(Math.trunc(r/60),2),s=Ce(r%60,2);return t+i+e+s}const Vd=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ng=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},w1=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],r=t[1],i=t[2];if(!i)return Vd(n,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Vd(r,e)).replace("{{time}}",Ng(i,e))},Al={p:Ng,P:w1},b1=/^D+$/,T1=/^Y+$/,E1=["D","DD","YY","YYYY"];function Lg(n){return b1.test(n)}function Fg(n){return T1.test(n)}function Sl(n,e,t){const r=C1(n,e,t);if(console.warn(r),E1.includes(n))throw new RangeError(r)}function C1(n,e,t){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const P1=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,x1=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A1=/^'([^]*?)'?$/,S1=/''/g,R1=/[a-zA-Z]/;function Md(n,e,t){var h,p,g,v;const r=Di(),i=r.locale??Vg,s=r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,o=r.weekStartsOn??((v=(g=r.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??0,u=nt(n,t==null?void 0:t.in);if(!xl(u))throw new RangeError("Invalid time value");let l=e.match(x1).map(P=>{const A=P[0];if(A==="p"||A==="P"){const D=Al[A];return D(P,i.formatLong)}return P}).join("").match(P1).map(P=>{if(P==="''")return{isToken:!1,value:"'"};const A=P[0];
vendor: 1,705 bytes, line 80
80if(A==="'")return{isToken:!1,value:I1(P)};if(Id[A])return{isToken:!0,value:P};if(A.match(R1))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:P}});i.localize.preprocessor&&(l=i.localize.preprocessor(u,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(P=>{if(!P.isToken)return P.value;const A=P.value;(Fg(A)||Lg(A))&&Sl(A,e,String(n));const D=Id[A[0]];return D(u,A,i.localize,c)}).join("")}function I1(n){const e=n.match(A1);return e?e[1].replace(S1,"'"):n}function D1(){return Object.assign({},Di())}function O1(n,e){const t=nt(n,e==null?void 0:e.in).getDay();return t===0?7:t}function V1(n,e){const t=M1(e)?new e(0):dt(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function M1(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const k1=10;class jg{constructor(){J(this,"subPriority",0)}validate(e,t){return!0}}class N1 extends jg{constructor(e,t,r,i,s){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=i,s&&(this.subPriority=s)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class L1 extends jg{constructor(t,r){super();J(this,"priority",k1);J(this,"subPriority",-1);this.context=t||(i=>dt(r,i))}set(t,r){return r.timestampIsSet?t:dt(t,V1(t,this.context))}}class Te{run(e,t,r,i){const s=this.parse(e,t,r,i);return s?{setter:new N1(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}validate(e,t,r){return!0}}class F1 extends Te{constructor(){super(...arguments);
vendor: 17,871 bytes, line 80
80J(this,"priority",140);J(this,"incompatibleTokens",["R","u","t","T"])}parse(t,r,i){switch(r){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}set(t,r,i){return r.era=i,t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}const Ye={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},un={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Qe(n,e){return n&&{value:e(n.value),rest:n.rest}}function Fe(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ln(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,i=t[2]?parseInt(t[2],10):0,s=t[3]?parseInt(t[3],10):0,o=t[5]?parseInt(t[5],10):0;return{value:r*(i*OE+s*DE+o*VE),rest:e.slice(t[0].length)}}function Ug(n){return Fe(Ye.anyDigitsSigned,n)}function Ke(n,e){switch(n){case 1:return Fe(Ye.singleDigit,e);case 2:return Fe(Ye.twoDigits,e);case 3:return Fe(Ye.threeDigits,e);case 4:return Fe(Ye.fourDigits,e);default:return Fe(new RegExp("^\\d{1,"+n+"}"),e)}}function Ua(n,e){switch(n){case 1:return Fe(Ye.singleDigitSigned,e);case 2:return Fe(Ye.twoDigitsSigned,e);case 3:return Fe(Ye.threeDigitsSigned,e);case 4:return Fe(Ye.fourDigitsSigned,e);default:return Fe(new RegExp("^-?\\d{1,"+n+"}"),e)}}function Dc(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Bg(n,e){const t=e>0,r=t?e:1-e;let i;if(r<=50)i=n||100;else{const s=r+50,o=Math.trunc(s/100)*100,u=n>=s%100;i=n+o-(u?100:0)}return t?i:1-i}function qg(n){return n%400===0||n%4===0&&n%100!==0}class j1 extends Te{constructor(){super(...arguments);J(this,"priority",130);J(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,r,i){const s=o=>({year:o,isTwoDigitYear:r==="yy"});switch(r){case"y":return Qe(Ke(4,t),s);case"yo":return Qe(i.ordinalNumber(t,{unit:"year"}),s);default:return Qe(Ke(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,i){const s=t.getFullYear();if(i.isTwoDigitYear){const u=Bg(i.year,s);return t.setFullYear(u,0,1),t.setHours(0,0,0,0),t}const o=!("era"in r)||r.era===1?i.year:1-i.year;return t.setFullYear(o,0,1),t.setHours(0,0,0,0),t}}class U1 extends Te{constructor(){super(...arguments);J(this,"priority",130);J(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,r,i){const s=o=>({year:o,isTwoDigitYear:r==="YY"});switch(r){case"Y":return Qe(Ke(4,t),s);case"Yo":return Qe(i.ordinalNumber(t,{unit:"year"}),s);default:return Qe(Ke(r.length,t),s)}}validate(t,r){return r.isTwoDigitYear||r.year>0}set(t,r,i,s){const o=Ic(t,s);if(i.isTwoDigitYear){const l=Bg(i.year,o);return t.setFullYear(l,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Xn(t,s)}const u=!("era"in r)||r.era===1?i.year:1-i.year;return t.setFullYear(u,0,s.firstWeekContainsDate),t.setHours(0,0,0,0),Xn(t,s)}}class B1 extends Te{constructor(){super(...arguments);J(this,"priority",130);J(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,r){return Ua(r==="R"?4:r.length,t)}set(t,r,i){const s=dt(t,0);return s.setFullYear(i,0,4),s.setHours(0,0,0,0),yi(s)}}class q1 extends Te{constructor(){super(...arguments);J(this,"priority",130);J(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,r){return Ua(r==="u"?4:r.length,t)}set(t,r,i){return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class H1 extends Te{constructor(){super(...arguments);J(this,"priority",120);J(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,i){switch(r){case"Q":case"QQ":return Ke(r.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=1&&r<=4}set(t,r,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}class $1 extends Te{constructor(){super(...arguments);J(this,"priority",120);J(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,r,i){switch(r){case"q":case"qq":return Ke(r.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=1&&r<=4}set(t,r,i){return t.setMonth((i-1)*3,1),t.setHours(0,0,0,0),t}}class z1 extends Te{constructor(){super(...arguments);J(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);J(this,"priority",110)}parse(t,r,i){const s=o=>o-1;switch(r){case"M":return Qe(Fe(Ye.month,t),s);case"MM":return Qe(Ke(2,t),s);case"Mo":return Qe(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=11}set(t,r,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}class W1 extends Te{constructor(){super(...arguments);J(this,"priority",110);J(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,r,i){const s=o=>o-1;switch(r){case"L":return Qe(Fe(Ye.month,t),s);case"LL":return Qe(Ke(2,t),s);case"Lo":return Qe(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=11}set(t,r,i){return t.setMonth(i,1),t.setHours(0,0,0,0),t}}function K1(n,e,t){const r=nt(n,t==null?void 0:t.in),i=kg(r,t)-e;return r.setDate(r.getDate()-i*7),nt(r,t==null?void 0:t.in)}class G1 extends Te{constructor(){super(...arguments);J(this,"priority",100);J(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,r,i){switch(r){case"w":return Fe(Ye.week,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ke(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,i,s){return Xn(K1(t,i,s),s)}}function Y1(n,e,t){const r=nt(n,t==null?void 0:t.in),i=Mg(r,t)-e;return r.setDate(r.getDate()-i*7),r}class Q1 extends Te{constructor(){super(...arguments);J(this,"priority",100);J(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,r,i){switch(r){case"I":return Fe(Ye.week,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ke(r.length,t)}}validate(t,r){return r>=1&&r<=53}set(t,r,i){return yi(Y1(t,i))}}const X1=[31,28,31,30,31,30,31,31,30,31,30,31],J1=[31,29,31,30,31,30,31,31,30,31,30,31];class Z1 extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"subPriority",1);J(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,r,i){switch(r){case"d":return Fe(Ye.date,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ke(r.length,t)}}validate(t,r){const i=t.getFullYear(),s=qg(i),o=t.getMonth();return s?r>=1&&r<=J1[o]:r>=1&&r<=X1[o]}set(t,r,i){return t.setDate(i),t.setHours(0,0,0,0),t}}class eC extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"subpriority",1);J(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,r,i){switch(r){case"D":case"DD":return Fe(Ye.dayOfYear,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ke(r.length,t)}}validate(t,r){const i=t.getFullYear();return qg(i)?r>=1&&r<=366:r>=1&&r<=365}set(t,r,i){return t.setMonth(0,i),t.setHours(0,0,0,0),t}}function Oc(n,e,t){var p,g,v,P;const r=Di(),i=(t==null?void 0:t.weekStartsOn)??((g=(p=t==null?void 0:t.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((P=(v=r.locale)==null?void 0:v.options)==null?void 0:P.weekStartsOn)??0,s=nt(n,t==null?void 0:t.in),o=s.getDay(),l=(e%7+7)%7,c=7-i,h=e<0||e>6?e-(o+c)%7:(l+c)%7-(o+c)%7;return Dg(s,h,t)}class tC extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,r,i){switch(r){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,i,s){return t=Oc(t,i,s),t.setHours(0,0,0,0),t}}class nC extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,r,i,s){const o=u=>{const l=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+l};switch(r){case"e":case"ee":return Qe(Ke(r.length,t),o);case"eo":return Qe(i.ordinalNumber(t,{unit:"day"}),o);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}validate(t,r){return r>=0&&r<=6}set(t,r,i,s){return t=Oc(t,i,s),t.setHours(0,0,0,0),t}}class rC extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,r,i,s){const o=u=>{const l=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+l};switch(r){case"c":case"cc":return Qe(Ke(r.length,t),o);case"co":return Qe(i.ordinalNumber(t,{unit:"day"}),o);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}validate(t,r){return r>=0&&r<=6}set(t,r,i,s){return t=Oc(t,i,s),t.setHours(0,0,0,0),t}}function iC(n,e,t){const r=nt(n,t==null?void 0:t.in),i=O1(r,t),s=e-i;return Dg(r,s,t)}class sC extends Te{constructor(){super(...arguments);J(this,"priority",90);J(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,r,i){const s=o=>o===0?7:o;switch(r){case"i":case"ii":return Ke(r.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Qe(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Qe(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Qe(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Qe(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}validate(t,r){return r>=1&&r<=7}set(t,r,i){return t=iC(t,i),t.setHours(0,0,0,0),t}}class oC extends Te{constructor(){super(...arguments);J(this,"priority",80);J(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,r,i){switch(r){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,i){return t.setHours(Dc(i),0,0,0),t}}class aC extends Te{constructor(){super(...arguments);J(this,"priority",80);J(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,r,i){switch(r){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,i){return t.setHours(Dc(i),0,0,0),t}}class uC extends Te{constructor(){super(...arguments);J(this,"priority",80);J(this,"incompatibleTokens",["a","b","t","T"])}parse(t,r,i){switch(r){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,r,i){return t.setHours(Dc(i),0,0,0),t}}class lC extends Te{constructor(){super(...arguments);J(this,"priority",70);J(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,r,i){switch(r){case"h":return Fe(Ye.hour12h,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ke(r.length,t)}}validate(t,r){return r>=1&&r<=12}set(t,r,i){const s=t.getHours()>=12;return s&&i<12?t.setHours(i+12,0,0,0):!s&&i===12?t.setHours(0,0,0,0):t.setHours(i,0,0,0),t}}class cC extends Te{constructor(){super(...arguments);J(this,"priority",70);J(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,r,i){switch(r){case"H":return Fe(Ye.hour23h,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ke(r.length,t)}}validate(t,r){return r>=0&&r<=23}set(t,r,i){return t.setHours(i,0,0,0),t}}class hC extends Te{constructor(){super(...arguments);J(this,"priority",70);J(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,r,i){switch(r){case"K":return Fe(Ye.hour11h,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ke(r.length,t)}}validate(t,r){return r>=0&&r<=11}set(t,r,i){return t.getHours()>=12&&i<12?t.setHours(i+12,0,0,0):t.setHours(i,0,0,0),t}}class dC extends Te{constructor(){super(...arguments);J(this,"priority",70);J(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,r,i){switch(r){case"k":return Fe(Ye.hour24h,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ke(r.length,t)}}validate(t,r){return r>=1&&r<=24}set(t,r,i){const s=i<=24?i%24:i;return t.setHours(s,0,0,0),t}}class fC extends Te{constructor(){super(...arguments);J(this,"priority",60);J(this,"incompatibleTokens",["t","T"])}parse(t,r,i){switch(r){case"m":return Fe(Ye.minute,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ke(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,i){return t.setMinutes(i,0,0),t}}class pC extends Te{constructor(){super(...arguments);J(this,"priority",50);J(this,"incompatibleTokens",["t","T"])}parse(t,r,i){switch(r){case"s":return Fe(Ye.second,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ke(r.length,t)}}validate(t,r){return r>=0&&r<=59}set(t,r,i){return t.setSeconds(i,0),t}}class mC extends Te{constructor(){super(...arguments);J(this,"priority",30);J(this,"incompatibleTokens",["t","T"])}parse(t,r){const i=s=>Math.trunc(s*Math.pow(10,-r.length+3));return Qe(Ke(r.length,t),i)}set(t,r,i){return t.setMilliseconds(i),t}}class gC extends Te{constructor(){super(...arguments);
80J(this,"priority",10);J(this,"incompatibleTokens",["t","T","x"])}parse(t,r){switch(r){case"X":return ln(un.basicOptionalMinutes,t);case"XX":return ln(un.basic,t);case"XXXX":return ln(un.basicOptionalSeconds,t);case"XXXXX":return ln(un.extendedOptionalSeconds,t);case"XXX":default:return ln(un.extended,t)}}set(t,r,i){return r.timestampIsSet?t:dt(t,t.getTime()-ja(t)-i)}}class yC extends Te{constructor(){super(...arguments);J(this,"priority",10);J(this,"incompatibleTokens",["t","T","X"])}parse(t,r){switch(r){case"x":return ln(un.basicOptionalMinutes,t);case"xx":return ln(un.basic,t);case"xxxx":return ln(un.basicOptionalSeconds,t);case"xxxxx":return ln(un.extendedOptionalSeconds,t);case"xxx":default:return ln(un.extended,t)}}set(t,r,i){return r.timestampIsSet?t:dt(t,t.getTime()-ja(t)-i)}}class _C extends Te{constructor(){super(...arguments);J(this,"priority",40);J(this,"incompatibleTokens","*")}parse(t){return Ug(t)}set(t,r,i){return[dt(t,i*1e3),{timestampIsSet:!0}]}}class vC extends Te{constructor(){super(...arguments);J(this,"priority",20);J(this,"incompatibleTokens","*")}parse(t){return Ug(t)}set(t,r,i){return[dt(t,i),{timestampIsSet:!0}]}}const wC={G:new F1,y:new j1,Y:new U1,R:new B1,u:new q1,Q:new H1,q:new $1,M:new z1,L:new W1,w:new G1,I:new Q1,d:new Z1,D:new eC,E:new tC,e:new nC,c:new rC,i:new sC,a:new oC,b:new aC,B:new uC,h:new lC,H:new cC,K:new hC,k:new dC,m:new fC,s:new pC,S:new mC,X:new gC,x:new yC,t:new _C,T:new vC},bC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EC=/^'([^]*?)'?$/,CC=/''/g,PC=/\S/,xC=/[a-zA-Z]/;function kd(n,e,t,r){var D,M,U,B;const i=()=>dt(t,NaN),s=D1(),o=s.locale??Vg,u=s.firstWeekContainsDate??((M=(D=s.locale)==null?void 0:D.options)==null?void 0:M.firstWeekContainsDate)??1,l=s.weekStartsOn??((B=(U=s.locale)==null?void 0:U.options)==null?void 0:B.weekStartsOn)??0;if(!e)return n?i():nt(t,r==null?void 0:r.in);const c={firstWeekContainsDate:u,weekStartsOn:l,locale:o},h=[new L1(r==null?void 0:r.in,t)],p=e.match(TC).map(q=>{const H=q[0];if(H in Al){const K=Al[H];return K(q,o.formatLong)}return q}).join("").match(bC),g=[];for(let q of p){Fg(q)&&Sl(q,e,n),Lg(q)&&Sl(q,e,n);const H=q[0],K=wC[H];if(K){const{incompatibleTokens:x}=K;if(Array.isArray(x)){const E=g.find(I=>x.includes(I.token)||I.token===H);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${q}\` at the same time`)}else if(K.incompatibleTokens==="*"&&g.length>0)throw new RangeError(`The format string mustn't contain \`${q}\` and any other token at the same time`);g.push({token:H,fullToken:q});const b=K.run(n,q,o.match,c);if(!b)return i();h.push(b.setter),n=b.rest}else{if(H.match(xC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+H+"`");if(q==="''"?q="'":H==="'"&&(q=AC(q)),n.indexOf(q)===0)n=n.slice(q.length);else return i()}}if(n.length>0&&PC.test(n))return i();const v=h.map(q=>q.priority).sort((q,H)=>H-q).filter((q,H,K)=>K.indexOf(q)===H).map(q=>h.filter(H=>H.priority===q).sort((H,K)=>K.subPriority-H.subPriority)).map(q=>q[0]);let P=nt(t,r==null?void 0:r.in);if(isNaN(+P))return i();const A={};for(const q of v){if(!q.validate(P,c))return i();const H=q.set(P,A,c);Array.isArray(H)?(P=H[0],Object.assign(A,H[1])):P=H}return P}function AC(n){return n.match(EC)[1].replace(CC,"'")}const Hg=(n,e)=>{const t=Nd(n),r=Nd(e);return`${t} - ${r}`.trim()},Nd=n=>{if(!n)return"";try{const e=n.replace("/XX/","/01/");let t=kd(e,"MM/yyyy",new Date);return xl(t)||(t=kd(e,"MM/dd/yyyy",new Date),xl(t))?Md(t,"MM/yyyy"):n}catch{return n}},SC=(n,e=100)=>{const[t,r]=W.useState({height:0,width:0}),i=W.useRef(null),s=W.useCallback(()=>{n.current&&r({width:n.current.offsetWidth,height:n.current.offsetHeight})},[n]);return W.useLayoutEffect(()=>{s()},[s,n]),W.useEffect(()=>(window.addEventListener("resize",()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(s,e)}),()=>{i.current&&clearTimeout(i.current),window.removeEventListener("resize",s)}),[s,e]),t},RC=(n,e)=>FT()?e:n;function NR(n,e,t=30){if(!(typeof document>"u"))try{const r=t*24*60*60,i=typeof window<"u"&&window.location.protocol==="https:"?"Secure; ":"",s=`${n}=${encodeURIComponent(e)}; Max-Age=${r}; Path=/; Domain=.obrajobs.com; SameSite=Lax; ${i}`;document.cookie=s}catch(r){console.warn("Failed to set cookie",r)}}function IC(n){if(typeof document>"u")return;const e=document.cookie.split(";").map(r=>r.trim()).find(r=>r.startsWith(`${n}=`));if(!e)return;const t=e.split("=");return t.length>
801?decodeURIComponent(t.slice(1).join("=")):void 0}const DC=()=>{const n=V_()??"",e=M_(),t=e!=null?String(e):"";return{deviceId:n,sessionId:t}},gt=[];for(let n=0;n<256;++n)gt.push((n+256).toString(16).slice(1));function OC(n,e=0){return(gt[n[e+0]]+gt[n[e+1]]+gt[n[e+2]]+gt[n[e+3]]+"-"+gt[n[e+4]]+gt[n[e+5]]+"-"+gt[n[e+6]]+gt[n[e+7]]+"-"+gt[n[e+8]]+gt[n[e+9]]+"-"+gt[n[e+10]]+gt[n[e+11]]+gt[n[e+12]]+gt[n[e+13]]+gt[n[e+14]]+gt[n[e+15]]).toLowerCase()}let Lu;const VC=new Uint8Array(16);function MC(){if(!Lu){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Lu=crypto.getRandomValues.bind(crypto)}return Lu(VC)}const kC=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ld={randomUUID:kC};function NC(n,e,t){var i;if(Ld.randomUUID&&!n)return Ld.randomUUID();n=n||{};const r=n.random??((i=n.rng)==null?void 0:i.call(n))??MC();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,OC(r)}const LC=()=>{let n=null;if(typeof sessionStorage<"u"){const e=sessionStorage.getItem("visitor_id");e?n=e:(n=NC(),sessionStorage.setItem("visitor_id",n))}return n},FC=()=>W.useCallback((e,t)=>{const r=LC();k_(e,{...t,visitor_id:r})},[]),jC=()=>{const[n,e]=W.useState("");return W.useEffect(()=>{const t="0123456789abcdefghijklmnopqrstuvwxyz",r=Array.from({length:20},()=>t[Math.floor(Math.random()*t.length)]).join("");e(r)},[]),n},LR=()=>{const n="0123456789abcdefghijklmnopqrstuvwxyz";return Array.from({length:20},()=>n[Math.floor(Math.random()*n.length)]).join("")},UC=n=>O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 16 15",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{clipRule:"evenodd",d:"M5.59057 6.82126H13.3911V8.63833H5.59057L8.58229 11.63L7.29742 12.9149L2.1123 7.72979L7.29742 2.54468L8.58229 3.82954L5.59057 6.82126Z",fill:"currentColor",fillRule:"evenodd"})})}),BC=n=>O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M2.85 7.15C2.94167 7.24167 3.05833 7.2875 3.2 7.2875C3.34167 7.2875 3.45833 7.24167 3.55 7.15L5 5.7L6.4625 7.1625C6.55417 7.25417 6.66883 7.29783 6.8065 7.2935C6.94383 7.2895 7.05833 7.24167 7.15 7.15C7.24167 7.05833 7.2875 6.94167 7.2875 6.8C7.2875 6.65833 7.24167 6.54167 7.15 6.45L5.7 5L7.1625 3.5375C7.25417 3.44583 7.29783 3.33117 7.2935 3.1935C7.2895 3.05617 7.24167 2.94167 7.15 2.85C7.05833 2.75833 6.94167 2.7125 6.8 2.7125C6.65833 2.7125 6.54167 2.75833 6.45 2.85L5 4.3L3.5375 2.8375C3.44583 2.74583 3.33133 2.702 3.194 2.706C3.05633 2.71033 2.94167 2.75833 2.85 2.85C2.75833 2.94167 2.7125 3.05833 2.7125 3.2C2.7125 3.34167 2.75833 3.45833 2.85 3.55L4.3 5L2.8375 6.4625C2.74583 6.55417 2.70217 6.66867 2.7065 6.806C2.7105 6.94367 2.75833 7.05833 2.85 7.15ZM5 10C4.30833 10 3.65833 9.86867 3.05 9.606C2.44167 9.34367 1.9125 8.9875 1.4625 8.5375C1.0125 8.0875 0.656333 7.55833 0.394 6.95C0.131333 6.34167 0 5.69167 0 5C0 4.30833 0.131333 3.65833 0.394 3.05C0.656333 2.44167 1.0125 1.9125 1.4625 1.4625C1.9125 1.0125 2.44167 0.656167 3.05 0.3935C3.65833 0.131167 4.30833 0 5 0C5.69167 0 6.34167 0.131167 6.95 0.3935C7.55833 0.656167 8.0875 1.0125 8.5375 1.4625C8.9875 1.9125 9.34367 2.44167 9.606 3.05C9.86867 3.65833 10 4.30833 10 5C10 5.69167 9.86867 6.34167 9.606 6.95C9.34367 7.55833 8.9875 8.0875 8.5375 8.5375C8.0875 8.9875 7.55833 9.34367 6.95 9.606C6.34167 9.86867 5.69167 10 5 10ZM5 9C6.10833 9 7.05217 8.6105 7.8315 7.8315C8.6105 7.05217 9 6.10833 9 5C9 3.89167 8.6105 2.94783 7.8315 2.1685C7.05217 1.3895 6.10833 1 5 1C3.89167 1 2.948 1.3895 2.169 2.1685C1.38967 2.94783 1 3.89167 1 5C1 6.10833 1.38967 7.05217 2.169 7.8315C2.948 8.6105 3.89167 9 5 9Z",fill:"currentColor"})})}),$g=n=>O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 148 147",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("circle",{cx:"73.9606",cy:"73.5558",r:"63.4701",stroke:"currentColor",strokeWidth:"19.9478"})})}),qC=n=>O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 16 15",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{clipRule:"evenodd",d:"M10.3224 8.67289H2.71875V6.78676H10.3224L7.40619 3.68135L8.65863 2.34766L13.7129 7.72982L8.65863 13.112L7.40619 11.7783L10.3224 8.67289Z",fill:"currentColor",fillRule:"evenodd"})})}),HC=n=>
80O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 3 4",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M0.451128 3.60902C0.327068 3.60902 0.220865 3.56485 0.132519 3.4765C0.0441729 3.38816 0 3.28196 0 3.15789C0 3.03383 0.0441729 2.92763 0.132519 2.83929C0.220865 2.75094 0.327068 2.70677 0.451128 2.70677C0.575188 2.70677 0.681391 2.75094 0.769737 2.83929C0.858083 2.92763 0.902256 3.03383 0.902256 3.15789C0.902256 3.28196 0.858083 3.38816 0.769737 3.4765C0.681391 3.56485 0.575188 3.60902 0.451128 3.60902ZM1.80451 3.60902C1.68045 3.60902 1.57425 3.56485 1.4859 3.4765C1.39756 3.38816 1.35338 3.28196 1.35338 3.15789C1.35338 3.03383 1.39756 2.92763 1.4859 2.83929C1.57425 2.75094 1.68045 2.70677 1.80451 2.70677C1.92857 2.70677 2.03477 2.75094 2.12312 2.83929C2.21147 2.92763 2.25564 3.03383 2.25564 3.15789C2.25564 3.28196 2.21147 3.38816 2.12312 3.4765C2.03477 3.56485 1.92857 3.60902 1.80451 3.60902ZM0.451128 2.25564C0.327068 2.25564 0.220865 2.21147 0.132519 2.12312C0.0441729 2.03477 0 1.92857 0 1.80451C0 1.68045 0.0441729 1.57425 0.132519 1.4859C0.220865 1.39756 0.327068 1.35338 0.451128 1.35338C0.575188 1.35338 0.681391 1.39756 0.769737 1.4859C0.858083 1.57425 0.902256 1.68045 0.902256 1.80451C0.902256 1.92857 0.858083 2.03477 0.769737 2.12312C0.681391 2.21147 0.575188 2.25564 0.451128 2.25564ZM1.80451 2.25564C1.68045 2.25564 1.57425 2.21147 1.4859 2.12312C1.39756 2.03477 1.35338 1.92857 1.35338 1.80451C1.35338 1.68045 1.39756 1.57425 1.4859 1.4859C1.57425 1.39756 1.68045 1.35338 1.80451 1.35338C1.92857 1.35338 2.03477 1.39756 2.12312 1.4859C2.21147 1.57425 2.25564 1.68045 2.25564 1.80451C2.25564 1.92857 2.21147 2.03477 2.12312 2.12312C2.03477 2.21147 1.92857 2.25564 1.80451 2.25564ZM0.451128 0.902256C0.327068 0.902256 0.220865 0.858083 0.132519 0.769737C0.0441729 0.681391 0 0.575188 0 0.451128C0 0.327068 0.0441729 0.220865 0.132519 0.132519C0.220865 0.0441729 0.327068 0 0.451128 0C0.575188 0 0.681391 0.0441729 0.769737 0.132519C0.858083 0.220865 0.902256 0.327068 0.902256 0.451128C0.902256 0.575188 0.858083 0.681391 0.769737 0.769737C0.681391 0.858083 0.575188 0.902256 0.451128 0.902256ZM1.80451 0.902256C1.68045 0.902256 1.57425 0.858083 1.4859 0.769737C1.39756 0.681391 1.35338 0.575188 1.35338 0.451128C1.35338 0.327068 1.39756 0.220865 1.4859 0.132519C1.57425 0.0441729 1.68045 0 1.80451 0C1.92857 0 2.03477 0.0441729 2.12312 0.132519C2.21147 0.220865 2.25564 0.327068 2.25564 0.451128C2.25564 0.575188 2.21147 0.681391 2.12312 0.769737C2.03477 0.858083 1.92857 0.902256 1.80451 0.902256Z",fill:"currentColor"})})}),$C=n=>O.jsx(Se,{...n,children:O.jsx("svg",{fill:"none",viewBox:"0 0 2 8",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M1 8C0.725 8 0.489583 7.90208 0.29375 7.70625C0.0979167 7.51042 0 7.275 0 7C0 6.725 0.0979167 6.48958 0.29375 6.29375C0.489583 6.09792 0.725 6 1 6C1.275 6 1.51042 6.09792 1.70625 6.29375C1.90208 6.48958 2 6.725 2 7C2 7.275 1.90208 7.51042 1.70625 7.70625C1.51042 7.90208 1.275 8 1 8ZM1 5C0.725 5 0.489583 4.90208 0.29375 4.70625C0.0979167 4.51042 0 4.275 0 4C0 3.725 0.0979167 3.48958 0.29375 3.29375C0.489583 3.09792 0.725 3 1 3C1.275 3 1.51042 3.09792 1.70625 3.29375C1.90208 3.48958 2 3.725 2 4C2 4.275 1.90208 4.51042 1.70625 4.70625C1.51042 4.90208 1.275 5 1 5ZM1 2C0.725 2 0.489583 1.90208 0.29375 1.70625C0.0979167 1.51042 0 1.275 0 1C0 0.725 0.0979167 0.489583 0.29375 0.29375C0.489583 0.0979167 0.725 0 1 0C1.275 0 1.51042 0.0979167 1.70625 0.29375C1.90208 0.489583 2 0.725 2 1C2 1.275 1.90208 1.51042 1.70625 1.70625C1.51042 1.90208 1.275 2 1 2Z",fill:"currentColor"})})}),zC="/assets/dhruv-AmmAZJML.png",WC="/assets/ghezal-CfTsd5Br.png",KC="/assets/justin-C7_rllUK.png",GC="/assets/katherine-D-qzOrtT.png",YC="/assets/loi-42-vvuRI.png",QC="/assets/mariah-DdD5PzU_.png",XC="/assets/office_background_large-C6bn3RLw.jpg",JC="/assets/office_background_small-E-44hs1h.jpg",ZC="/assets/steven-DDTCbGjF.png",eP="/assets/taylor-DvfPN3gi.png",tP="/assets/vaughan-rEZszRnw.png",nP=20,rP="1 reveal unlocks all of a candidate's available contact methods",FR="1 reveal unlocks all of a candidate's available contact methods.",jR="1 reveal unlocks all of a candidate's available contact methods. During your trial you get 100 contact reveals.",UR="1 reveal unlocks all of a candidate's available contact methods. Your trial includes 300 contact reveals in total, no matter how many licenses you add.",iP="ATS integration (1 included, add more at any time)",zg="Contact reveals",sP="compare-plans",BR="/hire/pricing",qR="See candidate pool before paying",HR="Download & export data",$R="Post ATS roles to ObraJobs*",zR="Try Obra Hire for free and see potential candidate pool size before choosing a paid plan.";function WR(n,e){return e!=null&&e.perLicense?`${n} shared contact reveals per license`:`${n} contact reveals`}const oP=.15,Fd=109,Rl=169,Il=n=>Math.round(n*(1-oP)),aP=(n,e)=>e==="year"?Il(n):n,gs=n=>`$${n}`,uP=n=>`${gs(aP(Rl,n))}/Mo/License`,KR=()=>{const n=gs(Fd),e=gs(Il(Fd)),t=gs(Rl),r=gs(Il(Rl));return`Obra Hire offers Free, Explore (${n}/mo, or ${e}/mo billed yearly), Scale (${t}/mo, or ${r}/mo billed yearly), and Custom plans. Each plan includes unlimited candidate searches, with increasing contact reveals and support levels.`},GR=Me("BrandArrows",["root","arrowAccent","arrow","odd","even"]),lP=W.forwardRef(function({children:e,sx:t,...r},i){return O.jsx(ce,{ref:i,sx:{backgroundColor:"grey.200",pt:{xs:8.5,md:16.5},pb:{xs:8.5,md:16.5},px:{xs:2,md:8},...t},...r,children:e})});Me("ProductInsights",["icon","container","card","caption","row","column","de
80scription"]);Me("JobProcessSection",["root","container","card","caption","grouped","separated","header"]);const Fu="paid",cP=()=>{const[n]=C_(),e=n.get(Fu)==="true",[t,r]=W.useState(e);return W.useEffect(()=>{if(e){r(!0);try{sessionStorage.setItem(Fu,"true")}catch{}return}try{r(sessionStorage.getItem(Fu)==="true")}catch{r(!1)}},[e]),t},hP=({bubbleSize:n,steps:e,activeStep:t})=>{const r=n+8,i=W.useMemo(()=>{const l=[];for(let c=0;c<Eo/2;c++){const h=-(r*c+r);l.push(h)}l.reverse();for(let c=0;c<Eo/2;c++){const h=r*c+r;l.push(h)}return l},[r]),s=W.useMemo(()=>{const l=[];for(let c=0;c<e.length;c++)t+c<e.length?l.push(e[t+c].key):l.push(e[t+c-e.length].key);return l.slice(0,Eo)},[t,e]),o=W.useMemo(()=>s.map((l,c)=>({key:l,x:i[c],testimonial:e.find(h=>h.key===l)})),[s,i,e]),u=W.useMemo(()=>o[1],[o]);return{bubbleKeys:s,bubbleCount:Eo,locations:i,bubbles:o,activeBubble:u}},Eo=4,Wg=n=>{const[e,t]=W.useState(0),[r,i]=W.useState(!0),s=W.useCallback(()=>{t(l=>(l+1)%n)},[n]),o=W.useCallback(()=>{s(),i(!1)},[s]),u=W.useCallback(()=>{t(l=>(l-1+n)%n),i(!1)},[n]);return W.useEffect(()=>{if(!r)return;const l=setInterval(()=>{s()},7e3);return()=>clearInterval(l)},[r,s]),{activeStep:e,handleNext:o,handlePrevious:u}},Kg=({handlePrevious:n,handleNext:e,isSmall:t=!0,sx:r,...i})=>{const{colors:s}=jt();return O.jsx(SE,{...i,backButton:O.jsx(Pd,{color:"inherit",onClick:n,size:"medium",children:O.jsx(UC,{width:t?16:24})}),nextButton:O.jsx(Pd,{color:"inherit",onClick:e,size:"medium",children:O.jsx(qC,{width:t?16:24})}),position:"static",sx:{zIndex:1,backgroundColor:"transparent",color:s.iconSubtler,py:0,[`& .${Ad.dot}`]:{width:t?6:12,height:t?6:12},[`& .${Ad.dotActive}`]:{width:t?9:16,height:t?9:16},...r},variant:"dots"})},YR=({items:n})=>{const{colors:e}=jt(),{activeStep:t,handleNext:r,handlePrevious:i}=Wg(n.length),s=256;return O.jsx(Ju,{children:O.jsxs(ce,{sx:{backgroundImage:`url(${JC})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",pt:7.5,pb:11,overflow:"hidden",position:"relative",[`& .${Ar.image}`]:{pointerEvents:"none",position:"absolute",bottom:0,width:396,height:408,transform:"translateX(30%)"},[`& .${Ar.testimonialRow}`]:{columnGap:.5,transform:"translateX(-20px)"},[`& .${Ar.testimonialContainer}`]:{alignItems:"flex-start",justifyContent:"center",px:4,pt:6,pb:6,gap:1,width:s,minWidth:s,height:s,borderRadius:"50%",backgroundColor:Is(e.bgSecondary,.7),backdropFilter:"blur(10px)"}},children:[O.jsxs(ce,{className:Ar.testimonialRow,sx:{flexDirection:"row"},children:[O.jsxs(ce,{className:Ar.testimonialContainer,children:[O.jsxs(ce,{animate:{x:0},component:Fr.div,exit:{x:10},initial:{x:300},sx:{flex:1,justifyContent:"flex-end"},transition:{duration:.2,ease:"easeIn"},children:[O.jsx(ge,{variant:"bodyXS",children:n[t].quote}),O.jsx(ge,{sx:{color:e.textInverse},variant:"bodySStrong",children:`- ${n[t].author}`})]},`text-${t}`),O.jsx(Kg,{activeStep:t,handleNext:r,handlePrevious:i,isSmall:!0,steps:n.length})]}),O.jsx($g,{sx:{color:e.bgPrimary,width:s,minWidth:s,height:s}}),O.jsx(ce,{className:Ar.testimonialContainer})]}),O.jsx(Fr.img,{alt:"author-image",animate:{opacity:1,x:"30%"},className:Ar.image,exit:{opacity:1,transition:{duration:.5}},initial:{opacity:0,x:"40%"},src:n[t].image,transition:{duration:.4}},t)]})})},Ar=Me("TestimonialsSection",["image","testimonialContainer","testimonialRow"]),dP=({quote:n,author:e,isSmall:t=!0,visible:r=!1})=>{const{colors:i}=jt();return O.jsxs(ce,{animate:{opacity:r?1:0},component:Fr.div,initial:{opacity:0}
80,transition:{duration:.3,ease:"easeInOut"},children:[O.jsx(ge,{variant:t?"bodyXS":"bodyM",children:n}),O.jsx(ge,{sx:{color:i.textInverse},variant:t?"bodySStrong":"bodyLStrong",children:`- ${e}`})]})},QR=({items:n})=>{var p;const{colors:e}=jt(),t=RE(g=>g.breakpoints.down("lg")),{activeStep:r,handleNext:i,handlePrevious:s}=Wg(n.length),o=t?256:420,{bubbles:u,activeBubble:l}=hP({bubbleSize:o,steps:n,activeStep:r}),c=W.useRef(null),h=SC(c);return O.jsx(Ju,{children:O.jsxs(ce,{ref:c,sx:{backgroundImage:`url(${XC})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",pt:7.5,pb:11,overflow:"hidden",position:"relative",[`& .${ei.image}`]:{pointerEvents:"none",position:"absolute",bottom:0,right:0,marginRight:`calc(50% - ${h.height/2}px)`,width:"auto",height:"95%",zIndex:2},[`& .${ei.testimonialRow}`]:{columnGap:.5,justifyContent:"center"},[`& .${ei.testimonialContainer}`]:{alignItems:"flex-start",justifyContent:"center",px:{sm:5,lg:7.5},py:{sm:5,lg:13},gap:{sm:1,lg:3},width:o,minWidth:o,height:o,borderRadius:"50%",backgroundColor:Is(e.bgSecondary,.7),backdropFilter:"blur(10px)"}},children:[O.jsxs(ce,{className:ei.testimonialRow,sx:{flexDirection:"row",height:o,position:"relative"},children:[u.map(({key:g,testimonial:v,x:P},A)=>O.jsx(ce,{animate:{x:P},className:ei.testimonialContainer,component:Fr.div,exit:{x:P-o},initial:{x:P+o},sx:{position:"absolute",bottom:0,left:0,marginLeft:`calc(50% - ${o/2}px)`,backgroundColor:Is(e.bgSecondary,.7),width:o,height:o,alignItems:"center",justifyContent:"center",borderRadius:"50%",zIndex:2,flex:1},transition:{duration:.75,ease:A===2?"anticipate":"linear"},children:O.jsx(dP,{author:v.author,isSmall:t,quote:v.quote,visible:A===1})},g)),O.jsx(Kg,{activeStep:r,handleNext:i,handlePrevious:s,isSmall:t,steps:n.length,sx:{position:"absolute",bottom:o*.2,left:`${h.width/2-o*1.5+32}px`,zIndex:3}}),O.jsx($g,{sx:{color:e.bgPrimary,width:o,minWidth:o,height:o,position:"absolute",bottom:0,left:0,marginLeft:`calc(50% - ${o/2}px)`}})]}),O.jsx(Ju,{children:O.jsx(Fr.img,{alt:"author-image",animate:{opacity:1,x:"0"},className:ei.image,exit:{opacity:0},initial:{opacity:0,x:"0"},src:(p=l==null?void 0:l.testimonial)==null?void 0:p.image,transition:{duration:1.4,ease:"anticipate"}},r)})]})})},ei=Me("TestimonialsSection",["image","testimonialContainer","testimonialRow"]),fP=(n,e=null)=>{const t={...n};if(e)for(const i of N_)!t[i]&&e[i]&&(t[i]=e[i]);const r={};for(const[i,s]of Object.entries(t))s&&(r[i]=s);return r},XR=qp.forwardRef(function({onClick:e,sx:t,action:r,children:i,search:s,params:o,plan:u,billingInterval:l,location:c="hire-website-home",...h},p){const g=FC(),{hireAppUrl:v}=P_("root"),P=jC(),A=cP(),{search:D}=x_(),M=W.useMemo(()=>{const q=r==="sign in"?"/authenticate/login":"/app/search",H=Qp(D),K=fP({...o,...u?{plan:u}:{},...u&&l?{billingInterval:l}:{}},H),x=Object.keys(K).length>0?`&${new URLSearchParams(K).toString()}`:"",b=v+q+`?flowId=${P}&source=website${x}`;return s?b+`&search=${encodeURIComponent(s)}`:b},[s,v,P,r,o,u,l,D]),U=()=>{const B=IC("campaign");g("Clicked",{flow_id:P,action:r,location:c,campaign:B||"none",source:B?"outbound":"direct",paid:A}),g("LaunchedApp",{flow_id:P,action:r,location:c,campaign:B||"none",source:B?"outbound":"direct",paid:A}),e==null||e()};return O.jsx(Sc,{component:"a",href:M,onClick:U,ref:p,sx:t,target:"_blank",variant:"contained",...h,children:i})}),JR=({label:n,sx:e,...t})=>{const{colors:r}=jt();return O.jsxs(ce,{...t,sx:{flexDirection:"row",gap:1.5,px:"9px",alignItems:"center",borderRadius:10,border:"1px solid",borderColor:r.borderPrimary,backgroundColor:r.bgPrimarySubtler,color:r.textBold,...e},children:[O.jsx(ge,{className:pP.label,children:n}),O.jsx($C,{sx:{width:3,mt:"-3px"}}),O.jsx(BC,{sx:{width:16}})]})},pP=Me("CriteriaChip",["label"]),ZR=Me("ConfirmSearchCriteria",["root","title","candidatesCount","poolChip","searchCriteria"]),eI=({label:n,value:e})=>{const{colors:t}=jt();return O.jsxs(w_,{className:cs.root,gridTemplateColumns:"20px 1fr 2fr",sx:{backgroundColor:t.bgInputSecondary,border:"1px solid",borderColor:t.borderGraySubtler,borderRadius:.5,[`& .${cs.content}`]:{p:".5em"}},children:[O.jsx(ce,{sx:{borderRight:"1px solid",borderRightColor:t.borderGraySubtler,alignItems:"center",justifyContent:"center"},children:O.jsx(HC,{className:cs.gripper,sx:{width:4,color:t.iconSubtle}})}),O.jsx(ce,{className:cs.content,sx:{borderRight:"1px solid",borderRightColor:t.borderGraySubtler},children:O.jsx(ge,{noWrap:!0,children:n})}),O.jsx(ce,{className:cs.content,children:O.jsx(ge,{children:e})})]})},cs=Me("Criterium",["root","gripper","content"]),tI=Me("CriteriaColumns",["root","container","header","draggableList","dropzone"]),nI=Me("DragOverlay",["root"]);Me("ConfirmPoolSizeSection",["root","group","description"]);const mP={deviceIdField:L_,sessionIdField:F_},gP=(n,e,t=mP)=>{e.deviceId&&n.setFieldValue(t.deviceIdField,e.deviceId),e.sessionId&&n.setFieldValue(t.sessionIdField,e.sessionId)},yP=(n,e,t=j_)=>{for(const[r,i]of Object.entries(t)){const s=e[r];typeof s=="string"&&s&&n.setFieldValue(i,s)}},_P=()=>{const n=document.createElement("div");return n.className="hs-form-html",n.setAttribute("data-form-id",ba),n.setAttribute("data-portal-id",U_),n.setAttribute("data-region",B_),n},vP=()=>{var e,t;typeof window.gtag=="function"&&window.gtag("event","conversion",{send_to:"AW-18055141736/A_L0CNaElrkcEOiyrqFD"}),(Array.isArray(window.uetq)||typeof((e=window.uetq)==null?void 0:e.push)=="function")&&(window.uetq=window.uetq||[],window.uetq.push("event","submit_lead_form",{})),typeof window.fbq=="function"&&window.fbq("track","Lead"),typeof window.rdt=="function"&&window.rdt("track","Lead"),typeof window.lintrk=="function"&&ah&&window.lintrk("track",{conversion_id:ah}),typeof((t=window.ttq)==null?void 0:t.track)=="function"&&window.ttq.track("Contact",{...q_}),typeof window.oaiq=="function"&&window.oaiq("measure","lead_created",{type:"customer_action"})},wP=n=>{if(!("detail"in n)||n.detail===null||n.detail===void 0||typeof n.detail!="object")return{};const e=n.detail;return{formId:typeof e.formId=="string"?e.formId:void 0,instanceId:typeof e.instanceId=="string"?e.instanceId:void 0}},jd=(n,e)=>wP(n).formId===e,bP=()=>{if(typeof window>"u")return!1;const n=window.location.hostname;return n==="localhost"||n==="127.0.0.1"},ju="data-hubspot-v4-embed-status",TP=()=>new Promise((n,e)=>{const t=document.querySelector(`script[src="${uh}"]`);if(t){const i=t.getAttribute(ju);if(i==="loaded"){n();return}if(i==="error"){e(new Error("HubSpot Forms V4 embed script failed to load"));return}t.addEventListener("load",()=>n(),{once:!0}),t.addEventListener("error",()=>e(new Error("HubSpot Forms V4 embed script failed to load")),{once:!0});return}const r=document.createElement("script");r.src=uh,r.async=!0,r.onload=()=>{r.setAttribute(ju,"loaded"),n()},r.onerror=()=>{r.setAttribute(ju,"error"),e(new Error("HubSpot Forms V4 embed script failed to load"))},document.body.appendChild(r)}),EP=1e4,CP=250,PP=5e3,xP=n=>!!(n.deviceId&&n.sessionId),AP=(n,e)=>{const t=()=>{try{const s=DC();return gP(n,s),xP(s)}catch(s){return console.error("Failed to apply Amplitude ids to HubSpot form",s),!0}};if(t())return()=>{};const r=window.setInterval(()=>{(e()||t())&&window.clearInterval(r)},CP),i=window.setTimeout(()=>{window.clearInterval(r)},PP);return()=>{window.clearInterval(r),window.clearTimeout(i)}},SP=()=>{const n=W.useRef(null),e=W.useRef(!1),t=W.useRef(!1),r=W.useRef(()=>{}),[i,s]=W.useState(!1),[o,u]=W.useState(!1),l=o&&bP(),c=W.useCallback(()=>{t.current||(t.current=!0,vP())},[]);return W.useEffect(()=>{const h=n.current;!h||h.dataset.hsMountAttached==="1"||(h.appendChild(_P()),h.dataset.hsMountAttached="1")},[]),W.useEffect(()=>{let h=!1;const p=D=>
80{if(e.current=!0,s(!0),u(!1),!D)return;r.current(),r.current=AP(D,()=>h);const M=Qp();try{yP(D,M)}catch(U){console.error("Failed to apply marketing attribution to HubSpot form",U)}},g=D=>{var M;h||!jd(D,ba)||p(((M=window.HubSpotFormsV4)==null?void 0:M.getFormFromEvent(D))??null)},v=D=>{h||!jd(D,ba)||c()},P=()=>{var q,H,K;const D=(q=n.current)==null?void 0:q.querySelector(".hs-form-html");if(!(D!=null&&D.dataset.loaded))return!1;const U=(((K=(H=window.HubSpotFormsV4)==null?void 0:H.getForms)==null?void 0:K.call(H))??[]).filter(x=>{var b;return((b=x.getFormId)==null?void 0:b.call(x))===ba}),B=U.find(x=>{var b;return((b=x.getInstanceId)==null?void 0:b.call(x))===D.id})??(U.length===1?U[0]:void 0);return B?(p(B),!0):!1};window.addEventListener("hs-form-event:on-ready",g),window.addEventListener("hs-form-event:on-submission:success",v);const A=window.setTimeout(()=>{!e.current&&!h&&u(!0)},EP);return TP().then(()=>{h||P()}).catch(D=>{console.error("Failed to load HubSpot Forms V4 embed",D),h||u(!0)}),()=>{h=!0,r.current(),window.clearTimeout(A),window.removeEventListener("hs-form-event:on-ready",g),window.removeEventListener("hs-form-event:on-submission:success",v)}},[c]),{mountHostRef:n,embedReady:i,embedFailed:o,showLocalDebugControls:l,fireLeadConversionsOnce:c}},RP=()=>{const{mountHostRef:n,embedReady:e,embedFailed:t,showLocalDebugControls:r,fireLeadConversionsOnce:i}=SP(),s=r?"HubSpot form embed is blocked on localhost (domain allowlist). Test on obra.co, or fire Lead conversion pixels below for local verification.":"Unable to load the demo form. Please refresh and try again.";return O.jsxs(ce,{gap:1.5,children:[O.jsx(Se,{ref:n,sx:{width:"100%",minHeight:e?void 0:200,opacity:e?1:0,display:t&&!e?"none":"block"}}),t?O.jsxs(ce,{gap:1,children:[O.jsx(ge,{"aria-live":"polite",role:"alert",sx:{color:o=>o.colors.textSubtle},variant:"bodyS",children:s}),r?O.jsx(Sc,{onClick:i,variant:"contained",children:"Fire Lead conversion pixels"}):null]}):null]})},on=Me("ConnectToObra",["container","title","image","header","formContainer"]),rI=W.forwardRef(function(e,t){const{breakpoints:r}=jt(),i=RC(TR,bR),{ref:s,motionProps:{viewport:o,transition:u}}=ER(i,"-300px",.3);return O.jsx(lP,{id:"contact-section",ref:t,sx:{pt:0,pb:0,backgroundColor:"#F4F8FA",[`& .${on.container}`]:{display:"flex",flexDirection:"row",position:"relative",gap:3,justifyContent:"center",alignItems:"center"},[`& .${on.image}`]:{position:"absolute",borderRadius:2,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",boxShadow:"0px 4px 6px -1px rgba(0, 0, 0, 0.10), 0px 0px 4px 0px rgba(0, 0, 0, 0.07)"},"& #connect-caption-small":{display:"none"},"& #connect-caption-large":{display:"block"},[r.down("lg")]:{px:3,pt:5,pb:0,[`& .${on.header}`]:{textAlign:"center",maxWidth:"100%"},[`& .${on.container}`]:{flexDirection:"column"},[`& .${on.formContainer}`]:{width:"100%"},"& #connect-caption-small":{display:"block"},"& #connect-caption-large":{display:"none"}},[r.up("lg")]:{px:11,pt:10,pb:15,[`& .${on.container}`]:{flexWrap:"wrap"},[`& .${on.formContainer}`]:{width:500}}},...e,children:O.jsxs(Fr.div,{className:on.container,initial:"offscreen",ref:s,transition:u,viewport:o,whileInView:"onscreen",children:[O.jsxs(ce,{className:on.header,sx:{gap:{xs:2,md:4},pb:{xs:0,sm:6,md:2},maxWidth:500},children:[O.jsx(ge,{id:"connect-caption-small",variant:"h2",children:"Have Questions, Want to Book a Demo, or Need Enterprise Pricing?"}),O.jsxs(ge,{id:"connect-caption-large",variant:"h2",children:["Have Questions, Want",O.jsx("br",{}),"to Book a Demo, or",O.jsx("br",{}),"Need Enterprise Pricing?"]}),O.jsx(ge,{variant:"bodyM",children:"Still have questions or want details on enterprise pricing? Share your information and our team will reach out to help you understand how Obra fits your hiring needs."})]}),O.jsx(ce,{animate:{opacity:1,transition:{type:"tween",duration:2.6}},className:on.formContainer,component:Fr.div,initial:{opacity:0}
80,sx:{zIndex:1,borderRadius:5,backgroundColor:"#FFFFFF",pt:{xs:0,sm:4},px:1.5,pb:{xs:2,sm:3}},children:O.jsx(RP,{})})]})})}),iI=Me("EmployerHeroSection",["title","titleTextEmphasis","appImageMd","appImageXs"]);var Ud=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 81Copyright The Closure Library Authors. 82SPDX-License-Identifier: Apache-2.0 83*/var $n,Gg;(function(){var n;/** @license 84 85 Copyright The Closure Library Authors. 86 SPDX-License-Identifier: Apache-2.0 87*/function e(x,b){function E(){}E.prototype=b.prototype,x.F=b.prototype,x.prototype=new E,x.prototype.constructor=x,x.D=function(I,S,V){for(var C=Array(arguments.length-2),Pe=2;Pe<arguments.length;Pe++)C[Pe-2]=arguments[Pe];return b.prototype[S].apply(I,C)}}function t(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.C=Array(this.blockSize),this.o=this.h=0,this.u()}e(r,t),r.prototype.u=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(x,b,E){E||(E=0);const I=Array(16);if(typeof b=="string")for(var S=0;S<16;++S)I[S]=b.charCodeAt(E++)|b.charCodeAt(E++)<<8|b.charCodeAt(E++)<<16|b.charCodeAt(E++)<<24;else for(S=0;S<16;++S)I[S]=b[E++]|b[E++]<<8|b[E++]<<16|b[E++]<<24;b=x.g[0],E=x.g[1],S=x.g[2];let V=x.g[3],C;C=b+(V^E&(S^V))+I[0]+3614090360&4294967295,b=E+(C<<7&4294967295|C>>>25),C=V+(S^b&(E^S))+I[1]+3905402710&4294967295,V=b+(C<<12&4294967295|C>>>20),C=S+(E^V&(b^E))+I[2]+606105819&4294967295,S=V+(C<<17&4294967295|C>>>15),C=E+(b^S&(V^b))+I[3]+3250441966&4294967295,E=S+(C<<22&4294967295|C>>>10),C=b+(V^E&(S^V))+I[4]+4118548399&4294967295,b=E+(C<<7&4294967295|C>>>25),C=V+(S^b&(E^S))+I[5]+1200080426&4294967295,V=b+(C<<12&4294967295|C>>>20),C=S+(E^V&(b^E))+I[6]+2821735955&4294967295,S=V+(C<<17&4294967295|C>>>15),C=E+(b^S&(V^b))+I[7]+4249261313&4294967295,E=S+(C<<22&4294967295|C>>>10),C=b+(V^E&(S^V))+I[8]+1770035416&4294967295,b=E+(C<<7&4294967295|C>>>25),C=V+(S^b&(E^S))+I[9]+2336552879&4294967295,V=b+(C<<12&4294967295|C>>>20),C=S+(E^V&(b^E))+I[10]+4294925233&4294967295,S=V+(C<<17&4294967295|C>>>15),C=E+(b^S&(V^b))+I[11]+2304563134&4294967295,E=S+(C<<22&4294967295|C>>>10),C=b+(V^E&(S^V))+I[12]+1804603682&4294967295,b=E+(C<<7&4294967295|C>>>25),C=V+(S^b&(E^S))+I[13]+4254626195&4294967295,V=b+(C<<12&4294967295|C>>>20),C=S+(E^V&(b^E))+I[14]+2792965006&4294967295,S=V+(C<<17&4294967295|C>>>15),C=E+(b^S&(V^b))+I[15]+1236535329&4294967295,E=S+(C<<22&4294967295|C>>>10),C=b+(S^V&(E^S))+I[1]+4129170786&4294967295,b=E+(C<<5&4294967295|C>>>27),C=V+(E^S&(b^E))+I[6]+3225465664&4294967295,V=b+(C<<9&4294967295|C>>>23),C=S+(b^E&(V^b))+I[11]+643717713&4294967295,S=V+(C<<14&4294967295|C>>>18),C=E+(V^b&(S^V))+I[0]+3921069994&4294967295,E=S+(C<<20&4294967295|C>>>12),C=b+(S^V&(E^S))+I[5]+3593408605&4294967295,b=E+(C<<5&4294967295|C>>>27),C=V+(E^S&(b^E))+I[10]+38016083&4294967295,V=b+(C<<9&4294967295|C>>>23),C=S+(b^E&(V^b))+I[15]+3634488961&4294967295,S=V+(C<<14&4294967295|C>>>18),C=E+(V^b&(S^V))+I[4]+3889429448&4294967295,E=S+(C<<20&4294967295|C>>>12),C=b+(S^V&(E^S))+I[9]+568446438&4294967295,b=E+(C<<5&4294967295|C>>>27),C=V+(E^S&(b^E))+I[14]+3275163606&4294967295,V=b+(C<<9&4294967295|C>>>23),C=S+(b^E&(V^b))+I[3]+4107603335&4294967295,S=V+(C<<14&4294967295|C>>>18),C=E+(V^b&(S^V))+I[8]+1163531501&4294967295,E=S+(C<<20&4294967295|C>>>12),C=b+(S^V&(E^S))+I[13]+2850285829&4294967295,b=E+(C<<5&4294967295|C>>>27),C=V+(E^S&(b^E))+I[2]+4243563512&4294967295,V=b+(C<<9&4294967295|C>>>23),C=S+(b^E&(V^b))+I[7]+1735328473&4294967295,S=V+(C<<14&4294967295|C>>>18),C=E+(V^b&(S^V))+I[12]+2368359562&4294967295,E=S+(C<<20&4294967295|C>>>12),C=b+(E^S^V)+I[5]+4294588738&4294967295,b=E+(C<<4&4294967295|C>>>28),C=V+(b^E^S)+I[8]+2272392833&4294967295,V=b+(C<<11&4294967295|C>>>21),C=S+(V^b^E)+I[11]+1839030562&4294967295,S=V+(C<<16&4294967295|C>>>16),C=E+(S^V^b)+I[14]+4259657740&4294967295,E=S+(C<<23&4294967295|C>>>9),C=b+(E^S^V)+I[1]+2763975236&4294967295,b=E+(C<<4&4294967295|C>>>28),C=V+(b^E^S)+I[4]+1272893353&4294967295,V=b+(C<<11&4294967295|C>>>21),C=S+(V^b^E)+I[7]+4139469664&4294967295,S=V+(C<<16&4294967295|C>>>16),C=E+(S^V^b)+I[10]+3200236656&4294967295,E=S+(C<<23&4294967295|C>>>9),C=b+(E^S^V)+I[13]+681279174&4294967295,b=E+(C<<4&4294967295|C>>>28),C=V+(b^E^S)+I[0]+3936430074&4294967295,V=b+(C<<11&4294967295|C>>>21),C=S+(V^b^E)+I[3]+3572445317&4294967295,S=V+(C<<16&4294967295|C>>>16),C=E+(S^V^b)+I[6]+76029189&4294967295,E=S+(C<<23&4294967295|C>>>9),C=b+(E^S^V)+I[9]+3654602809&4294967295,b=E+(C<<4&4294967295|C>>>28),C=V+(b^E^S)+I[12]+3873151461&4294967295,V=b+(C<<11&4294967295|C>>>21),C=S+(V^b^E)+I[15]+530742520&4294967295,S=V+(C<<16&4294967295|C>>>16),C=E+(S^V^b)+I[2]+3299628645&4294967295,E=S+(C<<23&4294967295|C>>>9),C=b+(S^(E|~V))+I[0]+4096336452&4294967295,b=E+(C<<6&4294967295|C>>>26),C=V+(E^(b|~S))+I[7]+1126891415&4294967295,V=b+(C<<10&4294967295|C>>>22),C=S+(b^(V|~E))+I[14]+2878612391&4294967295,S=V+(C<<15&4294967295|C>>>17),C=E+(V^(S|~b))+I[5]+4237533241&4294967295,E=S+(C<<21&4294967295|C>>>11),C=b+(S^(E|~V))+I[12]+1700485571&4294967295,b=E+(C<<6&4294967295|C>>>26),C=V+(E^(b|~S))+I[3]+2399980690&4294967295,V=b+(C<<10&4294967295|C>>>22),C=S+(b^(V|~E))+I[10]+4293915773&4294967295,S=V+(C<<15&4294967295|C>>>17),C=E+(V^(S|~b))+I[1]+2240044497&4294967295,E=S+(C<<21&4294967295|C>>>11),C=b+(S^(E|~V))+I[8]+1873313359&4294967295,b=E+(C<<6&4294967295|C>>>26),C=V+(E^(b|~S))+I[15]+4264355552&4294967295,V=b+(C<<10&4294967295|C>>>22),C=S+(b^(V|~E))+I[6]+2734768916&4294967295,S=V+(C<<15&4294967295|C>>>17),C=E+(V^(S|~b))+I[13]+1309151649&4294967295,E=S+(C<<21&4294967295|C>>>11),C=b+(S^(E|~V))+I[4]+4149444226&4294967295,b=E+(C<<6&4294967295|C>>>26),C=V+(E^(b|~S))+I[11]+3174756917&4294967295,V=b+(C<<10&4294967295|C>>>22),C=S+(b^(V|~E))+I[2]+718787259&4294967295,S=V+(C<<15&4294967295|C>>>17),C=E+(V^(S|~b))+I[9]+3951481745&4294967295,x.g[0]=x.g[0]+b&4294967295,x.g[1]=x.g[1]+(S+(C<<21&4294967295|C>>>11))&4294967295,x.g[2]=x.g[2]+S&4294967295,x.g[3]=x.g[3]+V&4294967295}r.prototype.v=function(x,b){b===void 0&&(b=x.length);const E=b-this.blockSize,I=this.C;let S=this.h,V=0;for(;V<b;){if(S==0)for(;V<=E;)i(this,x,V),V+=this.blockSize;
87if(typeof x=="string"){for(;V<b;)if(I[S++]=x.charCodeAt(V++),S==this.blockSize){i(this,I),S=0;break}}else for(;V<b;)if(I[S++]=x[V++],S==this.blockSize){i(this,I),S=0;break}}this.h=S,this.o+=b},r.prototype.A=function(){var x=Array((this.h<56?this.blockSize:this.blockSize*2)-this.h);x[0]=128;for(var b=1;b<x.length-8;++b)x[b]=0;b=this.o*8;for(var E=x.length-8;E<x.length;++E)x[E]=b&255,b/=256;for(this.v(x),x=Array(16),b=0,E=0;E<4;++E)for(let I=0;I<32;I+=8)x[b++]=this.g[E]>>>I&255;return x};function s(x,b){var E=u;return Object.prototype.hasOwnProperty.call(E,x)?E[x]:E[x]=b(x)}function o(x,b){this.h=b;const E=[];let I=!0;for(let S=x.length-1;S>=0;S--){const V=x[S]|0;I&&V==b||(E[S]=V,I=!1)}this.g=E}var u={};function l(x){return-128<=x&&x<128?s(x,function(b){return new o([b|0],b<0?-1:0)}):new o([x|0],x<0?-1:0)}function c(x){if(isNaN(x)||!isFinite(x))return p;if(x<0)return D(c(-x));const b=[];let E=1;for(let I=0;x>=E;I++)b[I]=x/E|0,E*=4294967296;return new o(b,0)}function h(x,b){if(x.length==0)throw Error("number format error: empty string");if(b=b||10,b<2||36<b)throw Error("radix out of range: "+b);if(x.charAt(0)=="-")return D(h(x.substring(1),b));if(x.indexOf("-")>=0)throw Error('number format error: interior "-" character');const E=c(Math.pow(b,8));let I=p;for(let V=0;V<x.length;V+=8){var S=Math.min(8,x.length-V);const C=parseInt(x.substring(V,V+S),b);S<8?(S=c(Math.pow(b,S)),I=I.j(S).add(c(C))):(I=I.j(E),I=I.add(c(C)))}return I}var p=l(0),g=l(1),v=l(16777216);n=o.prototype,n.m=function(){if(A(this))return-D(this).m();let x=0,b=1;for(let E=0;E<this.g.length;E++){const I=this.i(E);x+=(I>=0?I:4294967296+I)*b,b*=4294967296}return x},n.toString=function(x){if(x=x||10,x<2||36<x)throw Error("radix out of range: "+x);if(P(this))return"0";if(A(this))return"-"+D(this).toString(x);const b=c(Math.pow(x,6));var E=this;let I="";for(;;){const S=q(E,b).g;E=M(E,S.j(b));let V=((E.g.length>0?E.g[0]:E.h)>>>0).toString(x);if(E=S,P(E))return V+I;for(;V.length<6;)V="0"+V;I=V+I}},n.i=function(x){return x<0?0:x<this.g.length?this.g[x]:this.h};function P(x){if(x.h!=0)return!1;for(let b=0;b<x.g.length;b++)if(x.g[b]!=0)return!1;return!0}function A(x){return x.h==-1}n.l=function(x){return x=M(this,x),A(x)?-1:P(x)?0:1};function D(x){const b=x.g.length,E=[];for(let I=0;I<b;I++)E[I]=~x.g[I];return new o(E,~x.h).add(g)}n.abs=function(){return A(this)?D(this):this},n.add=function(x){const b=Math.max(this.g.length,x.g.length),E=[];let I=0;for(let S=0;S<=b;S++){let V=I+(this.i(S)&65535)+(x.i(S)&65535),C=(V>>>16)+(this.i(S)>>>16)+(x.i(S)>>>16);I=C>>>16,V&=65535,C&=65535,E[S]=C<<16|V}return new o(E,E[E.length-1]&-2147483648?-1:0)};function M(x,b){return x.add(D(b))}n.j=function(x){if(P(this)||P(x))return p;if(A(this))return A(x)?D(this).j(D(x)):D(D(this).j(x));if(A(x))return D(this.j(D(x)));if(this.l(v)<0&&x.l(v)<0)return c(this.m()*x.m());const b=this.g.length+x.g.length,E=[];for(var I=0;I<2*b;I++)E[I]=0;for(I=0;I<this.g.length;I++)for(let S=0;S<x.g.length;S++){const V=this.i(I)>>>16,C=this.i(I)&65535,Pe=x.i(S)>>>16,Re=x.i(S)&65535;E[2*I+2*S]+=C*Re,U(E,2*I+2*S),E[2*I+2*S+1]+=V*Re,U(E,2*I+2*S+1),E[2*I+2*S+1]+=C*Pe,U(E,2*I+2*S+1),E[2*I+2*S+2]+=V*Pe,U(E,2*I+2*S+2)}for(x=0;x<b;x++)E[x]=E[2*x+1]<<16|E[2*x];for(x=b;x<2*b;x++)E[x]=0;return new o(E,0)};function U(x,b){for(;(x[b]&65535)!=x[b];)x[b+1]+=x[b]>>>16,x[b]&=65535,b++}function B(x,b){this.g=x,this.h=b}function q(x,b){if(P(b))throw Error("division by zero");if(P(x))return new B(p,p);if(A(x))return b=q(D(x),b),new B(D(b.g),D(b.h));if(A(b))return b=q(x,D(b)),new B(D(b.g),b.h);if(x.g.length>30){if(A(x)||A(b))throw Error("slowDivide_ only works with positive integers.");for(var E=g,I=b;I.l(x)<=0;)E=H(E),I=H(I);var S=K(E,1),V=K(I,1);for(I=K(I,2),E=K(E,2);!P(I);){var C=V.add(I);C.l(x)<=0&&(S=S.add(E),V=C),I=K(I,1),E=K(E,1)}return b=M(x,S.j(b)),new B(S,b)}for(S=p;x.l(b)>=0;){for(E=Math.max(1,Math.floor(x.m()/b.m())),I=Math.ceil(Math.log(E)/Math.LN2),I=I<=48?1:Math.pow(2,I-48),V=c(E),C=V.j(b);A(C)||C.l(x)>0;)E-=I,V=c(E),C=V.j(b);P(V)&&(V=g),S=S.add(V),x=M(x,C)}return new B(S,x)}n.B=function(x){return q(this,x).h},n.and=function(x){const b=Math.max(this.g.length,x.g.length),E=[];for(let I=0;I<b;I++)E[I]=this.i(I)&x.i(I);return new o(E,this.h&x.h)},n.or=function(x){const b=Math.max(this.g.length,x.g.length),E=[];for(let I=0;I<b;I++)E[I]=this.i(I)|x.i(I);return new o(E,this.h|x.h)},n.xor=function(x){const b=Math.max(this.g.length,x.g.length),E=[];for(let I=0;I<b;I++)E[I]=this.i(I)^x.i(I);return new o(E,this.h^x.h)};function H(x){const b=x.g.length+1,E=[];for(let I=0;I<b;I++)E[I]=x.i(I)<<1|x.i(I-1)>>>31;return new o(E,x.h)}function K(x,b){const E=b>>5;b%=32;const I=x.g.length-E,S=[];for(let V=0;V<I;V++)S[V]=b>0?x.i(V+E)>>>b|x.i(V+E+1)<<32-b:x.i(V+E);return new o(S,x.h)}r.prototype.digest=r.prototype.A,r.prototype.reset=r.prototype.u,r.prototype.update=r.prototype.v,Gg=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.B,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=c,o.fromString=h,$n=o}).apply(typeof Ud<"u"?Ud:typeof self<"u"?self:typeof window<"u"?window:{});var Co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license 88Copyright The Closure Library Authors. 89SPDX-License-Identifier: Apache-2.0 90*/var Yg,ys,Qg,xa,Dl,Xg,Jg,Zg;(function(){var n,e=Object.defineProperty;
90function t(a){a=[typeof globalThis=="object"&&globalThis,a,typeof window=="object"&&window,typeof self=="object"&&self,typeof Co=="object"&&Co];for(var d=0;d<a.length;++d){var f=a[d];if(f&&f.Math==Math)return f}throw Error("Cannot find global object")}var r=t(this);function i(a,d){if(d)e:{var f=r;a=a.split(".");for(var _=0;_<a.length-1;_++){var N=a[_];if(!(N in f))break e;f=f[N]}a=a[a.length-1],_=f[a],d=d(_),d!=_&&d!=null&&e(f,a,{configurable:!0,writable:!0,value:d})}}i("Symbol.dispose",function(a){return a||Symbol("Symbol.dispose")}),i("Array.prototype.values",function(a){return a||function(){return this[Symbol.iterator]()}}),i("Object.entries",function(a){return a||function(d){var f=[],_;for(_ in d)Object.prototype.hasOwnProperty.call(d,_)&&f.push([_,d[_]]);return f}});/** @license 91 92 Copyright The Closure Library Authors. 93 SPDX-License-Identifier: Apache-2.0 94*/var s=s||{},o=this||self;function u(a){var d=typeof a;return d=="object"&&a!=null||d=="function"}function l(a,d,f){return a.call.apply(a.bind,arguments)}function c(a,d,f){return c=l,c.apply(null,arguments)}function h(a,d){var f=Array.prototype.slice.call(arguments,1);return function(){var _=f.slice();return _.push.apply(_,arguments),a.apply(this,_)}}function p(a,d){function f(){}f.prototype=d.prototype,a.Z=d.prototype,a.prototype=new f,a.prototype.constructor=a,a.Ob=function(_,N,F){for(var X=Array(arguments.length-2),me=2;me<arguments.length;me++)X[me-2]=arguments[me];return d.prototype[N].apply(_,X)}}var g=typeof AsyncContext<"u"&&typeof AsyncContext.Snapshot=="function"?a=>a&&AsyncContext.Snapshot.wrap(a):a=>a;function v(a){const d=a.length;if(d>0){const f=Array(d);for(let _=0;_<d;_++)f[_]=a[_];return f}return[]}function P(a,d){for(let _=1;_<arguments.length;_++){const N=arguments[_];var f=typeof N;if(f=f!="object"?f:N?Array.isArray(N)?"array":f:"null",f=="array"||f=="object"&&typeof N.length=="number"){f=a.length||0;const F=N.length||0;a.length=f+F;for(let X=0;X<F;X++)a[f+X]=N[X]}else a.push(N)}}class A{constructor(d,f){this.i=d,this.j=f,this.h=0,this.g=null}get(){let d;return this.h>0?(this.h--,d=this.g,this.g=d.next,d.next=null):d=this.i(),d}}function D(a){o.setTimeout(()=>{throw a},0)}function M(){var a=x;let d=null;return a.g&&(d=a.g,a.g=a.g.next,a.g||(a.h=null),d.next=null),d}class U{constructor(){this.h=this.g=null}add(d,f){const _=B.get();_.set(d,f),this.h?this.h.next=_:this.g=_,this.h=_}}var B=new A(()=>new q,a=>a.reset());class q{constructor(){this.next=this.g=this.h=null}set(d,f){this.h=d,this.g=f,this.next=null}reset(){this.next=this.g=this.h=null}}let H,K=!1,x=new U,b=()=>{const a=Promise.resolve(void 0);H=()=>{a.then(E)}};function E(){for(var a;a=M();){try{a.h.call(a.g)}catch(f){D(f)}var d=B;d.j(a),d.h<100&&(d.h++,a.next=d.g,d.g=a)}K=!1}function I(){this.u=this.u,this.C=this.C}I.prototype.u=!1,I.prototype.dispose=function(){this.u||(this.u=!0,this.N())},I.prototype[Symbol.dispose]=function(){this.dispose()},I.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function S(a,d){this.type=a,this.g=this.target=d,this.defaultPrevented=!1}S.prototype.h=function(){this.defaultPrevented=!0};var V=function(){if(!o.addEventListener||!Object.defineProperty)return!1;var a=!1,d=Object.defineProperty({},"passive",{get:function(){a=!0}});try{const f=()=>{};o.addEventListener("test",f,d),o.removeEventListener("test",f,d)}catch{}return a}();function C(a){return/^[\s\xa0]*$/.test(a)}function Pe(a,d){S.call(this,a?a.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,a&&this.init(a,d)}p(Pe,S),Pe.prototype.init=function(a,d){const f=this.type=a.type,_=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement,this.g=d,d=a.relatedTarget,d||(f=="mouseover"?d=a.fromElement:f=="mouseout"&&(d=a.toElement)),this.relatedTarget=d,_?(this.clientX=_.clientX!==void 0?_.clientX:_.pageX,this.clientY=_.clientY!==void 0?_.clientY:_.pageY,this.screenX=_.screenX||0,this.screenY=_.screenY||0):(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0),this.button=a.button,this.key=a.key||"",this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.pointerId=a.pointerId||0,this.pointerType=a.pointerType,this.state=a.state,this.i=a,a.defaultPrevented&&Pe.Z.h.
94call(this)},Pe.prototype.h=function(){Pe.Z.h.call(this);const a=this.i;a.preventDefault?a.preventDefault():a.returnValue=!1};var Re="closure_listenable_"+(Math.random()*1e6|0),Jt=0;function fe(a,d,f,_,N){this.listener=a,this.proxy=null,this.src=d,this.type=f,this.capture=!!_,this.ha=N,this.key=++Jt,this.da=this.fa=!1}function Ue(a){a.da=!0,a.listener=null,a.proxy=null,a.src=null,a.ha=null}function it(a,d,f){for(const _ in a)d.call(f,a[_],_,a)}function Dt(a,d){for(const f in a)d.call(void 0,a[f],f,a)}function pe(a){const d={};for(const f in a)d[f]=a[f];return d}const yn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function xn(a,d){let f,_;for(let N=1;N<arguments.length;N++){_=arguments[N];for(f in _)a[f]=_[f];for(let F=0;F<yn.length;F++)f=yn[F],Object.prototype.hasOwnProperty.call(_,f)&&(a[f]=_[f])}}function zt(a){this.src=a,this.g={},this.h=0}zt.prototype.add=function(a,d,f,_,N){const F=a.toString();a=this.g[F],a||(a=this.g[F]=[],this.h++);const X=Ot(a,d,_,N);return X>-1?(d=a[X],f||(d.fa=!1)):(d=new fe(d,this.src,F,!!_,N),d.fa=f,a.push(d)),d};function An(a,d){const f=d.type;if(f in a.g){var _=a.g[f],N=Array.prototype.indexOf.call(_,d,void 0),F;(F=N>=0)&&Array.prototype.splice.call(_,N,1),F&&(Ue(d),a.g[f].length==0&&(delete a.g[f],a.h--))}}function Ot(a,d,f,_){for(let N=0;N<a.length;++N){const F=a[N];if(!F.da&&F.listener==d&&F.capture==!!f&&F.ha==_)return N}return-1}var Wt="closure_lm_"+(Math.random()*1e6|0),Be={};function Sn(a,d,f,_,N){if(Array.isArray(d)){for(let F=0;F<d.length;F++)Sn(a,d[F],f,_,N);return null}return f=ki(f),a&&a[Re]?a.J(d,f,u(_)?!!_.capture:!1,N):or(a,d,f,!1,_,N)}function or(a,d,f,_,N,F){if(!d)throw Error("Invalid event type");const X=u(N)?!!N.capture:!!N;let me=en(a);if(me||(a[Wt]=me=new zt(a)),f=me.add(d,f,_,X,F),f.proxy)return f;if(_=ft(),f.proxy=_,_.src=a,_.listener=f,a.addEventListener)V||(N=X),N===void 0&&(N=!1),a.addEventListener(d.toString(),_,N);else if(a.attachEvent)a.attachEvent(Zt(d.toString()),_);else if(a.addListener&&a.removeListener)a.addListener(_);else throw Error("addEventListener and attachEvent are unavailable.");return f}function ft(){function a(f){return d.call(a.src,a.listener,f)}const d=ar;return a}function Vt(a,d,f,_,N){if(Array.isArray(d))for(var F=0;F<d.length;F++)Vt(a,d[F],f,_,N);else _=u(_)?!!_.capture:!!_,f=ki(f),a&&a[Re]?(a=a.i,F=String(d).toString(),F in a.g&&(d=a.g[F],f=Ot(d,f,_,N),f>-1&&(Ue(d[f]),Array.prototype.splice.call(d,f,1),d.length==0&&(delete a.g[F],a.h--)))):a&&(a=en(a))&&(d=a.g[d.toString()],a=-1,d&&(a=Ot(d,f,_,N)),(f=a>-1?d[a]:null)&&Ut(f))}function Ut(a){if(typeof a!="number"&&a&&!a.da){var d=a.src;if(d&&d[Re])An(d.i,a);else{var f=a.type,_=a.proxy;d.removeEventListener?d.removeEventListener(f,_,a.capture):d.detachEvent?d.detachEvent(Zt(f),_):d.addListener&&d.removeListener&&d.removeListener(_),(f=en(d))?(An(f,a),f.h==0&&(f.src=null,d[Wt]=null)):Ue(a)}}}function Zt(a){return a in Be?Be[a]:Be[a]="on"+a}function ar(a,d){if(a.da)a=!0;else{d=new Pe(d,this);const f=a.listener,_=a.ha||a.src;a.fa&&Ut(a),a=f.call(_,d)}return a}function en(a){return a=a[Wt],a instanceof zt?a:null}var Br="__closure_events_fn_"+(Math.random()*1e9>>>0);function ki(a){return typeof a=="function"?a:(a[Br]||(a[Br]=function(d){return a.handleEvent(d)}),a[Br])}function lt(){I.call(this),this.i=new zt(this),this.M=this,this.G=null}p(lt,I),lt.prototype[Re]=!0,lt.prototype.removeEventListener=function(a,d,f,_){Vt(this,a,d,f,_)};function pt(a,d){var f,_=a.G;if(_)for(f=[];_;_=_.G)f.push(_);if(a=a.M,_=d.type||d,typeof d=="string")d=new S(d,a);else if(d instanceof S)d.target=d.target||a;else{var N=d;d=new S(_,a),xn(d,N)}N=!0;let F,X;if(f)for(X=f.length-1;X>=0;X--)F=d.g=f[X],N=qr(F,_,!0,d)&&N;if(F=d.g=a,N=qr(F,_,!0,d)&&N,N=qr(F,_,!1,d)&&N,f)for(X=0;X<f.length;X++)F=d.g=f[X],N=qr(F,_,!1,d)&&N}lt.prototype.N=function(){if(lt.Z.N.call(this),this.i){var a=this.i;for(const d in a.g){const f=a.g[d];for(let _=0;_<f.length;_++)Ue(f[_]);delete a.g[d],a.h--}}this.G=null},lt.prototype.J=function(a,d,f,_){return this.i.add(String(a),d,!1,f,_)},lt.prototype.K=function(a,d,f,_){return this.i.add(String(a),d,!0,f,_)};function qr(a,d,f,_){if(d=a.i.g[String(d)],!d)return!0;d=d.concat();let N=!0;for(let F=0;F<d.length;++F){const X=d[F];if(X&&!X.da&&X.capture==f){const me=X.listener,st=X.ha||X.src;X.fa&&An(a.i,X),N=me.call(st,_)!==!1&&N}}return N&&!_.defaultPrevented}function lu(a,d){if(typeof a!="function")if(a&&typeof a.handleEvent=="function")a=c(a.handleEvent,a);else throw Error("Invalid listener argument");return Number(d)>2147483647?-1:o.setTimeout(a,d||0)}function eo(a){a.g=lu(()=>{a.g=null,a.i&&(a.i=!1,eo(a))},a.l);const d=a.h;a.h=null,a.m.apply(null,d)}class to extends I{constructor(d,f){super(),this.m=d,this.l=f,this.h=null,this.i=!1,this.g=null}j(d){this.h=arguments,this.g?this.i=!0:eo(this)}N(){super.N(),this.g&&(o.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function ur(a){I.call(this),this.h=a,this.g={}}p(ur,I);var j=[];function ue(a){it(a.g,function(d,f){this.g.hasOwnProperty(f)&&Ut(d)},a),a.g={}}ur.prototype.N=function(){ur.Z.N.call(this),ue(this)},ur.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Hr=o.JSON.stringify,no=o.JSON.parse,cu=class{stringify(a){return o.JSON.stringify(a,void 0)}parse(a){return o.JSON.parse(a,void 0)}};function $r(){}function Ni(){}var Rn={OPEN:"a",hb:"b",ERROR:"c",tb:"d"};function Li(){S.call(this,"d")}p(Li,S);function Fi(){S.call(this,"c")}p(Fi,S);var Bt={},ji=null;function In(){return ji=ji||new lt}Bt.Ia="serverreachability";function Ui(a){S.call(this,Bt.Ia,a)}p(Ui,S);function lr(a){const d=In();pt(d,new Ui(d))}Bt.STAT_EVENT="statevent";function Bi(a,d){S.call(this,Bt.STAT_EVENT,a),this.stat=d}p(Bi,S);function mt(a){const d=In();pt(d,new Bi(d,a))}Bt.Ja="timingevent";function qi(a,d){S.call(this,Bt.Ja,a),this.size=d}p(qi,S);function Dn(a,d){if(typeof a!="function")throw Error("Fn must not be null and must be a function");return o.setTimeout(function(){a()},d)}function cr(){this.g=!0}cr.prototype.ua=function(){this.g=!1};function hu(a,d,f,_,N,F){a.info(function(){if(a.g)if(F){var X="",me=F.split("&");for(let Ae=0;Ae<me.length;Ae++){var st=me[Ae].split("=");if(st.length>1){const ct=st[0];st=st[1];const sn=ct.split("_");X=sn.length>=2&&sn[1]=="type"?X+(ct+"="+st+"&"):X+(ct+"=redacted&")}}}else X=null;else X=F;return"XMLHTTP REQ ("+_+") [attempt "+N+"]: "+d+` 95`+f+` 96`+X})}function du(a,d,f,_,N,F,X){a.info(function(){return"XMLHTTP RESP ("+_+") [ attempt "+N+"]: "+d+` 97`+f+` 98`+F+" "+X})}function On(a,d,f,_){a.info(function(){return"XMLHTTP TEXT ("+d+"): "+$i(a,f)+(_?" "+_:"")})}function Hi(a,d){a.info(function(){return"TIMEOUT: "+d})}cr.prototype.info=function(){};function $i(a,d){if(!a.g)return d;if(!d)return null;try{const F=JSON.parse(d);if(F){for(a=0;a<F.length;a++)if(Array.isArray(F[a])){var f=F[a];if(!(f.length<2)){var _=f[1];if(Array.isArray(_)&&!(_.length<1)){var N=_[0];if(N!="noop"&&N!="stop"&&N!="close")for(let X=1;X<_.length;X++)_[X]=""}}}}return Hr(F)}catch{return d}}var zr={NO_ERROR:0,cb:1,qb:2,pb:3,kb:4,ob:5,rb:6,Ga:7,TIMEOUT:8,ub:9},ro={ib:"complete",Fb:"success",ERROR:"error",Ga:"abort",xb:"ready",yb:"readystatechange",TIMEOUT:"timeout",sb:"incrementaldata",wb:"progress",lb:"downloadprogress",Nb:"uploadprogress"},io;function zi(){}p(zi,$r),zi.prototype.g=function(){return new XMLHttpRequest},io=new zi;function qe(a){return encodeURIComponent(String(a))}function fu(a){var d=1;a=a.split(":");const f=[];for(;d>0&&a.length;)f.push(a.shift()),d--;return a.length&&f.push(a.join(":")),f}function tn(a,d,f,_){this.j=a,this.i=d,this.l=f,this.S=_||1,this.V=new ur(this),this.H=45e3,this.J=null,this.o=!1,this.u=this.B=this.A=this.M=this.F=this.T=this.D=null,this.G=[],this.g=null,this.C=0,this.m=this.v=null,this.X=-1,this.K=!1,this.P=0,this.O=null,this.W=this.L=this.U=this.R=!1,this.h=new so}function so(){this.i=null,this.g="",this.h=!1}var Wi={},Ki={};function hr(a,d,f){a.M=1,a.A=Yr(kt(d)),a.u=f,a.R=!0,Wr(a,null)}function Wr(a,d){a.F=Date.now(),nn(a),a.B=kt(a.A);var f=a.B,_=a.S;Array.isArray(_)||(_=[String(_)]),es(f.i,"t",_),a.C=0,f=a.j.L,a.h=new so,a.g=$e(a.j,f?d:null,!a.u),a.P>0&&(a.O=new to(c(a.Y,a,a.g),a.P)),d=a.V,f=a.g,_=a.ba;var N="readystatechange";Array.isArray(N)||(N&&(j[0]=N.toString()),N=j);for(let F=0;F<N.length;F++){const X=Sn(f,N[F],_||d.handleEvent,!1,d.h||d);if(!X)break;d.g[X.key]=X}
98d=a.J?pe(a.J):{},a.u?(a.v||(a.v="POST"),d["Content-Type"]="application/x-www-form-urlencoded",a.g.ea(a.B,a.v,a.u,d)):(a.v="GET",a.g.ea(a.B,a.v,null,d)),lr(),hu(a.i,a.v,a.B,a.l,a.S,a.u)}tn.prototype.ba=function(a){a=a.target;const d=this.O;d&&Lt(a)==3?d.j():this.Y(a)},tn.prototype.Y=function(a){try{if(a==this.g)e:{const me=Lt(this.g),st=this.g.ya(),Ae=this.g.ca();if(!(me<3)&&(me!=3||this.g&&(this.h.h||this.g.la()||br(this.g)))){this.K||me!=4||st==7||(st==8||Ae<=0?lr(3):lr(2)),Gi(this);var d=this.g.ca();this.X=d;var f=pu(this);if(this.o=d==200,du(this.i,this.v,this.B,this.l,this.S,me,d),this.o){if(this.U&&!this.L){t:{if(this.g){var _,N=this.g;if((_=N.g?N.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!C(_)){var F=_;break t}}F=null}if(a=F)On(this.i,this.l,a,"Initial handshake response via X-HTTP-Initial-Response"),this.L=!0,Yi(this,a);else{this.o=!1,this.m=3,mt(12),Kt(this),fr(this);break e}}if(this.R){a=!0;let ct;for(;!this.K&&this.C<f.length;)if(ct=ao(this,f),ct==Ki){me==4&&(this.m=4,mt(14),a=!1),On(this.i,this.l,null,"[Incomplete Response]");break}else if(ct==Wi){this.m=4,mt(15),On(this.i,this.l,f,"[Invalid Chunk]"),a=!1;break}else On(this.i,this.l,ct,null),Yi(this,ct);if(oo(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),me!=4||f.length!=0||this.h.h||(this.m=1,mt(16),a=!1),this.o=this.o&&a,!a)On(this.i,this.l,f,"[Invalid Chunked Response]"),Kt(this),fr(this);else if(f.length>0&&!this.W){this.W=!0;var X=this.j;X.g==this&&X.aa&&!X.P&&(X.j.info("Great, no buffering proxy detected. Bytes received: "+f.length),k(X),X.P=!0,mt(11))}}else On(this.i,this.l,f,null),Yi(this,f);me==4&&Kt(this),this.o&&!this.K&&(me==4?te(this.j,this):(this.o=!1,nn(this)))}else ss(this.g),d==400&&f.indexOf("Unknown SID")>0?(this.m=3,mt(12)):(this.m=0,mt(13)),Kt(this),fr(this)}}}catch{}finally{}};function pu(a){if(!oo(a))return a.g.la();const d=br(a.g);if(d==="")return"";let f="";const _=d.length,N=Lt(a.g)==4;if(!a.h.i){if(typeof TextDecoder>"u")return Kt(a),fr(a),"";a.h.i=new o.TextDecoder}for(let F=0;F<_;F++)a.h.h=!0,f+=a.h.i.decode(d[F],{stream:!(N&&F==_-1)});return d.length=0,a.h.g+=f,a.C=0,a.h.g}function oo(a){return a.g?a.v=="GET"&&a.M!=2&&a.j.Aa:!1}function ao(a,d){var f=a.C,_=d.indexOf(` 99`,f);return _==-1?Ki:(f=Number(d.substring(f,_)),isNaN(f)?Wi:(_+=1,_+f>d.length?Ki:(d=d.slice(_,_+f),a.C=_+f,d)))}tn.prototype.cancel=function(){this.K=!0,Kt(this)};function nn(a){a.T=Date.now()+a.H,dr(a,a.H)}function dr(a,d){if(a.D!=null)throw Error("WatchDog timer not null");a.D=Dn(c(a.aa,a),d)}function Gi(a){a.D&&(o.clearTimeout(a.D),a.D=null)}tn.prototype.aa=function(){this.D=null;const a=Date.now();a-this.T>=0?(Hi(this.i,this.B),this.M!=2&&(lr(),mt(17)),Kt(this),this.m=2,fr(this)):dr(this,this.T-a)};function fr(a){a.j.I==0||a.K||te(a.j,a)}function Kt(a){Gi(a);var d=a.O;d&&typeof d.dispose=="function"&&d.dispose(),a.O=null,ue(a.V),a.g&&(d=a.g,a.g=null,d.abort(),d.dispose())}function Yi(a,d){try{var f=a.j;if(f.I!=0&&(f.g==a||Gr(f.h,a))){if(!a.L&&Gr(f.h,a)&&f.I==3){try{var _=f.Ba.g.parse(d)}catch{_=null}if(Array.isArray(_)&&_.length==3){var N=_;if(N[0]==0){e:if(!f.v){if(f.g)if(f.g.F+3e3<a.F)z(f),Ln(f);else break e;R(f),mt(18)}}else f.xa=N[1],0<f.xa-f.K&&N[2]<37500&&f.F&&f.A==0&&!f.C&&(f.C=Dn(c(f.Va,f),6e3));Kr(f.h)<=1&&f.ta&&(f.ta=void 0)}else G(f,11)}else if((a.L||f.g==a)&&z(f),!C(d))for(N=f.Ba.g.parse(d),d=0;d<N.length;d++){let Ae=N[d];const ct=Ae[0];if(!(ct<=f.K))if(f.K=ct,Ae=Ae[1],f.I==2)if(Ae[0]=="c"){f.M=Ae[1],f.ba=Ae[2];const sn=Ae[3];sn!=null&&(f.ka=sn,f.j.info("VER="+f.ka));const Cr=Ae[4];Cr!=null&&(f.za=Cr,f.j.info("SVER="+f.za));const Fn=Ae[5];Fn!=null&&typeof Fn=="number"&&Fn>0&&(_=1.5*Fn,f.O=_,f.j.info("backChannelRequestTimeoutMs_="+_)),_=f;const jn=a.g;if(jn){const _o=jn.g?jn.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(_o){var F=_.h;F.g||_o.indexOf("spdy")==-1&&_o.indexOf("quic")==-1&&_o.indexOf("h2")==-1||(F.j=F.l,F.g=new Set,F.h&&(rn(F,F.h),F.h=null))}if(_.G){const bu=jn.g?jn.g.getResponseHeader("X-HTTP-Session-Id"):null;bu&&(_.wa=bu,xe(_.J,_.G,bu))}}f.I=3,f.l&&f.l.ra(),f.aa&&(f.T=Date.now()-a.F,f.j.info("Handshake RTT: "+f.T+"ms")),_=f;var X=a;if(_.na=Ee(_,_.L?_.ba:null,_.W),X.L){Qi(_.h,X);var me=X,st=_.O;st&&(me.H=st),me.D&&(Gi(me),nn(me)),_.g=X}else T(_);f.i.length>0&&Er(f)}else Ae[0]!="stop"&&Ae[0]!="close"||G(f,7);else f.I==3&&(Ae[0]=="stop"||Ae[0]=="close"?Ae[0]=="stop"?G(f,7):os(f):Ae[0]!="noop"&&f.l&&f.l.qa(Ae),f.A=0)}}lr(4)}catch{}}var mu=class{constructor(a,d){this.g=a,this.map=d}};function pr(a){this.l=a||10,o.PerformanceNavigationTiming?(a=o.performance.getEntriesByType("navigation"),a=a.length>
990&&(a[0].nextHopProtocol=="hq"||a[0].nextHopProtocol=="h2")):a=!!(o.chrome&&o.chrome.loadTimes&&o.chrome.loadTimes()&&o.chrome.loadTimes().wasFetchedViaSpdy),this.j=a?this.l:1,this.g=null,this.j>1&&(this.g=new Set),this.h=null,this.i=[]}function St(a){return a.h?!0:a.g?a.g.size>=a.j:!1}function Kr(a){return a.h?1:a.g?a.g.size:0}function Gr(a,d){return a.h?a.h==d:a.g?a.g.has(d):!1}function rn(a,d){a.g?a.g.add(d):a.h=d}function Qi(a,d){a.h&&a.h==d?a.h=null:a.g&&a.g.has(d)&&a.g.delete(d)}pr.prototype.cancel=function(){if(this.i=uo(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const a of this.g.values())a.cancel();this.g.clear()}};function uo(a){if(a.h!=null)return a.i.concat(a.h.G);if(a.g!=null&&a.g.size!==0){let d=a.i;for(const f of a.g.values())d=d.concat(f.G);return d}return v(a.i)}var lo=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function gu(a,d){if(a){a=a.split("&");for(let f=0;f<a.length;f++){const _=a[f].indexOf("=");let N,F=null;_>=0?(N=a[f].substring(0,_),F=a[f].substring(_+1)):N=a[f],d(N,F?decodeURIComponent(F.replace(/\+/g," ")):"")}}}function Mt(a){this.g=this.o=this.j="",this.u=null,this.m=this.h="",this.l=!1;let d;a instanceof Mt?(this.l=a.l,Vn(this,a.j),this.o=a.o,this.g=a.g,mr(this,a.u),this.h=a.h,Xi(this,ho(a.i)),this.m=a.m):a&&(d=String(a).match(lo))?(this.l=!1,Vn(this,d[1]||"",!0),this.o=Mn(d[2]||""),this.g=Mn(d[3]||"",!0),mr(this,d[4]),this.h=Mn(d[5]||"",!0),Xi(this,d[6]||"",!0),this.m=Mn(d[7]||"")):(this.l=!1,this.i=new gr(null,this.l))}Mt.prototype.toString=function(){const a=[];var d=this.j;d&&a.push(kn(d,Ji,!0),":");var f=this.g;return(f||d=="file")&&(a.push("//"),(d=this.o)&&a.push(kn(d,Ji,!0),"@"),a.push(qe(f).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),f=this.u,f!=null&&a.push(":",String(f))),(f=this.h)&&(this.g&&f.charAt(0)!="/"&&a.push("/"),a.push(kn(f,f.charAt(0)=="/"?yu:sh,!0))),(f=this.i.toString())&&a.push("?",f),(f=this.m)&&a.push("#",kn(f,_u)),a.join("")},Mt.prototype.resolve=function(a){const d=kt(this);let f=!!a.j;f?Vn(d,a.j):f=!!a.o,f?d.o=a.o:f=!!a.g,f?d.g=a.g:f=a.u!=null;var _=a.h;if(f)mr(d,a.u);else if(f=!!a.h){if(_.charAt(0)!="/")if(this.g&&!this.h)_="/"+_;else{var N=d.h.lastIndexOf("/");N!=-1&&(_=d.h.slice(0,N+1)+_)}if(N=_,N==".."||N==".")_="";else if(N.indexOf("./")!=-1||N.indexOf("/.")!=-1){_=N.lastIndexOf("/",0)==0,N=N.split("/");const F=[];for(let X=0;X<N.length;){const me=N[X++];me=="."?_&&X==N.length&&F.push(""):me==".."?((F.length>1||F.length==1&&F[0]!="")&&F.pop(),_&&X==N.length&&F.push("")):(F.push(me),_=!0)}_=F.join("/")}else _=N}return f?d.h=_:f=a.i.toString()!=="",f?Xi(d,ho(a.i)):f=!!a.m,f&&(d.m=a.m),d};function kt(a){return new Mt(a)}function Vn(a,d,f){a.j=f?Mn(d,!0):d,a.j&&(a.j=a.j.replace(/:$/,""))}function mr(a,d){if(d){if(d=Number(d),isNaN(d)||d<0)throw Error("Bad port number "+d);a.u=d}else a.u=null}function Xi(a,d,f){d instanceof gr?(a.i=d,vu(a.i,a.l)):(f||(d=kn(d,oh)),a.i=new gr(d,a.l))}function xe(a,d,f){a.i.set(d,f)}function Yr(a){return xe(a,"zx",Math.floor(Math.random()*2147483648).toString(36)+Math.abs(Math.floor(Math.random()*2147483648)^Date.now()).toString(36)),a}function Mn(a,d){return a?d?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function kn(a,d,f){return typeof a=="string"?(a=encodeURI(a).replace(d,_n),f&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function _n(a){return a=a.charCodeAt(0),"%"+(a>>4&15).toString(16)+(a&15).toString(16)}
99var Ji=/[#\/\?@]/g,sh=/[#\?:]/g,yu=/[#\?]/g,oh=/[#\?@]/g,_u=/#/g;function gr(a,d){this.h=this.g=null,this.i=a||null,this.j=!!d}function vn(a){a.g||(a.g=new Map,a.h=0,a.i&&gu(a.i,function(d,f){a.add(decodeURIComponent(d.replace(/\+/g," ")),f)}))}n=gr.prototype,n.add=function(a,d){vn(this),this.i=null,a=wn(this,a);let f=this.g.get(a);return f||this.g.set(a,f=[]),f.push(d),this.h+=1,this};function co(a,d){vn(a),d=wn(a,d),a.g.has(d)&&(a.i=null,a.h-=a.g.get(d).length,a.g.delete(d))}function Zi(a,d){return vn(a),d=wn(a,d),a.g.has(d)}n.forEach=function(a,d){vn(this),this.g.forEach(function(f,_){f.forEach(function(N){a.call(d,N,_,this)},this)},this)};function yr(a,d){vn(a);let f=[];if(typeof d=="string")Zi(a,d)&&(f=f.concat(a.g.get(wn(a,d))));else for(a=Array.from(a.g.values()),d=0;d<a.length;d++)f=f.concat(a[d]);return f}n.set=function(a,d){return vn(this),this.i=null,a=wn(this,a),Zi(this,a)&&(this.h-=this.g.get(a).length),this.g.set(a,[d]),this.h+=1,this},n.get=function(a,d){return a?(a=yr(this,a),a.length>0?String(a[0]):d):d};function es(a,d,f){co(a,d),f.length>0&&(a.i=null,a.g.set(wn(a,d),v(f)),a.h+=f.length)}n.toString=function(){if(this.i)return this.i;if(!this.g)return"";const a=[],d=Array.from(this.g.keys());for(let _=0;_<d.length;_++){var f=d[_];const N=qe(f);f=yr(this,f);for(let F=0;F<f.length;F++){let X=N;f[F]!==""&&(X+="="+qe(f[F])),a.push(X)}}return this.i=a.join("&")};function ho(a){const d=new gr;return d.i=a.i,a.g&&(d.g=new Map(a.g),d.h=a.h),d}function wn(a,d){return d=String(d),a.j&&(d=d.toLowerCase()),d}function vu(a,d){d&&!a.j&&(vn(a),a.i=null,a.g.forEach(function(f,_){const N=_.toLowerCase();_!=N&&(co(this,_),es(this,N,f))},a)),a.j=d}function fo(a,d){const f=new cr;if(o.Image){const _=new Image;_.onload=h(Nt,f,"TestLoadImage: loaded",!0,d,_),_.onerror=h(Nt,f,"TestLoadImage: error",!1,d,_),_.onabort=h(Nt,f,"TestLoadImage: abort",!1,d,_),_.ontimeout=h(Nt,f,"TestLoadImage: timeout",!1,d,_),o.setTimeout(function(){_.ontimeout&&_.ontimeout()},1e4),_.src=a}else d(!1)}function ts(a,d){const f=new cr,_=new AbortController,N=setTimeout(()=>{_.abort(),Nt(f,"TestPingServer: timeout",!1,d)},1e4);fetch(a,{signal:_.signal}).then(F=>{clearTimeout(N),F.ok?Nt(f,"TestPingServer: ok",!0,d):Nt(f,"TestPingServer: server error",!1,d)}).catch(()=>{clearTimeout(N),Nt(f,"TestPingServer: error",!1,d)})}function Nt(a,d,f,_,N){try{N&&(N.onload=null,N.onerror=null,N.onabort=null,N.ontimeout=null),_(f)}catch{}}function wu(){this.g=new cu}function ns(a){this.i=a.Sb||null,this.h=a.ab||!1}p(ns,$r),ns.prototype.g=function(){return new Qr(this.i,this.h)};function Qr(a,d){lt.call(this),this.H=a,this.o=d,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.A=new Headers,this.h=null,this.F="GET",this.D="",this.g=!1,this.B=this.j=this.l=null,this.v=new AbortController}p(Qr,lt),n=Qr.prototype,n.open=function(a,d){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.F=a,this.D=d,this.readyState=1,_r(this)},n.send=function(a){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.v.signal.aborted)throw this.abort(),Error("Request was aborted.");this.g=!0;const d={headers:this.A,method:this.F,credentials:this.m,cache:void 0,signal:this.v.signal};a&&(d.body=a),(this.H||o).fetch(new Request(this.D,d)).then(this.Pa.bind(this),this.ga.bind(this))},n.abort=function(){this.response=this.responseText="",this.A=new Headers,this.status=0,this.v.abort(),this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),this.readyState>=1&&this.g&&this.readyState!=4&&(this.g=!1,Nn(this)),this.readyState=0},n.Pa=function(a){if(this.g&&(this.l=a,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=a.headers,this.readyState=2,_r(this)),this.g&&(this.readyState=3,_r(this),this.g)))if(this.responseType==="arraybuffer")a.arrayBuffer().then(this.Na.bind(this),this.ga.bind(this));else if(typeof o.ReadableStream<"u"&&"body"in a){if(this.j=a.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.B=new TextDecoder;Xr(this)}else a.text().then(this.Oa.bind(this),this.ga.bind(this))};function Xr(a){a.j.read().then(a.Ma.bind(a)).catch(a.ga.bind(a))}
99n.Ma=function(a){if(this.g){if(this.o&&a.value)this.response.push(a.value);else if(!this.o){var d=a.value?a.value:new Uint8Array(0);(d=this.B.decode(d,{stream:!a.done}))&&(this.response=this.responseText+=d)}a.done?Nn(this):_r(this),this.readyState==3&&Xr(this)}},n.Oa=function(a){this.g&&(this.response=this.responseText=a,Nn(this))},n.Na=function(a){this.g&&(this.response=a,Nn(this))},n.ga=function(){this.g&&Nn(this)};function Nn(a){a.readyState=4,a.l=null,a.j=null,a.B=null,_r(a)}n.setRequestHeader=function(a,d){this.A.append(a,d)},n.getResponseHeader=function(a){return this.h&&this.h.get(a.toLowerCase())||""},n.getAllResponseHeaders=function(){if(!this.h)return"";const a=[],d=this.h.entries();for(var f=d.next();!f.done;)f=f.value,a.push(f[0]+": "+f[1]),f=d.next();return a.join(`\r 100`)};function _r(a){a.onreadystatechange&&a.onreadystatechange.call(a)}Object.defineProperty(Qr.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(a){this.m=a?"include":"same-origin"}});function rs(a){let d="";return it(a,function(f,_){d+=_,d+=":",d+=f,d+=`\r 101`}),d}function vr(a,d,f){e:{for(_ in f){var _=!1;break e}_=!0}_||(f=rs(f),typeof a=="string"?f!=null&&qe(f):xe(a,d,f))}function Ie(a){lt.call(this),this.headers=new Map,this.L=a||null,this.h=!1,this.g=null,this.D="",this.o=0,this.l="",this.j=this.B=this.v=this.A=!1,this.m=null,this.F="",this.H=!1}p(Ie,lt);var po=/^https?$/i,Jr=["POST","PUT"];n=Ie.prototype,n.Fa=function(a){this.H=a},n.ea=function(a,d,f,_){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+a);d=d?d.toUpperCase():"GET",this.D=a,this.l="",this.o=0,this.A=!1,this.h=!0,this.g=this.L?this.L.g():io.g(),this.g.onreadystatechange=g(c(this.Ca,this));try{this.B=!0,this.g.open(d,String(a),!0),this.B=!1}catch(F){is(this,F);return}if(a=f||"",f=new Map(this.headers),_)if(Object.getPrototypeOf(_)===Object.prototype)for(var N in _)f.set(N,_[N]);else if(typeof _.keys=="function"&&typeof _.get=="function")for(const F of _.keys())f.set(F,_.get(F));else throw Error("Unknown input type for opt_headers: "+String(_));_=Array.from(f.keys()).find(F=>F.toLowerCase()=="content-type"),N=o.FormData&&a instanceof o.FormData,!(Array.prototype.indexOf.call(Jr,d,void 0)>=0)||_||N||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[F,X]of f)this.g.setRequestHeader(F,X);this.F&&(this.g.responseType=this.F),"withCredentials"in this.g&&this.g.withCredentials!==this.H&&(this.g.withCredentials=this.H);try{this.m&&(clearTimeout(this.m),this.m=null),this.v=!0,this.g.send(a),this.v=!1}catch(F){is(this,F)}};function is(a,d){a.h=!1,a.g&&(a.j=!0,a.g.abort(),a.j=!1),a.l=d,a.o=5,mo(a),Ct(a)}function mo(a){a.A||(a.A=!0,pt(a,"complete"),pt(a,"error"))}n.abort=function(a){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.o=a||7,pt(this,"complete"),pt(this,"abort"),Ct(this))},n.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),Ct(this,!0)),Ie.Z.N.call(this)},n.Ca=function(){this.u||(this.B||this.v||this.j?wr(this):this.Xa())},n.Xa=function(){wr(this)};function wr(a){if(a.h&&typeof s<"u"){if(a.v&&Lt(a)==4)setTimeout(a.Ca.bind(a),0);else if(pt(a,"readystatechange"),Lt(a)==4){a.h=!1;try{const F=a.ca();e:switch(F){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var d=!0;break e;default:d=!1}var f;if(!(f=d)){var _;if(_=F===0){let X=String(a.D).match(lo)[1]||null;!X&&o.self&&o.self.location&&(X=o.self.location.protocol.slice(0,-1)),_=!po.test(X?X.toLowerCase():"")}f=_}if(f)pt(a,"complete"),pt(a,"success");else{a.o=6;try{var N=Lt(a)>2?a.g.statusText:""}catch{N=""}a.l=N+" ["+a.ca()+"]",mo(a)}}finally{Ct(a)}}}}function Ct(a,d){if(a.g){a.m&&(clearTimeout(a.m),a.m=null);const f=a.g;a.g=null,d||pt(a,"ready");try{f.onreadystatechange=null}catch{}}}n.isActive=function(){return!!this.g};function Lt(a){return a.g?a.g.readyState:0}n.ca=function(){try{return Lt(this)>2?this.g.status:-1}catch{return-1}},n.la=function(){try{return this.g?this.g.responseText:""}catch{return""}},n.La=function(a){if(this.g){var d=this.g.responseText;return a&&d.indexOf(a)==0&&(d=d.substring(a.length)),no(d)}};function br(a){try{if(!a.g)return null;if("response"in a.g)return a.g.response;switch(a.F){case"":case"text":return a.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in a.g)return a.g.mozResponseArrayBuffer}return null}catch{return null}}function ss(a){const d={};a=(a.g&&Lt(a)>=2&&a.g.getAllResponseHeaders()||"").split(`\r 102`);for(let _=0;_<a.length;_++){if(C(a[_]))continue;var f=fu(a[_]);const N=f[0];if(f=f[1],typeof f!="string")continue;f=f.trim();const F=d[N]||[];d[N]=F,F.push(f)}Dt(d,function(_){return _.join(", ")})}n.ya=function(){return this.o},n.Ha=function(){return typeof this.l=="string"?this.l:String(this.l)};
102function Tr(a,d,f){return f&&f.internalChannelParams&&f.internalChannelParams[a]||d}function go(a){this.za=0,this.i=[],this.j=new cr,this.ba=this.na=this.J=this.W=this.g=this.wa=this.G=this.H=this.u=this.U=this.o=null,this.Ya=this.V=0,this.Sa=Tr("failFast",!1,a),this.F=this.C=this.v=this.m=this.l=null,this.X=!0,this.xa=this.K=-1,this.Y=this.A=this.D=0,this.Qa=Tr("baseRetryDelayMs",5e3,a),this.Za=Tr("retryDelaySeedMs",1e4,a),this.Ta=Tr("forwardChannelMaxRetries",2,a),this.va=Tr("forwardChannelRequestTimeoutMs",2e4,a),this.ma=a&&a.xmlHttpFactory||void 0,this.Ua=a&&a.Rb||void 0,this.Aa=a&&a.useFetchStreams||!1,this.O=void 0,this.L=a&&a.supportsCrossDomainXhr||!1,this.M="",this.h=new pr(a&&a.concurrentRequestLimit),this.Ba=new wu,this.S=a&&a.fastHandshake||!1,this.R=a&&a.encodeInitMessageHeaders||!1,this.S&&this.R&&(this.R=!1),this.Ra=a&&a.Pb||!1,a&&a.ua&&this.j.ua(),a&&a.forceLongPolling&&(this.X=!1),this.aa=!this.S&&this.X&&a&&a.detectBufferingProxy||!1,this.ia=void 0,a&&a.longPollingTimeout&&a.longPollingTimeout>0&&(this.ia=a.longPollingTimeout),this.ta=void 0,this.T=0,this.P=!1,this.ja=this.B=null}n=go.prototype,n.ka=8,n.I=1,n.connect=function(a,d,f,_){mt(0),this.W=a,this.H=d||{},f&&_!==void 0&&(this.H.OSID=f,this.H.OAID=_),this.F=this.X,this.J=Ee(this,null,this.W),Er(this)};function os(a){if(yo(a),a.I==3){var d=a.V++,f=kt(a.J);if(xe(f,"SID",a.M),xe(f,"RID",d),xe(f,"TYPE","terminate"),y(a,f),d=new tn(a,a.j,d),d.M=2,d.A=Yr(kt(f)),f=!1,o.navigator&&o.navigator.sendBeacon)try{f=o.navigator.sendBeacon(d.A.toString(),"")}catch{}!f&&o.Image&&(new Image().src=d.A,f=!0),f||(d.g=$e(d.j,null),d.g.ea(d.A)),d.F=Date.now(),nn(d)}ne(a)}function Ln(a){a.g&&(k(a),a.g.cancel(),a.g=null)}function yo(a){Ln(a),a.v&&(o.clearTimeout(a.v),a.v=null),z(a),a.h.cancel(),a.m&&(typeof a.m=="number"&&o.clearTimeout(a.m),a.m=null)}function Er(a){if(!St(a.h)&&!a.m){a.m=!0;var d=a.Ea;H||b(),K||(H(),K=!0),x.add(d,a),a.D=0}}function He(a,d){return Kr(a.h)>=a.h.j-(a.m?1:0)?!1:a.m?(a.i=d.G.concat(a.i),!0):a.I==1||a.I==2||a.D>=(a.Sa?0:a.Ta)?!1:(a.m=Dn(c(a.Ea,a,d),Q(a,a.D)),a.D++,!0)}n.Ea=function(a){if(this.m)if(this.m=null,this.I==1){if(!a){this.V=Math.floor(Math.random()*1e5),a=this.V++;const N=new tn(this,this.j,a);let F=this.o;if(this.U&&(F?(F=pe(F),xn(F,this.U)):F=this.U),this.u!==null||this.R||(N.J=F,F=null),this.S)e:{for(var d=0,f=0;f<this.i.length;f++){t:{var _=this.i[f];if("__data__"in _.map&&(_=_.map.__data__,typeof _=="string")){_=_.length;break t}_=void 0}if(_===void 0)break;if(d+=_,d>4096){d=f;break e}if(d===4096||f===this.i.length-1){d=f+1;break e}}d=1e3}else d=1e3;d=w(this,N,d),f=kt(this.J),xe(f,"RID",a),xe(f,"CVER",22),this.G&&xe(f,"X-HTTP-Session-Id",this.G),y(this,f),F&&(this.R?d="headers="+qe(rs(F))+"&"+d:this.u&&vr(f,this.u,F)),rn(this.h,N),this.Ra&&xe(f,"TYPE","init"),this.S?(xe(f,"$req",d),xe(f,"SID","null"),N.U=!0,hr(N,f,null)):hr(N,f,d),this.I=2}}else this.I==3&&(a?m(this,a):this.i.length==0||St(this.h)||m(this))};function m(a,d){var f;d?f=d.l:f=a.V++;const _=kt(a.J);xe(_,"SID",a.M),xe(_,"RID",f),xe(_,"AID",a.K),y(a,_),a.u&&a.o&&vr(_,a.u,a.o),f=new tn(a,a.j,f,a.D+1),a.u===null&&(f.J=a.o),d&&(a.i=d.G.concat(a.i)),d=w(a,f,1e3),f.H=Math.round(a.va*.5)+Math.round(a.va*.5*Math.random()),rn(a.h,f),hr(f,_,d)}function y(a,d){a.H&&it(a.H,function(f,_){xe(d,_,f)}),a.l&&it({},function(f,_){xe(d,_,f)})}function w(a,d,f){f=Math.min(a.i.length,f);const _=a.l?c(a.l.Ka,a.l,a):null;e:{var N=a.i;let me=-1;for(;;){const st=["count="+f];me==-1?f>0?(me=N[0].g,st.push("ofs="+me)):me=0:st.push("ofs="+me);let Ae=!0;for(let ct=0;ct<f;ct++){var F=N[ct].g;const sn=N[ct].map;if(F-=me,F<0)me=Math.max(0,N[ct].g-100),Ae=!1;else try{F="req"+F+"_"||"";try{var X=sn instanceof Map?sn:Object.entries(sn);for(const[Cr,Fn]of X){let jn=Fn;u(Fn)&&(jn=Hr(Fn)),st.push(F+Cr+"="+encodeURIComponent(jn))}}catch(Cr){throw st.push(F+"type="+encodeURIComponent("_badmap")),Cr}}catch{_&&_(sn)}}if(Ae){X=st.join("&");break e}}X=void 0}return a=a.i.splice(0,f),d.G=a,X}function T(a){if(!a.g&&!a.v){a.Y=1;var d=a.Da;H||b(),K||(H(),K=!0),x.add(d,a),a.A=0}}function R(a){return a.g||a.v||a.A>=3?!1:(a.Y++,a.v=Dn(c(a.Da,a),Q(a,a.A)),a.A++,!0)}
vendor: 4,142 bytes, line 102
102n.Da=function(){if(this.v=null,L(this),this.aa&&!(this.P||this.g==null||this.T<=0)){var a=4*this.T;this.j.info("BP detection timer enabled: "+a),this.B=Dn(c(this.Wa,this),a)}},n.Wa=function(){this.B&&(this.B=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.P=!0,mt(10),Ln(this),L(this))};function k(a){a.B!=null&&(o.clearTimeout(a.B),a.B=null)}function L(a){a.g=new tn(a,a.j,"rpc",a.Y),a.u===null&&(a.g.J=a.o),a.g.P=0;var d=kt(a.na);xe(d,"RID","rpc"),xe(d,"SID",a.M),xe(d,"AID",a.K),xe(d,"CI",a.F?"0":"1"),!a.F&&a.ia&&xe(d,"TO",a.ia),xe(d,"TYPE","xmlhttp"),y(a,d),a.u&&a.o&&vr(d,a.u,a.o),a.O&&(a.g.H=a.O);var f=a.g;a=a.ba,f.M=1,f.A=Yr(kt(d)),f.u=null,f.R=!0,Wr(f,a)}n.Va=function(){this.C!=null&&(this.C=null,Ln(this),R(this),mt(19))};function z(a){a.C!=null&&(o.clearTimeout(a.C),a.C=null)}function te(a,d){var f=null;if(a.g==d){z(a),k(a),a.g=null;var _=2}else if(Gr(a.h,d))f=d.G,Qi(a.h,d),_=1;else return;if(a.I!=0){if(d.o)if(_==1){f=d.u?d.u.length:0,d=Date.now()-d.F;var N=a.D;_=In(),pt(_,new qi(_,f)),Er(a)}else T(a);else if(N=d.m,N==3||N==0&&d.X>0||!(_==1&&He(a,d)||_==2&&R(a)))switch(f&&f.length>0&&(d=a.h,d.i=d.i.concat(f)),N){case 1:G(a,5);break;case 4:G(a,10);break;case 3:G(a,6);break;default:G(a,2)}}}function Q(a,d){let f=a.Qa+Math.floor(Math.random()*a.Za);return a.isActive()||(f*=2),f*d}function G(a,d){if(a.j.info("Error code "+d),d==2){var f=c(a.bb,a),_=a.Ua;const N=!_;_=new Mt(_||"//www.google.com/images/cleardot.gif"),o.location&&o.location.protocol=="http"||Vn(_,"https"),Yr(_),N?fo(_.toString(),f):ts(_.toString(),f)}else mt(2);a.I=0,a.l&&a.l.pa(d),ne(a),yo(a)}n.bb=function(a){a?(this.j.info("Successfully pinged google.com"),mt(2)):(this.j.info("Failed to ping google.com"),mt(1))};function ne(a){if(a.I=0,a.ja=[],a.l){const d=uo(a.h);(d.length!=0||a.i.length!=0)&&(P(a.ja,d),P(a.ja,a.i),a.h.i.length=0,v(a.i),a.i.length=0),a.l.oa()}}function Ee(a,d,f){var _=f instanceof Mt?kt(f):new Mt(f);if(_.g!="")d&&(_.g=d+"."+_.g),mr(_,_.u);else{var N=o.location;_=N.protocol,d=d?d+"."+N.hostname:N.hostname,N=+N.port;const F=new Mt(null);_&&Vn(F,_),d&&(F.g=d),N&&mr(F,N),f&&(F.h=f),_=F}return f=a.G,d=a.wa,f&&d&&xe(_,f,d),xe(_,"VER",a.ka),y(a,_),_}function $e(a,d,f){if(d&&!a.L)throw Error("Can't create secondary domain capable XhrIo object.");return d=a.Aa&&!a.ma?new Ie(new ns({ab:f})):new Ie(a.ma),d.Fa(a.L),d}n.isActive=function(){return!!this.l&&this.l.isActive(this)};function re(){}n=re.prototype,n.ra=function(){},n.qa=function(){},n.pa=function(){},n.oa=function(){},n.isActive=function(){return!0},n.Ka=function(){};function le(){}le.prototype.g=function(a,d){return new Z(a,d)};function Z(a,d){lt.call(this),this.g=new go(d),this.l=a,this.h=d&&d.messageUrlParams||null,a=d&&d.messageHeaders||null,d&&d.clientProtocolHeaderRequired&&(a?a["X-Client-Protocol"]="webchannel":a={"X-Client-Protocol":"webchannel"}),this.g.o=a,a=d&&d.initMessageHeaders||null,d&&d.messageContentType&&(a?a["X-WebChannel-Content-Type"]=d.messageContentType:a={"X-WebChannel-Content-Type":d.messageContentType}),d&&d.sa&&(a?a["X-WebChannel-Client-Profile"]=d.sa:a={"X-WebChannel-Client-Profile":d.sa}),this.g.U=a,(a=d&&d.Qb)&&!C(a)&&(this.g.u=a),this.A=d&&d.supportsCrossDomainXhr||!1,this.v=d&&d.sendRawJson||!1,(d=d&&d.httpSessionIdParam)&&!C(d)&&(this.g.G=d,a=this.h,a!==null&&d in a&&(a=this.h,d in a&&delete a[d])),this.j=new De(this)}p(Z,lt),Z.prototype.m=function(){this.g.l=this.j,this.A&&(this.g.L=!0),this.g.connect(this.l,this.h||void 0)},Z.prototype.close=function(){os(this.g)},Z.prototype.o=function(a){var d=this.g;if(typeof a=="string"){var f={};f.__data__=a,a=f}else this.v&&(f={},f.__data__=Hr(a),a=f);d.i.push(new mu(d.Ya++,a)),d.I==3&&Er(d)},Z.prototype.N=function(){this.g.l=null,delete this.j,os(this.g),delete this.g,Z.Z.N.call(this)};function Oe(a){Li.call(this),a.__headers__&&(this.headers=a.__headers__,this.statusCode=a.__status__,delete a.__headers__,delete a.__status__);var d=a.__sm__;if(d){e:{for(const f in d){a=f;break e}a=void 0}(this.i=a)&&(a=this.i,d=d!==null&&a in d?d[a]:void 0),this.data=d}else this.data=a}p(Oe,Li);
102function ze(){Fi.call(this),this.status=1}p(ze,Fi);function De(a){this.g=a}p(De,re),De.prototype.ra=function(){pt(this.g,"a")},De.prototype.qa=function(a){pt(this.g,new Oe(a))},De.prototype.pa=function(a){pt(this.g,new ze)},De.prototype.oa=function(){pt(this.g,"b")},le.prototype.createWebChannel=le.prototype.g,Z.prototype.send=Z.prototype.o,Z.prototype.open=Z.prototype.m,Z.prototype.close=Z.prototype.close,Zg=function(){return new le},Jg=function(){return In()},Xg=Bt,Dl={jb:0,mb:1,nb:2,Hb:3,Mb:4,Jb:5,Kb:6,Ib:7,Gb:8,Lb:9,PROXY:10,NOPROXY:11,Eb:12,Ab:13,Bb:14,zb:15,Cb:16,Db:17,fb:18,eb:19,gb:20},zr.NO_ERROR=0,zr.TIMEOUT=8,zr.HTTP_ERROR=6,xa=zr,ro.COMPLETE="complete",Qg=ro,Ni.EventType=Rn,Rn.OPEN="a",Rn.CLOSE="b",Rn.ERROR="c",Rn.MESSAGE="d",lt.prototype.listen=lt.prototype.J,ys=Ni,Ie.prototype.listenOnce=Ie.prototype.K,Ie.prototype.getLastError=Ie.prototype.Ha,Ie.prototype.getLastErrorCode=Ie.prototype.ya,Ie.prototype.getStatus=Ie.prototype.ca,Ie.prototype.getResponseJson=Ie.prototype.La,Ie.prototype.getResponseText=Ie.prototype.la,Ie.prototype.send=Ie.prototype.ea,Ie.prototype.setWithCredentials=Ie.prototype.Fa,Yg=Ie}).apply(typeof Co<"u"?Co:typeof self<"u"?self:typeof window<"u"?window:{});const Bd="@firebase/firestore",qd="4.9.2";/** 103 * @license 104 * Copyright 2017 Google LLC 105 * 106 * Licensed under the Apache License, Version 2.0 (the "License"); 107 * you may not use this file except in compliance with the License. 108 * You may obtain a copy of the License at 109 * 110 * http://www.apache.org/licenses/LICENSE-2.0 111 * 112 * Unless required by applicable law or agreed to in writing, software 113 * distributed under the License is distributed on an "AS IS" BASIS, 114 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115 * See the License for the specific language governing permissions and 116 * limitations under the License. 117 */class bt{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}bt.UNAUTHENTICATED=new bt(null),bt.GOOGLE_CREDENTIALS=new bt("google-credentials-uid"),bt.FIRST_PARTY=new bt("first-party-uid"),bt.MOCK_USER=new bt("mock-user");/** 118 * @license 119 * Copyright 2017 Google LLC 120 * 121 * Licensed under the Apache License, Version 2.0 (the "License"); 122 * you may not use this file except in compliance with the License. 123 * You may obtain a copy of the License at 124 * 125 * http://www.apache.org/licenses/LICENSE-2.0 126 * 127 * Unless required by applicable law or agreed to in writing, software 128 * distributed under the License is distributed on an "AS IS" BASIS, 129 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130 * See the License for the specific language governing permissions and 131 * limitations under the License. 132 */let Oi="12.3.0";/** 133 * @license 134 * Copyright 2017 Google LLC 135 * 136 * Licensed under the Apache License, Version 2.0 (the "License"); 137 * you may not use this file except in compliance with the License. 138 * You may obtain a copy of the License at 139 * 140 * http://www.apache.org/licenses/LICENSE-2.0 141 * 142 * Unless required by applicable law or agreed to in writing, software 143 * distributed under the License is distributed on an "AS IS" BASIS, 144 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 145 * See the License for the specific language governing permissions and 146 * limitations under the License. 147 */const jr=new H_("@firebase/firestore");function ri(){return jr.logLevel}function ee(n,...e){if(jr.logLevel<=bn.DEBUG){const t=e.map(Vc);jr.debug(`Firestore (${Oi}): ${n}`,...t)}}function Pn(n,...e){if(jr.logLevel<=bn.ERROR){const t=e.map(Vc);jr.error(`Firestore (${Oi}): ${n}`,...t)}}function _i(n,...e){if(jr.logLevel<=bn.WARN){const t=e.map(Vc);jr.warn(`Firestore (${Oi}): ${n}`,...t)}}function Vc(n){if(typeof n=="string")return n;try{/** 148* @license 149* Copyright 2020 Google LLC 150* 151* Licensed under the Apache License, Version 2.0 (the "License"); 152* you may not use this file except in compliance with the License. 153* You may obtain a copy of the License at 154* 155* http://www.apache.org/licenses/LICENSE-2.0 156* 157* Unless required by applicable law or agreed to in writing, softw
157are 158* distributed under the License is distributed on an "AS IS" BASIS, 159* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 160* See the License for the specific language governing permissions and 161* limitations under the License. 162*/return function(t){return JSON.stringify(t)}(n)}catch{return n}}/** 163 * @license 164 * Copyright 2017 Google LLC 165 * 166 * Licensed under the Apache License, Version 2.0 (the "License"); 167 * you may not use this file except in compliance with the License. 168 * You may obtain a copy of the License at 169 * 170 * http://www.apache.org/licenses/LICENSE-2.0 171 * 172 * Unless required by applicable law or agreed to in writing, software 173 * distributed under the License is distributed on an "AS IS" BASIS, 174 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 175 * See the License for the specific language governing permissions and 176 * limitations under the License. 177 */function de(n,e,t){let r="Unexpected state";typeof e=="string"?r=e:t=e,ey(n,r,t)}function ey(n,e,t){let r=`FIRESTORE (${Oi}) INTERNAL ASSERTION FAILED: ${e} (ID: ${n.toString(16)})`;if(t!==void 0)try{r+=" CONTEXT: "+JSON.stringify(t)}catch{r+=" CONTEXT: "+t}throw Pn(r),new Error(r)}function je(n,e,t,r){let i="Unexpected state";typeof t=="string"?i=t:r=t,n||ey(e,i,r)}function ve(n,e){return n}/** 178 * @license 179 * Copyright 2017 Google LLC 180 * 181 * Licensed under the Apache License, Version 2.0 (the "License"); 182 * you may not use this file except in compliance with the License. 183 * You may obtain a copy of the License at 184 * 185 * http://www.apache.org/licenses/LICENSE-2.0 186 * 187 * Unless required by applicable law or agreed to in writing, software 188 * distributed under the License is distributed on an "AS IS" BASIS, 189 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 * See the License for the specific language governing permissions and 191 * limitations under the License. 192 */const Y={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class ie extends W_{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** 193 * @license 194 * Copyright 2017 Google LLC 195 * 196 * Licensed under the Apache License, Version 2.0 (the "License"); 197 * you may not use this file except in compliance with the License. 198 * You may obtain a copy of the License at 199 * 200 * http://www.apache.org/licenses/LICENSE-2.0 201 * 202 * Unless required by applicable law or agreed to in writing, software 203 * distributed under the License is distributed on an "AS IS" BASIS, 204 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 205 * See the License for the specific language governing permissions and 206 * limitations under the License. 207 */class kr{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}/** 208 * @license 209 * Copyright 2017 Google LLC 210 * 211 * Licensed under the Apache License, Version 2.0 (the "License"); 212 * you may not use this file except in compliance with the License. 213 * You may obtain a copy of the License at 214 * 215 * http://www.apache.org/licenses/LICENSE-2.0 216 * 217 * Unless required by applicable law or agreed to in writing, software 218 * distributed under the License is distributed on an "AS IS" BASIS, 219 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 220 * See the License for the specific language governing permissions and 221 * limitations under the License. 222 */class ty{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class IP{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(bt.UNAUTHENTICATED))}shutdown(){}}class DP{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class OP{constructor(e){this.t=e,this.currentUser=bt.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){je(this.o===void 0,42304);let r=this.i;const i=l=>this.i!==r?(r=this.i,t(l)):Promise.resolve();let s=new kr;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new kr,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const l=s;e.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},u=l=>{ee("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(l=>u(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?u(l):(ee("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new kr)}},0),o()}getToken(){const e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(r=>this.i!==e?(ee("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(je(typeof r.accessToken=="string",31837,{l:r}),new ty(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return je(e===null||typeof e=="string",2055,{h:e}),new bt(e)}}class VP{constructor(e,t,r){this.P=e,this.T=t,this.I=r,this.type="FirstParty",this.user=bt.FIRST_PARTY,this.A=new Map}R(){return this.I?this.I():null}get headers(){this.A.set("X-Goog-AuthUser",this.P);const e=this.R();return e&&this.A.set("Authorization",e),this.T&&this.A.set("X-Goog-Iam-Authorization-Token",this.T),this.A}}class MP{constructor(e,t,r){this.P=e,this.T=t,this.I=r}getToken(){return Promise.resolve(new VP(this.P,this.T,this.I))}start(e,t){e.enqueueRetryable(()=>t(bt.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Hd{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class kP{constructor(e,t){this.V=t,this.forceRefresh=!1,this.appCheck=null,this.m=null,this.p=null,K_(e)&&e.settings.appCheckToken&&(this.p=e.settings.appCheckToken)}start(e,t){je(this.o===void 0,3512);const r=s=>{s.error!=null&&ee("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.m;return this.m=s.token,ee("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?t(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{ee("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.V.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.V.getImmediate({optional:!0});s?i(s):ee("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){if(this.p)return Promise.resolve(new Hd(this.p));const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(t=>t?(je(typeof t.token=="string",44558,{tokenResult:t}),this.m=t.token,new Hd(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** 223 * @license 224 * Copyright 2020 Google LLC 225 * 226 * Licensed under the Apache License, Version 2.0 (the "License");
227 * you may not use this file except in compliance with the License. 228 * You may obtain a copy of the License at 229 * 230 * http://www.apache.org/licenses/LICENSE-2.0 231 * 232 * Unless required by applicable law or agreed to in writing, software 233 * distributed under the License is distributed on an "AS IS" BASIS, 234 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 235 * See the License for the specific language governing permissions and 236 * limitations under the License. 237 */function NP(n){const e=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(n);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(t);else for(let r=0;r<n;r++)t[r]=Math.floor(256*Math.random());return t}/** 238 * @license 239 * Copyright 2017 Google LLC 240 * 241 * Licensed under the Apache License, Version 2.0 (the "License"); 242 * you may not use this file except in compliance with the License. 243 * You may obtain a copy of the License at 244 * 245 * http://www.apache.org/licenses/LICENSE-2.0 246 * 247 * Unless required by applicable law or agreed to in writing, software 248 * distributed under the License is distributed on an "AS IS" BASIS, 249 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 250 * See the License for the specific language governing permissions and 251 * limitations under the License. 252 */class Mc{static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=62*Math.floor(4.129032258064516);let r="";for(;r.length<20;){const i=NP(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<t&&(r+=e.charAt(i[s]%62))}return r}}function ye(n,e){return n<e?-1:n>e?1:0}function Ol(n,e){const t=Math.min(n.length,e.length);for(let r=0;r<t;r++){const i=n.charAt(r),s=e.charAt(r);if(i!==s)return Uu(i)===Uu(s)?ye(i,s):Uu(i)?1:-1}return ye(n.length,e.length)}const LP=55296,FP=57343;function Uu(n){const e=n.charCodeAt(0);return e>=LP&&e<=FP}function vi(n,e,t){return n.length===e.length&&n.every((r,i)=>t(r,e[i]))}/** 253 * @license 254 * Copyright 2017 Google LLC 255 * 256 * Licensed under the Apache License, Version 2.0 (the "License"); 257 * you may not use this file except in compliance with the License. 258 * You may obtain a copy of the License at 259 * 260 * http://www.apache.org/licenses/LICENSE-2.0 261 * 262 * Unless required by applicable law or agreed to in writing, software 263 * distributed under the License is distributed on an "AS IS" BASIS, 264 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 265 * See the License for the specific language governing permissions and 266 * limitations under the License. 267 */const $d="__name__";class an{constructor(e,t,r){t===void 0?t=0:t>e.length&&de(637,{offset:t,range:e.length}),r===void 0?r=e.length-t:r>e.length-t&&de(1746,{length:r,range:e.length-t}),this.segments=e,this.offset=t,this.len=r}get length(){return this.len}isEqual(e){return an.comparator(this,e)===0}child(e){const t=this.segments.slice(this.offset,this.limit());return e instanceof an?e.forEach(r=>{t.push(r)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,r=this.limit();t<r;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){const r=Math.min(e.length,t.length);for(let i=0;i<r;i++){const s=an.compareSegments(e.get(i),t.get(i));if(s!==0)return s}return ye(e.length,t.length)}static compareSegments(e,t){const r=an.isNumericId(e),i=an.isNumericId(t);return r&&!i?-1:!r&&i?1:r&&i?an.extractNumericId(e).compare(an.extractNumericId(t)):Ol(e,t)}static isNumericId(e){return e.startsWith("__id")&&e.endsWith("__")}static extractNumericId(e){return $n.fromString(e.substring(4,e.length-2))}}class Ne extends an{construct(e,t,r){return new Ne(e,t,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}
267toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const t=[];for(const r of e){if(r.indexOf("//")>=0)throw new ie(Y.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);t.push(...r.split("/").filter(i=>i.length>0))}return new Ne(t)}static emptyPath(){return new Ne([])}}const jP=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class Pt extends an{construct(e,t,r){return new Pt(e,t,r)}static isValidIdentifier(e){return jP.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),Pt.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)===$d}static keyField(){return new Pt([$d])}static fromServerFormat(e){const t=[];let r="",i=0;const s=()=>{if(r.length===0)throw new ie(Y.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(r),r=""};let o=!1;for(;i<e.length;){const u=e[i];if(u==="\\"){if(i+1===e.length)throw new ie(Y.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const l=e[i+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new ie(Y.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=l,i+=2}else u==="`"?(o=!o,i++):u!=="."||o?(r+=u,i++):(s(),i++)}if(s(),o)throw new ie(Y.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new Pt(t)}static emptyPath(){return new Pt([])}}/** 268 * @license 269 * Copyright 2017 Google LLC 270 * 271 * Licensed under the Apache License, Version 2.0 (the "License"); 272 * you may not use this file except in compliance with the License. 273 * You may obtain a copy of the License at 274 * 275 * http://www.apache.org/licenses/LICENSE-2.0 276 * 277 * Unless required by applicable law or agreed to in writing, software 278 * distributed under the License is distributed on an "AS IS" BASIS, 279 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 280 * See the License for the specific language governing permissions and 281 * limitations under the License. 282 */class oe{constructor(e){this.path=e}static fromPath(e){return new oe(Ne.fromString(e))}static fromName(e){return new oe(Ne.fromString(e).popFirst(5))}static empty(){return new oe(Ne.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&Ne.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,t){return Ne.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new oe(new Ne(e.slice()))}}/** 283 * @license 284 * Copyright 2017 Google LLC 285 * 286 * Licensed under the Apache License, Version 2.0 (the "License"); 287 * you may not use this file except in compliance with the License. 288 * You may obtain a copy of the License at 289 * 290 * http://www.apache.org/licenses/LICENSE-2.0 291 * 292 * Unless required by applicable law or agreed to in writing, software 293 * distributed under the License is distributed on an "AS IS" BASIS, 294 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 295 * See the License for the specific language governing permissions and 296 * limitations under the License. 297 */function UP(n,e,t){if(!t)throw new ie(Y.INVALID_ARGUMENT,`Function ${n}() cannot be called with an empty ${e}.`)}function BP(n,e,t,r){if(e===!0&&r===!0)throw new ie(Y.INVALID_ARGUMENT,`${n} and ${t} cannot be used together.`)}function zd(n){if(!oe.isDocumentKey(n))throw new ie(Y.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${n} has ${n.length}.`)}function qP(n){return typeof n=="object"&&n!==null&&(Object.getPrototypeOf(n)===Object.prototype||Object.getPrototypeOf(n)===null)}function HP(n){if(n===void 0)return"undefined";if(n===null)return"null";if(typeof n=="string")return n.length>20&&(n=`${n.substring(0,20)}...`),JSON.stringify(n);if(typeof n=="number"||typeof n=="boolean")return""+n;if(typeof n=="object"){if(n instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(n);return e?`a custom ${e} object`:"an object"}}return typeof n=="function"?"a function":de(12329,{type:typeof n})}function Vl(n,e){if("_delegate"in n&&(n=n._delegate),!(n instanceof e)){if(e.name===n.constructor.name)throw new ie(Y.INVA
vendor: 4,568 bytes, lines 297-346
297LID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=HP(n);throw new ie(Y.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${t}`)}}return n}/** 298 * @license 299 * Copyright 2025 Google LLC 300 * 301 * Licensed under the Apache License, Version 2.0 (the "License"); 302 * you may not use this file except in compliance with the License. 303 * You may obtain a copy of the License at 304 * 305 * http://www.apache.org/licenses/LICENSE-2.0 306 * 307 * Unless required by applicable law or agreed to in writing, software 308 * distributed under the License is distributed on an "AS IS" BASIS, 309 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 310 * See the License for the specific language governing permissions and 311 * limitations under the License. 312 */function tt(n,e){const t={typeString:n};return e&&(t.value=e),t}function Gs(n,e){if(!qP(n))throw new ie(Y.INVALID_ARGUMENT,"JSON must be an object");let t;for(const r in e)if(e[r]){const i=e[r].typeString,s="value"in e[r]?{value:e[r].value}:void 0;if(!(r in n)){t=`JSON missing required field: '${r}'`;break}const o=n[r];if(i&&typeof o!==i){t=`JSON field '${r}' must be a ${i}.`;break}if(s!==void 0&&o!==s.value){t=`Expected '${r}' field to equal '${s.value}'`;break}}if(t)throw new ie(Y.INVALID_ARGUMENT,t);return!0}/** 313 * @license 314 * Copyright 2017 Google LLC 315 * 316 * Licensed under the Apache License, Version 2.0 (the "License"); 317 * you may not use this file except in compliance with the License. 318 * You may obtain a copy of the License at 319 * 320 * http://www.apache.org/licenses/LICENSE-2.0 321 * 322 * Unless required by applicable law or agreed to in writing, software 323 * distributed under the License is distributed on an "AS IS" BASIS, 324 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 325 * See the License for the specific language governing permissions and 326 * limitations under the License. 327 */const Wd=-62135596800,Kd=1e6;class et{static now(){return et.fromMillis(Date.now())}static fromDate(e){return et.fromMillis(e.getTime())}static fromMillis(e){const t=Math.floor(e/1e3),r=Math.floor((e-1e3*t)*Kd);return new et(t,r)}constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0)throw new ie(Y.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new ie(Y.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<Wd)throw new ie(Y.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new ie(Y.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/Kd}_compareTo(e){return this.seconds===e.seconds?ye(this.nanoseconds,e.nanoseconds):ye(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{type:et._jsonSchemaVersion,seconds:this.seconds,nanoseconds:this.nanoseconds}}static fromJSON(e){if(Gs(e,et._jsonSchema))return new et(e.seconds,e.nanoseconds)}valueOf(){const e=this.seconds-Wd;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}et._jsonSchemaVersion="firestore/timestamp/1.0",et._jsonSchema={type:tt("string",et._jsonSchemaVersion),seconds:tt("number"),nanoseconds:tt("number")};/** 328 * @license 329 * Copyright 2017 Google LLC 330 * 331 * Licensed under the Apache License, Version 2.0 (the "License"); 332 * you may not use this file except in compliance with the License. 333 * You may obtain a copy of the License at 334 * 335 * http://www.apache.org/licenses/LICENSE-2.0 336 * 337 * Unless required by applicable law or agreed to in writing, software 338 * distributed under the License is distributed on an "AS IS" BASIS, 339 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 340 * See the License for the specific language governing permissions and 341 * limitations under the License. 342 */class he{static fromTimestamp(e){return new he(e)}static min(){return new he(new et(0,0))}static max(){return new he(new et(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** 343 * @license 344 * Copyright 2021 Google LLC 345 * 346 * Licensed under the Apache License, Version 2.0 (the "License");
347 * you may not use this file except in compliance with the License. 348 * You may obtain a copy of the License at 349 * 350 * http://www.apache.org/licenses/LICENSE-2.0 351 * 352 * Unless required by applicable law or agreed to in writing, software 353 * distributed under the License is distributed on an "AS IS" BASIS, 354 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 355 * See the License for the specific language governing permissions and 356 * limitations under the License. 357 */const Ns=-1;function $P(n,e){const t=n.toTimestamp().seconds,r=n.toTimestamp().nanoseconds+1,i=he.fromTimestamp(r===1e9?new et(t+1,0):new et(t,r));return new Jn(i,oe.empty(),e)}function zP(n){return new Jn(n.readTime,n.key,Ns)}class Jn{constructor(e,t,r){this.readTime=e,this.documentKey=t,this.largestBatchId=r}static min(){return new Jn(he.min(),oe.empty(),Ns)}static max(){return new Jn(he.max(),oe.empty(),Ns)}}function WP(n,e){let t=n.readTime.compareTo(e.readTime);return t!==0?t:(t=oe.comparator(n.documentKey,e.documentKey),t!==0?t:ye(n.largestBatchId,e.largestBatchId))}/** 358 * @license 359 * Copyright 2020 Google LLC 360 * 361 * Licensed under the Apache License, Version 2.0 (the "License"); 362 * you may not use this file except in compliance with the License. 363 * You may obtain a copy of the License at 364 * 365 * http://www.apache.org/licenses/LICENSE-2.0 366 * 367 * Unless required by applicable law or agreed to in writing, software 368 * distributed under the License is distributed on an "AS IS" BASIS, 369 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 370 * See the License for the specific language governing permissions and 371 * limitations under the License. 372 */const KP="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class GP{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** 373 * @license 374 * Copyright 2017 Google LLC 375 * 376 * Licensed under the Apache License, Version 2.0 (the "License"); 377 * you may not use this file except in compliance with the License. 378 * You may obtain a copy of the License at 379 * 380 * http://www.apache.org/licenses/LICENSE-2.0 381 * 382 * Unless required by applicable law or agreed to in writing, software 383 * distributed under the License is distributed on an "AS IS" BASIS, 384 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 385 * See the License for the specific language governing permissions and 386 * limitations under the License. 387 */async function Xa(n){if(n.code!==Y.FAILED_PRECONDITION||n.message!==KP)throw n;ee("LocalStore","Unexpectedly lost primary lease")}/** 388 * @license 389 * Copyright 2017 Google LLC 390 * 391 * Licensed under the Apache License, Version 2.0 (the "License"); 392 * you may not use this file except in compliance with the License. 393 * You may obtain a copy of the License at 394 * 395 * http://www.apache.org/licenses/LICENSE-2.0 396 * 397 * Unless required by applicable law or agreed to in writing, software 398 * distributed under the License is distributed on an "AS IS" BASIS, 399 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 400 * See the License for the specific language governing permissions and 401 * limitations under the License. 402 */class ${constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&de(59440),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new $((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(t,s).next(r,i)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{const t=e();return t instanceof $?t:$.resolve(t)}catch(t){return $.reject(t)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):$.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):$.reject(t)}static resolve(e){return new $((t,r)=>{t(e)})}static reject(e){return new $((t,r)=>{r(e)})}static waitFor(e){return new $((t,r)=>{let i=0,s=0,o=!1;e.forEach(u=>{++i,u.next(()=>{++s,o&&s===i&&t()},l=>r(l))}),o=!0,s===i&&t()})}static or(e){let t=$.resolve(!1);for(const r of e)t=t.next(i=>i?$.resolve(i):r());return t}static forEach(e,t){const r=[];return e.forEach((i,s)=>{r.push(t.call(this,i,s))}),this.waitFor(r)}
402static mapArray(e,t){return new $((r,i)=>{const s=e.length,o=new Array(s);let u=0;for(let l=0;l<s;l++){const c=l;t(e[c]).next(h=>{o[c]=h,++u,u===s&&r(o)},h=>i(h))}})}static doWhile(e,t){return new $((r,i)=>{const s=()=>{e()===!0?t().next(()=>{s()},i):r()};s()})}}function YP(n){const e=n.match(/Android ([\d.]+)/i),t=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(t)}function Vi(n){return n.name==="IndexedDbTransactionError"}/** 403 * @license 404 * Copyright 2018 Google LLC 405 * 406 * Licensed under the Apache License, Version 2.0 (the "License"); 407 * you may not use this file except in compliance with the License. 408 * You may obtain a copy of the License at 409 * 410 * http://www.apache.org/licenses/LICENSE-2.0 411 * 412 * Unless required by applicable law or agreed to in writing, software 413 * distributed under the License is distributed on an "AS IS" BASIS, 414 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 415 * See the License for the specific language governing permissions and 416 * limitations under the License. 417 */class Ja{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=r=>this.ae(r),this.ue=r=>t.writeSequenceNumber(r))}ae(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.ue&&this.ue(e),e}}Ja.ce=-1;/** 418 * @license 419 * Copyright 2017 Google LLC 420 * 421 * Licensed under the Apache License, Version 2.0 (the "License"); 422 * you may not use this file except in compliance with the License. 423 * You may obtain a copy of the License at 424 * 425 * http://www.apache.org/licenses/LICENSE-2.0 426 * 427 * Unless required by applicable law or agreed to in writing, software 428 * distributed under the License is distributed on an "AS IS" BASIS, 429 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 430 * See the License for the specific language governing permissions and 431 * limitations under the License. 432 */const QP=-1;function Za(n){return n==null}function Ml(n){return n===0&&1/n==-1/0}/** 433 * @license 434 * Copyright 2017 Google LLC 435 * 436 * Licensed under the Apache License, Version 2.0 (the "License"); 437 * you may not use this file except in compliance with the License. 438 * You may obtain a copy of the License at 439 * 440 * http://www.apache.org/licenses/LICENSE-2.0 441 * 442 * Unless required by applicable law or agreed to in writing, software 443 * distributed under the License is distributed on an "AS IS" BASIS, 444 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 445 * See the License for the specific language governing permissions and 446 * limitations under the License. 447 */const ny="�";function XP(n){let e="";for(let t=0;t<n.length;t++)e.length>0&&(e=Gd(e)),e=JP(n.get(t),e);return Gd(e)}function JP(n,e){let t=e;const r=n.length;for(let i=0;i<r;i++){const s=n.charAt(i);switch(s){case"\0":t+="��";break;case ny:t+="��";break;default:t+=s}}return t}function Gd(n){return n+ny+"�"}/** 448 * @license 449 * Copyright 2017 Google LLC 450 * 451 * Licensed under the Apache License, Version 2.0 (the "License"); 452 * you may not use this file except in compliance with the License. 453 * You may obtain a copy of the License at 454 * 455 * http://www.apache.org/licenses/LICENSE-2.0 456 * 457 * Unless required by applicable law or agreed to in writing, software 458 * distributed under the License is distributed on an "AS IS" BASIS, 459 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 460 * See the License for the specific language governing permissions and 461 * limitations under the License. 462 */function Yd(n){let e=0;for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e++;return e}function Ys(n,e){for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(t,n[t])}function ZP(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e))return!1;return!0}/** 463 * @license 464 * Copyright 2017 Google LLC 465 * 466 * Licensed under the Apache License, Version 2.0 (the "License"); 467 * you may not use this file except in compliance with the License. 468 * You may obtain a copy of the License at 469 * 470 * http://www.apache.org/licenses/LICENSE-2.0 471 * 472 * Unless required by applicable law or agreed to in writing, softw
472are 473 * distributed under the License is distributed on an "AS IS" BASIS, 474 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 475 * See the License for the specific language governing permissions and 476 * limitations under the License. 477 */class Xe{constructor(e,t){this.comparator=e,this.root=t||_t.EMPTY}insert(e,t){return new Xe(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,_t.BLACK,null,null))}remove(e){return new Xe(this.comparator,this.root.remove(e,this.comparator).copy(null,null,_t.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){const r=this.comparator(e,t.key);if(r===0)return t.value;r<0?t=t.left:r>0&&(t=t.right)}return null}indexOf(e){let t=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return t+r.left.size;i<0?r=r.left:(t+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,r)=>(e(t,r),!1))}toString(){const e=[];return this.inorderTraversal((t,r)=>(e.push(`${t}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new Po(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new Po(this.root,e,this.comparator,!1)}getReverseIterator(){return new Po(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new Po(this.root,e,this.comparator,!0)}}
vendor: 4,230 bytes, lines 477-487
477class Po{constructor(e,t,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=t?r(e.key,t):1,t&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class _t{constructor(e,t,r,i,s){this.key=e,this.value=t,this.color=r??_t.RED,this.left=i??_t.EMPTY,this.right=s??_t.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,r,i,s){return new _t(e??this.key,t??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,t,r),null):s===0?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return _t.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,t){let r,i=this;if(t(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,t),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),t(e,i.key)===0){if(i.right.isEmpty())return _t.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,t))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,_t.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,_t.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed())throw de(43730,{key:this.key,value:this.value});if(this.right.isRed())throw de(14113,{key:this.key,value:this.value});const e=this.left.check();if(e!==this.right.check())throw de(27949);return e+(this.isRed()?0:1)}}_t.EMPTY=null,_t.RED=!0,_t.BLACK=!1;_t.EMPTY=new class{constructor(){this.size=0}get key(){throw de(57766)}get value(){throw de(16141)}get color(){throw de(16727)}get left(){throw de(29726)}get right(){throw de(36894)}copy(e,t,r,i,s){return this}insert(e,t,r){return new _t(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** 478 * @license 479 * Copyright 2017 Google LLC 480 * 481 * Licensed under the Apache License, Version 2.0 (the "License"); 482 * you may not use this file except in compliance with the License. 483 * You may obtain a copy of the License at 484 * 485 * http://www.apache.org/licenses/LICENSE-2.0 486 * 487 * Unless required by applicable law or agreed to in writing, softw
487are 488 * distributed under the License is distributed on an "AS IS" BASIS, 489 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 490 * See the License for the specific language governing permissions and 491 * limitations under the License. 492 */class ut{constructor(e){this.comparator=e,this.data=new Xe(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,r)=>(e(t),!1))}forEachInRange(e,t){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;t(i.key)}}forEachWhile(e,t){let r;for(r=t!==void 0?this.data.getIteratorFrom(t):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new Qd(this.data.getIterator())}getIteratorFrom(e){return new Qd(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(r=>{t=t.add(r)}),t}isEqual(e){if(!(e instanceof ut)||this.size!==e.size)return!1;const t=this.data.getIterator(),r=e.data.getIterator();for(;t.hasNext();){const i=t.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(t=>{e.push(t)}),e}toString(){const e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){const t=new ut(this.comparator);return t.data=e,t}}class Qd{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** 493 * @license 494 * Copyright 2020 Google LLC 495 * 496 * Licensed under the Apache License, Version 2.0 (the "License"); 497 * you may not use this file except in compliance with the License. 498 * You may obtain a copy of the License at 499 * 500 * http://www.apache.org/licenses/LICENSE-2.0 501 * 502 * Unless required by applicable law or agreed to in writing, software 503 * distributed under the License is distributed on an "AS IS" BASIS, 504 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 505 * See the License for the specific language governing permissions and 506 * limitations under the License. 507 */class qn{constructor(e){this.fields=e,e.sort(Pt.comparator)}static empty(){return new qn([])}unionWith(e){let t=new ut(Pt.comparator);for(const r of this.fields)t=t.add(r);for(const r of e)t=t.add(r);return new qn(t.toArray())}covers(e){for(const t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return vi(this.fields,e.fields,(t,r)=>t.isEqual(r))}}/** 508 * @license 509 * Copyright 2023 Google LLC 510 * 511 * Licensed under the Apache License, Version 2.0 (the "License"); 512 * you may not use this file except in compliance with the License. 513 * You may obtain a copy of the License at 514 * 515 * http://www.apache.org/licenses/LICENSE-2.0 516 * 517 * Unless required by applicable law or agreed to in writing, software 518 * distributed under the License is distributed on an "AS IS" BASIS, 519 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 520 * See the License for the specific language governing permissions and 521 * limitations under the License. 522 */class ry extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** 523 * @license 524 * Copyright 2020 Google LLC 525 * 526 * Licensed under the Apache License, Version 2.0 (the "License"); 527 * you may not use this file except in compliance with the License. 528 * You may obtain a copy of the License at 529 * 530 * http://www.apache.org/licenses/LICENSE-2.0 531 * 532 * Unless required by applicable law or agreed to in writing, software 533 * distributed under the License is distributed on an "AS IS" BASIS, 534 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 535 * See the License for the specific language governing permissions and 536 * limitations under the License. 537 */class vt{constructor(e){this.binaryString=e}static fromBase64String(e){const t=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new ry("Invalid base64 string: "+s):s}}(e);return new vt(t)}static fromUint8Array(e){const t=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new vt(t)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(t){return btoa(t)}(this.binaryString)}
537toUint8Array(){return function(t){const r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return ye(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}vt.EMPTY_BYTE_STRING=new vt("");const ex=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Zn(n){if(je(!!n,39018),typeof n=="string"){let e=0;const t=ex.exec(n);if(je(!!t,46558,{timestamp:n}),t[1]){let i=t[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(n);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:Ge(n.seconds),nanos:Ge(n.nanos)}}function Ge(n){return typeof n=="number"?n:typeof n=="string"?Number(n):0}function er(n){return typeof n=="string"?vt.fromBase64String(n):vt.fromUint8Array(n)}/** 538 * @license 539 * Copyright 2020 Google LLC 540 * 541 * Licensed under the Apache License, Version 2.0 (the "License"); 542 * you may not use this file except in compliance with the License. 543 * You may obtain a copy of the License at 544 * 545 * http://www.apache.org/licenses/LICENSE-2.0 546 * 547 * Unless required by applicable law or agreed to in writing, software 548 * distributed under the License is distributed on an "AS IS" BASIS, 549 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 550 * See the License for the specific language governing permissions and 551 * limitations under the License. 552 */const iy="server_timestamp",sy="__type__",oy="__previous_value__",ay="__local_write_time__";function kc(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[sy])==null?void 0:r.stringValue)===iy}function eu(n){const e=n.mapValue.fields[oy];return kc(e)?eu(e):e}function Ls(n){const e=Zn(n.mapValue.fields[ay].timestampValue);return new et(e.seconds,e.nanos)}/** 553 * @license 554 * Copyright 2017 Google LLC 555 * 556 * Licensed under the Apache License, Version 2.0 (the "License"); 557 * you may not use this file except in compliance with the License. 558 * You may obtain a copy of the License at 559 * 560 * http://www.apache.org/licenses/LICENSE-2.0 561 * 562 * Unless required by applicable law or agreed to in writing, software 563 * distributed under the License is distributed on an "AS IS" BASIS, 564 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 565 * See the License for the specific language governing permissions and 566 * limitations under the License. 567 */class tx{constructor(e,t,r,i,s,o,u,l,c,h){this.databaseId=e,this.appId=t,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=u,this.longPollingOptions=l,this.useFetchStreams=c,this.isUsingEmulator=h}}const Ba="(default)";class Fs{constructor(e,t){this.projectId=e,this.database=t||Ba}static empty(){return new Fs("","")}get isDefaultDatabase(){return this.database===Ba}isEqual(e){return e instanceof Fs&&e.projectId===this.projectId&&e.database===this.database}}/** 568 * @license 569 * Copyright 2020 Google LLC 570 * 571 * Licensed under the Apache License, Version 2.0 (the "License"); 572 * you may not use this file except in compliance with the License. 573 * You may obtain a copy of the License at 574 * 575 * http://www.apache.org/licenses/LICENSE-2.0 576 * 577 * Unless required by applicable law or agreed to in writing, software 578 * distributed under the License is distributed on an "AS IS" BASIS, 579 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 580 * See the License for the specific language governing permissions and 581 * limitations under the License. 582 */const nx="__type__",uy="__max__",xo={mapValue:{fields:{__type__:{stringValue:uy}}}},rx="__vector__",kl="value";function tr(n){return"nullValue"in n?0:"booleanValue"in n?1:"integerValue"in n||"doubleValue"in n?2:"timestampValue"in n?3:"stringValue"in n?5:"bytesValue"in n?6:"referenceValue"in n?7:"geoPointValue"in n?8:"arrayValue"in n?9:"mapValue"in n?kc(n)?4:sx(n)?9007199254740991:ix(n)?10:11:de(28295,{value:n})}function mn(n,e){if(n===e)return!0;const t=tr(n);if(t!==tr(e))return!1;switch(t){case 0:case 9007199254740991:return!0;case 1:return n.booleanValue===e.booleanValue;case 4:return Ls(n).isEqual(Ls(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Zn(i.timestampValue),u=Zn(s.timestampValue);return o.seconds===u.seconds&&o.nanos===u.nanos}(n,e);case 5:return n.stringValue===e.stringValue;case 6:return function(i,s){return er(i.bytesValue).isEqual(er(s.bytesValue))}(n,e);case 7:return n.referenceValue===e.referenceValue;case 8:return function(i,s){return Ge(i.geoPointValue.latitude)===Ge(s.geoPointValue.latitude)&&Ge(i.geoPointValue.longitude)===Ge(s.geoPointValue.longitude)}(n,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return Ge(i.integerValue)===Ge(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=Ge(i.doubleValue),u=Ge(s.doubleValue);return o===u?Ml(o)===Ml(u):isNaN(o)&&isNaN(u)}return!1}(n,e);case 9:return vi(n.arrayValue.values||[],e.arrayValue.values||[],mn);case 10:case 11:return function(i,s){const o=i.mapValue.fields||{},u=s.mapValue.fields||{};if(Yd(o)!==Yd(u))return!1;for(const l in o)if(o.hasOwnProperty(l)&&(u[l]===void 0||!mn(o[l],u[l])))return!1;return!0}(n,e);default:return de(52216,{left:n})}}function js(n,e){return(n.values||[]).find(t=>mn(t,e))!==void 0}function wi(n,e){if(n===e)return 0;const t=tr(n),r=tr(e);if(t!==r)return ye(t,r);switch(t){case 0:case 9007199254740991:return 0;case 1:return ye(n.booleanValue,e.booleanValue);case 2:return function(s,o){const u=Ge(s.integerValue||s.doubleValue),l=Ge(o.integerValue||o.doubleValue);return u<l?-1:u>l?1:u===l?0:isNaN(u)?isNaN(l)?0:-1:1}(n,e);case 3:return Xd(n.timestampValue,e.timestampValue);case 4:return Xd(Ls(n),Ls(e));case 5:return Ol(n.stringValue,e.stringValue);case 6:return function(s,o){const u=er(s),l=er(o);return u.compareTo(l)}(n.bytesValue,e.bytesValue);case 7:return function(s,o){const u=s.split("/"),l=o.split("/");for(let c=0;c<u.length&&c<l.length;c++){const h=ye(u[c],l[c]);if(h!==0)return h}return ye(u.length,l.length)}(n.referenceValue,e.referenceValue);case 8:return function(s,o){const u=ye(Ge(s.latitude),Ge(o.latitude));return u!==0?u:ye(Ge(s.longitude),Ge(o.longitude))}(n.geoPointValue,e.geoPointValue);case 9:return Jd(n.arrayValue,e.arrayValue);case 10:return function(s,o){var g,v,P,A;const u=s.fields||{},l=o.fields||{},c=(g=u[kl])==null?void 0:g.arrayValue,h=(v=l[kl])==null?void 0:v.arrayValue,p=ye(((P=c==null?void 0:c.values)==null?void 0:P.length)||0,((A=h==null?void 0:h.values)==null?void 0:A.length)||0);return p!==0?p:Jd(c,h)}(n.mapValue,e.mapValue);case 11:return function(s,o){if(s===xo.mapValue&&o===xo.mapValue)return 0;if(s===xo.mapValue)return 1;if(o===xo.mapValue)return-1;const u=s.fields||{},l=Object.keys(u),c=o.fields||{},h=Object.keys(c);l.sort(),h.sort();for(let p=0;p<l.length&&p<h.length;++p){const g=Ol(l[p],h[p]);if(g!==0)return g;const v=wi(u[l[p]],c[h[p]]);if(v!==0)return v}return ye(l.length,h.length)}(n.mapValue,e.mapValue);default:throw de(23264,{he:t})}}function Xd(n,e){if(typeof n=="string"&&typeof e=="string"&&n.length===e.length)return ye(n,e);const t=Zn(n),r=Zn(e),i=ye(t.seconds,r.seconds);return i!==0?i:ye(t.nanos,r.nanos)}function Jd(n,e){const t=n.values||[],r=e.values||[];for(let i=0;i<t.length&&i<r.length;++i){const s=wi(t[i],r[i]);if(s)return s}return ye(t.length,r.length)}function bi(n){return Nl(n)}function Nl(n){return"nullValue"in n?"null":"booleanValue"in n?""+n.booleanValue:"integerValue"in n?""+n.integerValue:"doubleValue"in n?""+n.doubleValue:"timestampValue"in n?function(t){const r=Zn(t);return`time(${r.seconds},${r.nanos})`}(n.timestampValue):"stringValue"in n?n.stringValue:"bytesValue"in n?function(t){return er(t).toBase64()}(n.bytesValue):"referenceValue"in n?function(t){return oe.fromName(t).toString()}(n.referenceValue):"geoPointValue"in n?function(t){return`geo(${t.latitude},${t.longitude})`}(n.geoPointValue):"arrayValue"in n?function(t){let r="[",i=!0;for(const s of t.values||[])i?i=!1:r+=",",r+=Nl(s);return r+"]"}(n.arrayValue):"mapValue"in n?function(t){const r=Object.keys(t.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${Nl(t.fields[o])}`;return i+"}"}(n.mapValue):de(61005,{value:n})}function Aa(n){switch(tr(n)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=eu(n);return e?16+Aa(e):16;case 5:return 2*n.stringValue.length;case 6:return er(n.bytesValue).approximateByteSize();case 7:return n.referenceValue.length;case 9:return function(r){return(r.values||[]).reduce((i,s)=>i+Aa(s),0)}(n.arrayValue);case 10:case 11:return function(r){let i=0;return Ys(r.fields,(s,o)=>{i+=s.length+Aa(o)}),i}(n.mapValue);default:throw de(13486,{value:n})}}function Ll(n){return!!n&&"integerValue"in n}function Nc(n){return!!n&&"arrayValue"in n}function Zd(n){return!!n&&"nullValue"in n}function ef(n){return!!n&&"doubleValue"in n&&isNaN(Number(n.doubleValue))}function Bu(n){return!!n&&"mapValue"in n}function ix(n){var t,r;return((r=(((t=n==null?void 0:n.mapValue)==null?void 0:t.fields)||{})[nx])==null?void 0:r.stringValue)===rx}
582function Ps(n){if(n.geoPointValue)return{geoPointValue:{...n.geoPointValue}};if(n.timestampValue&&typeof n.timestampValue=="object")return{timestampValue:{...n.timestampValue}};if(n.mapValue){const e={mapValue:{fields:{}}};return Ys(n.mapValue.fields,(t,r)=>e.mapValue.fields[t]=Ps(r)),e}if(n.arrayValue){const e={arrayValue:{values:[]}};for(let t=0;t<(n.arrayValue.values||[]).length;++t)e.arrayValue.values[t]=Ps(n.arrayValue.values[t]);return e}return{...n}}function sx(n){return(((n.mapValue||{}).fields||{}).__type__||{}).stringValue===uy}/** 583 * @license 584 * Copyright 2017 Google LLC 585 * 586 * Licensed under the Apache License, Version 2.0 (the "License"); 587 * you may not use this file except in compliance with the License. 588 * You may obtain a copy of the License at 589 * 590 * http://www.apache.org/licenses/LICENSE-2.0 591 * 592 * Unless required by applicable law or agreed to in writing, software 593 * distributed under the License is distributed on an "AS IS" BASIS, 594 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 595 * See the License for the specific language governing permissions and 596 * limitations under the License. 597 */class cn{constructor(e){this.value=e}static empty(){return new cn({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let r=0;r<e.length-1;++r)if(t=(t.mapValue.fields||{})[e.get(r)],!Bu(t))return null;return t=(t.mapValue.fields||{})[e.lastSegment()],t||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=Ps(t)}setAll(e){let t=Pt.emptyPath(),r={},i=[];e.forEach((o,u)=>{if(!t.isImmediateParentOf(u)){const l=this.getFieldsMap(t);this.applyChanges(l,r,i),r={},i=[],t=u.popLast()}o?r[u.lastSegment()]=Ps(o):i.push(u.lastSegment())});const s=this.getFieldsMap(t);this.applyChanges(s,r,i)}delete(e){const t=this.field(e.popLast());Bu(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return mn(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=t.mapValue.fields[e.get(r)];Bu(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},t.mapValue.fields[e.get(r)]=i),t=i}return t.mapValue.fields}applyChanges(e,t,r){Ys(t,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new cn(Ps(this.value))}}/** 598 * @license 599 * Copyright 2017 Google LLC 600 * 601 * Licensed under the Apache License, Version 2.0 (the "License"); 602 * you may not use this file except in compliance with the License. 603 * You may obtain a copy of the License at 604 * 605 * http://www.apache.org/licenses/LICENSE-2.0 606 * 607 * Unless required by applicable law or agreed to in writing, software 608 * distributed under the License is distributed on an "AS IS" BASIS, 609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 610 * See the License for the specific language governing permissions and 611 * limitations under the License. 612 */class Tt{constructor(e,t,r,i,s,o,u){this.key=e,this.documentType=t,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=u}static newInvalidDocument(e){return new Tt(e,0,he.min(),he.min(),he.min(),cn.empty(),0)}static newFoundDocument(e,t,r,i){return new Tt(e,1,t,he.min(),r,i,0)}static newNoDocument(e,t){return new Tt(e,2,t,he.min(),he.min(),cn.empty(),0)}static newUnknownDocument(e,t){return new Tt(e,3,t,he.min(),he.min(),cn.empty(),2)}convertToFoundDocument(e,t){return!this.createTime.isEqual(he.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=cn.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=cn.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=he.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Tt&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Tt(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}
612/** 613 * @license 614 * Copyright 2022 Google LLC 615 * 616 * Licensed under the Apache License, Version 2.0 (the "License"); 617 * you may not use this file except in compliance with the License. 618 * You may obtain a copy of the License at 619 * 620 * http://www.apache.org/licenses/LICENSE-2.0 621 * 622 * Unless required by applicable law or agreed to in writing, software 623 * distributed under the License is distributed on an "AS IS" BASIS, 624 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 625 * See the License for the specific language governing permissions and 626 * limitations under the License. 627 */class qa{constructor(e,t){this.position=e,this.inclusive=t}}function tf(n,e,t){let r=0;for(let i=0;i<n.position.length;i++){const s=e[i],o=n.position[i];if(s.field.isKeyField()?r=oe.comparator(oe.fromName(o.referenceValue),t.key):r=wi(o,t.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function nf(n,e){if(n===null)return e===null;if(e===null||n.inclusive!==e.inclusive||n.position.length!==e.position.length)return!1;for(let t=0;t<n.position.length;t++)if(!mn(n.position[t],e.position[t]))return!1;return!0}/** 628 * @license 629 * Copyright 2022 Google LLC 630 * 631 * Licensed under the Apache License, Version 2.0 (the "License"); 632 * you may not use this file except in compliance with the License. 633 * You may obtain a copy of the License at 634 * 635 * http://www.apache.org/licenses/LICENSE-2.0 636 * 637 * Unless required by applicable law or agreed to in writing, software 638 * distributed under the License is distributed on an "AS IS" BASIS, 639 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 640 * See the License for the specific language governing permissions and 641 * limitations under the License. 642 */class Ha{constructor(e,t="asc"){this.field=e,this.dir=t}}function ox(n,e){return n.dir===e.dir&&n.field.isEqual(e.field)}/** 643 * @license 644 * Copyright 2022 Google LLC 645 * 646 * Licensed under the Apache License, Version 2.0 (the "License"); 647 * you may not use this file except in compliance with the License. 648 * You may obtain a copy of the License at 649 * 650 * http://www.apache.org/licenses/LICENSE-2.0 651 * 652 * Unless required by applicable law or agreed to in writing, software 653 * distributed under the License is distributed on an "AS IS" BASIS, 654 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 655 * See the License for the specific language governing permissions and 656 * limitations under the License. 657 */class ly{}class at extends ly{constructor(e,t,r){super(),this.field=e,this.op=t,this.value=r}static create(e,t,r){return e.isKeyField()?t==="in"||t==="not-in"?this.createKeyFieldInFilter(e,t,r):new ux(e,t,r):t==="array-contains"?new hx(e,r):t==="in"?new dx(e,r):t==="not-in"?new fx(e,r):t==="array-contains-any"?new px(e,r):new at(e,t,r)}static createKeyFieldInFilter(e,t,r){return t==="in"?new lx(e,r):new cx(e,r)}matches(e){const t=e.data.field(this.field);return this.op==="!="?t!==null&&t.nullValue===void 0&&this.matchesComparison(wi(t,this.value)):t!==null&&tr(this.value)===tr(t)&&this.matchesComparison(wi(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return de(47266,{operator:this.op})}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class gn extends ly{constructor(e,t){super(),this.filters=e,this.op=t,this.Pe=null}static create(e,t){return new gn(e,t)}matches(e){return cy(this)?this.filters.find(t=>!t.matches(e))===void 0:this.filters.find(t=>t.matches(e))!==void 0}getFlattenedFilters(){return this.Pe!==null||(this.Pe=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.Pe}getFilters(){return Object.assign([],this.filters)}}function cy(n){return n.op==="and"}function hy(n){return ax(n)&&cy(n)}function ax(n){for(const e of n.filters)if(e instanceof gn)return!1;return!0}function Fl(n){if(n instanceof at)return n.field.canonicalString()+n.op.toString()+bi(n.value);if(hy(n))return n.filters.map(e=>Fl(e)).join(",");{const e=n.filters.map(t=>Fl(t)).join(",");return`${n.op}(${e})`}}function dy(n,e){return n instanceof at?function(r,i){return i instanceof at&&r.op===i.op&&r.field.isEqual(i.field)&&mn(r.value,i.value)}(n,e):n instanceof gn?function(r,i){return i instanceof gn&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,u)=>s&&dy(o,i.filters[u]),!0):!1}(n,e):void de(19439)}function fy(n){return n instanceof at?function(t){return`${t.field.canonicalString()} ${t.op} ${bi(t.value)}`}(n):n instanceof gn?function(t){return t.op.toString()+" {"+t.getFilters().map(fy).join(" ,")+"}"}(n):"Filter"}class ux extends at{constructor(e,t,r){super(e,t,r),this.key=oe.fromName(r.referenceValue)}matches(e){const t=oe.comparator(e.key,this.key);return this.matchesComparison(t)}}class lx extends at{constructor(e,t){super(e,"in",t),this.keys=py("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class cx extends at{constructor(e,t){super(e,"not-in",t),this.keys=py("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function py(n,e){var t;return(((t=e.arrayValue)==null?void 0:t.values)||[]).map(r=>oe.fromName(r.referenceValue))}class hx extends at{constructor(e,t){super(e,"array-contains",t)}matches(e){const t=e.data.field(this.field);return Nc(t)&&js(t.arrayValue,this.value)}}class dx extends at{constructor(e,t){super(e,"in",t)}matches(e){const t=e.data.field(this.field);return t!==null&&js(this.value.arrayValue,t)}}class fx extends at{constructor(e,t){super(e,"not-in",t)}matches(e){if(js(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=e.data.field(this.field);return t!==null&&t.nullValue===void 0&&!js(this.value.arrayValue,t)}}class px extends at{constructor(e,t){super(e,"array-contains-any",t)}matches(e){const t=e.data.field(this.field);return!(!Nc(t)||!t.arrayValue.values)&&t.arrayValue.values.some(r=>js(this.value.arrayValue,r))}}/** 658 * @license 659 * Copyright 2019 Google LLC 660 * 661 * Licensed under the Apache License, Version 2.0 (the "License");
662 * you may not use this file except in compliance with the License. 663 * You may obtain a copy of the License at 664 * 665 * http://www.apache.org/licenses/LICENSE-2.0 666 * 667 * Unless required by applicable law or agreed to in writing, software 668 * distributed under the License is distributed on an "AS IS" BASIS, 669 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 670 * See the License for the specific language governing permissions and 671 * limitations under the License. 672 */class mx{constructor(e,t=null,r=[],i=[],s=null,o=null,u=null){this.path=e,this.collectionGroup=t,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=u,this.Te=null}}function rf(n,e=null,t=[],r=[],i=null,s=null,o=null){return new mx(n,e,t,r,i,s,o)}function Lc(n){const e=ve(n);if(e.Te===null){let t=e.path.canonicalString();e.collectionGroup!==null&&(t+="|cg:"+e.collectionGroup),t+="|f:",t+=e.filters.map(r=>Fl(r)).join(","),t+="|ob:",t+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),Za(e.limit)||(t+="|l:",t+=e.limit),e.startAt&&(t+="|lb:",t+=e.startAt.inclusive?"b:":"a:",t+=e.startAt.position.map(r=>bi(r)).join(",")),e.endAt&&(t+="|ub:",t+=e.endAt.inclusive?"a:":"b:",t+=e.endAt.position.map(r=>bi(r)).join(",")),e.Te=t}return e.Te}function Fc(n,e){if(n.limit!==e.limit||n.orderBy.length!==e.orderBy.length)return!1;for(let t=0;t<n.orderBy.length;t++)if(!ox(n.orderBy[t],e.orderBy[t]))return!1;if(n.filters.length!==e.filters.length)return!1;for(let t=0;t<n.filters.length;t++)if(!dy(n.filters[t],e.filters[t]))return!1;return n.collectionGroup===e.collectionGroup&&!!n.path.isEqual(e.path)&&!!nf(n.startAt,e.startAt)&&nf(n.endAt,e.endAt)}function jl(n){return oe.isDocumentKey(n.path)&&n.collectionGroup===null&&n.filters.length===0}/** 673 * @license 674 * Copyright 2017 Google LLC 675 * 676 * Licensed under the Apache License, Version 2.0 (the "License"); 677 * you may not use this file except in compliance with the License. 678 * You may obtain a copy of the License at 679 * 680 * http://www.apache.org/licenses/LICENSE-2.0 681 * 682 * Unless required by applicable law or agreed to in writing, software 683 * distributed under the License is distributed on an "AS IS" BASIS, 684 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 685 * See the License for the specific language governing permissions and 686 * limitations under the License. 687 */class tu{constructor(e,t=null,r=[],i=[],s=null,o="F",u=null,l=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=u,this.endAt=l,this.Ie=null,this.Ee=null,this.de=null,this.startAt,this.endAt}}function gx(n,e,t,r,i,s,o,u){return new tu(n,e,t,r,i,s,o,u)}function jc(n){return new tu(n)}function sf(n){return n.filters.length===0&&n.limit===null&&n.startAt==null&&n.endAt==null&&(n.explicitOrderBy.length===0||n.explicitOrderBy.length===1&&n.explicitOrderBy[0].field.isKeyField())}function yx(n){return n.collectionGroup!==null}function xs(n){const e=ve(n);if(e.Ie===null){e.Ie=[];const t=new Set;for(const s of e.explicitOrderBy)e.Ie.push(s),t.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let u=new ut(Pt.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(c=>{c.isInequality()&&(u=u.add(c.field))})}),u})(e).forEach(s=>{t.has(s.canonicalString())||s.isKeyField()||e.Ie.push(new Ha(s,r))}),t.has(Pt.keyField().canonicalString())||e.Ie.push(new Ha(Pt.keyField(),r))}return e.Ie}function pn(n){const e=ve(n);return e.Ee||(e.Ee=_x(e,xs(n))),e.Ee}function _x(n,e){if(n.limitType==="F")return rf(n.path,n.collectionGroup,e,n.filters,n.limit,n.startAt,n.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new Ha(i.field,s)});const t=n.endAt?new qa(n.endAt.position,n.endAt.inclusive):null,r=n.startAt?new qa(n.startAt.position,n.startAt.inclusive):null;return rf(n.path,n.collectionGroup,e,n.filters,n.limit,t,r)}}function Ul(n,e,t){return new tu(n.path,n.collectionGroup,n.explicitOrderBy.slice(),n.filters.slice(),e,t,n.startAt,n.endAt)}function nu(n,e){return Fc(pn(n),pn(e))&&n.limitType===e.limitType}function my(n){return`${Lc(pn(n))}|lt:${n.limitType}`}function ii(n){return`Query(target=${function(t){let r=t.path.canonicalString();return t.collectionGroup!==null&&(r+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(r+=`, filters: [${t.filters.map(i=>fy(i)).join(", ")}]`),Za(t.limit)||(r+=", limit: "+t.limit),t.orderBy.length>0&&(r+=`, orderBy: [${t.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),t.startAt&&(r+=", startAt: ",r+=t.startAt.inclusive?"b:":"a:",r+=t.startAt.position.map(i=>bi(i)).join(",")),t.endAt&&(r+=", endAt: ",r+=t.endAt.inclusive?"a:":"b:",r+=t.endAt.position.map(i=>bi(i)).join(",")),`Target(${r})`}(pn(n))}; limitType=${n.limitType})`}function ru(n,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):oe.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(n,e)&&function(r,i){for(const s of xs(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(n,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(n,e)&&function(r,i){return!(r.startAt&&!function(o,u,l){const c=tf(o,u,l);return o.inclusive?c<=0:c<0}(r.startAt,xs(r),i)||r.endAt&&!function(o,u,l){const c=tf(o,u,l);return o.inclusive?c>=0:c>0}(r.endAt,xs(r),i))}(n,e)}function vx(n){return n.collectionGroup||(n.path.length%2==1?n.path.lastSegment():n.path.get(n.path.length-2))}function gy(n){return(e,t)=>{let r=!1;for(const i of xs(n)){const s=wx(i,e,t);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function wx(n,e,t){const r=n.field.isKeyField()?oe.comparator(e.key,t.key):function(s,o,u){const l=o.data.field(s),c=u.data.field(s);return l!==null&&c!==null?wi(l,c):de(42886)}(n.field,e,t);switch(n.dir){case"asc":return r;case"desc":return-1*r;default:return de(19790,{direction:n.dir})}}/** 688 * @license 689 * Copyright 2017 Google LLC 690 * 691 * Licensed under the Apache License, Version 2.0 (the "License");
692 * you may not use this file except in compliance with the License. 693 * You may obtain a copy of the License at 694 * 695 * http://www.apache.org/licenses/LICENSE-2.0 696 * 697 * Unless required by applicable law or agreed to in writing, software 698 * distributed under the License is distributed on an "AS IS" BASIS, 699 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 700 * See the License for the specific language governing permissions and 701 * limitations under the License. 702 */class Ur{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,t){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,t]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,t]);i.push([e,t]),this.innerSize++}delete(e){const t=this.mapKeyFn(e),r=this.inner[t];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[t]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){Ys(this.inner,(t,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return ZP(this.inner)}size(){return this.innerSize}}/** 703 * @license 704 * Copyright 2017 Google LLC 705 * 706 * Licensed under the Apache License, Version 2.0 (the "License"); 707 * you may not use this file except in compliance with the License. 708 * You may obtain a copy of the License at 709 * 710 * http://www.apache.org/licenses/LICENSE-2.0 711 * 712 * Unless required by applicable law or agreed to in writing, software 713 * distributed under the License is distributed on an "AS IS" BASIS, 714 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 715 * See the License for the specific language governing permissions and 716 * limitations under the License. 717 */const bx=new Xe(oe.comparator);function nr(){return bx}const yy=new Xe(oe.comparator);function _s(...n){let e=yy;for(const t of n)e=e.insert(t.key,t);return e}function Tx(n){let e=yy;return n.forEach((t,r)=>e=e.insert(t,r.overlayedDocument)),e}function Or(){return As()}function _y(){return As()}function As(){return new Ur(n=>n.toString(),(n,e)=>n.isEqual(e))}const Ex=new ut(oe.comparator);function be(...n){let e=Ex;for(const t of n)e=e.add(t);return e}const Cx=new ut(ye);function Px(){return Cx}/** 718 * @license 719 * Copyright 2020 Google LLC 720 * 721 * Licensed under the Apache License, Version 2.0 (the "License"); 722 * you may not use this file except in compliance with the License. 723 * You may obtain a copy of the License at 724 * 725 * http://www.apache.org/licenses/LICENSE-2.0 726 * 727 * Unless required by applicable law or agreed to in writing, software 728 * distributed under the License is distributed on an "AS IS" BASIS, 729 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 730 * See the License for the specific language governing permissions and 731 * limitations under the License. 732 */function xx(n,e){if(n.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Ml(e)?"-0":e}}function Ax(n){return{integerValue:""+n}}/** 733 * @license 734 * Copyright 2018 Google LLC 735 * 736 * Licensed under the Apache License, Version 2.0 (the "License"); 737 * you may not use this file except in compliance with the License. 738 * You may obtain a copy of the License at 739 * 740 * http://www.apache.org/licenses/LICENSE-2.0 741 * 742 * Unless required by applicable law or agreed to in writing, software 743 * distributed under the License is distributed on an "AS IS" BASIS, 744 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 745 * See the License for the specific language governing permissions and 746 * limitations under the License. 747 */class iu{constructor(){this._=void 0}}function Sx(n,e,t){return n instanceof Bl?function(i,s){const o={fields:{[sy]:{stringValue:iy},[ay]:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&kc(s)&&(s=eu(s)),s&&(o.fields[oy]=s),{mapValue:o}}(t,e):n instanceof $a?vy(n,e):n instanceof za?wy(n,e):function(i,s){const o=Ix(i,s),u=of(o)+of(i.Ae);return Ll(o)&&Ll(i.Ae)?Ax(u):xx(i.serializer,u)}(n,e)}function Rx(n,e,t){return n instanceof $a?vy(n,e):n instanceof za?wy(n,e):t}function Ix(n,e){return n instanceof ql?function(r){return Ll(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class Bl extends iu{}class $a extends iu{constructor(e){super(),this.elements=e}}function vy(n,e){const t=by(e);for(const r of n.elements)t.some(i=>mn(i,r))||t.push(r);return{arrayValue:{values:t}}}class za extends iu{constructor(e){super(),this.elements=e}}function wy(n,e){let t=by(e);for(const r of n.elements)t=t.filter(i=>!mn(i,r));return{arrayValue:{values:t}}}
747class ql extends iu{constructor(e,t){super(),this.serializer=e,this.Ae=t}}function of(n){return Ge(n.integerValue||n.doubleValue)}function by(n){return Nc(n)&&n.arrayValue.values?n.arrayValue.values.slice():[]}function Dx(n,e){return n.field.isEqual(e.field)&&function(r,i){return r instanceof $a&&i instanceof $a||r instanceof za&&i instanceof za?vi(r.elements,i.elements,mn):r instanceof ql&&i instanceof ql?mn(r.Ae,i.Ae):r instanceof Bl&&i instanceof Bl}(n.transform,e.transform)}class Nr{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new Nr}static exists(e){return new Nr(void 0,e)}static updateTime(e){return new Nr(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Sa(n,e){return n.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(n.updateTime):n.exists===void 0||n.exists===e.isFoundDocument()}class Uc{}function Ty(n,e){if(!n.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return n.isNoDocument()?new Vx(n.key,Nr.none()):new Bc(n.key,n.data,Nr.none());{const t=n.data,r=cn.empty();let i=new ut(Pt.comparator);for(let s of e.fields)if(!i.has(s)){let o=t.field(s);o===null&&s.length>1&&(s=s.popLast(),o=t.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new su(n.key,r,new qn(i.toArray()),Nr.none())}}function Ox(n,e,t){n instanceof Bc?function(i,s,o){const u=i.value.clone(),l=uf(i.fieldTransforms,s,o.transformResults);u.setAll(l),s.convertToFoundDocument(o.version,u).setHasCommittedMutations()}(n,e,t):n instanceof su?function(i,s,o){if(!Sa(i.precondition,s))return void s.convertToUnknownDocument(o.version);const u=uf(i.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(Ey(i)),l.setAll(u),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(n,e,t):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,t)}function Ss(n,e,t,r){return n instanceof Bc?function(s,o,u,l){if(!Sa(s.precondition,o))return u;const c=s.value.clone(),h=lf(s.fieldTransforms,l,o);return c.setAll(h),o.convertToFoundDocument(o.version,c).setHasLocalMutations(),null}(n,e,t,r):n instanceof su?function(s,o,u,l){if(!Sa(s.precondition,o))return u;const c=lf(s.fieldTransforms,l,o),h=o.data;return h.setAll(Ey(s)),h.setAll(c),o.convertToFoundDocument(o.version,h).setHasLocalMutations(),u===null?null:u.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(p=>p.field))}(n,e,t,r):function(s,o,u){return Sa(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):u}(n,e,t)}function af(n,e){return n.type===e.type&&!!n.key.isEqual(e.key)&&!!n.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&vi(r,i,(s,o)=>Dx(s,o))}(n.fieldTransforms,e.fieldTransforms)&&(n.type===0?n.value.isEqual(e.value):n.type!==1||n.data.isEqual(e.data)&&n.fieldMask.isEqual(e.fieldMask))}class Bc extends Uc{constructor(e,t,r,i=[]){super(),this.key=e,this.value=t,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class su extends Uc{constructor(e,t,r,i,s=[]){super(),this.key=e,this.data=t,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function Ey(n){const e=new Map;return n.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const r=n.data.field(t);e.set(t,r)}}),e}function uf(n,e,t){const r=new Map;je(n.length===t.length,32656,{Re:t.length,Ve:n.length});for(let i=0;i<t.length;i++){const s=n[i],o=s.transform,u=e.data.field(s.field);r.set(s.field,Rx(o,u,t[i]))}return r}function lf(n,e,t){const r=new Map;for(const i of n){const s=i.transform,o=t.data.field(i.field);r.set(i.field,Sx(s,o,e))}return r}class Vx extends Uc{constructor(e,t){super(),this.key=e,this.precondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}/** 748 * @license 749 * Copyright 2017 Google LLC 750 * 751 * Licensed under the Apache License, Version 2.0 (the "License"); 752 * you may not use this file except in compliance with the License. 753 * You may obtain a copy of the License at 754 * 755 * http://www.apache.org/licenses/LICENSE-2.0 756 * 757 * Unless required by applicable law or agreed to in writing, softw
757are 758 * distributed under the License is distributed on an "AS IS" BASIS, 759 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 760 * See the License for the specific language governing permissions and 761 * limitations under the License. 762 */class Mx{constructor(e,t,r,i){this.batchId=e,this.localWriteTime=t,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,t){const r=t.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&Ox(s,e,r[i])}}applyToLocalView(e,t){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(t=Ss(r,e,t,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(t=Ss(r,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){const r=_y();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let u=this.applyToLocalView(o,s.mutatedFields);u=t.has(i.key)?null:u;const l=Ty(o,u);l!==null&&r.set(i.key,l),o.isValidDocument()||o.convertToNoDocument(he.min())}),r}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),be())}isEqual(e){return this.batchId===e.batchId&&vi(this.mutations,e.mutations,(t,r)=>af(t,r))&&vi(this.baseMutations,e.baseMutations,(t,r)=>af(t,r))}}/** 763 * @license 764 * Copyright 2022 Google LLC 765 * 766 * Licensed under the Apache License, Version 2.0 (the "License"); 767 * you may not use this file except in compliance with the License. 768 * You may obtain a copy of the License at 769 * 770 * http://www.apache.org/licenses/LICENSE-2.0 771 * 772 * Unless required by applicable law or agreed to in writing, software 773 * distributed under the License is distributed on an "AS IS" BASIS, 774 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 775 * See the License for the specific language governing permissions and 776 * limitations under the License. 777 */class kx{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ 778 largestBatchId: ${this.largestBatchId}, 779 mutation: ${this.mutation.toString()} 780 }`}}/** 781 * @license 782 * Copyright 2017 Google LLC 783 * 784 * Licensed under the Apache License, Version 2.0 (the "License"); 785 * you may not use this file except in compliance with the License. 786 * You may obtain a copy of the License at 787 * 788 * http://www.apache.org/licenses/LICENSE-2.0 789 * 790 * Unless required by applicable law or agreed to in writing, software 791 * distributed under the License is distributed on an "AS IS" BASIS, 792 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 793 * See the License for the specific language governing permissions and 794 * limitations under the License. 795 */class Nx{constructor(e,t){this.count=e,this.unchangedNames=t}}/** 796 * @license 797 * Copyright 2017 Google LLC 798 * 799 * Licensed under the Apache License, Version 2.0 (the "License"); 800 * you may not use this file except in compliance with the License. 801 * You may obtain a copy of the License at 802 * 803 * http://www.apache.org/licenses/LICENSE-2.0 804 * 805 * Unless required by applicable law or agreed to in writing, software 806 * distributed under the License is distributed on an "AS IS" BASIS, 807 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 808 * See the License for the specific language governing permissions and 809 * limitations under the License. 810 */var Je,_e;function Cy(n){if(n===void 0)return Pn("GRPC error has no .code"),Y.UNKNOWN;switch(n){case Je.OK:return Y.OK;case Je.CANCELLED:return Y.CANCELLED;case Je.UNKNOWN:return Y.UNKNOWN;case Je.DEADLINE_EXCEEDED:return Y.DEADLINE_EXCEEDED;case Je.RESOURCE_EXHAUSTED:return Y.RESOURCE_EXHAUSTED;case Je.INTERNAL:return Y.INTERNAL;case Je.UNAVAILABLE:return Y.UNAVAILABLE;case Je.UNAUTHENTICATED:return Y.UNAUTHENTICATED;case Je.INVALID_ARGUMENT:return Y.INVALID_ARGUMENT;case Je.NOT_FOUND:return Y.NOT_FOUND;case Je.ALREADY_EXISTS:return Y.ALREADY_EXISTS;case Je.PERMISSION_DENIED:return Y.PERMISSION_DENIED;case Je.FAILED_PRECONDITION:return Y.FAILED_PRECONDITION;case Je.ABORTED:return Y.ABORTED;case Je.OUT_OF_RANGE:return Y.OUT_OF_RANGE;
810case Je.UNIMPLEMENTED:return Y.UNIMPLEMENTED;case Je.DATA_LOSS:return Y.DATA_LOSS;default:return de(39323,{code:n})}}(_e=Je||(Je={}))[_e.OK=0]="OK",_e[_e.CANCELLED=1]="CANCELLED",_e[_e.UNKNOWN=2]="UNKNOWN",_e[_e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",_e[_e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",_e[_e.NOT_FOUND=5]="NOT_FOUND",_e[_e.ALREADY_EXISTS=6]="ALREADY_EXISTS",_e[_e.PERMISSION_DENIED=7]="PERMISSION_DENIED",_e[_e.UNAUTHENTICATED=16]="UNAUTHENTICATED",_e[_e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",_e[_e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",_e[_e.ABORTED=10]="ABORTED",_e[_e.OUT_OF_RANGE=11]="OUT_OF_RANGE",_e[_e.UNIMPLEMENTED=12]="UNIMPLEMENTED",_e[_e.INTERNAL=13]="INTERNAL",_e[_e.UNAVAILABLE=14]="UNAVAILABLE",_e[_e.DATA_LOSS=15]="DATA_LOSS";/** 811 * @license 812 * Copyright 2023 Google LLC 813 * 814 * Licensed under the Apache License, Version 2.0 (the "License"); 815 * you may not use this file except in compliance with the License. 816 * You may obtain a copy of the License at 817 * 818 * http://www.apache.org/licenses/LICENSE-2.0 819 * 820 * Unless required by applicable law or agreed to in writing, software 821 * distributed under the License is distributed on an "AS IS" BASIS, 822 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 823 * See the License for the specific language governing permissions and 824 * limitations under the License. 825 */function Lx(){return new TextEncoder}/** 826 * @license 827 * Copyright 2022 Google LLC 828 * 829 * Licensed under the Apache License, Version 2.0 (the "License"); 830 * you may not use this file except in compliance with the License. 831 * You may obtain a copy of the License at 832 * 833 * http://www.apache.org/licenses/LICENSE-2.0 834 * 835 * Unless required by applicable law or agreed to in writing, software 836 * distributed under the License is distributed on an "AS IS" BASIS, 837 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 838 * See the License for the specific language governing permissions and 839 * limitations under the License. 840 */const Fx=new $n([4294967295,4294967295],0);function cf(n){const e=Lx().encode(n),t=new Gg;return t.update(e),new Uint8Array(t.digest())}function hf(n){const e=new DataView(n.buffer),t=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new $n([t,r],0),new $n([i,s],0)]}class qc{constructor(e,t,r){if(this.bitmap=e,this.padding=t,this.hashCount=r,t<0||t>=8)throw new vs(`Invalid padding: ${t}`);if(r<0)throw new vs(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new vs(`Invalid hash count: ${r}`);if(e.length===0&&t!==0)throw new vs(`Invalid padding when bitmap length is 0: ${t}`);this.ge=8*e.length-t,this.pe=$n.fromNumber(this.ge)}ye(e,t,r){let i=e.add(t.multiply($n.fromNumber(r)));return i.compare(Fx)===1&&(i=new $n([i.getBits(0),i.getBits(1)],0)),i.modulo(this.pe).toNumber()}we(e){return!!(this.bitmap[Math.floor(e/8)]&1<<e%8)}mightContain(e){if(this.ge===0)return!1;const t=cf(e),[r,i]=hf(t);for(let s=0;s<this.hashCount;s++){const o=this.ye(r,i,s);if(!this.we(o))return!1}return!0}static create(e,t,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new qc(s,i,t);return r.forEach(u=>o.insert(u)),o}insert(e){if(this.ge===0)return;const t=cf(e),[r,i]=hf(t);for(let s=0;s<this.hashCount;s++){const o=this.ye(r,i,s);this.Se(o)}}Se(e){const t=Math.floor(e/8),r=e%8;this.bitmap[t]|=1<<r}}class vs extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** 841 * @license 842 * Copyright 2017 Google LLC 843 * 844 * Licensed under the Apache License, Version 2.0 (the "License"); 845 * you may not use this file except in compliance with the License. 846 * You may obtain a copy of the License at 847 * 848 * http://www.apache.org/licenses/LICENSE-2.0 849 * 850 * Unless required by applicable law or agreed to in writing, software 851 * distributed under the License is distributed on an "AS IS" BASIS, 852 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 853 * See the License for the specific language governing permissions and 854 * limitations under the License. 855 */class ou{constructor(e,t,r,i,s){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,t,r){const i=new Map;return i.set(e,Qs.createSynthesizedTargetChangeForCurrentChange(e,t,r)),new ou(he.min(),i,new Xe(ye),nr(),be())}}class Qs{constructor(e,t,r,i,s){this.resumeToken=e,this.current=t,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,t,r){return new Qs(r,t,be(),be(),be())}}/** 856 * @license 857 * Copyright 2017 Google LLC 858 * 859 * Licensed under the Apache License, Version 2.0 (the "License");
860 * you may not use this file except in compliance with the License. 861 * You may obtain a copy of the License at 862 * 863 * http://www.apache.org/licenses/LICENSE-2.0 864 * 865 * Unless required by applicable law or agreed to in writing, software 866 * distributed under the License is distributed on an "AS IS" BASIS, 867 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 868 * See the License for the specific language governing permissions and 869 * limitations under the License. 870 */class Ra{constructor(e,t,r,i){this.be=e,this.removedTargetIds=t,this.key=r,this.De=i}}class Py{constructor(e,t){this.targetId=e,this.Ce=t}}class xy{constructor(e,t,r=vt.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=t,this.resumeToken=r,this.cause=i}}class df{constructor(){this.ve=0,this.Fe=ff(),this.Me=vt.EMPTY_BYTE_STRING,this.xe=!1,this.Oe=!0}get current(){return this.xe}get resumeToken(){return this.Me}get Ne(){return this.ve!==0}get Be(){return this.Oe}Le(e){e.approximateByteSize()>0&&(this.Oe=!0,this.Me=e)}ke(){let e=be(),t=be(),r=be();return this.Fe.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:t=t.add(i);break;case 1:r=r.add(i);break;default:de(38017,{changeType:s})}}),new Qs(this.Me,this.xe,e,t,r)}qe(){this.Oe=!1,this.Fe=ff()}Qe(e,t){this.Oe=!0,this.Fe=this.Fe.insert(e,t)}$e(e){this.Oe=!0,this.Fe=this.Fe.remove(e)}Ue(){this.ve+=1}Ke(){this.ve-=1,je(this.ve>=0,3241,{ve:this.ve})}We(){this.Oe=!0,this.xe=!0}}class jx{constructor(e){this.Ge=e,this.ze=new Map,this.je=nr(),this.Je=Ao(),this.He=Ao(),this.Ye=new Xe(ye)}Ze(e){for(const t of e.be)e.De&&e.De.isFoundDocument()?this.Xe(t,e.De):this.et(t,e.key,e.De);for(const t of e.removedTargetIds)this.et(t,e.key,e.De)}tt(e){this.forEachTarget(e,t=>{const r=this.nt(t);switch(e.state){case 0:this.rt(t)&&r.Le(e.resumeToken);break;case 1:r.Ke(),r.Ne||r.qe(),r.Le(e.resumeToken);break;case 2:r.Ke(),r.Ne||this.removeTarget(t);break;case 3:this.rt(t)&&(r.We(),r.Le(e.resumeToken));break;case 4:this.rt(t)&&(this.it(t),r.Le(e.resumeToken));break;default:de(56790,{state:e.state})}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.ze.forEach((r,i)=>{this.rt(i)&&t(i)})}st(e){const t=e.targetId,r=e.Ce.count,i=this.ot(t);if(i){const s=i.target;if(jl(s))if(r===0){const o=new oe(s.path);this.et(t,o,Tt.newNoDocument(o,he.min()))}else je(r===1,20013,{expectedCount:r});else{const o=this._t(t);if(o!==r){const u=this.ut(e),l=u?this.ct(u,e,o):1;if(l!==0){this.it(t);const c=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ye=this.Ye.insert(t,c)}}}}}ut(e){const t=e.Ce.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=t;let o,u;try{o=er(r).toUint8Array()}catch(l){if(l instanceof ry)return _i("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{u=new qc(o,i,s)}catch(l){return _i(l instanceof vs?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return u.ge===0?null:u}ct(e,t,r){return t.Ce.count===r-this.Pt(e,t.targetId)?0:2}Pt(e,t){const r=this.Ge.getRemoteKeysForTarget(t);let i=0;return r.forEach(s=>{const o=this.Ge.ht(),u=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(u)||(this.et(t,s,null),i++)}),i}Tt(e){const t=new Map;this.ze.forEach((s,o)=>{const u=this.ot(o);if(u){if(s.current&&jl(u.target)){const l=new oe(u.target.path);this.It(l).has(o)||this.Et(o,l)||this.et(o,l,Tt.newNoDocument(l,e))}s.Be&&(t.set(o,s.ke()),s.qe())}});let r=be();this.He.forEach((s,o)=>{let u=!0;o.forEachWhile(l=>{const c=this.ot(l);return!c||c.purpose==="TargetPurposeLimboResolution"||(u=!1,!1)}),u&&(r=r.add(s))}),this.je.forEach((s,o)=>o.setReadTime(e));const i=new ou(e,t,this.Ye,this.je,r);return this.je=nr(),this.Je=Ao(),this.He=Ao(),this.Ye=new Xe(ye),i}Xe(e,t){if(!this.rt(e))return;const r=this.Et(e,t.key)?2:0;this.nt(e).Qe(t.key,r),this.je=this.je.insert(t.key,t),this.Je=this.Je.insert(t.key,this.It(t.key).add(e)),this.He=this.He.insert(t.key,this.dt(t.key).add(e))}et(e,t,r){if(!this.rt(e))return;const i=this.nt(e);this.Et(e,t)?i.Qe(t,1):i.$e(t),this.He=this.He.insert(t,this.dt(t).delete(e)),this.He=this.He.insert(t,this.dt(t).add(e)),r&&(this.je=this.je.insert(t,r))}removeTarget(e){this.ze.delete(e)}_t(e){const t=this.nt(e).ke();return this.Ge.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}Ue(e){this.nt(e).Ue()}nt(e){let t=this.ze.get(e);return t||(t=new df,this.ze.set(e,t)),t}dt(e){let t=this.He.get(e);return t||(t=new ut(ye),this.He=this.He.insert(e,t)),t}It(e){let t=this.Je.get(e);return t||(t=new ut(ye),this.Je=this.Je.insert(e,t)),t}rt(e){const t=this.ot(e)!==null;return t||ee("WatchChangeAggregator","Detected inactive target",e),t}ot(e){const t=this.ze.get(e);return t&&t.Ne?null:this.Ge.At(e)}it(e){this.ze.set(e,new df),this.Ge.getRemoteKeysForTarget(e).forEach(t=>{this.et(e,t,null)})}Et(e,t){return this.Ge.getRemoteKeysForTarget(e).has(t)}}function Ao(){return new Xe(oe.comparator)}function ff(){return new Xe(oe.comparator)}const Ux={asc:"ASCENDING",desc:"DESCENDING"},Bx={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},qx={and:"AND",or:"OR"};class Hx{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function Hl(n,e){return n.useProto3Json||Za(e)?e:{value:e}}function $x(n,e){return n.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function zx(n,e){return n.useProto3Json?e.toBase64():e.toUint8Array()}function fi(n){return je(!!n,49232),he.fromTimestamp(function(t){const r=Zn(t);return new et(r.seconds,r.nanos)}(n))}
870function Wx(n,e){return $l(n,e).canonicalString()}function $l(n,e){const t=function(i){return new Ne(["projects",i.projectId,"databases",i.database])}(n).child("documents");return e===void 0?t:t.child(e)}function Ay(n){const e=Ne.fromString(n);return je(Oy(e),10190,{key:e.toString()}),e}function qu(n,e){const t=Ay(e);if(t.get(1)!==n.databaseId.projectId)throw new ie(Y.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+n.databaseId.projectId);if(t.get(3)!==n.databaseId.database)throw new ie(Y.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+n.databaseId.database);return new oe(Ry(t))}function Sy(n,e){return Wx(n.databaseId,e)}function Kx(n){const e=Ay(n);return e.length===4?Ne.emptyPath():Ry(e)}function pf(n){return new Ne(["projects",n.databaseId.projectId,"databases",n.databaseId.database]).canonicalString()}function Ry(n){return je(n.length>4&&n.get(4)==="documents",29091,{key:n.toString()}),n.popFirst(5)}function Gx(n,e){let t;if("targetChange"in e){e.targetChange;const r=function(c){return c==="NO_CHANGE"?0:c==="ADD"?1:c==="REMOVE"?2:c==="CURRENT"?3:c==="RESET"?4:de(39313,{state:c})}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(c,h){return c.useProto3Json?(je(h===void 0||typeof h=="string",58123),vt.fromBase64String(h||"")):(je(h===void 0||h instanceof Buffer||h instanceof Uint8Array,16193),vt.fromUint8Array(h||new Uint8Array))}(n,e.targetChange.resumeToken),o=e.targetChange.cause,u=o&&function(c){const h=c.code===void 0?Y.UNKNOWN:Cy(c.code);return new ie(h,c.message||"")}(o);t=new xy(r,i,s,u||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=qu(n,r.document.name),s=fi(r.document.updateTime),o=r.document.createTime?fi(r.document.createTime):he.min(),u=new cn({mapValue:{fields:r.document.fields}}),l=Tt.newFoundDocument(i,s,o,u),c=r.targetIds||[],h=r.removedTargetIds||[];t=new Ra(c,h,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=qu(n,r.document),s=r.readTime?fi(r.readTime):he.min(),o=Tt.newNoDocument(i,s),u=r.removedTargetIds||[];t=new Ra([],u,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=qu(n,r.document),s=r.removedTargetIds||[];t=new Ra([],s,i,null)}else{if(!("filter"in e))return de(11601,{Rt:e});{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new Nx(i,s),u=r.targetId;t=new Py(u,o)}}return t}function Yx(n,e){return{documents:[Sy(n,e.path)]}}function Qx(n,e){const t={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,t.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),t.structuredQuery.from=[{collectionId:r.lastSegment()}]),t.parent=Sy(n,i);const s=function(c){if(c.length!==0)return Dy(gn.create(c,"and"))}(e.filters);s&&(t.structuredQuery.where=s);const o=function(c){if(c.length!==0)return c.map(h=>function(g){return{field:si(g.field),direction:Zx(g.dir)}}(h))}(e.orderBy);o&&(t.structuredQuery.orderBy=o);const u=Hl(n,e.limit);return u!==null&&(t.structuredQuery.limit=u),e.startAt&&(t.structuredQuery.startAt=function(c){return{before:c.inclusive,values:c.position}}(e.startAt)),e.endAt&&(t.structuredQuery.endAt=function(c){return{before:!c.inclusive,values:c.position}}(e.endAt)),{ft:t,parent:i}}function Xx(n){let e=Kx(n.parent);const t=n.structuredQuery,r=t.from?t.from.length:0;let i=null;if(r>0){je(r===1,65062);const h=t.from[0];h.allDescendants?i=h.collectionId:e=e.child(h.collectionId)}let s=[];t.where&&(s=function(p){const g=Iy(p);return g instanceof gn&&hy(g)?g.getFilters():[g]}(t.where));let o=[];t.orderBy&&(o=function(p){return p.map(g=>function(P){return new Ha(oi(P.field),function(D){switch(D){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(P.direction))}(g))}(t.orderBy));let u=null;t.limit&&(u=function(p){let g;return g=typeof p=="object"?p.value:p,Za(g)?null:g}(t.limit));let l=null;t.startAt&&(l=function(p){const g=!!p.before,v=p.values||[];return new qa(v,g)}(t.startAt));let c=null;return t.endAt&&(c=function(p){const g=!p.before,v=p.values||[];return new qa(v,g)}(t.endAt)),gx(e,i,o,s,u,"F",l,c)}function Jx(n,e){const t=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return de(28987,{purpose:i})}}(e.purpose);return t==null?null:{"goog-listen-tags":t}}function Iy(n){return n.unaryFilter!==void 0?function(t){switch(t.unaryFilter.op){case"IS_NAN":const r=oi(t.unaryFilter.field);return at.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=oi(t.unaryFilter.field);return at.create(i,"==",{nullValue:"NULL_VALUE"});
870case"IS_NOT_NAN":const s=oi(t.unaryFilter.field);return at.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=oi(t.unaryFilter.field);return at.create(o,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":return de(61313);default:return de(60726)}}(n):n.fieldFilter!==void 0?function(t){return at.create(oi(t.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":return de(58110);default:return de(50506)}}(t.fieldFilter.op),t.fieldFilter.value)}(n):n.compositeFilter!==void 0?function(t){return gn.create(t.compositeFilter.filters.map(r=>Iy(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return de(1026)}}(t.compositeFilter.op))}(n):de(30097,{filter:n})}function Zx(n){return Ux[n]}function eA(n){return Bx[n]}function tA(n){return qx[n]}function si(n){return{fieldPath:n.canonicalString()}}function oi(n){return Pt.fromServerFormat(n.fieldPath)}function Dy(n){return n instanceof at?function(t){if(t.op==="=="){if(ef(t.value))return{unaryFilter:{field:si(t.field),op:"IS_NAN"}};if(Zd(t.value))return{unaryFilter:{field:si(t.field),op:"IS_NULL"}}}else if(t.op==="!="){if(ef(t.value))return{unaryFilter:{field:si(t.field),op:"IS_NOT_NAN"}};if(Zd(t.value))return{unaryFilter:{field:si(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:si(t.field),op:eA(t.op),value:t.value}}}(n):n instanceof gn?function(t){const r=t.getFilters().map(i=>Dy(i));return r.length===1?r[0]:{compositeFilter:{op:tA(t.op),filters:r}}}(n):de(54877,{filter:n})}function Oy(n){return n.length>=4&&n.get(0)==="projects"&&n.get(2)==="databases"}/** 871 * @license 872 * Copyright 2017 Google LLC 873 * 874 * Licensed under the Apache License, Version 2.0 (the "License"); 875 * you may not use this file except in compliance with the License. 876 * You may obtain a copy of the License at 877 * 878 * http://www.apache.org/licenses/LICENSE-2.0 879 * 880 * Unless required by applicable law or agreed to in writing, software 881 * distributed under the License is distributed on an "AS IS" BASIS, 882 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 883 * See the License for the specific language governing permissions and 884 * limitations under the License. 885 */class Hn{constructor(e,t,r,i,s=he.min(),o=he.min(),u=vt.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=t,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=u,this.expectedCount=l}withSequenceNumber(e){return new Hn(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new Hn(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new Hn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new Hn(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** 886 * @license 887 * Copyright 2017 Google LLC 888 * 889 * Licensed under the Apache License, Version 2.0 (the "License"); 890 * you may not use this file except in compliance with the License. 891 * You may obtain a copy of the License at 892 * 893 * http://www.apache.org/licenses/LICENSE-2.0 894 * 895 * Unless required by applicable law or agreed to in writing, software 896 * distributed under the License is distributed on an "AS IS" BASIS, 897 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 898 * See the License for the specific language governing permissions and 899 * limitations under the License. 900 */class nA{constructor(e){this.yt=e}}function rA(n){const e=Xx({parent:n.parent,structuredQuery:n.structuredQuery});return n.limitType==="LAST"?Ul(e,e.limit,"L"):e}/** 901 * @license 902 * Copyright 2019 Google LLC 903 * 904 * Licensed under the Apache License, Version 2.0 (the "License");
905 * you may not use this file except in compliance with the License. 906 * You may obtain a copy of the License at 907 * 908 * http://www.apache.org/licenses/LICENSE-2.0 909 * 910 * Unless required by applicable law or agreed to in writing, software 911 * distributed under the License is distributed on an "AS IS" BASIS, 912 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 913 * See the License for the specific language governing permissions and 914 * limitations under the License. 915 */class iA{constructor(){this.Cn=new sA}addToCollectionParentIndex(e,t){return this.Cn.add(t),$.resolve()}getCollectionParents(e,t){return $.resolve(this.Cn.getEntries(t))}addFieldIndex(e,t){return $.resolve()}deleteFieldIndex(e,t){return $.resolve()}deleteAllFieldIndexes(e){return $.resolve()}createTargetIndexes(e,t){return $.resolve()}getDocumentsMatchingTarget(e,t){return $.resolve(null)}getIndexType(e,t){return $.resolve(0)}getFieldIndexes(e,t){return $.resolve([])}getNextCollectionGroupToUpdate(e){return $.resolve(null)}getMinOffset(e,t){return $.resolve(Jn.min())}getMinOffsetFromCollectionGroup(e,t){return $.resolve(Jn.min())}updateCollectionGroup(e,t,r){return $.resolve()}updateIndexEntries(e,t){return $.resolve()}}class sA{constructor(){this.index={}}add(e){const t=e.lastSegment(),r=e.popLast(),i=this.index[t]||new ut(Ne.comparator),s=!i.has(r);return this.index[t]=i.add(r),s}has(e){const t=e.lastSegment(),r=e.popLast(),i=this.index[t];return i&&i.has(r)}getEntries(e){return(this.index[e]||new ut(Ne.comparator)).toArray()}}/** 916 * @license 917 * Copyright 2018 Google LLC 918 * 919 * Licensed under the Apache License, Version 2.0 (the "License"); 920 * you may not use this file except in compliance with the License. 921 * You may obtain a copy of the License at 922 * 923 * http://www.apache.org/licenses/LICENSE-2.0 924 * 925 * Unless required by applicable law or agreed to in writing, software 926 * distributed under the License is distributed on an "AS IS" BASIS, 927 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 928 * See the License for the specific language governing permissions and 929 * limitations under the License. 930 */const mf={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0},Vy=41943040;class Rt{static withCacheSize(e){return new Rt(e,Rt.DEFAULT_COLLECTION_PERCENTILE,Rt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,t,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=r}}/** 931 * @license 932 * Copyright 2017 Google LLC 933 * 934 * Licensed under the Apache License, Version 2.0 (the "License"); 935 * you may not use this file except in compliance with the License. 936 * You may obtain a copy of the License at 937 * 938 * http://www.apache.org/licenses/LICENSE-2.0 939 * 940 * Unless required by applicable law or agreed to in writing, software 941 * distributed under the License is distributed on an "AS IS" BASIS, 942 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 943 * See the License for the specific language governing permissions and 944 * limitations under the License. 945 */Rt.DEFAULT_COLLECTION_PERCENTILE=10,Rt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Rt.DEFAULT=new Rt(Vy,Rt.DEFAULT_COLLECTION_PERCENTILE,Rt.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Rt.DISABLED=new Rt(-1,0,0);/** 946 * @license 947 * Copyright 2017 Google LLC 948 * 949 * Licensed under the Apache License, Version 2.0 (the "License"); 950 * you may not use this file except in compliance with the License. 951 * You may obtain a copy of the License at 952 * 953 * http://www.apache.org/licenses/LICENSE-2.0 954 * 955 * Unless required by applicable law or agreed to in writing, software 956 * distributed under the License is distributed on an "AS IS" BASIS, 957 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 958 * See the License for the specific language governing permissions and 959 * limitations under the License. 960 */class Ti{constructor(e){this.ar=e}next(){return this.ar+=2,this.ar}static ur(){return new Ti(0)}static cr(){return new Ti(-1)}}/** 961 * @license 962 * Copyright 2020 Google LLC 963 * 964 * Licensed under the Apache License, Version 2.0 (the "License");
965 * you may not use this file except in compliance with the License. 966 * You may obtain a copy of the License at 967 * 968 * http://www.apache.org/licenses/LICENSE-2.0 969 * 970 * Unless required by applicable law or agreed to in writing, software 971 * distributed under the License is distributed on an "AS IS" BASIS, 972 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 973 * See the License for the specific language governing permissions and 974 * limitations under the License. 975 */const gf="LruGarbageCollector",oA=1048576;function yf([n,e],[t,r]){const i=ye(n,t);return i===0?ye(e,r):i}class aA{constructor(e){this.Ir=e,this.buffer=new ut(yf),this.Er=0}dr(){return++this.Er}Ar(e){const t=[e,this.dr()];if(this.buffer.size<this.Ir)this.buffer=this.buffer.add(t);else{const r=this.buffer.last();yf(t,r)<0&&(this.buffer=this.buffer.delete(r).add(t))}}get maxValue(){return this.buffer.last()[0]}}class uA{constructor(e,t,r){this.garbageCollector=e,this.asyncQueue=t,this.localStore=r,this.Rr=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Vr(6e4)}stop(){this.Rr&&(this.Rr.cancel(),this.Rr=null)}get started(){return this.Rr!==null}Vr(e){ee(gf,`Garbage collection scheduled in ${e}ms`),this.Rr=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Rr=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(t){Vi(t)?ee(gf,"Ignoring IndexedDB error during garbage collection: ",t):await Xa(t)}await this.Vr(3e5)})}}class lA{constructor(e,t){this.mr=e,this.params=t}calculateTargetCount(e,t){return this.mr.gr(e).next(r=>Math.floor(t/100*r))}nthSequenceNumber(e,t){if(t===0)return $.resolve(Ja.ce);const r=new aA(t);return this.mr.forEachTarget(e,i=>r.Ar(i.sequenceNumber)).next(()=>this.mr.pr(e,i=>r.Ar(i))).next(()=>r.maxValue)}removeTargets(e,t,r){return this.mr.removeTargets(e,t,r)}removeOrphanedDocuments(e,t){return this.mr.removeOrphanedDocuments(e,t)}collect(e,t){return this.params.cacheSizeCollectionThreshold===-1?(ee("LruGarbageCollector","Garbage collection skipped; disabled"),$.resolve(mf)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(ee("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),mf):this.yr(e,t))}getCacheSize(e){return this.mr.getCacheSize(e)}yr(e,t){let r,i,s,o,u,l,c;const h=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(p=>(p>this.params.maximumSequenceNumbersToCollect?(ee("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${p}`),i=this.params.maximumSequenceNumbersToCollect):i=p,o=Date.now(),this.nthSequenceNumber(e,i))).next(p=>(r=p,u=Date.now(),this.removeTargets(e,r,t))).next(p=>(s=p,l=Date.now(),this.removeOrphanedDocuments(e,r))).next(p=>(c=Date.now(),ri()<=bn.DEBUG&&ee("LruGarbageCollector",`LRU Garbage Collection 976 Counted targets in ${o-h}ms 977 Determined least recently used ${i} in `+(u-o)+`ms 978 Removed ${s} targets in `+(l-u)+`ms 979 Removed ${p} documents in `+(c-l)+`ms 980Total Duration: ${c-h}ms`),$.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:p})))}}function cA(n,e){return new lA(n,e)}/** 981 * @license 982 * Copyright 2017 Google LLC 983 * 984 * Licensed under the Apache License, Version 2.0 (the "License"); 985 * you may not use this file except in compliance with the License. 986 * You may obtain a copy of the License at 987 * 988 * http://www.apache.org/licenses/LICENSE-2.0 989 * 990 * Unless required by applicable law or agreed to in writing, software 991 * distributed under the License is distributed on an "AS IS" BASIS, 992 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 993 * See the License for the specific language governing permissions and 994 * limitations under the License. 995 */class hA{constructor(){this.changes=new Ur(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,Tt.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();const r=this.changes.get(t);return r!==void 0?$.resolve(r):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}
995assertNotApplied(){}}/** 996 * @license 997 * Copyright 2017 Google LLC 998 * 999 * Licensed under the Apache License, Version 2.0 (the "License"); 1000 * you may not use this file except in compliance with the License. 1001 * You may obtain a copy of the License at 1002 * 1003 * http://www.apache.org/licenses/LICENSE-2.0 1004 * 1005 * Unless required by applicable law or agreed to in writing, software 1006 * distributed under the License is distributed on an "AS IS" BASIS, 1007 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1008 * See the License for the specific language governing permissions and 1009 * limitations under the License. 1010 *//** 1011 * @license 1012 * Copyright 2022 Google LLC 1013 * 1014 * Licensed under the Apache License, Version 2.0 (the "License"); 1015 * you may not use this file except in compliance with the License. 1016 * You may obtain a copy of the License at 1017 * 1018 * http://www.apache.org/licenses/LICENSE-2.0 1019 * 1020 * Unless required by applicable law or agreed to in writing, software 1021 * distributed under the License is distributed on an "AS IS" BASIS, 1022 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1023 * See the License for the specific language governing permissions and 1024 * limitations under the License. 1025 */class dA{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}/** 1026 * @license 1027 * Copyright 2017 Google LLC 1028 * 1029 * Licensed under the Apache License, Version 2.0 (the "License"); 1030 * you may not use this file except in compliance with the License. 1031 * You may obtain a copy of the License at 1032 * 1033 * http://www.apache.org/licenses/LICENSE-2.0 1034 * 1035 * Unless required by applicable law or agreed to in writing, software 1036 * distributed under the License is distributed on an "AS IS" BASIS, 1037 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1038 * See the License for the specific language governing permissions and 1039 * limitations under the License.
1040 */class fA{constructor(e,t,r,i){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,t){let r=null;return this.documentOverlayCache.getOverlay(e,t).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,t))).next(i=>(r!==null&&Ss(r.mutation,i,qn.empty(),et.now()),i))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(r=>this.getLocalViewOfDocuments(e,r,be()).next(()=>r))}getLocalViewOfDocuments(e,t,r=be()){const i=Or();return this.populateOverlays(e,i,t).next(()=>this.computeViews(e,t,i,r).next(s=>{let o=_s();return s.forEach((u,l)=>{o=o.insert(u,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,t){const r=Or();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,be()))}populateOverlays(e,t,r){const i=[];return r.forEach(s=>{t.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,u)=>{t.set(o,u)})})}computeViews(e,t,r,i){let s=nr();const o=As(),u=function(){return As()}();return t.forEach((l,c)=>{const h=r.get(c.key);i.has(c.key)&&(h===void 0||h.mutation instanceof su)?s=s.insert(c.key,c):h!==void 0?(o.set(c.key,h.mutation.getFieldMask()),Ss(h.mutation,c,h.mutation.getFieldMask(),et.now())):o.set(c.key,qn.empty())}),this.recalculateAndSaveOverlays(e,s).next(l=>(l.forEach((c,h)=>o.set(c,h)),t.forEach((c,h)=>u.set(c,new dA(h,o.get(c)??null))),u))}recalculateAndSaveOverlays(e,t){const r=As();let i=new Xe((o,u)=>o-u),s=be();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(o=>{for(const u of o)u.keys().forEach(l=>{const c=t.get(l);if(c===null)return;let h=r.get(l)||qn.empty();h=u.applyToLocalView(c,h),r.set(l,h);const p=(i.get(u.batchId)||be()).add(l);i=i.insert(u.batchId,p)})}).next(()=>{const o=[],u=i.getReverseIterator();for(;u.hasNext();){const l=u.getNext(),c=l.key,h=l.value,p=_y();h.forEach(g=>{if(!s.has(g)){const v=Ty(t.get(g),r.get(g));v!==null&&p.set(g,v),s=s.add(g)}}),o.push(this.documentOverlayCache.saveOverlays(e,c,p))}return $.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,t,r,i){return function(o){return oe.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(t)?this.getDocumentsMatchingDocumentQuery(e,t.path):yx(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,r,i):this.getDocumentsMatchingCollectionQuery(e,t,r,i)}getNextDocuments(e,t,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,r.largestBatchId,i-s.size):$.resolve(Or());let u=Ns,l=s;return o.next(c=>$.forEach(c,(h,p)=>(u<p.largestBatchId&&(u=p.largestBatchId),s.get(h)?$.resolve():this.remoteDocumentCache.getEntry(e,h).next(g=>{l=l.insert(h,g)}))).next(()=>this.populateOverlays(e,c,s)).next(()=>this.computeViews(e,l,c,be())).next(h=>({batchId:u,changes:Tx(h)})))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new oe(t)).next(r=>{let i=_s();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,t,r,i){const s=t.collectionGroup;let o=_s();return this.indexManager.getCollectionParents(e,s).next(u=>$.forEach(u,l=>{const c=function(p,g){return new tu(g,null,p.explicitOrderBy.slice(),p.filters.slice(),p.limit,p.limitType,p.startAt,p.endAt)}(t,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,c,r,i).next(h=>{h.forEach((p,g)=>{o=o.insert(p,g)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,t,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,r,s,i))).next(o=>{s.forEach((l,c)=>{const h=c.getKey();o.get(h)===null&&(o=o.insert(h,Tt.newInvalidDocument(h)))});let u=_s();return o.forEach((l,c)=>{const h=s.get(l);h!==void 0&&Ss(h.mutation,c,qn.empty(),et.now()),ru(t,c)&&(u=u.insert(l,c))}),u})}}/** 1041 * @license 1042 * Copyright 2020 Google LLC 1043 * 1044 * Licensed under the Apache License, Version 2.0 (the "License");
1045 * you may not use this file except in compliance with the License. 1046 * You may obtain a copy of the License at 1047 * 1048 * http://www.apache.org/licenses/LICENSE-2.0 1049 * 1050 * Unless required by applicable law or agreed to in writing, software 1051 * distributed under the License is distributed on an "AS IS" BASIS, 1052 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1053 * See the License for the specific language governing permissions and 1054 * limitations under the License. 1055 */class pA{constructor(e){this.serializer=e,this.Lr=new Map,this.kr=new Map}getBundleMetadata(e,t){return $.resolve(this.Lr.get(t))}saveBundleMetadata(e,t){return this.Lr.set(t.id,function(i){return{id:i.id,version:i.version,createTime:fi(i.createTime)}}(t)),$.resolve()}getNamedQuery(e,t){return $.resolve(this.kr.get(t))}saveNamedQuery(e,t){return this.kr.set(t.name,function(i){return{name:i.name,query:rA(i.bundledQuery),readTime:fi(i.readTime)}}(t)),$.resolve()}}/** 1056 * @license 1057 * Copyright 2022 Google LLC 1058 * 1059 * Licensed under the Apache License, Version 2.0 (the "License"); 1060 * you may not use this file except in compliance with the License. 1061 * You may obtain a copy of the License at 1062 * 1063 * http://www.apache.org/licenses/LICENSE-2.0 1064 * 1065 * Unless required by applicable law or agreed to in writing, software 1066 * distributed under the License is distributed on an "AS IS" BASIS, 1067 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1068 * See the License for the specific language governing permissions and 1069 * limitations under the License. 1070 */class mA{constructor(){this.overlays=new Xe(oe.comparator),this.qr=new Map}getOverlay(e,t){return $.resolve(this.overlays.get(t))}getOverlays(e,t){const r=Or();return $.forEach(t,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,t,r){return r.forEach((i,s)=>{this.St(e,t,s)}),$.resolve()}removeOverlaysForBatchId(e,t,r){const i=this.qr.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.qr.delete(r)),$.resolve()}getOverlaysForCollection(e,t,r){const i=Or(),s=t.length+1,o=new oe(t.child("")),u=this.overlays.getIteratorFrom(o);for(;u.hasNext();){const l=u.getNext().value,c=l.getKey();if(!t.isPrefixOf(c.path))break;c.path.length===s&&l.largestBatchId>r&&i.set(l.getKey(),l)}return $.resolve(i)}getOverlaysForCollectionGroup(e,t,r,i){let s=new Xe((c,h)=>c-h);const o=this.overlays.getIterator();for(;o.hasNext();){const c=o.getNext().value;if(c.getKey().getCollectionGroup()===t&&c.largestBatchId>r){let h=s.get(c.largestBatchId);h===null&&(h=Or(),s=s.insert(c.largestBatchId,h)),h.set(c.getKey(),c)}}const u=Or(),l=s.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((c,h)=>u.set(c,h)),!(u.size()>=i)););return $.resolve(u)}St(e,t,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.qr.get(i.largestBatchId).delete(r.key);this.qr.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new kx(t,r));let s=this.qr.get(t);s===void 0&&(s=be(),this.qr.set(t,s)),this.qr.set(t,s.add(r.key))}}/** 1071 * @license 1072 * Copyright 2024 Google LLC 1073 * 1074 * Licensed under the Apache License, Version 2.0 (the "License"); 1075 * you may not use this file except in compliance with the License. 1076 * You may obtain a copy of the License at 1077 * 1078 * http://www.apache.org/licenses/LICENSE-2.0 1079 * 1080 * Unless required by applicable law or agreed to in writing, software 1081 * distributed under the License is distributed on an "AS IS" BASIS, 1082 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1083 * See the License for the specific language governing permissions and 1084 * limitations under the License. 1085 */class gA{constructor(){this.sessionToken=vt.EMPTY_BYTE_STRING}getSessionToken(e){return $.resolve(this.sessionToken)}setSessionToken(e,t){return this.sessionToken=t,$.resolve()}}/** 1086 * @license 1087 * Copyright 2017 Google LLC 1088 * 1089 * Licensed under the Apache License, Version 2.0 (the "License"); 1090 * you may not use this file except in compliance with the License. 1091 * You may obtain a copy of the License at 1092 * 1093 * http://www.apache.org/licenses/LICENSE-2.0 1094 * 1095 * Unless required by applicable law or agreed to in writing, softw
1095are 1096 * distributed under the License is distributed on an "AS IS" BASIS, 1097 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1098 * See the License for the specific language governing permissions and 1099 * limitations under the License. 1100 */class Hc{constructor(){this.Qr=new ut(ht.$r),this.Ur=new ut(ht.Kr)}isEmpty(){return this.Qr.isEmpty()}addReference(e,t){const r=new ht(e,t);this.Qr=this.Qr.add(r),this.Ur=this.Ur.add(r)}Wr(e,t){e.forEach(r=>this.addReference(r,t))}removeReference(e,t){this.Gr(new ht(e,t))}zr(e,t){e.forEach(r=>this.removeReference(r,t))}jr(e){const t=new oe(new Ne([])),r=new ht(t,e),i=new ht(t,e+1),s=[];return this.Ur.forEachInRange([r,i],o=>{this.Gr(o),s.push(o.key)}),s}Jr(){this.Qr.forEach(e=>this.Gr(e))}Gr(e){this.Qr=this.Qr.delete(e),this.Ur=this.Ur.delete(e)}Hr(e){const t=new oe(new Ne([])),r=new ht(t,e),i=new ht(t,e+1);let s=be();return this.Ur.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const t=new ht(e,0),r=this.Qr.firstAfterOrEqual(t);return r!==null&&e.isEqual(r.key)}}class ht{constructor(e,t){this.key=e,this.Yr=t}static $r(e,t){return oe.comparator(e.key,t.key)||ye(e.Yr,t.Yr)}static Kr(e,t){return ye(e.Yr,t.Yr)||oe.comparator(e.key,t.key)}}/** 1101 * @license 1102 * Copyright 2017 Google LLC 1103 * 1104 * Licensed under the Apache License, Version 2.0 (the "License"); 1105 * you may not use this file except in compliance with the License. 1106 * You may obtain a copy of the License at 1107 * 1108 * http://www.apache.org/licenses/LICENSE-2.0 1109 * 1110 * Unless required by applicable law or agreed to in writing, software 1111 * distributed under the License is distributed on an "AS IS" BASIS, 1112 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1113 * See the License for the specific language governing permissions and 1114 * limitations under the License. 1115 */class yA{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.tr=1,this.Zr=new ut(ht.$r)}checkEmpty(e){return $.resolve(this.mutationQueue.length===0)}addMutationBatch(e,t,r,i){const s=this.tr;this.tr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new Mx(s,t,r,i);this.mutationQueue.push(o);for(const u of i)this.Zr=this.Zr.add(new ht(u.key,s)),this.indexManager.addToCollectionParentIndex(e,u.key.path.popLast());return $.resolve(o)}lookupMutationBatch(e,t){return $.resolve(this.Xr(t))}getNextMutationBatchAfterBatchId(e,t){const r=t+1,i=this.ei(r),s=i<0?0:i;return $.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return $.resolve(this.mutationQueue.length===0?QP:this.tr-1)}getAllMutationBatches(e){return $.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){const r=new ht(t,0),i=new ht(t,Number.POSITIVE_INFINITY),s=[];return this.Zr.forEachInRange([r,i],o=>{const u=this.Xr(o.Yr);s.push(u)}),$.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,t){let r=new ut(ye);return t.forEach(i=>{const s=new ht(i,0),o=new ht(i,Number.POSITIVE_INFINITY);this.Zr.forEachInRange([s,o],u=>{r=r.add(u.Yr)})}),$.resolve(this.ti(r))}getAllMutationBatchesAffectingQuery(e,t){const r=t.path,i=r.length+1;let s=r;oe.isDocumentKey(s)||(s=s.child(""));const o=new ht(new oe(s),0);let u=new ut(ye);return this.Zr.forEachWhile(l=>{const c=l.key.path;return!!r.isPrefixOf(c)&&(c.length===i&&(u=u.add(l.Yr)),!0)},o),$.resolve(this.ti(u))}ti(e){const t=[];return e.forEach(r=>{const i=this.Xr(r);i!==null&&t.push(i)}),t}removeMutationBatch(e,t){je(this.ni(t.batchId,"removed")===0,55003),this.mutationQueue.shift();let r=this.Zr;return $.forEach(t.mutations,i=>{const s=new ht(i.key,t.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.Zr=r})}ir(e){}containsKey(e,t){const r=new ht(t,0),i=this.Zr.firstAfterOrEqual(r);return $.resolve(t.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,$.resolve()}ni(e,t){return this.ei(e)}ei(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Xr(e){const t=this.ei(e);return t<0||t>
1115=this.mutationQueue.length?null:this.mutationQueue[t]}}/** 1116 * @license 1117 * Copyright 2017 Google LLC 1118 * 1119 * Licensed under the Apache License, Version 2.0 (the "License"); 1120 * you may not use this file except in compliance with the License. 1121 * You may obtain a copy of the License at 1122 * 1123 * http://www.apache.org/licenses/LICENSE-2.0 1124 * 1125 * Unless required by applicable law or agreed to in writing, software 1126 * distributed under the License is distributed on an "AS IS" BASIS, 1127 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1128 * See the License for the specific language governing permissions and 1129 * limitations under the License. 1130 */class _A{constructor(e){this.ri=e,this.docs=function(){return new Xe(oe.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){const r=t.key,i=this.docs.get(r),s=i?i.size:0,o=this.ri(t);return this.docs=this.docs.insert(r,{document:t.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){const r=this.docs.get(t);return $.resolve(r?r.document.mutableCopy():Tt.newInvalidDocument(t))}getEntries(e,t){let r=nr();return t.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():Tt.newInvalidDocument(i))}),$.resolve(r)}getDocumentsMatchingQuery(e,t,r,i){let s=nr();const o=t.path,u=new oe(o.child("__id-9223372036854775808__")),l=this.docs.getIteratorFrom(u);for(;l.hasNext();){const{key:c,value:{document:h}}=l.getNext();if(!o.isPrefixOf(c.path))break;c.path.length>o.length+1||WP(zP(h),r)<=0||(i.has(h.key)||ru(t,h))&&(s=s.insert(h.key,h.mutableCopy()))}return $.resolve(s)}getAllFromCollectionGroup(e,t,r,i){de(9500)}ii(e,t){return $.forEach(this.docs,r=>t(r))}newChangeBuffer(e){return new vA(this)}getSize(e){return $.resolve(this.size)}}class vA extends hA{constructor(e){super(),this.Nr=e}applyChanges(e){const t=[];
1130return this.changes.forEach((r,i)=>{i.isValidDocument()?t.push(this.Nr.addEntry(e,i)):this.Nr.removeEntry(r)}),$.waitFor(t)}getFromCache(e,t){return this.Nr.getEntry(e,t)}getAllFromCache(e,t){return this.Nr.getEntries(e,t)}}/** 1131 * @license 1132 * Copyright 2017 Google LLC 1133 * 1134 * Licensed under the Apache License, Version 2.0 (the "License"); 1135 * you may not use this file except in compliance with the License. 1136 * You may obtain a copy of the License at 1137 * 1138 * http://www.apache.org/licenses/LICENSE-2.0 1139 * 1140 * Unless required by applicable law or agreed to in writing, software 1141 * distributed under the License is distributed on an "AS IS" BASIS, 1142 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1143 * See the License for the specific language governing permissions and 1144 * limitations under the License. 1145 */class wA{constructor(e){this.persistence=e,this.si=new Ur(t=>Lc(t),Fc),this.lastRemoteSnapshotVersion=he.min(),this.highestTargetId=0,this.oi=0,this._i=new Hc,this.targetCount=0,this.ai=Ti.ur()}forEachTarget(e,t){return this.si.forEach((r,i)=>t(i)),$.resolve()}getLastRemoteSnapshotVersion(e){return $.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return $.resolve(this.oi)}allocateTargetId(e){return this.highestTargetId=this.ai.next(),$.resolve(this.highestTargetId)}setTargetsMetadata(e,t,r){return r&&(this.lastRemoteSnapshotVersion=r),t>this.oi&&(this.oi=t),$.resolve()}Pr(e){this.si.set(e.target,e);const t=e.targetId;t>this.highestTargetId&&(this.ai=new Ti(t),this.highestTargetId=t),e.sequenceNumber>this.oi&&(this.oi=e.sequenceNumber)}addTargetData(e,t){return this.Pr(t),this.targetCount+=1,$.resolve()}updateTargetData(e,t){return this.Pr(t),$.resolve()}removeTargetData(e,t){return this.si.delete(t.target),this._i.jr(t.targetId),this.targetCount-=1,$.resolve()}removeTargets(e,t,r){let i=0;const s=[];return this.si.forEach((o,u)=>{u.sequenceNumber<=t&&r.get(u.targetId)===null&&(this.si.delete(o),s.push(this.removeMatchingKeysForTargetId(e,u.targetId)),i++)}),$.waitFor(s).next(()=>i)}getTargetCount(e){return $.resolve(this.targetCount)}getTargetData(e,t){const r=this.si.get(t)||null;return $.resolve(r)}addMatchingKeys(e,t,r){return this._i.Wr(t,r),$.resolve()}removeMatchingKeys(e,t,r){this._i.zr(t,r);const i=this.persistence.referenceDelegate,s=[];return i&&t.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),$.waitFor(s)}removeMatchingKeysForTargetId(e,t){return this._i.jr(t),$.resolve()}getMatchingKeysForTargetId(e,t){const r=this._i.Hr(t);return $.resolve(r)}containsKey(e,t){return $.resolve(this._i.containsKey(t))}}/** 1146 * @license 1147 * Copyright 2017 Google LLC 1148 * 1149 * Licensed under the Apache License, Version 2.0 (the "License"); 1150 * you may not use this file except in compliance with the License. 1151 * You may obtain a copy of the License at 1152 * 1153 * http://www.apache.org/licenses/LICENSE-2.0 1154 * 1155 * Unless required by applicable law or agreed to in writing, software 1156 * distributed under the License is distributed on an "AS IS" BASIS, 1157 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1158 * See the License for the specific language governing permissions and 1159 * limitations under the License. 1160 */class My{constructor(e,t){this.ui={},this.overlays={},this.ci=new Ja(0),this.li=!1,this.li=!0,this.hi=new gA,this.referenceDelegate=e(this),this.Pi=new wA(this),this.indexManager=new iA,this.remoteDocumentCache=function(i){return new _A(i)}(r=>this.referenceDelegate.Ti(r)),this.serializer=new nA(t),this.Ii=new pA(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.li=!1,Promise.resolve()}get started(){return this.li}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new mA,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let r=this.ui[e.toKey()];return r||(r=new yA(t,this.referenceDelegate),this.ui[e.toKey()]=r),r}getGlobalsCache(){return this.hi}getTargetCache(){return this.Pi}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.Ii}runTransaction(e,t,r){ee("MemoryPersistence","Starting transaction:",e);const i=new bA(this.ci.next());return this.referenceDelegate.Ei(),r(i).next(s=>this.referenceDelegate.di(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Ai(e,t){return $.or(Object.values(this.ui).map(r=>()=>r.containsKey(e,t)))}}class bA extends GP{constructor(e){super(),this.currentSequenceNumber=e}}class $c{constructor(e){this.persistence=e,this.Ri=new Hc,this.Vi=null}static mi(e){return new $c(e)}get fi(){if(this.Vi)return this.Vi;throw de(60996)}addReference(e,t,r){return this.Ri.addReference(r,t),this.fi.delete(r.toString()),$.resolve()}removeReference(e,t,r){return this.Ri.removeReference(r,t),this.fi.add(r.toString()),$.resolve()}markPotentiallyOrphaned(e,t){return this.fi.add(t.toString()),$.resolve()}
vendor: 2,998 bytes, lines 1160-1174
1160removeTarget(e,t){this.Ri.jr(t.targetId).forEach(i=>this.fi.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,t.targetId).next(i=>{i.forEach(s=>this.fi.add(s.toString()))}).next(()=>r.removeTargetData(e,t))}Ei(){this.Vi=new Set}di(e){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return $.forEach(this.fi,r=>{const i=oe.fromPath(r);return this.gi(e,i).next(s=>{s||t.removeEntry(i,he.min())})}).next(()=>(this.Vi=null,t.apply(e)))}updateLimboDocument(e,t){return this.gi(e,t).next(r=>{r?this.fi.delete(t.toString()):this.fi.add(t.toString())})}Ti(e){return 0}gi(e,t){return $.or([()=>$.resolve(this.Ri.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Ai(e,t)])}}class Wa{constructor(e,t){this.persistence=e,this.pi=new Ur(r=>XP(r.path),(r,i)=>r.isEqual(i)),this.garbageCollector=cA(this,t)}static mi(e,t){return new Wa(e,t)}Ei(){}di(e){return $.resolve()}forEachTarget(e,t){return this.persistence.getTargetCache().forEachTarget(e,t)}gr(e){const t=this.wr(e);return this.persistence.getTargetCache().getTargetCount(e).next(r=>t.next(i=>r+i))}wr(e){let t=0;return this.pr(e,r=>{t++}).next(()=>t)}pr(e,t){return $.forEach(this.pi,(r,i)=>this.br(e,r,i).next(s=>s?$.resolve():t(i)))}removeTargets(e,t,r){return this.persistence.getTargetCache().removeTargets(e,t,r)}removeOrphanedDocuments(e,t){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.ii(e,o=>this.br(e,o,t).next(u=>{u||(r++,s.removeEntry(o,he.min()))})).next(()=>s.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,t){return this.pi.set(t,e.currentSequenceNumber),$.resolve()}removeTarget(e,t){const r=t.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,t,r){return this.pi.set(r,e.currentSequenceNumber),$.resolve()}removeReference(e,t,r){return this.pi.set(r,e.currentSequenceNumber),$.resolve()}updateLimboDocument(e,t){return this.pi.set(t,e.currentSequenceNumber),$.resolve()}Ti(e){let t=e.key.toString().length;return e.isFoundDocument()&&(t+=Aa(e.data.value)),t}br(e,t,r){return $.or([()=>this.persistence.Ai(e,t),()=>this.persistence.getTargetCache().containsKey(e,t),()=>{const i=this.pi.get(t);return $.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/** 1161 * @license 1162 * Copyright 2017 Google LLC 1163 * 1164 * Licensed under the Apache License, Version 2.0 (the "License"); 1165 * you may not use this file except in compliance with the License. 1166 * You may obtain a copy of the License at 1167 * 1168 * http://www.apache.org/licenses/LICENSE-2.0 1169 * 1170 * Unless required by applicable law or agreed to in writing, software 1171 * distributed under the License is distributed on an "AS IS" BASIS, 1172 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1173 * See the License for the specific language governing permissions and 1174 * limitations under the License.
1175 */class zc{constructor(e,t,r,i){this.targetId=e,this.fromCache=t,this.Es=r,this.ds=i}static As(e,t){let r=be(),i=be();for(const s of t.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new zc(e,t.fromCache,r,i)}}/** 1176 * @license 1177 * Copyright 2023 Google LLC 1178 * 1179 * Licensed under the Apache License, Version 2.0 (the "License"); 1180 * you may not use this file except in compliance with the License. 1181 * You may obtain a copy of the License at 1182 * 1183 * http://www.apache.org/licenses/LICENSE-2.0 1184 * 1185 * Unless required by applicable law or agreed to in writing, software 1186 * distributed under the License is distributed on an "AS IS" BASIS, 1187 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1188 * See the License for the specific language governing permissions and 1189 * limitations under the License. 1190 */class TA{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** 1191 * @license 1192 * Copyright 2019 Google LLC 1193 * 1194 * Licensed under the Apache License, Version 2.0 (the "License"); 1195 * you may not use this file except in compliance with the License. 1196 * You may obtain a copy of the License at 1197 * 1198 * http://www.apache.org/licenses/LICENSE-2.0 1199 * 1200 * Unless required by applicable law or agreed to in writing, software 1201 * distributed under the License is distributed on an "AS IS" BASIS, 1202 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1203 * See the License for the specific language governing permissions and 1204 * limitations under the License. 1205 */class EA{constructor(){this.Rs=!1,this.Vs=!1,this.fs=100,this.gs=function(){return rv()?8:YP(iv())>0?6:4}()}initialize(e,t){this.ps=e,this.indexManager=t,this.Rs=!0}getDocumentsMatchingQuery(e,t,r,i){const s={result:null};return this.ys(e,t).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.ws(e,t,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new TA;return this.Ss(e,t,o).next(u=>{if(s.result=u,this.Vs)return this.bs(e,t,o,u.size)})}).next(()=>s.result)}bs(e,t,r,i){return r.documentReadCount<this.fs?(ri()<=bn.DEBUG&&ee("QueryEngine","SDK will not create cache indexes for query:",ii(t),"since it only creates cache indexes for collection contains","more than or equal to",this.fs,"documents"),$.resolve()):(ri()<=bn.DEBUG&&ee("QueryEngine","Query:",ii(t),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.gs*i?(ri()<=bn.DEBUG&&ee("QueryEngine","The SDK decides to create cache indexes for query:",ii(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,pn(t))):$.resolve())}ys(e,t){if(sf(t))return $.resolve(null);let r=pn(t);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(t.limit!==null&&i===1&&(t=Ul(t,null,"F"),r=pn(t)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=be(...s);return this.ps.getDocuments(e,o).next(u=>this.indexManager.getMinOffset(e,r).next(l=>{const c=this.Ds(t,u);return this.Cs(t,c,o,l.readTime)?this.ys(e,Ul(t,null,"F")):this.vs(e,c,t,l)}))})))}ws(e,t,r,i){return sf(t)||i.isEqual(he.min())?$.resolve(null):this.ps.getDocuments(e,r).next(s=>{const o=this.Ds(t,s);return this.Cs(t,o,r,i)?$.resolve(null):(ri()<=bn.DEBUG&&ee("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),ii(t)),this.vs(e,o,t,$P(i,Ns)).next(u=>u))})}Ds(e,t){let r=new ut(gy(e));return t.forEach((i,s)=>{ru(e,s)&&(r=r.add(s))}),r}Cs(e,t,r,i){if(e.limit===null)return!1;if(r.size!==t.size)return!0;const s=e.limitType==="F"?t.last():t.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}Ss(e,t,r){return ri()<=bn.DEBUG&&ee("QueryEngine","Using full collection scan to execute query:",ii(t)),this.ps.getDocumentsMatchingQuery(e,t,Jn.min(),r)}vs(e,t,r,i){return this.ps.getDocumentsMatchingQuery(e,r,i).next(s=>(t.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** 1206 * @license 1207 * Copyright 2020 Google LLC 1208 * 1209 * Licensed under the Apache License, Version 2.0 (the "License");
1210 * you may not use this file except in compliance with the License. 1211 * You may obtain a copy of the License at 1212 * 1213 * http://www.apache.org/licenses/LICENSE-2.0 1214 * 1215 * Unless required by applicable law or agreed to in writing, software 1216 * distributed under the License is distributed on an "AS IS" BASIS, 1217 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1218 * See the License for the specific language governing permissions and 1219 * limitations under the License. 1220 */const Wc="LocalStore",CA=3e8;class PA{constructor(e,t,r,i){this.persistence=e,this.Fs=t,this.serializer=i,this.Ms=new Xe(ye),this.xs=new Ur(s=>Lc(s),Fc),this.Os=new Map,this.Ns=e.getRemoteDocumentCache(),this.Pi=e.getTargetCache(),this.Ii=e.getBundleCache(),this.Bs(r)}Bs(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new fA(this.Ns,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Ns.setIndexManager(this.indexManager),this.Fs.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ms))}}function xA(n,e,t,r){return new PA(n,e,t,r)}async function ky(n,e){const t=ve(n);return await t.persistence.runTransaction("Handle user change","readonly",r=>{let i;return t.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,t.Bs(e),t.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],u=[];let l=be();for(const c of i){o.push(c.batchId);for(const h of c.mutations)l=l.add(h.key)}for(const c of s){u.push(c.batchId);for(const h of c.mutations)l=l.add(h.key)}return t.localDocuments.getDocuments(r,l).next(c=>({Ls:c,removedBatchIds:o,addedBatchIds:u}))})})}function Ny(n){const e=ve(n);return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Pi.getLastRemoteSnapshotVersion(t))}function AA(n,e){const t=ve(n),r=e.snapshotVersion;let i=t.Ms;return t.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=t.Ns.newChangeBuffer({trackRemovals:!0});i=t.Ms;const u=[];
1220e.targetChanges.forEach((h,p)=>{const g=i.get(p);if(!g)return;u.push(t.Pi.removeMatchingKeys(s,h.removedDocuments,p).next(()=>t.Pi.addMatchingKeys(s,h.addedDocuments,p)));let v=g.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(p)!==null?v=v.withResumeToken(vt.EMPTY_BYTE_STRING,he.min()).withLastLimboFreeSnapshotVersion(he.min()):h.resumeToken.approximateByteSize()>0&&(v=v.withResumeToken(h.resumeToken,r)),i=i.insert(p,v),function(A,D,M){return A.resumeToken.approximateByteSize()===0||D.snapshotVersion.toMicroseconds()-A.snapshotVersion.toMicroseconds()>=CA?!0:M.addedDocuments.size+M.modifiedDocuments.size+M.removedDocuments.size>0}(g,v,h)&&u.push(t.Pi.updateTargetData(s,v))});let l=nr(),c=be();if(e.documentUpdates.forEach(h=>{e.resolvedLimboDocuments.has(h)&&u.push(t.persistence.referenceDelegate.updateLimboDocument(s,h))}),u.push(SA(s,o,e.documentUpdates).next(h=>{l=h.ks,c=h.qs})),!r.isEqual(he.min())){const h=t.Pi.getLastRemoteSnapshotVersion(s).next(p=>t.Pi.setTargetsMetadata(s,s.currentSequenceNumber,r));u.push(h)}return $.waitFor(u).next(()=>o.apply(s)).next(()=>t.localDocuments.getLocalViewOfDocuments(s,l,c)).next(()=>l)}).then(s=>(t.Ms=i,s))}function SA(n,e,t){let r=be(),i=be();return t.forEach(s=>r=r.add(s)),e.getEntries(n,r).next(s=>{let o=nr();return t.forEach((u,l)=>{const c=s.get(u);l.isFoundDocument()!==c.isFoundDocument()&&(i=i.add(u)),l.isNoDocument()&&l.version.isEqual(he.min())?(e.removeEntry(u,l.readTime),o=o.insert(u,l)):!c.isValidDocument()||l.version.compareTo(c.version)>0||l.version.compareTo(c.version)===0&&c.hasPendingWrites?(e.addEntry(l),o=o.insert(u,l)):ee(Wc,"Ignoring outdated watch update for ",u,". Current version:",c.version," Watch version:",l.version)}),{ks:o,qs:i}})}function RA(n,e){const t=ve(n);return t.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return t.Pi.getTargetData(r,e).next(s=>s?(i=s,$.resolve(i)):t.Pi.allocateTargetId(r).next(o=>(i=new Hn(e,o,"TargetPurposeListen",r.currentSequenceNumber),t.Pi.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=t.Ms.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(t.Ms=t.Ms.insert(r.targetId,r),t.xs.set(e,r.targetId)),r})}async function zl(n,e,t){const r=ve(n),i=r.Ms.get(e),s=t?"readwrite":"readwrite-primary";try{t||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!Vi(o))throw o;ee(Wc,`Failed to update sequence numbers for target ${e}: ${o}`)}r.Ms=r.Ms.remove(e),r.xs.delete(i.target)}function _f(n,e,t){const r=ve(n);let i=he.min(),s=be();return r.persistence.runTransaction("Execute query","readwrite",o=>function(l,c,h){const p=ve(l),g=p.xs.get(h);return g!==void 0?$.resolve(p.Ms.get(g)):p.Pi.getTargetData(c,h)}(r,o,pn(e)).next(u=>{if(u)return i=u.lastLimboFreeSnapshotVersion,r.Pi.getMatchingKeysForTargetId(o,u.targetId).next(l=>{s=l})}).next(()=>r.Fs.getDocumentsMatchingQuery(o,e,t?i:he.min(),t?s:be())).next(u=>(IA(r,vx(e),u),{documents:u,Qs:s})))}function IA(n,e,t){let r=n.Os.get(e)||he.min();t.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),n.Os.set(e,r)}class vf{constructor(){this.activeTargetIds=Px()}zs(e){this.activeTargetIds=this.activeTargetIds.add(e)}js(e){this.activeTargetIds=this.activeTargetIds.delete(e)}Gs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class DA{constructor(){this.Mo=new vf,this.xo={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,r){}addLocalQueryTarget(e,t=!0){return t&&this.Mo.zs(e),this.xo[e]||"not-current"}updateQueryState(e,t,r){this.xo[e]=t}removeLocalQueryTarget(e){this.Mo.js(e)}isLocalQueryTarget(e){return this.Mo.activeTargetIds.has(e)}clearQueryState(e){delete this.xo[e]}getAllActiveQueryTargets(){return this.Mo.activeTargetIds}isActiveQueryTarget(e){return this.Mo.activeTargetIds.has(e)}start(){return this.Mo=new vf,Promise.resolve()}handleUserChange(e,t,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** 1221 * @license 1222 * Copyright 2019 Google LLC 1223 * 1224 * Licensed under the Apache License, Version 2.0 (the "License");
1225 * you may not use this file except in compliance with the License. 1226 * You may obtain a copy of the License at 1227 * 1228 * http://www.apache.org/licenses/LICENSE-2.0 1229 * 1230 * Unless required by applicable law or agreed to in writing, software 1231 * distributed under the License is distributed on an "AS IS" BASIS, 1232 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1233 * See the License for the specific language governing permissions and 1234 * limitations under the License. 1235 */class OA{Oo(e){}shutdown(){}}/** 1236 * @license 1237 * Copyright 2019 Google LLC 1238 * 1239 * Licensed under the Apache License, Version 2.0 (the "License"); 1240 * you may not use this file except in compliance with the License. 1241 * You may obtain a copy of the License at 1242 * 1243 * http://www.apache.org/licenses/LICENSE-2.0 1244 * 1245 * Unless required by applicable law or agreed to in writing, software 1246 * distributed under the License is distributed on an "AS IS" BASIS, 1247 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1248 * See the License for the specific language governing permissions and 1249 * limitations under the License. 1250 */const wf="ConnectivityMonitor";class bf{constructor(){this.No=()=>this.Bo(),this.Lo=()=>this.ko(),this.qo=[],this.Qo()}Oo(e){this.qo.push(e)}shutdown(){window.removeEventListener("online",this.No),window.removeEventListener("offline",this.Lo)}Qo(){window.addEventListener("online",this.No),window.addEventListener("offline",this.Lo)}Bo(){ee(wf,"Network connectivity changed: AVAILABLE");for(const e of this.qo)e(0)}ko(){ee(wf,"Network connectivity changed: UNAVAILABLE");for(const e of this.qo)e(1)}static v(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** 1251 * @license 1252 * Copyright 2023 Google LLC 1253 * 1254 * Licensed under the Apache License, Version 2.0 (the "License"); 1255 * you may not use this file except in compliance with the License. 1256 * You may obtain a copy of the License at 1257 * 1258 * http://www.apache.org/licenses/LICENSE-2.0 1259 * 1260 * Unless required by applicable law or agreed to in writing, software 1261 * distributed under the License is distributed on an "AS IS" BASIS, 1262 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1263 * See the License for the specific language governing permissions and 1264 * limitations under the License. 1265 */let So=null;function Wl(){return So===null?So=function(){return 268435456+Math.round(2147483648*Math.random())}():So++,"0x"+So.toString(16)}/** 1266 * @license 1267 * Copyright 2020 Google LLC 1268 * 1269 * Licensed under the Apache License, Version 2.0 (the "License"); 1270 * you may not use this file except in compliance with the License. 1271 * You may obtain a copy of the License at 1272 * 1273 * http://www.apache.org/licenses/LICENSE-2.0 1274 * 1275 * Unless required by applicable law or agreed to in writing, software 1276 * distributed under the License is distributed on an "AS IS" BASIS, 1277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1278 * See the License for the specific language governing permissions and 1279 * limitations under the License. 1280 */const Hu="RestConnection",VA={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class MA{get $o(){return!1}constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;const t=e.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),i=encodeURIComponent(this.databaseId.database);this.Uo=t+"://"+e.host,this.Ko=`projects/${r}/databases/${i}`,this.Wo=this.databaseId.database===Ba?`project_id=${r}`:`project_id=${r}&database_id=${i}`}Go(e,t,r,i,s){const o=Wl(),u=this.zo(e,t.toUriEncodedString());ee(Hu,`Sending RPC '${e}' ${o}:`,u,r);const l={"google-cloud-resource-prefix":this.Ko,"x-goog-request-params":this.Wo};this.jo(l,i,s);const{host:c}=new URL(u),h=Xp(c);return this.Jo(e,u,l,r,h).then(p=>(ee(Hu,`Received RPC '${e}' ${o}: `,p),p),p=>{throw _i(Hu,`RPC '${e}' ${o} failed with error: `,p,"url: ",u,"request:",r),p})}Ho(e,t,r,i,s,o){return this.Go(e,t,r,i,s)}jo(e,t,r){e["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Oi}(),e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEac
1280h((i,s)=>e[s]=i),r&&r.headers.forEach((i,s)=>e[s]=i)}zo(e,t){const r=VA[e];return`${this.Uo}/v1/${t}:${r}`}terminate(){}}/** 1281 * @license 1282 * Copyright 2017 Google LLC 1283 * 1284 * Licensed under the Apache License, Version 2.0 (the "License"); 1285 * you may not use this file except in compliance with the License. 1286 * You may obtain a copy of the License at 1287 * 1288 * http://www.apache.org/licenses/LICENSE-2.0 1289 * 1290 * Unless required by applicable law or agreed to in writing, software 1291 * distributed under the License is distributed on an "AS IS" BASIS, 1292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1293 * See the License for the specific language governing permissions and 1294 * limitations under the License. 1295 */class kA{constructor(e){this.Yo=e.Yo,this.Zo=e.Zo}Xo(e){this.e_=e}t_(e){this.n_=e}r_(e){this.i_=e}onMessage(e){this.s_=e}close(){this.Zo()}send(e){this.Yo(e)}o_(){this.e_()}__(){this.n_()}a_(e){this.i_(e)}u_(e){this.s_(e)}}/** 1296 * @license 1297 * Copyright 2017 Google LLC 1298 * 1299 * Licensed under the Apache License, Version 2.0 (the "License"); 1300 * you may not use this file except in compliance with the License. 1301 * You may obtain a copy of the License at 1302 * 1303 * http://www.apache.org/licenses/LICENSE-2.0 1304 * 1305 * Unless required by applicable law or agreed to in writing, software 1306 * distributed under the License is distributed on an "AS IS" BASIS, 1307 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1308 * See the License for the specific language governing permissions and 1309 * limitations under the License. 1310 */const wt="WebChannelConnection";class NA extends MA{constructor(e){super(e),this.c_=[],this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Jo(e,t,r,i,s){const o=Wl();return new Promise((u,l)=>{const c=new Yg;c.setWithCredentials(!0),c.listenOnce(Qg.COMPLETE,()=>{try{switch(c.getLastErrorCode()){case xa.NO_ERROR:const p=c.getResponseJson();ee(wt,`XHR for RPC '${e}' ${o} received:`,JSON.stringify(p)),u(p);break;case xa.TIMEOUT:ee(wt,`RPC '${e}' ${o} timed out`),l(new ie(Y.DEADLINE_EXCEEDED,"Request time out"));break;case xa.HTTP_ERROR:const g=c.getStatus();if(ee(wt,`RPC '${e}' ${o} failed with status:`,g,"response text:",c.getResponseText()),g>0){let v=c.getResponseJson();Array.isArray(v)&&(v=v[0]);const P=v==null?void 0:v.error;if(P&&P.status&&P.message){const A=function(M){const U=M.toLowerCase().replace(/_/g,"-");return Object.values(Y).indexOf(U)>=0?U:Y.UNKNOWN}(P.status);l(new ie(A,P.message))}else l(new ie(Y.UNKNOWN,"Server responded with status "+c.getStatus()))}else l(new ie(Y.UNAVAILABLE,"Connection failed."));break;default:de(9055,{l_:e,streamId:o,h_:c.getLastErrorCode(),P_:c.getLastError()})}}finally{ee(wt,`RPC '${e}' ${o} completed.`)}});const h=JSON.stringify(i);ee(wt,`RPC '${e}' ${o} sending request:`,i),c.send(t,"POST",h,r,15)})}T_(e,t,r){const i=Wl(),s=[this.Uo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=Zg(),u=Jg(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},c=this.longPollingOptions.timeoutSeconds;c!==void 0&&(l.longPollingTimeout=Math.round(1e3*c)),this.useFetchStreams&&(l.useFetchStreams=!0),this.jo(l.initMessageHeaders,t,r),l.encodeInitMessageHeaders=!0;const h=s.join("");ee(wt,`Creating RPC '${e}' stream ${i}: ${h}`,l);const p=o.createWebChannel(h,l);this.I_(p);let g=!1,v=!1;const P=new kA({Yo:D=>{v?ee(wt,`Not sending because RPC '${e}' stream ${i} is closed:`,D):(g||(ee(wt,`Opening RPC '${e}' stream ${i} transport.`),p.open(),g=!0),ee(wt,`RPC '${e}' stream ${i} sending:`,D),p.send(D))},Zo:()=>p.close()}),A=(D,M,U)=>{D.listen(M,B=>{try{U(B)}catch(q){setTimeout(()=>{throw q},0)}})};return A(p,ys.EventType.OPEN,()=>{v||(ee(wt,`RPC '${e}' stream ${i}
1310 transport opened.`),P.o_())}),A(p,ys.EventType.CLOSE,()=>{v||(v=!0,ee(wt,`RPC '${e}' stream ${i} transport closed`),P.a_(),this.E_(p))}),A(p,ys.EventType.ERROR,D=>{v||(v=!0,_i(wt,`RPC '${e}' stream ${i} transport errored. Name:`,D.name,"Message:",D.message),P.a_(new ie(Y.UNAVAILABLE,"The operation could not be completed")))}),A(p,ys.EventType.MESSAGE,D=>{var M;if(!v){const U=D.data[0];je(!!U,16349);const B=U,q=(B==null?void 0:B.error)||((M=B[0])==null?void 0:M.error);if(q){ee(wt,`RPC '${e}' stream ${i} received error:`,q);const H=q.status;let K=function(E){const I=Je[E];if(I!==void 0)return Cy(I)}(H),x=q.message;K===void 0&&(K=Y.INTERNAL,x="Unknown error status: "+H+" with message "+q.message),v=!0,P.a_(new ie(K,x)),p.close()}else ee(wt,`RPC '${e}' stream ${i} received:`,U),P.u_(U)}}),A(u,Xg.STAT_EVENT,D=>{D.stat===Dl.PROXY?ee(wt,`RPC '${e}' stream ${i} detected buffering proxy`):D.stat===Dl.NOPROXY&&ee(wt,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{P.__()},0),P}terminate(){this.c_.forEach(e=>e.close()),this.c_=[]}I_(e){this.c_.push(e)}E_(e){this.c_=this.c_.filter(t=>t===e)}}function $u(){return typeof document<"u"?document:null}/** 1311 * @license 1312 * Copyright 2020 Google LLC 1313 * 1314 * Licensed under the Apache License, Version 2.0 (the "License"); 1315 * you may not use this file except in compliance with the License. 1316 * You may obtain a copy of the License at 1317 * 1318 * http://www.apache.org/licenses/LICENSE-2.0 1319 * 1320 * Unless required by applicable law or agreed to in writing, software 1321 * distributed under the License is distributed on an "AS IS" BASIS, 1322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1323 * See the License for the specific language governing permissions and 1324 * limitations under the License. 1325 */function Ly(n){return new Hx(n,!0)}/** 1326 * @license 1327 * Copyright 2017 Google LLC 1328 * 1329 * Licensed under the Apache License, Version 2.0 (the "License"); 1330 * you may not use this file except in compliance with the License. 1331 * You may obtain a copy of the License at 1332 * 1333 * http://www.apache.org/licenses/LICENSE-2.0 1334 * 1335 * Unless required by applicable law or agreed to in writing, software 1336 * distributed under the License is distributed on an "AS IS" BASIS, 1337 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1338 * See the License for the specific language governing permissions and 1339 * limitations under the License. 1340 */class Fy{constructor(e,t,r=1e3,i=1.5,s=6e4){this.Mi=e,this.timerId=t,this.d_=r,this.A_=i,this.R_=s,this.V_=0,this.m_=null,this.f_=Date.now(),this.reset()}reset(){this.V_=0}g_(){this.V_=this.R_}p_(e){this.cancel();const t=Math.floor(this.V_+this.y_()),r=Math.max(0,Date.now()-this.f_),i=Math.max(0,t-r);i>0&&ee("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.V_} ms, delay with jitter: ${t} ms, last attempt: ${r} ms ago)`),this.m_=this.Mi.enqueueAfterDelay(this.timerId,i,()=>(this.f_=Date.now(),e())),this.V_*=this.A_,this.V_<this.d_&&(this.V_=this.d_),this.V_>this.R_&&(this.V_=this.R_)}w_(){this.m_!==null&&(this.m_.skipDelay(),this.m_=null)}cancel(){this.m_!==null&&(this.m_.cancel(),this.m_=null)}y_(){return(Math.random()-.5)*this.V_}}/** 1341 * @license 1342 * Copyright 2017 Google LLC 1343 * 1344 * Licensed under the Apache License, Version 2.0 (the "License"); 1345 * you may not use this file except in compliance with the License. 1346 * You may obtain a copy of the License at 1347 * 1348 * http://www.apache.org/licenses/LICENSE-2.0 1349 * 1350 * Unless required by applicable law or agreed to in writing, software 1351 * distributed under the License is distributed on an "AS IS" BASIS, 1352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1353 * See the License for the specific language governing permissions and 1354 * limitations under the License. 1355 */const Tf="PersistentStream";class LA{constructor(e,t,r,i,s,o,u,l){this.Mi=e,this.S_=r,this.b_=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=u,this.listener=l,this.state=0,this.D_=0,this.C_=null,this.v_=null,this.stream=null,this.F_=0,this.M_=new Fy(e,t)}x_(){return this.state===1||this.state===5||this.O_()}O_(){return this.state===2||this.state===3}start(){this.F_=0,this.state!==4?this.auth():this.N_()}async stop(){this.x_()&&await this.close(0)}B_(){this.state=0,this.M_.reset()}L_(){this.O_()&&this.C_===null&&(this.C_=this.Mi.enqueueAfterDelay(this.S_,6e4,()=>this.k_()))}q_(e){this.Q_(),this.stream.send(e)}
1355async k_(){if(this.O_())return this.close(0)}Q_(){this.C_&&(this.C_.cancel(),this.C_=null)}U_(){this.v_&&(this.v_.cancel(),this.v_=null)}async close(e,t){this.Q_(),this.U_(),this.M_.cancel(),this.D_++,e!==4?this.M_.reset():t&&t.code===Y.RESOURCE_EXHAUSTED?(Pn(t.toString()),Pn("Using maximum backoff delay to prevent overloading the backend."),this.M_.g_()):t&&t.code===Y.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.K_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.r_(t)}K_(){}auth(){this.state=1;const e=this.W_(this.D_),t=this.D_;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.D_===t&&this.G_(r,i)},r=>{e(()=>{const i=new ie(Y.UNKNOWN,"Fetching auth token failed: "+r.message);return this.z_(i)})})}G_(e,t){const r=this.W_(this.D_);this.stream=this.j_(e,t),this.stream.Xo(()=>{r(()=>this.listener.Xo())}),this.stream.t_(()=>{r(()=>(this.state=2,this.v_=this.Mi.enqueueAfterDelay(this.b_,1e4,()=>(this.O_()&&(this.state=3),Promise.resolve())),this.listener.t_()))}),this.stream.r_(i=>{r(()=>this.z_(i))}),this.stream.onMessage(i=>{r(()=>++this.F_==1?this.J_(i):this.onNext(i))})}N_(){this.state=5,this.M_.p_(async()=>{this.state=0,this.start()})}z_(e){return ee(Tf,`close with error: ${e}`),this.stream=null,this.close(4,e)}W_(e){return t=>{this.Mi.enqueueAndForget(()=>this.D_===e?t():(ee(Tf,"stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class FA extends LA{constructor(e,t,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,r,i,o),this.serializer=s}j_(e,t){return this.connection.T_("Listen",e,t)}J_(e){return this.onNext(e)}onNext(e){this.M_.reset();const t=Gx(this.serializer,e),r=function(s){if(!("targetChange"in s))return he.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?he.min():o.readTime?fi(o.readTime):he.min()}(e);return this.listener.H_(t,r)}Y_(e){const t={};t.database=pf(this.serializer),t.addTarget=function(s,o){let u;const l=o.target;if(u=jl(l)?{documents:Yx(s,l)}:{query:Qx(s,l).ft},u.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){u.resumeToken=zx(s,o.resumeToken);const c=Hl(s,o.expectedCount);c!==null&&(u.expectedCount=c)}else if(o.snapshotVersion.compareTo(he.min())>0){u.readTime=$x(s,o.snapshotVersion.toTimestamp());const c=Hl(s,o.expectedCount);c!==null&&(u.expectedCount=c)}return u}(this.serializer,e);const r=Jx(this.serializer,e);r&&(t.labels=r),this.q_(t)}Z_(e){const t={};t.database=pf(this.serializer),t.removeTarget=e,this.q_(t)}}/** 1356 * @license 1357 * Copyright 2017 Google LLC 1358 * 1359 * Licensed under the Apache License, Version 2.0 (the "License"); 1360 * you may not use this file except in compliance with the License. 1361 * You may obtain a copy of the License at 1362 * 1363 * http://www.apache.org/licenses/LICENSE-2.0 1364 * 1365 * Unless required by applicable law or agreed to in writing, software 1366 * distributed under the License is distributed on an "AS IS" BASIS, 1367 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1368 * See the License for the specific language governing permissions and 1369 * limitations under the License. 1370 */class jA{}
1370class UA extends jA{constructor(e,t,r,i){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=r,this.serializer=i,this.ia=!1}sa(){if(this.ia)throw new ie(Y.FAILED_PRECONDITION,"The client has already been terminated.")}Go(e,t,r,i){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Go(e,$l(t,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===Y.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new ie(Y.UNKNOWN,s.toString())})}Ho(e,t,r,i,s){return this.sa(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,u])=>this.connection.Ho(e,$l(t,r),i,o,u,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===Y.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new ie(Y.UNKNOWN,o.toString())})}terminate(){this.ia=!0,this.connection.terminate()}}class BA{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.oa=0,this._a=null,this.aa=!0}ua(){this.oa===0&&(this.ca("Unknown"),this._a=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._a=null,this.la("Backend didn't respond within 10 seconds."),this.ca("Offline"),Promise.resolve())))}ha(e){this.state==="Online"?this.ca("Unknown"):(this.oa++,this.oa>=1&&(this.Pa(),this.la(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.ca("Offline")))}set(e){this.Pa(),this.oa=0,e==="Online"&&(this.aa=!1),this.ca(e)}ca(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}la(e){const t=`Could not reach Cloud Firestore backend. ${e} 1371This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.aa?(Pn(t),this.aa=!1):ee("OnlineStateTracker",t)}Pa(){this._a!==null&&(this._a.cancel(),this._a=null)}}/** 1372 * @license 1373 * Copyright 2017 Google LLC 1374 * 1375 * Licensed under the Apache License, Version 2.0 (the "License"); 1376 * you may not use this file except in compliance with the License. 1377 * You may obtain a copy of the License at 1378 * 1379 * http://www.apache.org/licenses/LICENSE-2.0 1380 * 1381 * Unless required by applicable law or agreed to in writing, software 1382 * distributed under the License is distributed on an "AS IS" BASIS, 1383 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1384 * See the License for the specific language governing permissions and 1385 * limitations under the License. 1386 */const Ei="RemoteStore";class qA{constructor(e,t,r,i,s){this.localStore=e,this.datastore=t,this.asyncQueue=r,this.remoteSyncer={},this.Ta=[],this.Ia=new Map,this.Ea=new Set,this.da=[],this.Aa=s,this.Aa.Oo(o=>{r.enqueueAndForget(async()=>{Js(this)&&(ee(Ei,"Restarting streams for network reachability change."),await async function(l){const c=ve(l);c.Ea.add(4),await Xs(c),c.Ra.set("Unknown"),c.Ea.delete(4),await au(c)}(this))})}),this.Ra=new BA(r,i)}}async function au(n){if(Js(n))for(const e of n.da)await e(!0)}async function Xs(n){for(const e of n.da)await e(!1)}function jy(n,e){const t=ve(n);t.Ia.has(e.targetId)||(t.Ia.set(e.targetId,e),Qc(t)?Yc(t):Mi(t).O_()&&Gc(t,e))}function Kc(n,e){const t=ve(n),r=Mi(t);t.Ia.delete(e),r.O_()&&Uy(t,e),t.Ia.size===0&&(r.O_()?r.L_():Js(t)&&t.Ra.set("Unknown"))}function Gc(n,e){if(n.Va.Ue(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(he.min())>0){const t=n.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(t)}Mi(n).Y_(e)}function Uy(n,e){n.Va.Ue(e),Mi(n).Z_(e)}function Yc(n){n.Va=new jx({getRemoteKeysForTarget:e=>n.remoteSyncer.getRemoteKeysForTarget(e),At:e=>n.Ia.get(e)||null,ht:()=>n.datastore.serializer.databaseId}),Mi(n).start(),n.Ra.ua()}function Qc(n){return Js(n)&&!Mi(n).x_()&&n.Ia.size>0}function Js(n){return ve(n).Ea.size===0}function By(n){n.Va=void 0}async function HA(n){n.Ra.set("Online")}async function $A(n){n.Ia.forEach((e,t)=>{Gc(n,e)})}async function zA(n,e){By(n),Qc(n)?(n.Ra.ha(e),Yc(n)):n.Ra.set("Unknown")}async function WA(n,e,t){if(n.Ra.set("Online"),e instanceof xy&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const u of s.targetIds)i.Ia.has(u)&&(await i.remoteSyncer.rejectListen(u,o),i.Ia.delete(u),i.Va.removeTarget(u))}(n,e)}catch(r){ee(Ei,"Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Ef(n,r)}else if(e instanceof Ra?n.Va.Ze(e):e instanceof Py?n.Va.st(e):n.Va.tt(e),!t.isEqual(he.min()))try{const r=await Ny(n.localStore);t.compareTo(r)>=0&&await function(s,o){const u=s.Va.Tt(o);
1386return u.targetChanges.forEach((l,c)=>{if(l.resumeToken.approximateByteSize()>0){const h=s.Ia.get(c);h&&s.Ia.set(c,h.withResumeToken(l.resumeToken,o))}}),u.targetMismatches.forEach((l,c)=>{const h=s.Ia.get(l);if(!h)return;s.Ia.set(l,h.withResumeToken(vt.EMPTY_BYTE_STRING,h.snapshotVersion)),Uy(s,l);const p=new Hn(h.target,l,c,h.sequenceNumber);Gc(s,p)}),s.remoteSyncer.applyRemoteEvent(u)}(n,t)}catch(r){ee(Ei,"Failed to raise snapshot:",r),await Ef(n,r)}}async function Ef(n,e,t){if(!Vi(e))throw e;n.Ea.add(1),await Xs(n),n.Ra.set("Offline"),t||(t=()=>Ny(n.localStore)),n.asyncQueue.enqueueRetryable(async()=>{ee(Ei,"Retrying IndexedDB access"),await t(),n.Ea.delete(1),await au(n)})}async function Cf(n,e){const t=ve(n);t.asyncQueue.verifyOperationInProgress(),ee(Ei,"RemoteStore received new credentials");const r=Js(t);t.Ea.add(3),await Xs(t),r&&t.Ra.set("Unknown"),await t.remoteSyncer.handleCredentialChange(e),t.Ea.delete(3),await au(t)}async function KA(n,e){const t=ve(n);e?(t.Ea.delete(2),await au(t)):e||(t.Ea.add(2),await Xs(t),t.Ra.set("Unknown"))}function Mi(n){return n.ma||(n.ma=function(t,r,i){const s=ve(t);return s.sa(),new FA(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(n.datastore,n.asyncQueue,{Xo:HA.bind(null,n),t_:$A.bind(null,n),r_:zA.bind(null,n),H_:WA.bind(null,n)}),n.da.push(async e=>{e?(n.ma.B_(),Qc(n)?Yc(n):n.Ra.set("Unknown")):(await n.ma.stop(),By(n))})),n.ma}/** 1387 * @license 1388 * Copyright 2017 Google LLC 1389 * 1390 * Licensed under the Apache License, Version 2.0 (the "License"); 1391 * you may not use this file except in compliance with the License. 1392 * You may obtain a copy of the License at 1393 * 1394 * http://www.apache.org/licenses/LICENSE-2.0 1395 * 1396 * Unless required by applicable law or agreed to in writing, software 1397 * distributed under the License is distributed on an "AS IS" BASIS, 1398 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1399 * See the License for the specific language governing permissions and 1400 * limitations under the License. 1401 */class Xc{constructor(e,t,r,i,s){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new kr,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,t,r,i,s){const o=Date.now()+r,u=new Xc(e,t,o,i,s);return u.start(r),u}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new ie(Y.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function qy(n,e){if(Pn("AsyncQueue",`${e}: ${n}`),Vi(n))return new ie(Y.UNAVAILABLE,`${e}: ${n}`);throw n}/** 1402 * @license 1403 * Copyright 2017 Google LLC 1404 * 1405 * Licensed under the Apache License, Version 2.0 (the "License"); 1406 * you may not use this file except in compliance with the License. 1407 * You may obtain a copy of the License at 1408 * 1409 * http://www.apache.org/licenses/LICENSE-2.0 1410 * 1411 * Unless required by applicable law or agreed to in writing, software 1412 * distributed under the License is distributed on an "AS IS" BASIS, 1413 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1414 * See the License for the specific language governing permissions and 1415 * limitations under the License. 1416 */class pi{static emptySet(e){return new pi(e.comparator)}constructor(e){this.comparator=e?(t,r)=>e(t,r)||oe.comparator(t.key,r.key):(t,r)=>oe.comparator(t.key,r.key),this.keyedMap=_s(),this.sortedSet=new Xe(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,r)=>(e(t),!1))}add(e){const t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){const t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof pi)||this.size!==e.size)return!1;const t=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;t.hasNext();){const i=t.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(t=>{e.push(t.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( 1417 `+e.join(` 1418`)+` 1419)`}copy(e,t){const r=new pi;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=t,r}}/** 1420 * @license 1421 * Copyright 2017 Google LLC 1422 * 1423 * Licensed under the Apache License, Version 2.0 (the "License");
1424 * you may not use this file except in compliance with the License. 1425 * You may obtain a copy of the License at 1426 * 1427 * http://www.apache.org/licenses/LICENSE-2.0 1428 * 1429 * Unless required by applicable law or agreed to in writing, software 1430 * distributed under the License is distributed on an "AS IS" BASIS, 1431 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1432 * See the License for the specific language governing permissions and 1433 * limitations under the License. 1434 */class Pf{constructor(){this.ga=new Xe(oe.comparator)}track(e){const t=e.doc.key,r=this.ga.get(t);r?e.type!==0&&r.type===3?this.ga=this.ga.insert(t,e):e.type===3&&r.type!==1?this.ga=this.ga.insert(t,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.ga=this.ga.insert(t,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.ga=this.ga.remove(t):e.type===1&&r.type===2?this.ga=this.ga.insert(t,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.ga=this.ga.insert(t,{type:2,doc:e.doc}):de(63341,{Rt:e,pa:r}):this.ga=this.ga.insert(t,e)}ya(){const e=[];return this.ga.inorderTraversal((t,r)=>{e.push(r)}),e}}class Ci{constructor(e,t,r,i,s,o,u,l,c){this.query=e,this.docs=t,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=u,this.excludesMetadataChanges=l,this.hasCachedResults=c}static fromInitialDocuments(e,t,r,i,s){const o=[];return t.forEach(u=>{o.push({type:0,doc:u})}),new Ci(e,t,pi.emptySet(t),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&nu(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const t=this.docChanges,r=e.docChanges;if(t.length!==r.length)return!1;for(let i=0;i<t.length;i++)if(t[i].type!==r[i].type||!t[i].doc.isEqual(r[i].doc))return!1;return!0}}/** 1435 * @license 1436 * Copyright 2017 Google LLC 1437 * 1438 * Licensed under the Apache License, Version 2.0 (the "License"); 1439 * you may not use this file except in compliance with the License. 1440 * You may obtain a copy of the License at 1441 * 1442 * http://www.apache.org/licenses/LICENSE-2.0 1443 * 1444 * Unless required by applicable law or agreed to in writing, software 1445 * distributed under the License is distributed on an "AS IS" BASIS, 1446 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1447 * See the License for the specific language governing permissions and 1448 * limitations under the License. 1449 */class GA{constructor(){this.wa=void 0,this.Sa=[]}ba(){return this.Sa.some(e=>e.Da())}}class YA{constructor(){this.queries=xf(),this.onlineState="Unknown",this.Ca=new Set}terminate(){(function(t,r){const i=ve(t),s=i.queries;i.queries=xf(),s.forEach((o,u)=>{for(const l of u.Sa)l.onError(r)})})(this,new ie(Y.ABORTED,"Firestore shutting down"))}}function xf(){return new Ur(n=>my(n),nu)}async function QA(n,e){const t=ve(n);let r=3;const i=e.query;let s=t.queries.get(i);s?!s.ba()&&e.Da()&&(r=2):(s=new GA,r=e.Da()?0:1);try{switch(r){case 0:s.wa=await t.onListen(i,!0);break;case 1:s.wa=await t.onListen(i,!1);break;case 2:await t.onFirstRemoteStoreListen(i)}}catch(o){const u=qy(o,`Initialization of query '${ii(e.query)}' failed`);return void e.onError(u)}t.queries.set(i,s),s.Sa.push(e),e.va(t.onlineState),s.wa&&e.Fa(s.wa)&&Jc(t)}async function XA(n,e){const t=ve(n),r=e.query;let i=3;const s=t.queries.get(r);if(s){const o=s.Sa.indexOf(e);o>=0&&(s.Sa.splice(o,1),s.Sa.length===0?i=e.Da()?0:1:!s.ba()&&e.Da()&&(i=2))}switch(i){case 0:return t.queries.delete(r),t.onUnlisten(r,!0);case 1:return t.queries.delete(r),t.onUnlisten(r,!1);case 2:return t.onLastRemoteStoreUnlisten(r);default:return}}function JA(n,e){const t=ve(n);let r=!1;for(const i of e){const s=i.query,o=t.queries.get(s);if(o){for(const u of o.Sa)u.Fa(i)&&(r=!0);o.wa=i}}r&&Jc(t)}function ZA(n,e,t){const r=ve(n),i=r.queries.get(e);if(i)for(const s of i.Sa)s.onError(t);r.queries.delete(e)}function Jc(n){n.Ca.forEach(e=>{e.next()})}var Kl,Af;(Af=Kl||(Kl={})).Ma="default",Af.Cache="cache";class eS{constructor(e,t,r){this.query=e,this.xa=t,this.Oa=!1,this.Na=null,this.onlineState="Unknown",this.options=r||{}}Fa(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new Ci(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Oa?this.Ba(e)&&(this.xa.next(e),t=!0):this.La(e,this.onlineState)&&(this.ka(e),t=!0),this.Na=e,t}onError(e){this.xa.error(e)}va(e){this.onlineState=e;let t=!1;return this.Na&&!this.Oa&&this.La(this.Na,e)&&(this.ka(this.Na),t=!0),t}La(e,t){if(!e.fromCache||!this.Da())return!0;const r=t!=="Offline";return(!this.options.qa||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||t==="Offline")}Ba(e){if(e.docChanges.length>0)return!0;const t=this.Na&&this.Na.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&this.options.includeMetadataChanges===!0}ka(e){e=Ci.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Oa=!0,this.xa.next(e)}Da(){return this.options.source!==Kl.Cache}}/** 1450 * @license 1451 * Copyright 2017 Google LLC 1452 * 1453 * Licensed under the Apache License, Version 2.0 (the "License");
1454 * you may not use this file except in compliance with the License. 1455 * You may obtain a copy of the License at 1456 * 1457 * http://www.apache.org/licenses/LICENSE-2.0 1458 * 1459 * Unless required by applicable law or agreed to in writing, software 1460 * distributed under the License is distributed on an "AS IS" BASIS, 1461 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1462 * See the License for the specific language governing permissions and 1463 * limitations under the License. 1464 */class Hy{constructor(e){this.key=e}}class $y{constructor(e){this.key=e}}class tS{constructor(e,t){this.query=e,this.Ya=t,this.Za=null,this.hasCachedResults=!1,this.current=!1,this.Xa=be(),this.mutatedKeys=be(),this.eu=gy(e),this.tu=new pi(this.eu)}get nu(){return this.Ya}ru(e,t){const r=t?t.iu:new Pf,i=t?t.tu:this.tu;let s=t?t.mutatedKeys:this.mutatedKeys,o=i,u=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,c=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((h,p)=>{const g=i.get(h),v=ru(this.query,p)?p:null,P=!!g&&this.mutatedKeys.has(g.key),A=!!v&&(v.hasLocalMutations||this.mutatedKeys.has(v.key)&&v.hasCommittedMutations);let D=!1;g&&v?g.data.isEqual(v.data)?P!==A&&(r.track({type:3,doc:v}),D=!0):this.su(g,v)||(r.track({type:2,doc:v}),D=!0,(l&&this.eu(v,l)>0||c&&this.eu(v,c)<0)&&(u=!0)):!g&&v?(r.track({type:0,doc:v}),D=!0):g&&!v&&(r.track({type:1,doc:g}),D=!0,(l||c)&&(u=!0)),D&&(v?(o=o.add(v),s=A?s.add(h):s.delete(h)):(o=o.delete(h),s=s.delete(h)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const h=this.query.limitType==="F"?o.last():o.first();o=o.delete(h.key),s=s.delete(h.key),r.track({type:1,doc:h})}return{tu:o,iu:r,Cs:u,mutatedKeys:s}}su(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,r,i){const s=this.tu;this.tu=e.tu,this.mutatedKeys=e.mutatedKeys;const o=e.iu.ya();o.sort((h,p)=>function(v,P){const A=D=>{switch(D){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return de(20277,{Rt:D})}};return A(v)-A(P)}(h.type,p.type)||this.eu(h.doc,p.doc)),this.ou(r),i=i??!1;const u=t&&!i?this._u():[],l=this.Xa.size===0&&this.current&&!i?1:0,c=l!==this.Za;return this.Za=l,o.length!==0||c?{snapshot:new Ci(this.query,e.tu,s,o,e.mutatedKeys,l===0,c,!1,!!r&&r.resumeToken.approximateByteSize()>0),au:u}:{au:u}}va(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({tu:this.tu,iu:new Pf,mutatedKeys:this.mutatedKeys,Cs:!1},!1)):{au:[]}}uu(e){return!this.Ya.has(e)&&!!this.tu.has(e)&&!this.tu.get(e).hasLocalMutations}ou(e){e&&(e.addedDocuments.forEach(t=>this.Ya=this.Ya.add(t)),e.modifiedDocuments.forEach(t=>{}),e.removedDocuments.forEach(t=>this.Ya=this.Ya.delete(t)),this.current=e.current)}_u(){if(!this.current)return[];const e=this.Xa;this.Xa=be(),this.tu.forEach(r=>{this.uu(r.key)&&(this.Xa=this.Xa.add(r.key))});const t=[];return e.forEach(r=>{this.Xa.has(r)||t.push(new $y(r))}),this.Xa.forEach(r=>{e.has(r)||t.push(new Hy(r))}),t}cu(e){this.Ya=e.Qs,this.Xa=be();const t=this.ru(e.documents);return this.applyChanges(t,!0)}lu(){return Ci.fromInitialDocuments(this.query,this.tu,this.mutatedKeys,this.Za===0,this.hasCachedResults)}}const Zc="SyncEngine";class nS{constructor(e,t,r){this.query=e,this.targetId=t,this.view=r}}class rS{constructor(e){this.key=e,this.hu=!1}}class iS{constructor(e,t,r,i,s,o){this.localStore=e,this.remoteStore=t,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Pu={},this.Tu=new Ur(u=>my(u),nu),this.Iu=new Map,this.Eu=new Set,this.du=new Xe(oe.comparator),this.Au=new Map,this.Ru=new Hc,this.Vu={},this.mu=new Map,this.fu=Ti.cr(),this.onlineState="Unknown",this.gu=void 0}get isPrimaryClient(){return this.gu===!0}}async function sS(n,e,t=!0){const r=Yy(n);let i;const s=r.Tu.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.lu()):i=await zy(r,e,t,!0),i}async function oS(n,e){const t=Yy(n);await zy(t,e,!0,!1)}async function zy(n,e,t,r){const i=await RA(n.localStore,pn(e)),s=i.targetId,o=n.sharedCl
1464ientState.addLocalQueryTarget(s,t);let u;return r&&(u=await aS(n,e,s,o==="current",i.resumeToken)),n.isPrimaryClient&&t&&jy(n.remoteStore,i),u}async function aS(n,e,t,r,i){n.pu=(p,g,v)=>async function(A,D,M,U){let B=D.view.ru(M);B.Cs&&(B=await _f(A.localStore,D.query,!1).then(({documents:x})=>D.view.ru(x,B)));const q=U&&U.targetChanges.get(D.targetId),H=U&&U.targetMismatches.get(D.targetId)!=null,K=D.view.applyChanges(B,A.isPrimaryClient,q,H);return Rf(A,D.targetId,K.au),K.snapshot}(n,p,g,v);const s=await _f(n.localStore,e,!0),o=new tS(e,s.Qs),u=o.ru(s.documents),l=Qs.createSynthesizedTargetChangeForCurrentChange(t,r&&n.onlineState!=="Offline",i),c=o.applyChanges(u,n.isPrimaryClient,l);Rf(n,t,c.au);const h=new nS(e,t,o);return n.Tu.set(e,h),n.Iu.has(t)?n.Iu.get(t).push(e):n.Iu.set(t,[e]),c.snapshot}async function uS(n,e,t){const r=ve(n),i=r.Tu.get(e),s=r.Iu.get(i.targetId);if(s.length>1)return r.Iu.set(i.targetId,s.filter(o=>!nu(o,e))),void r.Tu.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedCl
1464ientState.isActiveQueryTarget(i.targetId)||await zl(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),t&&Kc(r.remoteStore,i.targetId),Gl(r,i.targetId)}).catch(Xa)):(Gl(r,i.targetId),await zl(r.localStore,i.targetId,!0))}async function lS(n,e){const t=ve(n),r=t.Tu.get(e),i=t.Iu.get(r.targetId);t.isPrimaryClient&&i.length===1&&(t.sharedClientState.removeLocalQueryTarget(r.targetId),Kc(t.remoteStore,r.targetId))}async function Wy(n,e){const t=ve(n);try{const r=await AA(t.localStore,e);e.targetChanges.forEach((i,s)=>{const o=t.Au.get(s);o&&(je(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1,22616),i.addedDocuments.size>0?o.hu=!0:i.modifiedDocuments.size>0?je(o.hu,14607):i.removedDocuments.size>0&&(je(o.hu,42227),o.hu=!1))}),await Gy(t,r,e)}catch(r){await Xa(r)}}function Sf(n,e,t){const r=ve(n);if(r.isPrimaryClient&&t===0||!r.isPrimaryClient&&t===1){const i=[];r.Tu.forEach((s,o)=>{const u=o.view.va(e);u.snapshot&&i.push(u.snapshot)}),function(o,u){const l=ve(o);l.onlineState=u;let c=!1;l.queries.forEach((h,p)=>{for(const g of p.Sa)g.va(u)&&(c=!0)}),c&&Jc(l)}(r.eventManager,e),i.length&&r.Pu.H_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedCl
1464ientState.setOnlineState(e)}}async function cS(n,e,t){const r=ve(n);r.sharedClientState.updateQueryState(e,"rejected",t);const i=r.Au.get(e),s=i&&i.key;if(s){let o=new Xe(oe.comparator);o=o.insert(s,Tt.newNoDocument(s,he.min()));const u=be().add(s),l=new ou(he.min(),new Map,new Xe(ye),o,u);await Wy(r,l),r.du=r.du.remove(s),r.Au.delete(e),eh(r)}else await zl(r.localStore,e,!1).then(()=>Gl(r,e,t)).catch(Xa)}function Gl(n,e,t=null){n.sharedClientState.removeLocalQueryTarget(e);for(const r of n.Iu.get(e))n.Tu.delete(r),t&&n.Pu.yu(r,t);n.Iu.delete(e),n.isPrimaryClient&&n.Ru.jr(e).forEach(r=>{n.Ru.containsKey(r)||Ky(n,r)})}function Ky(n,e){n.Eu.delete(e.path.canonicalString());const t=n.du.get(e);t!==null&&(Kc(n.remoteStore,t),n.du=n.du.remove(e),n.Au.delete(t),eh(n))}function Rf(n,e,t){for(const r of t)r instanceof Hy?(n.Ru.addReference(r.key,e),hS(n,r)):r instanceof $y?(ee(Zc,"Document no longer in limbo: "+r.key),n.Ru.removeReference(r.key,e),n.Ru.containsKey(r.key)||Ky(n,r.key)):de(19791,{wu:r})}function hS(n,e){const t=e.key,r=t.path.canonicalString();n.du.get(t)||n.Eu.has(r)||(ee(Zc,"New document in limbo: "+t),n.Eu.add(r),eh(n))}function eh(n){for(;n.Eu.size>0&&n.du.size<n.maxConcurrentLimboResolutions;){const e=n.Eu.values().next().value;n.Eu.delete(e);const t=new oe(Ne.fromString(e)),r=n.fu.next();n.Au.set(r,new rS(t)),n.du=n.du.insert(t,r),jy(n.remoteStore,new Hn(pn(jc(t.path)),r,"TargetPurposeLimboResolution",Ja.ce))}}async function Gy(n,e,t){const r=ve(n),i=[],s=[],o=[];r.Tu.isEmpty()||(r.Tu.forEach((u,l)=>{o.push(r.pu(l,e,t).then(c=>{var h;if((c||t)&&r.isPrimaryClient){const p=c?!c.fromCache:(h=t==null?void 0:t.targetChanges.get(l.targetId))==null?void 0:h.current;
1464r.sharedClientState.updateQueryState(l.targetId,p?"current":"not-current")}if(c){i.push(c);const p=zc.As(l.targetId,c);s.push(p)}}))}),await Promise.all(o),r.Pu.H_(i),await async function(l,c){const h=ve(l);try{await h.persistence.runTransaction("notifyLocalViewChanges","readwrite",p=>$.forEach(c,g=>$.forEach(g.Es,v=>h.persistence.referenceDelegate.addReference(p,g.targetId,v)).next(()=>$.forEach(g.ds,v=>h.persistence.referenceDelegate.removeReference(p,g.targetId,v)))))}catch(p){if(!Vi(p))throw p;ee(Wc,"Failed to update sequence numbers: "+p)}for(const p of c){const g=p.targetId;if(!p.fromCache){const v=h.Ms.get(g),P=v.snapshotVersion,A=v.withLastLimboFreeSnapshotVersion(P);h.Ms=h.Ms.insert(g,A)}}}(r.localStore,s))}async function dS(n,e){const t=ve(n);if(!t.currentUser.isEqual(e)){ee(Zc,"User change. New user:",e.toKey());const r=await ky(t.localStore,e);t.currentUser=e,function(s,o){s.mu.forEach(u=>{u.forEach(l=>{l.reject(new ie(Y.CANCELLED,o))})}),s.mu.clear()}(t,"'waitForPendingWrites' promise is rejected due to a user change."),t.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await Gy(t,r.Ls)}}function fS(n,e){const t=ve(n),r=t.Au.get(e);if(r&&r.hu)return be().add(r.key);{let i=be();const s=t.Iu.get(e);if(!s)return i;for(const o of s){const u=t.Tu.get(o);i=i.unionWith(u.view.nu)}return i}}function Yy(n){const e=ve(n);return e.remoteStore.remoteSyncer.applyRemoteEvent=Wy.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=fS.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=cS.bind(null,e),e.Pu.H_=JA.bind(null,e.eventManager),e.Pu.yu=ZA.bind(null,e.eventManager),e}class Ka{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Ly(e.databaseInfo.databaseId),this.sharedClientState=this.Du(e),this.persistence=this.Cu(e),await this.persistence.start(),this.localStore=this.vu(e),this.gcScheduler=this.Fu(e,this.localStore),this.indexBackfillerScheduler=this.Mu(e,this.localStore)}Fu(e,t){return null}Mu(e,t){return null}vu(e){return xA(this.persistence,new EA,e.initialUser,this.serializer)}Cu(e){return new My($c.mi,this.serializer)}Du(e){return new DA}async terminate(){var e,t;(e=this.gcScheduler)==null||e.stop(),(t=this.indexBackfillerScheduler)==null||t.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}Ka.provider={build:()=>new Ka};
1464class pS extends Ka{constructor(e){super(),this.cacheSizeBytes=e}Fu(e,t){je(this.persistence.referenceDelegate instanceof Wa,46915);const r=this.persistence.referenceDelegate.garbageCollector;return new uA(r,e.asyncQueue,t)}Cu(e){const t=this.cacheSizeBytes!==void 0?Rt.withCacheSize(this.cacheSizeBytes):Rt.DEFAULT;return new My(r=>Wa.mi(r,t),this.serializer)}}class Yl{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>Sf(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=dS.bind(null,this.syncEngine),await KA(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new YA}()}createDatastore(e){const t=Ly(e.databaseInfo.databaseId),r=function(s){return new NA(s)}(e.databaseInfo);return function(s,o,u,l){return new UA(s,o,u,l)}(e.authCredentials,e.appCheckCredentials,r,t)}createRemoteStore(e){return function(r,i,s,o,u){return new qA(r,i,s,o,u)}(this.localStore,this.datastore,e.asyncQueue,t=>Sf(this.syncEngine,t,0),function(){return bf.v()?new bf:new OA}())}createSyncEngine(e,t){return function(i,s,o,u,l,c,h){const p=new iS(i,s,o,u,l,c);return h&&(p.gu=!0),p}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}async terminate(){var e,t;await async function(i){const s=ve(i);ee(Ei,"RemoteStore shutting down."),s.Ea.add(5),await Xs(s),s.Aa.shutdown(),s.Ra.set("Unknown")}(this.remoteStore),(e=this.datastore)==null||e.terminate(),(t=this.eventManager)==null||t.terminate()}}Yl.provider={build:()=>new Yl};/** 1465 * @license 1466 * Copyright 2020 Google LLC 1467 * 1468 * Licensed under the Apache License, Version 2.0 (the "License"); 1469 * you may not use this file except in compliance with the License. 1470 * You may obtain a copy of the License at 1471 * 1472 * http://www.apache.org/licenses/LICENSE-2.0 1473 * 1474 * Unless required by applicable law or agreed to in writing, software 1475 * distributed under the License is distributed on an "AS IS" BASIS, 1476 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1477 * See the License for the specific language governing permissions and 1478 * limitations under the License. 1479 *//** 1480 * @license 1481 * Copyright 2017 Google LLC 1482 * 1483 * Licensed under the Apache License, Version 2.0 (the "License"); 1484 * you may not use this file except in compliance with the License. 1485 * You may obtain a copy of the License at 1486 * 1487 * http://www.apache.org/licenses/LICENSE-2.0 1488 * 1489 * Unless required by applicable law or agreed to in writing, software 1490 * distributed under the License is distributed on an "AS IS" BASIS, 1491 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1492 * See the License for the specific language governing permissions and 1493 * limitations under the License. 1494 */class mS{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Ou(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Ou(this.observer.error,e):Pn("Uncaught Error in snapshot listener:",e.toString()))}Nu(){this.muted=!0}Ou(e,t){setTimeout(()=>{this.muted||e(t)},0)}}/** 1495 * @license 1496 * Copyright 2017 Google LLC 1497 * 1498 * Licensed under the Apache License, Version 2.0 (the "License"); 1499 * you may not use this file except in compliance with the License. 1500 * You may obtain a copy of the License at 1501 * 1502 * http://www.apache.org/licenses/LICENSE-2.0 1503 * 1504 * Unless required by applicable law or agreed to in writing, software 1505 * distributed under the License is distributed on an "AS IS" BASIS, 1506 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1507 * See the License for the specific language governing permissions and 1508 * limitations under the License. 1509 */const rr="FirestoreClient";class gS{constructor(e,t,r,i,s){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=r,this.databaseInfo=i,this.user=bt.UNAUTHENTICATED,this.clientId=Mc.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,async o=>{ee(rr,"Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(ee(rr,"Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new kr;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(t){const r=qy(t,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function zu(n,e){n.asyncQueue.verifyOperationInProgress(),ee(rr,"Initializing OfflineComponentProvider");const t=n.configuration;await e.initialize(t);let r=t.initialUser;n.setCredentialChangeListener(async i=>{r.isEqual(i)||(await ky(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>n.terminate()),n._offlineComponents=e}async function If(n,e){n.asyncQueue.verifyOperationInProgress();const t=await yS(n);ee(rr,"Initializing OnlineComponentProvider"),await e.initialize(t,n.configuration),n.setCredentialChangeListener(r=>Cf(e.remoteStore,r)),n.setAppCheckTokenChangeListener((r,i)=>Cf(e.remoteStore,i)),n._onlineComponents=e}async function yS(n){if(!n._offlineComponents)if(n._uninitializedComponentsProvider){ee(rr,"Using user provided OfflineComponentProvider");try{await zu(n,n._uninitializedComponentsProvider._offline)}catch(e){const t=e;if(!function(i){return i.name==="FirebaseError"?i.code===Y.FAILED_PRECONDITION||i.code===Y.UNIMPLEMENT
1509ED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(t))throw t;_i("Error using user provided cache. Falling back to memory cache: "+t),await zu(n,new Ka)}}else ee(rr,"Using default OfflineComponentProvider"),await zu(n,new pS(void 0));return n._offlineComponents}async function _S(n){return n._onlineComponents||(n._uninitializedComponentsProvider?(ee(rr,"Using user provided OnlineComponentProvider"),await If(n,n._uninitializedComponentsProvider._online)):(ee(rr,"Using default OnlineComponentProvider"),await If(n,new Yl))),n._onlineComponents}async function vS(n){const e=await _S(n),t=e.eventManager;return t.onListen=sS.bind(null,e.syncEngine),t.onUnlisten=uS.bind(null,e.syncEngine),t.onFirstRemoteStoreListen=oS.bind(null,e.syncEngine),t.onLastRemoteStoreUnlisten=lS.bind(null,e.syncEngine),t}function wS(n,e,t={}){const r=new kr;return n.asyncQueue.enqueueAndForget(async()=>function(s,o,u,l,c){const h=new mS({next:g=>{h.Nu(),o.enqueueAndForget(()=>XA(s,p));const v=g.docs.has(u);!v&&g.fromCache?c.reject(new ie(Y.UNAVAILABLE,"Failed to get document because the client is offline.")):v&&g.fromCache&&l&&l.source==="server"?c.reject(new ie(Y.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):c.resolve(g)},error:g=>c.reject(g)}),p=new eS(jc(u.path),h,{includeMetadataChanges:!0,qa:!0});return QA(s,p)}(await vS(n),n.asyncQueue,e,t,r)),r.promise}/** 1510 * @license 1511 * Copyright 2023 Google LLC 1512 * 1513 * Licensed under the Apache License, Version 2.0 (the "License"); 1514 * you may not use this file except in compliance with the License. 1515 * You may obtain a copy of the License at 1516 * 1517 * http://www.apache.org/licenses/LICENSE-2.0 1518 * 1519 * Unless required by applicable law or agreed to in writing, software 1520 * distributed under the License is distributed on an "AS IS" BASIS, 1521 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1522 * See the License for the specific language governing permissions and 1523 * limitations under the License. 1524 */function Qy(n){const e={};return n.timeoutSeconds!==void 0&&(e.timeoutSeconds=n.timeoutSeconds),e}/** 1525 * @license 1526 * Copyright 2020 Google LLC 1527 * 1528 * Licensed under the Apache License, Version 2.0 (the "License"); 1529 * you may not use this file except in compliance with the License. 1530 * You may obtain a copy of the License at 1531 * 1532 * http://www.apache.org/licenses/LICENSE-2.0 1533 * 1534 * Unless required by applicable law or agreed to in writing, software 1535 * distributed under the License is distributed on an "AS IS" BASIS, 1536 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1537 * See the License for the specific language governing permissions and 1538 * limitations under the License. 1539 */const Df=new Map;/** 1540 * @license 1541 * Copyright 2020 Google LLC 1542 * 1543 * Licensed under the Apache License, Version 2.0 (the "License"); 1544 * you may not use this file except in compliance with the License. 1545 * You may obtain a copy of the License at 1546 * 1547 * http://www.apache.org/licenses/LICENSE-2.0 1548 * 1549 * Unless required by applicable law or agreed to in writing, software 1550 * distributed under the License is distributed on an "AS IS" BASIS, 1551 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1552 * See the License for the specific language governing permissions and 1553 * limitations under the License. 1554 */const Xy="firestore.googleapis.com",Of=!0;class Vf{constructor(e){if(e.host===void 0){if(e.ssl!==void 0)throw new ie(Y.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host=Xy,this.ssl=Of}else this.host=e.host,this.ssl=e.ssl??Of;if(this.isUsingEmulator=e.emulatorOptions!==void 0,this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=Vy;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<oA)throw new ie(Y.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}BP("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=Qy(e.experimentalLongPollingOptions??{}),function(r){if(r.timeoutSeconds!==void 0){if(isNaN(r.timeoutSeconds))throw new ie(Y.INVA
1554LID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (must not be NaN)`);if(r.timeoutSeconds<5)throw new ie(Y.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (minimum allowed value is 5)`);if(r.timeoutSeconds>30)throw new ie(Y.INVALID_ARGUMENT,`invalid long polling timeout: ${r.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class th{constructor(e,t,r,i){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new Vf({}),this._settingsFrozen=!1,this._emulatorOptions={},this._terminateTask="notTerminated"}get app(){if(!this._app)throw new ie(Y.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new ie(Y.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new Vf(e),this._emulatorOptions=e.emulatorOptions||{},e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new IP;switch(r.type){case"firstParty":return new MP(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new ie(Y.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_getEmulatorOptions(){return this._emulatorOptions}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const r=Df.get(t);r&&(ee("ComponentProvider","Removing Datastore"),Df.delete(t),r.terminate())}(this),Promise.resolve()}}function bS(n,e,t,r={}){var c;n=Vl(n,th);const i=Xp(e),s=n._getSettings(),o={...s,emulatorOptions:n._getEmulatorOptions()},u=`${e}:${t}`;i&&(Z_(`https://${u}`),ev("Firestore",!0)),s.host!==Xy&&s.host!==u&&_i("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.");const l={...s,host:u,ssl:i,emulatorOptions:r};if(!tv(l,o)&&(n._setSettings(l),r.mockUserToken)){let h,p;if(typeof r.mockUserToken=="string")h=r.mockUserToken,p=bt.MOCK_USER;else{h=nv(r.mockUserToken,(c=n._app)==null?void 0:c.options.projectId);const g=r.mockUserToken.sub||r.mockUserToken.user_id;if(!g)throw new ie(Y.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");p=new bt(g)}n._authCredentials=new DP(new ty(h,p))}}/** 1555 * @license 1556 * Copyright 2020 Google LLC 1557 * 1558 * Licensed under the Apache License, Version 2.0 (the "License"); 1559 * you may not use this file except in compliance with the License. 1560 * You may obtain a copy of the License at 1561 * 1562 * http://www.apache.org/licenses/LICENSE-2.0 1563 * 1564 * Unless required by applicable law or agreed to in writing, software 1565 * distributed under the License is distributed on an "AS IS" BASIS, 1566 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1567 * See the License for the specific language governing permissions and 1568 * limitations under the License. 1569 */class nh{constructor(e,t,r){this.converter=t,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new nh(this.firestore,e,this._query)}}class At{constructor(e,t,r){this.converter=t,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}
1569get path(){return this._key.path.canonicalString()}get parent(){return new Us(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new At(this.firestore,e,this._key)}toJSON(){return{type:At._jsonSchemaVersion,referencePath:this._key.toString()}}static fromJSON(e,t,r){if(Gs(t,At._jsonSchema))return new At(e,r||null,new oe(Ne.fromString(t.referencePath)))}}At._jsonSchemaVersion="firestore/documentReference/1.0",At._jsonSchema={type:tt("string",At._jsonSchemaVersion),referencePath:tt("string")};class Us extends nh{constructor(e,t,r){super(e,t,jc(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new At(this.firestore,null,new oe(e))}withConverter(e){return new Us(this.firestore,e,this._path)}}function oI(n,e,...t){if(n=Y_(n),arguments.length===1&&(e=Mc.newId()),UP("doc","path",e),n instanceof th){const r=Ne.fromString(e,...t);return zd(r),new At(n,null,new oe(r))}{if(!(n instanceof At||n instanceof Us))throw new ie(Y.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=n._path.child(Ne.fromString(e,...t));return zd(r),new At(n.firestore,n instanceof Us?n.converter:null,new oe(r))}}/** 1570 * @license 1571 * Copyright 2020 Google LLC 1572 * 1573 * Licensed under the Apache License, Version 2.0 (the "License"); 1574 * you may not use this file except in compliance with the License. 1575 * You may obtain a copy of the License at 1576 * 1577 * http://www.apache.org/licenses/LICENSE-2.0 1578 * 1579 * Unless required by applicable law or agreed to in writing, software 1580 * distributed under the License is distributed on an "AS IS" BASIS, 1581 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1582 * See the License for the specific language governing permissions and 1583 * limitations under the License. 1584 */const Mf="AsyncQueue";class kf{constructor(e=Promise.resolve()){this.Xu=[],this.ec=!1,this.tc=[],this.nc=null,this.rc=!1,this.sc=!1,this.oc=[],this.M_=new Fy(this,"async_queue_retry"),this._c=()=>{const r=$u();r&&ee(Mf,"Visibility state changed to "+r.visibilityState),this.M_.w_()},this.ac=e;const t=$u();t&&typeof t.addEventListener=="function"&&t.addEventListener("visibilitychange",this._c)}get isShuttingDown(){return this.ec}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.uc(),this.cc(e)}enterRestrictedMode(e){if(!this.ec){this.ec=!0,this.sc=e||!1;const t=$u();t&&typeof t.removeEventListener=="function"&&t.removeEventListener("visibilitychange",this._c)}}enqueue(e){if(this.uc(),this.ec)return new Promise(()=>{});const t=new kr;return this.cc(()=>this.ec&&this.sc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Xu.push(e),this.lc()))}async lc(){if(this.Xu.length!==0){try{await this.Xu[0](),this.Xu.shift(),this.M_.reset()}catch(e){if(!Vi(e))throw e;ee(Mf,"Operation failed with retryable error: "+e)}this.Xu.length>0&&this.M_.p_(()=>this.lc())}}cc(e){const t=this.ac.then(()=>(this.rc=!0,e().catch(r=>{throw this.nc=r,this.rc=!1,Pn("INTERNAL UNHANDLED ERROR: ",Nf(r)),r}).then(r=>(this.rc=!1,r))));return this.ac=t,t}enqueueAfterDelay(e,t,r){this.uc(),this.oc.indexOf(e)>-1&&(t=0);const i=Xc.createAndSchedule(this,e,t,r,s=>this.hc(s));return this.tc.push(i),i}uc(){this.nc&&de(47125,{Pc:Nf(this.nc)})}verifyOperationInProgress(){}async Tc(){let e;do e=this.ac,await e;while(e!==this.ac)}Ic(e){for(const t of this.tc)if(t.timerId===e)return!0;return!1}Ec(e){return this.Tc().then(()=>{this.tc.sort((t,r)=>t.targetTimeMs-r.targetTimeMs);for(const t of this.tc)if(t.skipDelay(),e!=="all"&&t.timerId===e)break;return this.Tc()})}dc(e){this.oc.push(e)}hc(e){const t=this.tc.indexOf(e);this.tc.splice(t,1)}}function Nf(n){let e=n.message||"";return n.stack&&(e=n.stack.includes(n.message)?n.stack:n.message+` 1585`+n.stack),e}
1585class Jy extends th{constructor(e,t,r,i){super(e,t,r,i),this.type="firestore",this._queue=new kf,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new kf(e),this._firestoreClient=void 0,await e}}}function aI(n,e){const t=typeof n=="object"?n:Q_(),r=typeof n=="string"?n:Ba,i=X_(t,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=J_("firestore");s&&bS(i,...s)}return i}function TS(n){if(n._terminated)throw new ie(Y.FAILED_PRECONDITION,"The client has already been terminated.");return n._firestoreClient||ES(n),n._firestoreClient}function ES(n){var r,i,s;const e=n._freezeSettings(),t=function(u,l,c,h){return new tx(u,l,c,h.host,h.ssl,h.experimentalForceLongPolling,h.experimentalAutoDetectLongPolling,Qy(h.experimentalLongPollingOptions),h.useFetchStreams,h.isUsingEmulator)}(n._databaseId,((r=n._app)==null?void 0:r.options.appId)||"",n._persistenceKey,e);n._componentsProvider||(i=e.localCache)!=null&&i._offlineComponentProvider&&((s=e.localCache)!=null&&s._onlineComponentProvider)&&(n._componentsProvider={_offline:e.localCache._offlineComponentProvider,_online:e.localCache._onlineComponentProvider}),n._firestoreClient=new gS(n._authCredentials,n._appCheckCredentials,n._queue,t,n._componentsProvider&&function(u){const l=u==null?void 0:u._online.build();return{_offline:u==null?void 0:u._offline.build(l),_online:l}}(n._componentsProvider))}/** 1586 * @license 1587 * Copyright 2020 Google LLC 1588 * 1589 * Licensed under the Apache License, Version 2.0 (the "License"); 1590 * you may not use this file except in compliance with the License. 1591 * You may obtain a copy of the License at 1592 * 1593 * http://www.apache.org/licenses/LICENSE-2.0 1594 * 1595 * Unless required by applicable law or agreed to in writing, software 1596 * distributed under the License is distributed on an "AS IS" BASIS, 1597 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1598 * See the License for the specific language governing permissions and 1599 * limitations under the License. 1600 */class hn{constructor(e){this._byteString=e}static fromBase64String(e){try{return new hn(vt.fromBase64String(e))}catch(t){throw new ie(Y.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(e){return new hn(vt.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}toJSON(){return{type:hn._jsonSchemaVersion,bytes:this.toBase64()}}static fromJSON(e){if(Gs(e,hn._jsonSchema))return hn.fromBase64String(e.bytes)}}hn._jsonSchemaVersion="firestore/bytes/1.0",hn._jsonSchema={type:tt("string",hn._jsonSchemaVersion),bytes:tt("string")};/** 1601 * @license 1602 * Copyright 2020 Google LLC 1603 * 1604 * Licensed under the Apache License, Version 2.0 (the "License"); 1605 * you may not use this file except in compliance with the License. 1606 * You may obtain a copy of the License at 1607 * 1608 * http://www.apache.org/licenses/LICENSE-2.0 1609 * 1610 * Unless required by applicable law or agreed to in writing, software 1611 * distributed under the License is distributed on an "AS IS" BASIS, 1612 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1613 * See the License for the specific language governing permissions and 1614 * limitations under the License. 1615 */class Zy{constructor(...e){for(let t=0;t<e.length;++t)if(e[t].length===0)throw new ie(Y.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new Pt(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** 1616 * @license 1617 * Copyright 2017 Google LLC 1618 * 1619 * Licensed under the Apache License, Version 2.0 (the "License"); 1620 * you may not use this file except in compliance with the License. 1621 * You may obtain a copy of the License at 1622 * 1623 * http://www.apache.org/licenses/LICENSE-2.0 1624 * 1625 * Unless required by applicable law or agreed to in writing, software 1626 * distributed under the License is distributed on an "AS IS" BASIS, 1627 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1628 * See the License for the specific language governing permissions and 1629 * limitations under the License. 1630 */class zn{constructor(e,t){if(!isFinite(e)||e<-90||e>
163090)throw new ie(Y.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new ie(Y.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}_compareTo(e){return ye(this._lat,e._lat)||ye(this._long,e._long)}toJSON(){return{latitude:this._lat,longitude:this._long,type:zn._jsonSchemaVersion}}static fromJSON(e){if(Gs(e,zn._jsonSchema))return new zn(e.latitude,e.longitude)}}zn._jsonSchemaVersion="firestore/geoPoint/1.0",zn._jsonSchema={type:tt("string",zn._jsonSchemaVersion),latitude:tt("number"),longitude:tt("number")};/** 1631 * @license 1632 * Copyright 2024 Google LLC 1633 * 1634 * Licensed under the Apache License, Version 2.0 (the "License"); 1635 * you may not use this file except in compliance with the License. 1636 * You may obtain a copy of the License at 1637 * 1638 * http://www.apache.org/licenses/LICENSE-2.0 1639 * 1640 * Unless required by applicable law or agreed to in writing, software 1641 * distributed under the License is distributed on an "AS IS" BASIS, 1642 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1643 * See the License for the specific language governing permissions and 1644 * limitations under the License. 1645 */class Wn{constructor(e){this._values=(e||[]).map(t=>t)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}toJSON(){return{type:Wn._jsonSchemaVersion,vectorValues:this._values}}static fromJSON(e){if(Gs(e,Wn._jsonSchema)){if(Array.isArray(e.vectorValues)&&e.vectorValues.every(t=>typeof t=="number"))return new Wn(e.vectorValues);throw new ie(Y.INVALID_ARGUMENT,"Expected 'vectorValues' field to be a number array")}}}Wn._jsonSchemaVersion="firestore/vectorValue/1.0",Wn._jsonSchema={type:tt("string",Wn._jsonSchemaVersion),vectorValues:tt("object")};const CS=new RegExp("[~\\*/\\[\\]]");function PS(n,e,t){if(e.search(CS)>=0)throw Lf(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,n);try{return new Zy(...e.split("."))._internalPath}catch{throw Lf(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,n)}}function Lf(n,e,t,r,i){let s=`Function ${e}() called with invalid data`;s+=". ";let o="";return new ie(Y.INVALID_ARGUMENT,s+n+o)}/** 1646 * @license 1647 * Copyright 2020 Google LLC 1648 * 1649 * Licensed under the Apache License, Version 2.0 (the "License"); 1650 * you may not use this file except in compliance with the License. 1651 * You may obtain a copy of the License at 1652 * 1653 * http://www.apache.org/licenses/LICENSE-2.0 1654 * 1655 * Unless required by applicable law or agreed to in writing, software 1656 * distributed under the License is distributed on an "AS IS" BASIS, 1657 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1658 * See the License for the specific language governing permissions and 1659 * limitations under the License. 1660 */class e_{constructor(e,t,r,i,s){this._firestore=e,this._userDataWriter=t,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new At(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new xS(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const t=this._document.data.field(t_("DocumentSnapshot.get",e));if(t!==null)return this._userDataWriter.convertValue(t)}}}class xS extends e_{data(){return super.data()}}function t_(n,e){return typeof e=="string"?PS(n,e):e instanceof Zy?e._internalPath:e._delegate._internalPath}class AS{convertValue(e,t="none"){switch(tr(e)){case 0:return null;case 1:return e.booleanValue;case 2:return Ge(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(er(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 11:return this.convertObject(e.mapValue,t);case 10:return this.convertVectorValue(e.mapValue);default:throw de(62114,{value:e})}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){const r={};return Ys(e,(i,s)=>{r[i]=this.convertValue(s,t)}),r}convertVectorValue(e){var r,i,s;const t=(s=(i=(r=e.fields)==null?void 0:r[kl].arrayValue)==null?void 0:i.values)==null?void 0:s.map(o=>Ge(o.doubleValue));return new Wn(t)}convertGeoPoint(e){return new zn(Ge(e.latitude),Ge(e.longitude))}convertArray(e,t){return(e.values||[]).map(r=>this.convertValue(r,t))}convertServerTimestamp(e,t){switch(t){case"previous":const r=eu(e);return r==null?null:this.convertValue(r,t);case"estimate":return this.convertTimestamp(Ls(e));default:return null}}convertTimestamp(e){const t=Zn(e);return new et(t.seconds,t.nanos)}convertDocumentKey(e,t){const r=Ne.fromString(e);je(Oy(r),9688,{name:e});const i=new Fs(r.get(1),r.get(3)),s=new oe(r.popFirst(5));return i.isEqual(t)||Pn(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}class ws{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class Lr extends e_{constructor(e,t,r,i,s,o){super(e,t,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const t=new Ia(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){const r=this._document.data.field(t_("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,t.serverTimestamps)}}toJSON(){if(this.metadata.hasPendingWrites)throw new ie(Y.FAILED_PRECONDITION,"DocumentSnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e=this._document,t={};return t.type=Lr._jsonSchemaVersion,t.bundle="",t.bundleSource="DocumentSnapshot",t.bundleName=this._key.toString(),!e||!e.isValidDocument()||!e.isFoundDocument()?t:(this._userDataWriter.convertObjectMap(e.data.value.mapValue.fields,"previous"),t.bundle=(this._firestore,this.ref.path,"NOT SUPPORTED"),t)}}Lr._jsonSchemaVersion="firestore/documentSnapshot/1.0",Lr._jsonSchema={type:tt("string",Lr._jsonSchemaVersion),bundleSource:tt("string","DocumentSnapshot"),bundleName:tt("string"),bundle:tt("string")};class Ia extends Lr{data(e={}){return super.data(e)}}
1660class Rs{constructor(e,t,r,i){this._firestore=e,this._userDataWriter=t,this._snapshot=i,this.metadata=new ws(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,t){this._snapshot.docs.forEach(r=>{e.call(t,new Ia(this._firestore,this._userDataWriter,r.key,r,new ws(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new ie(Y.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(u=>{const l=new Ia(i._firestore,i._userDataWriter,u.doc.key,u.doc,new ws(i._snapshot.mutatedKeys.has(u.doc.key),i._snapshot.fromCache),i.query.converter);return u.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(u=>s||u.type!==3).map(u=>{const l=new Ia(i._firestore,i._userDataWriter,u.doc.key,u.doc,new ws(i._snapshot.mutatedKeys.has(u.doc.key),i._snapshot.fromCache),i.query.converter);let c=-1,h=-1;return u.type!==0&&(c=o.indexOf(u.doc.key),o=o.delete(u.doc.key)),u.type!==1&&(o=o.add(u.doc),h=o.indexOf(u.doc.key)),{type:SS(u.type),doc:l,oldIndex:c,newIndex:h}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}toJSON(){if(this.metadata.hasPendingWrites)throw new ie(Y.FAILED_PRECONDITION,"QuerySnapshot.toJSON() attempted to serialize a document with pending writes. Await waitForPendingWrites() before invoking toJSON().");const e={};e.type=Rs._jsonSchemaVersion,e.bundleSource="QuerySnapshot",e.bundleName=Mc.newId(),this._firestore._databaseId.database,this._firestore._databaseId.projectId;const t=[],r=[],i=[];return this.docs.forEach(s=>{s._document!==null&&(t.push(s._document),r.push(this._userDataWriter.convertObjectMap(s._document.data.value.mapValue.fields,"previous")),i.push(s.ref.path))}),e.bundle=(this._firestore,this.query._query,e.bundleName,"NOT SUPPORTED"),e}}function SS(n){switch(n){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return de(61501,{type:n})}}/** 1661 * @license 1662 * Copyright 2020 Google LLC 1663 * 1664 * Licensed under the Apache License, Version 2.0 (the "License"); 1665 * you may not use this file except in compliance with the License. 1666 * You may obtain a copy of the License at 1667 * 1668 * http://www.apache.org/licenses/LICENSE-2.0 1669 * 1670 * Unless required by applicable law or agreed to in writing, software 1671 * distributed under the License is distributed on an "AS IS" BASIS, 1672 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1673 * See the License for the specific language governing permissions and 1674 * limitations under the License. 1675 */function uI(n){n=Vl(n,At);const e=Vl(n.firestore,Jy);return wS(TS(e),n._key).then(t=>IS(e,n,t))}Rs._jsonSchemaVersion="firestore/querySnapshot/1.0",Rs._jsonSchema={type:tt("string",Rs._jsonSchemaVersion),bundleSource:tt("string","QuerySnapshot"),bundleName:tt("string"),bundle:tt("string")};class RS extends AS{constructor(e){super(),this.firestore=e}convertBytes(e){return new hn(e)}convertReference(e){const t=this.convertDocumentKey(e,this.firestore._databaseId);return new At(this.firestore,null,t)}}function IS(n,e,t){const r=t.docs.get(e._key),i=new RS(n);return new Lr(n,i,e._key,r,new ws(t.hasPendingWrites,t.fromCache),e.converter)}(function(e,t=!0){(function(i){Oi=i})(G_),$_(new z_("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),u=new Jy(new OP(r.getProvider("auth-internal")),new kP(o,r.getProvider("app-check-internal")),function(c,h){if(!Object.prototype.hasOwnProperty.apply(c.options,["projectId"]))throw new ie(Y.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Fs(c.options.projectId,h)}(o,i),o);return s={useFetchStreams:t,...s},u._setSettings(s),u},"PUBLIC").setMultipleInstances(!0)),lh(Bd,qd,e),lh(Bd,qd,"esm2020")})();const Ql=({label:n,children:e,gridTemplateColumns:t})=>{const{colors:r}=jt();return O.jsxs(w_,{className:DS.root,sx:{gridTemplateColumns:t,gap:2},children:[O.jsx(ge,{align:"right",color:r.textSubtle,fontSize:"inherit",variant:"bodySStrong",children:n}),e]})},DS=Me("GridSection",["root"]),Ff=({work:n})=>{const{colors:e}=jt();return O.jsx(ce,{gap:.5,children:O.jsxs(ge,{color:e.textSubtle,fontSize:"inherit",variant:"bodyS",children:[O.jsx(ge,{color:e.textBold,component:"span",fontSize:"inherit",variant:"bodySStrong",children:n.jobTitle}),O.jsx(ge,{color:e.textSubtle,component:"span",fontSize:"inherit",variant:"bodyS",children:` at ${n.company||""} • `}),O.jsx(ge,{color:e.textSubtle,component:"span",fontSize:"inherit",variant:"bodyS",children:Hg(n.startDate,n.endDate)})]})})},lI=({workHistory:n,gridTemplateColumns:e})=>{const t=W.useMemo(()=>
1675{if(!n)return null;const s=n;return Array.isArray(s)?s:(console.error("** workHistory is not an array",n),null)},[n]);if(!t||t.length===0)return null;const r=t[0],i=t.slice(1,5);return O.jsxs(O.Fragment,{children:[O.jsx(Ql,{gridTemplateColumns:e,label:"Current Work",children:O.jsx(Ff,{work:r})}),i.length>0&&O.jsx(Ql,{gridTemplateColumns:e,label:"Past Work",children:O.jsx(ce,{className:OS.rows,gap:2,children:i.map((s,o)=>O.jsx(Ff,{work:s},`${s.jobTitle}-${String(o)}`))})})]})},OS=Me("WorkHistory",["rows"]),VS=({education:n})=>{const{colors:e}=jt(),t=W.useMemo(()=>!n.degree&&!n.subject?"":n.degree?n.subject?`${n.degree} in ${n.subject}`:n.degree:n.subject,[n]),r=Hg(n.startDate,n.endDate);return n.institution==="other"&&n.degree==="other"?null:O.jsx(ce,{gap:.5,children:O.jsxs(ge,{color:e.textSubtle,variant:"bodyS",children:[O.jsx(ge,{color:e.textBold,component:"span",variant:"bodySStrong",children:t}),n.institution&&O.jsx(ge,{color:e.textSubtle,component:"span",variant:"bodyS",children:t?` at ${n.institution||""}`:n.institution}),n.institution&&r&&O.jsx(ge,{color:e.textSubtle,component:"span",variant:"bodyS",children:" • "}),r&&O.jsx(ge,{color:e.textSubtle,component:"span",variant:"bodyS",children:r})]})})},cI=({educationHistory:n,gridTemplateColumns:e})=>{const t=W.useMemo(()=>n?Array.isArray(n)?n:(console.error("** educationHistory is not an array",n),null):null,[n]);if(!t||t.length===0)return null;const r=t.slice(0,3);return O.jsx(Ql,{gridTemplateColumns:e,label:"Degrees",children:O.jsx(ce,{className:MS.rows,gap:2,children:r.map((i,s)=>O.jsx(VS,{education:i},`educ_${String(s)}`))})})},MS=Me("EducationHistory",["rows"]),kS=n=>{const e=(n.fullName??"").split(" ")[0],t=W.useMemo(()=>n.fullName?n.fullName.charAt(0).toUpperCase():"ø",[n.fullName]),r=[n.city,n.state].filter(Boolean).join(", ");return{name:e,initials:t,location:r}},hI=({candidate:n,tools:e,sx:t,...r})=>{const{colors:i}=jt(),{name:s,initials:o,location:u}=kS(n),l=W.useMemo(()=>{switch(s.toLowerCase()){case"dhruv":return zC;case"ghezal":return WC;case"justin":return KC;case"katherine":return GC;case"loi":return YC;case"mariah":return QC;case"steven":return ZC;case"taylor":return eP;case"vaughan":return tP;default:return null}},[s]);return O.jsxs(Se,{...r,className:Wu.root,sx:{gap:2,display:"grid",gridTemplateColumns:"160px 1fr",...t},children:[O.jsx(ce,{className:Wu.avatar,sx:{mr:.5,width:80,height:80,alignItems:"center",justifyContent:"center",justifySelf:"flex-end",backgroundColor:i.bgSecondary,borderRadius:"50%","& img":{width:"100%",height:"auto"}},children:l?O.jsx("img",{alt:s,src:l}):O.jsx(ge,{variant:"h3",children:o})}),O.jsx(ce,{gap:1,children:O.jsxs(ce,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[O.jsxs(ce,{children:[O.jsx(ge,{className:Wu.name,variant:"h3",children:s}),O.jsx(ge,{color:i.textSubtle,variant:"bodyS",children:u})]}),e]})})]})},Wu=Me("CandidateHeaderView",["root","avatar","name"]);Me("FindPerfectCandidate",["content","profileCard","cardDeck","cardContainer","arrow"]);const dI=Me("PlansSection",["root","plansHeader","plansContainer","campaignContainer","campaignDescriptions"]);Me("SearchHowYouWant",["image","bullets"]);const fI=Me("TestimonialsSection",["image","logo","container"]),pI=Me("HowItWorks",["root","header","steps","stepRow","textCol","visualCol"]),mI=Me("AiMatching",["root","contentRow","card","textCol"]),gI=Me("ProjectSection",["root","leftCol","rightCol","featureList","projectCard"]),Ku=[{key:"free",title:"Free",badge:"Personal"},{key:"explore",title:"Explore",badge:"Personal"},{key:"scale",title:"Scale",badge:"Team",badgeExtra:"Most Popular"}],NS=(n="year")=>[{name:"WORKPLACE",rows:[{label:"Team size",free:"1",explore:"1",scale:["Unlimited",uP(n)]},{label:"Active projects",free:"Unlimited",explore:"Unlimited",scale:"Unlimited"},{label:"Team Collaboration",free:!1,explore:!1,scale:!0},{label:"Admin tools",free:!1,explore:!1,scale:!0},{label:"View only team members",free:!1,explore:!1,scale:!0}]},{name:"SEARCH",rows:[{label:"Searches",free:"Unlimited",explore:"Unlimited",scale:"Unlimited"},{label:"NLP, Job Description and Manual Filter Searching",free:!0,explore:!0,scale:!0}]},{name:"PROFILE DATA",rows:[{label:"Profile views",free:"1,000/month",explore:"Unlimited",scale:"Unlimited"},{label:"AI criteria matching",free:!0,explore:!0,scale:!0},{label:"Profile quality signal",free:!1,explore:!0,scale:!0},{label:"Resume Views",free:!0,explore:!0,scale:!0},{label:"Resume Download",free:!1,explore:!0,scale:!0}]},{name:"CONTACT DATA",rows:[{label:zg,free:`${nP}/month`,explore:"500/month",scale:"1,200/user/month"}]},{name:"EXPORT & ATS",rows:[{label:"Bulk contact & resume exporting",free:!1,explore:!0,scale:!0},{label:iP,free:!1,explore:!1,scale:!0}]},{name:"SUPPORT",rows:[{label:"Email support",free:!0,explore:!0,scale:!0},{label:"Priority support",free:!1,explore:!0,scale:!0}]}],LS=({color:n})=>O.jsx("svg",{fill:"none",height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",children:O.jsx("path",{d:"M13.3337 4L6.00033 11.3333L2.66699 8",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),jf=({value:n,colors:e})=>n===!0?O.jsx(LS,{color:e.iconSuccess}):n===!1?O.jsx(ge,{sx:{color:e.textDisabled},variant:"bodyS",children:"—"}):Array.isArray(n)?O.jsxs(ce,{sx:{alignItems:"center"},children:[O.jsx(ge,{sx:{color:e.textBold,textAlign:"center"},variant:"bodyS",children:n[0]}),O.jsx(ge,{sx:{color:e.textBold,textAlign:"center",fontSize:12},children:n[1]})]}):O.jsx(ge,{sx:{color:e.textBold,textAlign:"center"},variant:"bodyS",children:n}),Gu=72,Yu=43,Uf=({label:n,variant:e,colors:t})=>O.jsx(Se,{sx:{backgroundColor:e==="Personal"?t.bgAccentOrangeSubtler:t.bgAccentBlueSkySubtler,borderStyle:"solid",borderWidth:"1px",borderColor:e==="Personal"?t.borderAccentOrange:t.borderAccentBlueSky,borderRadius:100,px:1,py:0,display:"inline-flex",alignItems:"center",justifyContent:"center",height:24},children:O.jsx(ge,{sx:{fontSize:12,fontWeight:600,lineHeight:1.5,color:t.textBold},children:n})}),ti=({color:n})=>O.jsx(Se,{sx:{height:"1px",width:"100%",backgroundColor:n,flexShrink:0}}),Bf=({colors:n,grow:e,label:t})=>{const r=t===zg;return O.jsxs(ce,{sx:{minWidth:0,...e?{flex:1}:{}},children:[O.jsx(ge,{sx:{color:n.textBold,whiteSpace:"normal",textAlign:"left"},variant:"bodyS",children:t}),r&&O.jsx(ge,{sx:{color:n.textBrand,fontSize:14,lineHeight:1.3,textAlign:"left"},children:rP})]})},yI=W.forwardRef(function({billingInterval:e="year",onScrollTo:t},r){const{colors:i}=jt(),[s,o]=W.useState("free"),u=Ku.find(h=>h.key===s),l=s==="scale",c=NS(e);return O.jsxs(ce,{id:sP,ref:r,sx:{position:"relative",alignItems:"center",backgroundColor:i.bgSecondarySubtlest,gap:5,overflow:"hidden",py:{xs:6,md:4.5},px:{xs:3,md:15}},children:[O.jsx(Se,{sx:{position:"absolute",width:500,height:500,borderRadius:"50%",backgroundColor:i.bgSecondaryActive,opacity:.5,filter:"blur(341px)",left:-130,top:256}}),O.jsx(Se,{sx:{position:"absolute",width:450,height:450,borderRadius:"50%",backgroundColor:i.bgSecondaryActive,opacity:.5,filter:"blur(341px)",right:-130,top:286}}),O.jsx(Se,{sx:{position:"absolute",width:400,height:400,borderRadius:"50%",backgroundColor:i.bgSecondaryActive,opacity:.5,filter:"blur(341px)",right:-100,bottom:-100}}),O.jsxs(ce,{sx:{alignItems:"center",gap:1,zIndex:1},children:[O.jsx(ge,{sx:{color:i.textBold,fontWeight:700},variant:"h2",children:"Compare Plans"}),O.jsx(ge,{sx:{textAlign:"center",maxWidth:826},variant:"bodyM",children:"There really is a plan for every need. Compare to choose a plan."})]}),O.jsxs(Se,{sx:{display:{xs:"none",md:"flex"},gap:2,width:"100%",zIndex:1,alignItems:"flex-end"},children:[O.jsxs(ce,{sx:{flex:1,borderRadius:2,backgroundColor:i.bgPrimaryTheSubtlest,border:`1px solid ${i.borderGraySubtler}`,overflow:"hidden",px:2},children:[O.jsx(ti,{color:i.borderGraySubtler}),c.map(h=>O.jsxs(Se,{children:[O.jsx(ce,{sx:{height:Yu,justifyContent:"center",py:1.75},children:O.jsx(ge,{sx:{fontSize:11,fontWeight:700,letterSpacing:1,color:i.textSubtle},children:h.name})}),h.rows.map(p=>O.jsxs(Se,{children:[O.jsx(ce,{sx:{height:Gu,justifyContent:"center",py:1.75},children:O.jsx(Bf,{colors:i,label:p.label})}),O.jsx(ti,{color:i.borderGraySubtlest})]},p.label))]},h.name))]}),Ku.map(h=>{const p=h.key==="scale";return O.jsxs(ce,{sx:{flex:1,borderRadius:2,backgroundColor:i.bgSurface,border:p?`2px solid ${i.borderAccentBlueSky}`:`1px solid ${i.borderGraySubtler}`,overflow:"hidden",...p&&{boxShadow:"0px 4px 20px 0px rgba(81, 139, 166, 0.19)"}}
1675,children:[O.jsxs(ce,{sx:{gap:1,alignItems:"center",py:0,px:0},children:[O.jsx(Se,{sx:{height:p?8:6,width:"100%",backgroundColor:p?i.borderSecondary:i.borderPrimary}}),O.jsxs(ce,{sx:{alignItems:"center",gap:1,pb:2},children:[p&&h.badgeExtra&&O.jsx(Se,{sx:{backgroundColor:i.bgAccentBlueGreenSubtler,borderStyle:"solid",borderWidth:"1px",borderColor:i.borderAccentBlueGreen,borderRadius:100,px:1,height:24,display:"inline-flex",alignItems:"center"},children:O.jsx(ge,{sx:{fontSize:12,fontWeight:600,color:i.textBold},children:h.badgeExtra})}),O.jsx(Uf,{colors:i,label:h.badge,variant:h.badge}),O.jsx(ge,{sx:{fontWeight:600,color:i.textBold},variant:"bodyM",children:h.title})]})]}),O.jsx(ti,{color:i.borderGraySubtler}),c.map(g=>O.jsxs(Se,{children:[O.jsx(Se,{sx:{height:Yu}}),g.rows.map(v=>O.jsxs(Se,{children:[O.jsx(ce,{sx:{height:Gu,alignItems:"center",justifyContent:"center",py:1.75},children:O.jsx(jf,{colors:i,value:v[h.key]})}),O.jsx(ti,{color:i.borderGraySubtlest})]},v.label))]},g.name))]},h.key)})]}),O.jsxs(ce,{sx:{display:{xs:"flex",md:"none"},width:"100%",gap:3,zIndex:1},children:[O.jsx(ce,{role:"tablist",sx:{flexDirection:"row",borderRadius:2,border:`1px solid ${i.borderSecondary}`,overflow:"hidden",height:40,p:.25},children:Ku.map(h=>O.jsx(Jl,{"aria-selected":s===h.key,onClick:()=>o(h.key),role:"tab",sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1.5,backgroundColor:s===h.key?i.bgSecondaryHover:"transparent",transition:"background-color 0.2s"},children:O.jsx(ge,{sx:{fontSize:14,fontWeight:s===h.key?600:400,color:s===h.key?i.bgSurface:i.textBold},children:h.title})},h.key))}),O.jsxs(ce,{sx:{borderRadius:2,backgroundColor:i.bgSurface,border:`1px solid ${i.borderGraySubtler}`,overflow:"hidden",px:2,pb:1.5},children:[O.jsx(Se,{sx:{height:l?8:6,backgroundColor:l?i.borderSecondary:i.borderPrimary,mx:-2}}),O.jsxs(ce,{sx:{alignItems:"center",gap:1,pt:1,pb:2},children:[u.badgeExtra&&O.jsx(Se,{sx:{backgroundColor:i.bgAccentBlueGreenSubtler,borderStyle:"solid",borderWidth:"1px",borderColor:i.borderAccentBlueGreen,borderRadius:100,px:1,height:24,display:"inline-flex",alignItems:"center"},children:O.jsx(ge,{sx:{fontSize:12,fontWeight:600,color:i.textBold},children:u.badgeExtra})}),O.jsx(Uf,{colors:i,label:u.badge,variant:u.badge}),O.jsx(ge,{sx:{fontWeight:600,color:i.textBold},variant:"bodyM",children:u.title})]}),c.map((h,p)=>O.jsxs(Se,{children:[O.jsx(ce,{sx:{height:Yu,justifyContent:"center",py:1.75},children:O.jsx(ge,{sx:{fontSize:11,fontWeight:700,letterSpacing:1,color:i.textSubtle},children:h.name})}),h.rows.map((g,v)=>O.jsxs(Se,{children:[O.jsxs(ce,{sx:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",minHeight:Gu,py:1.75,gap:2},children:[O.jsx(Bf,{colors:i,grow:!0,label:g.label}),O.jsx(jf,{colors:i,value:g[s]})]}),v<h.rows.length-1&&O.jsx(ti,{color:i.borderGraySubtlest})]},g.label)),p<c.length-1&&O.jsx(ti,{color:i.borderGraySubtlest})]},h.name))]})]}),O.jsx(ce,{sx:{flexDirection:{xs:"column",sm:"row"},gap:1,alignItems:"center",zIndex:1},children:O.jsx(Sc,{onClick:t,sx:{borderColor:i.borderSecondary,color:i.textBold,borderRadius:2,textTransform:"none",fontWeight:600,px:4,width:{xs:"100%",sm:251},"&:hover":{borderColor:i.borderSecondary,backgroundColor:"rgba(81, 139, 166, 0.04)"}},variant:"outlined",children:"Book a Demo"})})]})});var Kn={};const se=Hp(sv);var Ro={},Io={},Qu={exports:{}},qf;function FS(){return qf||(qf=1,function(n){(function(e,t){n.exports?n.exports=t():e.log=t()})($p,function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},o=null;function u(A,D){var M=A[D];if(typeof M.bind=="function")return M.bind(A);try{return Function.prototype.bind.call(M,A)}catch{return function(){return Function.prototype.apply.apply(M,[A,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(A){return A==="debug"&&(A="log"),typeof console===t?!1:A==="trace"&&r?l:console[A]!==void 0?u(console,A):console.log!==void 0?u(console,"log"):e}function h(){for(var A=this.getLevel(),D=0;D<i.length;D++){var M=i[D];this[M]=D<A?e:this.methodFactory(M,A,this.name)}if(this.log=this.debug,typeof console===t&&A<this.levels.SILENT)return"No console available for logging"}function p(A){return function(){typeof console!==t&&(h.call(this),this[A].apply(this,arguments))}}function g(A,D,M){return c(A)||p.apply(this,arguments)}function v(A,D){var M=this,U,B,q,H="loglevel";
1675typeof A=="string"?H+=":"+A:typeof A=="symbol"&&(H=void 0);function K(S){var V=(i[S]||"silent").toUpperCase();if(!(typeof window===t||!H)){try{window.localStorage[H]=V;return}catch{}try{window.document.cookie=encodeURIComponent(H)+"="+V+";"}catch{}}}function x(){var S;if(!(typeof window===t||!H)){try{S=window.localStorage[H]}catch{}if(typeof S===t)try{var V=window.document.cookie,C=encodeURIComponent(H),Pe=V.indexOf(C+"=");Pe!==-1&&(S=/^([^;]+)/.exec(V.slice(Pe+C.length+1))[1])}catch{}return M.levels[S]===void 0&&(S=void 0),S}}function b(){if(!(typeof window===t||!H)){try{window.localStorage.removeItem(H)}catch{}try{window.document.cookie=encodeURIComponent(H)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function E(S){var V=S;if(typeof V=="string"&&M.levels[V.toUpperCase()]!==void 0&&(V=M.levels[V.toUpperCase()]),typeof V=="number"&&V>=0&&V<=M.levels.SILENT)return V;throw new TypeError("log.setLevel() called with invalid level: "+S)}M.name=A,M.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},M.methodFactory=D||g,M.getLevel=function(){return q??B??U},M.setLevel=function(S,V){return q=E(S),V!==!1&&K(q),h.call(M)},M.setDefaultLevel=function(S){B=E(S),x()||M.setLevel(S,!1)},M.resetLevel=function(){q=null,b(),h.call(M)},M.enableAll=function(S){M.setLevel(M.levels.TRACE,S)},M.disableAll=function(S){M.setLevel(M.levels.SILENT,S)},M.rebuild=function(){if(o!==M&&(U=E(o.getLevel())),h.call(M),o===M)for(var S in s)s[S].rebuild()},U=E(o?o.getLevel():"WARN");var I=x();I!=null&&(q=E(I)),h.call(M)}o=new v,o.getLogger=function(D){if(typeof D!="symbol"&&typeof D!="string"||D==="")throw new TypeError("You must supply a name when creating a logger.");var M=s[D];return M||(M=s[D]=new v(D,o.methodFactory)),M};var P=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=P),o},o.getLoggers=function(){return s},o.default=o,o})}(Qu)),Qu.exports}var ke={},Do={},Oo={},Hf;function Xt(){if(Hf)return Oo;Hf=1,Object.defineProperty(Oo,"__esModule",{value:!0});var n=se,e=function(t){n.__extends(r,t);function r(i,s,o){var u=this.constructor,l=t.call(this,i)||this;return l.name=u.name,l.httpBody=s,l.httpStatus=o,Object.setPrototypeOf(l,u.prototype),l}return r}(Error);return Oo.default=e,Oo}var $f;function jS(){if($f)return Do;$f=1,Object.defineProperty(Do,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return Do.default=t,Do}var Vo={},zf;function US(){if(zf)return Vo;zf=1,Object.defineProperty(Vo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return Vo.default=t,Vo}var Mo={},Wf;function BS(){if(Wf)return Mo;Wf=1,Object.defineProperty(Mo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return Mo.default=t,Mo}var ko={},Kf;function qS(){if(Kf)return ko;Kf=1,Object.defineProperty(ko,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return ko.default=t,ko}var No={},Gf;function HS(){if(Gf)return No;Gf=1,Object.defineProperty(No,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return No.default=t,No}var Lo={},Yf;function $S(){if(Yf)return Lo;Yf=1,Object.defineProperty(Lo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return Lo.default=t,Lo}var Fo={},Qf;function zS(){if(Qf)return Fo;Qf=1,Object.defineProperty(Fo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return Fo.default=t,Fo}var jo={},Xf;function WS(){if(Xf)return jo;Xf=1,Object.defineProperty(jo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i}(e.default);return jo.default=t,jo}var Uo={},Jf;function KS(){if(Jf)return Uo;Jf=1,Object.defineProperty(Uo,"__esModule",{value:!0});var n=se,e=n.__importDefault(Xt()),t=function(r){n.__extends(i,r);function i(s,o,u){var l=r.call(this,s)||this;return l.importResults=o,l.payload=u,l}return i}(e.default);return Uo.default=t,Uo}var Zf;function Zs(){if(Zf)return ke;
1675Zf=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.ImportError=ke.TypesenseError=ke.ServerError=ke.RequestUnauthorized=ke.RequestMalformed=ke.ObjectUnprocessable=ke.ObjectNotFound=ke.ObjectAlreadyExists=ke.MissingConfigurationError=ke.HTTPError=void 0;var n=se,e=n.__importDefault(jS());ke.HTTPError=e.default;var t=n.__importDefault(US());ke.MissingConfigurationError=t.default;var r=n.__importDefault(BS());ke.ObjectAlreadyExists=r.default;var i=n.__importDefault(qS());ke.ObjectNotFound=i.default;var s=n.__importDefault(HS());ke.ObjectUnprocessable=s.default;var o=n.__importDefault($S());ke.RequestMalformed=o.default;var u=n.__importDefault(zS());ke.RequestUnauthorized=u.default;var l=n.__importDefault(WS());ke.ServerError=l.default;var c=n.__importDefault(KS());ke.ImportError=c.default;var h=n.__importDefault(Xt());return ke.TypesenseError=h.default,ke}var ep;function n_(){if(ep)return Io;ep=1,Object.defineProperty(Io,"__esModule",{value:!0});var n=se,e=n.__importStar(FS()),t=Zs(),r=function(){function i(s){var o=this;this.nodes=s.nodes||[],this.nodes=this.nodes.map(function(u){return o.setDefaultPathInNode(u)}).map(function(u){return o.setDefaultPortInNode(u)}).map(function(u){return n.__assign({},u)}),s.randomizeNodes==null&&(s.randomizeNodes=!0),s.randomizeNodes===!0&&this.shuffleArray(this.nodes),this.nearestNode=s.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=s.connectionTimeoutSeconds||s.timeoutSeconds||5,this.healthcheckIntervalSeconds=s.healthcheckIntervalSeconds||60,this.numRetries=(s.numRetries!==void 0&&s.numRetries>=0?s.numRetries:this.nodes.length+(this.nearestNode==null?0:1))||3,this.retryIntervalSeconds=s.retryIntervalSeconds||.1,this.apiKey=s.apiKey,this.sendApiKeyAsQueryParam=s.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=s.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=s.useServerSideSearchCache||!1,this.axiosAdapter=s.axiosAdapter,this.logger=s.logger||e,this.logLevel=s.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=s.additionalHeaders,this.httpAgent=s.httpAgent,this.httpsAgent=s.httpsAgent,this.paramsSerializer=s.paramsSerializer,this.showDeprecationWarnings(s),this.validate()}return i.prototype.validate=function(){if(this.nodes==null||this.nodes.length===0||this.validateNodes())throw new t.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(this.nearestNode!=null&&this.isNodeMissingAnyParameters(this.nearestNode))throw new t.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(this.apiKey==null)throw new t.MissingConfigurationError("Ensure that apiKey is set");return!0},i.prototype.validateNodes=function(){var s=this;return this.nodes.some(function(o){return s.isNodeMissingAnyParameters(o)})},i.prototype.isNodeMissingAnyParameters=function(s){return!["protocol","host","port","path"].every(function(o){return s.hasOwnProperty(o)})&&s.url==null},i.prototype.setDefaultPathInNode=function(s){return s!=null&&!s.hasOwnProperty("path")&&(s.path=""),s},i.prototype.setDefaultPortInNode=function(s){if(s!=null&&!s.hasOwnProperty("port")&&s.hasOwnProperty("protocol"))switch(s.protocol){case"https":s.port=443;break;case"http":s.port=80;break}return s},i.prototype.showDeprecationWarnings=function(s){s.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),s.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),s.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},i.prototype.shuffleArray=function(s){for(var o,u=s.length-1;u>0;u--){var l=Math.floor(Math.random()*(u+1));o=[s[l],s[u]],s[u]=o[0],s[l]=o[1]}},i}();return Io.default=r,Io}var Bo={},Xu,tp;function GS(){if(tp)return Xu;tp=1;function n(m,y){return function(){return m.apply(y,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(m=>y=>{const w=e.call(y);return m[w]||(m[w]=w.slice(8,-1).toLowerCase())})(Object.create(null)),i=m=>(m=m.toLowerCase(),y=>r(y)===m),s=m=>y=>typeof y===m,{isArray:o}=Array,u=s("undefined");function l(m){return m!==null&&!u(m)&&m.constructor!==null&&!u(m.constructor)&&g(m.constructor.isBuffer)&&m.constructor.isBuffer(m)}const c=i("ArrayBuffer");function h(m){let y;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?y=ArrayBuffer.isView(m):y=m&&m.buffer&&c(m.buffer),y}const p=s("string"),g=s("function"),v=s("number"),P=m=>m!==null&&typeof m=="object",A=m=>m===!0||m===!1,D=m=>{if(r(m)!=="object")return!1;const y=t(m);
1675return(y===null||y===Object.prototype||Object.getPrototypeOf(y)===null)&&!(Symbol.toStringTag in m)&&!(Symbol.iterator in m)},M=i("Date"),U=i("File"),B=i("Blob"),q=i("FileList"),H=m=>P(m)&&g(m.pipe),K=m=>{let y;return m&&(typeof FormData=="function"&&m instanceof FormData||g(m.append)&&((y=r(m))==="formdata"||y==="object"&&g(m.toString)&&m.toString()==="[object FormData]"))},x=i("URLSearchParams"),[b,E,I,S]=["ReadableStream","Request","Response","Headers"].map(i),V=m=>m.trim?m.trim():m.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function C(m,y,{allOwnKeys:w=!1}={}){if(m===null||typeof m>"u")return;let T,R;if(typeof m!="object"&&(m=[m]),o(m))for(T=0,R=m.length;T<R;T++)y.call(null,m[T],T,m);else{const k=w?Object.getOwnPropertyNames(m):Object.keys(m),L=k.length;let z;for(T=0;T<L;T++)z=k[T],y.call(null,m[z],z,m)}}function Pe(m,y){y=y.toLowerCase();const w=Object.keys(m);let T=w.length,R;for(;T-- >0;)if(R=w[T],y===R.toLowerCase())return R;return null}const Re=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:$p,Jt=m=>!u(m)&&m!==Re;function fe(){const{caseless:m}=Jt(this)&&this||{},y={},w=(T,R)=>{const k=m&&Pe(y,R)||R;D(y[k])&&D(T)?y[k]=fe(y[k],T):D(T)?y[k]=fe({},T):o(T)?y[k]=T.slice():y[k]=T};for(let T=0,R=arguments.length;T<R;T++)arguments[T]&&C(arguments[T],w);return y}const Ue=(m,y,w,{allOwnKeys:T}={})=>(C(y,(R,k)=>
1675{w&&g(R)?m[k]=n(R,w):m[k]=R},{allOwnKeys:T}),m),it=m=>(m.charCodeAt(0)===65279&&(m=m.slice(1)),m),Dt=(m,y,w,T)=>{m.prototype=Object.create(y.prototype,T),m.prototype.constructor=m,Object.defineProperty(m,"super",{value:y.prototype}),w&&Object.assign(m.prototype,w)},pe=(m,y,w,T)=>{let R,k,L;const z={};if(y=y||{},m==null)return y;do{for(R=Object.getOwnPropertyNames(m),k=R.length;k-- >0;)L=R[k],(!T||T(L,m,y))&&!z[L]&&(y[L]=m[L],z[L]=!0);m=w!==!1&&t(m)}while(m&&(!w||w(m,y))&&m!==Object.prototype);return y},yn=(m,y,w)=>{m=String(m),(w===void 0||w>m.length)&&(w=m.length),w-=y.length;const T=m.indexOf(y,w);return T!==-1&&T===w},xn=m=>{if(!m)return null;if(o(m))return m;let y=m.length;if(!v(y))return null;const w=new Array(y);for(;y-- >0;)w[y]=m[y];return w},zt=(m=>y=>m&&y instanceof m)(typeof Uint8Array<"u"&&t(Uint8Array)),An=(m,y)=>{const T=(m&&m[Symbol.iterator]).call(m);let R;for(;(R=T.next())&&!R.done;){const k=R.value;y.call(m,k[0],k[1])}},Ot=(m,y)=>{let w;const T=[];for(;(w=m.exec(y))!==null;)T.push(w);return T},Wt=i("HTMLFormElement"),Be=m=>m.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(w,T,R){return T.toUpperCase()+R}),Sn=(({hasOwnProperty:m})=>(y,w)=>m.call(y,w))(Object.prototype),or=i("RegExp"),ft=(m,y)=>{const w=Object.getOwnPropertyDescriptors(m),T={};C(w,(R,k)=>{let L;(L=y(R,k,m))!==!1&&(T[k]=L||R)}),Object.defineProperties(m,T)},Vt=m=>{ft(m,(y,w)=>{if(g(m)&&["arguments","caller","callee"].indexOf(w)!==-1)return!1;const T=m[w];if(g(T)){if(y.enumerable=!1,"writable"in y){y.writable=!1;return}y.set||(y.set=()=>{throw Error("Can not rewrite read-only method '"+w+"'")})}})},Ut=(m,y)=>{const w={},T=R=>{R.forEach(k=>{w[k]=!0})};return o(m)?T(m):T(String(m).split(y)),w},Zt=()=>{},ar=(m,y)=>m!=null&&Number.isFinite(m=+m)?m:y,en="abcdefghijklmnopqrstuvwxyz",Br="0123456789",ki={DIGIT:Br,ALPHA:en,ALPHA_DIGIT:en+en.toUpperCase()+Br},lt=(m=16,y=ki.ALPHA_DIGIT)=>{let w="";const{length:T}=y;for(;m--;)w+=y[Math.random()*T|0];return w};function pt(m){return!!(m&&g(m.append)&&m[Symbol.toStringTag]==="FormData"&&m[Symbol.iterator])}const qr=m=>{const y=new Array(10),w=(T,R)=>{if(P(T)){if(y.indexOf(T)>=0)return;if(!("toJSON"in T)){y[R]=T;const k=o(T)?[]:{};return C(T,(L,z)=>{const te=w(L,R+1);!u(te)&&(k[z]=te)}),y[R]=void 0,k}}return T};return w(m,0)},lu=i("AsyncFunction"),eo=m=>m&&(P(m)||g(m))&&g(m.then)&&g(m.catch),to=((m,y)=>m?setImmediate:y?((w,T)=>(Re.addEventListener("message",({source:R,data:k})=>{R===Re&&k===w&&T.length&&T.shift()()},!1),R=>{T.push(R),Re.postMessage(w,"*")}))(`axios@${Math.random()}`,[]):w=>setTimeout(w))(typeof setImmediate=="function",g(Re.postMessage)),ur=typeof queueMicrotask<"u"?queueMicrotask.bind(Re):typeof process<"u"&&process.nextTick||to;var j={isArray:o,isArrayBuffer:c,isBuffer:l,isFormData:K,isArrayBufferView:h,isString:p,isNumber:v,isBoolean:A,isObject:P,isPlainObject:D,isReadableStream:b,isRequest:E,isResponse:I,isHeaders:S,isUndefined:u,isDate:M,isFile:U,isBlob:B,isRegExp:or,isFunction:g,isStream:H,isURLSearchParams:x,isTypedArray:zt,isFileList:q,forEach:C,merge:fe,extend:Ue,trim:V,stripBOM:it,inherits:Dt,toFlatObject:pe,kindOf:r,kindOfTest:i,endsWith:yn,toArray:xn,forEachEntry:An,matchAll:Ot,isHTMLForm:Wt,hasOwnProperty:Sn,hasOwnProp:Sn,reduceDescriptors:ft,freezeMethods:Vt,toObjectSet:Ut,toCamelCase:Be,noop:Zt,toFiniteNumber:ar,findKey:Pe,global:Re,isContextDefined:Jt,ALPHABET:ki,generateString:lt,isSpecCompliantForm:pt,toJSONObject:qr,isAsyncFn:lu,isThenable:eo,setImmediate:to,asap:ur};function ue(m,y,w,T,R){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=m,this.name="AxiosError",y&&(this.code=y),w&&(this.config=w),T&&(this.request=T),R&&(this.response=R,this.status=R.status?R.status:null)}j.inherits(ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Hr=ue.prototype,no={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","E
1675RR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(m=>{no[m]={value:m}}),Object.defineProperties(ue,no),Object.defineProperty(Hr,"isAxiosError",{value:!0}),ue.from=(m,y,w,T,R,k)=>{const L=Object.create(Hr);return j.toFlatObject(m,L,function(te){return te!==Error.prototype},z=>z!=="isAxiosError"),ue.call(L,m.message,y,w,T,R),L.cause=m,L.name=m.name,k&&Object.assign(L,k),L};var cu=null;function $r(m){return j.isPlainObject(m)||j.isArray(m)}function Ni(m){return j.endsWith(m,"[]")?m.slice(0,-2):m}function Rn(m,y,w){return m?m.concat(y).map(function(R,k){return R=Ni(R),!w&&k?"["+R+"]":R}).join(w?".":""):y}function Li(m){return j.isArray(m)&&!m.some($r)}const Fi=j.toFlatObject(j,{},null,function(y){return/^is[A-Z]/.test(y)});function Bt(m,y,w){if(!j.isObject(m))throw new TypeError("target must be an object");y=y||new FormData,w=j.toFlatObject(w,{metaTokens:!0,dots:!1,indexes:!1},!1,function(le,Z){return!j.isUndefined(Z[le])});const T=w.metaTokens,R=w.visitor||G,k=w.dots,L=w.indexes,te=(w.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(y);if(!j.isFunction(R))throw new TypeError("visitor must be a function");function Q(re){if(re===null)return"";if(j.isDate(re))return re.toISOString();if(!te&&j.isBlob(re))throw new ue("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(re)||j.isTypedArray(re)?te&&typeof Blob=="function"?new Blob([re]):Buffer.from(re):re}function G(re,le,Z){let Oe=re;if(re&&!Z&&typeof re=="object"){if(j.endsWith(le,"{}"))le=T?le:le.slice(0,-2),re=JSON.stringify(re);else if(j.isArray(re)&&Li(re)||(j.isFileList(re)||j.endsWith(le,"[]"))&&(Oe=j.toArray(re)))return le=Ni(le),Oe.forEach(function(De,a){!(j.isUndefined(De)||De===null)&&y.append(L===!0?Rn([le],a,k):L===null?le:le+"[]",Q(De))}),!1}return $r(re)?!0:(y.append(Rn(Z,le,k),Q(re)),!1)}const ne=[],Ee=Object.assign(Fi,{defaultVisitor:G,convertValue:Q,isVisitable:$r});function $e(re,le){if(!j.isUndefined(re)){if(ne.indexOf(re)!==-1)throw Error("Circular reference detected in "+le.join("."));ne.push(re),j.forEach(re,function(Oe,ze){(!(j.isUndefined(Oe)||Oe===null)&&R.call(y,Oe,j.isString(ze)?ze.trim():ze,le,Ee))===!0&&$e(Oe,le?le.concat(ze):[ze])}),ne.pop()}}if(!j.isObject(m))throw new TypeError("data must be an object");return $e(m),y}function ji(m){const y={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(m).replace(/[!'()~]|%20|%00/g,function(T){return y[T]})}function In(m,y){this._pairs=[],m&&Bt(m,this,y)}const Ui=In.prototype;Ui.append=function(y,w){this._pairs.push([y,w])},Ui.toString=function(y){const w=y?function(T){return y.call(this,T,ji)}:ji;return this._pairs.map(function(R){return w(R[0])+"="+w(R[1])},"").join("&")};function lr(m){return encodeURIComponent(m).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bi(m,y,w){if(!y)return m;const T=w&&w.encode||lr;j.isFunction(w)&&(w={serialize:w});const R=w&&w.serialize;let k;if(R?k=R(y,w):k=j.isURLSearchParams(y)?y.toString():new In(y,w).toString(T),k){const L=m.indexOf("#");L!==-1&&(m=m.slice(0,L)),m+=(m.indexOf("?")===-1?"?":"&")+k}return m}class mt{constructor(){this.handlers=[]}use(y,w,T){return this.handlers.push({fulfilled:y,rejected:w,synchronous:T?T.synchronous:!1,runWhen:T?T.runWhen:null}),this.handlers.length-1}eject(y){this.handlers[y]&&(this.handlers[y]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(y){j.forEach(this.handlers,function(T){T!==null&&y(T)})}}var qi=mt,Dn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cr=typeof URLSearchParams<"u"?URLSearchParams:In,hu=typeof FormData<"u"?FormData:null,du=typeof Blob<"u"?Blob:null,On={isBrowser:!0,classes:{URLSearchParams:cr,FormData:hu,Blob:du},protocols:["http","https","file","blob","url","data"]};const Hi=typeof window<"u"&&typeof document<"u",$i=typeof navigator=="object"&&navigator||void 0,zr=Hi&&(!$i||["ReactNative","NativeScript","NS"].indexOf($i.product)<0),ro=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",io=Hi&&window.location.href||"http://localhost";var zi=Object.freeze({__proto__:null,hasBrowserEnv:Hi,hasStandardBrowserWebWorkerEnv:ro,hasStandardBrowserEnv:zr,navigator:$i,origin:io}),qe={...zi,...On};function fu(m,y){return Bt(m,new qe.classes.URLSearchParams,Object.assign({visitor:function(w,T,R,k){return qe.isNode&&j.isBuffer(w)?(this.append(T,w.toString("base64")),!1):k.defaultVisitor.apply(this,arguments)}},y))}function tn(m){return j.matchAll(/\w+|\[(\w*)]/g,m).map(y=>y[0]==="[]"?"":y[1]||y[0])}function so(m){const y={},w=Object.keys(m);let T;const R=w.length;let k;for(T=0;T<R;T++)k=w[T],y[k]=m[k];return y}function Wi(m){function y(w,T,R,k){let L=w[k++];if(L==="__proto__")return!0;const z=Number.isFinite(+L),te=k>=w.length;return L=!L&&j.isArray(R)?R.length:L,te?(j.hasOwnProp(R,L)?R[L]=[R[L],T]:R[L]=T,!z):((!R[L]||!j.isObject(R[L]))&&(R[L]=[]),y(w,T,R[L],k)&&j.isArray(R[L])&&(R[L]=so(R[L])
vendor: 4,194 bytes, lines 1675-1676
1675),!z)}if(j.isFormData(m)&&j.isFunction(m.entries)){const w={};return j.forEachEntry(m,(T,R)=>{y(tn(T),R,w,0)}),w}return null}function Ki(m,y,w){if(j.isString(m))try{return(y||JSON.parse)(m),j.trim(m)}catch(T){if(T.name!=="SyntaxError")throw T}return(0,JSON.stringify)(m)}const hr={transitional:Dn,adapter:["xhr","http","fetch"],transformRequest:[function(y,w){const T=w.getContentType()||"",R=T.indexOf("application/json")>-1,k=j.isObject(y);if(k&&j.isHTMLForm(y)&&(y=new FormData(y)),j.isFormData(y))return R?JSON.stringify(Wi(y)):y;if(j.isArrayBuffer(y)||j.isBuffer(y)||j.isStream(y)||j.isFile(y)||j.isBlob(y)||j.isReadableStream(y))return y;if(j.isArrayBufferView(y))return y.buffer;if(j.isURLSearchParams(y))return w.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),y.toString();let z;if(k){if(T.indexOf("application/x-www-form-urlencoded")>-1)return fu(y,this.formSerializer).toString();if((z=j.isFileList(y))||T.indexOf("multipart/form-data")>-1){const te=this.env&&this.env.FormData;return Bt(z?{"files[]":y}:y,te&&new te,this.formSerializer)}}return k||R?(w.setContentType("application/json",!1),Ki(y)):y}],transformResponse:[function(y){const w=this.transitional||hr.transitional,T=w&&w.forcedJSONParsing,R=this.responseType==="json";if(j.isResponse(y)||j.isReadableStream(y))return y;if(y&&j.isString(y)&&(T&&!this.responseType||R)){const L=!(w&&w.silentJSONParsing)&&R;try{return JSON.parse(y)}catch(z){if(L)throw z.name==="SyntaxError"?ue.from(z,ue.ERR_BAD_RESPONSE,this,null,this.response):z}}return y}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(y){return y>=200&&y<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],m=>{hr.headers[m]={}});var Wr=hr;const pu=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var oo=m=>{const y={};let w,T,R;return m&&m.split(` 1676`).forEach(function(L){R=L.indexOf(":"),w=L.substring(0,R).trim().toLowerCase(),T=L.substring(R+1).trim(),!(!w||y[w]&&pu[w])&&(w==="set-cookie"?y[w]?y[w].push(T):y[w]=[T]:y[w]=y[w]?y[w]+", "+T:T)}),y};const ao=Symbol("internals");function nn(m){return m&&String(m).trim().toLowerCase()}function dr(m){return m===!1||m==null?m:j.isArray(m)?m.map(dr):String(m)}function Gi(m){const y=Object.create(null),w=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let T;for(;T=w.exec(m);)y[T[1]]=T[2];return y}const fr=m=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(m.trim());function Kt(m,y,w,T,R){if(j.isFunction(T))return T.call(this,y,w);if(R&&(y=w),!!j.isString(y)){if(j.isString(T))return y.indexOf(T)!==-1;if(j.isRegExp(T))return T.test(y)}}function Yi(m){return m.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(y,w,T)=>w.toUpperCase()+T)}function mu(m,y){const w=j.toCamelCase(" "+y);["get","set","has"].forEach(T=>{Object.defineProperty(m,T+w,{value:function(R,k,L){return this[T].call(this,y,R,k,L)},configurable:!0})})}class pr{constructor(y){y&&this.set(y)}set(y,w,T){const R=this;function k(z,te,Q){const G=nn(te);if(!G)throw new Error("header name must be a non-empty string");const ne=j.findKey(R,G);(!ne||R[ne]===void 0||Q===!0||Q===void 0&&R[ne]!==!1)&&(R[ne||te]=dr(z))}const L=(z,te)=>j.forEach(z,(Q,G)=>k(Q,G,te));if(j.isPlainObject(y)||y instanceof this.constructor)L(y,w);else if(j.isString(y)&&(y=y.trim())&&!fr(y))L(oo(y),w);else if(j.isHeaders(y))for(const[z,te]of y.entries())k(te,z,T);else y!=null&&k(w,y,T);return this}get(y,w){if(y=nn(y),y){const T=j.findKey(this,y);if(T){const R=this[T];if(!w)return R;if(w===!0)return Gi(R);if(j.isFunction(w))return w.call(this,R,T);if(j.isRegExp(w))return w.exec(R);throw new TypeError("parser must be boolean|regexp|function")}}}has(y,w){if(y=nn(y),y){const T=j.findKey(this,y);return!!(T&&this[T]!==void 0&&(!w||Kt(this,this[T],T,w)))}return!1}delete(y,w){const T=this;let R=!1;function k(L){if(L=nn(L),L){const z=j.findKey(T,L);
1676z&&(!w||Kt(T,T[z],z,w))&&(delete T[z],R=!0)}}return j.isArray(y)?y.forEach(k):k(y),R}clear(y){const w=Object.keys(this);let T=w.length,R=!1;for(;T--;){const k=w[T];(!y||Kt(this,this[k],k,y,!0))&&(delete this[k],R=!0)}return R}normalize(y){const w=this,T={};return j.forEach(this,(R,k)=>{const L=j.findKey(T,k);if(L){w[L]=dr(R),delete w[k];return}const z=y?Yi(k):String(k).trim();z!==k&&delete w[k],w[z]=dr(R),T[z]=!0}),this}concat(...y){return this.constructor.concat(this,...y)}toJSON(y){const w=Object.create(null);return j.forEach(this,(T,R)=>{T!=null&&T!==!1&&(w[R]=y&&j.isArray(T)?T.join(", "):T)}),w}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([y,w])=>y+": "+w).join(` 1677`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(y){return y instanceof this?y:new this(y)}static concat(y,...w){const T=new this(y);return w.forEach(R=>T.set(R)),T}static accessor(y){const T=(this[ao]=this[ao]={accessors:{}}).accessors,R=this.prototype;function k(L){const z=nn(L);T[z]||(mu(R,L),T[z]=!0)}return j.isArray(y)?y.forEach(k):k(y),this}}pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(pr.prototype,({value:m},y)=>{let w=y[0].toUpperCase()+y.slice(1);return{get:()=>m,set(T){this[w]=T}}}),j.freezeMethods(pr);var St=pr;function Kr(m,y){const w=this||Wr,T=y||w,R=St.from(T.headers);let k=T.data;return j.forEach(m,function(z){k=z.call(w,k,R.normalize(),y?y.status:void 0)}),R.normalize(),k}function Gr(m){return!!(m&&m.__CANCEL__)}function rn(m,y,w){ue.call(this,m??"canceled",ue.ERR_CANCELED,y,w),this.name="CanceledError"}j.inherits(rn,ue,{__CANCEL__:!0});function Qi(m,y,w){const T=w.config.validateStatus;!w.status||!T||T(w.status)?m(w):y(new ue("Request failed with status code "+w.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(w.status/100)-4],w.config,w.request,w))}function uo(m){const y=/^([-+\w]{1,25})(:?\/\/|:)/.exec(m);return y&&y[1]||""}function lo(m,y){m=m||10;const w=new Array(m),T=new Array(m);let R=0,k=0,L;return y=y!==void 0?y:1e3,function(te){const Q=Date.now(),G=T[k];L||(L=Q),w[R]=te,T[R]=Q;let ne=k,Ee=0;for(;ne!==R;)Ee+=w[ne++],ne=ne%m;if(R=(R+1)%m,R===k&&(k=(k+1)%m),Q-L<y)return;const $e=G&&Q-G;return $e?Math.round(Ee*1e3/$e):void 0}}function gu(m,y){let w=0,T=1e3/y,R,k;const L=(Q,G=Date.now())=>{w=G,R=null,k&&(clearTimeout(k),k=null),m.apply(null,Q)};return[(...Q)=>{const G=Date.now(),ne=G-w;ne>=T?L(Q,G):(R=Q,k||(k=setTimeout(()=>{k=null,L(R)},T-ne)))},()=>R&&L(R)]}const Mt=(m,y,w=3)=>{let T=0;const R=lo(50,250);return gu(k=>{const L=k.loaded,z=k.lengthComputable?k.total:void 0,te=L-T,Q=R(te),G=L<=z;T=L;const ne={loaded:L,total:z,progress:z?L/z:void 0,bytes:te,rate:Q||void 0,estimated:Q&&z&&G?(z-L)/Q:void 0,event:k,lengthComputable:z!=null,[y?"download":"upload"]:!0};m(ne)},w)},kt=(m,y)=>{const w=m!=null;return[T=>y[0]({lengthComputable:w,total:m,loaded:T}),y[1]]},Vn=m=>(...y)=>j.asap(()=>m(...y));var mr=qe.hasStandardBrowserEnv?((m,y)=>w=>(w=new URL(w,qe.origin),m.protocol===w.protocol&&m.host===w.host&&(y||m.port===w.port)))(new URL(qe.origin),qe.navigator&&/(msie|trident)/i.test(qe.navigator.userAgent)):()=>!0,Xi=qe.hasStandardBrowserEnv?{write(m,y,w,T,R,k){const L=[m+"="+encodeURIComponent(y)];j.isNumber(w)&&L.push("expires="+new Date(w).toGMTString()),j.isString(T)&&L.push("path="+T),j.isString(R)&&L.push("domain="+R),k===!0&&L.push("secure"),document.cookie=L.join("; ")},read(m){const y=document.cookie.match(new RegExp("(^|;\\s*)("+m+")=([^;]*)"));return y?decodeURIComponent(y[3]):null},remove(m){this.write(m,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xe(m){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(m)}function Yr(m,y){return y?m.replace(/\/?\/$/,"")+"/"+y.replace(/^\/+/,""):m}function Mn(m,y){return m&&!xe(y)?Yr(m,y):y}const kn=m=>m instanceof St?{...m}:m;function _n(m,y){y=y||{};const w={};function T(Q,G,ne,Ee){return j.isPlainObject(Q)&&j.isPlainObject(G)?j.merge.call({caseless:Ee},Q,G):j.isPlainObject(G)?j.merge({},G):j.isArray(G)?G.slice():G}function R(Q,G,ne,Ee){if(j.isUndefined(G)){if(!j.isUndefined(Q))return T(void 0,Q,ne,Ee)}else return T(Q,G,ne,Ee)}function k(Q,G){if(!j.isUndefined(G))return T(void 0,G)}function L(Q,G){if(j.isUndefined(G)){if(!j.isUndefined(Q))return T(void 0,Q)}else return T(void 0,G)}function z(Q,G,ne){if(ne in y)return T(Q,G);
1677if(ne in m)return T(void 0,Q)}const te={url:k,method:k,data:k,baseURL:L,transformRequest:L,transformResponse:L,paramsSerializer:L,timeout:L,timeoutMessage:L,withCredentials:L,withXSRFToken:L,adapter:L,responseType:L,xsrfCookieName:L,xsrfHeaderName:L,onUploadProgress:L,onDownloadProgress:L,decompress:L,maxContentLength:L,maxBodyLength:L,beforeRedirect:L,transport:L,httpAgent:L,httpsAgent:L,cancelToken:L,socketPath:L,responseEncoding:L,validateStatus:z,headers:(Q,G,ne)=>R(kn(Q),kn(G),ne,!0)};return j.forEach(Object.keys(Object.assign({},m,y)),function(G){const ne=te[G]||R,Ee=ne(m[G],y[G],G);j.isUndefined(Ee)&&ne!==z||(w[G]=Ee)}),w}var Ji=m=>{const y=_n({},m);let{data:w,withXSRFToken:T,xsrfHeaderName:R,xsrfCookieName:k,headers:L,auth:z}=y;y.headers=L=St.from(L),y.url=Bi(Mn(y.baseURL,y.url),m.params,m.paramsSerializer),z&&L.set("Authorization","Basic "+btoa((z.username||"")+":"+(z.password?unescape(encodeURIComponent(z.password)):"")));let te;if(j.isFormData(w)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)L.setContentType(void 0);else if((te=L.getContentType())!==!1){const[Q,...G]=te?te.split(";").map(ne=>ne.trim()).filter(Boolean):[];L.setContentType([Q||"multipart/form-data",...G].join("; "))}}if(qe.hasStandardBrowserEnv&&(T&&j.isFunction(T)&&(T=T(y)),T||T!==!1&&mr(y.url))){const Q=R&&k&&Xi.read(k);Q&&L.set(R,Q)}return y},yu=typeof XMLHttpRequest<"u"&&function(m){return new Promise(function(w,T){const R=Ji(m);let k=R.data;const L=St.from(R.headers).normalize();let{responseType:z,onUploadProgress:te,onDownloadProgress:Q}=R,G,ne,Ee,$e,re;function le(){$e&&$e(),re&&re(),R.cancelToken&&R.cancelToken.unsubscribe(G),R.signal&&R.signal.removeEventListener("abort",G)}let Z=new XMLHttpRequest;Z.open(R.method.toUpperCase(),R.url,!0),Z.timeout=R.timeout;function Oe(){if(!Z)return;const De=St.from("getAllResponseHeaders"in Z&&Z.getAllResponseHeaders()),d={data:!z||z==="text"||z==="json"?Z.responseText:Z.response,status:Z.status,statusText:Z.statusText,headers:De,config:m,request:Z};Qi(function(_){w(_),le()},function(_){T(_),le()},d),Z=null}"onloadend"in Z?Z.onloadend=Oe:Z.onreadystatechange=function(){!Z||Z.readyState!==4||Z.status===0&&!(Z.responseURL&&Z.responseURL.indexOf("file:")===0)||setTimeout(Oe)},Z.onabort=function(){Z&&(T(new ue("Request aborted",ue.ECONNABORTED,m,Z)),Z=null)},Z.onerror=function(){T(new ue("Network Error",ue.ERR_NETWORK,m,Z)),Z=null},Z.ontimeout=function(){let a=R.timeout?"timeout of "+R.timeout+"ms exceeded":"timeout exceeded";const d=R.transitional||Dn;R.timeoutErrorMessage&&(a=R.timeoutErrorMessage),T(new ue(a,d.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,m,Z)),Z=null},k===void 0&&L.setContentType(null),"setRequestHeader"in Z&&j.forEach(L.toJSON(),function(a,d){Z.setRequestHeader(d,a)}),j.isUndefined(R.withCredentials)||(Z.withCredentials=!!R.withCredentials),z&&z!=="json"&&(Z.responseType=R.responseType),Q&&([Ee,re]=Mt(Q,!0),Z.addEventListener("progress",Ee)),te&&Z.upload&&([ne,$e]=Mt(te),Z.upload.addEventListener("progress",ne),Z.upload.addEventListener("loadend",$e)),(R.cancelToken||R.signal)&&(G=De=>{Z&&(T(!De||De.type?new rn(null,m,Z):De),Z.abort(),Z=null)},R.cancelToken&&R.cancelToken.subscribe(G),R.signal&&(R.signal.aborted?G():R.signal.addEventListener("abort",G)));const ze=uo(R.url);if(ze&&qe.protocols.indexOf(ze)===-1){T(new ue("Unsupported protocol "+ze+":",ue.ERR_BAD_REQUEST,m));return}Z.send(k||null)})},_u=(m,y)=>{const{length:w}=m=m?m.filter(Boolean):[];if(y||w){let T=new AbortController,R;const k=function(Q){if(!R){R=!0,z();const G=Q instanceof Error?Q:this.reason;T.abort(G instanceof ue?G:new rn(G instanceof Error?G.message:G))}};let L=y&&setTimeout(()=>{L=null,k(new ue(`timeout ${y} of ms exceeded`,ue.ETIMEDOUT))},y);const z=()=>{m&&(L&&clearTimeout(L),L=null,m.forEach(Q=>{Q.unsubscribe?Q.unsubscribe(k):Q.removeEventListener("abort",k)}),m=null)};m.forEach(Q=>Q.addEventListener("abort",k));const{signal:te}=T;return te.unsubscribe=()=>j.asap(z),te}};const gr=function*(m,y){let w=m.byteLength;if(w<y){yield m;return}let T=0,R;for(;T<w;)R=T+y,yield m.slice(T,R),T=R},vn=async function*(m,y){for await(const w of co(m))yield*gr(w,y)},co=async function*(m){if(m[Symbol.asyncIterator]){yield*m;return}const y=m.getReader();try{for(;;){const{done:w,value:T}=await y.read();if(w)break;yield T}}finally{await y.cancel()}},Zi=(m,y,w,T)=>{const R=vn(m,y);let k=0,L,z=te=>{L||(L=!0,T&&T(te))};return new ReadableStream({async pull(te){try{const{done:Q,value:G}=await R.next();if(Q){z(),te.close();return}let ne=G.byteLength;if(w){let Ee=k+=ne;w(Ee)}te.enqueue(new Uint8Array(G))}catch(Q){throw z(Q),Q}},cancel(te){return z(te),R.return()}},{highWaterMark:2})},yr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",es=yr&&typeof ReadableStream=="function",ho=yr&&(typeof TextEncoder=="function"?(m=>y=>m.encode(y))(new TextEncoder):async m=>new Uint8Array(await new Response(m).arrayBuffer())),wn=(m,...y)=>{try{return!!m(...y)}catch{return!1}},vu=es&&wn(()=>{let m=!1;
1677const y=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!y}),fo=64*1024,ts=es&&wn(()=>j.isReadableStream(new Response("").body)),Nt={stream:ts&&(m=>m.body)};yr&&(m=>{["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!Nt[y]&&(Nt[y]=j.isFunction(m[y])?w=>w[y]():(w,T)=>{throw new ue(`Response type '${y}' is not supported`,ue.ERR_NOT_SUPPORT,T)})})})(new Response);const wu=async m=>{if(m==null)return 0;if(j.isBlob(m))return m.size;if(j.isSpecCompliantForm(m))return(await new Request(qe.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(j.isArrayBufferView(m)||j.isArrayBuffer(m))return m.byteLength;if(j.isURLSearchParams(m)&&(m=m+""),j.isString(m))return(await ho(m)).byteLength},ns=async(m,y)=>{const w=j.toFiniteNumber(m.getContentLength());return w??wu(y)};var Qr=yr&&(async m=>{let{url:y,method:w,data:T,signal:R,cancelToken:k,timeout:L,onDownloadProgress:z,onUploadProgress:te,responseType:Q,headers:G,withCredentials:ne="same-origin",fetchOptions:Ee}=Ji(m);Q=Q?(Q+"").toLowerCase():"text";let $e=_u([R,k&&k.toAbortSignal()],L),re;const le=$e&&$e.unsubscribe&&(()=>{$e.unsubscribe()});let Z;try{if(te&&vu&&w!=="get"&&w!=="head"&&(Z=await ns(G,T))!==0){let d=new Request(y,{method:"POST",body:T,duplex:"half"}),f;if(j.isFormData(T)&&(f=d.headers.get("content-type"))&&G.setContentType(f),d.body){const[_,N]=kt(Z,Mt(Vn(te)));T=Zi(d.body,fo,_,N)}}j.isString(ne)||(ne=ne?"include":"omit");const Oe="credentials"in Request.prototype;re=new Request(y,{...Ee,signal:$e,method:w.toUpperCase(),headers:G.normalize().toJSON(),body:T,duplex:"half",credentials:Oe?ne:void 0});let ze=await fetch(re);const De=ts&&(Q==="stream"||Q==="response");if(ts&&(z||De&&le)){const d={};["status","statusText","headers"].forEach(F=>{d[F]=ze[F]});const f=j.toFiniteNumber(ze.headers.get("content-length")),[_,N]=z&&kt(f,Mt(Vn(z),!0))||[];ze=new Response(Zi(ze.body,fo,_,()=>{N&&N(),le&&le()}),d)}Q=Q||"text";let a=await Nt[j.findKey(Nt,Q)||"text"](ze,m);return!De&&le&&le(),await new Promise((d,f)=>{Qi(d,f,{data:a,headers:St.from(ze.headers),status:ze.status,statusText:ze.statusText,config:m,request:re})})}catch(Oe){throw le&&le(),Oe&&Oe.name==="TypeError"&&/fetch/i.test(Oe.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,m,re),{cause:Oe.cause||Oe}):ue.from(Oe,Oe&&Oe.code,m,re)}});const Xr={http:cu,xhr:yu,fetch:Qr};j.forEach(Xr,(m,y)=>{if(m){try{Object.defineProperty(m,"name",{value:y})}catch{}Object.defineProperty(m,"adapterName",{value:y})}});const Nn=m=>`- ${m}`,_r=m=>j.isFunction(m)||m===null||m===!1;var rs={getAdapter:m=>{m=j.isArray(m)?m:[m];const{length:y}=m;let w,T;const R={};for(let k=0;k<y;k++){w=m[k];let L;if(T=w,!_r(w)&&(T=Xr[(L=String(w)).toLowerCase()],T===void 0))throw new ue(`Unknown adapter '${L}'`);if(T)break;R[L||"#"+k]=T}if(!T){const k=Object.entries(R).map(([z,te])=>`adapter ${z} `+(te===!1?"is not supported by the environment":"is not available in the build"));let L=y?k.length>1?`since : 1678`+k.map(Nn).join(` 1679`):" "+Nn(k[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+L,"ERR_NOT_SUPPORT")}return T},adapters:Xr};function vr(m){if(m.cancelToken&&m.cancelToken.throwIfRequested(),m.signal&&m.signal.aborted)throw new rn(null,m)}function Ie(m){return vr(m),m.headers=St.from(m.headers),m.data=Kr.call(m,m.transformRequest),["post","put","patch"].indexOf(m.method)!==-1&&m.headers.setContentType("application/x-www-form-urlencoded",!1),rs.getAdapter(m.adapter||Wr.adapter)(m).then(function(T){return vr(m),T.data=Kr.call(m,m.transformResponse,T),T.headers=St.from(T.headers),T},function(T){return Gr(T)||(vr(m),T&&T.response&&(T.response.data=Kr.call(m,m.transformResponse,T.response),T.response.headers=St.from(T.response.headers))),Promise.reject(T)})}const po="1.7.9",Jr={};["object","boolean","number","function","string","symbol"].forEach((m,y)=>{Jr[m]=function(T){return typeof T===m||"a"+(y<1?"n ":" ")+m}});const is={};Jr.transitional=function(y,w,T){function R(k,L){return"[Axios v"+po+"] Transitional option '"+k+"'"+L+(T?". "+T:"")}return(k,L,z)=>{if(y===!1)throw new ue(R(L," has been removed"+(w?" in "+w:"")),ue.ERR_DEPRECATED);return w&&!is[L]&&(is[L]=!0,console.warn(R(L," has been deprecated since v"+w+" and will be removed in the near future"))),y?y(k,L,z):!0}},Jr.spelling=function(y){return(w,T)=>(console.warn(`${T} is likely a misspelling of ${y}`),!0)};function mo(m,y,w){if(typeof m!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const T=Object.keys(m);let R=T.length;for(;R-- >0;){const k=T[R],L=y[k];if(L){const z=m[k],te=z===void 0||L(z,k,m);if(te!==!0)throw new ue("option "+k+" must be "+te,ue.ERR_BAD_OPTION_VALUE);continue}if(w!==!0)throw new ue("Unknown option "+k,ue.ERR_BAD_OPTION)}}var wr={assertOptions:mo,validators:Jr};const Ct=wr.validators;class Lt{constructor(y){this.defaults=y,this.interceptors={request:new qi,response:new qi}}async request(y,w){try{return await this._request(y,w)}catch(T){if(T instanceof Error){let R={};Error.captureStackTrace?Error.captureStackTrace(R):R=new Error;
vendor: 3,377 bytes, lines 1679-1680
1679const k=R.stack?R.stack.replace(/^.+\n/,""):"";try{T.stack?k&&!String(T.stack).endsWith(k.replace(/^.+\n.+\n/,""))&&(T.stack+=` 1680`+k):T.stack=k}catch{}}throw T}}_request(y,w){typeof y=="string"?(w=w||{},w.url=y):w=y||{},w=_n(this.defaults,w);const{transitional:T,paramsSerializer:R,headers:k}=w;T!==void 0&&wr.assertOptions(T,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean)},!1),R!=null&&(j.isFunction(R)?w.paramsSerializer={serialize:R}:wr.assertOptions(R,{encode:Ct.function,serialize:Ct.function},!0)),wr.assertOptions(w,{baseUrl:Ct.spelling("baseURL"),withXsrfToken:Ct.spelling("withXSRFToken")},!0),w.method=(w.method||this.defaults.method||"get").toLowerCase();let L=k&&j.merge(k.common,k[w.method]);k&&j.forEach(["delete","get","head","post","put","patch","common"],re=>{delete k[re]}),w.headers=St.concat(L,k);const z=[];let te=!0;this.interceptors.request.forEach(function(le){typeof le.runWhen=="function"&&le.runWhen(w)===!1||(te=te&&le.synchronous,z.unshift(le.fulfilled,le.rejected))});const Q=[];this.interceptors.response.forEach(function(le){Q.push(le.fulfilled,le.rejected)});let G,ne=0,Ee;if(!te){const re=[Ie.bind(this),void 0];for(re.unshift.apply(re,z),re.push.apply(re,Q),Ee=re.length,G=Promise.resolve(w);ne<Ee;)G=G.then(re[ne++],re[ne++]);return G}Ee=z.length;let $e=w;for(ne=0;ne<Ee;){const re=z[ne++],le=z[ne++];try{$e=re($e)}catch(Z){le.call(this,Z);break}}try{G=Ie.call(this,$e)}catch(re){return Promise.reject(re)}for(ne=0,Ee=Q.length;ne<Ee;)G=G.then(Q[ne++],Q[ne++]);return G}getUri(y){y=_n(this.defaults,y);const w=Mn(y.baseURL,y.url);return Bi(w,y.params,y.paramsSerializer)}}j.forEach(["delete","get","head","options"],function(y){Lt.prototype[y]=function(w,T){return this.request(_n(T||{},{method:y,url:w,data:(T||{}).data}))}}),j.forEach(["post","put","patch"],function(y){function w(T){return function(k,L,z){return this.request(_n(z||{},{method:y,headers:T?{"Content-Type":"multipart/form-data"}:{},url:k,data:L}))}}Lt.prototype[y]=w(),Lt.prototype[y+"Form"]=w(!0)});var br=Lt;class ss{constructor(y){if(typeof y!="function")throw new TypeError("executor must be a function.");let w;this.promise=new Promise(function(k){w=k});const T=this;this.promise.then(R=>{if(!T._listeners)return;let k=T._listeners.length;for(;k-- >0;)T._listeners[k](R);T._listeners=null}),this.promise.then=R=>{let k;const L=new Promise(z=>{T.subscribe(z),k=z}).then(R);return L.cancel=function(){T.unsubscribe(k)},L},y(function(k,L,z){T.reason||(T.reason=new rn(k,L,z),w(T.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(y){if(this.reason){y(this.reason);return}this._listeners?this._listeners.push(y):this._listeners=[y]}unsubscribe(y){if(!this._listeners)return;const w=this._listeners.indexOf(y);w!==-1&&this._listeners.splice(w,1)}toAbortSignal(){const y=new AbortController,w=T=>{y.abort(T)};return this.subscribe(w),y.signal.unsubscribe=()=>this.unsubscribe(w),y.signal}static source(){let y;return{token:new ss(function(R){y=R}),cancel:y}}}var Tr=ss;function go(m){return function(w){return m.apply(null,w)}}function os(m){return j.isObject(m)&&m.isAxiosError===!0}const Ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
1680alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ln).forEach(([m,y])=>{Ln[y]=m});var yo=Ln;function Er(m){const y=new br(m),w=n(br.prototype.request,y);return j.extend(w,br.prototype,y,{allOwnKeys:!0}),j.extend(w,y,null,{allOwnKeys:!0}),w.create=function(R){return Er(_n(m,R))},w}const He=Er(Wr);return He.Axios=br,He.CanceledError=rn,He.CancelToken=Tr,He.isCancel=Gr,He.VERSION=po,He.toFormData=Bt,He.AxiosError=ue,He.Cancel=He.CanceledError,He.all=function(y){return Promise.all(y)},He.spread=go,He.isAxiosError=os,He.mergeConfig=_n,He.AxiosHeaders=St,He.formToJSON=m=>Wi(j.isHTMLForm(m)?new FormData(m):m),He.getAdapter=rs.getAdapter,He.HttpStatusCode=yo,He.default=He,Xu=He,Xu}const YS={},QS=Object.freeze(Object.defineProperty({__proto__:null,default:YS},Symbol.toStringTag,{value:"Module"})),Xl=Hp(QS);var np;function r_(){if(np)return Bo;np=1,Object.defineProperty(Bo,"__esModule",{value:!0});var n=se,e=n.__importDefault(GS()),t=Xl,r=Xl,i=Zs(),s=n.__importDefault(Xt()),o="X-TYPESENSE-API-KEY",u=!0,l=!1,c=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,h=function(){function p(g){this.configuration=g,this.apiKey=this.configuration.apiKey,this.nodes=this.configuration.nodes==null?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=this.configuration.nearestNode==null?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return p.prototype.get=function(g,v,P){v===void 0&&(v={});var A=P===void 0?{}:P,D=A.abortSignal,M=D===void 0?null:D,U=A.responseType,B=U===void 0?void 0:U;return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(q){return[2,this.performRequest("get",g,{queryParameters:v,abortSignal:M,responseType:B})]})})},p.prototype.delete=function(g,v){return v===void 0&&(v={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(P){return[2,this.performRequest("delete",g,{queryParameters:v})]})})},p.prototype.post=function(g,v,P,A){return v===void 0&&(v={}),P===void 0&&(P={}),A===void 0&&(A={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(D){return[2,this.performRequest("post",g,{queryParameters:P,bodyParameters:v,additionalHeaders:A})]})})},p.prototype.put=function(g,v,P){return v===void 0&&(v={}),P===void 0&&(P={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(A){return[2,this.performRequest("put",g,{queryParameters:P,bodyParameters:v})]})})},p.prototype.patch=function(g,v,P){return v===void 0&&(v={}),P===void 0&&(P={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(A){return[2,this.performRequest("patch",g,{queryParameters:P,bodyParameters:v})]})})},p.prototype.getAdapter=function(){if(this.configuration.axiosAdapter){if(typeof this.configuration.axiosAdapter=="function")return this.configuration.axiosAdapter;var g=typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers";return g?e.default.getAdapter(this.configuration.axiosAdapter).bind(globalThis):e.default.getAdapter(this.configuration.axiosAdapter)}},p.prototype.performRequest=function(g,v,P){var A,D,M,U,B=P.queryParameters,q=B===void 0?null:B,H=P.bodyParameters,K=H===void 0?null:H,x=P.additionalHeaders,b=x===void 0?{}:x,E=P.abortSignal,I=E===void 0?null:E,S=P.responseType,V=S===void 0?void 0:S,C=P.skipConnectionTimeout,Pe=C===void 0?!1:C,Re=P.enableKeepAlive,Jt=Re===void 0?void 0:Re;return n.__awaiter(this,void 0,void 0,function(){var fe,Ue,it,Dt,pe,yn,xn;return n.__generator(this,function(zt){switch(zt.label){case 0:this.configuration.validate(),fe=Date.now(),it=!1,this.logger.debug("Request #".concat(fe,": Performing ").concat(g.toUpperCase()," request: ").concat(v)),Dt=function(An){var Ot,Wt,Be,Sn,or,ft,Vt;return n.__generator(this,function(Ut){switch(Ut.label){case 0:if(Ot=pe.getNextNode(fe),pe.logger.debug("Request #".concat(fe,": Attempting ").concat(g.toUpperCase()," request Try #").concat(An," to N
1680ode ").concat(Ot.index)),I&&I.aborted)return[2,{value:Promise.reject(new Error("Request aborted by caller."))}];Wt=void 0,Ut.label=1;case 1:return Ut.trys.push([1,3,5,6]),Be={adapter:pe.getAdapter(),method:g,url:pe.uriFor(v,Ot),headers:Object.assign({},pe.defaultHeaders(),b,pe.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,responseType:V,validateStatus:function(Zt){return Zt>0},transformResponse:[function(Zt,ar){var en=Zt;return ar!==void 0&&typeof Zt=="string"&&ar["content-type"]&&ar["content-type"].startsWith("application/json")&&(en=JSON.parse(Zt)),en}]},Pe!==!0&&(Be.timeout=pe.connectionTimeoutSeconds*1e3),q&&Object.keys(q).length!==0&&(Be.params=q),pe.sendApiKeyAsQueryParam&&(Be.params=Be.params||{},Be.params["x-typesense-api-key"]=pe.apiKey),pe.configuration.httpAgent?(pe.logger.debug("Request #".concat(fe,": Using custom httpAgent")),Be.httpAgent=pe.configuration.httpAgent):Jt===!0&&(c?(pe.logger.debug("Request #".concat(fe,": Enabling KeepAlive")),Be.httpAgent=new t.Agent({keepAlive:!0})):pe.logger.warn("Request #".concat(fe,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),pe.configuration.httpsAgent?(pe.logger.debug("Request #".concat(fe,": Using custom httpsAgent")),Be.httpsAgent=pe.configuration.httpsAgent):Jt===!0&&(c?(pe.logger.debug("Request #".concat(fe,": Enabling keepAlive")),Be.httpsAgent=new r.Agent({keepAlive:!0})):pe.logger.warn("Request #".concat(fe,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),pe.configuration.paramsSerializer&&(pe.logger.debug("Request #".concat(fe,": Using custom paramsSerializer")),Be.paramsSerializer=pe.configuration.paramsSerializer),K&&(typeof K=="string"&&K.length!==0||typeof K=="object"&&Object.keys(K).length!==0)&&(Be.data=K),I&&(Sn=e.default.CancelToken,or=Sn.source(),Wt=function(){it=!0,or.cancel()},I.addEventListener("abort",Wt),Be.cancelToken=or.token),[4,(0,e.default)(Be)];case 2:if(ft=Ut.sent(),ft.status>=1&&ft.status<=499&&pe.setNodeHealthcheck(Ot,u),pe.logger.debug("Request #".concat(fe,": Request to Node ").concat(Ot.index," was made. Response Code was ").concat(ft.status,".")),ft.status>=200&&ft.status<300)return[2,{value:Promise.resolve(ft.data)}];if(ft.status<500)return[2,{value:Promise.reject(pe.customErrorForResponse(ft,(A=ft.data)===null||A===void 0?void 0:A.message,Be.data))}];throw pe.customErrorForResponse(ft,(D=ft.data)===null||D===void 0?void 0:D.message,Be.data);case 3:return Vt=Ut.sent(),it||pe.setNodeHealthcheck(Ot,l),Ue=Vt,pe.logger.warn("Request #".concat(fe,": Request to Node ").concat(Ot.index,' failed due to "').concat((M=Vt==null?void 0:Vt.code)!==null&&M!==void 0?M:""," ").concat(Vt.message).concat(Vt.response==null?"":" - "+JSON.stringify((U=Vt.response)===null||U===void 0?void 0:U.data),'"')),it?[2,{value:Promise.reject(new Error("Request aborted by caller."))}]:(An<pe.numRetriesPerRequest+1&&pe.logger.warn("Request #".concat(fe,": Sleeping for ").concat(pe.retryIntervalSeconds,"s and then retrying request...")),[4,pe.timer(pe.retryIntervalSeconds)]);case 4:return Ut.sent(),[3,6];case 5:return I&&Wt&&I.removeEventListener("abort",Wt),[7];case 6:return[2]}})},pe=this,yn=1,zt.label=1;case 1:return yn<=this.numRetriesPerRequest+1?[5,Dt(yn)]:[3,4];case 2:if(xn=zt.sent(),typeof xn=="object")return[2,xn.value];zt.label=3;case 3:return yn++,[3,1];case 4:return this.logger.debug("Request #".concat(fe,": No retries left. Raising last error")),[2,Promise.reject(Ue)]}})})},p.prototype.getNextNode=function(g){if(g===void 0&&(g=0),this.nearestNode!=null){if(this.logger.debug("Request #".concat(g,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(this.nearestNode.isHealthy===!0?"Healthy":"Unhealthy")),this.nearestNode.isHealthy===!0||this.nodeDueForHealthcheck(this.nearestNode,g))return this.logger.debug("Request #".concat(g,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(g,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(g,": Nodes Health: ").concat(this.nodes.map(function(A){return"Node ".concat(A.index," is ").concat(A.isHealthy===!0?"Healthy":"Unhealthy")}).join(" || ")));for(var v=this.nodes[0],P=0;P<=this.nodes.length;P++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,v=this.nodes[this.currentNodeIndex],v.isHealthy===!0||this.nodeDueForHealthcheck(v,g))return this.logger.debug("Request #".concat(g,": Updated current node to Node ").concat(v.index)),v;return this.logger.debug("Request #".concat(g,": No healthy nodes were found. Returning the next node, Node ").concat(v.index)),v},p.prototype.nodeDueForHealthcheck=function(g,v){v===void 0&&(v=0);var P=Date.now()-g.lastAccessTimestamp>this.healthcheckIntervalSeconds*1e3;return P&&this.logger.debug("Request #".concat(v,": Node ").concat(g.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),P},p.prototype.initializeMetadataForNodes=function(){var g=this;this.nearestNode!=null&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,u)),this.nodes.forEac
1680h(function(v,P){v.index=P,g.setNodeHealthcheck(v,u)})},p.prototype.setNodeHealthcheck=function(g,v){g.isHealthy=v,g.lastAccessTimestamp=Date.now()},p.prototype.uriFor=function(g,v){return v.url!=null?"".concat(v.url).concat(g):"".concat(v.protocol,"://").concat(v.host,":").concat(v.port).concat(v.path).concat(g)},p.prototype.defaultHeaders=function(){var g={};return this.sendApiKeyAsQueryParam||(g[o]=this.apiKey),g["Content-Type"]="application/json",g},p.prototype.timer=function(g){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(v){return[2,new Promise(function(P){return setTimeout(P,g*1e3)})]})})},p.prototype.customErrorForResponse=function(g,v,P){var A="Request failed with HTTP code ".concat(g.status);typeof v=="string"&&v.trim()!==""&&(A+=" | Server said: ".concat(v));var D=new s.default(A,P,g.status);return g.status===400?D=new i.RequestMalformed(A):g.status===401?D=new i.RequestUnauthorized(A):g.status===404?D=new i.ObjectNotFound(A):g.status===409?D=new i.ObjectAlreadyExists(A):g.status===422?D=new i.ObjectUnprocessable(A):g.status>=500&&g.status<=599?D=new i.ServerError(A):D=new i.HTTPError(A),D},p}();return Bo.default=h,Bo}var qo={},rp;function sr(){if(rp)return qo;rp=1,Object.defineProperty(qo,"__esModule",{value:!0});var n=se,e="/collections",t=function(){function r(i){this.apiCall=i}return r.prototype.create=function(i,s){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.post(e,i,s)]})})},r.prototype.retrieve=function(i){return i===void 0&&(i={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(e,i)]})})},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return qo.default=t,qo}var Ho={},ni={},hs={},$o={},ip;function i_(){if(ip)return $o;ip=1,Object.defineProperty($o,"__esModule",{value:!0});var n=se,e=2*60,t=100,r=function(){function i(){this.responseCache=new Map,this.responsePromiseCache=new Map}return i.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},i.prototype.perform=function(s,o,u,l){return n.__awaiter(this,void 0,void 0,function(){var c,h,p,g,v,P,A,D,U,M,U,B,q,H,x,K,x;return n.__generator(this,function(b){switch(b.label){case 0:if(c=l.cacheResponseForSeconds,h=c===void 0?e:c,p=l.maxSize,g=p===void 0?t:p,v=h<=0||g<=0,v)return[2,o.call.apply(o,n.__spreadArray([s],u,!1))];if(P=JSON.stringify(u),A=this.responseCache.get(P),D=Date.now(),A){if(U=D-A.requestTimestamp<h*1e3,U)return this.responseCache.delete(P),this.responseCache.set(P,A),[2,Promise.resolve(A.response)];this.responseCache.delete(P)}if(M=this.responsePromiseCache.get(P),M){if(U=D-M.requestTimestamp<h*1e3,U)return this.responsePromiseCache.delete(P),this.responsePromiseCache.set(P,M),[2,M.responsePromise];this.responsePromiseCache.delete(P)}return B=o.call.apply(o,n.__spreadArray([s],u,!1)),this.responsePromiseCache.set(P,{requestTimestamp:D,responsePromise:B}),[4,B];case 1:return q=b.sent(),this.responseCache.set(P,{requestTimestamp:D,response:q}),H=this.responseCache.size>g,H&&(x=this.responseCache.keys().next().value,x&&this.responseCache.delete(x)),K=this.responsePromiseCache.size>g,K&&(x=this.responsePromiseCache.keys().next().value,x&&this.responsePromiseCache.delete(x)),[2,q]}})})},i}();return $o.default=r,$o}var ds={},sp;function uu(){if(sp)return ds;sp=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.normalizeArrayableParams=void 0;var n=se,e=rh();function t(s){return Object.keys(e.arrayableParams).filter(function(o){return s[o]!==void 0}).every(function(o){return i(s[o])})}function r(s){var o=n.__assign({},s),u=Object.keys(e.arrayableParams).filter(function(l){return Array.isArray(o[l])}).map(function(l){return o[l]=o[l].join(","),l});if(!u.length&&t(o))return o;if(!t(o))throw new Error("Failed to normalize arrayable params: ".concat(JSON.stringify(o)));return o}ds.normalizeArrayableParams=r;function i(s){return!Array.isArray(s)}return ds}var op;function s_(){if(op)return hs;op=1,Object.defineProperty(hs,"__esModule",{value:!0}),hs.SearchOnlyDocuments=void 0;var n=se,e=n.__importDefault(i_()),t=n.__importDefault(sr()),r=uu(),i="/documents",s=function(){function o(u,l,c){this.collectionName=u,this.apiCall=l,this.configuration=c,this.requestWithCache=new e.default}return o.prototype.clearCache=function(){this.requestWithCache.clearCache()},o.prototype.search=function(u,l){var c=l===void 0?{}:l,h=c.cacheSearchResultsForSeconds,p=h===void 0?this.configuration.cacheSearchResultsForSeconds:h,g=c.abort
1680Signal,v=g===void 0?null:g;return n.__awaiter(this,void 0,void 0,function(){var P,A,D;return n.__generator(this,function(M){return P={},this.configuration.useServerSideSearchCache===!0&&(P.use_cache=!0),A=(0,r.normalizeArrayableParams)(u),D=Object.assign({},P,A),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.get,[this.endpointPath("search"),D,{abortSignal:v}],{cacheResponseForSeconds:p})]})})},o.prototype.endpointPath=function(u){return"".concat(t.default.RESOURCEPATH,"/").concat(this.collectionName).concat(i).concat(u===void 0?"":"/"+u)},Object.defineProperty(o,"RESOURCEPATH",{get:function(){return i},enumerable:!1,configurable:!0}),o}();return hs.SearchOnlyDocuments=s,hs}var ap;function rh(){if(ap)return ni;ap=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.arrayableParams=void 0;var n=se,e=Zs(),t=s_();ni.arrayableParams={query_by:"query_by",query_by_weights:"query_by_weights",facet_by:"facet_by",group_by:"group_by",include_fields:"include_fields",exclude_fields:"exclude_fields",highlight_fields:"highlight_fields",highlight_full_fields:"highlight_full_fields",pinned_hits:"pinned_hits",hidden_hits:"hidden_hits",infix:"infix",override_tags:"override_tags",num_typos:"num_typos",prefix:"prefix",sort_by:"sort_by"};var r=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,i=function(o){n.__extends(u,o);function u(l,c,h){return o.call(this,l,c,h)||this}return u.prototype.create=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(h){if(!l)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),l,c)]})})},u.prototype.upsert=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(h){if(!l)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),l,Object.assign({},c,{action:"upsert"}))]})})},u.prototype.update=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(h){if(!l)throw new Error("No document provided");return c.filter_by!=null?[2,this.apiCall.patch(this.endpointPath(),l,Object.assign({},c))]:[2,this.apiCall.post(this.endpointPath(),l,Object.assign({},c,{action:"update"}))]})})},u.prototype.delete=function(l){return l===void 0&&(l={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(c){return[2,this.apiCall.delete(this.endpointPath(),l)]})})},u.prototype.createMany=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(h){return this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"),[2,this.import(l,c)]})})},u.prototype.import=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){var h,p,g,v;return n.__generator(this,function(P){switch(P.label){case 0:if(Array.isArray(l)){if(l.length===0)throw new e.RequestMalformed("No documents provided");try{h=l.map(function(A){return JSON.stringify(A)}).join(` 1681`)}catch(A){throw A instanceof RangeError&&A.message.includes("Too many properties to enumerate")?new Error("".concat(A,` 1682 It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object 1683 1684 Please try reducing the number of keys in your document, or using CURL to import your data. 1685 `)):new Error(A)}}else if(h=l,s(h))throw new e.RequestMalformed("No documents provided");return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:c,bodyParameters:h,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!r})];case 1:if(p=P.sent(),Array.isArray(l)){if(g=p.split(` 1686`).map(function(A){return JSON.parse(A)}),v=g.filter(function(A){return A.success===!1}),v.length>0)throw new e.ImportError("".concat(g.length-v.length," documents imported successfully, ").concat(v.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),g,{documentsInJSONLFormat:h,options:c,failedItems:v,successCount:g.length-v.length});return[2,g]}else return[2,p]}})})},u.prototype.importStream=function(l,c){return c===void 0&&(c={}),n.__awaiter(this,void 0,void 0,function(){var h,p,g;return n.__generator(this,function(v){switch(v.label){case 0:return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:c,bodyParameters:l,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!r})];case 1:if(h=v.sent(),p=h.split(` 1687`).map(function(P){return JSON.parse(P)}),g=p.filter(function(P){return P.success===!1}),g.length>0)throw new e.ImportError("".concat(p.length-g.length," documents imported successfully, ").concat(g.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),p,{documentsInJSONLFormat:l,options:c,failedItems:g,successCount:p.length-g.length});return[2,p]}})})}
1687,u.prototype.export=function(l){return l===void 0&&(l={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(c){return[2,this.apiCall.get(this.endpointPath("export"),l)]})})},u.prototype.exportStream=function(l){return l===void 0&&(l={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(c){return[2,this.apiCall.get(this.endpointPath("export"),l,{responseType:"stream"})]})})},u}(t.SearchOnlyDocuments);ni.default=i;function s(o){return o==null||o===""||o.length===0}return ni}var zo={},up;function o_(){if(up)return zo;up=1,Object.defineProperty(zo,"__esModule",{value:!0});var n=se,e=n.__importDefault(sr()),t="/overrides",r=function(){function i(s,o){this.collectionName=s,this.apiCall=o}return i.prototype.upsert=function(s,o){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(u){return[2,this.apiCall.put(this.endpointPath(s),o)]})})},i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.endpointPath=function(s){return"".concat(e.default.RESOURCEPATH,"/").concat(this.collectionName).concat(i.RESOURCEPATH).concat(s===void 0?"":"/"+encodeURIComponent(s))},Object.defineProperty(i,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),i}();return zo.default=r,zo}var Wo={},lp;function XS(){if(lp)return Wo;lp=1,Object.defineProperty(Wo,"__esModule",{value:!0});var n=se,e=n.__importDefault(sr()),t=n.__importDefault(o_()),r=function(){function i(s,o,u){this.collectionName=s,this.overrideId=o,this.apiCall=u}return i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.delete(this.endpointPath())]})})},i.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.overrideId))},i}();return Wo.default=r,Wo}var Ko={},cp;function a_(){if(cp)return Ko;cp=1,Object.defineProperty(Ko,"__esModule",{value:!0});var n=se,e=n.__importDefault(sr()),t="/synonyms",r=function(){function i(s,o){this.collectionName=s,this.apiCall=o}return i.prototype.upsert=function(s,o){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(u){return[2,this.apiCall.put(this.endpointPath(s),o)]})})},i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.endpointPath=function(s){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(i.RESOURCEPATH).concat(s===void 0?"":"/"+encodeURIComponent(s))},Object.defineProperty(i,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),i}();return Ko.default=r,Ko}var Go={},hp;function JS(){if(hp)return Go;hp=1,Object.defineProperty(Go,"__esModule",{value:!0});var n=se,e=n.__importDefault(sr()),t=n.__importDefault(a_()),r=function(){function i(s,o,u){this.collectionName=s,this.synonymId=o,this.apiCall=u}return i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.delete(this.endpointPath())]})})},i.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymId))},i}();return Go.default=r,Go}var fs={},dp;function ZS(){if(dp)return fs;dp=1,Object.defineProperty(fs,"__esModule",{value:!0}),fs.Document=void 0;var n=se,e=n.__importDefault(sr()),t=n.__importDefault(rh()),r=function(){function i(s,o,u){this.collectionName=s,this.documentId=o,this.apiCall=u}return i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.delete=function(s){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.delete(this.endpointPath(),s)]})})},i.prototype.update=function(s,o){return o===void 0&&(o={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(u){return[2,this.apiCall.patch(this.endpointPath(),s,o)]})})},i.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(t.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.documentId))},i}();return fs.Document=r,fs}var fp;function eR(){if(fp)return Ho;fp=1,Object.defineProperty(Ho,"__esModule",{value:!0});var n=se,e=n.__importDefault(sr()),t=n.__importDefault(rh()),r=Zs(),i=n.__importDefault(o_()),s=n.__importDefault(XS()),o=n.__importDefault(a_()),u=n.__importDefault(JS()),l=ZS(),c=function(){function h(p,g,v){this.name=p,this.apiCall=g,this.configuration=v,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=p,this.apiCall=g,this.configuration=v,this._documents=new t.default(this.name,this.apiCall,this.configuration),this._overrides=new i.default(this.name,this.apiCall),this._synonyms=new o.default(this.name,this.apiCall)}return h.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(p){return[2,this.apiCall.get(this.endpointPath())]})})},h.prototype.update=function(p){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(g){return[2,this.apiCall.patch(this.endpointPath(),p)]})})},h.prototype.delete=function(p){return p===void 0&&(p={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(g){return[2,this.apiCall.delete(this.endpointPath(),p)]})})},h.prototype.exists=function(){return n.__awaiter(this,void 0,void 0,function(){var p;return n.__generator(this,function(g){switch(g.label){case 0:return g.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return g.sent(),[2,!0];case 2:if(p=g.sent(),p instanceof r.ObjectNotFound)return[2,!1];throw p;case 3:return[2]}})})},h.prototype.documents=function(p){return p?(this.individualDocuments[p]===void 0&&(this.individualDocuments[p]=new l.Document(this.name,p,this.apiCall)),this.individualDocuments[p]):this._documents},h.prototype.overrides=function(p){return p===void 0?this._overrides:(this.individualOverrides[p]===void 0&&(this.individualOverrides[p]=new s.default(this.name,p,this.apiCall)),this.individualOverrides[p])},h.prototype.synonyms=function(p){return p===void 0?this._synonyms:(this.individualSynonyms[p]===void 0&&(this.individualSynonyms[p]=new u.default(this.name,p,this.apiCall)),this.individualSynonyms[p])},h.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},h}();return Ho.default=c,Ho}var Yo={},pp;
1687function u_(){if(pp)return Yo;pp=1,Object.defineProperty(Yo,"__esModule",{value:!0});var n=se,e="/aliases",t=function(){function r(i){this.apiCall=i}return r.prototype.upsert=function(i,s){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(i),s)]})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(e)]})})},r.prototype.endpointPath=function(i){return"".concat(r.RESOURCEPATH,"/").concat(encodeURIComponent(i))},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return Yo.default=t,Yo}var Qo={},mp;function tR(){if(mp)return Qo;mp=1,Object.defineProperty(Qo,"__esModule",{value:!0});var n=se,e=n.__importDefault(u_()),t=function(){function r(i,s){this.name=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},r}();return Qo.default=t,Qo}var Xo={},gp;function l_(){if(gp)return Xo;gp=1,Object.defineProperty(Xo,"__esModule",{value:!0});var n=se,e=Xl,t=uu(),r="/keys",i=function(){function s(o){this.apiCall=o,this.apiCall=o}return s.prototype.create=function(o){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(u){return[2,this.apiCall.post(s.RESOURCEPATH,o)]})})},s.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.get(r)]})})},s.prototype.generateScopedSearchKey=function(o,u){var l=(0,t.normalizeArrayableParams)(u),c=JSON.stringify(l),h=Buffer.from((0,e.createHmac)("sha256",o).update(c).digest("base64")),p=o.substr(0,4),g="".concat(h).concat(p).concat(c);return Buffer.from(g).toString("base64")},Object.defineProperty(s,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),s}();return Xo.default=i,Xo}var Jo={},yp;
1687function nR(){if(yp)return Jo;yp=1,Object.defineProperty(Jo,"__esModule",{value:!0});var n=se,e=n.__importDefault(l_()),t=function(){function r(i,s){this.id=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},r}();return Jo.default=t,Jo}var Zo={},_p;function rR(){if(_p)return Zo;_p=1,Object.defineProperty(Zo,"__esModule",{value:!0});var n=se,e="/debug",t=function(){function r(i){this.apiCall=i}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(e)]})})},r}();return Zo.default=t,Zo}var ea={},vp;function iR(){if(vp)return ea;vp=1,Object.defineProperty(ea,"__esModule",{value:!0});var n=se,e="/metrics.json",t=function(){function r(i){this.apiCall=i}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(e)]})})},r}();return ea.default=t,ea}var ta={},wp;function sR(){if(wp)return ta;wp=1,Object.defineProperty(ta,"__esModule",{value:!0});var n=se,e="/stats.json",t=function(){function r(i){this.apiCall=i}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(e)]})})},r}();return ta.default=t,ta}var na={},bp;function oR(){if(bp)return na;bp=1,Object.defineProperty(na,"__esModule",{value:!0});var n=se,e="/health",t=function(){function r(i){this.apiCall=i}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(e)]})})},r}();return na.default=t,na}var ra={},Tp;function aR(){if(Tp)return ra;Tp=1,Object.defineProperty(ra,"__esModule",{value:!0});var n=se,e="/operations",t=function(){function r(i){this.apiCall=i}return r.prototype.perform=function(i,s){return s===void 0&&(s={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.post("".concat(e,"/").concat(i),{},s)]})})},r}();return ra.default=t,ra}var ia={},Ep;function c_(){if(Ep)return ia;Ep=1,Object.defineProperty(ia,"__esModule",{value:!0});var n=se,e=n.__importDefault(i_()),t=uu(),r="/multi_search",i=function(){function s(o,u,l){l===void 0&&(l=!1),this.apiCall=o,this.configuration=u,this.useTextContentType=l,this.requestWithCache=new e.default}return s.prototype.clearCache=function(){this.requestWithCache.clearCache()},s.prototype.perform=function(o,u,l){u===void 0&&(u={});var c=l===void 0?{}:l,h=c.cacheSearchResultsForSeconds,p=h===void 0?this.configuration.cacheSearchResultsForSeconds:h;return n.__awaiter(this,void 0,void 0,function(){var g,v,P,A,D;return n.__generator(this,function(M){return g={},this.useTextContentType&&(g["content-type"]="text/plain"),v={},this.configuration.useServerSideSearchCache===!0&&(v.use_cache=!0),P=n.__assign(n.__assign({},u),v),A=n.__assign(n.__assign({},o),{searches:o.searches.map(t.normalizeArrayableParams)}),D=(0,t.normalizeArrayableParams)(P),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.post,[r,A,D,g],{cacheResponseForSeconds:p})]})})},s}();return ia.default=i,ia}var sa={},Cp;function h_(){if(Cp)return sa;Cp=1,Object.defineProperty(sa,"__esModule",{value:!0});var n=se,e=uu(),t="/presets",r=function(){function i(s){this.apiCall=s}return i.prototype.upsert=function(s,o){return n.__awaiter(this,void 0,void 0,function(){var u,l;return n.__generator(this,function(c){return typeof o.value=="object"&&"searches"in o.value?(u=o.value.searches.map(function(h){return(0,e.normalizeArrayableParams)(h)}),[2,this.apiCall.put(this.endpointPath(s),{value:{searches:u}})]):(l=(0,e.normalizeArrayableParams)(o.value),[2,this.apiCall.put(this.endpointPath(s),{value:l})])})})},i.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.get(this.endpointPath())]})})},i.prototype.endpointPath=function(s){return"".concat(i.RESOURCEPATH).concat(s===void 0?"":"/"+encodeURIComponent(s))}
1687,Object.defineProperty(i,"RESOURCEPATH",{get:function(){return t},enumerable:!1,configurable:!0}),i}();return sa.default=r,sa}var oa={},Pp;function uR(){if(Pp)return oa;Pp=1,Object.defineProperty(oa,"__esModule",{value:!0});var n=se,e=n.__importDefault(h_()),t=function(){function r(i,s){this.presetId=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.presetId))},r}();return oa.default=t,oa}var aa={},ua={},xp;function d_(){if(xp)return ua;xp=1,Object.defineProperty(ua,"__esModule",{value:!0});var n=se,e="/analytics/rules",t=function(){function r(i){this.apiCall=i,this.apiCall=i}return r.prototype.upsert=function(i,s){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(i),s)]})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.endpointPath=function(i){return"".concat(r.RESOURCEPATH).concat(i===void 0?"":"/"+encodeURIComponent(i))},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return ua.default=t,ua}var la={},Ap;function lR(){if(Ap)return la;Ap=1,Object.defineProperty(la,"__esModule",{value:!0});var n=se,e=n.__importDefault(d_()),t=function(){function r(i,s){this.name=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},r}();return la.default=t,la}var ca={},Sp;function cR(){if(Sp)return ca;Sp=1,Object.defineProperty(ca,"__esModule",{value:!0});var n=se,e="/analytics/events",t=function(){function r(i){this.apiCall=i,this.apiCall=i}return r.prototype.create=function(i){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.post(this.endpointPath(),i)]})})},r.prototype.endpointPath=function(i){return"".concat(r.RESOURCEPATH).concat(i===void 0?"":"/"+encodeURIComponent(i))},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return ca.default=t,ca}var Rp;function hR(){if(Rp)return aa;Rp=1,Object.defineProperty(aa,"__esModule",{value:!0});var n=se,e=n.__importDefault(d_()),t=n.__importDefault(lR()),r=n.__importDefault(cR()),i="/analytics",s=function(){function o(u){this.apiCall=u,this.individualAnalyticsRules={},this.apiCall=u,this._analyticsRules=new e.default(this.apiCall),this._analyticsEvents=new r.default(this.apiCall)}return o.prototype.rules=function(u){return u===void 0?this._analyticsRules:(this.individualAnalyticsRules[u]===void 0&&(this.individualAnalyticsRules[u]=new t.default(u,this.apiCall)),this.individualAnalyticsRules[u])},o.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(o,"RESOURCEPATH",{get:function(){return i},enumerable:!1,configurable:!0}),o}();return aa.default=s,aa}var ha={},Ip;function f_(){if(Ip)return ha;Ip=1,Object.defineProperty(ha,"__esModule",{value:!0});var n=se,e="/stopwords",t=function(){function r(i){this.apiCall=i}return r.prototype.upsert=function(i,s){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.put(this.endpointPath(i),s)]})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.endpointPath=function(i){return"".concat(r.RESOURCEPATH).concat(i===void 0?"":"/"+encodeURIComponent(i))}
1687,Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return ha.default=t,ha}var da={},Dp;function dR(){if(Dp)return da;Dp=1,Object.defineProperty(da,"__esModule",{value:!0});var n=se,e=n.__importDefault(f_()),t=function(){function r(i,s){this.stopwordId=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.stopwordId))},r}();return da.default=t,da}var fa={},pa={},Op;function p_(){if(Op)return pa;Op=1,Object.defineProperty(pa,"__esModule",{value:!0});var n=se,e="/conversations/models",t=function(){function r(i){this.apiCall=i,this.apiCall=i}return r.prototype.create=function(i){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.post(this.endpointPath(),i)]})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.endpointPath=function(i){return"".concat(r.RESOURCEPATH).concat(i===void 0?"":"/"+encodeURIComponent(i))},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return pa.default=t,pa}var ma={},Vp;function fR(){if(Vp)return ma;Vp=1,Object.defineProperty(ma,"__esModule",{value:!0});var n=se,e=n.__importDefault(p_()),t=function(){function r(i,s){this.id=i,this.apiCall=s}return r.prototype.update=function(i){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.put(this.endpointPath(),i)]})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},r}();return ma.default=t,ma}var Mp;function m_(){if(Mp)return fa;Mp=1,Object.defineProperty(fa,"__esModule",{value:!0});var n=se,e=n.__importDefault(p_()),t=n.__importDefault(fR()),r="/conversations",i=function(){function s(o){this.apiCall=o,this.individualConversationModels={},this.apiCall=o,this._conversationsModels=new e.default(this.apiCall)}return s.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(o){return[2,this.apiCall.get(r)]})})},s.prototype.models=function(o){return o===void 0?this._conversationsModels:(this.individualConversationModels[o]===void 0&&(this.individualConversationModels[o]=new t.default(o,this.apiCall)),this.individualConversationModels[o])},Object.defineProperty(s,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),s}();return fa.default=i,fa}var ga={},kp;function pR(){if(kp)return ga;kp=1,Object.defineProperty(ga,"__esModule",{value:!0});var n=se,e=n.__importDefault(m_()),t=function(){function r(i,s){this.id=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.update=function(i){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(s){return[2,this.apiCall.put(this.endpointPath(),i)]})})},r.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.delete(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id
1687))},r}();return ga.default=t,ga}var ya={},_a={},Np;function g_(){if(Np)return _a;Np=1,Object.defineProperty(_a,"__esModule",{value:!0});var n=se,e="/stemming/dictionaries",t=function(){function r(i){this.apiCall=i,this.apiCall=i}return r.prototype.upsert=function(i,s){return n.__awaiter(this,void 0,void 0,function(){var o,u;return n.__generator(this,function(l){switch(l.label){case 0:return o=Array.isArray(s)?s.map(function(c){return JSON.stringify(c)}).join(` 1688`):s,[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:{id:i},bodyParameters:o,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0})];case 1:return u=l.sent(),[2,Array.isArray(s)?u.split(` 1689`).map(function(c){return JSON.parse(c)}):u]}})})},r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.endpointPath=function(i){return i===void 0?"".concat(r.RESOURCEPATH):"".concat(r.RESOURCEPATH,"/").concat(encodeURIComponent(i))},Object.defineProperty(r,"RESOURCEPATH",{get:function(){return e},enumerable:!1,configurable:!0}),r}();return _a.default=t,_a}var va={},Lp;function mR(){if(Lp)return va;Lp=1,Object.defineProperty(va,"__esModule",{value:!0});var n=se,e=n.__importDefault(g_()),t=function(){function r(i,s){this.id=i,this.apiCall=s}return r.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(i){return[2,this.apiCall.get(this.endpointPath())]})})},r.prototype.endpointPath=function(){return"".concat(e.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},r}();return va.default=t,va}var Fp;function gR(){if(Fp)return ya;Fp=1,Object.defineProperty(ya,"__esModule",{value:!0});var n=se,e=n.__importDefault(g_()),t=n.__importDefault(mR()),r="/stemming",i=function(){function s(o){this.apiCall=o,this.individualStemmingDictionaries={},this.apiCall=o,this._stemmingDictionaries=new e.default(this.apiCall)}return s.prototype.dictionaries=function(o){return o===void 0?this._stemmingDictionaries:(this.individualStemmingDictionaries[o]===void 0&&(this.individualStemmingDictionaries[o]=new t.default(o,this.apiCall)),this.individualStemmingDictionaries[o])},Object.defineProperty(s,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),s}();return ya.default=i,ya}var jp;function yR(){if(jp)return Ro;jp=1,Object.defineProperty(Ro,"__esModule",{value:!0});var n=se,e=n.__importDefault(n_()),t=n.__importDefault(r_()),r=n.__importDefault(sr()),i=n.__importDefault(eR()),s=n.__importDefault(u_()),o=n.__importDefault(tR()),u=n.__importDefault(l_()),l=n.__importDefault(nR()),c=n.__importDefault(rR()),h=n.__importDefault(iR()),p=n.__importDefault(sR()),g=n.__importDefault(oR()),v=n.__importDefault(aR()),P=n.__importDefault(c_()),A=n.__importDefault(h_()),D=n.__importDefault(uR()),M=n.__importDefault(hR()),U=n.__importDefault(f_()),B=n.__importDefault(dR()),q=n.__importDefault(m_()),H=n.__importDefault(pR()),K=n.__importDefault(gR()),x=function(){function b(E){var I;E.sendApiKeyAsQueryParam=(I=E.sendApiKeyAsQueryParam)!==null&&I!==void 0?I:!1,this.configuration=new e.default(E),this.apiCall=new t.default(this.configuration),this.debug=new c.default(this.apiCall),this.metrics=new h.default(this.apiCall),this.stats=new p.default(this.apiCall),this.health=new g.default(this.apiCall),this.operations=new v.default(this.apiCall),this.multiSearch=new P.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new s.default(this.apiCall),this.individualAliases={},this._keys=new u.default(this.apiCall),this.individualKeys={},this._presets=new A.default(this.apiCall),this.individualPresets={},this._stopwords=new U.default(this.apiCall),this.individualStopwords={},this.analytics=new M.default(this.apiCall),this.stemming=new K.default(this.apiCall),this._conversations=new q.default(this.apiCall),this.individualConversations={}}return b.prototype.collections=function(E){return E===void 0?this._collections:(this.individualCollections[E]===void 0&&(this.individualCollections[E]=new i.default(E,this.apiCall,this.configuration)),this.individualCollections[E])},b.prototype.aliases=function(E){return E===void 0?this._aliases:(this.individualAliases[E]===void 0&&(this.individualAliases[E]=new o.default(E,this.apiCall)),this.individualAliases[E])},b.prototype.keys=function(E){return E===void 0?this._keys:(this.individualKeys[E]===void 0&&(this.individualKeys[E]=new l.default(E,this.apiCall)),this.individualKeys[E])},b.prototype.presets=function(E){return E===void 0?this._presets:(this.individualPresets[E]===void 0&&(this.individualPresets[E]=new D.default(E,this.apiCall)),this.individualPresets[E])},b.prototype.stopwords=function(E){return E===void 0?this._stopwords:(this.individualStopwords[E]===void 0&&(this.individualStopwords[E]=new B.default(E,this.apiCall)),this.individualStopwords[E])},b.prototype.conversations=function(E){return E===void 0?this._conversations:(this.individualConversations[E]===void 0&&(this.individualConversations[E]=new H.default(E,this.apiCall)),this.individualConversations[E])},b}();return Ro.default=x,Ro}var wa={},ps={},Up;function _R(){if(Up)return ps;Up=1,Object.defineProperty(ps,"__esModule",{value:!0}),ps.SearchOnlyCollection=void 0;var n=s_(),e=function(){function t(r,i,s){this.name=r,this.apiCall=i,this.configuration=s,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return t.prototype.documents=function(){return this._documents},t}();return ps.SearchOnlyCollection=e,ps}var Bp;function vR(){if(Bp)return wa;Bp=1,Object.defineProperty(wa,"__esModule",{value:!0});var n=se,e=n.__importDefault(n_()),t=n.__importDefault(r_()),r=n.__importDefault(c_()),i=_R(),s=function(){function o(u){var l;u.sendApiKeyAsQueryParam=(l=u.sendApiKeyAsQueryParam)!==null&&l!==void 0?l:!0,u.sendApiKeyAsQueryParam===!0&&(u.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),u.sendApiKeyAsQueryParam=!1),this.configuration=new e.default(u),this.apiCall=new t.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return o.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEac
1689h(function(u){u[0];var l=u[1];l.documents().clearCache()})},o.prototype.collections=function(u){if(u)return this.individualCollections[u]===void 0&&(this.individualCollections[u]=new i.SearchOnlyCollection(u,this.apiCall,this.configuration)),this.individualCollections[u];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},o}();return wa.default=s,wa}Object.defineProperty(Kn,"__esModule",{value:!0});Kn.Errors=wR=Kn.SearchClient=Kn.Client=void 0;var ih=se,y_=ih.__importDefault(yR());Kn.Client=y_.default;var __=ih.__importDefault(vR()),wR=Kn.SearchClient=__.default,v_=ih.__importStar(Zs());Kn.Errors=v_;Kn.default={Client:y_.default,SearchClient:__.default,Errors:v_};const w_=qp.forwardRef(function(e,t){return O.jsx(Se,{...e,display:"grid",ref:t})}),bR={offscreen:{y:0,rotate:0,opacity:1,transition:{duration:0}},onscreen:{y:0,rotate:0,opacity:1,transition:{duration:0}}},TR={offscreen:{y:500,opacity:0},onscreen:{y:0,opacity:1,transition:{type:"tween",bounce:.4,duration:.6}}},ER=(n,e,t)=>{const r=W.useRef(null),[i,s]=W.useState(null);W.useEffect(()=>{if(r.current&&i===null){const c=r.current.getBoundingClientRect().top,h=window.outerHeight>c;s(h)}},[i]);const o=W.useMemo(()=>{if(i!==null&&!i)return n},[i,n]),u=W.useMemo(()=>{if(e)return{once:!0,margin:e}},[e]),l=W.useMemo(()=>{if(t)return{staggerChildren:t}},[t]);return{ref:r,motionProps:{variants:o,viewport:u,transition:l}}};export{Et as $,dI as A,UC as B,sP as C,HR as D,jR as E,qC as F,BR as G,XR as H,Pd as I,Sg as J,fb as K,tb as L,SE as M,QR as N,wR as O,WT as P,RC as Q,ER as R,qR as S,YR as T,IC as U,bR as V,TR as W,wv as X,mi as Y,Le as Z,ec as _,yI as a,o0 as a0,Yv as a1,s0 as a2,Ds as a3,Sm as a4,dn as a5,Kw as a6,ot as a7,Um as a8,ow as a9,cI as aA,fI as aB,pI as aC,mI as aD,gI as aE,Xw as aa,Yw as ab,zw as ac,Wb as ad,lg as ae,Ma as af,ZR as ag,pP as ah,JR as ai,tI as aj,eI as ak,cs as al,nI as am,HC as an,LR as ao,iI as ap,aI as aq,uI as ar,oI as as,hI as at,Wu as au,OS as av,DS as aw,MS as ax,Ql as ay,lI as az,GR as b,rI as c,Sc as d,w_ as e,RE as f,Me as g,lP as h,jC as i,SC as j,Fr as k,nP as l,Ad as m,KR as n,zR as o,WR as p,FR as q,X0 as r,NR as s,gs as t,FC as u,$R as v,UR as w,Fd as x,Rl as y,aP as z};
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.